@univerjs/thread-comment v0.5.0-beta.1 • Docs
Class: ThreadCommentDataSourceService
Preserve for import async comment system
Extends
Implements
Constructors
new ThreadCommentDataSourceService()
new ThreadCommentDataSourceService(): ThreadCommentDataSourceService
Returns
ThreadCommentDataSourceService
Overrides
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:94
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:93 |
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>
Returns
Nullable
<IThreadCommentDataSource
>
Set Signature
set dataSource(dataSource): void
Parameters
Parameter | Type |
---|---|
dataSource | Nullable <IThreadCommentDataSource > |
Returns
void
Implementation of
IThreadCommentDataSourceService
.dataSource
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:90
Methods
addComment()
addComment(comment): Promise<IThreadComment>
handler for add-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<IThreadComment
>
Implementation of
IThreadCommentDataSourceService
.addComment
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:107
deleteComment()
deleteComment(
unitId,
subUnitId,
threadId,
commentId): Promise<boolean>
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
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:128
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
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
getThreadComment()
getThreadComment(
unitId,
subUnitId,
threadId): Promise<Nullable<IBaseComment>>
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
Promise
<Nullable
<IBaseComment
>>
Implementation of
IThreadCommentDataSourceService
.getThreadComment
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:98
listThreadComments()
listThreadComments(
unitId,
subUnitId,
threadIds): Promise<false | IBaseComment[]>
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadIds | string [] |
Returns
Promise
<false
| IBaseComment
[]>
Implementation of
IThreadCommentDataSourceService
.listThreadComments
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:135
resolveComment()
resolveComment(comment): Promise<boolean>
handler for resolve-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.resolveComment
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:121
saveToSnapshot()
saveToSnapshot(unitComments, unitId): Record<string, ThreadCommentJSON[]>
Parameters
Parameter | Type |
---|---|
unitComments | Record <string , IThreadComment []> |
unitId | string |
Returns
Record
<string
, ThreadCommentJSON
[]>
Implementation of
IThreadCommentDataSourceService
.saveToSnapshot
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:143
updateComment()
updateComment(comment): Promise<boolean>
handler for update-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.updateComment
Defined in
submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:114