@univerjs-pro/collaboration-client v0.5.4
Class: CollaborativeUndoRedoService
Defined in: packages/collaboration-client/src/services/undoredo/collaborative-undoredo.service.ts:13
This UndoRedoService is local.
Extends
Implements
ICollaborativeUndoRedoService
Constructors
new CollaborativeUndoRedoService()
new CollaborativeUndoRedoService(
_currentUniverSheet,
_commandService,
_contextService,
_transformService,
_logService): CollaborativeUndoRedoService
Defined in: packages/collaboration-client/src/services/undoredo/collaborative-undoredo.service.ts:14
Parameters
Parameter | Type |
---|---|
_currentUniverSheet | IUniverInstanceService |
_commandService | ICommandService |
_contextService | IContextService |
_transformService | ITransformService |
_logService | ILogService |
Returns
Overrides
LocalUndoRedoService
.constructor
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_commandService | readonly | ICommandService | undefined | LocalUndoRedoService ._commandService | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:173 |
_disposed | protected | boolean | false | LocalUndoRedoService ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_redoStacks | readonly | Map <string , IUndoRedoItem []> | undefined | LocalUndoRedoService ._redoStacks | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:167 |
_undoRedoStatus$ | readonly | BehaviorSubject <{ redos : number ; undos : number ; }> | undefined | LocalUndoRedoService ._undoRedoStatus$ | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:163 |
_undoStacks | readonly | Map <string , IUndoRedoItem []> | undefined | LocalUndoRedoService ._undoStacks | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:166 |
_univerInstanceService | readonly | IUniverInstanceService | undefined | LocalUndoRedoService ._univerInstanceService | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:172 |
undoRedoStatus$ | readonly | Observable <IUndoRedoStatus > | undefined | ICollaborativeUndoRedoService.undoRedoStatus$ LocalUndoRedoService .undoRedoStatus$ | submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:162 |
Methods
__tempBatchingUndoRedo()
__tempBatchingUndoRedo(unitId): IDisposable
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:274
Batch undo redo elements into a single IUndoRedoItem
util the returned IDisposable
is called.
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
a disposable to cancel batching undo redo elements
Deprecated
This is a temporary solution. We are going to refactor the undo redo service shortly.
Implementation of
ICollaborativeUndoRedoService.__tempBatchingUndoRedo
Inherited from
LocalUndoRedoService
.__tempBatchingUndoRedo
_getRedoStack()
Call Signature
protected _getRedoStack(unitId):
| null
| IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:306
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
| null
| IUndoRedoItem
[]
Inherited from
LocalUndoRedoService
._getRedoStack
Call Signature
protected _getRedoStack(unitId, createAsNeeded): IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:307
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
Inherited from
LocalUndoRedoService
._getRedoStack
_getRedoStackForFocused()
protected _getRedoStackForFocused(): IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:328
Returns
Inherited from
LocalUndoRedoService
._getRedoStackForFocused
_getUndoStack()
Call Signature
protected _getUndoStack(unitId):
| null
| IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:294
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
| null
| IUndoRedoItem
[]
Inherited from
LocalUndoRedoService
._getUndoStack
Call Signature
protected _getUndoStack(unitId, createAsNeeded): IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:295
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
Inherited from
LocalUndoRedoService
._getUndoStack
_getUndoStackForFocused()
protected _getUndoStackForFocused(): IUndoRedoItem[]
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:318
Returns
Inherited from
LocalUndoRedoService
._getUndoStackForFocused
_updateStatus()
protected _updateStatus(): void
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:283
Returns
void
Inherited from
LocalUndoRedoService
._updateStatus
clearUndoRedo()
clearUndoRedo(unitID): void
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:220
Parameters
Parameter | Type |
---|---|
unitID | string |
Returns
void
Implementation of
ICollaborativeUndoRedoService.clearUndoRedo
Inherited from
LocalUndoRedoService
.clearUndoRedo
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
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
LocalUndoRedoService
.disposeWithMe
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
LocalUndoRedoService
.ensureNotDisposed
pitchTopRedoElement()
pitchTopRedoElement(): Nullable<IUndoRedoItem>
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:239
Pitch the top undo element of the currently focused Univer document instance.
Returns
Implementation of
ICollaborativeUndoRedoService.pitchTopRedoElement
Inherited from
LocalUndoRedoService
.pitchTopRedoElement
pitchTopUndoElement()
pitchTopUndoElement(): Nullable<IUndoRedoItem>
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:234
Pitch the top redo element of the currently focused Univer document instance.
Returns
Implementation of
ICollaborativeUndoRedoService.pitchTopUndoElement
Inherited from
LocalUndoRedoService
.pitchTopUndoElement
popRedoToUndo()
popRedoToUndo(): void
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:264
Returns
void
Implementation of
ICollaborativeUndoRedoService.popRedoToUndo
Inherited from
LocalUndoRedoService
.popRedoToUndo
popUndoToRedo()
popUndoToRedo(): void
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:254
Returns
void
Implementation of
ICollaborativeUndoRedoService.popUndoToRedo
Inherited from
LocalUndoRedoService
.popUndoToRedo
pushUndoRedo()
pushUndoRedo(item): void
Defined in: submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:187
Parameters
Parameter | Type |
---|---|
item | IUndoRedoItem |
Returns
void
Implementation of
ICollaborativeUndoRedoService.pushUndoRedo
Inherited from
LocalUndoRedoService
.pushUndoRedo
transformUndoRedo()
transformUndoRedo(unitID, changesets): void
Defined in: packages/collaboration-client/src/services/undoredo/collaborative-undoredo.service.ts:24
Parameters
Parameter | Type |
---|---|
unitID | string |
changesets | IChangeset |
Returns
void
Implementation of
ICollaborativeUndoRedoService.transformUndoRedo