@univerjs/thread-comment v0.5.4
Class: ThreadCommentDataSourceService
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:82
Preserve for import async comment system
Extends
Implements
Constructors
new ThreadCommentDataSourceService()
new ThreadCommentDataSourceService(): ThreadCommentDataSourceService
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:94
Returns
ThreadCommentDataSourceService
Overrides
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
syncUpdateMutationToColla | public | boolean | true | should sync update mutations to collaboration-server | - | submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:84 |
Accessors
dataSource
Get Signature
get dataSource(): Nullable<IThreadCommentDataSource>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:90
Returns
Nullable
<IThreadCommentDataSource
>
Set Signature
set dataSource(dataSource): void
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:86
Parameters
Parameter | Type |
---|---|
dataSource | Nullable <IThreadCommentDataSource > |
Returns
void
Implementation of
IThreadCommentDataSourceService
.dataSource
Methods
addComment()
addComment(comment): Promise<IThreadComment>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:107
handler for add-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<IThreadComment
>
Implementation of
IThreadCommentDataSourceService
.addComment
deleteComment()
deleteComment(
unitId,
subUnitId,
threadId,
commentId): Promise<boolean>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:128
handler for delete-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
commentId | string |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.deleteComment
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
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getThreadComment()
getThreadComment(
unitId,
subUnitId,
threadId): Promise<Nullable<IBaseComment>>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:98
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
Promise
<Nullable
<IBaseComment
>>
Implementation of
IThreadCommentDataSourceService
.getThreadComment
listThreadComments()
listThreadComments(
unitId,
subUnitId,
threadIds): Promise<false | IBaseComment[]>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:135
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadIds | string [] |
Returns
Promise
<false
| IBaseComment
[]>
Implementation of
IThreadCommentDataSourceService
.listThreadComments
resolveComment()
resolveComment(comment): Promise<boolean>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:121
handler for resolve-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.resolveComment
saveToSnapshot()
saveToSnapshot(unitComments, unitId): Record<string, ThreadCommentJSON[]>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:143
Parameters
Parameter | Type |
---|---|
unitComments | Record <string , IThreadComment []> |
unitId | string |
Returns
Record
<string
, ThreadCommentJSON
[]>
Implementation of
IThreadCommentDataSourceService
.saveToSnapshot
updateComment()
updateComment(comment): Promise<boolean>
Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:114
handler for update-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>