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
@@ -33,12 +33,12 @@ __export(import_panel_exports, {
33
33
  module.exports = __toCommonJS(import_panel_exports);
34
34
  var import_vue = require("vue");
35
35
  var import_comp = require("../../../ui/src/comp");
36
- var import_ui = require("../../../ui");
36
+ var import_core = require("@vxe-ui/core");
37
37
  var import_xe_utils = __toESM(require("xe-utils"));
38
38
  var import_utils = require("../../../ui/src/utils");
39
39
  var import_log = require("../../../ui/src/log");
40
40
  const { errLog } = (0, import_log.createComponentLog)("table");
41
- const { getI18n, getIcon, renderEmptyElement } = import_ui.VxeUI;
41
+ const { getI18n, getIcon, renderEmptyElement } = import_core.VxeUI;
42
42
  var import_panel_default = (0, import_comp.defineVxeComponent)({
43
43
  name: "VxeTableImportPanel",
44
44
  props: {
@@ -52,9 +52,9 @@ var import_panel_default = (0, import_comp.defineVxeComponent)({
52
52
  }
53
53
  },
54
54
  setup(props) {
55
- const VxeUIModalComponent = import_ui.VxeUI.getComponent("VxeModal");
56
- const VxeUIButtonComponent = import_ui.VxeUI.getComponent("VxeButton");
57
- const VxeUISelectComponent = import_ui.VxeUI.getComponent("VxeSelect");
55
+ const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
56
+ const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
57
+ const VxeUISelectComponent = import_core.VxeUI.getComponent("VxeSelect");
58
58
  const $xeTable = (0, import_vue.inject)("$xeTable", {});
59
59
  const { computeImportOpts } = $xeTable.getComputeMaps();
60
60
  const reactData = (0, import_vue.reactive)({
@@ -132,135 +132,164 @@ var import_panel_default = (0, import_comp.defineVxeComponent)({
132
132
  const bottomSlot = slots.bottom;
133
133
  const defaultSlot = slots.default;
134
134
  const footerSlot = slots.footer;
135
- return VxeUIModalComponent ? (0, import_vue.h)(VxeUIModalComponent, {
136
- id: "VXE_IMPORT_MODAL",
137
- modelValue: storeData.visible,
138
- title: modelOptions.title || getI18n("vxe.import.impTitle"),
139
- className: "vxe-table-export-popup-wrapper",
140
- width: modelOptions.width || 540,
141
- height: modelOptions.height,
142
- minWidth: modelOptions.minWidth || 360,
143
- minHeight: modelOptions.minHeight || 240,
144
- mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
145
- lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
146
- showFooter: true,
147
- escClosable: true,
148
- maskClosable: true,
149
- position: modelOptions.position,
150
- fullscreen: modelOptions.fullscreen,
151
- remember: modelOptions.remember,
152
- showMinimize: modelOptions.showMinimize,
153
- showMaximize: (0, import_utils.getDefaultConfig)(modelOptions.showMaximize, true),
154
- resize: (0, import_utils.getDefaultConfig)(modelOptions.resize, true),
155
- loading: reactData.loading,
156
- "onUpdate:modelValue"(value) {
157
- storeData.visible = value;
135
+ return VxeUIModalComponent ? (0, import_vue.h)(
136
+ VxeUIModalComponent,
137
+ {
138
+ id: "VXE_IMPORT_MODAL",
139
+ modelValue: storeData.visible,
140
+ title: modelOptions.title || getI18n("vxe.import.impTitle"),
141
+ className: "vxe-table-export-popup-wrapper",
142
+ width: modelOptions.width || 540,
143
+ height: modelOptions.height,
144
+ minWidth: modelOptions.minWidth || 360,
145
+ minHeight: modelOptions.minHeight || 240,
146
+ mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
147
+ lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
148
+ showFooter: true,
149
+ escClosable: true,
150
+ maskClosable: true,
151
+ position: modelOptions.position,
152
+ fullscreen: modelOptions.fullscreen,
153
+ remember: modelOptions.remember,
154
+ showMinimize: modelOptions.showMinimize,
155
+ showMaximize: (0, import_utils.getDefaultConfig)(modelOptions.showMaximize, true),
156
+ resize: (0, import_utils.getDefaultConfig)(modelOptions.resize, true),
157
+ loading: reactData.loading,
158
+ "onUpdate:modelValue"(value) {
159
+ storeData.visible = value;
160
+ },
161
+ onShow: showEvent
158
162
  },
159
- onShow: showEvent
160
- }, {
161
- default: () => {
162
- const params = {
163
- $table: $xeTable,
164
- $grid: $xeGrid,
165
- $gantt: $xeGantt,
166
- options: defaultOptions,
167
- params: defaultOptions.params
168
- };
169
- return (0, import_vue.h)("div", {
170
- class: "vxe-table-export--panel"
171
- }, [
172
- topSlot ? (0, import_vue.h)("div", {
173
- class: "vxe-table-export--panel-top"
174
- }, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
175
- (0, import_vue.h)(
163
+ {
164
+ default: () => {
165
+ const params = {
166
+ $table: $xeTable,
167
+ $grid: $xeGrid,
168
+ $gantt: $xeGantt,
169
+ options: defaultOptions,
170
+ params: defaultOptions.params
171
+ };
172
+ return (0, import_vue.h)(
176
173
  "div",
177
174
  {
178
- class: "vxe-table-export--panel-body"
175
+ class: "vxe-table-export--panel"
179
176
  },
180
- defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
181
- (0, import_vue.h)("table", {
182
- class: "vxe-table-export--panel-table",
183
- cellspacing: 0,
184
- cellpadding: 0,
185
- border: 0
186
- }, [
187
- (0, import_vue.h)("tbody", [
188
- (0, import_vue.h)("tr", [
189
- (0, import_vue.h)("td", getI18n("vxe.import.impFile")),
190
- (0, import_vue.h)("td", [
191
- hasFile ? (0, import_vue.h)("div", {
192
- class: "vxe-table-export--selected--file",
193
- title: selectName
194
- }, [
195
- (0, import_vue.h)("span", selectName),
196
- (0, import_vue.h)("i", {
197
- class: getIcon().INPUT_CLEAR,
198
- onClick: clearFileEvent
199
- })
200
- ]) : (0, import_vue.h)("button", {
201
- ref: refFileBtn,
202
- class: "vxe-table-export--select--file",
203
- onClick: selectFileEvent
204
- }, getI18n("vxe.import.impSelect"))
205
- ])
206
- ]),
207
- (0, import_vue.h)("tr", [
208
- (0, import_vue.h)("td", getI18n("vxe.import.impType")),
209
- (0, import_vue.h)("td", parseTypeLabel)
210
- ]),
211
- settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
212
- (0, import_vue.h)("td", getI18n("vxe.import.impMode")),
213
- (0, import_vue.h)("td", [
214
- VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
215
- modelValue: defaultOptions.mode,
216
- options: storeData.modeList,
217
- "onUpdate:modelValue"(value) {
218
- defaultOptions.mode = value;
219
- }
220
- }) : renderEmptyElement($xeTable)
221
- ])
222
- ])
223
- ])
224
- ])
177
+ [
178
+ topSlot ? (0, import_vue.h)(
179
+ "div",
180
+ {
181
+ class: "vxe-table-export--panel-top"
182
+ },
183
+ $xeTable.callSlot(topSlot, params)
184
+ ) : renderEmptyElement($xeTable),
185
+ (0, import_vue.h)(
186
+ "div",
187
+ {
188
+ class: "vxe-table-export--panel-body"
189
+ },
190
+ defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
191
+ (0, import_vue.h)(
192
+ "table",
193
+ {
194
+ class: "vxe-table-export--panel-table",
195
+ cellspacing: 0,
196
+ cellpadding: 0,
197
+ border: 0
198
+ },
199
+ [
200
+ (0, import_vue.h)("tbody", [
201
+ (0, import_vue.h)("tr", [
202
+ (0, import_vue.h)("td", getI18n("vxe.import.impFile")),
203
+ (0, import_vue.h)("td", [
204
+ hasFile ? (0, import_vue.h)(
205
+ "div",
206
+ {
207
+ class: "vxe-table-export--selected--file",
208
+ title: selectName
209
+ },
210
+ [
211
+ (0, import_vue.h)("span", selectName),
212
+ (0, import_vue.h)("i", {
213
+ class: getIcon().INPUT_CLEAR,
214
+ onClick: clearFileEvent
215
+ })
216
+ ]
217
+ ) : (0, import_vue.h)(
218
+ "button",
219
+ {
220
+ ref: refFileBtn,
221
+ class: "vxe-table-export--select--file",
222
+ onClick: selectFileEvent
223
+ },
224
+ getI18n("vxe.import.impSelect")
225
+ )
226
+ ])
227
+ ]),
228
+ (0, import_vue.h)("tr", [(0, import_vue.h)("td", getI18n("vxe.import.impType")), (0, import_vue.h)("td", parseTypeLabel)]),
229
+ settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
230
+ (0, import_vue.h)("td", getI18n("vxe.import.impMode")),
231
+ (0, import_vue.h)("td", [
232
+ VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
233
+ modelValue: defaultOptions.mode,
234
+ options: storeData.modeList,
235
+ "onUpdate:modelValue"(value) {
236
+ defaultOptions.mode = value;
237
+ }
238
+ }) : renderEmptyElement($xeTable)
239
+ ])
240
+ ])
241
+ ])
242
+ ]
243
+ )
244
+ ]
245
+ ),
246
+ bottomSlot ? (0, import_vue.h)(
247
+ "div",
248
+ {
249
+ class: "vxe-table-export--panel-bottom"
250
+ },
251
+ $xeTable.callSlot(bottomSlot, params)
252
+ ) : renderEmptyElement($xeTable)
225
253
  ]
226
- ),
227
- bottomSlot ? (0, import_vue.h)("div", {
228
- class: "vxe-table-export--panel-bottom"
229
- }, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable)
230
- ]);
231
- },
232
- footer() {
233
- const params = {
234
- $table: $xeTable,
235
- $grid: $xeGrid,
236
- $gantt: $xeGantt,
237
- options: defaultOptions,
238
- params: defaultOptions.params
239
- };
240
- return (0, import_vue.h)(
241
- "div",
242
- {
243
- class: "vxe-table-export--panel-footer"
244
- },
245
- footerSlot ? $xeTable.callSlot(footerSlot, params) : [
246
- (0, import_vue.h)("div", {
247
- class: "vxe-table-export--panel-btns"
248
- }, [
249
- VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
250
- content: getI18n("vxe.import.impCancel"),
251
- onClick: cancelEvent
252
- }) : renderEmptyElement($xeTable),
253
- VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
254
- status: "primary",
255
- disabled: !hasFile || reactData.loading,
256
- content: getI18n("vxe.import.impConfirm"),
257
- onClick: importEvent
258
- }) : renderEmptyElement($xeTable)
259
- ])
260
- ]
261
- );
254
+ );
255
+ },
256
+ footer() {
257
+ const params = {
258
+ $table: $xeTable,
259
+ $grid: $xeGrid,
260
+ $gantt: $xeGantt,
261
+ options: defaultOptions,
262
+ params: defaultOptions.params
263
+ };
264
+ return (0, import_vue.h)(
265
+ "div",
266
+ {
267
+ class: "vxe-table-export--panel-footer"
268
+ },
269
+ footerSlot ? $xeTable.callSlot(footerSlot, params) : [
270
+ (0, import_vue.h)(
271
+ "div",
272
+ {
273
+ class: "vxe-table-export--panel-btns"
274
+ },
275
+ [
276
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
277
+ content: getI18n("vxe.import.impCancel"),
278
+ onClick: cancelEvent
279
+ }) : renderEmptyElement($xeTable),
280
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
281
+ status: "primary",
282
+ disabled: !hasFile || reactData.loading,
283
+ content: getI18n("vxe.import.impConfirm"),
284
+ onClick: importEvent
285
+ }) : renderEmptyElement($xeTable)
286
+ ]
287
+ )
288
+ ]
289
+ );
290
+ }
262
291
  }
263
- }) : renderEmptyElement($xeTable);
292
+ ) : renderEmptyElement($xeTable);
264
293
  };
265
294
  (0, import_vue.nextTick)(() => {
266
295
  if (!VxeUIModalComponent) {
@@ -23,12 +23,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  ));
24
24
  var import_vue = require("vue");
25
25
  var import_xe_utils = __toESM(require("xe-utils"));
26
- var import_ui = require("../../../ui");
26
+ var import_core = require("@vxe-ui/core");
27
27
  var import_util = require("../../src/util");
28
28
  var import_dom = require("../../../ui/src/dom");
29
29
  var import_utils = require("../../../ui/src/utils");
30
- const { renderer, hooks } = import_ui.VxeUI;
31
- const tableFilterMethodKeys = ["openFilter", "setFilter", "clearFilter", "saveFilter", "saveFilterByEvent", "saveFilterPanel", "saveFilterPanelByEvent", "resetFilter", "resetFilterByEvent", "resetFilterPanel", "resetFilterPanelByEvent", "getCheckedFilters", "updateFilterOptionStatus"];
30
+ const { renderer, hooks } = import_core.VxeUI;
31
+ const tableFilterMethodKeys = [
32
+ "openFilter",
33
+ "setFilter",
34
+ "clearFilter",
35
+ "saveFilter",
36
+ "saveFilterByEvent",
37
+ "saveFilterPanel",
38
+ "saveFilterPanelByEvent",
39
+ "resetFilter",
40
+ "resetFilterByEvent",
41
+ "resetFilterPanel",
42
+ "resetFilterPanelByEvent",
43
+ "getCheckedFilters",
44
+ "updateFilterOptionStatus"
45
+ ];
32
46
  const sourceType = "table";
33
47
  hooks.add("tableFilterModule", {
34
48
  setupTable($xeTable) {
@@ -221,7 +235,7 @@ hooks.add("tableFilterModule", {
221
235
  $xeTable.closeFilter();
222
236
  return $xeTable.updateFooter().then(() => {
223
237
  const { scrollXLoad, scrollYLoad } = reactData;
224
- if (oldScrollXLoad || scrollXLoad || (oldScrollYLoad || scrollYLoad)) {
238
+ if (oldScrollXLoad || scrollXLoad || oldScrollYLoad || scrollYLoad) {
225
239
  if (oldScrollXLoad || scrollXLoad) {
226
240
  $xeTable.updateScrollXSpace();
227
241
  }
@@ -33,14 +33,14 @@ __export(panel_exports, {
33
33
  module.exports = __toCommonJS(panel_exports);
34
34
  var import_vue = require("vue");
35
35
  var import_comp = require("../../../ui/src/comp");
36
- var import_ui = require("../../../ui");
36
+ var import_core = require("@vxe-ui/core");
37
37
  var import_utils = require("../../../ui/src/utils");
38
38
  var import_dom = require("../../../ui/src/dom");
39
39
  var import_vn = require("../../../ui/src/vn");
40
40
  var import_log = require("../../../ui/src/log");
41
41
  var import_xe_utils = __toESM(require("xe-utils"));
42
42
  const { warnLog } = (0, import_log.createComponentLog)("table");
43
- const { getI18n, getIcon, renderer, renderEmptyElement } = import_ui.VxeUI;
43
+ const { getI18n, getIcon, renderer, renderEmptyElement } = import_core.VxeUI;
44
44
  var panel_default = (0, import_comp.defineVxeComponent)({
45
45
  name: "VxeTableFilterPanel",
46
46
  props: {
@@ -51,7 +51,7 @@ var panel_default = (0, import_comp.defineVxeComponent)({
51
51
  },
52
52
  setup(props, context) {
53
53
  const xID = import_xe_utils.default.uniqueId();
54
- const VxeUIScrollbarComponent = import_ui.VxeUI.getComponent("VxeScrollbar");
54
+ const VxeUIScrollbarComponent = import_core.VxeUI.getComponent("VxeScrollbar");
55
55
  const $xeTable = (0, import_vue.inject)("$xeTable", {});
56
56
  const { reactData: tableReactData, internalData: tableInternalData, getComputeMaps } = $xeTable;
57
57
  const { computeFilterOpts, computeRendererOpts } = getComputeMaps();
@@ -135,15 +135,23 @@ var panel_default = (0, import_comp.defineVxeComponent)({
135
135
  const rtFilter = compConf ? compConf.renderTableFilter || compConf.renderFilter : null;
136
136
  if (filterSlot) {
137
137
  return [
138
- (0, import_vue.h)("div", {
139
- class: "vxe-table--filter-template"
140
- }, $xeTable.callSlot(filterSlot, params))
138
+ (0, import_vue.h)(
139
+ "div",
140
+ {
141
+ class: "vxe-table--filter-template"
142
+ },
143
+ $xeTable.callSlot(filterSlot, params)
144
+ )
141
145
  ];
142
146
  } else if (filterRender && rtFilter) {
143
147
  return [
144
- (0, import_vue.h)("div", {
145
- class: "vxe-table--filter-template"
146
- }, (0, import_vn.getSlotVNs)(rtFilter(filterRender, params)))
148
+ (0, import_vue.h)(
149
+ "div",
150
+ {
151
+ class: "vxe-table--filter-template"
152
+ },
153
+ (0, import_vn.getSlotVNs)(rtFilter(filterRender, params))
154
+ )
147
155
  ];
148
156
  }
149
157
  const isAllChecked = filterMultiple ? filterStore.isAllSelected : !filterOptions.some((item) => item._checked);
@@ -151,55 +159,89 @@ var panel_default = (0, import_comp.defineVxeComponent)({
151
159
  const optVNs = filterOptions.map((item) => {
152
160
  const isChecked = item._checked;
153
161
  const isIndeterminate = false;
154
- return (0, import_vue.h)("div", {
155
- class: ["vxe-table--filter-option", {
156
- "is--checked": item._checked
157
- }],
158
- title: item.label,
159
- onClick: (evnt) => {
160
- changeOption(evnt, !item._checked, item);
161
- }
162
- }, (filterMultiple ? [
163
- (0, import_vue.h)("span", {
164
- class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
165
- })
166
- ] : []).concat([
167
- (0, import_vue.h)("span", {
168
- class: "vxe-checkbox--label"
169
- }, (0, import_utils.formatText)(item.label, 1))
170
- ]));
171
- });
172
- return [
173
- (0, import_vue.h)("div", {
174
- class: "vxe-table--filter-header"
175
- }, [
176
- (0, import_vue.h)("div", {
177
- class: ["vxe-table--filter-option", {
178
- "is--checked": isAllChecked,
179
- "is--indeterminate": isAllIndeterminate
180
- }],
181
- title: getI18n(filterMultiple ? "vxe.table.allTitle" : "vxe.table.allFilter"),
162
+ return (0, import_vue.h)(
163
+ "div",
164
+ {
165
+ class: [
166
+ "vxe-table--filter-option",
167
+ {
168
+ "is--checked": item._checked
169
+ }
170
+ ],
171
+ title: item.label,
182
172
  onClick: (evnt) => {
183
- changeAllOption(evnt, !filterStore.isAllSelected);
173
+ changeOption(evnt, !item._checked, item);
184
174
  }
185
- }, (filterMultiple ? [
175
+ },
176
+ (filterMultiple ? [
186
177
  (0, import_vue.h)("span", {
187
- class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
178
+ class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
188
179
  })
189
180
  ] : []).concat([
190
- (0, import_vue.h)("span", {
191
- class: "vxe-checkbox--label"
192
- }, getI18n("vxe.table.allFilter"))
193
- ]))
194
- ]),
195
- useScrollbar ? (0, import_vue.h)(VxeUIScrollbarComponent, {
196
- class: "vxe-table--scrollbar-filter-body",
197
- viewClassName: "vxe-table--scrollbar-filter-body-view"
198
- }, {
199
- default: () => optVNs
200
- }) : (0, import_vue.h)("div", {
201
- class: "vxe-table--filter-body"
202
- }, optVNs)
181
+ (0, import_vue.h)(
182
+ "span",
183
+ {
184
+ class: "vxe-checkbox--label"
185
+ },
186
+ (0, import_utils.formatText)(item.label, 1)
187
+ )
188
+ ])
189
+ );
190
+ });
191
+ return [
192
+ (0, import_vue.h)(
193
+ "div",
194
+ {
195
+ class: "vxe-table--filter-header"
196
+ },
197
+ [
198
+ (0, import_vue.h)(
199
+ "div",
200
+ {
201
+ class: [
202
+ "vxe-table--filter-option",
203
+ {
204
+ "is--checked": isAllChecked,
205
+ "is--indeterminate": isAllIndeterminate
206
+ }
207
+ ],
208
+ title: getI18n(filterMultiple ? "vxe.table.allTitle" : "vxe.table.allFilter"),
209
+ onClick: (evnt) => {
210
+ changeAllOption(evnt, !filterStore.isAllSelected);
211
+ }
212
+ },
213
+ (filterMultiple ? [
214
+ (0, import_vue.h)("span", {
215
+ class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
216
+ })
217
+ ] : []).concat([
218
+ (0, import_vue.h)(
219
+ "span",
220
+ {
221
+ class: "vxe-checkbox--label"
222
+ },
223
+ getI18n("vxe.table.allFilter")
224
+ )
225
+ ])
226
+ )
227
+ ]
228
+ ),
229
+ useScrollbar ? (0, import_vue.h)(
230
+ VxeUIScrollbarComponent,
231
+ {
232
+ class: "vxe-table--scrollbar-filter-body",
233
+ viewClassName: "vxe-table--scrollbar-filter-body-view"
234
+ },
235
+ {
236
+ default: () => optVNs
237
+ }
238
+ ) : (0, import_vue.h)(
239
+ "div",
240
+ {
241
+ class: "vxe-table--filter-body"
242
+ },
243
+ optVNs
244
+ )
203
245
  ];
204
246
  };
205
247
  const renderFooters = () => {
@@ -222,20 +264,32 @@ var panel_default = (0, import_comp.defineVxeComponent)({
222
264
  showFlFoot = !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false);
223
265
  }
224
266
  return showFlFoot ? [
225
- (0, import_vue.h)("div", {
226
- class: "vxe-table--filter-footer"
227
- }, [
228
- (0, import_vue.h)("button", {
229
- class: {
230
- "is--disabled": isDisabled
231
- },
232
- disabled: isDisabled,
233
- onClick: confirmFilter
234
- }, confirmButtonText || getI18n("vxe.table.confirmFilter")),
235
- (0, import_vue.h)("button", {
236
- onClick: resetFilter
237
- }, resetButtonText || getI18n("vxe.table.resetFilter"))
238
- ])
267
+ (0, import_vue.h)(
268
+ "div",
269
+ {
270
+ class: "vxe-table--filter-footer"
271
+ },
272
+ [
273
+ (0, import_vue.h)(
274
+ "button",
275
+ {
276
+ class: {
277
+ "is--disabled": isDisabled
278
+ },
279
+ disabled: isDisabled,
280
+ onClick: confirmFilter
281
+ },
282
+ confirmButtonText || getI18n("vxe.table.confirmFilter")
283
+ ),
284
+ (0, import_vue.h)(
285
+ "button",
286
+ {
287
+ onClick: resetFilter
288
+ },
289
+ resetButtonText || getI18n("vxe.table.resetFilter")
290
+ )
291
+ ]
292
+ )
239
293
  ] : [];
240
294
  };
241
295
  const renderVN = () => {
@@ -255,27 +309,35 @@ var panel_default = (0, import_comp.defineVxeComponent)({
255
309
  const vSize = computeSize.value;
256
310
  const filterOpts = computeFilterOpts.value;
257
311
  const { transfer, destroyOnClose, className } = filterOpts;
258
- return (0, import_vue.h)(import_vue.Teleport, {
259
- to: "body",
260
- disabled: !transfer
261
- }, [
262
- (0, import_vue.h)("div", {
263
- ref: refElem,
264
- class: [
265
- "vxe-table--filter-wrapper",
266
- "filter--prevent-default",
267
- className,
268
- (0, import_dom.getPropClass)(filterClassName, params),
312
+ return (0, import_vue.h)(
313
+ import_vue.Teleport,
314
+ {
315
+ to: "body",
316
+ disabled: !transfer
317
+ },
318
+ [
319
+ (0, import_vue.h)(
320
+ "div",
269
321
  {
270
- [`size--${vSize}`]: vSize,
271
- "is--animat": tableProps.animat,
272
- "is--multiple": column.filterMultiple,
273
- "is--active": visible
274
- }
275
- ],
276
- style: filterStore.style
277
- }, initStore.filter && (destroyOnClose ? visible : true) && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : [])
278
- ]);
322
+ ref: refElem,
323
+ class: [
324
+ "vxe-table--filter-wrapper",
325
+ "filter--prevent-default",
326
+ className,
327
+ (0, import_dom.getPropClass)(filterClassName, params),
328
+ {
329
+ [`size--${vSize}`]: vSize,
330
+ "is--animat": tableProps.animat,
331
+ "is--multiple": column.filterMultiple,
332
+ "is--active": visible
333
+ }
334
+ ],
335
+ style: filterStore.style
336
+ },
337
+ initStore.filter && (destroyOnClose ? visible : true) && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : []
338
+ )
339
+ ]
340
+ );
279
341
  };
280
342
  $xeFilterPanel.renderVN = renderVN;
281
343
  return $xeFilterPanel;