@odoo/o-spreadsheet 19.3.21 → 19.3.22

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.
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 19.3.21
5
- @date 2026-09-18T05:27:20.212Z
6
- @hash 6577e59
4
+ @version 19.3.22
5
+ @date 2026-10-01T07:46:52.974Z
6
+ @hash 0dd651f
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -169,14 +169,14 @@
169
169
 
170
170
  <div t-name="o-spreadsheet-TopBarZoom" t-ref="buttonRef" t-on-click.stop="">
171
171
  <NumberEditor
172
- currentValue="currentFontSize"
172
+ currentValue="getZoomLevel()"
173
173
  onValueChange.bind="this.setZoom"
174
174
  class="props.class"
175
175
  onToggle.bind="this.toggle"
176
176
  onFocusInput.bind="this.onFocusInput"
177
177
  valueIcon="'%'"
178
- min="25"
179
- max="300"
178
+ min="minZoom"
179
+ max="maxZoom"
180
180
  valueList="valueList"
181
181
  title.translate="Zoom"
182
182
  />
@@ -533,7 +533,7 @@
533
533
  </div>
534
534
  </div>
535
535
  <SidePanels/>
536
- <div class="o-spreadsheet-bottombar-wrapper o-two-columns overflow-hidden">
536
+ <div class="o-spreadsheet-bottombar-wrapper o-two-columns overflow-hidden border-top">
537
537
  <SmallBottomBar t-if="env.isSmall" onClick="() => this.focusGrid()"/>
538
538
  <BottomBar t-else="" onClick="() => this.focusGrid()"/>
539
539
  </div>
@@ -7978,7 +7978,7 @@
7978
7978
 
7979
7979
  <t t-name="o-spreadsheet-BottomBar">
7980
7980
  <div
7981
- class="o-spreadsheet-bottom-bar o-two-columns d-flex flex-fill align-items-center overflow-hidden border-top"
7981
+ class="o-spreadsheet-bottom-bar o-two-columns d-flex flex-fill align-items-center overflow-hidden"
7982
7982
  t-on-click="props.onClick"
7983
7983
  t-ref="bottomBar">
7984
7984
  <Ripple class="'add-sheet-container'">
@@ -65,6 +65,11 @@ export declare class NumberEditor extends Component<Props, SpreadsheetChildEnv>
65
65
  private rootEditorRef;
66
66
  private valueListRef;
67
67
  private DOMFocusableElementStore;
68
+ /**
69
+ * Skips the change event triggered when moving focus out of the input.
70
+ * The value has already been committed by `onInputKeydown`.
71
+ */
72
+ private skipNextInputChange;
68
73
  setup(): void;
69
74
  get popoverProps(): PopoverProps;
70
75
  onExternalClick(ev: MouseEvent): void;
@@ -15,9 +15,11 @@ export declare class ToolBarZoom extends Component<Props, SpreadsheetChildEnv> {
15
15
  };
16
16
  topBarToolStore: ToolBarDropdownStore;
17
17
  valueList: number[];
18
+ minZoom: number;
19
+ maxZoom: number;
18
20
  setup(): void;
19
- get currentFontSize(): number;
20
- setZoom(fontSize: number): void;
21
+ getZoomLevel(): number;
22
+ setZoom(zoomPercentage: number): void;
21
23
  toggle(): void;
22
24
  onFocusInput(): void;
23
25
  }
@@ -67,6 +67,8 @@ export declare const DESKTOP_MENU_ITEM_HEIGHT = 26;
67
67
  export declare const MENU_SEPARATOR_BORDER_WIDTH = 1;
68
68
  export declare const MENU_SEPARATOR_PADDING = 5;
69
69
  export declare const MENU_SEPARATOR_HEIGHT: number;
70
+ export declare const MIN_ZOOM_LEVEL = 0.5;
71
+ export declare const MAX_ZOOM_LEVEL = 2;
70
72
  export declare const ZOOM_VALUES: number[];
71
73
  export declare const DEFAULT_STYLE: {
72
74
  align: "left";
@@ -0,0 +1,42 @@
1
+ import { PivotDimension, PivotNode } from "../../../types/pivot";
2
+ import { DataEntries } from "./data_entry_spreadsheet_pivot";
3
+ /**
4
+ * Index of the data entries of a spreadsheet pivot, used to retrieve the
5
+ * entries matching a pivot domain without scanning all the entries.
6
+ *
7
+ * Starting with the row dimensions, one can descend either in the
8
+ * next row dimension (`rowChildren`) or in the first column dimension
9
+ * (`colChildren`).
10
+ *
11
+ * e.g. with the rows ["continent", "city"] and the columns ["team"]
12
+ *
13
+ * root -> all the entries
14
+ * ├── (col) Team 1 -> [team=Team 1]
15
+ * ├── (col) Team 2 -> [team=Team 2]
16
+ * ├── (row) Europe -> [continent=Europe]
17
+ * │ ├── (col) Team 1 -> [continent=Europe, team=Team 1]
18
+ * │ ├── (row) Brussels -> [continent=Europe, city=Brussels]
19
+ * │ │ └── (col) Team 1 -> [continent=Europe, city=Brussels, team=Team 1]
20
+ * │ └── (row) Paris
21
+ * │ └── ...
22
+ * └── (row) North America
23
+ * └── ...
24
+ *
25
+ * Each entry is inserted once per couple (row prefix, column prefix) it belongs
26
+ * to, which is exactly the number of pivot cells it contributes to.
27
+ */
28
+ export declare class PivotDataEntriesIndex {
29
+ private rowDimensions;
30
+ private colDimensions;
31
+ private root;
32
+ constructor(dataEntries: DataEntries, rowDimensions: PivotDimension[], colDimensions: PivotDimension[]);
33
+ /**
34
+ * Get the data entries matching the given domain.
35
+ */
36
+ getDataEntries(domain: PivotNode[]): DataEntries;
37
+ private addEntry;
38
+ /**
39
+ * Add the entry to the given row node, and to each of its column prefixes.
40
+ */
41
+ private addEntryToColumns;
42
+ }
@@ -31,6 +31,11 @@ export declare class SpreadsheetPivot implements Pivot<SpreadsheetPivotRuntimeDe
31
31
  * that contains the values of the fields for a row.
32
32
  */
33
33
  private dataEntries;
34
+ /**
35
+ * This index is used to retrieve the data entries matching a pivot domain
36
+ * without scanning all the data entries.
37
+ */
38
+ private dataEntriesIndex;
34
39
  /**
35
40
  * This object contains the pivot table structure. It is created from the
36
41
  * data entries and the pivot definition.
@@ -76,8 +81,7 @@ export declare class SpreadsheetPivot implements Pivot<SpreadsheetPivotRuntimeDe
76
81
  private loadRuntimeDefinition;
77
82
  private loadData;
78
83
  private getTypeOfDimension;
79
- private filterDataEntriesFromDomain;
80
- private filterDataEntriesFromDomainNode;
84
+ private getDataEntriesFromDomain;
81
85
  private getDimension;
82
86
  private getTypeFromZone;
83
87
  private assertCellIsValidField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.3.21",
3
+ "version": "19.3.22",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o_spreadsheet.cjs",