@univerjs-pro/collaboration-client v0.5.0-beta.1 • Docs
Class: DocCollaborationEntity
Each univer document instance would map to an CollaborationEntity
to handle collaborated editing events.
Extends
Constructors
new DocCollaborationEntity()
new DocCollaborationEntity(
unitID,
type,
session,
injector,
localCacheService,
compressMutationService,
localeService,
revisionService,
_docStateChangeManagerService,
_docTransformIMECacheService,
_docTransformStateCacheService,
_docTransformSelectionsService,
_docSyncEditingCollabCursorService,
logService,
commandService,
messageService,
permissionService,
singleActiveUnitService?): DocCollaborationEntity
Parameters
Parameter | Type |
---|---|
unitID | string |
type | UniverType |
session | CollaborationSession |
injector | Injector |
localCacheService | LocalCacheService |
compressMutationService | CompressMutationService |
localeService | LocaleService |
revisionService | RevisionService |
_docStateChangeManagerService | DocStateChangeManagerService |
_docTransformIMECacheService | DocTransformIMECacheService |
_docTransformStateCacheService | DocTransformStateCacheService |
_docTransformSelectionsService | DocTransformSelectionsService |
_docSyncEditingCollabCursorService | DocSyncEditingCollabCursorService |
logService | ILogService |
commandService | ICommandService |
messageService | IMessageService |
permissionService | IPermissionService |
singleActiveUnitService ? | ISingleActiveUnitService |
Returns
Overrides
CollaborationEntity
.constructor
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:397
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_changesetReqId | protected | number | 0 | CollaborationEntity ._changesetReqId | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:40 |
_changesetSessionId | protected | string | '' | CollaborationEntity ._changesetSessionId | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:39 |
_collaborationPaused | protected | boolean | false | CollaborationEntity ._collaborationPaused | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:37 |
_commandService | readonly | ICommandService | undefined | CollaborationEntity ._commandService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:63 |
_compressMutationService | readonly | CompressMutationService | undefined | CollaborationEntity ._compressMutationService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59 |
_disposed | protected | boolean | false | CollaborationEntity ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_injector | readonly | Injector | undefined | CollaborationEntity ._injector | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57 |
_localCacheService | readonly | LocalCacheService | undefined | CollaborationEntity ._localCacheService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58 |
_localeService | readonly | LocaleService | undefined | CollaborationEntity ._localeService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:60 |
_logService | readonly | ILogService | undefined | CollaborationEntity ._logService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62 |
_messageService | readonly | IMessageService | undefined | CollaborationEntity ._messageService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:64 |
_revisionService | readonly | RevisionService | undefined | CollaborationEntity ._revisionService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61 |
_singleActiveUnitService? | readonly | ISingleActiveUnitService | undefined | CollaborationEntity ._singleActiveUnitService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:66 |
_state | protected | CollaborationState | undefined | CollaborationEntity ._state | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:32 |
_state$ | protected | BehaviorSubject <Nullable <CollaborationState >> | undefined | CollaborationEntity ._state$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29 |
_type | readonly | UniverType | undefined | CollaborationEntity ._type | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56 |
dispose$ | protected | Subject <void > | undefined | CollaborationEntity .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:117 |
session | readonly | CollaborationSession | undefined | CollaborationEntity .session | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55 |
state$ | readonly | Observable <Nullable <CollaborationState >> | undefined | CollaborationEntity .state$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:30 |
status$ | readonly | Observable <CollaborationStatus > | undefined | CollaborationEntity .status$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:42 |
type | readonly | UniverType | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:399 |
unitID | readonly | string | undefined | CollaborationEntity .unitID | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:398 |
Accessors
state
Get Signature
get state(): CollaborationState
Returns
CollaborationState
Inherited from
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33
Methods
_createHandler()
protected _createHandler(): ICollaborationStateHandler
Returns
ICollaborationStateHandler
Overrides
CollaborationEntity
._createHandler
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:434
_init()
protected _init(): Promise<CollaborationState>
Returns
Promise
<CollaborationState
>
Overrides
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:447
_onLocalMutation()
protected _onLocalMutation(command): void
Parameters
Parameter | Type |
---|---|
command | IMutationInfo <object > |
Returns
void
Inherited from
CollaborationEntity
._onLocalMutation
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:188
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:119
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
CollaborationEntity
.disposeWithMe
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
CollaborationEntity
.ensureNotDisposed
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
init()
init(): Promise<void>
Returns
Promise
<void
>
Inherited from
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:71
pauseCollaboration()
pauseCollaboration(): IDisposable
Pause collaboration on the document. Remote changesets would be inserted to a queue and wait for resuming.
Returns
a disposable which will resume collaboration when called.
Inherited from
CollaborationEntity
.pauseCollaboration
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:85