vxe-table 4.23.11 → 4.23.13

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 (278) hide show
  1. package/dist/all.esm.js +20675 -20631
  2. package/dist/all.esm.min.js +3 -0
  3. package/es/colgroup/index.d.ts +18 -18
  4. package/es/column/index.d.ts +18 -18
  5. package/es/grid/index.d.ts +174 -174
  6. package/es/grid/src/emits.d.ts +1 -1
  7. package/es/grid/src/emits.js +3 -3
  8. package/es/grid/src/grid.d.ts +27 -27
  9. package/es/grid/src/grid.js +1670 -1667
  10. package/es/grid/src/props.d.ts +2 -2
  11. package/es/grid/src/props.js +4 -4
  12. package/es/index.esm.js +1 -0
  13. package/es/index.js +1 -0
  14. package/es/table/index.d.ts +174 -174
  15. package/es/table/module/custom/panel.js +1588 -1585
  16. package/es/table/module/export/export-panel.js +587 -584
  17. package/es/table/module/export/import-panel.js +258 -255
  18. package/es/table/module/filter/hook.js +1 -15
  19. package/es/table/module/filter/panel.js +281 -278
  20. package/es/table/module/menu/panel.js +225 -222
  21. package/es/table/src/body.js +895 -892
  22. package/es/table/src/column.d.ts +3 -3
  23. package/es/table/src/column.js +39 -36
  24. package/es/table/src/emits.d.ts +1 -1
  25. package/es/table/src/emits.js +2 -2
  26. package/es/table/src/footer.d.ts +2 -2
  27. package/es/table/src/footer.js +341 -338
  28. package/es/table/src/group.d.ts +3 -3
  29. package/es/table/src/group.js +49 -46
  30. package/es/table/src/header.js +539 -536
  31. package/es/table/src/props.d.ts +2 -2
  32. package/es/table/src/props.js +2 -2
  33. package/es/table/src/table.d.ts +27 -27
  34. package/es/table/src/table.js +13744 -13724
  35. package/es/toolbar/index.d.ts +18 -18
  36. package/es/toolbar/src/toolbar.d.ts +3 -3
  37. package/es/toolbar/src/toolbar.js +595 -592
  38. package/es/ui/index.js +2 -1
  39. package/es/ui/src/dom.d.ts +1 -1
  40. package/es/ui/src/log.js +1 -1
  41. package/es/ui/src/vn.d.ts +2 -2
  42. package/lib/colgroup/index.d.ts +760 -0
  43. package/lib/column/index.d.ts +760 -0
  44. package/lib/components.d.ts +13 -0
  45. package/lib/grid/index.d.ts +2824 -0
  46. package/lib/grid/src/emits.d.ts +2 -0
  47. package/lib/grid/src/emits.js +2 -2
  48. package/lib/grid/src/grid.d.ts +556 -0
  49. package/lib/grid/src/grid.js +1666 -1663
  50. package/lib/grid/src/props.d.ts +200 -0
  51. package/lib/grid/src/props.js +3 -3
  52. package/lib/index.common.js +1 -0
  53. package/lib/index.d.ts +3 -0
  54. package/lib/index.js +1 -0
  55. package/lib/index.umd.js +20675 -20631
  56. package/lib/index.umd.min.js +3 -3
  57. package/lib/locale/ar-EG.umd.d.ts +908 -0
  58. package/lib/locale/ar-EG.umd.min.js +1 -0
  59. package/lib/locale/de-DE.umd.d.ts +908 -0
  60. package/lib/locale/de-DE.umd.min.js +1 -0
  61. package/lib/locale/en-US.umd.d.ts +908 -0
  62. package/lib/locale/en-US.umd.min.js +1 -0
  63. package/lib/locale/es-ES.umd.d.ts +908 -0
  64. package/lib/locale/es-ES.umd.min.js +1 -0
  65. package/lib/locale/fr-FR.umd.d.ts +908 -0
  66. package/lib/locale/fr-FR.umd.min.js +1 -0
  67. package/lib/locale/hu-HU.umd.d.ts +908 -0
  68. package/lib/locale/hu-HU.umd.min.js +1 -0
  69. package/lib/locale/hy-AM.umd.d.ts +908 -0
  70. package/lib/locale/hy-AM.umd.min.js +1 -0
  71. package/lib/locale/id-ID.umd.d.ts +908 -0
  72. package/lib/locale/id-ID.umd.min.js +1 -0
  73. package/lib/locale/it-IT.umd.d.ts +908 -0
  74. package/lib/locale/it-IT.umd.min.js +1 -0
  75. package/lib/locale/ja-JP.umd.d.ts +908 -0
  76. package/lib/locale/ja-JP.umd.min.js +1 -0
  77. package/lib/locale/ko-KR.umd.d.ts +908 -0
  78. package/lib/locale/ko-KR.umd.min.js +1 -0
  79. package/lib/locale/lang/ar-EG.d.ts +908 -0
  80. package/lib/locale/lang/ar-EG.umd.d.ts +908 -0
  81. package/lib/locale/lang/ar-EG.umd.min.js +1 -0
  82. package/lib/locale/lang/de-DE.d.ts +908 -0
  83. package/lib/locale/lang/de-DE.umd.d.ts +908 -0
  84. package/lib/locale/lang/de-DE.umd.min.js +1 -0
  85. package/lib/locale/lang/en-US.d.ts +908 -0
  86. package/lib/locale/lang/en-US.umd.d.ts +908 -0
  87. package/lib/locale/lang/en-US.umd.min.js +1 -0
  88. package/lib/locale/lang/es-ES.d.ts +908 -0
  89. package/lib/locale/lang/es-ES.umd.d.ts +908 -0
  90. package/lib/locale/lang/es-ES.umd.min.js +1 -0
  91. package/lib/locale/lang/fr-FR.d.ts +908 -0
  92. package/lib/locale/lang/fr-FR.umd.d.ts +908 -0
  93. package/lib/locale/lang/fr-FR.umd.min.js +1 -0
  94. package/lib/locale/lang/hu-HU.d.ts +908 -0
  95. package/lib/locale/lang/hu-HU.umd.d.ts +908 -0
  96. package/lib/locale/lang/hu-HU.umd.min.js +1 -0
  97. package/lib/locale/lang/hy-AM.d.ts +908 -0
  98. package/lib/locale/lang/hy-AM.umd.d.ts +908 -0
  99. package/lib/locale/lang/hy-AM.umd.min.js +1 -0
  100. package/lib/locale/lang/id-ID.d.ts +908 -0
  101. package/lib/locale/lang/id-ID.umd.d.ts +908 -0
  102. package/lib/locale/lang/id-ID.umd.min.js +1 -0
  103. package/lib/locale/lang/it-IT.d.ts +908 -0
  104. package/lib/locale/lang/it-IT.umd.d.ts +908 -0
  105. package/lib/locale/lang/it-IT.umd.min.js +1 -0
  106. package/lib/locale/lang/ja-JP.d.ts +908 -0
  107. package/lib/locale/lang/ja-JP.umd.d.ts +908 -0
  108. package/lib/locale/lang/ja-JP.umd.min.js +1 -0
  109. package/lib/locale/lang/ko-KR.d.ts +908 -0
  110. package/lib/locale/lang/ko-KR.umd.d.ts +908 -0
  111. package/lib/locale/lang/ko-KR.umd.min.js +1 -0
  112. package/lib/locale/lang/ms-MY.d.ts +908 -0
  113. package/lib/locale/lang/ms-MY.umd.d.ts +908 -0
  114. package/lib/locale/lang/ms-MY.umd.min.js +1 -0
  115. package/lib/locale/lang/nb-NO.d.ts +908 -0
  116. package/lib/locale/lang/nb-NO.umd.d.ts +908 -0
  117. package/lib/locale/lang/nb-NO.umd.min.js +1 -0
  118. package/lib/locale/lang/pt-BR.d.ts +908 -0
  119. package/lib/locale/lang/pt-BR.umd.d.ts +908 -0
  120. package/lib/locale/lang/pt-BR.umd.min.js +1 -0
  121. package/lib/locale/lang/ru-RU.d.ts +908 -0
  122. package/lib/locale/lang/ru-RU.umd.d.ts +908 -0
  123. package/lib/locale/lang/ru-RU.umd.min.js +1 -0
  124. package/lib/locale/lang/th-TH.d.ts +908 -0
  125. package/lib/locale/lang/th-TH.umd.d.ts +908 -0
  126. package/lib/locale/lang/th-TH.umd.min.js +1 -0
  127. package/lib/locale/lang/ug-CN.d.ts +908 -0
  128. package/lib/locale/lang/ug-CN.umd.d.ts +908 -0
  129. package/lib/locale/lang/ug-CN.umd.min.js +1 -0
  130. package/lib/locale/lang/uk-UA.d.ts +908 -0
  131. package/lib/locale/lang/uk-UA.umd.d.ts +908 -0
  132. package/lib/locale/lang/uk-UA.umd.min.js +1 -0
  133. package/lib/locale/lang/uz-UZ.d.ts +908 -0
  134. package/lib/locale/lang/uz-UZ.umd.d.ts +908 -0
  135. package/lib/locale/lang/uz-UZ.umd.min.js +1 -0
  136. package/lib/locale/lang/vi-VN.d.ts +908 -0
  137. package/lib/locale/lang/vi-VN.umd.d.ts +908 -0
  138. package/lib/locale/lang/vi-VN.umd.min.js +1 -0
  139. package/lib/locale/lang/zh-CHT.d.ts +908 -0
  140. package/lib/locale/lang/zh-CHT.umd.d.ts +908 -0
  141. package/lib/locale/lang/zh-CHT.umd.min.js +1 -0
  142. package/lib/locale/lang/zh-CN.d.ts +908 -0
  143. package/lib/locale/lang/zh-CN.umd.d.ts +908 -0
  144. package/lib/locale/lang/zh-CN.umd.min.js +1 -0
  145. package/lib/locale/lang/zh-HK.d.ts +908 -0
  146. package/lib/locale/lang/zh-HK.umd.d.ts +908 -0
  147. package/lib/locale/lang/zh-HK.umd.min.js +1 -0
  148. package/lib/locale/lang/zh-MO.d.ts +908 -0
  149. package/lib/locale/lang/zh-MO.umd.d.ts +908 -0
  150. package/lib/locale/lang/zh-MO.umd.min.js +1 -0
  151. package/lib/locale/lang/zh-TC.d.ts +908 -0
  152. package/lib/locale/lang/zh-TC.umd.d.ts +908 -0
  153. package/lib/locale/lang/zh-TC.umd.min.js +1 -0
  154. package/lib/locale/lang/zh-TW.d.ts +908 -0
  155. package/lib/locale/lang/zh-TW.umd.d.ts +908 -0
  156. package/lib/locale/lang/zh-TW.umd.min.js +1 -0
  157. package/lib/locale/ms-MY.umd.d.ts +908 -0
  158. package/lib/locale/ms-MY.umd.min.js +1 -0
  159. package/lib/locale/nb-NO.umd.d.ts +908 -0
  160. package/lib/locale/nb-NO.umd.min.js +1 -0
  161. package/lib/locale/pt-BR.umd.d.ts +908 -0
  162. package/lib/locale/pt-BR.umd.min.js +1 -0
  163. package/lib/locale/ru-RU.umd.d.ts +908 -0
  164. package/lib/locale/ru-RU.umd.min.js +1 -0
  165. package/lib/locale/th-TH.umd.d.ts +908 -0
  166. package/lib/locale/th-TH.umd.min.js +1 -0
  167. package/lib/locale/ug-CN.umd.d.ts +908 -0
  168. package/lib/locale/ug-CN.umd.min.js +1 -0
  169. package/lib/locale/uk-UA.umd.d.ts +908 -0
  170. package/lib/locale/uk-UA.umd.min.js +1 -0
  171. package/lib/locale/uz-UZ.umd.d.ts +908 -0
  172. package/lib/locale/uz-UZ.umd.min.js +1 -0
  173. package/lib/locale/vi-VN.umd.d.ts +908 -0
  174. package/lib/locale/vi-VN.umd.min.js +1 -0
  175. package/lib/locale/zh-CHT.umd.d.ts +908 -0
  176. package/lib/locale/zh-CHT.umd.min.js +1 -0
  177. package/lib/locale/zh-CN.umd.d.ts +908 -0
  178. package/lib/locale/zh-CN.umd.min.js +1 -0
  179. package/lib/locale/zh-HK.umd.d.ts +908 -0
  180. package/lib/locale/zh-HK.umd.min.js +1 -0
  181. package/lib/locale/zh-MO.umd.d.ts +908 -0
  182. package/lib/locale/zh-MO.umd.min.js +1 -0
  183. package/lib/locale/zh-TC.umd.d.ts +908 -0
  184. package/lib/locale/zh-TC.umd.min.js +1 -0
  185. package/lib/locale/zh-TW.umd.d.ts +908 -0
  186. package/lib/locale/zh-TW.umd.min.js +1 -0
  187. package/lib/table/index.d.ts +2672 -0
  188. package/lib/table/module/custom/hook.d.ts +1 -0
  189. package/lib/table/module/custom/panel.d.ts +17 -0
  190. package/lib/table/module/custom/panel.js +1588 -1585
  191. package/lib/table/module/edit/hook.d.ts +1 -0
  192. package/lib/table/module/export/export-panel.d.ts +27 -0
  193. package/lib/table/module/export/export-panel.js +587 -584
  194. package/lib/table/module/export/hook.d.ts +1 -0
  195. package/lib/table/module/export/import-panel.d.ts +27 -0
  196. package/lib/table/module/export/import-panel.js +258 -255
  197. package/lib/table/module/export/util.d.ts +5 -0
  198. package/lib/table/module/filter/hook.d.ts +1 -0
  199. package/lib/table/module/filter/hook.js +1 -15
  200. package/lib/table/module/filter/panel.d.ts +16 -0
  201. package/lib/table/module/filter/panel.js +281 -278
  202. package/lib/table/module/keyboard/hook.d.ts +1 -0
  203. package/lib/table/module/menu/hook.d.ts +1 -0
  204. package/lib/table/module/menu/panel.d.ts +2 -0
  205. package/lib/table/module/menu/panel.js +225 -222
  206. package/lib/table/module/validator/hook.d.ts +1 -0
  207. package/lib/table/render/index.d.ts +1 -0
  208. package/lib/table/src/body.d.ts +24 -0
  209. package/lib/table/src/body.js +895 -892
  210. package/lib/table/src/cell.d.ts +192 -0
  211. package/lib/table/src/column.d.ts +263 -0
  212. package/lib/table/src/column.js +39 -36
  213. package/lib/table/src/columnInfo.d.ts +13 -0
  214. package/lib/table/src/emits.d.ts +2 -0
  215. package/lib/table/src/emits.js +2 -2
  216. package/lib/table/src/footer.d.ts +45 -0
  217. package/lib/table/src/footer.js +341 -338
  218. package/lib/table/src/group.d.ts +178 -0
  219. package/lib/table/src/group.js +49 -46
  220. package/lib/table/src/header.d.ts +26 -0
  221. package/lib/table/src/header.js +539 -536
  222. package/lib/table/src/props.d.ts +238 -0
  223. package/lib/table/src/props.js +2 -2
  224. package/lib/table/src/store.d.ts +6 -0
  225. package/lib/table/src/table.d.ts +539 -0
  226. package/lib/table/src/table.js +13742 -13722
  227. package/lib/table/src/use/cell-view.d.ts +10 -0
  228. package/lib/table/src/use/index.d.ts +1 -0
  229. package/lib/table/src/util.d.ts +74 -0
  230. package/lib/toolbar/index.d.ts +340 -0
  231. package/lib/toolbar/src/toolbar.d.ts +75 -0
  232. package/lib/toolbar/src/toolbar.js +595 -592
  233. package/lib/ui/index.d.ts +85 -0
  234. package/lib/ui/index.js +2 -1
  235. package/lib/ui/src/anime.d.ts +10 -0
  236. package/lib/ui/src/comp.d.ts +2 -0
  237. package/lib/ui/src/dom.d.ts +80 -0
  238. package/lib/ui/src/log.d.ts +6 -0
  239. package/lib/ui/src/log.js +1 -1
  240. package/lib/ui/src/utils.d.ts +23 -0
  241. package/lib/ui/src/vn.d.ts +7 -0
  242. package/lib/v-x-e-table/index.d.ts +2 -0
  243. package/lib/vxe-colgroup/index.d.ts +3 -0
  244. package/lib/vxe-column/index.d.ts +3 -0
  245. package/lib/vxe-grid/index.d.ts +3 -0
  246. package/lib/vxe-table/index.d.ts +3 -0
  247. package/lib/vxe-toolbar/index.d.ts +3 -0
  248. package/lib/vxe-ui/index.d.ts +3 -0
  249. package/package.json +9 -2
  250. package/packages/grid/src/emits.ts +2 -2
  251. package/packages/grid/src/grid.ts +10 -10
  252. package/packages/grid/src/props.ts +3 -3
  253. package/packages/index.ts +2 -2
  254. package/packages/table/module/custom/panel.ts +2 -2
  255. package/packages/table/module/export/export-panel.ts +2 -2
  256. package/packages/table/module/export/import-panel.ts +2 -2
  257. package/packages/table/module/filter/hook.ts +1 -15
  258. package/packages/table/module/filter/panel.ts +2 -2
  259. package/packages/table/module/menu/panel.ts +2 -2
  260. package/packages/table/src/body.ts +2 -2
  261. package/packages/table/src/column.ts +2 -2
  262. package/packages/table/src/emits.ts +1 -1
  263. package/packages/table/src/footer.ts +2 -2
  264. package/packages/table/src/group.ts +2 -2
  265. package/packages/table/src/header.ts +2 -2
  266. package/packages/table/src/props.ts +1 -1
  267. package/packages/table/src/table.ts +74 -57
  268. package/packages/toolbar/src/toolbar.ts +2 -2
  269. package/packages/ui/index.ts +1 -0
  270. /package/dist/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
  271. /package/dist/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
  272. /package/dist/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
  273. /package/es/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
  274. /package/es/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
  275. /package/es/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
  276. /package/lib/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
  277. /package/lib/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
  278. /package/lib/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { PropType } from 'vue';
2
+ import type { VxeTableDefines } from '../../../../types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ defaultOptions: {
5
+ type: PropType<VxeTableDefines.ImportParamsObj>;
6
+ default: () => VxeTableDefines.ImportParamsObj;
7
+ };
8
+ storeData: {
9
+ type: PropType<VxeTableDefines.ImportStoreObj>;
10
+ default: () => VxeTableDefines.ImportStoreObj;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ defaultOptions: {
16
+ type: PropType<VxeTableDefines.ImportParamsObj>;
17
+ default: () => VxeTableDefines.ImportParamsObj;
18
+ };
19
+ storeData: {
20
+ type: PropType<VxeTableDefines.ImportStoreObj>;
21
+ default: () => VxeTableDefines.ImportStoreObj;
22
+ };
23
+ }>>, {
24
+ defaultOptions: VxeTableDefines.ImportParamsObj;
25
+ storeData: VxeTableDefines.ImportStoreObj;
26
+ }, {}>;
27
+ export default _default;
@@ -39,269 +39,272 @@ 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
41
  const { getI18n, getIcon, renderEmptyElement } = import_core.VxeUI;
42
- var import_panel_default = (0, import_comp.defineVxeComponent)({
43
- name: "VxeTableImportPanel",
44
- props: {
45
- defaultOptions: {
46
- type: Object,
47
- default: () => ({})
48
- },
49
- storeData: {
50
- type: Object,
51
- default: () => ({})
52
- }
53
- },
54
- setup(props) {
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
- const $xeTable = (0, import_vue.inject)("$xeTable", {});
59
- const { computeImportOpts } = $xeTable.getComputeMaps();
60
- const reactData = (0, import_vue.reactive)({
61
- loading: false
62
- });
63
- const refFileBtn = (0, import_vue.ref)();
64
- const computeSelectName = (0, import_vue.computed)(() => {
65
- const { storeData } = props;
66
- return `${storeData.filename}.${storeData.type}`;
67
- });
68
- const computeHasFile = (0, import_vue.computed)(() => {
69
- const { storeData } = props;
70
- return storeData.file && storeData.type;
71
- });
72
- const computeParseTypeLabel = (0, import_vue.computed)(() => {
73
- const { storeData } = props;
74
- const { type, typeList } = storeData;
75
- if (type) {
76
- const selectItem = import_xe_utils.default.find(typeList, (item) => type === item.value);
77
- return `${selectItem ? selectItem.label : "*.*"}`;
42
+ var import_panel_default = (
43
+ /* define-vxe-component start */
44
+ (0, import_comp.defineVxeComponent)({
45
+ name: "VxeTableImportPanel",
46
+ props: {
47
+ defaultOptions: {
48
+ type: Object,
49
+ default: () => ({})
50
+ },
51
+ storeData: {
52
+ type: Object,
53
+ default: () => ({})
78
54
  }
79
- return `*.${typeList.map((item) => item.value).join(", *.")}`;
80
- });
81
- const clearFileEvent = () => {
82
- const { storeData } = props;
83
- Object.assign(storeData, {
84
- filename: "",
85
- sheetName: "",
86
- type: ""
55
+ },
56
+ setup(props) {
57
+ const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
58
+ const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
59
+ const VxeUISelectComponent = import_core.VxeUI.getComponent("VxeSelect");
60
+ const $xeTable = (0, import_vue.inject)("$xeTable", {});
61
+ const { computeImportOpts } = $xeTable.getComputeMaps();
62
+ const reactData = (0, import_vue.reactive)({
63
+ loading: false
87
64
  });
88
- };
89
- const selectFileEvent = () => {
90
- const { storeData, defaultOptions } = props;
91
- $xeTable.readFile(defaultOptions).then((params) => {
92
- const { file } = params;
93
- Object.assign(storeData, (0, import_utils.parseFile)(file), { file });
94
- }).catch(() => {
65
+ const refFileBtn = (0, import_vue.ref)();
66
+ const computeSelectName = (0, import_vue.computed)(() => {
67
+ const { storeData } = props;
68
+ return `${storeData.filename}.${storeData.type}`;
95
69
  });
96
- };
97
- const showEvent = () => {
98
- (0, import_vue.nextTick)(() => {
99
- const targetElem = refFileBtn.value;
100
- if (targetElem) {
101
- targetElem.focus();
70
+ const computeHasFile = (0, import_vue.computed)(() => {
71
+ const { storeData } = props;
72
+ return storeData.file && storeData.type;
73
+ });
74
+ const computeParseTypeLabel = (0, import_vue.computed)(() => {
75
+ const { storeData } = props;
76
+ const { type, typeList } = storeData;
77
+ if (type) {
78
+ const selectItem = import_xe_utils.default.find(typeList, (item) => type === item.value);
79
+ return `${selectItem ? selectItem.label : "*.*"}`;
102
80
  }
81
+ return `*.${typeList.map((item) => item.value).join(", *.")}`;
103
82
  });
104
- };
105
- const cancelEvent = () => {
106
- const { storeData } = props;
107
- storeData.visible = false;
108
- };
109
- const importEvent = () => {
110
- const { storeData, defaultOptions } = props;
111
- const importOpts = computeImportOpts.value;
112
- reactData.loading = true;
113
- $xeTable.importByFile(storeData.file, Object.assign({}, importOpts, defaultOptions)).then(() => {
114
- reactData.loading = false;
83
+ const clearFileEvent = () => {
84
+ const { storeData } = props;
85
+ Object.assign(storeData, {
86
+ filename: "",
87
+ sheetName: "",
88
+ type: ""
89
+ });
90
+ };
91
+ const selectFileEvent = () => {
92
+ const { storeData, defaultOptions } = props;
93
+ $xeTable.readFile(defaultOptions).then((params) => {
94
+ const { file } = params;
95
+ Object.assign(storeData, (0, import_utils.parseFile)(file), { file });
96
+ }).catch(() => {
97
+ });
98
+ };
99
+ const showEvent = () => {
100
+ (0, import_vue.nextTick)(() => {
101
+ const targetElem = refFileBtn.value;
102
+ if (targetElem) {
103
+ targetElem.focus();
104
+ }
105
+ });
106
+ };
107
+ const cancelEvent = () => {
108
+ const { storeData } = props;
115
109
  storeData.visible = false;
116
- }).catch(() => {
117
- reactData.loading = false;
118
- });
119
- };
120
- const renderVN = () => {
121
- const $xeGrid = $xeTable.xeGrid;
122
- const $xeGantt = $xeTable.xeGantt;
123
- const { defaultOptions, storeData } = props;
124
- const selectName = computeSelectName.value;
125
- const hasFile = computeHasFile.value;
126
- const importOpts = computeImportOpts.value;
127
- const parseTypeLabel = computeParseTypeLabel.value;
128
- const modelOptions = importOpts.modelOptions || {};
129
- const settingOptions = importOpts.settingOptions || {};
130
- const slots = defaultOptions.slots || {};
131
- const topSlot = slots.top;
132
- const bottomSlot = slots.bottom;
133
- const defaultSlot = slots.default;
134
- const footerSlot = slots.footer;
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;
110
+ };
111
+ const importEvent = () => {
112
+ const { storeData, defaultOptions } = props;
113
+ const importOpts = computeImportOpts.value;
114
+ reactData.loading = true;
115
+ $xeTable.importByFile(storeData.file, Object.assign({}, importOpts, defaultOptions)).then(() => {
116
+ reactData.loading = false;
117
+ storeData.visible = false;
118
+ }).catch(() => {
119
+ reactData.loading = false;
120
+ });
121
+ };
122
+ const renderVN = () => {
123
+ const $xeGrid = $xeTable.xeGrid;
124
+ const $xeGantt = $xeTable.xeGantt;
125
+ const { defaultOptions, storeData } = props;
126
+ const selectName = computeSelectName.value;
127
+ const hasFile = computeHasFile.value;
128
+ const importOpts = computeImportOpts.value;
129
+ const parseTypeLabel = computeParseTypeLabel.value;
130
+ const modelOptions = importOpts.modelOptions || {};
131
+ const settingOptions = importOpts.settingOptions || {};
132
+ const slots = defaultOptions.slots || {};
133
+ const topSlot = slots.top;
134
+ const bottomSlot = slots.bottom;
135
+ const defaultSlot = slots.default;
136
+ const footerSlot = slots.footer;
137
+ return VxeUIModalComponent ? (0, import_vue.h)(
138
+ VxeUIModalComponent,
139
+ {
140
+ id: "VXE_IMPORT_MODAL",
141
+ modelValue: storeData.visible,
142
+ title: modelOptions.title || getI18n("vxe.import.impTitle"),
143
+ className: "vxe-table-export-popup-wrapper",
144
+ width: modelOptions.width || 540,
145
+ height: modelOptions.height,
146
+ minWidth: modelOptions.minWidth || 360,
147
+ minHeight: modelOptions.minHeight || 240,
148
+ mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
149
+ lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
150
+ showFooter: true,
151
+ escClosable: true,
152
+ maskClosable: true,
153
+ position: modelOptions.position,
154
+ fullscreen: modelOptions.fullscreen,
155
+ remember: modelOptions.remember,
156
+ showMinimize: modelOptions.showMinimize,
157
+ showMaximize: (0, import_utils.getDefaultConfig)(modelOptions.showMaximize, true),
158
+ resize: (0, import_utils.getDefaultConfig)(modelOptions.resize, true),
159
+ loading: reactData.loading,
160
+ "onUpdate:modelValue"(value) {
161
+ storeData.visible = value;
162
+ },
163
+ onShow: showEvent
160
164
  },
161
- onShow: showEvent
162
- },
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)(
173
- "div",
174
- {
175
- class: "vxe-table-export--panel"
176
- },
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)
165
+ {
166
+ default: () => {
167
+ const params = {
168
+ $table: $xeTable,
169
+ $grid: $xeGrid,
170
+ $gantt: $xeGantt,
171
+ options: defaultOptions,
172
+ params: defaultOptions.params
173
+ };
174
+ return (0, import_vue.h)(
175
+ "div",
176
+ {
177
+ class: "vxe-table-export--panel"
178
+ },
179
+ [
180
+ topSlot ? (0, import_vue.h)(
181
+ "div",
182
+ {
183
+ class: "vxe-table-export--panel-top"
184
+ },
185
+ $xeTable.callSlot(topSlot, params)
186
+ ) : renderEmptyElement($xeTable),
187
+ (0, import_vue.h)(
188
+ "div",
189
+ {
190
+ class: "vxe-table-export--panel-body"
191
+ },
192
+ defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
193
+ (0, import_vue.h)(
194
+ "table",
195
+ {
196
+ class: "vxe-table-export--panel-table",
197
+ cellspacing: 0,
198
+ cellpadding: 0,
199
+ border: 0
200
+ },
201
+ [
202
+ (0, import_vue.h)("tbody", [
203
+ (0, import_vue.h)("tr", [
204
+ (0, import_vue.h)("td", getI18n("vxe.import.impFile")),
205
+ (0, import_vue.h)("td", [
206
+ hasFile ? (0, import_vue.h)(
207
+ "div",
208
+ {
209
+ class: "vxe-table-export--selected--file",
210
+ title: selectName
211
+ },
212
+ [
213
+ (0, import_vue.h)("span", selectName),
214
+ (0, import_vue.h)("i", {
215
+ class: getIcon().INPUT_CLEAR,
216
+ onClick: clearFileEvent
217
+ })
218
+ ]
219
+ ) : (0, import_vue.h)(
220
+ "button",
221
+ {
222
+ ref: refFileBtn,
223
+ class: "vxe-table-export--select--file",
224
+ onClick: selectFileEvent
225
+ },
226
+ getI18n("vxe.import.impSelect")
227
+ )
228
+ ])
229
+ ]),
230
+ (0, import_vue.h)("tr", [(0, import_vue.h)("td", getI18n("vxe.import.impType")), (0, import_vue.h)("td", parseTypeLabel)]),
231
+ settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
232
+ (0, import_vue.h)("td", getI18n("vxe.import.impMode")),
233
+ (0, import_vue.h)("td", [
234
+ VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
235
+ modelValue: defaultOptions.mode,
236
+ options: storeData.modeList,
237
+ "onUpdate:modelValue"(value) {
238
+ defaultOptions.mode = value;
239
+ }
240
+ }) : renderEmptyElement($xeTable)
241
+ ])
239
242
  ])
240
243
  ])
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)
253
- ]
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
- );
244
+ ]
245
+ )
246
+ ]
247
+ ),
248
+ bottomSlot ? (0, import_vue.h)(
249
+ "div",
250
+ {
251
+ class: "vxe-table-export--panel-bottom"
252
+ },
253
+ $xeTable.callSlot(bottomSlot, params)
254
+ ) : renderEmptyElement($xeTable)
255
+ ]
256
+ );
257
+ },
258
+ footer() {
259
+ const params = {
260
+ $table: $xeTable,
261
+ $grid: $xeGrid,
262
+ $gantt: $xeGantt,
263
+ options: defaultOptions,
264
+ params: defaultOptions.params
265
+ };
266
+ return (0, import_vue.h)(
267
+ "div",
268
+ {
269
+ class: "vxe-table-export--panel-footer"
270
+ },
271
+ footerSlot ? $xeTable.callSlot(footerSlot, params) : [
272
+ (0, import_vue.h)(
273
+ "div",
274
+ {
275
+ class: "vxe-table-export--panel-btns"
276
+ },
277
+ [
278
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
279
+ content: getI18n("vxe.import.impCancel"),
280
+ onClick: cancelEvent
281
+ }) : renderEmptyElement($xeTable),
282
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
283
+ status: "primary",
284
+ disabled: !hasFile || reactData.loading,
285
+ content: getI18n("vxe.import.impConfirm"),
286
+ onClick: importEvent
287
+ }) : renderEmptyElement($xeTable)
288
+ ]
289
+ )
290
+ ]
291
+ );
292
+ }
290
293
  }
294
+ ) : renderEmptyElement($xeTable);
295
+ };
296
+ (0, import_vue.nextTick)(() => {
297
+ if (!VxeUIModalComponent) {
298
+ errLog("vxe.error.reqComp", ["vxe-modal"]);
291
299
  }
292
- ) : renderEmptyElement($xeTable);
293
- };
294
- (0, import_vue.nextTick)(() => {
295
- if (!VxeUIModalComponent) {
296
- errLog("vxe.error.reqComp", ["vxe-modal"]);
297
- }
298
- if (!VxeUIButtonComponent) {
299
- errLog("vxe.error.reqComp", ["vxe-button"]);
300
- }
301
- if (!VxeUISelectComponent) {
302
- errLog("vxe.error.reqComp", ["vxe-select"]);
303
- }
304
- });
305
- return renderVN;
306
- }
307
- });
300
+ if (!VxeUIButtonComponent) {
301
+ errLog("vxe.error.reqComp", ["vxe-button"]);
302
+ }
303
+ if (!VxeUISelectComponent) {
304
+ errLog("vxe.error.reqComp", ["vxe-select"]);
305
+ }
306
+ });
307
+ return renderVN;
308
+ }
309
+ })
310
+ );
@@ -0,0 +1,5 @@
1
+ import type { VxeTablePropTypes } from '../../../../types';
2
+ export declare function getExportBlobByContent(content: string, options: {
3
+ type: string;
4
+ }): Blob;
5
+ export declare function createHtmlPage(opts: VxeTablePropTypes.PrintConfig, content: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -28,21 +28,7 @@ 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
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
- ];
31
+ const tableFilterMethodKeys = ["openFilter", "setFilter", "clearFilter", "saveFilter", "saveFilterByEvent", "saveFilterPanel", "saveFilterPanelByEvent", "resetFilter", "resetFilterByEvent", "resetFilterPanel", "resetFilterPanelByEvent", "getCheckedFilters", "updateFilterOptionStatus"];
46
32
  const sourceType = "table";
47
33
  hooks.add("tableFilterModule", {
48
34
  setupTable($xeTable) {
@@ -0,0 +1,16 @@
1
+ import { PropType } from 'vue';
2
+ import type { VxeTableDefines } from '../../../../types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ filterStore: {
5
+ type: PropType<VxeTableDefines.FilterStoreObj>;
6
+ default: () => VxeTableDefines.FilterStoreObj;
7
+ };
8
+ }, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ filterStore: {
10
+ type: PropType<VxeTableDefines.FilterStoreObj>;
11
+ default: () => VxeTableDefines.FilterStoreObj;
12
+ };
13
+ }>>, {
14
+ filterStore: VxeTableDefines.FilterStoreObj;
15
+ }, {}>;
16
+ export default _default;