@univerjsthread-commentclassesThreadcommentdatasourceservice

@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

Disposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
syncUpdateMutationToCollapublicbooleantrueshould 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
ParameterType
dataSourceNullable<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

ParameterType
commentIThreadComment

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

ParameterType
unitIdstring
subUnitIdstring
threadIdstring
commentIdstring

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

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getThreadComment()

getThreadComment(
   unitId, 
   subUnitId, 
threadId): Promise<Nullable<IBaseComment>>

Defined in: submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:98

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

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

ParameterType
unitIdstring
subUnitIdstring
threadIdsstring[]

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

ParameterType
commentIThreadComment

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

ParameterType
unitCommentsRecord<string, IThreadComment[]>
unitIdstring

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

ParameterType
commentIThreadComment

Returns

Promise<boolean>

Implementation of

IThreadCommentDataSourceService.updateComment