excel-collab 0.0.3 → 0.0.5
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/CHANGELOG.md +34 -0
- package/LICENSE +21 -21
- package/README.md +119 -89
- package/lib/{Chart-B5P7BSgJ.mjs → Chart-B4zRuRrj.mjs} +4 -4
- package/lib/{Chart-B5P7BSgJ.mjs.map → Chart-B4zRuRrj.mjs.map} +1 -1
- package/lib/{Chart-ChBHO6oN.js → Chart-DWZZ-CmV.js} +3 -3
- package/lib/{Chart-ChBHO6oN.js.map → Chart-DWZZ-CmV.js.map} +1 -1
- package/lib/browser-9tvcBhtW.js +2 -0
- package/lib/{browser-vV4F0pQh.js.map → browser-9tvcBhtW.js.map} +1 -1
- package/lib/{browser-D0mSLGul.mjs → browser-DyM4TSRh.mjs} +2 -2
- package/lib/{browser-D0mSLGul.mjs.map → browser-DyM4TSRh.mjs.map} +1 -1
- package/lib/demo/index.d.ts +0 -0
- package/lib/e2e/util.d.ts +1 -1
- package/lib/excel.js +1 -1
- package/lib/excel.mjs +184 -186
- package/lib/icon/android-icon-144x144.png +0 -0
- package/lib/icon/android-icon-192x192.png +0 -0
- package/lib/icon/android-icon-36x36.png +0 -0
- package/lib/icon/android-icon-48x48.png +0 -0
- package/lib/icon/android-icon-72x72.png +0 -0
- package/lib/icon/android-icon-96x96.png +0 -0
- package/lib/icon/apple-icon-114x114.png +0 -0
- package/lib/icon/apple-icon-120x120.png +0 -0
- package/lib/icon/apple-icon-144x144.png +0 -0
- package/lib/icon/apple-icon-152x152.png +0 -0
- package/lib/icon/apple-icon-180x180.png +0 -0
- package/lib/icon/apple-icon-57x57.png +0 -0
- package/lib/icon/apple-icon-60x60.png +0 -0
- package/lib/icon/apple-icon-72x72.png +0 -0
- package/lib/icon/apple-icon-76x76.png +0 -0
- package/lib/icon/apple-icon-precomposed.png +0 -0
- package/lib/icon/apple-icon.png +0 -0
- package/lib/icon/browserconfig.xml +11 -0
- package/lib/icon/favicon-16x16.png +0 -0
- package/lib/icon/favicon-32x32.png +0 -0
- package/lib/icon/favicon-96x96.png +0 -0
- package/lib/icon/favicon.ico +0 -0
- package/lib/icon/manifest.json +41 -0
- package/lib/icon/ms-icon-144x144.png +0 -0
- package/lib/icon/ms-icon-150x150.png +0 -0
- package/lib/icon/ms-icon-310x310.png +0 -0
- package/lib/icon/ms-icon-70x70.png +0 -0
- package/lib/icon/rotate.png +0 -0
- package/lib/{index-DoNF8xMt.mjs → index-DCjSDDwD.mjs} +5523 -5476
- package/lib/index-DCjSDDwD.mjs.map +1 -0
- package/lib/{index-CqBqm-fX.js → index-Dxm3oBMN.js} +104 -104
- package/lib/index-Dxm3oBMN.js.map +1 -0
- package/lib/{jszip.min-BM_tHl3X.js → jszip.min-CE0Sw416.js} +2 -2
- package/lib/{jszip.min-BM_tHl3X.js.map → jszip.min-CE0Sw416.js.map} +1 -1
- package/lib/{jszip.min-BtlodmTS.mjs → jszip.min-oCXO1N8-.mjs} +2 -2
- package/lib/{jszip.min-BtlodmTS.mjs.map → jszip.min-oCXO1N8-.mjs.map} +1 -1
- package/lib/src/collaboration/index.d.ts +4 -4
- package/lib/src/collaboration/local.d.ts +1 -1
- package/lib/src/collaboration/server.d.ts +4 -4
- package/lib/src/collaboration/type.d.ts +1 -13
- package/lib/src/containers/MenuBar/File.d.ts +7 -1
- package/lib/src/containers/store/base.d.ts +1 -0
- package/lib/src/containers/store/context.d.ts +2 -3
- package/lib/src/formula/numberFormat.d.ts +4 -6
- package/lib/src/i18n/lang/en.json.d.ts +111 -110
- package/lib/src/i18n/lang/zh.json.d.ts +111 -110
- package/lib/src/types/components.d.ts +34 -0
- package/lib/src/types/controller.d.ts +15 -31
- package/lib/src/types/model.d.ts +4 -4
- package/lib/style.css +1 -1
- package/lib/worker-COTVtn10.mjs +5094 -0
- package/lib/worker-COTVtn10.mjs.map +1 -0
- package/lib/worker-DBaoNekX.js +12 -0
- package/lib/worker-DBaoNekX.js.map +1 -0
- package/lib/worker.js +1 -1
- package/lib/worker.mjs +1 -1
- package/package.json +12 -10
- package/lib/browser-vV4F0pQh.js +0 -2
- package/lib/index-CqBqm-fX.js.map +0 -1
- package/lib/index-DoNF8xMt.mjs.map +0 -1
- package/lib/worker-CtkVt1CM.js +0 -12
- package/lib/worker-CtkVt1CM.js.map +0 -1
- package/lib/worker-Db-VGgf_.mjs +0 -4322
- package/lib/worker-Db-VGgf_.mjs.map +0 -1
- /package/lib/{playground/index.d.ts → demo/sentry.d.ts} +0 -0
- /package/lib/{playground → demo}/worker.d.ts +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.5](https://github.com/nusr/excel/compare/v0.0.4...v0.0.5) (2024-12-24)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* toggle sheet ([a9f1f12](https://github.com/nusr/excel/commit/a9f1f12dba58be7f04e0dfe150bf0d69b181a31c))
|
|
8
|
+
|
|
9
|
+
## [0.0.4](https://github.com/nusr/excel/compare/v0.0.3...v0.0.4) (2024-12-24)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* number format ([f62f605](https://github.com/nusr/excel/commit/f62f605bef9b10e67a6107680911d80b7c4f3f65))
|
|
14
|
+
* publish ([ec540a1](https://github.com/nusr/excel/commit/ec540a1ea9b6c3059048e6f4972aebc4ce97747e))
|
|
15
|
+
* remove examples ([8846b18](https://github.com/nusr/excel/commit/8846b1851fdf06d04e16e71c3ad17599d8b4cf65))
|
|
16
|
+
* render loop ([744811f](https://github.com/nusr/excel/commit/744811f06433a71497a7036fe6b77ae7bcedc03a))
|
|
17
|
+
* supbase ([c14c6ba](https://github.com/nusr/excel/commit/c14c6ba4562335a8f57b9ceadc0a7ce7b0eadd83))
|
|
18
|
+
|
|
19
|
+
## [0.0.3](https://github.com/nusr/excel/compare/v0.0.2...v0.0.3) (2024-12-21)
|
|
20
|
+
|
|
21
|
+
## [0.0.2](https://github.com/nusr/excel/compare/v0.0.1...v0.0.2) (2024-12-21)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add examples ([33b4475](https://github.com/nusr/excel/commit/33b44751142d816df45efaba0980a6f4a3cb1f3a))
|
|
26
|
+
* library mode ([4bfbeb4](https://github.com/nusr/excel/commit/4bfbeb48d5635bf063172660a2757eed848ac479))
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* ci ([3b5865d](https://github.com/nusr/excel/commit/3b5865dd7d58926f75481e328a770cdb0ccf6c46))
|
|
31
|
+
* remove console.log ([3b3aaef](https://github.com/nusr/excel/commit/3b3aaefb45d6a0d18978d022af5ccb1f6f4134e7))
|
|
32
|
+
* setCurrentSheetId ([3e3d9e7](https://github.com/nusr/excel/commit/3e3d9e73694fe24abf37d7be93693d72cf3b4daf))
|
|
33
|
+
* supabase ([41902b2](https://github.com/nusr/excel/commit/41902b23f80b8d5142061f5948e32fdba546d8e4))
|
|
34
|
+
* update README.md ([d0c6ccc](https://github.com/nusr/excel/commit/d0c6cccca04de164cea8ebceb71c222d8c1a1517))
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Steve Xu
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Steve Xu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,92 +1,122 @@
|
|
|
1
|
-
# Online Collaboration Excel
|
|
2
|
-
|
|
3
|
-
[](https://github.com/nusr/excel/actions/workflows/main.yml)
|
|
4
|
-
[](https://codecov.io/gh/nusr/excel)
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
[online demo](https://nusr.github.io/excel/)
|
|
9
|
-
|
|
10
|
-

|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
npm i --save excel-collab
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Examples
|
|
19
|
-
|
|
20
|
-
[Simple Example](https://
|
|
21
|
-
|
|
22
|
-
[Custom Example](https://
|
|
23
|
-
|
|
24
|
-
[Collaboration Example](https://
|
|
25
|
-
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- [x]
|
|
72
|
-
- [x]
|
|
73
|
-
- [x]
|
|
74
|
-
- [x]
|
|
75
|
-
- [x]
|
|
76
|
-
- [x]
|
|
77
|
-
- [x]
|
|
78
|
-
- [x]
|
|
79
|
-
- [x]
|
|
80
|
-
- [x]
|
|
81
|
-
- [x]
|
|
82
|
-
- [x]
|
|
83
|
-
- [x]
|
|
84
|
-
- [x]
|
|
85
|
-
- [x]
|
|
86
|
-
- [x]
|
|
87
|
-
- [x]
|
|
88
|
-
- [x]
|
|
89
|
-
|
|
1
|
+
# Online Collaboration Excel
|
|
2
|
+
|
|
3
|
+
[](https://github.com/nusr/excel/actions/workflows/main.yml)
|
|
4
|
+
[](https://codecov.io/gh/nusr/excel)
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
[online demo](https://nusr.github.io/excel/)
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
npm i --save excel-collab
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
[Simple Example](https://stackblitz.com/edit/nusr-excel-simple)
|
|
21
|
+
|
|
22
|
+
[Custom Example](https://stackblitz.com/edit/nusr-excel-custom)
|
|
23
|
+
|
|
24
|
+
[Collaboration Example](https://stackblitz.com/edit/nusr-excel-collaboration)
|
|
25
|
+
|
|
26
|
+
## Developing
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/nusr/excel.git
|
|
30
|
+
cd excel
|
|
31
|
+
|
|
32
|
+
npm i -g pnpm
|
|
33
|
+
pnpm i
|
|
34
|
+
npm run start
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Environment
|
|
38
|
+
|
|
39
|
+
Create an `.env` file and modify it as the `.env.example` file
|
|
40
|
+
|
|
41
|
+
| Key | Required | Description |
|
|
42
|
+
| ---------------------- | -------- | ------------------ |
|
|
43
|
+
| VITE_SUPABASE_URL | optional | Supbase url |
|
|
44
|
+
| VITE_SUPABASE_ANON_KEY | optional | Supbase anon key |
|
|
45
|
+
| VITE_DEFAULT_EXCEL_ID | optional | default excel uuid |
|
|
46
|
+
|
|
47
|
+
## Supbase
|
|
48
|
+
|
|
49
|
+
Collaborative editing uses [Supabase](https://supabase.com/) as backend.
|
|
50
|
+
You need to configure `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY`.
|
|
51
|
+
With Row Level Security (RLS) disabled, anonymous users will be able to read/write data in the table.
|
|
52
|
+
|
|
53
|
+
```sql
|
|
54
|
+
CREATE TABLE IF NOT EXISTS history (
|
|
55
|
+
id SERIAL PRIMARY KEY,
|
|
56
|
+
doc_id UUID,
|
|
57
|
+
update TEXT,
|
|
58
|
+
create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
-- document table need to enable real time
|
|
62
|
+
CREATE TABLE IF NOT EXISTS document (
|
|
63
|
+
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
|
|
64
|
+
name VARCHAR(20),
|
|
65
|
+
create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Supported Features
|
|
70
|
+
|
|
71
|
+
- [x] Online Collaboration
|
|
72
|
+
- [x] Create File
|
|
73
|
+
- [x] Change File Name
|
|
74
|
+
- [x] Web Worker parse formulas
|
|
75
|
+
- [x] OffScreenCanvas Render
|
|
76
|
+
- [x] Undo
|
|
77
|
+
- [x] Redo
|
|
78
|
+
- [x] Copy
|
|
79
|
+
- [x] Cut
|
|
80
|
+
- [x] Paste
|
|
81
|
+
- [x] Formulas
|
|
82
|
+
- [x] Font Family
|
|
83
|
+
- [x] Font Size
|
|
84
|
+
- [x] Font Color
|
|
85
|
+
- [x] Fill Color
|
|
86
|
+
- [x] Bold
|
|
87
|
+
- [x] Italic
|
|
88
|
+
- [x] Strike
|
|
89
|
+
- [x] Underline
|
|
90
|
+
- [x] Border
|
|
91
|
+
- [x] Text Vertical Align
|
|
92
|
+
- [x] Text Horizontal Align
|
|
93
|
+
- [x] Text Wrapping
|
|
94
|
+
- [x] Number Format
|
|
95
|
+
- [x] AutoFilter
|
|
96
|
+
- [x] Merge Cells
|
|
97
|
+
- [x] Chart
|
|
98
|
+
- [x] Floating Picture
|
|
99
|
+
- [x] Define Name
|
|
100
|
+
- [x] Insert Row
|
|
101
|
+
- [x] Insert Column
|
|
102
|
+
- [x] Delete Row
|
|
103
|
+
- [x] Delete Column
|
|
104
|
+
- [x] Hide Row
|
|
105
|
+
- [x] Hide Column
|
|
106
|
+
- [x] Row Height
|
|
107
|
+
- [x] Column Width
|
|
108
|
+
- [x] Insert Sheet
|
|
109
|
+
- [x] Delete Sheet
|
|
110
|
+
- [x] Rename Sheet
|
|
111
|
+
- [x] Hide Sheet
|
|
112
|
+
- [x] Unhide Sheet
|
|
113
|
+
- [x] Import XLSX
|
|
114
|
+
- [x] Export XLSX
|
|
115
|
+
- [x] Import CSV
|
|
116
|
+
- [x] Export CSV
|
|
117
|
+
- [x] Dark Mode
|
|
118
|
+
- [x] I18N
|
|
119
|
+
|
|
90
120
|
## Supported Formulas
|
|
91
121
|
|
|
92
122
|
### Math
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var go = Object.defineProperty;
|
|
2
2
|
var po = (i, t, e) => t in i ? go(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var k = (i, t, e) => po(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { j as bt } from "./index-
|
|
4
|
+
import { j as bt } from "./index-DCjSDDwD.mjs";
|
|
5
5
|
import { memo as _n, useRef as qi, useEffect as Gi } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { g as Zi, p as mo, C as Ji, d as Qi } from "./worker-COTVtn10.mjs";
|
|
7
7
|
/*!
|
|
8
8
|
* @kurkle/color v0.3.4
|
|
9
9
|
* https://github.com/kurkle/color#readme
|
|
@@ -8626,7 +8626,7 @@ class xn extends Ze {
|
|
|
8626
8626
|
}
|
|
8627
8627
|
}
|
|
8628
8628
|
k(xn, "id", "timeseries"), k(xn, "defaults", Ze.defaults);
|
|
8629
|
-
const oh = "
|
|
8629
|
+
const oh = "_chart_j1hte_1", rh = {
|
|
8630
8630
|
chart: oh
|
|
8631
8631
|
};
|
|
8632
8632
|
ii.register(
|
|
@@ -8788,4 +8788,4 @@ mh.displayName = "Chart";
|
|
|
8788
8788
|
export {
|
|
8789
8789
|
mh as default
|
|
8790
8790
|
};
|
|
8791
|
-
//# sourceMappingURL=Chart-
|
|
8791
|
+
//# sourceMappingURL=Chart-B4zRuRrj.mjs.map
|