@odoo/o-spreadsheet 16.4.13 → 16.4.15

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.
@@ -1287,7 +1287,7 @@ declare class StateObserver {
1287
1287
  commands: CoreCommand[];
1288
1288
  };
1289
1289
  addCommand(command: CoreCommand): void;
1290
- addChange(...args: any[]): void;
1290
+ addChange(...args: [...HistoryChange["path"], any]): void;
1291
1291
  }
1292
1292
 
1293
1293
  interface Validator {
@@ -2382,7 +2382,8 @@ declare const enum CommandResult {
2382
2382
  NoSplitSeparatorInSelection = 93,
2383
2383
  NoActiveSheet = 94,
2384
2384
  InvalidLocale = 95,
2385
- AlreadyInPaintingFormatMode = 96
2385
+ AlreadyInPaintingFormatMode = 96,
2386
+ NoChanges = 97
2386
2387
  }
2387
2388
  interface CommandHandler<T> {
2388
2389
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -3016,7 +3017,8 @@ interface BordersPluginState {
3016
3017
  declare class BordersPlugin extends CorePlugin<BordersPluginState> implements BordersPluginState {
3017
3018
  static getters: readonly ["getCellBorder", "getBordersColors"];
3018
3019
  readonly borders: BordersPluginState["borders"];
3019
- handle(cmd: Command): void;
3020
+ allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges;
3021
+ handle(cmd: CoreCommand): void;
3020
3022
  /**
3021
3023
  * Move borders according to the inserted columns.
3022
3024
  * Ensure borders continuity.
@@ -3114,6 +3116,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
3114
3116
  * Compute the borders to add to the given zone merged.
3115
3117
  */
3116
3118
  private addBordersToMerge;
3119
+ private checkBordersUnchanged;
3117
3120
  import(data: WorkbookData): void;
3118
3121
  export(data: WorkbookData): void;
3119
3122
  exportForExcel(data: ExcelWorkbookData): void;
@@ -3138,7 +3141,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3138
3141
  };
3139
3142
  };
3140
3143
  adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
3141
- allowDispatch(cmd: CoreCommand): CommandResult;
3144
+ allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
3142
3145
  handle(cmd: CoreCommand): void;
3143
3146
  /**
3144
3147
  * Set a format to all the cells in a zone
@@ -3211,6 +3214,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3211
3214
  private createFormulaCellWithDependencies;
3212
3215
  private createErrorFormula;
3213
3216
  private checkCellOutOfSheet;
3217
+ private checkUselessClearCell;
3214
3218
  }
3215
3219
 
3216
3220
  /**
@@ -3730,15 +3734,6 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3730
3734
  */
3731
3735
  private moveCellOnRowsDeletion;
3732
3736
  private updateRowsStructureOnDeletion;
3733
- /**
3734
- * Update the rows of the sheet after an addition:
3735
- * - Rename the rows
3736
- *
3737
- * @param sheet Sheet on which the deletion occurs
3738
- * @param addedRow Index of the added row
3739
- * @param rowsToAdd Number of the rows to add
3740
- */
3741
- private updateRowsStructureOnAddition;
3742
3737
  /**
3743
3738
  * Add empty rows at the end of the rows
3744
3739
  *
@@ -3760,11 +3755,9 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3760
3755
  }
3761
3756
 
3762
3757
  declare class EvaluationPlugin extends UIPlugin {
3763
- private config;
3764
3758
  static getters: readonly ["evaluateFormula", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone"];
3765
3759
  private shouldRebuildDependenciesGraph;
3766
3760
  private evaluator;
3767
- private compilationParams;
3768
3761
  private positionsToUpdate;
3769
3762
  constructor(config: UIPluginConfig);
3770
3763
  beforeHandle(cmd: Command): void;
@@ -3793,7 +3786,6 @@ declare class EvaluationPlugin extends UIPlugin {
3793
3786
  * formula of the array formula that spreads to the cell
3794
3787
  */
3795
3788
  private getCorrespondingFormulaCell;
3796
- private getCompilationParameters;
3797
3789
  }
3798
3790
 
3799
3791
  interface CustomColorState {
@@ -3819,11 +3811,11 @@ declare class CustomColorsPlugin extends UIPlugin<CustomColorState> {
3819
3811
  }
3820
3812
 
3821
3813
  interface EvaluationChartState {
3822
- readonly charts: Immutable<Record<UID, ChartRuntime | undefined>>;
3814
+ charts: Record<UID, ChartRuntime | undefined>;
3823
3815
  }
3824
3816
  declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
3825
3817
  static getters: readonly ["getChartRuntime", "getBackgroundOfSingleCellChart"];
3826
- readonly charts: Immutable<Record<UID, ChartRuntime | undefined>>;
3818
+ charts: Record<UID, ChartRuntime | undefined>;
3827
3819
  private createRuntimeChart;
3828
3820
  handle(cmd: CoreViewCommand): void;
3829
3821
  getChartRuntime(figureId: UID): ChartRuntime;
@@ -4890,8 +4882,7 @@ type Getters = {
4890
4882
  } & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters;
4891
4883
 
4892
4884
  interface HistoryChange {
4893
- root: any;
4894
- path: (string | number)[];
4885
+ path: [any, ...(number | string)[]];
4895
4886
  before: any;
4896
4887
  after: any;
4897
4888
  }