@odoo/o-spreadsheet 19.1.4 → 19.1.18

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.1.4
5
- @date 2026-01-21T11:08:11.909Z
6
- @hash ceae12a
4
+ @version 19.1.18
5
+ @date 2026-05-11T13:46:50.248Z
6
+ @hash a849339
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -58,12 +58,12 @@
58
58
  t-att-class="{'o-topbar-responsive': !env.model.getters.isReadonly()}"
59
59
  t-ref="toolBarContainer">
60
60
  <div
61
- class="o-topbar-toolbar d-flex"
61
+ class="o-topbar-toolbar d-flex flex-grow-1"
62
62
  t-att-class="{'flex-shrink-0': env.model.getters.isReadonly()}">
63
63
  <!-- Toolbar -->
64
64
  <div
65
65
  t-if="env.model.getters.isReadonly()"
66
- class="o-readonly-toolbar d-flex align-items-center text-muted">
66
+ class="o-readonly-toolbar d-flex flex-grow-1 align-items-center text-muted">
67
67
  <span>
68
68
  <i class="fa fa-eye"/>
69
69
  Readonly Access
@@ -916,11 +916,11 @@
916
916
  </div>
917
917
  </div>
918
918
 
919
- <div class="o-panel-content overflow-y-auto h-100" t-ref="panelContent">
920
- <div class="h-100" t-att-class="{ 'd-none': state.panel !== 'configuration' }">
919
+ <div class="o-panel-content overflow-hidden h-100">
920
+ <div class="h-100" t-att-class="state.panel !== 'configuration' ? 'd-none' : ''">
921
921
  <t t-component="sidePanelEditor" t-props="props"/>
922
922
  </div>
923
- <div t-att-class="state.panel !== 'design' ? 'd-none' : ''">
923
+ <div class="h-100" t-att-class="state.panel !== 'design' ? 'd-none' : ''">
924
924
  <PivotDesignPanel pivotId="props.pivotId"/>
925
925
  </div>
926
926
  </div>
@@ -977,7 +977,7 @@
977
977
  </t>
978
978
 
979
979
  <t t-name="o-spreadsheet-PivotDesignPanel">
980
- <Section class="'o-pivot-design'" title.translate="Display options">
980
+ <Section class="'o-pivot-design h-100 overflow-y-auto'" title.translate="Display options">
981
981
  <div>
982
982
  <div class="container-fluid p-0 pt-2">
983
983
  <div class="row mb-2 align-items-center">
@@ -1333,7 +1333,9 @@
1333
1333
  class="py-1 px-2 d-flex flex-column shadow-sm pivot-dimension border rounded"
1334
1334
  t-att-class="{'pivot-dimension-invalid': !props.dimension.isValid}">
1335
1335
  <div class="d-flex flex-row justify-content-between align-items-center">
1336
- <div class="d-flex align-items-center overflow-hidden text-nowrap">
1336
+ <div
1337
+ class="d-flex align-items-center overflow-hidden text-nowrap"
1338
+ t-att-title="props.dimension.displayName">
1337
1339
  <span class="text-danger me-1" t-if="!props.dimension.isValid">
1338
1340
  <t t-call="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION"/>
1339
1341
  </span>
@@ -1344,7 +1346,7 @@
1344
1346
  class="'o-fw-bold'"
1345
1347
  selectContentOnFocus="true"
1346
1348
  />
1347
- <span t-else="1" class="o-fw-bold" t-esc="props.dimension.displayName"/>
1349
+ <span t-else="1" class="o-fw-bold text-truncate" t-esc="dimensionDisplayName"/>
1348
1350
  </div>
1349
1351
  <div class="d-flex flex-rows" t-on-pointerdown.stop="">
1350
1352
  <t t-slot="upper-right-icons"/>
@@ -1763,26 +1765,26 @@
1763
1765
  </t>
1764
1766
 
1765
1767
  <t t-name="o-spreadsheet-ListCriterionForm">
1766
- <t t-foreach="displayedValues" t-as="value" t-key="value_index">
1768
+ <t t-foreach="this.state.items" t-as="item" t-key="item_index">
1767
1769
  <div class="o-dv-list-values d-flex align-items-center">
1768
1770
  <div class="me-1">
1769
1771
  <RoundColorPicker
1770
- currentColor="props.criterion.colors?.[value] || '#E7E9ED'"
1771
- onColorPicked="(c) => this.onColorChanged(c, value)"
1772
+ currentColor="item.color || '#E7E9ED'"
1773
+ onColorPicked="(c) => this.onColorChanged(item_index, c)"
1772
1774
  />
1773
1775
  </div>
1774
1776
  <CriterionInput
1775
- value="props.criterion.values[value_index]"
1776
- onValueChanged="(v) => this.onValueChanged(v, value_index)"
1777
+ value="item.value"
1778
+ onValueChanged="(v) => this.onValueChanged(item_index, v)"
1777
1779
  criterionType="props.criterion.type"
1778
- onKeyDown="(ev) => this.onKeyDown(ev, value_index)"
1779
- focused="value_index === state.focusedValueIndex"
1780
+ onKeyDown="(ev) => this.onKeyDown(ev, item_index)"
1781
+ focused="item_index === this.state.focusedValueIndex"
1780
1782
  onBlur.bind="onBlurInput"
1781
1783
  disableFormulas="props.disableFormulas"
1782
1784
  />
1783
1785
  <div
1784
1786
  class="o-dv-list-item-delete ms-2 o-button-icon"
1785
- t-on-click="() => this.removeItem(value_index)">
1787
+ t-on-click="() => this.removeItem(item_index)">
1786
1788
  <t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
1787
1789
  </div>
1788
1790
  </div>
@@ -2968,27 +2970,31 @@
2968
2970
  </div>
2969
2971
 
2970
2972
  <t t-set="definition" t-value="getChartDefinition(this.chartId)"/>
2971
- <div class="o-panel-content" t-ref="panelContent">
2972
- <div t-att-class="store.panel !== 'configuration' ? 'd-none' : ''">
2973
- <ChartTypePicker chartId="chartId" chartPanelStore="store"/>
2974
- <t
2975
- t-component="chartPanel.configuration"
2976
- definition="definition"
2977
- chartId="chartId"
2978
- updateChart.bind="updateChart"
2979
- canUpdateChart.bind="canUpdateChart"
2980
- t-key="chartId + definition.type"
2981
- />
2973
+ <div class="o-panel-content h-100 overflow-y-hidden">
2974
+ <div class="h-100" t-att-class="store.panel !== 'configuration' ? 'd-none' : ''">
2975
+ <div class="h-100 overflow-y-auto">
2976
+ <ChartTypePicker chartId="chartId" chartPanelStore="store"/>
2977
+ <t
2978
+ t-component="chartPanel.configuration"
2979
+ definition="definition"
2980
+ chartId="chartId"
2981
+ updateChart.bind="updateChart"
2982
+ canUpdateChart.bind="canUpdateChart"
2983
+ t-key="chartId + definition.type"
2984
+ />
2985
+ </div>
2982
2986
  </div>
2983
- <div t-att-class="store.panel !== 'design' ? 'd-none' : ''">
2984
- <t
2985
- t-component="chartPanel.design"
2986
- definition="definition"
2987
- chartId="chartId"
2988
- updateChart.bind="updateChart"
2989
- canUpdateChart.bind="canUpdateChart"
2990
- t-key="chartId + definition.type"
2991
- />
2987
+ <div class="h-100" t-att-class="store.panel !== 'design' ? 'd-none' : ''">
2988
+ <div class="h-100 overflow-y-auto">
2989
+ <t
2990
+ t-component="chartPanel.design"
2991
+ definition="definition"
2992
+ chartId="chartId"
2993
+ updateChart.bind="updateChart"
2994
+ canUpdateChart.bind="canUpdateChart"
2995
+ t-key="chartId + definition.type"
2996
+ />
2997
+ </div>
2992
2998
  </div>
2993
2999
  </div>
2994
3000
  </div>
@@ -4648,13 +4654,12 @@
4648
4654
  <button class="o-button o-add-selection" t-if="canAddRange" t-on-click="addEmptyInput">
4649
4655
  Add range
4650
4656
  </button>
4651
- <div class="ms-auto" t-if="store.hasFocus">
4657
+ <div class="ms-auto" t-if="store.hasFocus or isResettable">
4652
4658
  <button class="o-button o-selection-ko" t-if="isResettable" t-on-click="reset">
4653
4659
  Reset
4654
4660
  </button>
4655
4661
  <button
4656
4662
  class="o-button primary ms-2 o-selection-ok"
4657
- t-if="store.hasFocus"
4658
4663
  t-att-disabled="!isConfirmable"
4659
4664
  t-on-click="confirm">
4660
4665
  Confirm
@@ -4807,7 +4812,7 @@
4807
4812
  </t>
4808
4813
 
4809
4814
  <t t-name="o-spreadsheet-Menu-Popover">
4810
- <Popover t-if="props.menuItems" t-props="popoverProps">
4815
+ <Popover t-if="menuItems.length" t-props="popoverProps">
4811
4816
  <div
4812
4817
  t-ref="menu"
4813
4818
  class="o-menu-wrapper bg-white"
@@ -4840,7 +4845,7 @@
4840
4845
  t-on-pointerdown.prevent=""
4841
4846
  t-on-click.stop=""
4842
4847
  t-on-contextmenu.prevent="">
4843
- <t t-foreach="menuItemsAndSeparators" t-as="menuItem" t-key="menuItem_index">
4848
+ <t t-foreach="props.menuItems" t-as="menuItem" t-key="menuItem_index">
4844
4849
  <div t-if="menuItem === 'separator'" class="o-separator border-bottom"/>
4845
4850
  <t t-else="">
4846
4851
  <t t-set="isMenuRoot" t-value="isRoot(menuItem)"/>
@@ -6568,7 +6573,11 @@
6568
6573
  anchorRect="menuState.anchorRect"
6569
6574
  onClose="() => this.closeMenu()"
6570
6575
  />
6571
- <t t-foreach="staticTables" t-as="table" t-key="table.id">
6576
+ <t
6577
+ t-if="!env.model.getters.isReadonly()"
6578
+ t-foreach="staticTables"
6579
+ t-as="table"
6580
+ t-key="table.id">
6572
6581
  <TableResizer table="table"/>
6573
6582
  </t>
6574
6583
  <VerticalScrollBar topOffset="HEADER_HEIGHT"/>
@@ -6625,8 +6634,8 @@
6625
6634
 
6626
6635
  <t t-name="o-spreadsheet-FilterMenuValueList">
6627
6636
  <div class="o-filter-menu-actions d-flex">
6628
- <div class="o-button-link me-4" t-on-click="selectAll">Select all</div>
6629
- <div class="o-button-link me-4" t-on-click="clearAll">Clear</div>
6637
+ <div class="o-button-link me-4" t-on-click="this.selectAll">Select all</div>
6638
+ <div class="o-button-link me-4" t-on-click="this.clearAll">Clear</div>
6630
6639
  </div>
6631
6640
  <div class="position-relative">
6632
6641
  <input
@@ -7070,7 +7079,7 @@
7070
7079
  t-ref="masterChartCanvas"
7071
7080
  t-on-dblclick="onMasterChartDoubleClick"
7072
7081
  t-on-pointerdown="onMasterChartPointerDown"
7073
- t-on-pointermove="onMasterChartPointerMove"
7082
+ t-on-pointermove="updateMasterChartCursor"
7074
7083
  t-on-mouseleave="onMasterChartMouseLeave"
7075
7084
  />
7076
7085
  </div>
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.1.4",
3
+ "version": "19.1.18",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
7
7
  "browser": "dist/o-spreadsheet.iife.js",
8
8
  "module": "dist/o-spreadsheet.esm.js",
9
- "types": "dist/o-spreadsheet.d.ts",
9
+ "types": "dist/types/index.d.ts",
10
10
  "files": [
11
11
  "dist/*.js",
12
12
  "dist/*.d.ts",
@@ -16,11 +16,8 @@
16
16
  "engines": {
17
17
  "node": ">=22.0.0"
18
18
  },
19
- "workspaces": [
20
- "packages/o-spreadsheet-engine"
21
- ],
22
19
  "scripts": {
23
- "prepare": "husky install",
20
+ "postinstall": "husky install",
24
21
  "prettier": "prettier . --write",
25
22
  "check-formatting": "prettier . --check && eslint",
26
23
  "lint": "eslint --fix",
@@ -30,22 +27,20 @@
30
27
  "build:watch": "npm-run-all --parallel transpile-js:watch bundle:iife:watch bundle:xml:watch bundle:css:watch",
31
28
  "transpile-js": "tsc --build --incremental --preserveWatchOutput",
32
29
  "transpile-js:watch": "npm run transpile-js -- --watch",
33
- "bundle:cjs": "rollup -c -m -- --format cjs",
34
- "bundle:esm": "rollup -c -m -- --format esm",
35
- "bundle:iife": "rollup -c -m -- --format iife",
30
+ "bundle:cjs": "rolldown -c --format cjs",
31
+ "bundle:esm": "rolldown -c --format esm",
32
+ "bundle:iife": "rolldown -c --format iife",
36
33
  "bundle:iife:watch": "wait-on build/js/src/index.js && npm run bundle:iife -- --watch",
37
34
  "bundle:xml": "node tools/bundle_xml/main.cjs",
38
35
  "bundle:xml:watch": "node tools/bundle_xml/watch_xml_templates.cjs",
39
36
  "bundle:css": "node tools/bundle_css/main.cjs",
40
37
  "bundle:css:watch": "node tools/bundle_css/watch_css_files.cjs",
41
- "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,demo",
38
+ "serve-static": "live-server --host=127.0.0.1 --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,demo",
42
39
  "serve-static:wait": "wait-on build/o_spreadsheet.iife.js build/o_spreadsheet.xml build/o_spreadsheet.css && npm run serve-static",
43
40
  "server": "node tools/server/main.cjs",
44
- "predist": "npm run dist --workspaces --if-present",
45
- "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c",
41
+ "dist": "tsc --module es6 --declaration --declarationDir dist/types && rolldown -c",
46
42
  "postdist": " npm run bundle:xml -- --outDir dist && npm run bundle:css -- --out dist",
47
- "pretest": "npm run test --workspaces --if-present",
48
- "test": "tsc --noEmit --project tsconfig.jest.json && jest",
43
+ "test": "tsc --noEmit --project tests/tsconfig.json && jest",
49
44
  "monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
50
45
  "zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
51
46
  "unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs"
@@ -71,18 +66,17 @@
71
66
  "homepage": "https://github.com/odoo/o-spreadsheet#readme",
72
67
  "devDependencies": {
73
68
  "@prettier/plugin-xml": "^2.2.0",
74
- "@rollup/plugin-alias": "^5.1.1",
75
- "@rollup/plugin-node-resolve": "^15.2.0",
76
- "@rollup/plugin-terser": "^0.4.3",
77
69
  "@swc/core": "1.6.7",
78
70
  "@swc/jest": "0.2.36",
79
- "@types/jest": "^27.0.1",
71
+ "@types/jest": "^30.0.0",
72
+ "@types/jest-image-snapshot": "^6.4.1",
80
73
  "@types/node": "^20.17.24",
81
74
  "@types/rbush": "^3.0.3",
82
75
  "@typescript-eslint/eslint-plugin": "^8.30.1",
83
76
  "babel-eslint": "^10.1.0",
84
77
  "body-parser": "^1.19.0",
85
- "chart.js": "4.4.5",
78
+ "canvas": "^3.0.0",
79
+ "chart.js": "4.5.0",
86
80
  "chartjs-adapter-luxon": "^1.3.1",
87
81
  "chartjs-chart-geo": "^4.3.2",
88
82
  "cors": "^2.8.5",
@@ -92,8 +86,9 @@
92
86
  "file-saver": "^2.0.5",
93
87
  "glob": "^11.0.1",
94
88
  "husky": "^7.0.4",
95
- "jest": "^29.5.0",
96
- "jest-environment-jsdom": "^29.5.0",
89
+ "jest": "^30.2.0",
90
+ "jest-environment-jsdom": "^30.2.0",
91
+ "jest-image-snapshot": "^6.5.2",
97
92
  "jszip": "^3.6.0",
98
93
  "lint-staged": "^12.1.2",
99
94
  "live-server": "^1.2.1",
@@ -104,11 +99,9 @@
104
99
  "npm-run-all": "^4.1.5",
105
100
  "prettier": "^2.8.0",
106
101
  "prettier-plugin-organize-imports": "^3.2.2",
107
- "rollup": "^3.28.0",
108
- "rollup-plugin-dts": "^5.3.1",
109
- "rollup-plugin-typescript2": "^0.35.0",
102
+ "rolldown": "^1.0.0-rc.15",
110
103
  "seedrandom": "^3.0.5",
111
- "typescript": "^5.8.2",
104
+ "typescript": "^6.0.2",
112
105
  "typescript-eslint": "^8.30.1",
113
106
  "wait-on": "^9.0.1",
114
107
  "xml-formatter": "^2.4.0"
@@ -123,7 +116,22 @@
123
116
  "@swc/core-linux-x64-musl": "1.6.7",
124
117
  "@swc/core-win32-arm64-msvc": "1.6.7",
125
118
  "@swc/core-win32-ia32-msvc": "1.6.7",
126
- "@swc/core-win32-x64-msvc": "1.6.7"
119
+ "@swc/core-win32-x64-msvc": "1.6.7",
120
+ "@rolldown/binding-android-arm64": "1.0.0-rc.15",
121
+ "@rolldown/binding-darwin-arm64": "1.0.0-rc.15",
122
+ "@rolldown/binding-darwin-x64": "1.0.0-rc.15",
123
+ "@rolldown/binding-freebsd-x64": "1.0.0-rc.15",
124
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.15",
125
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.15",
126
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.15",
127
+ "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.15",
128
+ "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.15",
129
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.15",
130
+ "@rolldown/binding-linux-x64-musl": "1.0.0-rc.15",
131
+ "@rolldown/binding-openharmony-arm64": "1.0.0-rc.15",
132
+ "@rolldown/binding-wasm32-wasi": "1.0.0-rc.15",
133
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.15",
134
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.15"
127
135
  },
128
136
  "prettier": {
129
137
  "printWidth": 100,
@@ -132,7 +140,7 @@
132
140
  "xmlSelfClosingSpace": false
133
141
  },
134
142
  "dependencies": {
135
- "@odoo/owl": "2.8.1",
143
+ "@odoo/owl": "2.8.3",
136
144
  "bootstrap": "^5.3.3",
137
145
  "font-awesome": "^4.7.0",
138
146
  "rbush": "^3.0.1"
@@ -147,10 +155,6 @@
147
155
  "@swc/jest"
148
156
  ]
149
157
  },
150
- "moduleNameMapper": {
151
- "^@odoo/o-spreadsheet-engine$": "<rootDir>/packages/o-spreadsheet-engine/src",
152
- "^@odoo/o-spreadsheet-engine/(.*)$": "<rootDir>/packages/o-spreadsheet-engine/src/$1"
153
- },
154
158
  "verbose": false,
155
159
  "testEnvironment": "jsdom",
156
160
  "testRegex": "(/tests/.*(test|spec))\\.ts?$",
@@ -171,11 +175,11 @@
171
175
  },
172
176
  "lint-staged": {
173
177
  "*": [
174
- "prettier --write",
175
- "eslint --fix"
178
+ "eslint --fix",
179
+ "prettier --write"
176
180
  ]
177
181
  },
178
182
  "publishConfig": {
179
- "tag": "latest"
183
+ "tag": "19-1"
180
184
  }
181
185
  }