@univerjs/sheets v0.1.17 • Docs
Class: SheetInterceptorService
This class expose methods for sheet features to inject code to sheet underlying logic.
It would inject Workbook & Worksheet.
Extends
Constructors
new SheetInterceptorService()
new SheetInterceptorService(_univerInstanceService): SheetInterceptorService
Parameters
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:59 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
Methods
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:86 (opens in a new tab)
disposeWithMe()
protected disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
IDisposable
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
fetchThroughInterceptors()
fetchThroughInterceptors<T, C>(name): (initValue, initContext) => Nullable<T>
Type Parameters
Type Parameter |
---|
T |
C |
Parameters
Parameter | Type |
---|---|
name | IInterceptor <T , C > |
Returns
Function
Parameters
Parameter | Type |
---|---|
initValue | Nullable <T > |
initContext | C |
Returns
Nullable
<T
>
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:137 (opens in a new tab)
intercept()
intercept<T>(name, interceptor): IDisposable
Type Parameters
Type Parameter |
---|
T extends IInterceptor <any , any > |
Parameters
Parameter | Type |
---|---|
name | T |
interceptor | T |
Returns
IDisposable
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:121 (opens in a new tab)
interceptCommand()
interceptCommand(interceptor): IDisposable
Parameters
Parameter | Type |
---|---|
interceptor | ICommandInterceptor |
Returns
IDisposable
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:94 (opens in a new tab)
onCommandExecute()
onCommandExecute(command): IUndoRedoCommandInfosByInterceptor
When command is executing, call this method to gether undo redo mutations from upper features.
Parameters
Parameter | Type |
---|---|
command | ICommandInfo <object > |
Returns
IUndoRedoCommandInfosByInterceptor
Defined in
packages/sheets/src/services/sheet-interceptor/sheet-interceptor.service.ts:110 (opens in a new tab)