@odoo/o-spreadsheet 19.1.0-alpha.0 → 19.1.0-alpha.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.1.0-alpha.0",
3
+ "version": "19.1.0-alpha.10",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -12,31 +12,44 @@
12
12
  "dist/*.d.ts",
13
13
  "dist/*.xml"
14
14
  ],
15
+ "engines": {
16
+ "node": ">=22.0.0"
17
+ },
18
+ "workspaces": [
19
+ "packages/o-spreadsheet-engine"
20
+ ],
15
21
  "scripts": {
16
- "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,main.css,demo",
17
- "dev": "npm-run-all --print-label bundle:dev --parallel server serve-static watch",
18
- "server": "node tools/server/main.cjs",
22
+ "prepare": "husky install",
23
+ "prettier": "prettier . --write",
24
+ "check-formatting": "prettier . --check && eslint",
25
+ "lint": "eslint --fix",
26
+ "dev": "npm-run-all --print-label prebuild build:dev --parallel build:watch:engine build:watch server serve-static",
27
+ "prebuild": "npm run build --workspaces --if-present",
28
+ "build:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" \"bundle:css -- --out build\"",
29
+ "build": "npm-run-all build:js bundle:esm bundle:iife \"bundle:xml -- --outDir build\" \"bundle:css -- --out build\"",
30
+ "build:watch": "npm-run-all --parallel build:js:watch bundle:iife:watch bundle:xml:watch bundle:css:watch",
31
+ "build:watch:engine": "npm run build:watch --workspace=@odoo/o-spreadsheet-engine",
19
32
  "build:js": "tsc --module es6 --incremental",
20
- "bundle:iife": "rollup -c -m -- --format iife",
33
+ "build:js:watch": "npm run build:js -- --watch",
34
+ "bundle:cjs": "rollup -c -m -- --format cjs",
21
35
  "bundle:esm": "rollup -c -m -- --format esm",
36
+ "bundle:iife": "rollup -c -m -- --format iife",
37
+ "bundle:iife:watch": "npm run bundle:iife -- --watch",
38
+ "bundle:dev": "rollup -c -m -- --format dev",
22
39
  "bundle:xml": "node tools/bundle_xml/main.cjs",
23
- "bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
24
- "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
- "monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
40
+ "bundle:xml:watch": "node tools/bundle_xml/watch_xml_templates.cjs",
41
+ "bundle:css": "node tools/bundle_css/main.cjs",
42
+ "bundle:css:watch": "node tools/bundle_css/watch_css_files.cjs",
43
+ "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,demo",
44
+ "server": "node tools/server/main.cjs",
45
+ "predist": "npm run dist --workspaces --if-present",
46
+ "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c",
47
+ "postdist": " npm run bundle:xml -- --outDir dist && npm run bundle:css -- --out dist",
48
+ "pretest": "npm run test --workspaces --if-present",
26
49
  "test": "tsc --noEmit --project tsconfig.jest.json && jest",
27
- "test:watch": "jest --watch",
28
- "prettier": "prettier . --write",
29
- "check-formatting": "prettier . --check && eslint",
30
- "prepare": "husky install",
31
- "watch": "npm-run-all -p watch:*",
32
- "watch:bundle": "npm run bundle:iife -- --watch",
33
- "watch:ts": "npm run build:js -- --watch",
34
- "watch:xml": "node tools/bundle_xml/watch_xml_templates.cjs",
35
- "watch:scss": "node tools/bundle_scss/watch_scss_files.cjs",
36
- "unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs",
50
+ "monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
37
51
  "zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
38
- "build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
39
- "lint": "eslint --fix"
52
+ "unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs"
40
53
  },
41
54
  "browserslist": [
42
55
  "last 1 Chrome versions"
@@ -59,9 +72,11 @@
59
72
  "homepage": "https://github.com/odoo/o-spreadsheet#readme",
60
73
  "devDependencies": {
61
74
  "@prettier/plugin-xml": "^2.2.0",
75
+ "@rollup/plugin-alias": "^5.1.1",
62
76
  "@rollup/plugin-node-resolve": "^15.2.0",
63
77
  "@rollup/plugin-terser": "^0.4.3",
64
- "@swc/jest": "^0.2.36",
78
+ "@swc/core": "1.6.7",
79
+ "@swc/jest": "0.2.36",
65
80
  "@types/jest": "^27.0.1",
66
81
  "@types/node": "^20.17.24",
67
82
  "@types/rbush": "^3.0.3",
@@ -76,7 +91,6 @@
76
91
  "express-form-data": "^2.0.19",
77
92
  "express-ws": "^4.0.0",
78
93
  "file-saver": "^2.0.5",
79
- "fs": "^0.0.1-security",
80
94
  "glob": "^11.0.1",
81
95
  "husky": "^7.0.4",
82
96
  "jest": "^29.5.0",
@@ -84,7 +98,7 @@
84
98
  "jszip": "^3.6.0",
85
99
  "lint-staged": "^12.1.2",
86
100
  "live-server": "^1.2.1",
87
- "luxon": "^3.5.0",
101
+ "luxon": "^3.7.2",
88
102
  "minimist": "^1.2.8",
89
103
  "mockdate": "^3.0.2",
90
104
  "node-watch": "^0.7.3",
@@ -94,12 +108,23 @@
94
108
  "rollup": "^3.28.0",
95
109
  "rollup-plugin-dts": "^5.3.1",
96
110
  "rollup-plugin-typescript2": "^0.35.0",
97
- "sass": "^1.62.1",
98
111
  "seedrandom": "^3.0.5",
99
112
  "typescript": "^5.8.2",
100
113
  "typescript-eslint": "^8.30.1",
101
114
  "xml-formatter": "^2.4.0"
102
115
  },
116
+ "optionalDependencies": {
117
+ "@swc/core-darwin-arm64": "1.6.7",
118
+ "@swc/core-darwin-x64": "1.6.7",
119
+ "@swc/core-linux-arm-gnueabihf": "1.6.7",
120
+ "@swc/core-linux-arm64-gnu": "1.6.7",
121
+ "@swc/core-linux-arm64-musl": "1.6.7",
122
+ "@swc/core-linux-x64-gnu": "1.6.7",
123
+ "@swc/core-linux-x64-musl": "1.6.7",
124
+ "@swc/core-win32-arm64-msvc": "1.6.7",
125
+ "@swc/core-win32-ia32-msvc": "1.6.7",
126
+ "@swc/core-win32-x64-msvc": "1.6.7"
127
+ },
103
128
  "prettier": {
104
129
  "printWidth": 100,
105
130
  "xmlWhitespaceSensitivity": "ignore",
@@ -122,6 +147,10 @@
122
147
  "@swc/jest"
123
148
  ]
124
149
  },
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
+ },
125
154
  "verbose": false,
126
155
  "testEnvironment": "jsdom",
127
156
  "testRegex": "(/tests/.*(test|spec))\\.ts?$",
package/readme.md CHANGED
@@ -39,6 +39,7 @@ npm run test -- --watch # run all tests, rerun on file change
39
39
  3. [Model creation](doc/integrating/integration.md#model-creation)
40
40
  4. [Collaborative edition](doc/integrating/integration.md#collaborative-edition)
41
41
  5. [Translation](doc/integrating/integration.md#translation)
42
+ 6. [Data model (json)](doc/data-model.md)
42
43
  <!--
43
44
 
44
45
  - use with other UI library