@univerjs/thread-comment v0.5.0-beta.1 • Docs


Class: ThreadCommentModel

Extends

Constructors

new ThreadCommentModel()

new ThreadCommentModel(_dataSourceService, _lifecycleService): ThreadCommentModel

Parameters

ParameterType
_dataSourceServiceIThreadCommentDataSourceService
_lifecycleServiceLifecycleService

Returns

ThreadCommentModel

Overrides

Disposable.constructor

Defined in

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

Properties

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

Methods

addComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
originIThreadComment
shouldSync?boolean

Returns

boolean

Defined in

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


deleteComment()

deleteComment(
   unitId, 
   subUnitId, 
   commentId): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

boolean

Defined in

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


deleteThread()

deleteThread(
   unitId, 
   subUnitId, 
   threadId): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

void

Defined in

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


deleteUnit()

deleteUnit(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

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


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


ensureMap()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

Map<string, IThreadComment>

Defined in

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


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

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


getAll()

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

Returns

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

Defined in

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


getComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

undefined | IThreadComment

Defined in

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


getCommentWithChildren()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring

Returns

Nullable<IThreadInfo>

Defined in

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


getRootComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

undefined | IThreadComment

Defined in

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


getThread()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdstring

Returns

Nullable<IThreadInfo>

Defined in

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


getUnit()

getUnit(unitId): IThreadInfo[]

Parameters

ParameterType
unitIdstring

Returns

IThreadInfo[]

Defined in

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


resolveComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
commentIdstring
resolvedboolean

Returns

boolean

Defined in

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


syncThreadComments()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
threadIdsstring[]

Returns

Promise<void>

Defined in

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


updateComment()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
payloadIUpdateCommentPayload
silent?boolean

Returns

boolean

Defined in

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


updateCommentRef()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
payloadIUpdateCommentRefPayload
silent?boolean

Returns

boolean

Defined in

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