@univerjs-pro/collaboration-client v0.5.4
Class: abstract
CollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:24
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,
_compressMutationService,
_localeService,
_revisionService,
_eventService,
_logService,
_commandService,
_permissionService,
_singleActiveUnitService?,
_localCacheService?): CollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:49
Parameters
Parameter | Type |
---|---|
unitID | string |
session | CollaborationSession |
_type | UniverType |
_injector | Injector |
_compressMutationService | CompressMutationService |
_localeService | LocaleService |
_revisionService | RevisionService |
_eventService | CollaborationUIEventService |
_logService | ILogService |
_commandService | ICommandService |
_permissionService | IPermissionService |
_singleActiveUnitService ? | ISingleActiveUnitService |
_localCacheService ? | ILocalCacheService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_changesetReqId | protected | number | 0 | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:36 |
_changesetSessionId | protected | string | '' | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:35 |
_collaborationPaused | protected | boolean | false | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33 |
_commandService | readonly | ICommandService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59 |
_compressMutationService | readonly | CompressMutationService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54 |
_disposed | protected | boolean | false | RxDisposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_eventService | readonly | CollaborationUIEventService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57 |
_injector | readonly | Injector | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53 |
_localCacheService? | readonly | ILocalCacheService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62 |
_localeService | readonly | LocaleService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55 |
_logService | readonly | ILogService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58 |
_revisionService | readonly | RevisionService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56 |
_singleActiveUnitService? | readonly | ISingleActiveUnitService | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61 |
_state | protected | CollaborationState | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:28 |
_state$ | protected | BehaviorSubject <Nullable <CollaborationState >> | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:25 |
_type | readonly | UniverType | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:52 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:120 |
session | readonly | CollaborationSession | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:51 |
state$ | readonly | Observable <Nullable <CollaborationState >> | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:26 |
status$ | readonly | Observable <CollaborationStatus > | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:38 |
unitID | readonly | string | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:50 |
Accessors
state
Get Signature
get state(): CollaborationState
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29
Returns
CollaborationState
Methods
_createHandler()
protected _createHandler(): ICollaborationStateHandler
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:289
Returns
ICollaborationStateHandler
_init()
protected _init(): Promise<CollaborationState>
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:99
Returns
Promise
<CollaborationState
>
_onLocalMutation()
protected _onLocalMutation(command): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:189
Parameters
Parameter | Type |
---|---|
command | IMutationInfo |
Returns
void
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:122
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
init()
init(): Promise<void>
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:67
Returns
Promise
<void
>
onLocalMutation()
onLocalMutation(command): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:90
Parameters
Parameter | Type |
---|---|
command | IMutationInfo |
Returns
void
pauseCollaboration()
pauseCollaboration(): IDisposable
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:81
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.