@univerjs-pro/collaboration-client v0.5.0-beta.1 • Docs
Class: abstract
CollaborationEntity
Each univer document instance would map to an CollaborationEntity
to handle collaborated editing events.
Extends
Extended by
Constructors
new CollaborationEntity()
new CollaborationEntity(
unitID,
session,
_type,
_injector,
_localCacheService,
_compressMutationService,
_localeService,
_revisionService,
_logService,
_commandService,
_messageService,
_permissionService,
_singleActiveUnitService?): CollaborationEntity
Parameters
Parameter | Type |
---|---|
unitID | string |
session | CollaborationSession |
_type | UniverType |
_injector | Injector |
_localCacheService | LocalCacheService |
_compressMutationService | CompressMutationService |
_localeService | LocaleService |
_revisionService | RevisionService |
_logService | ILogService |
_commandService | ICommandService |
_messageService | IMessageService |
_permissionService | IPermissionService |
_singleActiveUnitService ? | ISingleActiveUnitService |
Returns
Overrides
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_changesetReqId | protected | number | 0 | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:40 |
_changesetSessionId | protected | string | '' | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:39 |
_collaborationPaused | protected | boolean | false | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:37 |
_commandService | readonly | ICommandService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:63 |
_compressMutationService | readonly | CompressMutationService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59 |
_disposed | protected | boolean | false | RxDisposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_injector | readonly | Injector | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57 |
_localCacheService | readonly | LocalCacheService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58 |
_localeService | readonly | LocaleService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:60 |
_logService | readonly | ILogService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62 |
_messageService | readonly | IMessageService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:64 |
_revisionService | readonly | RevisionService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61 |
_singleActiveUnitService? | readonly | ISingleActiveUnitService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:66 |
_state | protected | CollaborationState | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:32 |
_state$ | protected | BehaviorSubject <Nullable <CollaborationState >> | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29 |
_type | readonly | UniverType | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:117 |
session | readonly | CollaborationSession | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55 |
state$ | readonly | Observable <Nullable <CollaborationState >> | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:30 |
status$ | readonly | Observable <CollaborationStatus > | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:42 |
unitID | readonly | string | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54 |
Accessors
state
Get Signature
get state(): CollaborationState
Returns
CollaborationState
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33
Methods
_createHandler()
protected _createHandler(): ICollaborationStateHandler
Returns
ICollaborationStateHandler
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:288
_init()
protected _init(): Promise<CollaborationState>
Returns
Promise
<CollaborationState
>
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:99
_onLocalMutation()
protected _onLocalMutation(command): void
Parameters
Parameter | Type |
---|---|
command | IMutationInfo <object > |
Returns
void
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
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
init()
init(): Promise<void>
Returns
Promise
<void
>
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.
Defined in
packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:85