@odoo/o-spreadsheet 17.0.47 → 17.0.48

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.
@@ -5091,11 +5091,11 @@ declare class InternalViewport {
5091
5091
  private setViewportOffsetX;
5092
5092
  private setViewportOffsetY;
5093
5093
  /** Corrects the viewport's horizontal offset based on the current structure
5094
- * To make sure that at least on column is visible inside the viewport.
5094
+ * To make sure that at least one column is visible inside the viewport.
5095
5095
  */
5096
5096
  private adjustViewportOffsetX;
5097
5097
  /** Corrects the viewport's vertical offset based on the current structure
5098
- * To make sure that at least on row is visible inside the viewport.
5098
+ * To make sure that at least one row is visible inside the viewport.
5099
5099
  */
5100
5100
  private adjustViewportOffsetY;
5101
5101
  /** Updates the pane zone and snapped offset based on its horizontal
@@ -5106,12 +5106,6 @@ declare class InternalViewport {
5106
5106
  private adjustViewportZoneY;
5107
5107
  }
5108
5108
 
5109
- type SheetViewports = {
5110
- topLeft: InternalViewport | undefined;
5111
- bottomLeft: InternalViewport | undefined;
5112
- topRight: InternalViewport | undefined;
5113
- bottomRight: InternalViewport;
5114
- };
5115
5109
  /**
5116
5110
  * EdgeScrollCases Schema
5117
5111
  *
@@ -5154,8 +5148,8 @@ type SheetViewports = {
5154
5148
  *
5155
5149
  */
5156
5150
  declare class SheetViewPlugin extends UIPlugin {
5157
- static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getAllActiveViewportsZones", "getRect"];
5158
- readonly viewports: Record<UID, SheetViewports | undefined>;
5151
+ static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getAllActiveViewportsZonesAndRect", "getRect"];
5152
+ private viewports;
5159
5153
  /**
5160
5154
  * The viewport dimensions are usually set by one of the components
5161
5155
  * (i.e. when grid component is mounted) to properly reflect its state in the DOM.
@@ -5210,13 +5204,13 @@ declare class SheetViewPlugin extends UIPlugin {
5210
5204
  */
5211
5205
  getMainViewportRect(): Rect;
5212
5206
  private getMaximumSheetOffset;
5213
- getColRowOffsetInViewport(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex): Pixel;
5207
+ getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
5214
5208
  /**
5215
5209
  * Check if a given position is visible in the viewport.
5216
5210
  */
5217
5211
  isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
5218
5212
  getEdgeScrollCol(x: number, previousX: number, startingX: number): EdgeScrollInfo;
5219
- getEdgeScrollRow(y: number, previousY: number, tartingY: number): EdgeScrollInfo;
5213
+ getEdgeScrollRow(y: number, previousY: number, startingY: number): EdgeScrollInfo;
5220
5214
  /**
5221
5215
  * Computes the coordinates and size to draw the zone on the canvas
5222
5216
  */
@@ -5236,7 +5230,10 @@ declare class SheetViewPlugin extends UIPlugin {
5236
5230
  * situated before the pane divisions.
5237
5231
  */
5238
5232
  getMainViewportCoordinates(): DOMCoordinates;
5239
- getAllActiveViewportsZones(): Zone[];
5233
+ getAllActiveViewportsZonesAndRect(): {
5234
+ zone: Zone;
5235
+ rect: Rect;
5236
+ }[];
5240
5237
  private ensureMainViewportExist;
5241
5238
  private getSubViewports;
5242
5239
  private checkPositiveDimension;
@@ -5267,7 +5264,7 @@ declare class SheetViewPlugin extends UIPlugin {
5267
5264
  xRatio: number;
5268
5265
  yRatio: number;
5269
5266
  };
5270
- private recomposeRect;
5267
+ mapViewportsToRect(sheetId: UID, rectCallBack: (viewport: InternalViewport) => Rect | undefined): Rect;
5271
5268
  }
5272
5269
 
5273
5270
  /**