@odoo/o-spreadsheet 19.0.11 → 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 = {
@@ -6883,7 +6883,6 @@ type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields:
6883
6883
  interface PivotRegistryItem {
6884
6884
  ui: PivotUIConstructor;
6885
6885
  definition: PivotDefinitionConstructor;
6886
- externalData: boolean;
6887
6886
  dateGranularities: string[];
6888
6887
  datetimeGranularities: string[];
6889
6888
  isMeasureCandidate: (field: PivotField) => boolean;
@@ -8036,6 +8035,7 @@ declare class FontSizeEditor extends Component<Props$1g, SpreadsheetChildEnv> {
8036
8035
  private inputRef;
8037
8036
  private rootEditorRef;
8038
8037
  private fontSizeListRef;
8038
+ private DOMFocusableElementStore;
8039
8039
  setup(): void;
8040
8040
  get popoverProps(): PopoverProps;
8041
8041
  onExternalClick(ev: MouseEvent): void;
@@ -11405,14 +11405,17 @@ declare class ZoomableChartJsComponent extends ChartJsComponent {
11405
11405
  private chartId;
11406
11406
  private datasetBoundaries;
11407
11407
  private removeEventListeners;
11408
+ private isMasterChartAllowed;
11408
11409
  setup(): void;
11409
11410
  protected unmount(): void;
11410
11411
  get containerStyle(): string;
11412
+ get masterChartContainerStyle(): "" | "opacity: 0.3;";
11411
11413
  get sliceable(): boolean;
11412
11414
  get axisOffset(): number;
11413
11415
  private getMasterChartConfiguration;
11414
11416
  private getDetailChartConfiguration;
11415
11417
  private getAxisLimitsFromDataset;
11418
+ private setMasterChartCursor;
11416
11419
  protected createChart(chartRuntime: ChartJSRuntime): void;
11417
11420
  protected updateChartJs(chartRuntime: ChartJSRuntime): void;
11418
11421
  private resetAxesLimits;
@@ -11421,11 +11424,37 @@ declare class ZoomableChartJsComponent extends ChartJsComponent {
11421
11424
  get lowerBound(): number | undefined;
11422
11425
  private computePosition;
11423
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;
11424
11453
  private updateAxisLimits;
11425
- onPointerDownInMasterChart(ev: PointerEvent): void;
11426
- onPointerMoveInMasterChart(ev: PointerEvent): void;
11427
- onMouseLeaveMasterChart(ev: PointerEvent): void;
11428
- onDoubleClickInMasterChart(ev: PointerEvent): void;
11454
+ onMasterChartPointerDown(ev: PointerEvent): void;
11455
+ onMasterChartPointerMove(ev: PointerEvent): void;
11456
+ onMasterChartMouseLeave(ev: PointerEvent): void;
11457
+ onMasterChartDoubleClick(ev: PointerEvent): void;
11429
11458
  }
11430
11459
 
11431
11460
  interface Props$m {
@@ -11592,7 +11621,7 @@ interface Props$j {
11592
11621
  canUpdateChart: (chartId: UID, definition: GenericDefinition<ZoomableChartDefinition>) => DispatchResult;
11593
11622
  updateChart: (chartId: UID, definition: GenericDefinition<ZoomableChartDefinition>) => DispatchResult;
11594
11623
  }
11595
- 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> {
11596
11625
  static template: string;
11597
11626
  static components: {
11598
11627
  Checkbox: typeof Checkbox;
@@ -12484,6 +12513,7 @@ declare class ClickableCellsStore extends SpreadsheetStore {
12484
12513
  private getClickableItem;
12485
12514
  private findClickableItem;
12486
12515
  get clickableCells(): ClickableCell[];
12516
+ private getClickableCellRect;
12487
12517
  }
12488
12518
 
12489
12519
  interface Props$4 {