@antv/s2-vue 1.0.0

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.
Files changed (79) hide show
  1. package/README.md +389 -0
  2. package/dist/index.min.js +2 -0
  3. package/dist/index.min.js.map +1 -0
  4. package/dist/style.min.css +1 -0
  5. package/esm/common/constant/index.d.ts +3 -0
  6. package/esm/common/constant/index.d.ts.map +1 -0
  7. package/esm/common/constant/options.d.ts +3 -0
  8. package/esm/common/constant/options.d.ts.map +1 -0
  9. package/esm/common/constant/sort.d.ts +15 -0
  10. package/esm/common/constant/sort.d.ts.map +1 -0
  11. package/esm/components/index.d.ts +5 -0
  12. package/esm/components/index.d.ts.map +1 -0
  13. package/esm/components/pagination/index.vue.d.ts +43 -0
  14. package/esm/components/pagination/index.vue.d.ts.map +1 -0
  15. package/esm/components/sheets/base-sheet.vue.d.ts +287 -0
  16. package/esm/components/sheets/base-sheet.vue.d.ts.map +1 -0
  17. package/esm/components/sheets/index.vue.d.ts +432 -0
  18. package/esm/components/sheets/index.vue.d.ts.map +1 -0
  19. package/esm/components/sheets/pivot-sheet.vue.d.ts +217 -0
  20. package/esm/components/sheets/pivot-sheet.vue.d.ts.map +1 -0
  21. package/esm/components/sheets/table-sheet.vue.d.ts +217 -0
  22. package/esm/components/sheets/table-sheet.vue.d.ts.map +1 -0
  23. package/esm/components/tooltip/components/detail.vue.d.ts +7 -0
  24. package/esm/components/tooltip/components/detail.vue.d.ts.map +1 -0
  25. package/esm/components/tooltip/components/head-info.vue.d.ts +7 -0
  26. package/esm/components/tooltip/components/head-info.vue.d.ts.map +1 -0
  27. package/esm/components/tooltip/components/infos.vue.d.ts +7 -0
  28. package/esm/components/tooltip/components/infos.vue.d.ts.map +1 -0
  29. package/esm/components/tooltip/components/operator/index.d.ts +4 -0
  30. package/esm/components/tooltip/components/operator/index.d.ts.map +1 -0
  31. package/esm/components/tooltip/components/operator/index.vue.d.ts +11 -0
  32. package/esm/components/tooltip/components/operator/index.vue.d.ts.map +1 -0
  33. package/esm/components/tooltip/components/operator/menu.vue.d.ts +12 -0
  34. package/esm/components/tooltip/components/operator/menu.vue.d.ts.map +1 -0
  35. package/esm/components/tooltip/components/operator/title.vue.d.ts +11 -0
  36. package/esm/components/tooltip/components/operator/title.vue.d.ts.map +1 -0
  37. package/esm/components/tooltip/components/simple-tips.vue.d.ts +7 -0
  38. package/esm/components/tooltip/components/simple-tips.vue.d.ts.map +1 -0
  39. package/esm/components/tooltip/components/summary.vue.d.ts +9 -0
  40. package/esm/components/tooltip/components/summary.vue.d.ts.map +1 -0
  41. package/esm/components/tooltip/custom-tooltip.d.ts +7 -0
  42. package/esm/components/tooltip/custom-tooltip.d.ts.map +1 -0
  43. package/esm/components/tooltip/index.vue.d.ts +8 -0
  44. package/esm/components/tooltip/index.vue.d.ts.map +1 -0
  45. package/esm/components/tooltip/interface.d.ts +9 -0
  46. package/esm/components/tooltip/interface.d.ts.map +1 -0
  47. package/esm/hooks/useEvents.d.ts +5 -0
  48. package/esm/hooks/useEvents.d.ts.map +1 -0
  49. package/esm/hooks/useExpose.d.ts +6 -0
  50. package/esm/hooks/useExpose.d.ts.map +1 -0
  51. package/esm/hooks/useLoading.d.ts +7 -0
  52. package/esm/hooks/useLoading.d.ts.map +1 -0
  53. package/esm/hooks/usePagination.d.ts +14 -0
  54. package/esm/hooks/usePagination.d.ts.map +1 -0
  55. package/esm/hooks/useResize.d.ts +8 -0
  56. package/esm/hooks/useResize.d.ts.map +1 -0
  57. package/esm/hooks/useSheetUpdate.d.ts +5 -0
  58. package/esm/hooks/useSheetUpdate.d.ts.map +1 -0
  59. package/esm/hooks/useSpreadSheet.d.ts +19 -0
  60. package/esm/hooks/useSpreadSheet.d.ts.map +1 -0
  61. package/esm/index.d.ts +4 -0
  62. package/esm/index.d.ts.map +1 -0
  63. package/esm/index.js +2379 -0
  64. package/esm/index.js.map +1 -0
  65. package/esm/interface.d.ts +36 -0
  66. package/esm/interface.d.ts.map +1 -0
  67. package/esm/style.css +208 -0
  68. package/esm/utils/extendLocale.d.ts +2 -0
  69. package/esm/utils/extendLocale.d.ts.map +1 -0
  70. package/esm/utils/initPropAndEmits.d.ts +137 -0
  71. package/esm/utils/initPropAndEmits.d.ts.map +1 -0
  72. package/esm/utils/options.d.ts +3 -0
  73. package/esm/utils/options.d.ts.map +1 -0
  74. package/esm/utils/traverse.d.ts +2 -0
  75. package/esm/utils/traverse.d.ts.map +1 -0
  76. package/lib/index.js +2385 -0
  77. package/lib/index.js.map +1 -0
  78. package/lib/style.css +208 -0
  79. package/package.json +88 -0
package/lib/style.css ADDED
@@ -0,0 +1,208 @@
1
+ .antv-s2-tooltip-operator {
2
+ color: rgba(0, 0, 0, 0.65);
3
+ font-size: 12px;
4
+ line-height: 32px;
5
+ background: #f9f9f9;
6
+ padding: 0 12px;
7
+ border: 0;
8
+ cursor: pointer;
9
+ }
10
+ .antv-s2-tooltip-operator .ant-dropdown-trigger,
11
+ .antv-s2-tooltip-operator-dropdown {
12
+ padding: 0 6px 0 0;
13
+ }
14
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu {
15
+ font-size: 12px;
16
+ line-height: 32px;
17
+ color: rgba(0, 0, 0, 0.65);
18
+ border: 0;
19
+ margin: 0 -12px;
20
+ }
21
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item {
22
+ height: 30px;
23
+ }
24
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item:not(:last-child) {
25
+ margin: 0;
26
+ }
27
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu > .ant-menu-submenu-title {
28
+ height: 30px;
29
+ }
30
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu > .ant-menu-submenu-title .ant-menu-submenu-arrow {
31
+ color: rgba(0, 0, 0, 0.65);
32
+ }
33
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-item,
34
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-item,
35
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-item,
36
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-item {
37
+ font-size: 12px;
38
+ line-height: 32px;
39
+ padding: 0 12px;
40
+ color: rgba(0, 0, 0, 0.65);
41
+ border: 0;
42
+ margin: 0;
43
+ }
44
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,
45
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,
46
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,
47
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,
48
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,
49
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,
50
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title,
51
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title {
52
+ padding: 0 12px;
53
+ font-size: 12px;
54
+ line-height: 32px;
55
+ color: rgba(0, 0, 0, 0.65);
56
+ margin: 0;
57
+ }
58
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
59
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
60
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,
61
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,
62
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
63
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
64
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,
65
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,
66
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,
67
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,
68
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,
69
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,
70
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,
71
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,
72
+ .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,
73
+ .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content {
74
+ margin-right: 12px;
75
+ }
76
+ .antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item,
77
+ .antv-s2-tooltip-operator-submenu-popup .ant-menu-item {
78
+ font-size: 12px;
79
+ line-height: 32px;
80
+ padding: 0 12px;
81
+ color: rgba(0, 0, 0, 0.65);
82
+ }
83
+ .antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item {
84
+ margin: 0;
85
+ height: 30px;
86
+ line-height: 32px;
87
+ }
88
+ .antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item:not(:last-child) {
89
+ margin: 0;
90
+ }
91
+ .antv-s2-tooltip-operator-icon {
92
+ vertical-align: middle;
93
+ margin-right: 4px;
94
+ }
95
+ .antv-s2-tooltip-operator-icon svg {
96
+ width: 12px;
97
+ height: 12px;
98
+ }
99
+ .antv-s2-tooltip-container{background:hsla(0,0%,100%,.96);border-radius:2px;box-shadow:0 1px 4px 0 rgba(0,0,0,.2);display:inline-block;font-family:Roboto,PingFang SC,Chinese Quote,BlinkMacSystemFont,Segoe UI,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;max-width:640px;min-width:200px;position:fixed;z-index:1024}.antv-s2-tooltip-container-show{opacity:1;pointer-events:all;visibility:visible}.antv-s2-tooltip-container-hide{opacity:0;pointer-events:none;visibility:hidden}.antv-s2-tooltip-container-hide *{transition:none}.antv-s2-tooltip-tips,
100
+ .antv-s2-tooltip-name {
101
+ padding: 12px;
102
+ line-height: 16px;
103
+ overflow-wrap: break-word;
104
+ color: rgba(0, 0, 0, 0.85);
105
+ }.antv-s2-tooltip-tips {
106
+ padding: 4px 12px;
107
+ color: rgba(0, 0, 0, 0.45);
108
+ }.antv-s2-tooltip-infos {
109
+ padding: 4px 12px;
110
+ line-height: 20px;
111
+ color: rgba(0, 0, 0, 0.45);
112
+ overflow: hidden;
113
+ text-overflow: ellipsis;
114
+ -webkit-line-clamp: 2;
115
+ display: -webkit-box;
116
+ -webkit-box-orient: vertical;
117
+ overflow-wrap: break-word;
118
+ background: rgba(249, 249, 249, 0.96);
119
+ border-radius: 0 0 2px 2px;
120
+ background-color: #f9f9f9;
121
+ }.antv-s2-tooltip-summary {
122
+ line-height: 20px;
123
+ color: rgba(0, 0, 0, 0.65);
124
+ overflow: hidden;
125
+ padding: 12px;
126
+ }.antv-s2-tooltip-summary-item {
127
+ display: flex;
128
+ }.antv-s2-tooltip-summary-key {
129
+ margin-right: 20px;
130
+ }.antv-s2-tooltip-summary-val {
131
+ flex: 1;
132
+ text-align: right;
133
+ text-overflow: ellipsis;
134
+ white-space: nowrap;
135
+ overflow: hidden;
136
+ }.antv-s2-tooltip-interpretation {
137
+ color: rgba(0, 0, 0, 0.65);
138
+ overflow: hidden;
139
+ padding: 12px;
140
+ }.antv-s2-tooltip-interpretation + .antv-s2-tooltip-head-info-list {
141
+ border-top: 1px solid #e9e9e9;
142
+ }.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head {
143
+ margin-bottom: 12px;
144
+ }.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-icon {
145
+ width: 14px;
146
+ height: 14px;
147
+ }.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-name {
148
+ color: #000;
149
+ }.antv-s2-tooltip-head-info-list {
150
+ color: #a2a2a2;
151
+ padding: 12px 12px 4px;
152
+ line-height: 20px;
153
+ }.antv-s2-tooltip-bold,
154
+ .antv-s2-tooltip-selected {
155
+ font-weight: bold;
156
+ }.antv-s2-tooltip-selected {
157
+ margin-right: 5px;
158
+ }.antv-s2-tooltip-highlight {
159
+ color: rgba(0, 0, 0, 0.85);
160
+ }.antv-s2-tooltip-detail-list {
161
+ padding: 2px 12px 8px;
162
+ }.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item {
163
+ color: rgba(0, 0, 0, 0.65);
164
+ overflow: hidden;
165
+ margin: 4px 0;
166
+ display: flex;
167
+ justify-content: space-around;
168
+ align-items: center;
169
+ }.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-key {
170
+ margin-right: 20px;
171
+ }.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-val {
172
+ flex: 1;
173
+ text-align: right;
174
+ text-overflow: ellipsis;
175
+ white-space: nowrap;
176
+ overflow: hidden;
177
+ }.ant-dropdown-menu-item.operation-item {
178
+ font-size: 12px;
179
+ }
180
+ .antv-s2-spin.ant-spin-nested-loading,
181
+ .antv-s2-spin > .ant-spin-container {
182
+ height: 100%;
183
+ }
184
+ .antv-s2-wrapper {
185
+ padding: 0;
186
+ margin: 0;
187
+ display: flex;
188
+ flex-direction: column;
189
+ height: 100%;
190
+ }
191
+ .antv-s2-container {
192
+ overflow: auto;
193
+ flex: 1 1 auto;
194
+ }
195
+ .antv-s2-container canvas {
196
+ display: block;
197
+ }
198
+ .antv-s2-pagination {
199
+ display: flex;
200
+ align-items: center;
201
+ z-index: 1024;
202
+ }
203
+ .antv-s2-pagination-count {
204
+ margin-left: 12px;
205
+ text-overflow: ellipsis;
206
+ white-space: nowrap;
207
+ max-width: 64px;
208
+ }
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "private": false,
3
+ "name": "@antv/s2-vue",
4
+ "version": "1.0.0",
5
+ "main": "lib/index.js",
6
+ "module": "esm/index.js",
7
+ "unpkg": "dist/index.min.js",
8
+ "types": "esm/index.d.ts",
9
+ "description": "use S2 with vue",
10
+ "license": "MIT",
11
+ "homepage": "https://s2.antv.vision",
12
+ "author": "https://github.com/orgs/antvis/people",
13
+ "directories": {
14
+ "lib": "lib",
15
+ "test": "tests"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/antvis/S2.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/antvis/S2/issues"
23
+ },
24
+ "files": [
25
+ "esm",
26
+ "lib",
27
+ "dist",
28
+ "README.md"
29
+ ],
30
+ "keywords": [
31
+ "antv",
32
+ "s2",
33
+ "s2-vue",
34
+ "spreadsheet",
35
+ "pivot table",
36
+ "table"
37
+ ],
38
+ "scripts": {
39
+ "start": "cross-env PLAYGROUND=true vite",
40
+ "clean": "rimraf lib esm dist",
41
+ "build": "run-s clean build:esm build:cjs build:umd build:declaration",
42
+ "build:esm": "cross-env FORMAT=es vite build",
43
+ "build:cjs": "cross-env FORMAT=cjs vite build",
44
+ "build:umd": "cross-env FORMAT=umd vite build",
45
+ "build:analysis": "cross-env FORMAT=es ANALYSIS=true vite build",
46
+ "build:declaration": "vue-tsc -p tsconfig.declaration.json",
47
+ "bundle:size": "bundlesize",
48
+ "watch": "rimraf esm && concurrently \"yarn build:esm -w\" \"yarn build:declaration -w\"",
49
+ "test": "jest --passWithNoTests",
50
+ "test:coverage": "yarn test --coverage",
51
+ "test:ci": "yarn test --maxWorkers=3",
52
+ "test:ci-coverage": "yarn test:coverage --maxWorkers=3",
53
+ "test:watch": "yarn test --watch",
54
+ "tsc": "vue-tsc --noEmit",
55
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
56
+ },
57
+ "peerDependencies": {
58
+ "@antv/s2": ">=1.0.0",
59
+ "ant-design-vue": "^3.2.0",
60
+ "vue": ">=3.x"
61
+ },
62
+ "dependencies": {
63
+ "@vueuse/core": "^8.2.4",
64
+ "lodash": "^4.17.21"
65
+ },
66
+ "devDependencies": {
67
+ "@antv/s2": "*",
68
+ "@antv/s2-shared": "*",
69
+ "@testing-library/vue": "^6.5.1",
70
+ "@vue/tsconfig": "^0.1.3",
71
+ "ant-design-vue": "^3.2.0",
72
+ "vue": "^3.2.31",
73
+ "vue-tsc": "^0.34.11"
74
+ },
75
+ "bundlesize": [
76
+ {
77
+ "path": "./dist/index.min.js",
78
+ "maxSize": "650 kB"
79
+ },
80
+ {
81
+ "path": "./dist/style.min.css",
82
+ "maxSize": "205 kB"
83
+ }
84
+ ],
85
+ "publishConfig": {
86
+ "access": "public"
87
+ }
88
+ }