vxe-table 4.23.7 → 4.23.9

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 (148) hide show
  1. package/dist/all.esm.js +5859 -4018
  2. package/es/colgroup/index.js +1 -1
  3. package/es/column/index.js +1 -1
  4. package/es/components.d.ts +3 -0
  5. package/es/components.js +4 -8
  6. package/es/grid/index.js +1 -1
  7. package/es/grid/src/emits.js +1 -15
  8. package/es/grid/src/grid.js +398 -121
  9. package/es/grid/src/props.js +1 -1
  10. package/es/index.esm.js +6 -0
  11. package/es/index.js +6 -0
  12. package/es/table/index.js +1 -1
  13. package/es/table/module/custom/hook.js +50 -43
  14. package/es/table/module/custom/panel.js +778 -528
  15. package/es/table/module/edit/hook.js +141 -63
  16. package/es/table/module/export/export-panel.js +400 -317
  17. package/es/table/module/export/hook.js +396 -338
  18. package/es/table/module/export/import-panel.js +153 -124
  19. package/es/table/module/filter/hook.js +17 -3
  20. package/es/table/module/filter/panel.js +147 -85
  21. package/es/table/module/keyboard/hook.js +9 -5
  22. package/es/table/module/menu/hook.js +1 -1
  23. package/es/table/module/menu/panel.js +198 -127
  24. package/es/table/module/validator/hook.js +1 -1
  25. package/es/table/render/index.js +152 -99
  26. package/es/table/src/body.js +356 -234
  27. package/es/table/src/cell.js +427 -270
  28. package/es/table/src/columnInfo.js +2 -1
  29. package/es/table/src/footer.js +145 -100
  30. package/es/table/src/group.js +7 -3
  31. package/es/table/src/header.js +230 -173
  32. package/es/table/src/props.js +1 -1
  33. package/es/table/src/table.js +1504 -1031
  34. package/es/table/src/util.js +15 -19
  35. package/es/toolbar/index.js +1 -1
  36. package/es/toolbar/src/toolbar.js +133 -76
  37. package/es/ui/index.d.ts +0 -1
  38. package/es/ui/index.js +1 -2
  39. package/es/ui/src/dom.js +9 -6
  40. package/es/ui/src/log.js +1 -1
  41. package/es/ui/src/utils.d.ts +1 -1
  42. package/es/v-x-e-table/index.d.ts +0 -1
  43. package/es/v-x-e-table/index.js +0 -1
  44. package/lib/colgroup/index.js +5 -5
  45. package/lib/column/index.js +5 -5
  46. package/lib/components.js +8 -12
  47. package/lib/grid/index.js +4 -4
  48. package/lib/grid/src/emits.js +1 -15
  49. package/lib/grid/src/grid.js +419 -142
  50. package/lib/grid/src/props.js +2 -2
  51. package/lib/index.common.js +6 -0
  52. package/lib/index.js +6 -0
  53. package/lib/index.umd.js +5825 -3945
  54. package/lib/index.umd.min.js +3 -3
  55. package/lib/table/index.js +5 -5
  56. package/lib/table/module/custom/hook.js +51 -44
  57. package/lib/table/module/custom/panel.js +790 -540
  58. package/lib/table/module/edit/hook.js +142 -64
  59. package/lib/table/module/export/export-panel.js +406 -323
  60. package/lib/table/module/export/hook.js +419 -361
  61. package/lib/table/module/export/import-panel.js +157 -128
  62. package/lib/table/module/filter/hook.js +18 -4
  63. package/lib/table/module/filter/panel.js +149 -87
  64. package/lib/table/module/keyboard/hook.js +10 -6
  65. package/lib/table/module/menu/hook.js +2 -2
  66. package/lib/table/module/menu/panel.js +199 -128
  67. package/lib/table/module/validator/hook.js +2 -2
  68. package/lib/table/render/index.js +153 -100
  69. package/lib/table/src/body.js +357 -235
  70. package/lib/table/src/cell.js +428 -271
  71. package/lib/table/src/columnInfo.js +3 -2
  72. package/lib/table/src/footer.js +146 -101
  73. package/lib/table/src/group.js +7 -3
  74. package/lib/table/src/header.js +231 -174
  75. package/lib/table/src/props.js +2 -2
  76. package/lib/table/src/table.js +1487 -1045
  77. package/lib/table/src/util.js +15 -19
  78. package/lib/toolbar/index.js +4 -4
  79. package/lib/toolbar/src/toolbar.js +135 -78
  80. package/lib/ui/index.js +1 -3
  81. package/lib/ui/src/dom.js +9 -6
  82. package/lib/ui/src/log.js +1 -1
  83. package/lib/v-x-e-table/index.js +0 -2
  84. package/package.json +8 -3
  85. package/packages/colgroup/index.ts +22 -22
  86. package/packages/column/index.ts +22 -22
  87. package/packages/components.ts +41 -43
  88. package/packages/grid/index.ts +18 -18
  89. package/packages/grid/src/emits.ts +5 -19
  90. package/packages/grid/src/grid.ts +2229 -1925
  91. package/packages/grid/src/props.ts +22 -23
  92. package/packages/index.ts +11 -4
  93. package/packages/locale/lang/fr-FR.ts +15 -15
  94. package/packages/locale/lang/it-IT.ts +4 -4
  95. package/packages/locale/lang/uk-UA.ts +1 -1
  96. package/packages/locale/lang/uz-UZ.ts +13 -13
  97. package/packages/locale/lang/zh-CN.ts +907 -907
  98. package/packages/table/index.ts +26 -26
  99. package/packages/table/module/custom/hook.ts +510 -503
  100. package/packages/table/module/custom/panel.ts +2002 -1743
  101. package/packages/table/module/edit/hook.ts +1224 -1131
  102. package/packages/table/module/export/export-panel.ts +697 -611
  103. package/packages/table/module/export/hook.ts +2160 -2059
  104. package/packages/table/module/export/import-panel.ts +319 -279
  105. package/packages/table/module/export/util.ts +25 -24
  106. package/packages/table/module/filter/hook.ts +519 -501
  107. package/packages/table/module/filter/panel.ts +368 -304
  108. package/packages/table/module/keyboard/hook.ts +498 -494
  109. package/packages/table/module/menu/hook.ts +330 -330
  110. package/packages/table/module/menu/panel.ts +272 -201
  111. package/packages/table/module/validator/hook.ts +653 -635
  112. package/packages/table/render/index.ts +1819 -1744
  113. package/packages/table/src/body.ts +1078 -955
  114. package/packages/table/src/cell.ts +1524 -1359
  115. package/packages/table/src/column.ts +192 -192
  116. package/packages/table/src/columnInfo.ts +232 -232
  117. package/packages/table/src/emits.ts +134 -134
  118. package/packages/table/src/footer.ts +425 -380
  119. package/packages/table/src/group.ts +67 -63
  120. package/packages/table/src/header.ts +642 -581
  121. package/packages/table/src/props.ts +336 -336
  122. package/packages/table/src/store.ts +14 -14
  123. package/packages/table/src/table.ts +16011 -15454
  124. package/packages/table/src/use/cell-view.ts +41 -44
  125. package/packages/table/src/use/index.ts +1 -1
  126. package/packages/table/src/util.ts +1206 -1216
  127. package/packages/toolbar/index.ts +18 -18
  128. package/packages/toolbar/src/toolbar.ts +768 -706
  129. package/packages/ui/index.ts +519 -521
  130. package/packages/ui/src/anime.ts +51 -52
  131. package/packages/ui/src/comp.ts +3 -3
  132. package/packages/ui/src/dom.ts +466 -463
  133. package/packages/ui/src/log.ts +19 -19
  134. package/packages/ui/src/utils.ts +66 -66
  135. package/packages/ui/src/vn.ts +55 -55
  136. package/packages/v-x-e-table/index.d.ts +3 -4
  137. package/packages/v-x-e-table/index.ts +3 -4
  138. package/types/all.d.ts +76 -76
  139. package/types/index.d.ts +4 -4
  140. /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  141. /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  142. /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
  143. /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  144. /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  145. /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
  146. /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  147. /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  148. /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { h, Teleport, inject, ref } from "vue";
2
2
  import { defineVxeComponent } from "../../../ui/src/comp";
3
3
  import XEUtils from "xe-utils";
4
- import { VxeUI } from "../../../ui";
4
+ import { VxeUI } from "@vxe-ui/core";
5
5
  import { getFuncText } from "../../../ui/src/utils";
6
6
  import { getSlotVNs } from "../../../ui/src/vn";
7
7
  const { getIcon, getI18n, renderEmptyElement } = VxeUI;
@@ -27,135 +27,206 @@ var panel_default = defineVxeComponent({
27
27
  const menuOpts = computeMenuOpts.value;
28
28
  const { transfer, destroyOnClose, className } = menuOpts;
29
29
  const { visible, list } = ctxMenuStore;
30
- return h(Teleport, {
31
- to: "body",
32
- disabled: !transfer
33
- }, [
34
- h("div", {
35
- ref: refElem,
36
- class: ["vxe-table--context-menu-wrapper", className, {
37
- "is--visible": visible
38
- }],
39
- style: ctxMenuStore.style
40
- }, (destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
41
- return options.every((item) => item.visible === false) ? renderEmptyElement($xeTable) : h("ul", {
42
- class: "vxe-table--context-menu-group-wrapper",
43
- key: gIndex
44
- }, options.map((item, index) => {
45
- const { children, loading } = item;
46
- const hasChildMenus = children && children.some((child) => child.visible !== false);
47
- const prefixOpts = Object.assign({}, item.prefixConfig);
48
- const prefixIcon = prefixOpts.icon || item.prefixIcon;
49
- const suffixOpts = Object.assign({}, item.suffixConfig);
50
- const suffixIcon = suffixOpts.icon || item.suffixIcon;
51
- const menuContent = getFuncText(item.name);
52
- return item.visible === false ? renderEmptyElement($xeTable) : h("li", {
53
- class: ["vxe-table--context-menu--option", item.className, {
54
- "link--loading": loading,
55
- "link--disabled": item.disabled,
56
- "link--active": item === ctxMenuStore.selected
57
- }],
58
- key: `${gIndex}_${index}`
59
- }, [
60
- h("a", {
61
- class: "vxe-context-menu--link",
62
- onClick(evnt) {
63
- $xeTable.ctxMenuLinkEvent(evnt, item);
64
- },
65
- onMouseover(evnt) {
66
- $xeTable.ctxMenuMouseoverEvent(evnt, item);
67
- },
68
- onMouseout(evnt) {
69
- $xeTable.ctxMenuMouseoutEvent(evnt, item);
30
+ return h(
31
+ Teleport,
32
+ {
33
+ to: "body",
34
+ disabled: !transfer
35
+ },
36
+ [
37
+ h(
38
+ "div",
39
+ {
40
+ ref: refElem,
41
+ class: [
42
+ "vxe-table--context-menu-wrapper",
43
+ className,
44
+ {
45
+ "is--visible": visible
70
46
  }
71
- }, [
72
- h("div", {
73
- class: ["vxe-context-menu--link-prefix", prefixOpts.className || ""]
74
- }, [
75
- loading ? h("span", {
76
- class: getIcon("TABLE_MENU_OPTION_LOADING")
77
- }) : prefixIcon && XEUtils.isFunction(prefixIcon) ? h("span", {}, getSlotVNs(prefixIcon({}))) : h("span", {}, [
78
- h("i", {
79
- class: prefixIcon
80
- })
81
- ]),
82
- prefixOpts.content ? h("span", {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
83
- ]),
84
- h("div", {
85
- class: "vxe-context-menu--link-content",
86
- title: menuContent
87
- }, loading ? getI18n("vxe.table.menuLoading") : menuContent),
88
- h("div", {
89
- class: ["vxe-context-menu--link-suffix", suffixOpts.className || ""]
90
- }, [
91
- suffixIcon && XEUtils.isFunction(suffixIcon) ? h("span", {}, getSlotVNs(suffixIcon({}))) : h("i", {
92
- class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : "")
93
- }),
94
- suffixOpts.content ? h("span", `${suffixOpts.content}`) : renderEmptyElement($xeTable)
95
- ])
96
- ]),
97
- hasChildMenus && children ? h("ul", {
98
- class: ["vxe-table--context-menu-clild-wrapper", {
99
- "is--show": item === ctxMenuStore.selected && ctxMenuStore.showChild
100
- }]
101
- }, children.map((child, cIndex) => {
102
- const { loading: childLoading } = child;
103
- const childPrefixOpts = Object.assign({}, child.prefixConfig);
104
- const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
105
- const childSuffixOpts = Object.assign({}, child.suffixConfig);
106
- const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
107
- const childMenuContent = getFuncText(child.name);
108
- return child.visible === false ? null : h("li", {
109
- class: ["vxe-table--context-menu--option", child.className, {
110
- "link--loading": childLoading,
111
- "link--disabled": child.disabled,
112
- "link--active": child === ctxMenuStore.selectChild
113
- }],
114
- key: `${gIndex}_${index}_${cIndex}`
115
- }, [
116
- h("a", {
117
- class: "vxe-context-menu--link",
118
- onClick(evnt) {
119
- $xeTable.ctxMenuLinkEvent(evnt, child);
120
- },
121
- onMouseover(evnt) {
122
- $xeTable.ctxMenuMouseoverEvent(evnt, item, child);
47
+ ],
48
+ style: ctxMenuStore.style
49
+ },
50
+ (destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
51
+ return options.every((item) => item.visible === false) ? renderEmptyElement($xeTable) : h(
52
+ "ul",
53
+ {
54
+ class: "vxe-table--context-menu-group-wrapper",
55
+ key: gIndex
56
+ },
57
+ options.map((item, index) => {
58
+ const { children, loading } = item;
59
+ const hasChildMenus = children && children.some((child) => child.visible !== false);
60
+ const prefixOpts = Object.assign({}, item.prefixConfig);
61
+ const prefixIcon = prefixOpts.icon || item.prefixIcon;
62
+ const suffixOpts = Object.assign({}, item.suffixConfig);
63
+ const suffixIcon = suffixOpts.icon || item.suffixIcon;
64
+ const menuContent = getFuncText(item.name);
65
+ return item.visible === false ? renderEmptyElement($xeTable) : h(
66
+ "li",
67
+ {
68
+ class: [
69
+ "vxe-table--context-menu--option",
70
+ item.className,
71
+ {
72
+ "link--loading": loading,
73
+ "link--disabled": item.disabled,
74
+ "link--active": item === ctxMenuStore.selected
75
+ }
76
+ ],
77
+ key: `${gIndex}_${index}`
123
78
  },
124
- onMouseout(evnt) {
125
- $xeTable.ctxMenuMouseoutEvent(evnt, item);
126
- }
127
- }, [
128
- h("div", {
129
- class: ["vxe-context-menu--link-prefix", childPrefixOpts.className || ""]
130
- }, [
131
- child.loading ? h("span", {
132
- class: getIcon("TABLE_MENU_OPTION_LOADING")
133
- }) : childPrefixIcon && XEUtils.isFunction(childPrefixIcon) ? h("span", {}, getSlotVNs(childPrefixIcon({}))) : h("span", {}, [
134
- h("i", {
135
- class: childPrefixIcon
79
+ [
80
+ h(
81
+ "a",
82
+ {
83
+ class: "vxe-context-menu--link",
84
+ onClick(evnt) {
85
+ $xeTable.ctxMenuLinkEvent(evnt, item);
86
+ },
87
+ onMouseover(evnt) {
88
+ $xeTable.ctxMenuMouseoverEvent(evnt, item);
89
+ },
90
+ onMouseout(evnt) {
91
+ $xeTable.ctxMenuMouseoutEvent(evnt, item);
92
+ }
93
+ },
94
+ [
95
+ h(
96
+ "div",
97
+ {
98
+ class: ["vxe-context-menu--link-prefix", prefixOpts.className || ""]
99
+ },
100
+ [
101
+ loading ? h("span", {
102
+ class: getIcon("TABLE_MENU_OPTION_LOADING")
103
+ }) : prefixIcon && XEUtils.isFunction(prefixIcon) ? h("span", {}, getSlotVNs(prefixIcon({}))) : h("span", {}, [
104
+ h("i", {
105
+ class: prefixIcon
106
+ })
107
+ ]),
108
+ prefixOpts.content ? h("span", {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
109
+ ]
110
+ ),
111
+ h(
112
+ "div",
113
+ {
114
+ class: "vxe-context-menu--link-content",
115
+ title: menuContent
116
+ },
117
+ loading ? getI18n("vxe.table.menuLoading") : menuContent
118
+ ),
119
+ h(
120
+ "div",
121
+ {
122
+ class: ["vxe-context-menu--link-suffix", suffixOpts.className || ""]
123
+ },
124
+ [
125
+ suffixIcon && XEUtils.isFunction(suffixIcon) ? h("span", {}, getSlotVNs(suffixIcon({}))) : h("i", {
126
+ class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : "")
127
+ }),
128
+ suffixOpts.content ? h("span", `${suffixOpts.content}`) : renderEmptyElement($xeTable)
129
+ ]
130
+ )
131
+ ]
132
+ ),
133
+ hasChildMenus && children ? h(
134
+ "ul",
135
+ {
136
+ class: [
137
+ "vxe-table--context-menu-clild-wrapper",
138
+ {
139
+ "is--show": item === ctxMenuStore.selected && ctxMenuStore.showChild
140
+ }
141
+ ]
142
+ },
143
+ children.map((child, cIndex) => {
144
+ const { loading: childLoading } = child;
145
+ const childPrefixOpts = Object.assign({}, child.prefixConfig);
146
+ const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
147
+ const childSuffixOpts = Object.assign({}, child.suffixConfig);
148
+ const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
149
+ const childMenuContent = getFuncText(child.name);
150
+ return child.visible === false ? null : h(
151
+ "li",
152
+ {
153
+ class: [
154
+ "vxe-table--context-menu--option",
155
+ child.className,
156
+ {
157
+ "link--loading": childLoading,
158
+ "link--disabled": child.disabled,
159
+ "link--active": child === ctxMenuStore.selectChild
160
+ }
161
+ ],
162
+ key: `${gIndex}_${index}_${cIndex}`
163
+ },
164
+ [
165
+ h(
166
+ "a",
167
+ {
168
+ class: "vxe-context-menu--link",
169
+ onClick(evnt) {
170
+ $xeTable.ctxMenuLinkEvent(evnt, child);
171
+ },
172
+ onMouseover(evnt) {
173
+ $xeTable.ctxMenuMouseoverEvent(evnt, item, child);
174
+ },
175
+ onMouseout(evnt) {
176
+ $xeTable.ctxMenuMouseoutEvent(evnt, item);
177
+ }
178
+ },
179
+ [
180
+ h(
181
+ "div",
182
+ {
183
+ class: ["vxe-context-menu--link-prefix", childPrefixOpts.className || ""]
184
+ },
185
+ [
186
+ child.loading ? h("span", {
187
+ class: getIcon("TABLE_MENU_OPTION_LOADING")
188
+ }) : childPrefixIcon && XEUtils.isFunction(childPrefixIcon) ? h("span", {}, getSlotVNs(childPrefixIcon({}))) : h("span", {}, [
189
+ h("i", {
190
+ class: childPrefixIcon
191
+ })
192
+ ]),
193
+ childPrefixOpts.content ? h("span", `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
194
+ ]
195
+ ),
196
+ h(
197
+ "div",
198
+ {
199
+ class: "vxe-context-menu--link-content",
200
+ title: childMenuContent
201
+ },
202
+ childLoading ? getI18n("vxe.table.menuLoading") : childMenuContent
203
+ ),
204
+ h(
205
+ "div",
206
+ {
207
+ class: ["vxe-context-menu--link-suffix", childSuffixOpts.className || ""]
208
+ },
209
+ [
210
+ childSuffixIcon && XEUtils.isFunction(childSuffixIcon) ? h("span", {}, getSlotVNs(childSuffixIcon({}))) : h("i", {
211
+ class: childSuffixIcon
212
+ }),
213
+ childSuffixOpts.content ? h("span", `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
214
+ ]
215
+ )
216
+ ]
217
+ )
218
+ ]
219
+ );
136
220
  })
137
- ]),
138
- childPrefixOpts.content ? h("span", `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
139
- ]),
140
- h("div", {
141
- class: "vxe-context-menu--link-content",
142
- title: childMenuContent
143
- }, childLoading ? getI18n("vxe.table.menuLoading") : childMenuContent),
144
- h("div", {
145
- class: ["vxe-context-menu--link-suffix", childSuffixOpts.className || ""]
146
- }, [
147
- childSuffixIcon && XEUtils.isFunction(childSuffixIcon) ? h("span", {}, getSlotVNs(childSuffixIcon({}))) : h("i", {
148
- class: childSuffixIcon
149
- }),
150
- childSuffixOpts.content ? h("span", `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
151
- ])
152
- ])
153
- ]);
154
- })) : null
155
- ]);
156
- }));
157
- }) : [])
158
- ]);
221
+ ) : null
222
+ ]
223
+ );
224
+ })
225
+ );
226
+ }) : []
227
+ )
228
+ ]
229
+ );
159
230
  };
160
231
  $xeMenuPanel.renderVN = renderVN;
161
232
  return $xeMenuPanel;
@@ -1,6 +1,6 @@
1
1
  import { nextTick } from "vue";
2
2
  import XEUtils from "xe-utils";
3
- import { VxeUI } from "../../../ui";
3
+ import { VxeUI } from "@vxe-ui/core";
4
4
  import { eqEmptyValue, getFuncText } from "../../../ui/src/utils";
5
5
  import { scrollToView } from "../../../ui/src/dom";
6
6
  import { handleFieldOrColumn, getRowid } from "../../src/util";