@odoo/o-spreadsheet 19.1.0-alpha.10 → 19.1.0-alpha.12

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.
@@ -2972,7 +2972,7 @@ interface Pivot<T = PivotRuntimeDefinition> {
2972
2972
  declare class PivotUIPlugin extends CoreViewPlugin {
2973
2973
  static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotCellSortDirection", "getPivotIdFromPosition", "getPivotCellFromPosition", "generateNewCalculatedMeasureName", "isPivotUnused", "isSpillPivotFormula"];
2974
2974
  private pivots;
2975
- private unusedPivots?;
2975
+ private unusedPivotsInFormulas?;
2976
2976
  private custom;
2977
2977
  constructor(config: CoreViewPluginConfig);
2978
2978
  beforeHandle(cmd: Command): void;
@@ -3012,7 +3012,7 @@ declare class PivotUIPlugin extends CoreViewPlugin {
3012
3012
  setupPivot(pivotId: UID, { recreate }?: {
3013
3013
  recreate: boolean;
3014
3014
  }): void;
3015
- _getUnusedPivots(): UID[];
3015
+ private _getUnusedPivotsInFormulas;
3016
3016
  }
3017
3017
 
3018
3018
  /**
@@ -3892,7 +3892,7 @@ declare class InternalViewport {
3892
3892
  *
3893
3893
  */
3894
3894
  declare class SheetViewPlugin extends UIPlugin {
3895
- static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset"];
3895
+ static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleRectWithZoom", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset", "getViewportZoomLevel", "getScrollBarWidth"];
3896
3896
  private viewports;
3897
3897
  /**
3898
3898
  * The viewport dimensions are usually set by one of the components
@@ -3904,6 +3904,7 @@ declare class SheetViewPlugin extends UIPlugin {
3904
3904
  private sheetViewHeight;
3905
3905
  private gridOffsetX;
3906
3906
  private gridOffsetY;
3907
+ private zoomLevel;
3907
3908
  private sheetsWithDirtyViewports;
3908
3909
  private shouldAdjustViewports;
3909
3910
  allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
@@ -3949,12 +3950,17 @@ declare class SheetViewPlugin extends UIPlugin {
3949
3950
  * Check if a given position is visible in the viewport.
3950
3951
  */
3951
3952
  isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
3953
+ getScrollBarWidth(): Pixel;
3952
3954
  getEdgeScrollCol(x: number, previousX: number, startingX: number): EdgeScrollInfo;
3953
3955
  getEdgeScrollRow(y: number, previousY: number, startingY: number): EdgeScrollInfo;
3954
3956
  /**
3955
3957
  * Computes the coordinates and size to draw the zone on the canvas
3956
3958
  */
3957
3959
  getVisibleRect(zone: Zone): Rect;
3960
+ /**
3961
+ * Computes the coordinates and size to draw the zone on the canvas after it has been zoomed
3962
+ */
3963
+ getVisibleRectWithZoom(zone: Zone): Rect;
3958
3964
  /**
3959
3965
  * Computes the coordinates and size to draw the zone without taking the grid offset into account
3960
3966
  */
@@ -3989,6 +3995,7 @@ declare class SheetViewPlugin extends UIPlugin {
3989
3995
  zone: Zone;
3990
3996
  rect: Rect;
3991
3997
  }[];
3998
+ getViewportZoomLevel(): number;
3992
3999
  private ensureMainViewportExist;
3993
4000
  private getSubViewports;
3994
4001
  private checkPositiveDimension;
@@ -5788,6 +5795,10 @@ interface SetViewportOffsetCommand {
5788
5795
  offsetX: Pixel;
5789
5796
  offsetY: Pixel;
5790
5797
  }
5798
+ interface SetZoomCommand {
5799
+ type: "SET_ZOOM";
5800
+ zoom: number;
5801
+ }
5791
5802
  /**
5792
5803
  * Shift the viewport down by the viewport height
5793
5804
  */
@@ -5906,7 +5917,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | ClearCellsCom
5906
5917
  | UpdateLocaleCommand
5907
5918
  /** PIVOT */
5908
5919
  | AddPivotCommand | UpdatePivotCommand | InsertPivotCommand | RenamePivotCommand | RemovePivotCommand | DuplicatePivotCommand;
5909
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
5920
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SetZoomCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
5910
5921
  type Command = CoreCommand | LocalCommand;
5911
5922
  /**
5912
5923
  * Holds the result of a command dispatch.
@@ -6561,7 +6572,7 @@ type FunctionDescription = AddFunctionDescription & {
6561
6572
  minArgRequired: number;
6562
6573
  maxArgPossible: number;
6563
6574
  nbrArgRepeating: number;
6564
- nbrArgOptional: number;
6575
+ nbrOptionalNonRepeatingArgs: number;
6565
6576
  };
6566
6577
  type EvalContext = {
6567
6578
  __originSheetId: UID;