@odoo/o-spreadsheet 18.4.25 → 18.4.39

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 18.4.25
5
- @date 2026-01-21T11:07:00.554Z
6
- @hash 161472d
4
+ @version 18.4.39
5
+ @date 2026-05-12T12:17:39.814Z
6
+ @hash e8a3b47
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
@@ -1582,26 +1582,26 @@
1582
1582
  </t>
1583
1583
 
1584
1584
  <t t-name="o-spreadsheet-ListCriterionForm">
1585
- <t t-foreach="displayedValues" t-as="value" t-key="value_index">
1585
+ <t t-foreach="this.state.items" t-as="item" t-key="item_index">
1586
1586
  <div class="o-dv-list-values d-flex align-items-center">
1587
1587
  <div class="me-1">
1588
1588
  <RoundColorPicker
1589
- currentColor="props.criterion.colors?.[value] || '#E7E9ED'"
1590
- onColorPicked="(c) => this.onColorChanged(c, value)"
1589
+ currentColor="item.color || '#E7E9ED'"
1590
+ onColorPicked="(c) => this.onColorChanged(item_index, c)"
1591
1591
  />
1592
1592
  </div>
1593
1593
  <CriterionInput
1594
- value="props.criterion.values[value_index]"
1595
- onValueChanged="(v) => this.onValueChanged(v, value_index)"
1594
+ value="item.value"
1595
+ onValueChanged="(v) => this.onValueChanged(item_index, v)"
1596
1596
  criterionType="props.criterion.type"
1597
- onKeyDown="(ev) => this.onKeyDown(ev, value_index)"
1598
- focused="value_index === state.focusedValueIndex"
1597
+ onKeyDown="(ev) => this.onKeyDown(ev, item_index)"
1598
+ focused="item_index === this.state.focusedValueIndex"
1599
1599
  onBlur.bind="onBlurInput"
1600
1600
  disableFormulas="props.disableFormulas"
1601
1601
  />
1602
1602
  <div
1603
1603
  class="o-dv-list-item-delete ms-2 o-button-icon"
1604
- t-on-click="() => this.removeItem(value_index)">
1604
+ t-on-click="() => this.removeItem(item_index)">
1605
1605
  <t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
1606
1606
  </div>
1607
1607
  </div>
@@ -4015,13 +4015,12 @@
4015
4015
  <button class="o-button o-add-selection" t-if="canAddRange" t-on-click="addEmptyInput">
4016
4016
  Add range
4017
4017
  </button>
4018
- <div class="ms-auto" t-if="store.hasFocus">
4018
+ <div class="ms-auto" t-if="store.hasFocus or isResettable">
4019
4019
  <button class="o-button o-selection-ko" t-if="isResettable" t-on-click="reset">
4020
4020
  Reset
4021
4021
  </button>
4022
4022
  <button
4023
4023
  class="o-button primary ms-2 o-selection-ok"
4024
- t-if="store.hasFocus"
4025
4024
  t-att-disabled="!isConfirmable"
4026
4025
  t-on-click="confirm">
4027
4026
  Confirm
@@ -4121,7 +4120,7 @@
4121
4120
  </t>
4122
4121
 
4123
4122
  <t t-name="o-spreadsheet-Menu-Popover">
4124
- <Popover t-if="props.menuItems" t-props="popoverProps">
4123
+ <Popover t-if="menuItems.length" t-props="popoverProps">
4125
4124
  <div t-ref="menu" class="o-menu-wrapper" t-on-mouseover="() => this.onMouseOverMainMenu()">
4126
4125
  <Menu t-props="menuProps"/>
4127
4126
  </div>
@@ -4151,7 +4150,7 @@
4151
4150
  t-on-pointerdown.prevent=""
4152
4151
  t-on-click.stop=""
4153
4152
  t-on-contextmenu.prevent="">
4154
- <t t-foreach="menuItemsAndSeparators" t-as="menuItem" t-key="menuItem_index">
4153
+ <t t-foreach="props.menuItems" t-as="menuItem" t-key="menuItem_index">
4155
4154
  <div t-if="menuItem === 'separator'" class="o-separator"/>
4156
4155
  <t t-else="">
4157
4156
  <t t-set="isMenuRoot" t-value="isRoot(menuItem)"/>
@@ -5771,7 +5770,11 @@
5771
5770
  anchorRect="menuState.anchorRect"
5772
5771
  onClose="() => this.closeMenu()"
5773
5772
  />
5774
- <t t-foreach="staticTables" t-as="table" t-key="table.id">
5773
+ <t
5774
+ t-if="!env.model.getters.isReadonly()"
5775
+ t-foreach="staticTables"
5776
+ t-as="table"
5777
+ t-key="table.id">
5775
5778
  <TableResizer table="table"/>
5776
5779
  </t>
5777
5780
  <VerticalScrollBar topOffset="HEADER_HEIGHT"/>
@@ -5853,8 +5856,8 @@
5853
5856
 
5854
5857
  <t t-name="o-spreadsheet-FilterMenuValueList">
5855
5858
  <div class="o-filter-menu-actions d-flex">
5856
- <div class="o-button-link me-4" t-on-click="selectAll">Select all</div>
5857
- <div class="o-button-link me-4" t-on-click="clearAll">Clear</div>
5859
+ <div class="o-button-link me-4" t-on-click="this.selectAll">Select all</div>
5860
+ <div class="o-button-link me-4" t-on-click="this.clearAll">Clear</div>
5858
5861
  </div>
5859
5862
  <div class="position-relative">
5860
5863
  <input
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.25",
3
+ "version": "18.4.39",
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",
@@ -14,17 +14,17 @@
14
14
  "dist/*.css"
15
15
  ],
16
16
  "scripts": {
17
- "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,main.css,demo",
17
+ "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,main.css,demo",
18
18
  "dev": "npm-run-all --print-label bundle:dev --parallel server serve-static watch",
19
19
  "server": "node tools/server/main.cjs",
20
20
  "build:js": "tsc --module es6 --incremental",
21
- "bundle:iife": "rollup -c -m -- --format iife",
22
- "bundle:esm": "rollup -c -m -- --format esm",
21
+ "bundle:iife": "rolldown -c --format iife",
22
+ "bundle:esm": "rolldown -c --format esm",
23
23
  "bundle:xml": "node tools/bundle_xml/main.cjs",
24
24
  "bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
25
- "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist && node tools/bundle_scss/main.cjs --out dist",
25
+ "dist": "tsc --module es6 --declaration --declarationDir dist/types && rolldown -c && npm run bundle:xml -- --outDir dist && node tools/bundle_scss/main.cjs --out dist",
26
26
  "monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
27
- "test": "tsc --noEmit --project tsconfig.jest.json && jest",
27
+ "test": "tsc --noEmit --project tests/tsconfig.json && jest",
28
28
  "test:watch": "jest --watch",
29
29
  "prettier": "prettier . --write",
30
30
  "check-formatting": "prettier . --check && eslint",
@@ -60,16 +60,16 @@
60
60
  "homepage": "https://github.com/odoo/o-spreadsheet#readme",
61
61
  "devDependencies": {
62
62
  "@prettier/plugin-xml": "^2.2.0",
63
- "@rollup/plugin-node-resolve": "^15.2.0",
64
- "@rollup/plugin-terser": "^0.4.3",
65
63
  "@swc/jest": "0.2.36",
66
64
  "@swc/core": "1.6.7",
67
- "@types/jest": "^27.0.1",
65
+ "@types/jest": "^30.0.0",
66
+ "@types/jest-image-snapshot": "^6.4.1",
68
67
  "@types/node": "^20.17.24",
69
68
  "@types/rbush": "^3.0.3",
70
69
  "@typescript-eslint/eslint-plugin": "^8.30.1",
71
70
  "babel-eslint": "^10.1.0",
72
71
  "body-parser": "^1.19.0",
72
+ "canvas": "^3.0.0",
73
73
  "chart.js": "4.4.5",
74
74
  "chartjs-adapter-luxon": "^1.3.1",
75
75
  "chartjs-chart-geo": "^4.3.2",
@@ -81,24 +81,23 @@
81
81
  "fs": "^0.0.1-security",
82
82
  "glob": "^11.0.1",
83
83
  "husky": "^7.0.4",
84
- "jest": "^29.5.0",
85
- "jest-environment-jsdom": "^29.5.0",
84
+ "jest": "^30.2.0",
85
+ "jest-environment-jsdom": "^30.2.0",
86
+ "jest-image-snapshot": "^6.5.2",
86
87
  "jszip": "^3.6.0",
87
88
  "lint-staged": "^12.1.2",
88
89
  "live-server": "^1.2.1",
89
- "luxon": "^3.5.0",
90
+ "luxon": "3.5.0",
90
91
  "minimist": "^1.2.8",
91
92
  "mockdate": "^3.0.2",
92
93
  "node-watch": "^0.7.3",
93
94
  "npm-run-all": "^4.1.5",
94
95
  "prettier": "^2.8.0",
95
96
  "prettier-plugin-organize-imports": "^3.2.2",
96
- "rollup": "^3.28.0",
97
- "rollup-plugin-dts": "^5.3.1",
98
- "rollup-plugin-typescript2": "^0.35.0",
99
97
  "sass": "^1.62.1",
98
+ "rolldown": "^1.0.0-rc.15",
100
99
  "seedrandom": "^3.0.5",
101
- "typescript": "^5.8.2",
100
+ "typescript": "^6.0.2",
102
101
  "typescript-eslint": "^8.30.1",
103
102
  "xml-formatter": "^2.4.0"
104
103
  },
@@ -112,7 +111,22 @@
112
111
  "@swc/core-linux-x64-musl": "1.6.7",
113
112
  "@swc/core-win32-arm64-msvc": "1.6.7",
114
113
  "@swc/core-win32-ia32-msvc": "1.6.7",
115
- "@swc/core-win32-x64-msvc": "1.6.7"
114
+ "@swc/core-win32-x64-msvc": "1.6.7",
115
+ "@rolldown/binding-android-arm64": "1.0.0-rc.15",
116
+ "@rolldown/binding-darwin-arm64": "1.0.0-rc.15",
117
+ "@rolldown/binding-darwin-x64": "1.0.0-rc.15",
118
+ "@rolldown/binding-freebsd-x64": "1.0.0-rc.15",
119
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.15",
120
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.15",
121
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.15",
122
+ "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.15",
123
+ "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.15",
124
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.15",
125
+ "@rolldown/binding-linux-x64-musl": "1.0.0-rc.15",
126
+ "@rolldown/binding-openharmony-arm64": "1.0.0-rc.15",
127
+ "@rolldown/binding-wasm32-wasi": "1.0.0-rc.15",
128
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.15",
129
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.15"
116
130
  },
117
131
  "prettier": {
118
132
  "printWidth": 100,
@@ -121,8 +135,8 @@
121
135
  "xmlSelfClosingSpace": false
122
136
  },
123
137
  "dependencies": {
124
- "@odoo/owl": "2.8.1",
125
- "bootstrap": "^5.3.3",
138
+ "@odoo/owl": "2.8.2",
139
+ "bootstrap": "5.3.3",
126
140
  "font-awesome": "^4.7.0",
127
141
  "rbush": "^3.0.1"
128
142
  },
@@ -156,8 +170,8 @@
156
170
  },
157
171
  "lint-staged": {
158
172
  "*": [
159
- "prettier --write",
160
- "eslint --fix"
173
+ "eslint --fix",
174
+ "prettier --write"
161
175
  ]
162
176
  },
163
177
  "publishConfig": {