@univerjs-pro/collaboration-client v0.5.4
Class: SheetCollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:507
Each univer document instance would map to an CollaborationEntity
to handle collaborated editing events.
Extends
Constructors
new SheetCollaborationEntity()
new SheetCollaborationEntity(
unitID,
type,
session,
injector,
compressMutationService,
localeService,
revisionService,
_sheetTransformSelectionsService,
eventService,
logService,
commandService,
permissionService,
singleActiveUnitService?,
localCacheService?): SheetCollaborationEntity
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:508
Parameters
Parameter | Type |
---|---|
unitID | string |
type | UniverType |
session | CollaborationSession |
injector | Injector |
compressMutationService | CompressMutationService |
localeService | LocaleService |
revisionService | RevisionService |
_sheetTransformSelectionsService | SheetTransformSelectionsService |
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:510 |
unitID | readonly | string | undefined | CollaborationEntity .unitID | packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:509 |
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:541
Returns
ICollaborationStateHandler
Overrides
CollaborationEntity
._createHandler
_init()
protected _init(): Promise<CollaborationState>
Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:549
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
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
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.