@odoo/o-spreadsheet 17.2.33 → 17.2.35

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.
@@ -4357,11 +4357,11 @@ declare class InternalViewport {
4357
4357
  private setViewportOffsetX;
4358
4358
  private setViewportOffsetY;
4359
4359
  /** Corrects the viewport's horizontal offset based on the current structure
4360
- * To make sure that at least on column is visible inside the viewport.
4360
+ * To make sure that at least one column is visible inside the viewport.
4361
4361
  */
4362
4362
  private adjustViewportOffsetX;
4363
4363
  /** Corrects the viewport's vertical offset based on the current structure
4364
- * To make sure that at least on row is visible inside the viewport.
4364
+ * To make sure that at least one row is visible inside the viewport.
4365
4365
  */
4366
4366
  private adjustViewportOffsetY;
4367
4367
  /** Updates the pane zone and snapped offset based on its horizontal
@@ -4372,12 +4372,6 @@ declare class InternalViewport {
4372
4372
  private adjustViewportZoneY;
4373
4373
  }
4374
4374
 
4375
- type SheetViewports = {
4376
- topLeft: InternalViewport | undefined;
4377
- bottomLeft: InternalViewport | undefined;
4378
- topRight: InternalViewport | undefined;
4379
- bottomRight: InternalViewport;
4380
- };
4381
4375
  /**
4382
4376
  * EdgeScrollCases Schema
4383
4377
  *
@@ -4420,8 +4414,8 @@ type SheetViewports = {
4420
4414
  *
4421
4415
  */
4422
4416
  declare class SheetViewPlugin extends UIPlugin {
4423
- static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZones", "getRect"];
4424
- readonly viewports: Record<UID, SheetViewports | undefined>;
4417
+ static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect"];
4418
+ private viewports;
4425
4419
  /**
4426
4420
  * The viewport dimensions are usually set by one of the components
4427
4421
  * (i.e. when grid component is mounted) to properly reflect its state in the DOM.
@@ -4476,13 +4470,13 @@ declare class SheetViewPlugin extends UIPlugin {
4476
4470
  */
4477
4471
  getMainViewportRect(): Rect;
4478
4472
  private getMaximumSheetOffset;
4479
- getColRowOffsetInViewport(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex): Pixel;
4473
+ getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
4480
4474
  /**
4481
4475
  * Check if a given position is visible in the viewport.
4482
4476
  */
4483
4477
  isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
4484
4478
  getEdgeScrollCol(x: number, previousX: number, startingX: number): EdgeScrollInfo;
4485
- getEdgeScrollRow(y: number, previousY: number, tartingY: number): EdgeScrollInfo;
4479
+ getEdgeScrollRow(y: number, previousY: number, startingY: number): EdgeScrollInfo;
4486
4480
  /**
4487
4481
  * Computes the coordinates and size to draw the zone on the canvas
4488
4482
  */
@@ -4512,7 +4506,10 @@ declare class SheetViewPlugin extends UIPlugin {
4512
4506
  * of the current viewport
4513
4507
  */
4514
4508
  getRowDimensionsInViewport(sheetId: UID, row: HeaderIndex): HeaderDimensions;
4515
- getAllActiveViewportsZones(): Zone[];
4509
+ getAllActiveViewportsZonesAndRect(): {
4510
+ zone: Zone;
4511
+ rect: Rect;
4512
+ }[];
4516
4513
  private ensureMainViewportExist;
4517
4514
  private getSubViewports;
4518
4515
  private checkPositiveDimension;
@@ -4543,7 +4540,7 @@ declare class SheetViewPlugin extends UIPlugin {
4543
4540
  xRatio: number;
4544
4541
  yRatio: number;
4545
4542
  };
4546
- private recomposeRect;
4543
+ mapViewportsToRect(sheetId: UID, rectCallBack: (viewport: InternalViewport) => Rect | undefined): Rect;
4547
4544
  }
4548
4545
 
4549
4546
  /**