@univerjsthread-commentclassesThreadcommentdatasourceservice

@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

Disposable.constructor

Defined in

submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:94

Properties

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

Nullable<IThreadCommentDataSource>

Set Signature

set dataSource(dataSource): void
Parameters
ParameterType
dataSourceNullable<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

ParameterType
commentIThreadComment

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

ParameterType
unitIdstring
subUnitIdstring
threadIdstring
commentIdstring

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

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getThreadComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

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

ParameterType
unitIdstring
subUnitIdstring
threadIdsstring[]

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

ParameterType
commentIThreadComment

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

ParameterType
unitCommentsRecord<string, IThreadComment[]>
unitIdstring

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

ParameterType
commentIThreadComment

Returns

Promise<boolean>

Implementation of

IThreadCommentDataSourceService.updateComment

Defined in

submodules/univer/packages/thread-comment/src/services/tc-datasource.service.ts:114