@univerjs/thread-comment v0.5.4


Class: ThreadCommentModel

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:66

Extends

Constructors

new ThreadCommentModel()

new ThreadCommentModel(_dataSourceService, _lifecycleService): ThreadCommentModel

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:75

Parameters

ParameterType
_dataSourceServiceIThreadCommentDataSourceService
_lifecycleServiceLifecycleService

Returns

ThreadCommentModel

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
commentUpdate$publicObservable<CommentUpdate>undefined-submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:71

Methods

addComment()

addComment(
   unitId, 
   subUnitId, 
   origin, 
   shouldSync?): boolean

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:220

Parameters

ParameterType
unitIdstring
subUnitIdstring
originIThreadComment
shouldSync?boolean

Returns

boolean


deleteComment()

deleteComment(
   unitId, 
   subUnitId, 
   commentId): boolean

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:401

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

boolean


deleteThread()

deleteThread(
   unitId, 
   subUnitId, 
   threadId): void

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:389

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

void


deleteUnit()

deleteUnit(unitId): void

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:417

Parameters

ParameterType
unitIdstring

Returns

void


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


ensureMap()

ensureMap(unitId, subUnitId): Map<string, IThreadComment>

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:131

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

Map<string, IThreadComment>


ensureNotDisposed()

protected ensureNotDisposed(): void

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

Returns

void

Inherited from

Disposable.ensureNotDisposed


getAll()

getAll(): {
  threads: IThreadInfo[];
  unitId: string;
 }[]

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:450

Returns

{ threads: IThreadInfo[]; unitId: string; }[]


getComment()

getComment(
   unitId, 
   subUnitId, 
   commentId): undefined | IThreadComment

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:318

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

undefined | IThreadComment


getCommentWithChildren()

getCommentWithChildren(
   unitId, 
   subUnitId, 
commentId): Nullable<IThreadInfo>

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:360

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

Nullable<IThreadInfo>


getRootComment()

getRootComment(
   unitId, 
   subUnitId, 
   threadId): undefined | IThreadComment

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:323

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

undefined | IThreadComment


getThread()

getThread(
   unitId, 
   subUnitId, 
threadId): Nullable<IThreadInfo>

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:328

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

Nullable<IThreadInfo>


getUnit()

getUnit(unitId): IThreadInfo[]

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:430

Parameters

ParameterType
unitIdstring

Returns

IThreadInfo[]


resolveComment()

resolveComment(
   unitId, 
   subUnitId, 
   commentId, 
   resolved): boolean

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:298

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring
resolvedboolean

Returns

boolean


syncThreadComments()

syncThreadComments(
   unitId, 
   subUnitId, 
threadIds): Promise<void>

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:192

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdsstring[]

Returns

Promise<void>


updateComment()

updateComment(
   unitId, 
   subUnitId, 
   payload, 
   silent?): boolean

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:257

Parameters

ParameterType
unitIdstring
subUnitIdstring
payloadIUpdateCommentPayload
silent?boolean

Returns

boolean


updateCommentRef()

updateCommentRef(
   unitId, 
   subUnitId, 
   payload, 
   silent?): boolean

Defined in: submodules/univer/packages/thread-comment/src/models/thread-comment.model.ts:279

Parameters

ParameterType
unitIdstring
subUnitIdstring
payloadIUpdateCommentRefPayload
silent?boolean

Returns

boolean