@univerjs-pro/collaboration-client v0.5.4
Class: DocCollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:406
Each univer document instance would map to an CollaborationEntity
to handle collaborated editing events.
Extends
Constructors
new DocCollaborationEntity()
new DocCollaborationEntity(
unitID,
type,
session,
injector,
compressMutationService,
localeService,
revisionService,
eventService,
logService,
commandService,
permissionService,
singleActiveUnitService?,
localCacheService?): DocCollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:408
Parameters
Parameter | Type |
---|---|
unitID | string |
type | UniverType |
session | CollaborationSession |
injector | Injector |
compressMutationService | CompressMutationService |
localeService | LocaleService |
revisionService | RevisionService |
eventService | CollaborationUIEventService |
logService | ILogService |
commandService | ICommandService |
permissionService | IPermissionService |
singleActiveUnitService ? | ISingleActiveUnitService |
localCacheService ? | ILocalCacheService |
Returns
Overrides
CollaborationEntity
.constructor
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:36 |
_changesetSessionId | protected | string | '' | CollaborationEntity ._changesetSessionId | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:35 |
_collaborationPaused | protected | boolean | false | CollaborationEntity ._collaborationPaused | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33 |
_commandService | readonly | ICommandService | undefined | CollaborationEntity ._commandService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59 |
_compressMutationService | readonly | CompressMutationService | undefined | CollaborationEntity ._compressMutationService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54 |
_disposed | protected | boolean | false | CollaborationEntity ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_eventService | readonly | CollaborationUIEventService | undefined | CollaborationEntity ._eventService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57 |
_injector | readonly | Injector | undefined | CollaborationEntity ._injector | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53 |
_localCacheService? | readonly | ILocalCacheService | undefined | CollaborationEntity ._localCacheService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62 |
_localeService | readonly | LocaleService | undefined | CollaborationEntity ._localeService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55 |
_logService | readonly | ILogService | undefined | CollaborationEntity ._logService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58 |
_revisionService | readonly | RevisionService | undefined | CollaborationEntity ._revisionService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56 |
_singleActiveUnitService? | readonly | ISingleActiveUnitService | undefined | CollaborationEntity ._singleActiveUnitService | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61 |
_state | protected | CollaborationState | undefined | CollaborationEntity ._state | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:28 |
_state$ | protected | BehaviorSubject <Nullable <CollaborationState >> | undefined | CollaborationEntity ._state$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:25 |
_type | readonly | UniverType | undefined | CollaborationEntity ._type | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:52 |
dispose$ | protected | Subject <void > | undefined | CollaborationEntity .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:120 |
session | readonly | CollaborationSession | undefined | CollaborationEntity .session | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:51 |
state$ | readonly | Observable <Nullable <CollaborationState >> | undefined | CollaborationEntity .state$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:26 |
status$ | readonly | Observable <CollaborationStatus > | undefined | CollaborationEntity .status$ | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:38 |
type | readonly | UniverType | undefined | - | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:410 |
unitID | readonly | string | undefined | CollaborationEntity .unitID | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:409 |
Accessors
state
Get Signature
get state(): CollaborationState
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29
Returns
CollaborationState
Inherited from
Methods
_createHandler()
protected _createHandler(): ICollaborationStateHandler
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:449
Returns
ICollaborationStateHandler
Overrides
CollaborationEntity
._createHandler
_init()
protected _init(): Promise<CollaborationState>
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:472
Returns
Promise
<CollaborationState
>
Overrides
_onLocalMutation()
protected _onLocalMutation(command): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:189
Parameters
Parameter | Type |
---|---|
command | IMutationInfo |
Returns
void
Inherited from
CollaborationEntity
._onLocalMutation
addHandlerCallback()
addHandlerCallback(cb): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:440
Parameters
Parameter | Type |
---|---|
cb | IDocCollaborationEntityCallback |
Returns
void
dispose()
dispose(): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:444
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
CollaborationEntity
.disposeWithMe
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
CollaborationEntity
.ensureNotDisposed
init()
init(): Promise<void>
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:67
Returns
Promise
<void
>
Inherited from
onLocalMutation()
onLocalMutation(command): void
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:90
Parameters
Parameter | Type |
---|---|
command | IMutationInfo |
Returns
void
Inherited from
CollaborationEntity
.onLocalMutation
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.