@univerjs/thread-comment v0.5.4
Class: ThreadCommentModel
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:66
Extends
Constructors
new ThreadCommentModel()
new ThreadCommentModel(_dataSourceService, _lifecycleService): ThreadCommentModel
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:75
Parameters
Parameter | Type |
---|---|
_dataSourceService | IThreadCommentDataSourceService |
_lifecycleService | LifecycleService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
commentUpdate$ | public | Observable <CommentUpdate > | undefined | - | submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:71 |
Methods
addComment()
addComment(
unitId,
subUnitId,
origin,
shouldSync?): boolean
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:220
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
origin | IThreadComment |
shouldSync ? | boolean |
Returns
boolean
deleteComment()
deleteComment(
unitId,
subUnitId,
commentId): boolean
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:401
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
commentId | string |
Returns
boolean
deleteThread()
deleteThread(
unitId,
subUnitId,
threadId): void
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:389
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
void
deleteUnit()
deleteUnit(unitId): void
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:417
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureMap()
ensureMap(unitId, subUnitId): Map<string, IThreadComment>
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:131
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Map
<string
, IThreadComment
>
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getAll()
getAll(): {
threads: IThreadInfo[];
unitId: string;
}[]
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:450
Returns
{
threads
: IThreadInfo
[];
unitId
: string
;
}[]
getComment()
getComment(
unitId,
subUnitId,
commentId): undefined | IThreadComment
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:318
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
commentId | string |
Returns
undefined
| IThreadComment
getCommentWithChildren()
getCommentWithChildren(
unitId,
subUnitId,
commentId): Nullable<IThreadInfo>
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:360
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
commentId | string |
Returns
getRootComment()
getRootComment(
unitId,
subUnitId,
threadId): undefined | IThreadComment
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:323
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
undefined
| IThreadComment
getThread()
getThread(
unitId,
subUnitId,
threadId): Nullable<IThreadInfo>
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:328
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
getUnit()
getUnit(unitId): IThreadInfo[]
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:430
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
resolveComment()
resolveComment(
unitId,
subUnitId,
commentId,
resolved): boolean
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:298
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
commentId | string |
resolved | boolean |
Returns
boolean
syncThreadComments()
syncThreadComments(
unitId,
subUnitId,
threadIds): Promise<void>
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:192
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadIds | string [] |
Returns
Promise
<void
>
updateComment()
updateComment(
unitId,
subUnitId,
payload,
silent?): boolean
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:257
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
payload | IUpdateCommentPayload |
silent ? | boolean |
Returns
boolean
updateCommentRef()
updateCommentRef(
unitId,
subUnitId,
payload,
silent?): boolean
Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:279
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
payload | IUpdateCommentRefPayload |
silent ? | boolean |
Returns
boolean