@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

ParameterType
unitIDstring
typeUniverType
sessionCollaborationSession
injectorInjector
compressMutationServiceCompressMutationService
localeServiceLocaleService
revisionServiceRevisionService
_sheetTransformSelectionsServiceSheetTransformSelectionsService
eventServiceCollaborationUIEventService
logServiceILogService
commandServiceICommandService
permissionServiceIPermissionService
singleActiveUnitService?ISingleActiveUnitService
localCacheService?ILocalCacheService

Returns

SheetCollaborationEntity

Overrides

CollaborationEntity.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_changesetReqIdprotectednumber0CollaborationEntity._changesetReqIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:36
_changesetSessionIdprotectedstring''CollaborationEntity._changesetSessionIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:35
_collaborationPausedprotectedbooleanfalseCollaborationEntity._collaborationPausedpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33
_commandServicereadonlyICommandServiceundefinedCollaborationEntity._commandServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59
_compressMutationServicereadonlyCompressMutationServiceundefinedCollaborationEntity._compressMutationServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54
_disposedprotectedbooleanfalseCollaborationEntity._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_eventServicereadonlyCollaborationUIEventServiceundefinedCollaborationEntity._eventServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57
_injectorreadonlyInjectorundefinedCollaborationEntity._injectorpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53
_localCacheService?readonlyILocalCacheServiceundefinedCollaborationEntity._localCacheServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62
_localeServicereadonlyLocaleServiceundefinedCollaborationEntity._localeServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55
_logServicereadonlyILogServiceundefinedCollaborationEntity._logServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58
_revisionServicereadonlyRevisionServiceundefinedCollaborationEntity._revisionServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56
_singleActiveUnitService?readonlyISingleActiveUnitServiceundefinedCollaborationEntity._singleActiveUnitServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61
_stateprotectedCollaborationStateundefinedCollaborationEntity._statepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:28
_state$protectedBehaviorSubject<Nullable<CollaborationState>>undefinedCollaborationEntity._state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:25
_typereadonlyUniverTypeundefinedCollaborationEntity._typepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:52
dispose$protectedSubject<void>undefinedCollaborationEntity.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120
sessionreadonlyCollaborationSessionundefinedCollaborationEntity.sessionpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:51
state$readonlyObservable<Nullable<CollaborationState>>undefinedCollaborationEntity.state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:26
status$readonlyObservable<CollaborationStatus>undefinedCollaborationEntity.status$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:38
typereadonlyUniverTypeundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:510
unitIDreadonlystringundefinedCollaborationEntity.unitIDpackages/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

CollaborationEntity.state

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

CollaborationEntity._init


_onLocalMutation()

protected _onLocalMutation(command): void

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:189

Parameters

ParameterType
commandIMutationInfo

Returns

void

Inherited from

CollaborationEntity._onLocalMutation


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:122

Returns

void

Inherited from

CollaborationEntity.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

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

CollaborationEntity.init


onLocalMutation()

onLocalMutation(command): void

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:90

Parameters

ParameterType
commandIMutationInfo

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

IDisposable

a disposable which will resume collaboration when called.

Inherited from

CollaborationEntity.pauseCollaboration