@univerjs/sheets 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ export interface ISetRangeValuesCommandParams extends Partial<ISheetCommandShare
8
8
  * 3. IObjectMatrixPrimitiveType<ICellData>: Bring the row/column information MATRIX, indicating the data of multiple cells
9
9
  */
10
10
  value: ICellData | ICellData[][] | IObjectMatrixPrimitiveType<ICellData>;
11
+ redoUndoId?: string;
11
12
  }
12
13
  /**
13
14
  * The command to set values for ranges.
@@ -38,7 +38,7 @@ export { DefinedNameDataController } from './controllers/defined-name-data.contr
38
38
  export { adjustRangeOnMutation, getSeparateEffectedRangesOnCommand, handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleCommonDefaultRangeChangeWithEffectRefCommands, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRow, handleIRemoveCol, handleIRemoveRow, handleMoveCols, handleMoveRange, handleMoveRows, rotateRange, runRefRangeMutations, } from './services/ref-range/util';
39
39
  export type { MutationsAffectRange } from './services/ref-range/util';
40
40
  export { InterceptCellContentPriority, INTERCEPTOR_POINT } from './services/sheet-interceptor/interceptor-const';
41
- export { AFTER_CELL_EDIT, AFTER_CELL_EDIT_ASYNC, BEFORE_CELL_EDIT, SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service';
41
+ export { AFTER_CELL_EDIT, BEFORE_CELL_EDIT, SheetInterceptorService, VALIDATE_CELL } from './services/sheet-interceptor/sheet-interceptor.service';
42
42
  export type { ISheetLocation, ISheetLocationBase, ISheetRowLocation } from './services/sheet-interceptor/utils/interceptor';
43
43
  export { MERGE_CELL_INTERCEPTOR_CHECK, MergeCellController } from './controllers/merge-cell.controller';
44
44
  export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
@@ -22,7 +22,7 @@ interface ISheetLocationForEditor extends ISheetLocation {
22
22
  }
23
23
  export declare const BEFORE_CELL_EDIT: IInterceptor<ICellDataForSheetInterceptor, ISheetLocationForEditor>;
24
24
  export declare const AFTER_CELL_EDIT: IInterceptor<ICellDataForSheetInterceptor, ISheetLocationForEditor>;
25
- export declare const AFTER_CELL_EDIT_ASYNC: IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocationForEditor>;
25
+ export declare const VALIDATE_CELL: IInterceptor<Promise<boolean>, ISheetLocation>;
26
26
  /**
27
27
  * This class expose methods for sheet features to inject code to sheet underlying logic.
28
28
  */
@@ -40,7 +40,7 @@ export declare class SheetInterceptorService extends Disposable {
40
40
  readonly writeCellInterceptor: InterceptorManager<{
41
41
  BEFORE_CELL_EDIT: IInterceptor<ICellDataForSheetInterceptor, ISheetLocationForEditor>;
42
42
  AFTER_CELL_EDIT: IInterceptor<ICellDataForSheetInterceptor, ISheetLocationForEditor>;
43
- AFTER_CELL_EDIT_ASYNC: IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocationForEditor>;
43
+ VALIDATE_CELL: IInterceptor<Promise<boolean>, ISheetLocation>;
44
44
  }>;
45
45
  /** @ignore */
46
46
  constructor(_univerInstanceService: IUniverInstanceService);
@@ -85,7 +85,8 @@ export declare class SheetInterceptorService extends Disposable {
85
85
  */
86
86
  interceptRanges(interceptor: IRangeInterceptors): IDisposable;
87
87
  generateMutationsByRanges(info: IRangesInfo): IUndoRedoCommandInfosByInterceptor;
88
- onWriteCell(workbook: Workbook, worksheet: Worksheet, row: number, col: number, cellData: ICellData): Promise<Nullable<ICellDataForSheetInterceptor>>;
88
+ onWriteCell(workbook: Workbook, worksheet: Worksheet, row: number, col: number, cellData: ICellData): Nullable<ICellDataForSheetInterceptor>;
89
+ onValidateCell(workbook: Workbook, worksheet: Worksheet, row: number, col: number): Nullable<Promise<boolean>>;
89
90
  intercept<T extends IInterceptor<any, any>>(name: T, interceptor: T): IDisposable;
90
91
  fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>, effect?: InterceptorEffectEnum, _key?: string, filter?: (interceptor: IInterceptor<any, any>) => boolean): ReturnType<IComposeInterceptors<T, C>>;
91
92
  private _interceptWorkbook;