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