@odoo/o-spreadsheet 19.0.10 → 19.0.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.
@@ -339,7 +339,7 @@ type PieChartRuntime = {
339
339
  background: Color;
340
340
  };
341
341
 
342
- interface PyramidChartDefinition extends Omit<BarChartDefinition, "type"> {
342
+ interface PyramidChartDefinition extends Omit<BarChartDefinition, "type" | "zoomable"> {
343
343
  readonly type: "pyramid";
344
344
  }
345
345
  type PyramidChartRuntime = {
@@ -3873,7 +3873,7 @@ declare class InternalViewport {
3873
3873
  *
3874
3874
  */
3875
3875
  declare class SheetViewPlugin extends UIPlugin {
3876
- 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"];
3876
+ 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", "getMaximumSheetOffset"];
3877
3877
  private viewports;
3878
3878
  /**
3879
3879
  * The viewport dimensions are usually set by one of the components
@@ -3924,7 +3924,10 @@ declare class SheetViewPlugin extends UIPlugin {
3924
3924
  * Return the main viewport maximum size relative to the client size.
3925
3925
  */
3926
3926
  getMainViewportRect(): Rect;
3927
- private getMaximumSheetOffset;
3927
+ getMaximumSheetOffset(): {
3928
+ maxOffsetX: Pixel;
3929
+ maxOffsetY: Pixel;
3930
+ };
3928
3931
  getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
3929
3932
  /**
3930
3933
  * Check if a given position is visible in the viewport.
@@ -6880,7 +6883,6 @@ type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields:
6880
6883
  interface PivotRegistryItem {
6881
6884
  ui: PivotUIConstructor;
6882
6885
  definition: PivotDefinitionConstructor;
6883
- externalData: boolean;
6884
6886
  dateGranularities: string[];
6885
6887
  datetimeGranularities: string[];
6886
6888
  isMeasureCandidate: (field: PivotField) => boolean;
@@ -8033,6 +8035,7 @@ declare class FontSizeEditor extends Component<Props$1g, SpreadsheetChildEnv> {
8033
8035
  private inputRef;
8034
8036
  private rootEditorRef;
8035
8037
  private fontSizeListRef;
8038
+ private DOMFocusableElementStore;
8036
8039
  setup(): void;
8037
8040
  get popoverProps(): PopoverProps;
8038
8041
  onExternalClick(ev: MouseEvent): void;
@@ -8785,7 +8788,7 @@ declare abstract class AbstractComposerStore extends SpreadsheetStore {
8785
8788
  private updateAutoCompleteProvider;
8786
8789
  private findAutocompleteProvider;
8787
8790
  hideHelp(): void;
8788
- autoCompleteOrStop(direction: Direction$1): void;
8791
+ autoCompleteOrStop(direction: Direction$1, assistantForcedClosed?: boolean): void;
8789
8792
  insertAutoCompleteValue(value: string): void;
8790
8793
  selectAutoCompleteIndex(index: number): void;
8791
8794
  moveAutoCompleteSelection(direction: "previous" | "next"): void;
@@ -9290,7 +9293,7 @@ interface ClosedSidePanel {
9290
9293
  }
9291
9294
  type SidePanelState = OpenSidePanel | ClosedSidePanel;
9292
9295
  interface PanelInfo {
9293
- initialPanelProps: SidePanelComponentProps;
9296
+ currentPanelProps: SidePanelComponentProps;
9294
9297
  componentTag: string;
9295
9298
  size: number;
9296
9299
  isCollapsed?: boolean;
@@ -9317,8 +9320,8 @@ declare class SidePanelStore extends SpreadsheetStore {
9317
9320
  get totalPanelSize(): number;
9318
9321
  private getPanelProps;
9319
9322
  private getPanelKey;
9320
- open(componentTag: string, initialPanelProps?: SidePanelComponentProps): void;
9321
- replace(componentTag: string, currentPanelKey: string, initialPanelProps?: SidePanelComponentProps): void;
9323
+ open(componentTag: string, currentPanelProps?: SidePanelComponentProps): void;
9324
+ replace(componentTag: string, currentPanelKey: string, currentPanelProps?: SidePanelComponentProps): void;
9322
9325
  private _openPanel;
9323
9326
  toggle(componentTag: string, panelProps: SidePanelComponentProps): void;
9324
9327
  close(): void;
@@ -10222,7 +10225,7 @@ declare abstract class AbstractResizer extends Component<ResizerProps, Spreadshe
10222
10225
  setup(): void;
10223
10226
  _computeHandleDisplay(ev: MouseEvent): void;
10224
10227
  _computeGrabDisplay(ev: MouseEvent): void;
10225
- onMouseMove(ev: PointerEvent): void;
10228
+ onMouseMove(ev: MouseEvent): void;
10226
10229
  onMouseLeave(): void;
10227
10230
  onDblClick(ev: MouseEvent): void;
10228
10231
  onMouseDown(ev: MouseEvent): void;
@@ -11402,14 +11405,17 @@ declare class ZoomableChartJsComponent extends ChartJsComponent {
11402
11405
  private chartId;
11403
11406
  private datasetBoundaries;
11404
11407
  private removeEventListeners;
11408
+ private isMasterChartAllowed;
11405
11409
  setup(): void;
11406
11410
  protected unmount(): void;
11407
11411
  get containerStyle(): string;
11412
+ get masterChartContainerStyle(): "" | "opacity: 0.3;";
11408
11413
  get sliceable(): boolean;
11409
11414
  get axisOffset(): number;
11410
11415
  private getMasterChartConfiguration;
11411
11416
  private getDetailChartConfiguration;
11412
11417
  private getAxisLimitsFromDataset;
11418
+ private setMasterChartCursor;
11413
11419
  protected createChart(chartRuntime: ChartJSRuntime): void;
11414
11420
  protected updateChartJs(chartRuntime: ChartJSRuntime): void;
11415
11421
  private resetAxesLimits;
@@ -11418,11 +11424,37 @@ declare class ZoomableChartJsComponent extends ChartJsComponent {
11418
11424
  get lowerBound(): number | undefined;
11419
11425
  private computePosition;
11420
11426
  private computeCoordinate;
11427
+ /**
11428
+ * Compute min and max from the store, adjusting them if needed for non linear scales.
11429
+ * Getting the value from the store, we have to ensure that the values are integers for
11430
+ * non linear scales (bar and category). To select a bar in the chart, we have to include
11431
+ * the whole bar, which means that for the i-th bar, the selected min should be <= i and
11432
+ * the selected max should be >= i, so using the Math.floor and Math.ceil functions is
11433
+ * the right way to do it.
11434
+ * Sometimes, we can get a minimal value > the maximal value, which arise when the user
11435
+ * select a very small area in the master chart, and hasn't selected the middle of a bar
11436
+ * or a group of bars (in case of more than one data series).
11437
+ * Assuming we have to select the middle of a bar/a groupe of bars, we will reject the
11438
+ * coming value afterward. In this case, we do not update the chart because it would lead
11439
+ * to an empty chart.
11440
+ */
11441
+ private getStoredBoundaries;
11442
+ /**
11443
+ * Adjust the min and max values of an axis if needed for non linear scales.
11444
+ * Here, after rounding (see docstring of getStoredBoundaries), we adjust the min by
11445
+ * substracting the axis offset, and we add it to the max, because when computing from the
11446
+ * scale, chartJs use integer values as the limits for non linear scales. If we have a min
11447
+ * value of 1, it means we want to start displaying from 0.5, and if we have a max value of
11448
+ * 4, it means we want to display until 4.5.
11449
+ * Here, we don't have to check if min > max because we are computing from the scale, and
11450
+ * chartJs ensures that this won't happen, even after our adjustments.
11451
+ */
11452
+ private adjustBoundaries;
11421
11453
  private updateAxisLimits;
11422
- onPointerDownInMasterChart(ev: PointerEvent): void;
11423
- onPointerMoveInMasterChart(ev: PointerEvent): void;
11424
- onMouseLeaveMasterChart(ev: PointerEvent): void;
11425
- onDoubleClickInMasterChart(ev: PointerEvent): void;
11454
+ onMasterChartPointerDown(ev: PointerEvent): void;
11455
+ onMasterChartPointerMove(ev: PointerEvent): void;
11456
+ onMasterChartMouseLeave(ev: PointerEvent): void;
11457
+ onMasterChartDoubleClick(ev: PointerEvent): void;
11426
11458
  }
11427
11459
 
11428
11460
  interface Props$m {
@@ -11589,7 +11621,7 @@ interface Props$j {
11589
11621
  canUpdateChart: (chartId: UID, definition: GenericDefinition<ZoomableChartDefinition>) => DispatchResult;
11590
11622
  updateChart: (chartId: UID, definition: GenericDefinition<ZoomableChartDefinition>) => DispatchResult;
11591
11623
  }
11592
- declare class GenericZoomableChartDesignPanel<P extends Props$j = Props$j> extends ChartWithAxisDesignPanel<Props$j> {
11624
+ declare class GenericZoomableChartDesignPanel<P extends Props$j = Props$j> extends ChartWithAxisDesignPanel<P> {
11593
11625
  static template: string;
11594
11626
  static components: {
11595
11627
  Checkbox: typeof Checkbox;
@@ -12481,6 +12513,7 @@ declare class ClickableCellsStore extends SpreadsheetStore {
12481
12513
  private getClickableItem;
12482
12514
  private findClickableItem;
12483
12515
  get clickableCells(): ClickableCell[];
12516
+ private getClickableCellRect;
12484
12517
  }
12485
12518
 
12486
12519
  interface Props$4 {