@odoo/o-spreadsheet 18.3.28 → 18.3.32

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.
@@ -4294,6 +4294,7 @@ interface SpreadsheetChildEnv extends NotificationStoreMethods {
4294
4294
  declare class RangeAdapter implements CommandHandler<CoreCommand> {
4295
4295
  private getters;
4296
4296
  private providers;
4297
+ private isAdaptingRanges;
4297
4298
  constructor(getters: CoreGetters);
4298
4299
  static getters: readonly ["adaptFormulaStringDependencies", "copyFormulaStringForSheet", "extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeData", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
4299
4300
  allowDispatch(cmd: CoreCommand): CommandResult;
@@ -5073,14 +5074,18 @@ interface Pivot$1 {
5073
5074
  definition: PivotCoreDefinition;
5074
5075
  formulaId: string;
5075
5076
  }
5077
+ interface MeasureState {
5078
+ formula: RangeCompiledFormula;
5079
+ dependencies: Range[];
5080
+ }
5076
5081
  interface CoreState {
5077
5082
  nextFormulaId: number;
5078
5083
  pivots: Record<UID, Pivot$1 | undefined>;
5079
5084
  formulaIds: Record<UID, string | undefined>;
5080
- compiledMeasureFormulas: Record<UID, Record<string, RangeCompiledFormula | undefined>>;
5085
+ compiledMeasureFormulas: Record<UID, Record<string, MeasureState | undefined>>;
5081
5086
  }
5082
5087
  declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState {
5083
- static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot"];
5088
+ static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot", "getMeasureFullDependencies"];
5084
5089
  readonly nextFormulaId: number;
5085
5090
  readonly pivots: {
5086
5091
  [pivotId: UID]: Pivot$1 | undefined;
@@ -5088,7 +5093,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
5088
5093
  readonly formulaIds: {
5089
5094
  [formulaId: UID]: UID | undefined;
5090
5095
  };
5091
- readonly compiledMeasureFormulas: Record<UID, Record<string, RangeCompiledFormula>>;
5096
+ readonly compiledMeasureFormulas: Record<UID, Record<string, MeasureState>>;
5092
5097
  allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
5093
5098
  handle(cmd: CoreCommand): void;
5094
5099
  adaptRanges(applyChange: ApplyRangeChange): void;
@@ -5107,9 +5112,11 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
5107
5112
  getPivotFormulaId(pivotId: UID): string;
5108
5113
  getPivotIds(): UID[];
5109
5114
  isExistingPivot(pivotId: UID): boolean;
5110
- getMeasureCompiledFormula(measure: PivotCoreMeasure): RangeCompiledFormula;
5115
+ getMeasureCompiledFormula(pivotId: UID, measure: PivotCoreMeasure): RangeCompiledFormula;
5116
+ getMeasureFullDependencies(pivotId: UID, measure: PivotCoreMeasure): Range[];
5111
5117
  private addPivot;
5112
5118
  private compileCalculatedMeasures;
5119
+ private computeMeasureFullDependencies;
5113
5120
  private insertPivot;
5114
5121
  private resizeSheet;
5115
5122
  private getPivotCore;
@@ -5386,7 +5393,7 @@ declare class CoreViewPlugin<State = any> extends BasePlugin<State, Command> {
5386
5393
  }
5387
5394
 
5388
5395
  declare class EvaluationPlugin extends CoreViewPlugin {
5389
- static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isEmpty"];
5396
+ static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty"];
5390
5397
  private shouldRebuildDependenciesGraph;
5391
5398
  private evaluator;
5392
5399
  private positionsToUpdate;
@@ -5420,6 +5427,7 @@ declare class EvaluationPlugin extends CoreViewPlugin {
5420
5427
  ignoreSpillError: boolean;
5421
5428
  }): Zone | undefined;
5422
5429
  getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
5430
+ isArrayFormulaSpillBlocked(position: CellPosition): boolean;
5423
5431
  /**
5424
5432
  * Check if a zone only contains empty cells
5425
5433
  */
@@ -6616,6 +6624,7 @@ interface PivotRegistryItem {
6616
6624
  datetimeGranularities: string[];
6617
6625
  isMeasureCandidate: (field: PivotField) => boolean;
6618
6626
  isGroupable: (field: PivotField) => boolean;
6627
+ adaptRanges?: (getters: CoreGetters, definition: PivotCoreDefinition, applyChange: ApplyRangeChange) => PivotCoreDefinition;
6619
6628
  }
6620
6629
 
6621
6630
  declare class ClipboardHandler<T> {
@@ -8654,7 +8663,7 @@ interface AutofillRule {
8654
8663
  */
8655
8664
  interface FigureContent {
8656
8665
  Component: any;
8657
- menuBuilder: (figureId: UID, onFigureDeleted: () => void, env: SpreadsheetChildEnv) => Action[];
8666
+ menuBuilder: (figureId: UID, env: SpreadsheetChildEnv) => Action[];
8658
8667
  SidePanelComponent?: string;
8659
8668
  keepRatio?: boolean;
8660
8669
  minFigSize?: number;
@@ -9092,7 +9101,6 @@ type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right"
9092
9101
  interface Props$L {
9093
9102
  figureUI: FigureUI;
9094
9103
  style: string;
9095
- onFigureDeleted: () => void;
9096
9104
  onMouseDown: (ev: MouseEvent) => void;
9097
9105
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
9098
9106
  }
@@ -9104,10 +9112,6 @@ declare class FigureComponent extends Component<Props$L, SpreadsheetChildEnv> {
9104
9112
  type: StringConstructor;
9105
9113
  optional: boolean;
9106
9114
  };
9107
- onFigureDeleted: {
9108
- type: FunctionConstructor;
9109
- optional: boolean;
9110
- };
9111
9115
  onMouseDown: {
9112
9116
  type: FunctionConstructor;
9113
9117
  optional: boolean;
@@ -9121,7 +9125,6 @@ declare class FigureComponent extends Component<Props$L, SpreadsheetChildEnv> {
9121
9125
  Menu: typeof Menu;
9122
9126
  };
9123
9127
  static defaultProps: {
9124
- onFigureDeleted: () => void;
9125
9128
  onMouseDown: () => void;
9126
9129
  onClickAnchor: () => void;
9127
9130
  };
@@ -9148,13 +9151,11 @@ declare class FigureComponent extends Component<Props$L, SpreadsheetChildEnv> {
9148
9151
 
9149
9152
  interface Props$K {
9150
9153
  figureUI: FigureUI;
9151
- onFigureDeleted: () => void;
9152
9154
  }
9153
9155
  declare class ChartFigure extends Component<Props$K, SpreadsheetChildEnv> {
9154
9156
  static template: string;
9155
9157
  static props: {
9156
9158
  figureUI: ObjectConstructor;
9157
- onFigureDeleted: FunctionConstructor;
9158
9159
  };
9159
9160
  static components: {};
9160
9161
  onDoubleClick(): void;
@@ -9340,7 +9341,6 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
9340
9341
 
9341
9342
  type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
9342
9343
  interface Props$F {
9343
- onFigureDeleted: () => void;
9344
9344
  }
9345
9345
  interface Container {
9346
9346
  type: ContainerType;
@@ -9421,9 +9421,7 @@ interface DndState {
9421
9421
  */
9422
9422
  declare class FiguresContainer extends Component<Props$F, SpreadsheetChildEnv> {
9423
9423
  static template: string;
9424
- static props: {
9425
- onFigureDeleted: FunctionConstructor;
9426
- };
9424
+ static props: {};
9427
9425
  static components: {
9428
9426
  FigureComponent: typeof FigureComponent;
9429
9427
  };
@@ -9481,16 +9479,14 @@ declare class FilterIconsOverlay extends Component<{}, SpreadsheetChildEnv> {
9481
9479
  }
9482
9480
 
9483
9481
  interface Props$D {
9484
- focusGrid: () => void;
9485
9482
  }
9486
9483
  declare class GridAddRowsFooter extends Component<Props$D, SpreadsheetChildEnv> {
9487
9484
  static template: string;
9488
- static props: {
9489
- focusGrid: FunctionConstructor;
9490
- };
9485
+ static props: {};
9491
9486
  static components: {
9492
9487
  ValidationMessages: typeof ValidationMessages;
9493
9488
  };
9489
+ private DOMFocusableElementStore;
9494
9490
  inputRef: {
9495
9491
  el: HTMLInputElement | null;
9496
9492
  };
@@ -9505,6 +9501,7 @@ declare class GridAddRowsFooter extends Component<Props$D, SpreadsheetChildEnv>
9505
9501
  onInput(ev: InputEvent): void;
9506
9502
  onConfirm(): void;
9507
9503
  private onExternalClick;
9504
+ private focusDefaultElement;
9508
9505
  }
9509
9506
 
9510
9507
  interface Props$C {
@@ -9514,7 +9511,6 @@ interface Props$C {
9514
9511
  onGridResized: (dimension: Rect) => void;
9515
9512
  onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
9516
9513
  gridOverlayDimensions: string;
9517
- onFigureDeleted: () => void;
9518
9514
  }
9519
9515
  declare class GridOverlay extends Component<Props$C, SpreadsheetChildEnv> {
9520
9516
  static template: string;
@@ -9535,10 +9531,6 @@ declare class GridOverlay extends Component<Props$C, SpreadsheetChildEnv> {
9535
9531
  type: FunctionConstructor;
9536
9532
  optional: boolean;
9537
9533
  };
9538
- onFigureDeleted: {
9539
- type: FunctionConstructor;
9540
- optional: boolean;
9541
- };
9542
9534
  onGridMoved: FunctionConstructor;
9543
9535
  gridOverlayDimensions: StringConstructor;
9544
9536
  slots: {
@@ -9557,7 +9549,6 @@ declare class GridOverlay extends Component<Props$C, SpreadsheetChildEnv> {
9557
9549
  onCellClicked: () => void;
9558
9550
  onCellRightClicked: () => void;
9559
9551
  onGridResized: () => void;
9560
- onFigureDeleted: () => void;
9561
9552
  };
9562
9553
  private gridOverlay;
9563
9554
  private gridOverlayRect;