@odoo/o-spreadsheet 17.0.3 → 17.0.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.
@@ -2499,7 +2499,8 @@ declare const enum CommandResult {
2499
2499
  InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
2500
2500
  InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
2501
2501
  BlockingValidationRule = "BlockingValidationRule",
2502
- InvalidCopyPasteSelection = "InvalidCopyPasteSelection"
2502
+ InvalidCopyPasteSelection = "InvalidCopyPasteSelection",
2503
+ NoChanges = "NoChanges"
2503
2504
  }
2504
2505
  interface CommandHandler<T> {
2505
2506
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -3231,7 +3232,8 @@ interface BordersPluginState {
3231
3232
  declare class BordersPlugin extends CorePlugin<BordersPluginState> implements BordersPluginState {
3232
3233
  static getters: readonly ["getCellBorder", "getBordersColors"];
3233
3234
  readonly borders: BordersPluginState["borders"];
3234
- handle(cmd: Command): void;
3235
+ allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges;
3236
+ handle(cmd: CoreCommand): void;
3235
3237
  /**
3236
3238
  * Move borders according to the inserted columns.
3237
3239
  * Ensure borders continuity.
@@ -3329,6 +3331,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
3329
3331
  * Compute the borders to add to the given zone merged.
3330
3332
  */
3331
3333
  private addBordersToMerge;
3334
+ private checkBordersUnchanged;
3332
3335
  import(data: WorkbookData): void;
3333
3336
  export(data: WorkbookData): void;
3334
3337
  exportForExcel(data: ExcelWorkbookData): void;
@@ -3353,7 +3356,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3353
3356
  };
3354
3357
  };
3355
3358
  adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
3356
- allowDispatch(cmd: CoreCommand): CommandResult;
3359
+ allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
3357
3360
  handle(cmd: CoreCommand): void;
3358
3361
  /**
3359
3362
  * Set a format to all the cells in a zone
@@ -3427,6 +3430,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3427
3430
  private createFormulaCellWithDependencies;
3428
3431
  private createErrorFormula;
3429
3432
  private checkCellOutOfSheet;
3433
+ private checkUselessClearCell;
3430
3434
  }
3431
3435
 
3432
3436
  /**
@@ -4057,15 +4061,6 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
4057
4061
  */
4058
4062
  private moveCellOnRowsDeletion;
4059
4063
  private updateRowsStructureOnDeletion;
4060
- /**
4061
- * Update the rows of the sheet after an addition:
4062
- * - Rename the rows
4063
- *
4064
- * @param sheet Sheet on which the deletion occurs
4065
- * @param addedRow Index of the added row
4066
- * @param rowsToAdd Number of the rows to add
4067
- */
4068
- private updateRowsStructureOnAddition;
4069
4064
  /**
4070
4065
  * Add empty rows at the end of the rows
4071
4066
  *
@@ -4087,11 +4082,9 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
4087
4082
  }
4088
4083
 
4089
4084
  declare class EvaluationPlugin extends UIPlugin {
4090
- private config;
4091
- static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf"];
4085
+ static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn"];
4092
4086
  private shouldRebuildDependenciesGraph;
4093
4087
  private evaluator;
4094
- private compilationParams;
4095
4088
  private positionsToUpdate;
4096
4089
  constructor(config: UIPluginConfig);
4097
4090
  beforeHandle(cmd: Command): void;
@@ -4114,6 +4107,7 @@ declare class EvaluationPlugin extends UIPlugin {
4114
4107
  getEvaluatedCells(sheetId: UID): Record<UID, EvaluatedCell>;
4115
4108
  getEvaluatedCellsInZone(sheetId: UID, zone: Zone): EvaluatedCell[];
4116
4109
  getSpreadPositionsOf(position: CellPosition): CellPosition[];
4110
+ getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
4117
4111
  exportForExcel(data: ExcelWorkbookData): void;
4118
4112
  /**
4119
4113
  * Returns the corresponding formula cell of a given cell
@@ -4121,7 +4115,6 @@ declare class EvaluationPlugin extends UIPlugin {
4121
4115
  * formula of the array formula that spreads to the cell
4122
4116
  */
4123
4117
  getCorrespondingFormulaCell(position: CellPosition): FormulaCell | undefined;
4124
- private getCompilationParameters;
4125
4118
  }
4126
4119
 
4127
4120
  interface CustomColorState {