@univerjs-pro/collaboration-client v0.5.0-beta.1 • Docs


Class: SheetCollaborationEntity

Each univer document instance would map to an CollaborationEntity to handle collaborated editing events.

Extends

Constructors

new SheetCollaborationEntity()

new SheetCollaborationEntity(
   unitID, 
   type, 
   session, 
   injector, 
   localCacheService, 
   compressMutationService, 
   localeService, 
   revisionService, 
   _sheetTransformSelectionsService, 
   logService, 
   commandService, 
   messageService, 
   permissionService, 
   singleActiveUnitService?): SheetCollaborationEntity

Parameters

ParameterType
unitIDstring
typeUniverType
sessionCollaborationSession
injectorInjector
localCacheServiceLocalCacheService
compressMutationServiceCompressMutationService
localeServiceLocaleService
revisionServiceRevisionService
_sheetTransformSelectionsServiceSheetTransformSelectionsService
logServiceILogService
commandServiceICommandService
messageServiceIMessageService
permissionServiceIPermissionService
singleActiveUnitService?ISingleActiveUnitService

Returns

SheetCollaborationEntity

Overrides

CollaborationEntity.constructor

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:509

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_changesetReqIdprotectednumber0CollaborationEntity._changesetReqIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:40
_changesetSessionIdprotectedstring''CollaborationEntity._changesetSessionIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:39
_collaborationPausedprotectedbooleanfalseCollaborationEntity._collaborationPausedpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:37
_commandServicereadonlyICommandServiceundefinedCollaborationEntity._commandServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:63
_compressMutationServicereadonlyCompressMutationServiceundefinedCollaborationEntity._compressMutationServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59
_disposedprotectedbooleanfalseCollaborationEntity._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
_injectorreadonlyInjectorundefinedCollaborationEntity._injectorpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57
_localCacheServicereadonlyLocalCacheServiceundefinedCollaborationEntity._localCacheServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58
_localeServicereadonlyLocaleServiceundefinedCollaborationEntity._localeServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:60
_logServicereadonlyILogServiceundefinedCollaborationEntity._logServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62
_messageServicereadonlyIMessageServiceundefinedCollaborationEntity._messageServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:64
_revisionServicereadonlyRevisionServiceundefinedCollaborationEntity._revisionServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61
_singleActiveUnitService?readonlyISingleActiveUnitServiceundefinedCollaborationEntity._singleActiveUnitServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:66
_stateprotectedCollaborationStateundefinedCollaborationEntity._statepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:32
_state$protectedBehaviorSubject<Nullable<CollaborationState>>undefinedCollaborationEntity._state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29
_typereadonlyUniverTypeundefinedCollaborationEntity._typepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56
dispose$protectedSubject<void>undefinedCollaborationEntity.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:117
sessionreadonlyCollaborationSessionundefinedCollaborationEntity.sessionpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55
state$readonlyObservable<Nullable<CollaborationState>>undefinedCollaborationEntity.state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:30
status$readonlyObservable<CollaborationStatus>undefinedCollaborationEntity.status$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:42
typereadonlyUniverTypeundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:511
unitIDreadonlystringundefinedCollaborationEntity.unitIDpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:510

Accessors

state

Get Signature

get state(): CollaborationState
Returns

CollaborationState

Inherited from

CollaborationEntity.state

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33

Methods

_createHandler()

protected _createHandler(): ICollaborationStateHandler

Returns

ICollaborationStateHandler

Overrides

CollaborationEntity._createHandler

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:543


_init()

protected _init(): Promise<CollaborationState>

Returns

Promise<CollaborationState>

Overrides

CollaborationEntity._init

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:551


_onLocalMutation()

protected _onLocalMutation(command): void

Parameters

ParameterType
commandIMutationInfo<object>

Returns

void

Inherited from

CollaborationEntity._onLocalMutation

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:188


dispose()

dispose(): void

Returns

void

Inherited from

CollaborationEntity.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:119


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

CollaborationEntity.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

CollaborationEntity.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


init()

init(): Promise<void>

Returns

Promise<void>

Inherited from

CollaborationEntity.init

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

IDisposable

a disposable which will resume collaboration when called.

Inherited from

CollaborationEntity.pauseCollaboration

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:85