vxe-table 4.23.12 → 4.23.14

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 (215) hide show
  1. package/dist/all.esm.js +4789 -4773
  2. package/dist/all.esm.min.js +3 -3
  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 +126 -126
  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 +20 -20
  9. package/es/grid/src/grid.js +10 -10
  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 +118 -118
  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/emits.d.ts +1 -1
  24. package/es/table/src/emits.js +2 -2
  25. package/es/table/src/footer.js +341 -338
  26. package/es/table/src/group.d.ts +3 -3
  27. package/es/table/src/header.js +539 -536
  28. package/es/table/src/props.d.ts +2 -2
  29. package/es/table/src/props.js +2 -2
  30. package/es/table/src/table.d.ts +19 -19
  31. package/es/table/src/table.js +15 -10
  32. package/es/table/src/util.d.ts +1 -1
  33. package/es/toolbar/index.d.ts +18 -18
  34. package/es/toolbar/src/toolbar.d.ts +3 -3
  35. package/es/ui/index.js +1 -1
  36. package/es/ui/src/log.js +1 -1
  37. package/es/ui/src/vn.d.ts +1 -1
  38. package/lib/colgroup/index.d.ts +760 -0
  39. package/lib/column/index.d.ts +760 -0
  40. package/lib/components.d.ts +13 -0
  41. package/lib/grid/index.d.ts +2824 -0
  42. package/lib/grid/src/emits.d.ts +2 -0
  43. package/lib/grid/src/emits.js +2 -2
  44. package/lib/grid/src/grid.d.ts +556 -0
  45. package/lib/grid/src/grid.js +6 -6
  46. package/lib/grid/src/props.d.ts +200 -0
  47. package/lib/grid/src/props.js +3 -3
  48. package/lib/index.common.js +1 -0
  49. package/lib/index.d.ts +3 -0
  50. package/lib/index.js +1 -0
  51. package/lib/index.umd.js +4789 -4773
  52. package/lib/index.umd.min.js +3 -3
  53. package/lib/locale/ar-EG.umd.d.ts +908 -0
  54. package/lib/locale/de-DE.umd.d.ts +908 -0
  55. package/lib/locale/en-US.umd.d.ts +908 -0
  56. package/lib/locale/es-ES.umd.d.ts +908 -0
  57. package/lib/locale/fr-FR.umd.d.ts +908 -0
  58. package/lib/locale/hu-HU.umd.d.ts +908 -0
  59. package/lib/locale/hy-AM.umd.d.ts +908 -0
  60. package/lib/locale/id-ID.umd.d.ts +908 -0
  61. package/lib/locale/it-IT.umd.d.ts +908 -0
  62. package/lib/locale/ja-JP.umd.d.ts +908 -0
  63. package/lib/locale/ko-KR.umd.d.ts +908 -0
  64. package/lib/locale/lang/ar-EG.d.ts +908 -0
  65. package/lib/locale/lang/ar-EG.umd.d.ts +908 -0
  66. package/lib/locale/lang/de-DE.d.ts +908 -0
  67. package/lib/locale/lang/de-DE.umd.d.ts +908 -0
  68. package/lib/locale/lang/en-US.d.ts +908 -0
  69. package/lib/locale/lang/en-US.umd.d.ts +908 -0
  70. package/lib/locale/lang/es-ES.d.ts +908 -0
  71. package/lib/locale/lang/es-ES.umd.d.ts +908 -0
  72. package/lib/locale/lang/fr-FR.d.ts +908 -0
  73. package/lib/locale/lang/fr-FR.umd.d.ts +908 -0
  74. package/lib/locale/lang/hu-HU.d.ts +908 -0
  75. package/lib/locale/lang/hu-HU.umd.d.ts +908 -0
  76. package/lib/locale/lang/hy-AM.d.ts +908 -0
  77. package/lib/locale/lang/hy-AM.umd.d.ts +908 -0
  78. package/lib/locale/lang/id-ID.d.ts +908 -0
  79. package/lib/locale/lang/id-ID.umd.d.ts +908 -0
  80. package/lib/locale/lang/it-IT.d.ts +908 -0
  81. package/lib/locale/lang/it-IT.umd.d.ts +908 -0
  82. package/lib/locale/lang/ja-JP.d.ts +908 -0
  83. package/lib/locale/lang/ja-JP.umd.d.ts +908 -0
  84. package/lib/locale/lang/ko-KR.d.ts +908 -0
  85. package/lib/locale/lang/ko-KR.umd.d.ts +908 -0
  86. package/lib/locale/lang/ms-MY.d.ts +908 -0
  87. package/lib/locale/lang/ms-MY.umd.d.ts +908 -0
  88. package/lib/locale/lang/nb-NO.d.ts +908 -0
  89. package/lib/locale/lang/nb-NO.umd.d.ts +908 -0
  90. package/lib/locale/lang/pt-BR.d.ts +908 -0
  91. package/lib/locale/lang/pt-BR.umd.d.ts +908 -0
  92. package/lib/locale/lang/ru-RU.d.ts +908 -0
  93. package/lib/locale/lang/ru-RU.umd.d.ts +908 -0
  94. package/lib/locale/lang/th-TH.d.ts +908 -0
  95. package/lib/locale/lang/th-TH.umd.d.ts +908 -0
  96. package/lib/locale/lang/ug-CN.d.ts +908 -0
  97. package/lib/locale/lang/ug-CN.umd.d.ts +908 -0
  98. package/lib/locale/lang/uk-UA.d.ts +908 -0
  99. package/lib/locale/lang/uk-UA.umd.d.ts +908 -0
  100. package/lib/locale/lang/uz-UZ.d.ts +908 -0
  101. package/lib/locale/lang/uz-UZ.umd.d.ts +908 -0
  102. package/lib/locale/lang/vi-VN.d.ts +908 -0
  103. package/lib/locale/lang/vi-VN.umd.d.ts +908 -0
  104. package/lib/locale/lang/zh-CHT.d.ts +908 -0
  105. package/lib/locale/lang/zh-CHT.umd.d.ts +908 -0
  106. package/lib/locale/lang/zh-CN.d.ts +908 -0
  107. package/lib/locale/lang/zh-CN.umd.d.ts +908 -0
  108. package/lib/locale/lang/zh-HK.d.ts +908 -0
  109. package/lib/locale/lang/zh-HK.umd.d.ts +908 -0
  110. package/lib/locale/lang/zh-MO.d.ts +908 -0
  111. package/lib/locale/lang/zh-MO.umd.d.ts +908 -0
  112. package/lib/locale/lang/zh-TC.d.ts +908 -0
  113. package/lib/locale/lang/zh-TC.umd.d.ts +908 -0
  114. package/lib/locale/lang/zh-TW.d.ts +908 -0
  115. package/lib/locale/lang/zh-TW.umd.d.ts +908 -0
  116. package/lib/locale/ms-MY.umd.d.ts +908 -0
  117. package/lib/locale/nb-NO.umd.d.ts +908 -0
  118. package/lib/locale/pt-BR.umd.d.ts +908 -0
  119. package/lib/locale/ru-RU.umd.d.ts +908 -0
  120. package/lib/locale/th-TH.umd.d.ts +908 -0
  121. package/lib/locale/ug-CN.umd.d.ts +908 -0
  122. package/lib/locale/uk-UA.umd.d.ts +908 -0
  123. package/lib/locale/uz-UZ.umd.d.ts +908 -0
  124. package/lib/locale/vi-VN.umd.d.ts +908 -0
  125. package/lib/locale/zh-CHT.umd.d.ts +908 -0
  126. package/lib/locale/zh-CN.umd.d.ts +908 -0
  127. package/lib/locale/zh-HK.umd.d.ts +908 -0
  128. package/lib/locale/zh-MO.umd.d.ts +908 -0
  129. package/lib/locale/zh-TC.umd.d.ts +908 -0
  130. package/lib/locale/zh-TW.umd.d.ts +908 -0
  131. package/lib/table/index.d.ts +2672 -0
  132. package/lib/table/module/custom/hook.d.ts +1 -0
  133. package/lib/table/module/custom/panel.d.ts +17 -0
  134. package/lib/table/module/custom/panel.js +1588 -1585
  135. package/lib/table/module/edit/hook.d.ts +1 -0
  136. package/lib/table/module/export/export-panel.d.ts +27 -0
  137. package/lib/table/module/export/export-panel.js +587 -584
  138. package/lib/table/module/export/hook.d.ts +1 -0
  139. package/lib/table/module/export/import-panel.d.ts +27 -0
  140. package/lib/table/module/export/import-panel.js +258 -255
  141. package/lib/table/module/export/util.d.ts +5 -0
  142. package/lib/table/module/filter/hook.d.ts +1 -0
  143. package/lib/table/module/filter/hook.js +1 -15
  144. package/lib/table/module/filter/panel.d.ts +16 -0
  145. package/lib/table/module/filter/panel.js +281 -278
  146. package/lib/table/module/keyboard/hook.d.ts +1 -0
  147. package/lib/table/module/menu/hook.d.ts +1 -0
  148. package/lib/table/module/menu/panel.d.ts +2 -0
  149. package/lib/table/module/menu/panel.js +225 -222
  150. package/lib/table/module/validator/hook.d.ts +1 -0
  151. package/lib/table/render/index.d.ts +1 -0
  152. package/lib/table/src/body.d.ts +24 -0
  153. package/lib/table/src/body.js +895 -892
  154. package/lib/table/src/cell.d.ts +192 -0
  155. package/lib/table/src/column.d.ts +263 -0
  156. package/lib/table/src/columnInfo.d.ts +13 -0
  157. package/lib/table/src/emits.d.ts +2 -0
  158. package/lib/table/src/emits.js +2 -2
  159. package/lib/table/src/footer.d.ts +45 -0
  160. package/lib/table/src/footer.js +341 -338
  161. package/lib/table/src/group.d.ts +178 -0
  162. package/lib/table/src/header.d.ts +26 -0
  163. package/lib/table/src/header.js +539 -536
  164. package/lib/table/src/props.d.ts +238 -0
  165. package/lib/table/src/props.js +2 -2
  166. package/lib/table/src/store.d.ts +6 -0
  167. package/lib/table/src/table.d.ts +539 -0
  168. package/lib/table/src/table.js +13 -8
  169. package/lib/table/src/use/cell-view.d.ts +10 -0
  170. package/lib/table/src/use/index.d.ts +1 -0
  171. package/lib/table/src/util.d.ts +74 -0
  172. package/lib/toolbar/index.d.ts +340 -0
  173. package/lib/toolbar/src/toolbar.d.ts +75 -0
  174. package/lib/ui/index.d.ts +85 -0
  175. package/lib/ui/index.js +1 -1
  176. package/lib/ui/src/anime.d.ts +10 -0
  177. package/lib/ui/src/comp.d.ts +2 -0
  178. package/lib/ui/src/dom.d.ts +80 -0
  179. package/lib/ui/src/log.d.ts +6 -0
  180. package/lib/ui/src/log.js +1 -1
  181. package/lib/ui/src/utils.d.ts +23 -0
  182. package/lib/ui/src/vn.d.ts +7 -0
  183. package/lib/v-x-e-table/index.d.ts +2 -0
  184. package/lib/vxe-colgroup/index.d.ts +3 -0
  185. package/lib/vxe-column/index.d.ts +3 -0
  186. package/lib/vxe-grid/index.d.ts +3 -0
  187. package/lib/vxe-table/index.d.ts +3 -0
  188. package/lib/vxe-toolbar/index.d.ts +3 -0
  189. package/lib/vxe-ui/index.d.ts +3 -0
  190. package/package.json +7 -7
  191. package/packages/grid/src/emits.ts +2 -2
  192. package/packages/grid/src/grid.ts +8 -8
  193. package/packages/grid/src/props.ts +3 -3
  194. package/packages/index.ts +2 -2
  195. package/packages/table/module/custom/panel.ts +2 -2
  196. package/packages/table/module/export/export-panel.ts +2 -2
  197. package/packages/table/module/export/import-panel.ts +2 -2
  198. package/packages/table/module/filter/hook.ts +1 -15
  199. package/packages/table/module/filter/panel.ts +2 -2
  200. package/packages/table/module/menu/panel.ts +2 -2
  201. package/packages/table/src/body.ts +2 -2
  202. package/packages/table/src/emits.ts +1 -1
  203. package/packages/table/src/footer.ts +2 -2
  204. package/packages/table/src/header.ts +2 -2
  205. package/packages/table/src/props.ts +1 -1
  206. package/packages/table/src/table.ts +21 -33
  207. /package/dist/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
  208. /package/dist/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
  209. /package/dist/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
  210. /package/es/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
  211. /package/es/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
  212. /package/es/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
  213. /package/lib/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
  214. /package/lib/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
  215. /package/lib/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
@@ -52,363 +52,386 @@ function createInternalData() {
52
52
  // customDragTime: null
53
53
  };
54
54
  }
55
- var panel_default = (0, import_comp.defineVxeComponent)({
56
- name: "TableCustomPanel",
57
- props: {
58
- customStore: {
59
- type: Object,
60
- default: () => ({})
61
- }
62
- },
63
- setup(props, context) {
64
- const xID = import_xe_utils.default.uniqueId();
65
- const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
66
- const VxeUIDrawerComponent = import_core.VxeUI.getComponent("VxeDrawer");
67
- const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
68
- const VxeUINumberInputComponent = import_core.VxeUI.getComponent("VxeNumberInput");
69
- const VxeUIRadioGroupComponent = import_core.VxeUI.getComponent("VxeRadioGroup");
70
- const $xeTable = (0, import_vue.inject)("$xeTable", {});
71
- const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
72
- const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
73
- const refElem = (0, import_vue.ref)();
74
- const refBodyWrapperElem = (0, import_vue.ref)();
75
- const refCustomBodyElem = (0, import_vue.ref)();
76
- const refDragLineElem = (0, import_vue.ref)();
77
- const refDragTipElem = (0, import_vue.ref)();
78
- const customPanelReactData = (0, import_vue.reactive)({
79
- dragCol: null,
80
- dragGroupField: null,
81
- dragAggFnCol: null,
82
- dragTipText: ""
83
- });
84
- let customPanelInternalData = createInternalData();
85
- const refMaps = {
86
- refElem,
87
- refBodyWrapperElem,
88
- refCustomBodyElem,
89
- refDragLineElem,
90
- refDragTipElem
91
- };
92
- const computeMaps = {};
93
- const handleWrapperMouseenterEvent = (evnt) => {
94
- const { customStore } = props;
95
- customStore.activeWrapper = true;
96
- $xeTable.customOpenEvent(evnt);
97
- };
98
- const handleWrapperMouseleaveEvent = (evnt) => {
99
- const { customStore } = props;
100
- customStore.activeWrapper = false;
101
- setTimeout(() => {
102
- if (!customStore.activeBtn && !customStore.activeWrapper) {
103
- $xeTable.customCloseEvent(evnt);
55
+ var panel_default = (
56
+ /* define-vxe-component start */
57
+ (0, import_comp.defineVxeComponent)({
58
+ name: "TableCustomPanel",
59
+ props: {
60
+ customStore: {
61
+ type: Object,
62
+ default: () => ({})
63
+ }
64
+ },
65
+ setup(props, context) {
66
+ const xID = import_xe_utils.default.uniqueId();
67
+ const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
68
+ const VxeUIDrawerComponent = import_core.VxeUI.getComponent("VxeDrawer");
69
+ const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
70
+ const VxeUINumberInputComponent = import_core.VxeUI.getComponent("VxeNumberInput");
71
+ const VxeUIRadioGroupComponent = import_core.VxeUI.getComponent("VxeRadioGroup");
72
+ const $xeTable = (0, import_vue.inject)("$xeTable", {});
73
+ const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
74
+ const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
75
+ const refElem = (0, import_vue.ref)();
76
+ const refBodyWrapperElem = (0, import_vue.ref)();
77
+ const refCustomBodyElem = (0, import_vue.ref)();
78
+ const refDragLineElem = (0, import_vue.ref)();
79
+ const refDragTipElem = (0, import_vue.ref)();
80
+ const customPanelReactData = (0, import_vue.reactive)({
81
+ dragCol: null,
82
+ dragGroupField: null,
83
+ dragAggFnCol: null,
84
+ dragTipText: ""
85
+ });
86
+ let customPanelInternalData = createInternalData();
87
+ const refMaps = {
88
+ refElem,
89
+ refBodyWrapperElem,
90
+ refCustomBodyElem,
91
+ refDragLineElem,
92
+ refDragTipElem
93
+ };
94
+ const computeMaps = {};
95
+ const handleWrapperMouseenterEvent = (evnt) => {
96
+ const { customStore } = props;
97
+ customStore.activeWrapper = true;
98
+ $xeTable.customOpenEvent(evnt);
99
+ };
100
+ const handleWrapperMouseleaveEvent = (evnt) => {
101
+ const { customStore } = props;
102
+ customStore.activeWrapper = false;
103
+ setTimeout(() => {
104
+ if (!customStore.activeBtn && !customStore.activeWrapper) {
105
+ $xeTable.customCloseEvent(evnt);
106
+ }
107
+ }, 300);
108
+ };
109
+ const confirmCustomEvent = ({ $event }) => {
110
+ tableReactData.isCustomStatus = true;
111
+ $xeTable.saveCustom();
112
+ $xeTable.closeCustom();
113
+ $xeTable.emitCustomEvent("confirm", $event);
114
+ $xeTable.dispatchEvent("custom-confirm", {}, $event);
115
+ $xeTable.emitCustomEvent("close", $event);
116
+ $xeTable.dispatchEvent("custom-close", {}, $event);
117
+ };
118
+ const cancelCloseEvent = ({ $event }) => {
119
+ $xeTable.closeCustom();
120
+ $xeTable.emitCustomEvent("close", $event);
121
+ $xeTable.dispatchEvent("custom-close", {}, $event);
122
+ };
123
+ const cancelCustomEvent = ({ $event }) => {
124
+ $xeTable.cancelCustom();
125
+ $xeTable.closeCustom();
126
+ $xeTable.emitCustomEvent("cancel", $event);
127
+ $xeTable.dispatchEvent("custom-cancel", {}, $event);
128
+ $xeTable.emitCustomEvent("close", $event);
129
+ $xeTable.dispatchEvent("custom-close", {}, $event);
130
+ };
131
+ const handleResetCustomEvent = (evnt) => {
132
+ $xeTable.resetCustom(true);
133
+ $xeTable.closeCustom();
134
+ $xeTable.emitCustomEvent("reset", evnt);
135
+ $xeTable.dispatchEvent("custom-reset", {}, evnt);
136
+ $xeTable.emitCustomEvent("close", evnt);
137
+ $xeTable.dispatchEvent("custom-close", {}, evnt);
138
+ };
139
+ const resetCustomEvent = ({ $event }) => {
140
+ if (import_core.VxeUI.modal) {
141
+ import_core.VxeUI.modal.confirm({
142
+ content: getI18n("vxe.custom.cstmConfirmRestore"),
143
+ className: "vxe-table--ignore-clear",
144
+ escClosable: true
145
+ }).then((type) => {
146
+ if (type === "confirm") {
147
+ handleResetCustomEvent($event);
148
+ }
149
+ });
150
+ } else {
151
+ handleResetCustomEvent($event);
104
152
  }
105
- }, 300);
106
- };
107
- const confirmCustomEvent = ({ $event }) => {
108
- tableReactData.isCustomStatus = true;
109
- $xeTable.saveCustom();
110
- $xeTable.closeCustom();
111
- $xeTable.emitCustomEvent("confirm", $event);
112
- $xeTable.dispatchEvent("custom-confirm", {}, $event);
113
- $xeTable.emitCustomEvent("close", $event);
114
- $xeTable.dispatchEvent("custom-close", {}, $event);
115
- };
116
- const cancelCloseEvent = ({ $event }) => {
117
- $xeTable.closeCustom();
118
- $xeTable.emitCustomEvent("close", $event);
119
- $xeTable.dispatchEvent("custom-close", {}, $event);
120
- };
121
- const cancelCustomEvent = ({ $event }) => {
122
- $xeTable.cancelCustom();
123
- $xeTable.closeCustom();
124
- $xeTable.emitCustomEvent("cancel", $event);
125
- $xeTable.dispatchEvent("custom-cancel", {}, $event);
126
- $xeTable.emitCustomEvent("close", $event);
127
- $xeTable.dispatchEvent("custom-close", {}, $event);
128
- };
129
- const handleResetCustomEvent = (evnt) => {
130
- $xeTable.resetCustom(true);
131
- $xeTable.closeCustom();
132
- $xeTable.emitCustomEvent("reset", evnt);
133
- $xeTable.dispatchEvent("custom-reset", {}, evnt);
134
- $xeTable.emitCustomEvent("close", evnt);
135
- $xeTable.dispatchEvent("custom-close", {}, evnt);
136
- };
137
- const resetCustomEvent = ({ $event }) => {
138
- if (import_core.VxeUI.modal) {
139
- import_core.VxeUI.modal.confirm({
140
- content: getI18n("vxe.custom.cstmConfirmRestore"),
141
- className: "vxe-table--ignore-clear",
142
- escClosable: true
143
- }).then((type) => {
144
- if (type === "confirm") {
145
- handleResetCustomEvent($event);
153
+ };
154
+ const handleOptionCheck = (column) => {
155
+ const { customColumnList } = tableReactData;
156
+ const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
157
+ if (matchObj && matchObj.parent) {
158
+ const { parent: parentItem } = matchObj;
159
+ if (parentItem.children && parentItem.children.length) {
160
+ parentItem.renderVisible = parentItem.children.every((column2) => column2.renderVisible);
161
+ parentItem.halfVisible = !parentItem.renderVisible && parentItem.children.some((column2) => column2.renderVisible || column2.halfVisible);
162
+ handleOptionCheck(parentItem);
146
163
  }
147
- });
148
- } else {
149
- handleResetCustomEvent($event);
150
- }
151
- };
152
- const handleOptionCheck = (column) => {
153
- const { customColumnList } = tableReactData;
154
- const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
155
- if (matchObj && matchObj.parent) {
156
- const { parent: parentItem } = matchObj;
157
- if (parentItem.children && parentItem.children.length) {
158
- parentItem.renderVisible = parentItem.children.every((column2) => column2.renderVisible);
159
- parentItem.halfVisible = !parentItem.renderVisible && parentItem.children.some((column2) => column2.renderVisible || column2.halfVisible);
160
- handleOptionCheck(parentItem);
161
164
  }
162
- }
163
- };
164
- const changeCheckboxOption = (column, evnt) => {
165
- const isChecked = !column.renderVisible;
166
- const customOpts = computeCustomOpts.value;
167
- if (customOpts.immediate) {
168
- import_xe_utils.default.eachTree([column], (item) => {
169
- item.visible = isChecked;
170
- item.renderVisible = isChecked;
171
- item.halfVisible = false;
172
- });
173
- tableReactData.isCustomStatus = true;
174
- $xeTable.handleCustom();
175
- $xeTable.saveCustomStore("update:visible");
176
- } else {
177
- import_xe_utils.default.eachTree([column], (item) => {
178
- item.renderVisible = isChecked;
179
- item.halfVisible = false;
180
- });
181
- }
182
- handleOptionCheck(column);
183
- $xeTable.checkCustomStatus();
184
- $xeTable.dispatchEvent("custom-visible-change", { column, checked: isChecked }, evnt);
185
- };
186
- const changeColumnWidth = (column) => {
187
- const customOpts = computeCustomOpts.value;
188
- if (customOpts.immediate) {
189
- if (column.renderResizeWidth !== column.renderWidth) {
190
- column.resizeWidth = column.renderResizeWidth;
191
- column.renderWidth = column.renderResizeWidth;
165
+ };
166
+ const changeCheckboxOption = (column, evnt) => {
167
+ const isChecked = !column.renderVisible;
168
+ const customOpts = computeCustomOpts.value;
169
+ if (customOpts.immediate) {
170
+ import_xe_utils.default.eachTree([column], (item) => {
171
+ item.visible = isChecked;
172
+ item.renderVisible = isChecked;
173
+ item.halfVisible = false;
174
+ });
192
175
  tableReactData.isCustomStatus = true;
193
176
  $xeTable.handleCustom();
194
- $xeTable.saveCustomStore("update:width");
195
- }
196
- }
197
- };
198
- const changeFixedOption = (column, colFixed, evnt) => {
199
- const isMaxFixedColumn = computeIsMaxFixedColumn.value;
200
- const customOpts = computeCustomOpts.value;
201
- let targetFixed = null;
202
- if (customOpts.immediate) {
203
- if (column.renderFixed === colFixed) {
204
- targetFixed = "";
205
- import_xe_utils.default.eachTree([column], (col) => {
206
- col.fixed = "";
207
- col.renderFixed = "";
208
- });
177
+ $xeTable.saveCustomStore("update:visible");
209
178
  } else {
210
- if (!isMaxFixedColumn || column.renderFixed) {
211
- targetFixed = colFixed;
179
+ import_xe_utils.default.eachTree([column], (item) => {
180
+ item.renderVisible = isChecked;
181
+ item.halfVisible = false;
182
+ });
183
+ }
184
+ handleOptionCheck(column);
185
+ $xeTable.checkCustomStatus();
186
+ $xeTable.dispatchEvent("custom-visible-change", { column, checked: isChecked }, evnt);
187
+ };
188
+ const changeColumnWidth = (column) => {
189
+ const customOpts = computeCustomOpts.value;
190
+ if (customOpts.immediate) {
191
+ if (column.renderResizeWidth !== column.renderWidth) {
192
+ column.resizeWidth = column.renderResizeWidth;
193
+ column.renderWidth = column.renderResizeWidth;
194
+ tableReactData.isCustomStatus = true;
195
+ $xeTable.handleCustom();
196
+ $xeTable.saveCustomStore("update:width");
197
+ }
198
+ }
199
+ };
200
+ const changeFixedOption = (column, colFixed, evnt) => {
201
+ const isMaxFixedColumn = computeIsMaxFixedColumn.value;
202
+ const customOpts = computeCustomOpts.value;
203
+ let targetFixed = null;
204
+ if (customOpts.immediate) {
205
+ if (column.renderFixed === colFixed) {
206
+ targetFixed = "";
212
207
  import_xe_utils.default.eachTree([column], (col) => {
213
- col.fixed = colFixed;
214
- col.renderFixed = colFixed;
208
+ col.fixed = "";
209
+ col.renderFixed = "";
215
210
  });
211
+ } else {
212
+ if (!isMaxFixedColumn || column.renderFixed) {
213
+ targetFixed = colFixed;
214
+ import_xe_utils.default.eachTree([column], (col) => {
215
+ col.fixed = colFixed;
216
+ col.renderFixed = colFixed;
217
+ });
218
+ }
216
219
  }
217
- }
218
- tableReactData.isCustomStatus = true;
219
- $xeTable.handleCustom();
220
- $xeTable.saveCustomStore("update:fixed");
221
- } else {
222
- if (column.renderFixed === colFixed) {
223
- targetFixed = "";
224
- import_xe_utils.default.eachTree([column], (col) => {
225
- col.renderFixed = "";
226
- });
220
+ tableReactData.isCustomStatus = true;
221
+ $xeTable.handleCustom();
222
+ $xeTable.saveCustomStore("update:fixed");
227
223
  } else {
228
- if (!isMaxFixedColumn || column.renderFixed) {
229
- targetFixed = colFixed;
224
+ if (column.renderFixed === colFixed) {
225
+ targetFixed = "";
230
226
  import_xe_utils.default.eachTree([column], (col) => {
231
- col.renderFixed = colFixed;
227
+ col.renderFixed = "";
232
228
  });
229
+ } else {
230
+ if (!isMaxFixedColumn || column.renderFixed) {
231
+ targetFixed = colFixed;
232
+ import_xe_utils.default.eachTree([column], (col) => {
233
+ col.renderFixed = colFixed;
234
+ });
235
+ }
233
236
  }
234
237
  }
235
- }
236
- if (targetFixed !== null) {
237
- $xeTable.dispatchEvent("custom-fixed-change", { column, fixed: targetFixed }, evnt);
238
- }
239
- };
240
- const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
241
- const customOpts = computeCustomOpts.value;
242
- if (customOpts.immediate) {
243
- column[colProperty] = targetAlign;
244
- column[renderProperty] = targetAlign;
245
- tableReactData.isCustomStatus = true;
246
- $xeTable.handleCustom();
247
- $xeTable.saveCustomStore(`update:${colProperty}`);
248
- } else {
249
- column[renderProperty] = targetAlign;
250
- }
251
- $xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
252
- };
253
- const allOptionEvent = (evnt) => {
254
- const { customStore } = tableReactData;
255
- const isAll = !customStore.isAll;
256
- $xeTable.toggleCustomAllCheckbox();
257
- $xeTable.dispatchEvent("custom-visible-all", { checked: isAll }, evnt);
258
- };
259
- const showDropTip = (evnt, optEl, showLine, dragPos) => {
260
- const bodyWrapperElem = refBodyWrapperElem.value;
261
- if (!bodyWrapperElem) {
262
- return;
263
- }
264
- const customBodyElem = refCustomBodyElem.value;
265
- if (!customBodyElem) {
266
- return;
267
- }
268
- const { prevDragToChild } = customPanelInternalData;
269
- const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
270
- const customBodyRect = customBodyElem.getBoundingClientRect();
271
- const dragLineEl = refDragLineElem.value;
272
- if (optEl) {
273
- if (dragLineEl) {
274
- if (showLine) {
275
- const optRect = optEl.getBoundingClientRect();
276
- dragLineEl.style.display = "block";
277
- dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
278
- dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
279
- dragLineEl.style.height = `${optRect.height}px`;
280
- dragLineEl.style.width = `${optRect.width}px`;
281
- dragLineEl.setAttribute("drag-pos", dragPos);
282
- dragLineEl.setAttribute("drag-to-child", prevDragToChild ? "y" : "n");
283
- } else {
284
- dragLineEl.style.display = "";
238
+ if (targetFixed !== null) {
239
+ $xeTable.dispatchEvent("custom-fixed-change", { column, fixed: targetFixed }, evnt);
240
+ }
241
+ };
242
+ const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
243
+ const customOpts = computeCustomOpts.value;
244
+ if (customOpts.immediate) {
245
+ column[colProperty] = targetAlign;
246
+ column[renderProperty] = targetAlign;
247
+ tableReactData.isCustomStatus = true;
248
+ $xeTable.handleCustom();
249
+ $xeTable.saveCustomStore(`update:${colProperty}`);
250
+ } else {
251
+ column[renderProperty] = targetAlign;
252
+ }
253
+ $xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
254
+ };
255
+ const allOptionEvent = (evnt) => {
256
+ const { customStore } = tableReactData;
257
+ const isAll = !customStore.isAll;
258
+ $xeTable.toggleCustomAllCheckbox();
259
+ $xeTable.dispatchEvent("custom-visible-all", { checked: isAll }, evnt);
260
+ };
261
+ const showDropTip = (evnt, optEl, showLine, dragPos) => {
262
+ const bodyWrapperElem = refBodyWrapperElem.value;
263
+ if (!bodyWrapperElem) {
264
+ return;
265
+ }
266
+ const customBodyElem = refCustomBodyElem.value;
267
+ if (!customBodyElem) {
268
+ return;
269
+ }
270
+ const { prevDragToChild } = customPanelInternalData;
271
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
272
+ const customBodyRect = customBodyElem.getBoundingClientRect();
273
+ const dragLineEl = refDragLineElem.value;
274
+ if (optEl) {
275
+ if (dragLineEl) {
276
+ if (showLine) {
277
+ const optRect = optEl.getBoundingClientRect();
278
+ dragLineEl.style.display = "block";
279
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
280
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
281
+ dragLineEl.style.height = `${optRect.height}px`;
282
+ dragLineEl.style.width = `${optRect.width}px`;
283
+ dragLineEl.setAttribute("drag-pos", dragPos);
284
+ dragLineEl.setAttribute("drag-to-child", prevDragToChild ? "y" : "n");
285
+ } else {
286
+ dragLineEl.style.display = "";
287
+ }
288
+ }
289
+ } else {
290
+ if (dragLineEl) {
291
+ dragLineEl.style.display = "node";
285
292
  }
286
293
  }
287
- } else {
294
+ const dragTipEl = refDragTipElem.value;
295
+ if (dragTipEl) {
296
+ dragTipEl.style.display = "block";
297
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
298
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
299
+ dragTipEl.setAttribute("drag-status", showLine ? prevDragToChild ? "sub" : "normal" : "disabled");
300
+ }
301
+ };
302
+ const updateColDropTipContent = () => {
303
+ const { dragCol } = customPanelReactData;
304
+ const columnDragOpts = computeColumnDragOpts.value;
305
+ const { tooltipMethod } = columnDragOpts;
306
+ let tipContent = "";
307
+ if (tooltipMethod) {
308
+ const dtParams = {
309
+ $table: $xeTable,
310
+ column: dragCol
311
+ };
312
+ tipContent = `${tooltipMethod(dtParams) || ""}`;
313
+ } else {
314
+ tipContent = getI18n("vxe.custom.cstmDragTarget", [dragCol && dragCol.type !== "html" ? dragCol.getTitle() : ""]);
315
+ }
316
+ customPanelReactData.dragTipText = tipContent;
317
+ };
318
+ const hideDropTip = () => {
319
+ const dragTipEl = refDragTipElem.value;
320
+ const dragLineEl = refDragLineElem.value;
321
+ if (dragTipEl) {
322
+ dragTipEl.style.display = "";
323
+ }
288
324
  if (dragLineEl) {
289
- dragLineEl.style.display = "node";
325
+ dragLineEl.style.display = "";
290
326
  }
291
- }
292
- const dragTipEl = refDragTipElem.value;
293
- if (dragTipEl) {
294
- dragTipEl.style.display = "block";
295
- dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
296
- dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
297
- dragTipEl.setAttribute("drag-status", showLine ? prevDragToChild ? "sub" : "normal" : "disabled");
298
- }
299
- };
300
- const updateColDropTipContent = () => {
301
- const { dragCol } = customPanelReactData;
302
- const columnDragOpts = computeColumnDragOpts.value;
303
- const { tooltipMethod } = columnDragOpts;
304
- let tipContent = "";
305
- if (tooltipMethod) {
306
- const dtParams = {
307
- $table: $xeTable,
308
- column: dragCol
309
- };
310
- tipContent = `${tooltipMethod(dtParams) || ""}`;
311
- } else {
312
- tipContent = getI18n("vxe.custom.cstmDragTarget", [dragCol && dragCol.type !== "html" ? dragCol.getTitle() : ""]);
313
- }
314
- customPanelReactData.dragTipText = tipContent;
315
- };
316
- const hideDropTip = () => {
317
- const dragTipEl = refDragTipElem.value;
318
- const dragLineEl = refDragLineElem.value;
319
- if (dragTipEl) {
320
- dragTipEl.style.display = "";
321
- }
322
- if (dragLineEl) {
323
- dragLineEl.style.display = "";
324
- }
325
- };
326
- const sortMousedownEvent = (evnt) => {
327
- const btnEl = evnt.currentTarget;
328
- const cellEl = btnEl.parentElement;
329
- const tdEl = cellEl.parentElement;
330
- const trEl = tdEl.parentElement;
331
- const colid = trEl.getAttribute("colid");
332
- const column = $xeTable.getColumnById(colid);
333
- trEl.draggable = true;
334
- customPanelReactData.dragCol = column;
335
- customPanelReactData.dragGroupField = null;
336
- customPanelReactData.dragAggFnCol = null;
337
- updateColDropTipContent();
338
- (0, import_dom.addClass)(trEl, "active--drag-origin");
339
- };
340
- const sortMouseupEvent = (evnt) => {
341
- const btnEl = evnt.currentTarget;
342
- const cellEl = btnEl.parentElement;
343
- const tdEl = cellEl.parentElement;
344
- const trEl = tdEl.parentElement;
345
- hideDropTip();
346
- trEl.draggable = false;
347
- customPanelReactData.dragCol = null;
348
- customPanelReactData.dragGroupField = null;
349
- customPanelReactData.dragAggFnCol = null;
350
- (0, import_dom.removeClass)(trEl, "active--drag-origin");
351
- };
352
- const sortDragstartEvent = (evnt) => {
353
- const { customDragTime } = customPanelInternalData;
354
- if (evnt.dataTransfer) {
355
- evnt.dataTransfer.setDragImage((0, import_dom.getTpImg)(), 0, 0);
356
- }
357
- if (customDragTime) {
358
- clearTimeout(customDragTime);
359
- }
360
- tableReactData.isCustomDragStatus = true;
361
- customPanelInternalData.prevDragGroupField = null;
362
- customPanelInternalData.prevDragAggFnColid = null;
363
- };
364
- const sortDragendEvent = (evnt) => {
365
- const { mouseConfig } = tableProps;
366
- const { customColumnList } = tableReactData;
367
- const { collectColumn } = tableInternalData;
368
- const customOpts = computeCustomOpts.value;
369
- const mouseOpts = computeMouseOpts.value;
370
- const { immediate } = customOpts;
371
- const trEl = evnt.currentTarget;
372
- const columnDragOpts = computeColumnDragOpts.value;
373
- const { isCrossDrag, isPeerDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
374
- const { dragCol } = customPanelReactData;
375
- const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData;
376
- const dragOffsetIndex = prevDragPos === "bottom" ? 1 : 0;
377
- if (prevDragGroupField || prevDragAggFnColid) {
378
- if ($xeTable.handlePivotTableAggPanelDragendEvent) {
379
- $xeTable.handlePivotTableAggPanelDragendEvent(evnt);
327
+ };
328
+ const sortMousedownEvent = (evnt) => {
329
+ const btnEl = evnt.currentTarget;
330
+ const cellEl = btnEl.parentElement;
331
+ const tdEl = cellEl.parentElement;
332
+ const trEl = tdEl.parentElement;
333
+ const colid = trEl.getAttribute("colid");
334
+ const column = $xeTable.getColumnById(colid);
335
+ trEl.draggable = true;
336
+ customPanelReactData.dragCol = column;
337
+ customPanelReactData.dragGroupField = null;
338
+ customPanelReactData.dragAggFnCol = null;
339
+ updateColDropTipContent();
340
+ (0, import_dom.addClass)(trEl, "active--drag-origin");
341
+ };
342
+ const sortMouseupEvent = (evnt) => {
343
+ const btnEl = evnt.currentTarget;
344
+ const cellEl = btnEl.parentElement;
345
+ const tdEl = cellEl.parentElement;
346
+ const trEl = tdEl.parentElement;
347
+ hideDropTip();
348
+ trEl.draggable = false;
349
+ customPanelReactData.dragCol = null;
350
+ customPanelReactData.dragGroupField = null;
351
+ customPanelReactData.dragAggFnCol = null;
352
+ (0, import_dom.removeClass)(trEl, "active--drag-origin");
353
+ };
354
+ const sortDragstartEvent = (evnt) => {
355
+ const { customDragTime } = customPanelInternalData;
356
+ if (evnt.dataTransfer) {
357
+ evnt.dataTransfer.setDragImage((0, import_dom.getTpImg)(), 0, 0);
380
358
  }
381
- } else if (prevDragCol && dragCol) {
382
- if (prevDragCol !== dragCol) {
383
- const dragColumn = dragCol;
384
- const newColumn = prevDragCol;
385
- Promise.resolve(
386
- dragEndMethod ? dragEndMethod({
387
- oldColumn: dragColumn,
388
- newColumn,
389
- dragColumn,
390
- dragPos: prevDragPos,
391
- dragToChild: !!prevDragToChild,
392
- offsetIndex: dragOffsetIndex
393
- }) : true
394
- ).then((status) => {
395
- if (!status) {
396
- return;
397
- }
398
- let oafIndex = -1;
399
- let nafIndex = -1;
400
- const oldAllMaps = {};
401
- import_xe_utils.default.eachTree([dragColumn], (column) => {
402
- oldAllMaps[column.id] = column;
403
- });
404
- let isSelfToChildStatus = false;
405
- if (immediate) {
406
- if (dragColumn.parentId && newColumn.parentId) {
407
- if (isPeerDrag && !isCrossDrag) {
408
- if (dragColumn.parentId !== newColumn.parentId) {
359
+ if (customDragTime) {
360
+ clearTimeout(customDragTime);
361
+ }
362
+ tableReactData.isCustomDragStatus = true;
363
+ customPanelInternalData.prevDragGroupField = null;
364
+ customPanelInternalData.prevDragAggFnColid = null;
365
+ };
366
+ const sortDragendEvent = (evnt) => {
367
+ const { mouseConfig } = tableProps;
368
+ const { customColumnList } = tableReactData;
369
+ const { collectColumn } = tableInternalData;
370
+ const customOpts = computeCustomOpts.value;
371
+ const mouseOpts = computeMouseOpts.value;
372
+ const { immediate } = customOpts;
373
+ const trEl = evnt.currentTarget;
374
+ const columnDragOpts = computeColumnDragOpts.value;
375
+ const { isCrossDrag, isPeerDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
376
+ const { dragCol } = customPanelReactData;
377
+ const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData;
378
+ const dragOffsetIndex = prevDragPos === "bottom" ? 1 : 0;
379
+ if (prevDragGroupField || prevDragAggFnColid) {
380
+ if ($xeTable.handlePivotTableAggPanelDragendEvent) {
381
+ $xeTable.handlePivotTableAggPanelDragendEvent(evnt);
382
+ }
383
+ } else if (prevDragCol && dragCol) {
384
+ if (prevDragCol !== dragCol) {
385
+ const dragColumn = dragCol;
386
+ const newColumn = prevDragCol;
387
+ Promise.resolve(
388
+ dragEndMethod ? dragEndMethod({
389
+ oldColumn: dragColumn,
390
+ newColumn,
391
+ dragColumn,
392
+ dragPos: prevDragPos,
393
+ dragToChild: !!prevDragToChild,
394
+ offsetIndex: dragOffsetIndex
395
+ }) : true
396
+ ).then((status) => {
397
+ if (!status) {
398
+ return;
399
+ }
400
+ let oafIndex = -1;
401
+ let nafIndex = -1;
402
+ const oldAllMaps = {};
403
+ import_xe_utils.default.eachTree([dragColumn], (column) => {
404
+ oldAllMaps[column.id] = column;
405
+ });
406
+ let isSelfToChildStatus = false;
407
+ if (immediate) {
408
+ if (dragColumn.parentId && newColumn.parentId) {
409
+ if (isPeerDrag && !isCrossDrag) {
410
+ if (dragColumn.parentId !== newColumn.parentId) {
411
+ return;
412
+ }
413
+ } else {
414
+ if (!isCrossDrag) {
415
+ return;
416
+ }
417
+ if (oldAllMaps[newColumn.id]) {
418
+ isSelfToChildStatus = true;
419
+ if (!(isCrossDrag && isSelfToChildDrag)) {
420
+ if (import_core.VxeUI.modal) {
421
+ import_core.VxeUI.modal.message({
422
+ status: "error",
423
+ content: getI18n("vxe.error.treeDragChild")
424
+ });
425
+ }
426
+ return;
427
+ }
428
+ }
429
+ }
430
+ } else if (dragColumn.parentId) {
431
+ if (!isCrossDrag) {
409
432
  return;
410
433
  }
411
- } else {
434
+ } else if (newColumn.parentId) {
412
435
  if (!isCrossDrag) {
413
436
  return;
414
437
  }
@@ -424,1301 +447,1309 @@ var panel_default = (0, import_comp.defineVxeComponent)({
424
447
  return;
425
448
  }
426
449
  }
450
+ } else {
427
451
  }
428
- } else if (dragColumn.parentId) {
429
- if (!isCrossDrag) {
430
- return;
431
- }
432
- } else if (newColumn.parentId) {
433
- if (!isCrossDrag) {
434
- return;
435
- }
436
- if (oldAllMaps[newColumn.id]) {
437
- isSelfToChildStatus = true;
438
- if (!(isCrossDrag && isSelfToChildDrag)) {
439
- if (import_core.VxeUI.modal) {
440
- import_core.VxeUI.modal.message({
441
- status: "error",
442
- content: getI18n("vxe.error.treeDragChild")
443
- });
452
+ const oldewMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === dragColumn.id);
453
+ if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
454
+ if (oldewMatchRest) {
455
+ const { items: oCols, index: oIndex } = oldewMatchRest;
456
+ const childList = dragColumn.children || [];
457
+ childList.forEach((column) => {
458
+ column.parentId = dragColumn.parentId;
459
+ });
460
+ oCols.splice(oIndex, 1, ...childList);
461
+ dragColumn.children = [];
462
+ }
463
+ } else {
464
+ if (oldewMatchRest) {
465
+ const { items: oCols, index: oIndex, parent: oParent } = oldewMatchRest;
466
+ oCols.splice(oIndex, 1);
467
+ if (!oParent) {
468
+ oafIndex = oIndex;
444
469
  }
445
- return;
446
470
  }
447
471
  }
448
- } else {
449
- }
450
- const oldewMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === dragColumn.id);
451
- if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
452
- if (oldewMatchRest) {
453
- const { items: oCols, index: oIndex } = oldewMatchRest;
454
- const childList = dragColumn.children || [];
455
- childList.forEach((column) => {
456
- column.parentId = dragColumn.parentId;
457
- });
458
- oCols.splice(oIndex, 1, ...childList);
459
- dragColumn.children = [];
460
- }
461
- } else {
462
- if (oldewMatchRest) {
463
- const { items: oCols, index: oIndex, parent: oParent } = oldewMatchRest;
464
- oCols.splice(oIndex, 1);
465
- if (!oParent) {
466
- oafIndex = oIndex;
472
+ const newMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === newColumn.id);
473
+ if (newMatchRest) {
474
+ const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
475
+ if (isCrossDrag && isToChildDrag && prevDragToChild) {
476
+ dragColumn.parentId = newColumn.id;
477
+ newColumn.children = (newColumn.children || []).concat([dragColumn]);
478
+ } else {
479
+ dragColumn.parentId = newColumn.parentId;
480
+ nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
481
+ }
482
+ if (!nParent) {
483
+ nafIndex = nIndex;
467
484
  }
468
485
  }
486
+ import_xe_utils.default.eachTree(collectColumn, (column, index, items, path, parentItem) => {
487
+ if (!parentItem) {
488
+ const sortIndex = index + 1;
489
+ column.renderSortNumber = sortIndex;
490
+ }
491
+ });
492
+ } else {
493
+ oafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === dragColumn.id);
494
+ customColumnList.splice(oafIndex, 1);
495
+ nafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === newColumn.id);
496
+ customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
469
497
  }
470
- const newMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === newColumn.id);
471
- if (newMatchRest) {
472
- const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
473
- if (isCrossDrag && isToChildDrag && prevDragToChild) {
474
- dragColumn.parentId = newColumn.id;
475
- newColumn.children = (newColumn.children || []).concat([dragColumn]);
476
- } else {
477
- dragColumn.parentId = newColumn.parentId;
478
- nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
498
+ if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
499
+ if ($xeTable.clearSelected) {
500
+ $xeTable.clearSelected();
479
501
  }
480
- if (!nParent) {
481
- nafIndex = nIndex;
502
+ if ($xeTable.clearCellAreas) {
503
+ $xeTable.clearCellAreas();
504
+ $xeTable.clearCopyCellArea();
482
505
  }
483
506
  }
484
- import_xe_utils.default.eachTree(collectColumn, (column, index, items, path, parentItem) => {
485
- if (!parentItem) {
486
- const sortIndex = index + 1;
487
- column.renderSortNumber = sortIndex;
507
+ const csParams = {
508
+ oldColumn: dragColumn,
509
+ newColumn,
510
+ dragColumn,
511
+ dragPos: prevDragPos,
512
+ offsetIndex: dragOffsetIndex,
513
+ _index: {
514
+ newIndex: nafIndex,
515
+ oldIndex: oafIndex
488
516
  }
489
- });
490
- } else {
491
- oafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === dragColumn.id);
492
- customColumnList.splice(oafIndex, 1);
493
- nafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === newColumn.id);
494
- customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
495
- }
496
- if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
497
- if ($xeTable.clearSelected) {
498
- $xeTable.clearSelected();
499
- }
500
- if ($xeTable.clearCellAreas) {
501
- $xeTable.clearCellAreas();
502
- $xeTable.clearCopyCellArea();
503
- }
504
- }
505
- const csParams = {
506
- oldColumn: dragColumn,
507
- newColumn,
508
- dragColumn,
509
- dragPos: prevDragPos,
510
- offsetIndex: dragOffsetIndex,
511
- _index: {
512
- newIndex: nafIndex,
513
- oldIndex: oafIndex
517
+ };
518
+ $xeTable.dispatchEvent("custom-sort-change", csParams, evnt);
519
+ $xeTable.dispatchEvent("column-dragend", csParams, evnt);
520
+ if (immediate) {
521
+ tableReactData.customColumnList = collectColumn.slice(0);
522
+ $xeTable.handleColDragSwapColumn();
514
523
  }
515
- };
516
- $xeTable.dispatchEvent("custom-sort-change", csParams, evnt);
517
- $xeTable.dispatchEvent("column-dragend", csParams, evnt);
518
- if (immediate) {
519
- tableReactData.customColumnList = collectColumn.slice(0);
520
- $xeTable.handleColDragSwapColumn();
521
- }
522
- clearDragAnimateStatus();
523
- }).catch(() => {
524
- });
524
+ clearDragAnimateStatus();
525
+ }).catch(() => {
526
+ });
527
+ }
525
528
  }
526
- }
527
- hideDropTip();
528
- customPanelReactData.dragCol = null;
529
- customPanelReactData.dragGroupField = null;
530
- customPanelReactData.dragAggFnCol = null;
531
- customPanelInternalData.prevDragGroupField = null;
532
- customPanelInternalData.prevDragAggFnColid = null;
533
- trEl.draggable = false;
534
- trEl.removeAttribute("drag-pos");
535
- (0, import_dom.removeClass)(trEl, "active--drag-target");
536
- (0, import_dom.removeClass)(trEl, "active--drag-origin");
537
- };
538
- const sortDragoverEvent = (evnt) => {
539
- const customOpts = computeCustomOpts.value;
540
- const { showSortDragButton, allowSort, immediate } = customOpts;
541
- const columnDragOpts = computeColumnDragOpts.value;
542
- const { isCrossDrag, isPeerDrag, isToChildDrag } = columnDragOpts;
543
- const optEl = evnt.currentTarget;
544
- const isControlKey = (0, import_dom.hasControlKey)(evnt);
545
- const colid = optEl.getAttribute("colid");
546
- const column = $xeTable.getColumnById(colid);
547
- const { dragCol } = customPanelReactData;
548
- customPanelInternalData.prevDragGroupField = null;
549
- customPanelInternalData.prevDragAggFnColid = null;
550
- if (column && (isCrossDrag || isPeerDrag || column.level === 1)) {
551
- evnt.preventDefault();
552
- const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
553
- const dragPos = offsetY < optEl.clientHeight / 2 ? "top" : "bottom";
554
- if (!dragCol || !(showSortDragButton && allowSort) || dragCol && dragCol.id === column.id || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : column.level > 1) || !immediate && column.level > 1 || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : dragCol.level > 1) || !immediate && dragCol.level > 1) {
555
- showDropTip(evnt, optEl, false, dragPos);
556
- return;
529
+ hideDropTip();
530
+ customPanelReactData.dragCol = null;
531
+ customPanelReactData.dragGroupField = null;
532
+ customPanelReactData.dragAggFnCol = null;
533
+ customPanelInternalData.prevDragGroupField = null;
534
+ customPanelInternalData.prevDragAggFnColid = null;
535
+ trEl.draggable = false;
536
+ trEl.removeAttribute("drag-pos");
537
+ (0, import_dom.removeClass)(trEl, "active--drag-target");
538
+ (0, import_dom.removeClass)(trEl, "active--drag-origin");
539
+ };
540
+ const sortDragoverEvent = (evnt) => {
541
+ const customOpts = computeCustomOpts.value;
542
+ const { showSortDragButton, allowSort, immediate } = customOpts;
543
+ const columnDragOpts = computeColumnDragOpts.value;
544
+ const { isCrossDrag, isPeerDrag, isToChildDrag } = columnDragOpts;
545
+ const optEl = evnt.currentTarget;
546
+ const isControlKey = (0, import_dom.hasControlKey)(evnt);
547
+ const colid = optEl.getAttribute("colid");
548
+ const column = $xeTable.getColumnById(colid);
549
+ const { dragCol } = customPanelReactData;
550
+ customPanelInternalData.prevDragGroupField = null;
551
+ customPanelInternalData.prevDragAggFnColid = null;
552
+ if (column && (isCrossDrag || isPeerDrag || column.level === 1)) {
553
+ evnt.preventDefault();
554
+ const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
555
+ const dragPos = offsetY < optEl.clientHeight / 2 ? "top" : "bottom";
556
+ if (!dragCol || !(showSortDragButton && allowSort) || dragCol && dragCol.id === column.id || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : column.level > 1) || !immediate && column.level > 1 || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : dragCol.level > 1) || !immediate && dragCol.level > 1) {
557
+ showDropTip(evnt, optEl, false, dragPos);
558
+ return;
559
+ }
560
+ customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
561
+ customPanelInternalData.prevDragCol = column;
562
+ customPanelInternalData.prevDragPos = dragPos;
563
+ showDropTip(evnt, optEl, true, dragPos);
557
564
  }
558
- customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
559
- customPanelInternalData.prevDragCol = column;
560
- customPanelInternalData.prevDragPos = dragPos;
561
- showDropTip(evnt, optEl, true, dragPos);
562
- }
563
- };
564
- const clearDragAnimateStatus = () => {
565
- customPanelInternalData.customDragTime = setTimeout(() => {
566
- tableReactData.isCustomDragStatus = false;
567
- customPanelInternalData.customDragTime = void 0;
568
- }, 350);
569
- };
570
- const sortMoveUpEvent = (evntParame, column) => {
571
- const { customColumnList } = tableReactData;
572
- const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
573
- if (matchObj) {
574
- const { item, items, index } = matchObj;
575
- if (index > 0) {
576
- tableReactData.isCustomDragStatus = true;
577
- (0, import_vue.nextTick)(() => {
578
- items.splice(index, 1);
579
- items.splice(index - 1, 0, item);
580
- clearDragAnimateStatus();
581
- });
565
+ };
566
+ const clearDragAnimateStatus = () => {
567
+ customPanelInternalData.customDragTime = setTimeout(() => {
568
+ tableReactData.isCustomDragStatus = false;
569
+ customPanelInternalData.customDragTime = void 0;
570
+ }, 350);
571
+ };
572
+ const sortMoveUpEvent = (evntParame, column) => {
573
+ const { customColumnList } = tableReactData;
574
+ const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
575
+ if (matchObj) {
576
+ const { item, items, index } = matchObj;
577
+ if (index > 0) {
578
+ tableReactData.isCustomDragStatus = true;
579
+ (0, import_vue.nextTick)(() => {
580
+ items.splice(index, 1);
581
+ items.splice(index - 1, 0, item);
582
+ clearDragAnimateStatus();
583
+ });
584
+ }
582
585
  }
583
- }
584
- };
585
- const sortMoveDnEvent = (evntParame, column) => {
586
- const { customColumnList } = tableReactData;
587
- const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
588
- if (matchObj) {
589
- const { item, items, index } = matchObj;
590
- if (index < items.length - 1) {
591
- tableReactData.isCustomDragStatus = true;
592
- (0, import_vue.nextTick)(() => {
593
- items.splice(index, 1);
594
- items.splice(index + 1, 0, item);
595
- clearDragAnimateStatus();
596
- });
586
+ };
587
+ const sortMoveDnEvent = (evntParame, column) => {
588
+ const { customColumnList } = tableReactData;
589
+ const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
590
+ if (matchObj) {
591
+ const { item, items, index } = matchObj;
592
+ if (index < items.length - 1) {
593
+ tableReactData.isCustomDragStatus = true;
594
+ (0, import_vue.nextTick)(() => {
595
+ items.splice(index, 1);
596
+ items.splice(index + 1, 0, item);
597
+ clearDragAnimateStatus();
598
+ });
599
+ }
597
600
  }
598
- }
599
- };
600
- const sortMoveTopEvent = (evntParame, column) => {
601
- const { customColumnList } = tableReactData;
602
- const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
603
- if (matchObj) {
604
- const { item, items, index, parent: parentItem } = matchObj;
605
- if (parentItem || index > 0) {
606
- tableReactData.isCustomDragStatus = true;
607
- (0, import_vue.nextTick)(() => {
608
- item.parentId = null;
609
- items.splice(index, 1);
610
- customColumnList.unshift(item);
611
- clearDragAnimateStatus();
612
- });
601
+ };
602
+ const sortMoveTopEvent = (evntParame, column) => {
603
+ const { customColumnList } = tableReactData;
604
+ const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
605
+ if (matchObj) {
606
+ const { item, items, index, parent: parentItem } = matchObj;
607
+ if (parentItem || index > 0) {
608
+ tableReactData.isCustomDragStatus = true;
609
+ (0, import_vue.nextTick)(() => {
610
+ item.parentId = null;
611
+ items.splice(index, 1);
612
+ customColumnList.unshift(item);
613
+ clearDragAnimateStatus();
614
+ });
615
+ }
613
616
  }
614
- }
615
- };
616
- const sortMoveBottomEvent = (evntParame, column) => {
617
- const { customColumnList } = tableReactData;
618
- const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
619
- if (matchObj) {
620
- const { item, items, index, parent: parentItem } = matchObj;
621
- if (parentItem || index < items.length - 1) {
622
- tableReactData.isCustomDragStatus = true;
623
- (0, import_vue.nextTick)(() => {
624
- item.parentId = null;
625
- items.splice(index, 1);
626
- customColumnList.push(item);
627
- clearDragAnimateStatus();
628
- });
617
+ };
618
+ const sortMoveBottomEvent = (evntParame, column) => {
619
+ const { customColumnList } = tableReactData;
620
+ const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
621
+ if (matchObj) {
622
+ const { item, items, index, parent: parentItem } = matchObj;
623
+ if (parentItem || index < items.length - 1) {
624
+ tableReactData.isCustomDragStatus = true;
625
+ (0, import_vue.nextTick)(() => {
626
+ item.parentId = null;
627
+ items.splice(index, 1);
628
+ customColumnList.push(item);
629
+ clearDragAnimateStatus();
630
+ });
631
+ }
629
632
  }
630
- }
631
- };
632
- const renderDragTip = () => {
633
- const { dragTipText } = customPanelReactData;
634
- const columnDragOpts = computeColumnDragOpts.value;
635
- return (0, import_vue.h)("div", {}, [
636
- (0, import_vue.h)("div", {
637
- ref: refDragLineElem,
638
- class: [
639
- "vxe-table-custom-popup--drag-line",
640
- {
641
- "is--guides": columnDragOpts.showGuidesStatus
642
- }
643
- ]
644
- }),
645
- (0, import_vue.h)(
646
- "div",
647
- {
648
- ref: refDragTipElem,
649
- class: "vxe-table-custom-popup--drag-tip"
650
- },
651
- [
652
- (0, import_vue.h)(
653
- "div",
654
- {
655
- class: "vxe-table-custom-popup--drag-tip-wrapper"
656
- },
657
- [
658
- (0, import_vue.h)(
659
- "div",
660
- {
661
- class: "vxe-table-custom-popup--drag-tip-status"
662
- },
663
- [
664
- (0, import_vue.h)("span", {
665
- class: ["vxe-table-custom-popup--drag-tip-normal-status", getIcon().TABLE_DRAG_STATUS_ROW]
666
- }),
667
- (0, import_vue.h)("span", {
668
- class: ["vxe-table-custom-popup--drag-tip-sub-status", getIcon().TABLE_DRAG_STATUS_SUB_ROW]
669
- }),
670
- (0, import_vue.h)("span", {
671
- class: ["vxe-table-custom-popup--drag-tip-group-status", getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
672
- }),
673
- (0, import_vue.h)("span", {
674
- class: ["vxe-table-custom-popup--drag-tip-values-status", getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
675
- }),
676
- (0, import_vue.h)("span", {
677
- class: ["vxe-table-custom-popup--drag-tip-disabled-status", getIcon().TABLE_DRAG_DISABLED]
678
- })
679
- ]
680
- ),
681
- (0, import_vue.h)(
682
- "div",
683
- {
684
- class: "vxe-table-custom-popup--drag-tip-content"
685
- },
686
- `${dragTipText || ""}`
687
- )
688
- ]
689
- )
690
- ]
691
- )
692
- ]);
693
- };
694
- const renderSimplePanel = () => {
695
- const $xeGrid = $xeTable.xeGrid;
696
- const $xeGantt = $xeTable.xeGantt;
697
- const tableProps2 = $xeTable.props;
698
- const { customStore } = props;
699
- const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps2;
700
- const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
701
- const customOpts = computeCustomOpts.value;
702
- const columnDragOpts = computeColumnDragOpts.value;
703
- const { defPopupStyle } = customStore;
704
- const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
705
- const isMaxFixedColumn = computeIsMaxFixedColumn.value;
706
- const vSize = computeSize.value;
707
- const { isCrossDrag, isPeerDrag } = columnDragOpts;
708
- const slots = customOpts.slots || {};
709
- const headerSlot = slots.header;
710
- const topSlot = slots.top;
711
- const bottomSlot = slots.bottom;
712
- const defaultSlot = slots.default;
713
- const footerSlot = slots.footer;
714
- const colVNs = [];
715
- const customWrapperOns = {};
716
- const isAllChecked = customStore.isAll;
717
- const isAllIndeterminate = customStore.isIndeterminate;
718
- if (trigger === "hover") {
719
- customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
720
- customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
721
- }
722
- const params = {
723
- $table: $xeTable,
724
- $grid: $xeGrid,
725
- $gantt: $xeGantt,
726
- columns: customColumnList,
727
- isAllChecked,
728
- isAllIndeterminate,
729
- isCustomStatus
730
633
  };
731
- import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
732
- const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
733
- if (isVisible) {
734
- const isChecked = column.renderVisible;
735
- const isIndeterminate = column.halfVisible;
736
- const isColGroup = column.children && column.children.length;
737
- const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
738
- const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
739
- const isHidden = !isChecked;
740
- const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
741
- colVNs.push(
742
- (0, import_vue.h)(
743
- "li",
634
+ const renderDragTip = () => {
635
+ const { dragTipText } = customPanelReactData;
636
+ const columnDragOpts = computeColumnDragOpts.value;
637
+ return (0, import_vue.h)("div", {}, [
638
+ (0, import_vue.h)("div", {
639
+ ref: refDragLineElem,
640
+ class: [
641
+ "vxe-table-custom-popup--drag-line",
744
642
  {
745
- key: column.id,
746
- colid: column.id,
747
- class: [
748
- "vxe-table-custom--option",
749
- `level--${column.level}`,
750
- {
751
- "is--hidden": isDisabled || isHidden,
752
- "is--group": isColGroup
753
- }
754
- ],
755
- onDragstart: sortDragstartEvent,
756
- onDragend: sortDragendEvent,
757
- onDragover: sortDragoverEvent
758
- },
759
- [
760
- allowVisible ? (0, import_vue.h)(
761
- "div",
762
- {
763
- class: [
764
- "vxe-table-custom--checkbox-option",
765
- {
766
- "is--checked": isChecked,
767
- "is--indeterminate": isIndeterminate,
768
- "is--disabled": isDisabled
769
- }
770
- ],
771
- title: getI18n("vxe.custom.setting.colVisible"),
772
- onClick: (evnt) => {
773
- if (!isDisabled) {
774
- changeCheckboxOption(column, evnt);
775
- }
643
+ "is--guides": columnDragOpts.showGuidesStatus
644
+ }
645
+ ]
646
+ }),
647
+ (0, import_vue.h)(
648
+ "div",
649
+ {
650
+ ref: refDragTipElem,
651
+ class: "vxe-table-custom-popup--drag-tip"
652
+ },
653
+ [
654
+ (0, import_vue.h)(
655
+ "div",
656
+ {
657
+ class: "vxe-table-custom-popup--drag-tip-wrapper"
658
+ },
659
+ [
660
+ (0, import_vue.h)(
661
+ "div",
662
+ {
663
+ class: "vxe-table-custom-popup--drag-tip-status"
664
+ },
665
+ [
666
+ (0, import_vue.h)("span", {
667
+ class: ["vxe-table-custom-popup--drag-tip-normal-status", getIcon().TABLE_DRAG_STATUS_ROW]
668
+ }),
669
+ (0, import_vue.h)("span", {
670
+ class: ["vxe-table-custom-popup--drag-tip-sub-status", getIcon().TABLE_DRAG_STATUS_SUB_ROW]
671
+ }),
672
+ (0, import_vue.h)("span", {
673
+ class: ["vxe-table-custom-popup--drag-tip-group-status", getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
674
+ }),
675
+ (0, import_vue.h)("span", {
676
+ class: ["vxe-table-custom-popup--drag-tip-values-status", getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
677
+ }),
678
+ (0, import_vue.h)("span", {
679
+ class: ["vxe-table-custom-popup--drag-tip-disabled-status", getIcon().TABLE_DRAG_DISABLED]
680
+ })
681
+ ]
682
+ ),
683
+ (0, import_vue.h)(
684
+ "div",
685
+ {
686
+ class: "vxe-table-custom-popup--drag-tip-content"
687
+ },
688
+ `${dragTipText || ""}`
689
+ )
690
+ ]
691
+ )
692
+ ]
693
+ )
694
+ ]);
695
+ };
696
+ const renderSimplePanel = () => {
697
+ const $xeGrid = $xeTable.xeGrid;
698
+ const $xeGantt = $xeTable.xeGantt;
699
+ const tableProps2 = $xeTable.props;
700
+ const { customStore } = props;
701
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps2;
702
+ const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
703
+ const customOpts = computeCustomOpts.value;
704
+ const columnDragOpts = computeColumnDragOpts.value;
705
+ const { defPopupStyle } = customStore;
706
+ const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
707
+ const isMaxFixedColumn = computeIsMaxFixedColumn.value;
708
+ const vSize = computeSize.value;
709
+ const { isCrossDrag, isPeerDrag } = columnDragOpts;
710
+ const slots = customOpts.slots || {};
711
+ const headerSlot = slots.header;
712
+ const topSlot = slots.top;
713
+ const bottomSlot = slots.bottom;
714
+ const defaultSlot = slots.default;
715
+ const footerSlot = slots.footer;
716
+ const colVNs = [];
717
+ const customWrapperOns = {};
718
+ const isAllChecked = customStore.isAll;
719
+ const isAllIndeterminate = customStore.isIndeterminate;
720
+ if (trigger === "hover") {
721
+ customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
722
+ customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
723
+ }
724
+ const params = {
725
+ $table: $xeTable,
726
+ $grid: $xeGrid,
727
+ $gantt: $xeGantt,
728
+ columns: customColumnList,
729
+ isAllChecked,
730
+ isAllIndeterminate,
731
+ isCustomStatus
732
+ };
733
+ import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
734
+ const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
735
+ if (isVisible) {
736
+ const isChecked = column.renderVisible;
737
+ const isIndeterminate = column.halfVisible;
738
+ const isColGroup = column.children && column.children.length;
739
+ const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
740
+ const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
741
+ const isHidden = !isChecked;
742
+ const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
743
+ colVNs.push(
744
+ (0, import_vue.h)(
745
+ "li",
746
+ {
747
+ key: column.id,
748
+ colid: column.id,
749
+ class: [
750
+ "vxe-table-custom--option",
751
+ `level--${column.level}`,
752
+ {
753
+ "is--hidden": isDisabled || isHidden,
754
+ "is--group": isColGroup
776
755
  }
777
- },
778
- [
779
- (0, import_vue.h)("span", {
780
- class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
781
- })
782
- ]
783
- ) : renderEmptyElement($xeTable),
784
- (0, import_vue.h)(
785
- "div",
786
- {
787
- class: "vxe-table-custom--name-option"
788
- },
789
- [
790
- allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)(
791
- "div",
792
- {
793
- class: "vxe-table-custom--sort-option"
794
- },
795
- [
796
- (0, import_vue.h)(
797
- "span",
798
- {
799
- class: [
800
- "vxe-table-custom--sort-btn",
801
- {
802
- "is--disabled": isHidden
803
- }
804
- ],
805
- title: getI18n("vxe.custom.setting.sortHelpTip"),
806
- ...isHidden ? {} : {
807
- onMousedown: sortMousedownEvent,
808
- onMouseup: sortMouseupEvent
809
- }
810
- },
811
- [
812
- (0, import_vue.h)("i", {
813
- class: getIcon().TABLE_CUSTOM_SORT
814
- })
815
- ]
816
- )
817
- ]
818
- ) : renderEmptyElement($xeTable) : renderEmptyElement($xeTable),
819
- column.type === "html" ? (0, import_vue.h)("div", {
820
- key: "1",
821
- class: "vxe-table-custom--checkbox-label",
822
- innerHTML: colTitle
823
- }) : (0, import_vue.h)(
824
- "div",
825
- {
826
- key: "0",
827
- class: "vxe-table-custom--checkbox-label"
828
- },
829
- colTitle
830
- )
831
- ]
832
- ),
833
- showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)(
834
- "div",
835
- {
836
- class: "vxe-table-custom--move-btn-option"
837
- },
838
- VxeUIButtonComponent ? [
839
- showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
840
- mode: "text",
841
- icon: "vxe-icon-arrows-up",
842
- title: getI18n("vxe.custom.setting.moveUpTitle"),
843
- disabled: index <= 0,
844
- onClick(evntParame) {
845
- sortMoveUpEvent(evntParame, column);
846
- }
847
- }) : renderEmptyElement($xeTable),
848
- showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
849
- mode: "text",
850
- icon: "vxe-icon-arrows-down",
851
- title: getI18n("vxe.custom.setting.moveDnTitle"),
852
- disabled: index >= items.length - 1,
853
- onClick(evntParame) {
854
- sortMoveDnEvent(evntParame, column);
855
- }
856
- }) : renderEmptyElement($xeTable),
857
- showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
858
- mode: "text",
859
- icon: "vxe-icon-top",
860
- title: getI18n("vxe.custom.setting.putTopTitle"),
861
- disabled: index <= 0,
862
- onClick(evntParame) {
863
- sortMoveTopEvent(evntParame, column);
864
- }
865
- }) : renderEmptyElement($xeTable),
866
- showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
867
- mode: "text",
868
- icon: "vxe-icon-bottom",
869
- title: getI18n("vxe.custom.setting.putBottomTitle"),
870
- disabled: index >= items.length - 1,
871
- onClick(evntParame) {
872
- sortMoveBottomEvent(evntParame, column);
873
- }
874
- }) : renderEmptyElement($xeTable)
875
- ] : []
876
- ) : renderEmptyElement($xeTable),
877
- !parentItem && allowFixed ? (0, import_vue.h)(
878
- "div",
879
- {
880
- class: "vxe-table-custom--fixed-option"
881
- },
882
- VxeUIButtonComponent ? [
883
- (0, import_vue.h)(VxeUIButtonComponent, {
884
- mode: "text",
885
- icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
886
- status: column.renderFixed === "left" ? "primary" : "",
887
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
888
- title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
889
- onClick: ({ $event }) => {
890
- changeFixedOption(column, "left", $event);
891
- }
892
- }),
893
- (0, import_vue.h)(VxeUIButtonComponent, {
894
- mode: "text",
895
- icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
896
- status: column.renderFixed === "right" ? "primary" : "",
897
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
898
- title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
899
- onClick: ({ $event }) => {
900
- changeFixedOption(column, "right", $event);
901
- }
902
- })
903
- ] : []
904
- ) : renderEmptyElement($xeTable)
905
- ]
906
- )
907
- );
908
- }
909
- });
910
- return (0, import_vue.h)(
911
- "div",
912
- {
913
- ref: refElem,
914
- key: "simple",
915
- class: [
916
- "vxe-table-custom-wrapper",
917
- `placement--${placement}`,
918
- {
919
- [`size--${vSize}`]: vSize,
920
- "is--active": customStore.visible
921
- }
922
- ],
923
- style: defPopupStyle
924
- },
925
- customStore.visible ? [
926
- (0, import_vue.h)(
927
- "div",
928
- {
929
- ref: refBodyWrapperElem,
930
- class: "vxe-table-custom-simple--body-wrapper"
931
- },
932
- [
933
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? (0, import_vue.h)($xeTable.getPivotTableAggregateSimplePanel(), {
934
- customStore
935
- }) : renderEmptyElement($xeTable),
936
- (0, import_vue.h)(
937
- "div",
938
- {
939
- ref: refCustomBodyElem,
940
- class: "vxe-table-custom--handle-wrapper"
756
+ ],
757
+ onDragstart: sortDragstartEvent,
758
+ onDragend: sortDragendEvent,
759
+ onDragover: sortDragoverEvent
941
760
  },
942
761
  [
762
+ allowVisible ? (0, import_vue.h)(
763
+ "div",
764
+ {
765
+ class: [
766
+ "vxe-table-custom--checkbox-option",
767
+ {
768
+ "is--checked": isChecked,
769
+ "is--indeterminate": isIndeterminate,
770
+ "is--disabled": isDisabled
771
+ }
772
+ ],
773
+ title: getI18n("vxe.custom.setting.colVisible"),
774
+ onClick: (evnt) => {
775
+ if (!isDisabled) {
776
+ changeCheckboxOption(column, evnt);
777
+ }
778
+ }
779
+ },
780
+ [
781
+ (0, import_vue.h)("span", {
782
+ class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
783
+ })
784
+ ]
785
+ ) : renderEmptyElement($xeTable),
943
786
  (0, import_vue.h)(
944
787
  "div",
945
788
  {
946
- class: "vxe-table-custom--header"
789
+ class: "vxe-table-custom--name-option"
947
790
  },
948
- headerSlot ? $xeTable.callSlot(headerSlot, params) : [
949
- (0, import_vue.h)(
950
- "ul",
791
+ [
792
+ allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)(
793
+ "div",
951
794
  {
952
- class: "vxe-table-custom--panel-list"
795
+ class: "vxe-table-custom--sort-option"
953
796
  },
954
797
  [
955
798
  (0, import_vue.h)(
956
- "li",
799
+ "span",
957
800
  {
958
- class: "vxe-table-custom--option"
801
+ class: [
802
+ "vxe-table-custom--sort-btn",
803
+ {
804
+ "is--disabled": isHidden
805
+ }
806
+ ],
807
+ title: getI18n("vxe.custom.setting.sortHelpTip"),
808
+ ...isHidden ? {} : {
809
+ onMousedown: sortMousedownEvent,
810
+ onMouseup: sortMouseupEvent
811
+ }
959
812
  },
960
813
  [
961
- allowVisible ? (0, import_vue.h)(
962
- "div",
963
- {
964
- class: [
965
- "vxe-table-custom--checkbox-option",
966
- {
967
- "is--checked": isAllChecked,
968
- "is--indeterminate": isAllIndeterminate
969
- }
970
- ],
971
- title: getI18n("vxe.table.allTitle"),
972
- onClick: allOptionEvent
973
- },
974
- [
975
- (0, import_vue.h)("span", {
976
- class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
977
- }),
978
- (0, import_vue.h)(
979
- "span",
980
- {
981
- class: "vxe-checkbox--label"
982
- },
983
- getI18n("vxe.toolbar.customAll")
984
- )
985
- ]
986
- ) : (0, import_vue.h)(
987
- "span",
988
- {
989
- class: "vxe-checkbox--label"
990
- },
991
- getI18n("vxe.table.customTitle")
992
- )
814
+ (0, import_vue.h)("i", {
815
+ class: getIcon().TABLE_CUSTOM_SORT
816
+ })
993
817
  ]
994
818
  )
995
819
  ]
996
- )
997
- ]
998
- ),
999
- (0, import_vue.h)(
1000
- "div",
1001
- {
1002
- class: "vxe-table-custom--body"
1003
- },
1004
- [
1005
- topSlot ? (0, import_vue.h)(
1006
- "div",
1007
- {
1008
- class: "vxe-table-custom--panel-top"
1009
- },
1010
- $xeTable.callSlot(topSlot, params)
1011
- ) : renderEmptyElement($xeTable),
1012
- defaultSlot ? (0, import_vue.h)(
1013
- "div",
1014
- {
1015
- class: "vxe-table-custom--panel-body"
1016
- },
1017
- $xeTable.callSlot(defaultSlot, params)
1018
- ) : (0, import_vue.h)(
1019
- import_vue.TransitionGroup,
1020
- {
1021
- class: "vxe-table-custom--panel-list",
1022
- name: isCustomDragStatus ? "vxe-table-custom--list" : "",
1023
- tag: "ul",
1024
- ...customWrapperOns
1025
- },
1026
- {
1027
- default: () => colVNs
1028
- }
1029
- ),
1030
- bottomSlot ? (0, import_vue.h)(
820
+ ) : renderEmptyElement($xeTable) : renderEmptyElement($xeTable),
821
+ column.type === "html" ? (0, import_vue.h)("div", {
822
+ key: "1",
823
+ class: "vxe-table-custom--checkbox-label",
824
+ innerHTML: colTitle
825
+ }) : (0, import_vue.h)(
1031
826
  "div",
1032
827
  {
1033
- class: "vxe-table-custom--panel-bottom"
828
+ key: "0",
829
+ class: "vxe-table-custom--checkbox-label"
1034
830
  },
1035
- $xeTable.callSlot(bottomSlot, params)
1036
- ) : renderEmptyElement($xeTable)
831
+ colTitle
832
+ )
1037
833
  ]
1038
834
  ),
1039
- customOpts.showFooter ? (0, import_vue.h)(
835
+ showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)(
1040
836
  "div",
1041
837
  {
1042
- class: "vxe-table-custom--footer"
838
+ class: "vxe-table-custom--move-btn-option"
1043
839
  },
1044
- footerSlot ? $xeTable.callSlot(footerSlot, params) : [
1045
- (0, import_vue.h)(
1046
- "div",
1047
- {
1048
- class: "vxe-table-custom--footer-buttons"
1049
- },
1050
- [
1051
- VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1052
- mode: "text",
1053
- content: customOpts.resetButtonText || getI18n("vxe.table.customRestore"),
1054
- disabled: !isCustomStatus,
1055
- onClick: resetCustomEvent
1056
- }) : renderEmptyElement($xeTable),
1057
- immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1058
- mode: "text",
1059
- content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1060
- onClick: cancelCloseEvent
1061
- }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1062
- mode: "text",
1063
- content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1064
- onClick: cancelCustomEvent
1065
- }) : renderEmptyElement($xeTable),
1066
- immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1067
- mode: "text",
1068
- status: "primary",
1069
- content: customOpts.confirmButtonText || getI18n("vxe.table.customConfirm"),
1070
- onClick: confirmCustomEvent
1071
- }) : renderEmptyElement($xeTable)
1072
- ]
1073
- )
1074
- ]
1075
- ) : null
1076
- ]
1077
- ),
1078
- renderDragTip()
1079
- ]
1080
- )
1081
- ] : []
1082
- );
1083
- };
1084
- const renderPopupBodys = () => {
1085
- const { resizable: allResizable } = tableProps;
1086
- const { customColumnList } = tableReactData;
1087
- const customOpts = computeCustomOpts.value;
1088
- const columnDragOpts = computeColumnDragOpts.value;
1089
- const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
1090
- const columnOpts = computeColumnOpts.value;
1091
- const resizableOpts = computeResizableOpts.value;
1092
- const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
1093
- const isMaxFixedColumn = computeIsMaxFixedColumn.value;
1094
- const { isCrossDrag, isPeerDrag } = columnDragOpts;
1095
- const trVNs = [];
1096
- import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
1097
- const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
1098
- if (isVisible) {
1099
- let customMinWidth = 0;
1100
- let customMaxWidth = 0;
1101
- if (allowResizable) {
1102
- const resizeParams = {
1103
- $table: $xeTable,
1104
- column,
1105
- columnIndex: $xeTable.getColumnIndex(column),
1106
- $columnIndex: $xeTable.getVMColumnIndex(column),
1107
- _columnIndex: $xeTable.getVTColumnIndex(column),
1108
- rowIndex: -1,
1109
- _rowIndex: -1,
1110
- $rowIndex: -1
1111
- };
1112
- if (reMinWidth) {
1113
- customMinWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth);
1114
- }
1115
- if (reMaxWidth) {
1116
- customMaxWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth);
1117
- }
1118
- }
1119
- const isChecked = column.renderVisible;
1120
- const isIndeterminate = column.halfVisible;
1121
- const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
1122
- const isColGroup = column.children && column.children.length;
1123
- const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
1124
- const isHidden = !isChecked;
1125
- const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
1126
- const alignList = [
1127
- { icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: "left", title: getI18n("vxe.custom.setting.anLeftTitle"), disabled: isHidden },
1128
- { icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: "center", title: getI18n("vxe.custom.setting.anCenterTitle"), disabled: isHidden },
1129
- { icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: "right", title: getI18n("vxe.custom.setting.anRightTitle"), disabled: isHidden }
1130
- ];
1131
- const tdVNs = [];
1132
- if (allowVisible) {
1133
- tdVNs.push(
1134
- (0, import_vue.h)(
1135
- "td",
1136
- {
1137
- key: "av",
1138
- class: "vxe-table-custom-popup--column-td col--visible"
1139
- },
1140
- [
1141
- (0, import_vue.h)(
840
+ VxeUIButtonComponent ? [
841
+ showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
842
+ mode: "text",
843
+ icon: "vxe-icon-arrows-up",
844
+ title: getI18n("vxe.custom.setting.moveUpTitle"),
845
+ disabled: index <= 0,
846
+ onClick(evntParame) {
847
+ sortMoveUpEvent(evntParame, column);
848
+ }
849
+ }) : renderEmptyElement($xeTable),
850
+ showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
851
+ mode: "text",
852
+ icon: "vxe-icon-arrows-down",
853
+ title: getI18n("vxe.custom.setting.moveDnTitle"),
854
+ disabled: index >= items.length - 1,
855
+ onClick(evntParame) {
856
+ sortMoveDnEvent(evntParame, column);
857
+ }
858
+ }) : renderEmptyElement($xeTable),
859
+ showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
860
+ mode: "text",
861
+ icon: "vxe-icon-top",
862
+ title: getI18n("vxe.custom.setting.putTopTitle"),
863
+ disabled: index <= 0,
864
+ onClick(evntParame) {
865
+ sortMoveTopEvent(evntParame, column);
866
+ }
867
+ }) : renderEmptyElement($xeTable),
868
+ showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
869
+ mode: "text",
870
+ icon: "vxe-icon-bottom",
871
+ title: getI18n("vxe.custom.setting.putBottomTitle"),
872
+ disabled: index >= items.length - 1,
873
+ onClick(evntParame) {
874
+ sortMoveBottomEvent(evntParame, column);
875
+ }
876
+ }) : renderEmptyElement($xeTable)
877
+ ] : []
878
+ ) : renderEmptyElement($xeTable),
879
+ !parentItem && allowFixed ? (0, import_vue.h)(
1142
880
  "div",
1143
881
  {
1144
- class: [
1145
- "vxe-table-custom--checkbox-option",
1146
- {
1147
- "is--checked": isChecked,
1148
- "is--indeterminate": isIndeterminate,
1149
- "is--disabled": isDisabled
882
+ class: "vxe-table-custom--fixed-option"
883
+ },
884
+ VxeUIButtonComponent ? [
885
+ (0, import_vue.h)(VxeUIButtonComponent, {
886
+ mode: "text",
887
+ icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
888
+ status: column.renderFixed === "left" ? "primary" : "",
889
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
890
+ title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
891
+ onClick: ({ $event }) => {
892
+ changeFixedOption(column, "left", $event);
1150
893
  }
1151
- ],
1152
- title: getI18n("vxe.custom.setting.colVisible"),
1153
- onClick: (evnt) => {
1154
- if (!isDisabled) {
1155
- changeCheckboxOption(column, evnt);
894
+ }),
895
+ (0, import_vue.h)(VxeUIButtonComponent, {
896
+ mode: "text",
897
+ icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
898
+ status: column.renderFixed === "right" ? "primary" : "",
899
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
900
+ title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
901
+ onClick: ({ $event }) => {
902
+ changeFixedOption(column, "right", $event);
1156
903
  }
1157
- }
1158
- },
1159
- [
1160
- (0, import_vue.h)("span", {
1161
- class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1162
904
  })
1163
- ]
1164
- )
905
+ ] : []
906
+ ) : renderEmptyElement($xeTable)
1165
907
  ]
1166
908
  )
1167
909
  );
1168
910
  }
1169
- tdVNs.push(
911
+ });
912
+ return (0, import_vue.h)(
913
+ "div",
914
+ {
915
+ ref: refElem,
916
+ key: "simple",
917
+ class: [
918
+ "vxe-table-custom-wrapper",
919
+ `placement--${placement}`,
920
+ {
921
+ [`size--${vSize}`]: vSize,
922
+ "is--active": customStore.visible
923
+ }
924
+ ],
925
+ style: defPopupStyle
926
+ },
927
+ customStore.visible ? [
1170
928
  (0, import_vue.h)(
1171
- "td",
929
+ "div",
1172
930
  {
1173
- key: "at",
1174
- class: "vxe-table-custom-popup--column-td col--name"
931
+ ref: refBodyWrapperElem,
932
+ class: "vxe-table-custom-simple--body-wrapper"
1175
933
  },
1176
934
  [
935
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? (0, import_vue.h)($xeTable.getPivotTableAggregateSimplePanel(), {
936
+ customStore
937
+ }) : renderEmptyElement($xeTable),
1177
938
  (0, import_vue.h)(
1178
939
  "div",
1179
940
  {
1180
- class: "vxe-table-custom-popup--name"
941
+ ref: refCustomBodyElem,
942
+ class: "vxe-table-custom--handle-wrapper"
1181
943
  },
1182
944
  [
1183
- allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)(
945
+ (0, import_vue.h)(
1184
946
  "div",
1185
947
  {
1186
- class: [
1187
- "vxe-table-custom-popup--column-sort-btn",
1188
- {
1189
- "is--disabled": isHidden
1190
- }
1191
- ],
1192
- title: getI18n("vxe.custom.setting.sortHelpTip"),
1193
- ...isHidden ? {} : {
1194
- onMousedown: sortMousedownEvent,
1195
- onMouseup: sortMouseupEvent
1196
- }
948
+ class: "vxe-table-custom--header"
1197
949
  },
1198
- [
1199
- (0, import_vue.h)("i", {
1200
- class: getIcon().TABLE_CUSTOM_SORT
1201
- })
950
+ headerSlot ? $xeTable.callSlot(headerSlot, params) : [
951
+ (0, import_vue.h)(
952
+ "ul",
953
+ {
954
+ class: "vxe-table-custom--panel-list"
955
+ },
956
+ [
957
+ (0, import_vue.h)(
958
+ "li",
959
+ {
960
+ class: "vxe-table-custom--option"
961
+ },
962
+ [
963
+ allowVisible ? (0, import_vue.h)(
964
+ "div",
965
+ {
966
+ class: [
967
+ "vxe-table-custom--checkbox-option",
968
+ {
969
+ "is--checked": isAllChecked,
970
+ "is--indeterminate": isAllIndeterminate
971
+ }
972
+ ],
973
+ title: getI18n("vxe.table.allTitle"),
974
+ onClick: allOptionEvent
975
+ },
976
+ [
977
+ (0, import_vue.h)("span", {
978
+ class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
979
+ }),
980
+ (0, import_vue.h)(
981
+ "span",
982
+ {
983
+ class: "vxe-checkbox--label"
984
+ },
985
+ getI18n("vxe.toolbar.customAll")
986
+ )
987
+ ]
988
+ ) : (0, import_vue.h)(
989
+ "span",
990
+ {
991
+ class: "vxe-checkbox--label"
992
+ },
993
+ getI18n("vxe.table.customTitle")
994
+ )
995
+ ]
996
+ )
997
+ ]
998
+ )
1202
999
  ]
1203
- ) : (0, import_vue.h)("div", {
1204
- class: "vxe-table-custom-popup--column-sort-placeholder"
1205
- }) : renderEmptyElement($xeTable),
1206
- column.type === "html" ? (0, import_vue.h)("div", {
1207
- key: "1",
1208
- class: "vxe-table-custom-popup--title",
1209
- innerHTML: colTitle
1210
- }) : (0, import_vue.h)(
1000
+ ),
1001
+ (0, import_vue.h)(
1211
1002
  "div",
1212
1003
  {
1213
- key: "0",
1214
- class: "vxe-table-custom-popup--title",
1215
- title: colTitle
1004
+ class: "vxe-table-custom--body"
1216
1005
  },
1217
- colTitle
1006
+ [
1007
+ topSlot ? (0, import_vue.h)(
1008
+ "div",
1009
+ {
1010
+ class: "vxe-table-custom--panel-top"
1011
+ },
1012
+ $xeTable.callSlot(topSlot, params)
1013
+ ) : renderEmptyElement($xeTable),
1014
+ defaultSlot ? (0, import_vue.h)(
1015
+ "div",
1016
+ {
1017
+ class: "vxe-table-custom--panel-body"
1018
+ },
1019
+ $xeTable.callSlot(defaultSlot, params)
1020
+ ) : (0, import_vue.h)(
1021
+ import_vue.TransitionGroup,
1022
+ {
1023
+ class: "vxe-table-custom--panel-list",
1024
+ name: isCustomDragStatus ? "vxe-table-custom--list" : "",
1025
+ tag: "ul",
1026
+ ...customWrapperOns
1027
+ },
1028
+ {
1029
+ default: () => colVNs
1030
+ }
1031
+ ),
1032
+ bottomSlot ? (0, import_vue.h)(
1033
+ "div",
1034
+ {
1035
+ class: "vxe-table-custom--panel-bottom"
1036
+ },
1037
+ $xeTable.callSlot(bottomSlot, params)
1038
+ ) : renderEmptyElement($xeTable)
1039
+ ]
1218
1040
  ),
1219
- showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)(
1041
+ customOpts.showFooter ? (0, import_vue.h)(
1220
1042
  "div",
1221
1043
  {
1222
- class: "vxe-table-custom-popup--move-btn"
1044
+ class: "vxe-table-custom--footer"
1223
1045
  },
1224
- VxeUIButtonComponent ? [
1225
- showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
1226
- mode: "text",
1227
- icon: "vxe-icon-arrows-up",
1228
- title: getI18n("vxe.custom.setting.moveUpTitle"),
1229
- disabled: index <= 0,
1230
- onClick(evntParame) {
1231
- sortMoveUpEvent(evntParame, column);
1232
- }
1233
- }) : renderEmptyElement($xeTable),
1234
- showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
1235
- mode: "text",
1236
- icon: "vxe-icon-arrows-down",
1237
- title: getI18n("vxe.custom.setting.moveDnTitle"),
1238
- disabled: index >= items.length - 1,
1239
- onClick(evntParame) {
1240
- sortMoveDnEvent(evntParame, column);
1241
- }
1242
- }) : renderEmptyElement($xeTable),
1243
- showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
1244
- mode: "text",
1245
- icon: "vxe-icon-top",
1246
- title: getI18n("vxe.custom.setting.putTopTitle"),
1247
- disabled: index <= 0,
1248
- onClick(evntParame) {
1249
- sortMoveTopEvent(evntParame, column);
1046
+ footerSlot ? $xeTable.callSlot(footerSlot, params) : [
1047
+ (0, import_vue.h)(
1048
+ "div",
1049
+ {
1050
+ class: "vxe-table-custom--footer-buttons"
1051
+ },
1052
+ [
1053
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1054
+ mode: "text",
1055
+ content: customOpts.resetButtonText || getI18n("vxe.table.customRestore"),
1056
+ disabled: !isCustomStatus,
1057
+ onClick: resetCustomEvent
1058
+ }) : renderEmptyElement($xeTable),
1059
+ immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1060
+ mode: "text",
1061
+ content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1062
+ onClick: cancelCloseEvent
1063
+ }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1064
+ mode: "text",
1065
+ content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1066
+ onClick: cancelCustomEvent
1067
+ }) : renderEmptyElement($xeTable),
1068
+ immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1069
+ mode: "text",
1070
+ status: "primary",
1071
+ content: customOpts.confirmButtonText || getI18n("vxe.table.customConfirm"),
1072
+ onClick: confirmCustomEvent
1073
+ }) : renderEmptyElement($xeTable)
1074
+ ]
1075
+ )
1076
+ ]
1077
+ ) : null
1078
+ ]
1079
+ ),
1080
+ renderDragTip()
1081
+ ]
1082
+ )
1083
+ ] : []
1084
+ );
1085
+ };
1086
+ const renderPopupBodys = () => {
1087
+ const { resizable: allResizable } = tableProps;
1088
+ const { customColumnList } = tableReactData;
1089
+ const customOpts = computeCustomOpts.value;
1090
+ const columnDragOpts = computeColumnDragOpts.value;
1091
+ const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
1092
+ const columnOpts = computeColumnOpts.value;
1093
+ const resizableOpts = computeResizableOpts.value;
1094
+ const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
1095
+ const isMaxFixedColumn = computeIsMaxFixedColumn.value;
1096
+ const { isCrossDrag, isPeerDrag } = columnDragOpts;
1097
+ const trVNs = [];
1098
+ import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
1099
+ const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
1100
+ if (isVisible) {
1101
+ let customMinWidth = 0;
1102
+ let customMaxWidth = 0;
1103
+ if (allowResizable) {
1104
+ const resizeParams = {
1105
+ $table: $xeTable,
1106
+ column,
1107
+ columnIndex: $xeTable.getColumnIndex(column),
1108
+ $columnIndex: $xeTable.getVMColumnIndex(column),
1109
+ _columnIndex: $xeTable.getVTColumnIndex(column),
1110
+ rowIndex: -1,
1111
+ _rowIndex: -1,
1112
+ $rowIndex: -1
1113
+ };
1114
+ if (reMinWidth) {
1115
+ customMinWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth);
1116
+ }
1117
+ if (reMaxWidth) {
1118
+ customMaxWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth);
1119
+ }
1120
+ }
1121
+ const isChecked = column.renderVisible;
1122
+ const isIndeterminate = column.halfVisible;
1123
+ const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
1124
+ const isColGroup = column.children && column.children.length;
1125
+ const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
1126
+ const isHidden = !isChecked;
1127
+ const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
1128
+ const alignList = [
1129
+ { icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: "left", title: getI18n("vxe.custom.setting.anLeftTitle"), disabled: isHidden },
1130
+ { icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: "center", title: getI18n("vxe.custom.setting.anCenterTitle"), disabled: isHidden },
1131
+ { icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: "right", title: getI18n("vxe.custom.setting.anRightTitle"), disabled: isHidden }
1132
+ ];
1133
+ const tdVNs = [];
1134
+ if (allowVisible) {
1135
+ tdVNs.push(
1136
+ (0, import_vue.h)(
1137
+ "td",
1138
+ {
1139
+ key: "av",
1140
+ class: "vxe-table-custom-popup--column-td col--visible"
1141
+ },
1142
+ [
1143
+ (0, import_vue.h)(
1144
+ "div",
1145
+ {
1146
+ class: [
1147
+ "vxe-table-custom--checkbox-option",
1148
+ {
1149
+ "is--checked": isChecked,
1150
+ "is--indeterminate": isIndeterminate,
1151
+ "is--disabled": isDisabled
1250
1152
  }
1251
- }) : renderEmptyElement($xeTable),
1252
- showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
1253
- mode: "text",
1254
- icon: "vxe-icon-bottom",
1255
- title: getI18n("vxe.custom.setting.putBottomTitle"),
1256
- disabled: index >= items.length - 1,
1257
- onClick(evntParame) {
1258
- sortMoveBottomEvent(evntParame, column);
1153
+ ],
1154
+ title: getI18n("vxe.custom.setting.colVisible"),
1155
+ onClick: (evnt) => {
1156
+ if (!isDisabled) {
1157
+ changeCheckboxOption(column, evnt);
1259
1158
  }
1260
- }) : renderEmptyElement($xeTable)
1261
- ] : []
1262
- ) : renderEmptyElement($xeTable)
1159
+ }
1160
+ },
1161
+ [
1162
+ (0, import_vue.h)("span", {
1163
+ class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1164
+ })
1165
+ ]
1166
+ )
1263
1167
  ]
1264
1168
  )
1265
- ]
1266
- )
1267
- );
1268
- if (allowResizable) {
1169
+ );
1170
+ }
1269
1171
  tdVNs.push(
1270
1172
  (0, import_vue.h)(
1271
1173
  "td",
1272
1174
  {
1273
- key: "aw",
1274
- class: "vxe-table-custom-popup--column-td col--resizable"
1175
+ key: "at",
1176
+ class: "vxe-table-custom-popup--column-td col--name"
1275
1177
  },
1276
1178
  [
1277
- column.children && column.children.length || !(import_xe_utils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, import_vue.h)("span", "-") : VxeUINumberInputComponent ? (0, import_vue.h)(VxeUINumberInputComponent, {
1278
- type: "integer",
1279
- immediate: false,
1280
- disabled: isHidden,
1281
- modelValue: column.renderResizeWidth,
1282
- min: customMinWidth || 0,
1283
- max: customMaxWidth || 9999,
1284
- "onUpdate:modelValue"(value) {
1285
- const width = Math.max(0, Number(value));
1286
- column.renderResizeWidth = width;
1179
+ (0, import_vue.h)(
1180
+ "div",
1181
+ {
1182
+ class: "vxe-table-custom-popup--name"
1287
1183
  },
1288
- onChange() {
1289
- changeColumnWidth(column);
1290
- }
1291
- }) : renderEmptyElement($xeTable)
1292
- ]
1293
- )
1294
- );
1295
- }
1296
- if (allowFixed) {
1297
- tdVNs.push(
1298
- (0, import_vue.h)(
1299
- "td",
1300
- {
1301
- key: "af",
1302
- class: "vxe-table-custom-popup--column-td col--fixed"
1303
- },
1304
- parentItem ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1305
- (0, import_vue.h)(VxeUIButtonComponent, {
1306
- icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
1307
- status: column.renderFixed === "left" ? "primary" : "",
1308
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1309
- title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
1310
- onClick: ({ $event }) => {
1311
- changeFixedOption(column, "left", $event);
1312
- }
1313
- }),
1314
- (0, import_vue.h)(VxeUIButtonComponent, {
1315
- icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
1316
- status: column.renderFixed === "right" ? "primary" : "",
1317
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1318
- title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
1319
- onClick: ({ $event }) => {
1320
- changeFixedOption(column, "right", $event);
1321
- }
1322
- })
1323
- ] : []
1324
- )
1325
- );
1326
- }
1327
- if (allowAlign) {
1328
- tdVNs.push(
1329
- (0, import_vue.h)(
1330
- "td",
1331
- {
1332
- key: "aa",
1333
- class: "vxe-table-custom-popup--column-td col--align"
1334
- },
1335
- VxeUIRadioGroupComponent ? [
1336
- (0, import_vue.h)(VxeUIRadioGroupComponent, {
1337
- modelValue: column.renderAlign || "left",
1338
- type: "button",
1339
- strict: false,
1340
- disabled: isHidden,
1341
- options: alignList,
1342
- onChange({ value, $event }) {
1343
- changeAlignOption(column, value, "align", "renderAlign", "custom-align-change", $event);
1344
- }
1345
- })
1346
- ] : []
1184
+ [
1185
+ allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)(
1186
+ "div",
1187
+ {
1188
+ class: [
1189
+ "vxe-table-custom-popup--column-sort-btn",
1190
+ {
1191
+ "is--disabled": isHidden
1192
+ }
1193
+ ],
1194
+ title: getI18n("vxe.custom.setting.sortHelpTip"),
1195
+ ...isHidden ? {} : {
1196
+ onMousedown: sortMousedownEvent,
1197
+ onMouseup: sortMouseupEvent
1198
+ }
1199
+ },
1200
+ [
1201
+ (0, import_vue.h)("i", {
1202
+ class: getIcon().TABLE_CUSTOM_SORT
1203
+ })
1204
+ ]
1205
+ ) : (0, import_vue.h)("div", {
1206
+ class: "vxe-table-custom-popup--column-sort-placeholder"
1207
+ }) : renderEmptyElement($xeTable),
1208
+ column.type === "html" ? (0, import_vue.h)("div", {
1209
+ key: "1",
1210
+ class: "vxe-table-custom-popup--title",
1211
+ innerHTML: colTitle
1212
+ }) : (0, import_vue.h)(
1213
+ "div",
1214
+ {
1215
+ key: "0",
1216
+ class: "vxe-table-custom-popup--title",
1217
+ title: colTitle
1218
+ },
1219
+ colTitle
1220
+ ),
1221
+ showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)(
1222
+ "div",
1223
+ {
1224
+ class: "vxe-table-custom-popup--move-btn"
1225
+ },
1226
+ VxeUIButtonComponent ? [
1227
+ showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
1228
+ mode: "text",
1229
+ icon: "vxe-icon-arrows-up",
1230
+ title: getI18n("vxe.custom.setting.moveUpTitle"),
1231
+ disabled: index <= 0,
1232
+ onClick(evntParame) {
1233
+ sortMoveUpEvent(evntParame, column);
1234
+ }
1235
+ }) : renderEmptyElement($xeTable),
1236
+ showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
1237
+ mode: "text",
1238
+ icon: "vxe-icon-arrows-down",
1239
+ title: getI18n("vxe.custom.setting.moveDnTitle"),
1240
+ disabled: index >= items.length - 1,
1241
+ onClick(evntParame) {
1242
+ sortMoveDnEvent(evntParame, column);
1243
+ }
1244
+ }) : renderEmptyElement($xeTable),
1245
+ showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
1246
+ mode: "text",
1247
+ icon: "vxe-icon-top",
1248
+ title: getI18n("vxe.custom.setting.putTopTitle"),
1249
+ disabled: index <= 0,
1250
+ onClick(evntParame) {
1251
+ sortMoveTopEvent(evntParame, column);
1252
+ }
1253
+ }) : renderEmptyElement($xeTable),
1254
+ showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
1255
+ mode: "text",
1256
+ icon: "vxe-icon-bottom",
1257
+ title: getI18n("vxe.custom.setting.putBottomTitle"),
1258
+ disabled: index >= items.length - 1,
1259
+ onClick(evntParame) {
1260
+ sortMoveBottomEvent(evntParame, column);
1261
+ }
1262
+ }) : renderEmptyElement($xeTable)
1263
+ ] : []
1264
+ ) : renderEmptyElement($xeTable)
1265
+ ]
1266
+ )
1267
+ ]
1347
1268
  )
1348
1269
  );
1349
- }
1350
- if (allowHeaderAlign) {
1351
- tdVNs.push(
1270
+ if (allowResizable) {
1271
+ tdVNs.push(
1272
+ (0, import_vue.h)(
1273
+ "td",
1274
+ {
1275
+ key: "aw",
1276
+ class: "vxe-table-custom-popup--column-td col--resizable"
1277
+ },
1278
+ [
1279
+ column.children && column.children.length || !(import_xe_utils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, import_vue.h)("span", "-") : VxeUINumberInputComponent ? (0, import_vue.h)(VxeUINumberInputComponent, {
1280
+ type: "integer",
1281
+ immediate: false,
1282
+ disabled: isHidden,
1283
+ modelValue: column.renderResizeWidth,
1284
+ min: customMinWidth || 0,
1285
+ max: customMaxWidth || 9999,
1286
+ "onUpdate:modelValue"(value) {
1287
+ const width = Math.max(0, Number(value));
1288
+ column.renderResizeWidth = width;
1289
+ },
1290
+ onChange() {
1291
+ changeColumnWidth(column);
1292
+ }
1293
+ }) : renderEmptyElement($xeTable)
1294
+ ]
1295
+ )
1296
+ );
1297
+ }
1298
+ if (allowFixed) {
1299
+ tdVNs.push(
1300
+ (0, import_vue.h)(
1301
+ "td",
1302
+ {
1303
+ key: "af",
1304
+ class: "vxe-table-custom-popup--column-td col--fixed"
1305
+ },
1306
+ parentItem ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1307
+ (0, import_vue.h)(VxeUIButtonComponent, {
1308
+ icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
1309
+ status: column.renderFixed === "left" ? "primary" : "",
1310
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1311
+ title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
1312
+ onClick: ({ $event }) => {
1313
+ changeFixedOption(column, "left", $event);
1314
+ }
1315
+ }),
1316
+ (0, import_vue.h)(VxeUIButtonComponent, {
1317
+ icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
1318
+ status: column.renderFixed === "right" ? "primary" : "",
1319
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1320
+ title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
1321
+ onClick: ({ $event }) => {
1322
+ changeFixedOption(column, "right", $event);
1323
+ }
1324
+ })
1325
+ ] : []
1326
+ )
1327
+ );
1328
+ }
1329
+ if (allowAlign) {
1330
+ tdVNs.push(
1331
+ (0, import_vue.h)(
1332
+ "td",
1333
+ {
1334
+ key: "aa",
1335
+ class: "vxe-table-custom-popup--column-td col--align"
1336
+ },
1337
+ VxeUIRadioGroupComponent ? [
1338
+ (0, import_vue.h)(VxeUIRadioGroupComponent, {
1339
+ modelValue: column.renderAlign || "left",
1340
+ type: "button",
1341
+ strict: false,
1342
+ disabled: isHidden,
1343
+ options: alignList,
1344
+ onChange({ value, $event }) {
1345
+ changeAlignOption(column, value, "align", "renderAlign", "custom-align-change", $event);
1346
+ }
1347
+ })
1348
+ ] : []
1349
+ )
1350
+ );
1351
+ }
1352
+ if (allowHeaderAlign) {
1353
+ tdVNs.push(
1354
+ (0, import_vue.h)(
1355
+ "td",
1356
+ {
1357
+ key: "aha",
1358
+ class: "vxe-table-custom-popup--column-td col--header-align"
1359
+ },
1360
+ isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1361
+ (0, import_vue.h)(VxeUIRadioGroupComponent, {
1362
+ modelValue: column.renderHeaderAlign || "left",
1363
+ type: "button",
1364
+ strict: false,
1365
+ disabled: isHidden,
1366
+ options: alignList,
1367
+ onChange({ value, $event }) {
1368
+ changeAlignOption(column, value, "headerAlign", "renderHeaderAlign", "custom-header-align-change", $event);
1369
+ }
1370
+ })
1371
+ ] : []
1372
+ )
1373
+ );
1374
+ }
1375
+ if (allowFooterAlign) {
1376
+ tdVNs.push(
1377
+ (0, import_vue.h)(
1378
+ "td",
1379
+ {
1380
+ key: "afa",
1381
+ class: "vxe-table-custom-popup--column-td col--footer-align"
1382
+ },
1383
+ isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1384
+ (0, import_vue.h)(VxeUIRadioGroupComponent, {
1385
+ modelValue: column.renderFooterAlign || "left",
1386
+ type: "button",
1387
+ strict: false,
1388
+ disabled: isHidden,
1389
+ options: alignList,
1390
+ onChange({ value, $event }) {
1391
+ changeAlignOption(column, value, "footerAlign", "renderFooterAlign", "custom-footer-align-change", $event);
1392
+ }
1393
+ })
1394
+ ] : []
1395
+ )
1396
+ );
1397
+ }
1398
+ trVNs.push(
1352
1399
  (0, import_vue.h)(
1353
- "td",
1400
+ "tr",
1354
1401
  {
1355
- key: "aha",
1356
- class: "vxe-table-custom-popup--column-td col--header-align"
1357
- },
1358
- isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1359
- (0, import_vue.h)(VxeUIRadioGroupComponent, {
1360
- modelValue: column.renderHeaderAlign || "left",
1361
- type: "button",
1362
- strict: false,
1363
- disabled: isHidden,
1364
- options: alignList,
1365
- onChange({ value, $event }) {
1366
- changeAlignOption(column, value, "headerAlign", "renderHeaderAlign", "custom-header-align-change", $event);
1402
+ key: column.id,
1403
+ colid: column.id,
1404
+ class: [
1405
+ `vxe-table-custom-popup--row level--${column.level}`,
1406
+ {
1407
+ "is--group": isColGroup
1367
1408
  }
1368
- })
1369
- ] : []
1370
- )
1371
- );
1372
- }
1373
- if (allowFooterAlign) {
1374
- tdVNs.push(
1375
- (0, import_vue.h)(
1376
- "td",
1377
- {
1378
- key: "afa",
1379
- class: "vxe-table-custom-popup--column-td col--footer-align"
1409
+ ],
1410
+ onDragstart: sortDragstartEvent,
1411
+ onDragend: sortDragendEvent,
1412
+ onDragover: sortDragoverEvent
1380
1413
  },
1381
- isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
1382
- (0, import_vue.h)(VxeUIRadioGroupComponent, {
1383
- modelValue: column.renderFooterAlign || "left",
1384
- type: "button",
1385
- strict: false,
1386
- disabled: isHidden,
1387
- options: alignList,
1388
- onChange({ value, $event }) {
1389
- changeAlignOption(column, value, "footerAlign", "renderFooterAlign", "custom-footer-align-change", $event);
1390
- }
1391
- })
1392
- ] : []
1414
+ tdVNs
1393
1415
  )
1394
1416
  );
1395
1417
  }
1396
- trVNs.push(
1418
+ });
1419
+ return trVNs;
1420
+ };
1421
+ const renderPopupPanel = () => {
1422
+ const $xeGrid = $xeTable.xeGrid;
1423
+ const $xeGantt = $xeTable.xeGantt;
1424
+ const { customStore } = props;
1425
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
1426
+ const { isCustomStatus, customColumnList } = tableReactData;
1427
+ const vSize = computeSize.value;
1428
+ const customOpts = computeCustomOpts.value;
1429
+ const aggregateOpts = computeAggregateOpts.value;
1430
+ const { panePopupStyle } = customStore;
1431
+ const { placement: aggPlacement } = aggregateOpts;
1432
+ const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
1433
+ const columnOpts = computeColumnOpts.value;
1434
+ const { maxFixedSize } = columnOpts;
1435
+ const modalOpts = Object.assign({}, modalOptions);
1436
+ const drawerOpts = Object.assign({}, drawerOptions);
1437
+ const slots = customOpts.slots || {};
1438
+ const headerSlot = slots.header;
1439
+ const topSlot = slots.top;
1440
+ const bottomSlot = slots.bottom;
1441
+ const defaultSlot = slots.default;
1442
+ const footerSlot = slots.footer;
1443
+ const isAllChecked = customStore.isAll;
1444
+ const isAllIndeterminate = customStore.isIndeterminate;
1445
+ const isAggRtBmLayout = aggPlacement === "right" || aggPlacement === "bottom";
1446
+ const params = {
1447
+ $table: $xeTable,
1448
+ $grid: $xeGrid,
1449
+ $gantt: $xeGantt,
1450
+ columns: customColumnList,
1451
+ isAllChecked,
1452
+ isAllIndeterminate,
1453
+ isCustomStatus
1454
+ };
1455
+ const colVNs = [];
1456
+ const headVNs = [];
1457
+ if (allowVisible) {
1458
+ colVNs.push(
1459
+ (0, import_vue.h)("col", {
1460
+ key: "av",
1461
+ class: "vxe-table-custom-popup--column-col col--checkbox"
1462
+ })
1463
+ );
1464
+ headVNs.push(
1397
1465
  (0, import_vue.h)(
1398
- "tr",
1466
+ "th",
1399
1467
  {
1400
- key: column.id,
1401
- colid: column.id,
1402
- class: [
1403
- `vxe-table-custom-popup--row level--${column.level}`,
1404
- {
1405
- "is--group": isColGroup
1406
- }
1407
- ],
1408
- onDragstart: sortDragstartEvent,
1409
- onDragend: sortDragendEvent,
1410
- onDragover: sortDragoverEvent
1468
+ key: "av",
1469
+ class: "vxe-table-custom-popup--column-th col--checkbox"
1411
1470
  },
1412
- tdVNs
1471
+ [
1472
+ (0, import_vue.h)(
1473
+ "div",
1474
+ {
1475
+ class: [
1476
+ "vxe-table-custom--checkbox-option",
1477
+ {
1478
+ "is--checked": isAllChecked,
1479
+ "is--indeterminate": isAllIndeterminate
1480
+ }
1481
+ ],
1482
+ title: getI18n("vxe.table.allTitle"),
1483
+ onClick: allOptionEvent
1484
+ },
1485
+ [
1486
+ (0, import_vue.h)("span", {
1487
+ class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1488
+ })
1489
+ // h('span', {
1490
+ // class: 'vxe-checkbox--label'
1491
+ // }, getI18n('vxe.toolbar.customAll'))
1492
+ ]
1493
+ )
1494
+ ]
1413
1495
  )
1414
1496
  );
1415
1497
  }
1416
- });
1417
- return trVNs;
1418
- };
1419
- const renderPopupPanel = () => {
1420
- const $xeGrid = $xeTable.xeGrid;
1421
- const $xeGantt = $xeTable.xeGantt;
1422
- const { customStore } = props;
1423
- const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
1424
- const { isCustomStatus, customColumnList } = tableReactData;
1425
- const vSize = computeSize.value;
1426
- const customOpts = computeCustomOpts.value;
1427
- const aggregateOpts = computeAggregateOpts.value;
1428
- const { panePopupStyle } = customStore;
1429
- const { placement: aggPlacement } = aggregateOpts;
1430
- const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
1431
- const columnOpts = computeColumnOpts.value;
1432
- const { maxFixedSize } = columnOpts;
1433
- const modalOpts = Object.assign({}, modalOptions);
1434
- const drawerOpts = Object.assign({}, drawerOptions);
1435
- const slots = customOpts.slots || {};
1436
- const headerSlot = slots.header;
1437
- const topSlot = slots.top;
1438
- const bottomSlot = slots.bottom;
1439
- const defaultSlot = slots.default;
1440
- const footerSlot = slots.footer;
1441
- const isAllChecked = customStore.isAll;
1442
- const isAllIndeterminate = customStore.isIndeterminate;
1443
- const isAggRtBmLayout = aggPlacement === "right" || aggPlacement === "bottom";
1444
- const params = {
1445
- $table: $xeTable,
1446
- $grid: $xeGrid,
1447
- $gantt: $xeGantt,
1448
- columns: customColumnList,
1449
- isAllChecked,
1450
- isAllIndeterminate,
1451
- isCustomStatus
1452
- };
1453
- const colVNs = [];
1454
- const headVNs = [];
1455
- if (allowVisible) {
1456
1498
  colVNs.push(
1457
1499
  (0, import_vue.h)("col", {
1458
- key: "av",
1459
- class: "vxe-table-custom-popup--column-col col--checkbox"
1460
- })
1461
- );
1462
- headVNs.push(
1463
- (0, import_vue.h)(
1464
- "th",
1465
- {
1466
- key: "av",
1467
- class: "vxe-table-custom-popup--column-th col--checkbox"
1468
- },
1469
- [
1470
- (0, import_vue.h)(
1471
- "div",
1472
- {
1473
- class: [
1474
- "vxe-table-custom--checkbox-option",
1475
- {
1476
- "is--checked": isAllChecked,
1477
- "is--indeterminate": isAllIndeterminate
1478
- }
1479
- ],
1480
- title: getI18n("vxe.table.allTitle"),
1481
- onClick: allOptionEvent
1482
- },
1483
- [
1484
- (0, import_vue.h)("span", {
1485
- class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1486
- })
1487
- // h('span', {
1488
- // class: 'vxe-checkbox--label'
1489
- // }, getI18n('vxe.toolbar.customAll'))
1490
- ]
1491
- )
1492
- ]
1493
- )
1494
- );
1495
- }
1496
- colVNs.push(
1497
- (0, import_vue.h)("col", {
1498
- key: "at",
1499
- class: "vxe-table-custom-popup--column-col col--title"
1500
- })
1501
- );
1502
- headVNs.push(
1503
- (0, import_vue.h)(
1504
- "th",
1505
- {
1506
1500
  key: "at",
1507
- class: "vxe-table-custom-popup--column-th col--title"
1508
- },
1509
- getI18n("vxe.custom.setting.colTitle")
1510
- )
1511
- );
1512
- if (allowResizable) {
1513
- colVNs.push(
1514
- (0, import_vue.h)("col", {
1515
- key: "aw",
1516
- class: "vxe-table-custom-popup--column-col col--width"
1501
+ class: "vxe-table-custom-popup--column-col col--title"
1517
1502
  })
1518
1503
  );
1519
1504
  headVNs.push(
1520
1505
  (0, import_vue.h)(
1521
1506
  "th",
1522
1507
  {
1523
- key: "aw",
1524
- class: "vxe-table-custom-popup--column-th col--width"
1508
+ key: "at",
1509
+ class: "vxe-table-custom-popup--column-th col--title"
1525
1510
  },
1526
- getI18n("vxe.custom.setting.colResizable")
1511
+ getI18n("vxe.custom.setting.colTitle")
1527
1512
  )
1528
1513
  );
1529
- }
1530
- if (allowFixed) {
1531
- colVNs.push(
1532
- (0, import_vue.h)("col", {
1533
- key: "af",
1534
- class: "vxe-table-custom-popup--column-col col--fixed"
1535
- })
1536
- );
1537
- headVNs.push(
1538
- (0, import_vue.h)(
1539
- "th",
1540
- {
1514
+ if (allowResizable) {
1515
+ colVNs.push(
1516
+ (0, import_vue.h)("col", {
1517
+ key: "aw",
1518
+ class: "vxe-table-custom-popup--column-col col--width"
1519
+ })
1520
+ );
1521
+ headVNs.push(
1522
+ (0, import_vue.h)(
1523
+ "th",
1524
+ {
1525
+ key: "aw",
1526
+ class: "vxe-table-custom-popup--column-th col--width"
1527
+ },
1528
+ getI18n("vxe.custom.setting.colResizable")
1529
+ )
1530
+ );
1531
+ }
1532
+ if (allowFixed) {
1533
+ colVNs.push(
1534
+ (0, import_vue.h)("col", {
1541
1535
  key: "af",
1542
- class: "vxe-table-custom-popup--column-th col--fixed"
1543
- },
1544
- getI18n(`vxe.custom.setting.${maxFixedSize ? "colFixedMax" : "colFixed"}`, [maxFixedSize])
1545
- )
1546
- );
1547
- }
1548
- if (allowAlign) {
1549
- colVNs.push(
1550
- (0, import_vue.h)("col", {
1551
- key: "aa",
1552
- class: "vxe-table-custom-popup--column-col col--align"
1553
- })
1554
- );
1555
- headVNs.push(
1556
- (0, import_vue.h)(
1557
- "th",
1558
- {
1536
+ class: "vxe-table-custom-popup--column-col col--fixed"
1537
+ })
1538
+ );
1539
+ headVNs.push(
1540
+ (0, import_vue.h)(
1541
+ "th",
1542
+ {
1543
+ key: "af",
1544
+ class: "vxe-table-custom-popup--column-th col--fixed"
1545
+ },
1546
+ getI18n(`vxe.custom.setting.${maxFixedSize ? "colFixedMax" : "colFixed"}`, [maxFixedSize])
1547
+ )
1548
+ );
1549
+ }
1550
+ if (allowAlign) {
1551
+ colVNs.push(
1552
+ (0, import_vue.h)("col", {
1559
1553
  key: "aa",
1560
- class: "vxe-table-custom-popup--column-th col--align"
1561
- },
1562
- getI18n("vxe.custom.setting.colAlign")
1563
- )
1564
- );
1565
- }
1566
- if (allowHeaderAlign) {
1567
- colVNs.push(
1568
- (0, import_vue.h)("col", {
1569
- key: "aha",
1570
- class: "vxe-table-custom-popup--column-col col--header-align"
1571
- })
1572
- );
1573
- headVNs.push(
1574
- (0, import_vue.h)(
1575
- "th",
1576
- {
1554
+ class: "vxe-table-custom-popup--column-col col--align"
1555
+ })
1556
+ );
1557
+ headVNs.push(
1558
+ (0, import_vue.h)(
1559
+ "th",
1560
+ {
1561
+ key: "aa",
1562
+ class: "vxe-table-custom-popup--column-th col--align"
1563
+ },
1564
+ getI18n("vxe.custom.setting.colAlign")
1565
+ )
1566
+ );
1567
+ }
1568
+ if (allowHeaderAlign) {
1569
+ colVNs.push(
1570
+ (0, import_vue.h)("col", {
1577
1571
  key: "aha",
1578
- class: "vxe-table-custom-popup--column-th col--header-align"
1579
- },
1580
- getI18n("vxe.custom.setting.colHeadAlign")
1581
- )
1582
- );
1583
- }
1584
- if (allowFooterAlign) {
1585
- colVNs.push(
1586
- (0, import_vue.h)("col", {
1587
- key: "afa",
1588
- class: "vxe-table-custom-popup--column-col col--footer-align"
1589
- })
1590
- );
1591
- headVNs.push(
1592
- (0, import_vue.h)(
1593
- "th",
1594
- {
1572
+ class: "vxe-table-custom-popup--column-col col--header-align"
1573
+ })
1574
+ );
1575
+ headVNs.push(
1576
+ (0, import_vue.h)(
1577
+ "th",
1578
+ {
1579
+ key: "aha",
1580
+ class: "vxe-table-custom-popup--column-th col--header-align"
1581
+ },
1582
+ getI18n("vxe.custom.setting.colHeadAlign")
1583
+ )
1584
+ );
1585
+ }
1586
+ if (allowFooterAlign) {
1587
+ colVNs.push(
1588
+ (0, import_vue.h)("col", {
1595
1589
  key: "afa",
1596
- class: "vxe-table-custom-popup--column-th col--footer-align"
1597
- },
1598
- getI18n("vxe.custom.setting.colFootAlign")
1599
- )
1600
- );
1601
- }
1602
- const scopedSlots = {
1603
- default: () => {
1604
- return (0, import_vue.h)(
1605
- "div",
1606
- {
1607
- ref: refBodyWrapperElem,
1608
- class: [
1609
- "vxe-table-custom-popup--body-wrapper",
1610
- `agg-layout--${aggPlacement}`,
1611
- {
1612
- [`size--${vSize}`]: vSize
1613
- }
1614
- ],
1615
- style: panePopupStyle
1616
- },
1617
- defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
1618
- !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1619
- customStore
1620
- }) : renderEmptyElement($xeTable),
1621
- (0, import_vue.h)(
1622
- "div",
1623
- {
1624
- ref: refCustomBodyElem,
1625
- class: "vxe-table-custom-popup--handle-wrapper"
1626
- },
1627
- [
1628
- topSlot ? (0, import_vue.h)(
1629
- "div",
1630
- {
1631
- class: "vxe-table-custom-popup--table-top"
1632
- },
1633
- $xeTable.callSlot(topSlot, params)
1634
- ) : renderEmptyElement($xeTable),
1635
- (0, import_vue.h)(
1636
- "div",
1637
- {
1638
- class: "vxe-table-custom-popup--table-wrapper"
1639
- },
1640
- [
1641
- (0, import_vue.h)("table", {}, [
1642
- (0, import_vue.h)("colgroup", {}, colVNs),
1643
- (0, import_vue.h)("thead", {}, [(0, import_vue.h)("tr", {}, headVNs)]),
1644
- (0, import_vue.h)(
1645
- import_vue.TransitionGroup,
1646
- {
1647
- class: "vxe-table-custom--panel-list",
1648
- tag: "tbody",
1649
- name: "vxe-table-custom--list"
1650
- },
1651
- {
1652
- default: () => renderPopupBodys()
1653
- }
1654
- )
1655
- ])
1656
- ]
1657
- ),
1658
- bottomSlot ? (0, import_vue.h)(
1659
- "div",
1660
- {
1661
- class: "vxe-table-custom-popup--table-bottom"
1662
- },
1663
- $xeTable.callSlot(bottomSlot, params)
1664
- ) : renderEmptyElement($xeTable),
1665
- renderDragTip()
1666
- ]
1667
- ),
1668
- isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1669
- customStore
1670
- }) : renderEmptyElement($xeTable)
1671
- ]
1590
+ class: "vxe-table-custom-popup--column-col col--footer-align"
1591
+ })
1592
+ );
1593
+ headVNs.push(
1594
+ (0, import_vue.h)(
1595
+ "th",
1596
+ {
1597
+ key: "afa",
1598
+ class: "vxe-table-custom-popup--column-th col--footer-align"
1599
+ },
1600
+ getI18n("vxe.custom.setting.colFootAlign")
1601
+ )
1672
1602
  );
1673
- },
1674
- footer: () => {
1675
- if (footerSlot) {
1676
- return $xeTable.callSlot(footerSlot, params);
1603
+ }
1604
+ const scopedSlots = {
1605
+ default: () => {
1606
+ return (0, import_vue.h)(
1607
+ "div",
1608
+ {
1609
+ ref: refBodyWrapperElem,
1610
+ class: [
1611
+ "vxe-table-custom-popup--body-wrapper",
1612
+ `agg-layout--${aggPlacement}`,
1613
+ {
1614
+ [`size--${vSize}`]: vSize
1615
+ }
1616
+ ],
1617
+ style: panePopupStyle
1618
+ },
1619
+ defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
1620
+ !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1621
+ customStore
1622
+ }) : renderEmptyElement($xeTable),
1623
+ (0, import_vue.h)(
1624
+ "div",
1625
+ {
1626
+ ref: refCustomBodyElem,
1627
+ class: "vxe-table-custom-popup--handle-wrapper"
1628
+ },
1629
+ [
1630
+ topSlot ? (0, import_vue.h)(
1631
+ "div",
1632
+ {
1633
+ class: "vxe-table-custom-popup--table-top"
1634
+ },
1635
+ $xeTable.callSlot(topSlot, params)
1636
+ ) : renderEmptyElement($xeTable),
1637
+ (0, import_vue.h)(
1638
+ "div",
1639
+ {
1640
+ class: "vxe-table-custom-popup--table-wrapper"
1641
+ },
1642
+ [
1643
+ (0, import_vue.h)("table", {}, [
1644
+ (0, import_vue.h)("colgroup", {}, colVNs),
1645
+ (0, import_vue.h)("thead", {}, [(0, import_vue.h)("tr", {}, headVNs)]),
1646
+ (0, import_vue.h)(
1647
+ import_vue.TransitionGroup,
1648
+ {
1649
+ class: "vxe-table-custom--panel-list",
1650
+ tag: "tbody",
1651
+ name: "vxe-table-custom--list"
1652
+ },
1653
+ {
1654
+ default: () => renderPopupBodys()
1655
+ }
1656
+ )
1657
+ ])
1658
+ ]
1659
+ ),
1660
+ bottomSlot ? (0, import_vue.h)(
1661
+ "div",
1662
+ {
1663
+ class: "vxe-table-custom-popup--table-bottom"
1664
+ },
1665
+ $xeTable.callSlot(bottomSlot, params)
1666
+ ) : renderEmptyElement($xeTable),
1667
+ renderDragTip()
1668
+ ]
1669
+ ),
1670
+ isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1671
+ customStore
1672
+ }) : renderEmptyElement($xeTable)
1673
+ ]
1674
+ );
1675
+ },
1676
+ footer: () => {
1677
+ if (footerSlot) {
1678
+ return $xeTable.callSlot(footerSlot, params);
1679
+ }
1680
+ return (0, import_vue.h)(
1681
+ "div",
1682
+ {
1683
+ class: "vxe-table-custom-popup--footer"
1684
+ },
1685
+ [
1686
+ VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1687
+ content: customOpts.resetButtonText || getI18n("vxe.custom.cstmRestore"),
1688
+ disabled: !isCustomStatus,
1689
+ onClick: resetCustomEvent
1690
+ }) : renderEmptyElement($xeTable),
1691
+ immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1692
+ status: "primary",
1693
+ content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1694
+ onClick: cancelCloseEvent
1695
+ }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1696
+ content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1697
+ onClick: cancelCustomEvent
1698
+ }) : renderEmptyElement($xeTable),
1699
+ immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1700
+ status: "primary",
1701
+ content: customOpts.confirmButtonText || getI18n("vxe.custom.cstmConfirm"),
1702
+ onClick: confirmCustomEvent
1703
+ }) : renderEmptyElement($xeTable)
1704
+ ]
1705
+ );
1677
1706
  }
1678
- return (0, import_vue.h)(
1679
- "div",
1707
+ };
1708
+ if (headerSlot) {
1709
+ scopedSlots.header = () => $xeTable.callSlot(headerSlot, params);
1710
+ }
1711
+ if (mode === "drawer") {
1712
+ return VxeUIDrawerComponent ? (0, import_vue.h)(
1713
+ VxeUIDrawerComponent,
1680
1714
  {
1681
- class: "vxe-table-custom-popup--footer"
1715
+ key: "drawer",
1716
+ className: ["vxe-table-custom-drawer-wrapper", "vxe-table--ignore-clear", drawerOpts.className || ""].join(" "),
1717
+ modelValue: customStore.visible,
1718
+ title: drawerOpts.title || getI18n("vxe.custom.cstmTitle"),
1719
+ width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
1720
+ position: drawerOpts.position,
1721
+ resize: !!drawerOpts.resize,
1722
+ escClosable: !!drawerOpts.escClosable,
1723
+ maskClosable: !!drawerOpts.maskClosable,
1724
+ destroyOnClose: true,
1725
+ showFooter: true,
1726
+ "onUpdate:modelValue"(value) {
1727
+ customStore.visible = value;
1728
+ }
1682
1729
  },
1683
- [
1684
- VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1685
- content: customOpts.resetButtonText || getI18n("vxe.custom.cstmRestore"),
1686
- disabled: !isCustomStatus,
1687
- onClick: resetCustomEvent
1688
- }) : renderEmptyElement($xeTable),
1689
- immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1690
- status: "primary",
1691
- content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1692
- onClick: cancelCloseEvent
1693
- }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1694
- content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1695
- onClick: cancelCustomEvent
1696
- }) : renderEmptyElement($xeTable),
1697
- immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
1698
- status: "primary",
1699
- content: customOpts.confirmButtonText || getI18n("vxe.custom.cstmConfirm"),
1700
- onClick: confirmCustomEvent
1701
- }) : renderEmptyElement($xeTable)
1702
- ]
1703
- );
1730
+ scopedSlots
1731
+ ) : renderEmptyElement($xeTable);
1704
1732
  }
1705
- };
1706
- if (headerSlot) {
1707
- scopedSlots.header = () => $xeTable.callSlot(headerSlot, params);
1708
- }
1709
- if (mode === "drawer") {
1710
- return VxeUIDrawerComponent ? (0, import_vue.h)(
1711
- VxeUIDrawerComponent,
1733
+ return VxeUIModalComponent ? (0, import_vue.h)(
1734
+ VxeUIModalComponent,
1712
1735
  {
1713
- key: "drawer",
1714
- className: ["vxe-table-custom-drawer-wrapper", "vxe-table--ignore-clear", drawerOpts.className || ""].join(" "),
1736
+ key: "modal",
1737
+ className: ["vxe-table-custom-modal-wrapper", "vxe-table--ignore-clear", modalOpts.className || ""].join(" "),
1715
1738
  modelValue: customStore.visible,
1716
- title: drawerOpts.title || getI18n("vxe.custom.cstmTitle"),
1717
- width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
1718
- position: drawerOpts.position,
1719
- resize: !!drawerOpts.resize,
1720
- escClosable: !!drawerOpts.escClosable,
1721
- maskClosable: !!drawerOpts.maskClosable,
1739
+ title: modalOpts.title || getI18n("vxe.custom.cstmTitle"),
1740
+ width: modalOpts.width || Math.min(1e3, document.documentElement.clientWidth),
1741
+ minWidth: modalOpts.minWidth || 800,
1742
+ height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1743
+ minHeight: modalOpts.minHeight || 400,
1744
+ showZoom: modalOpts.showZoom,
1745
+ showMaximize: modalOpts.showMaximize,
1746
+ showMinimize: modalOpts.showMinimize,
1747
+ mask: modalOpts.mask,
1748
+ lockView: modalOpts.lockView,
1749
+ resize: modalOpts.resize,
1750
+ transfer: modalOpts.transfer,
1751
+ escClosable: !!modalOpts.escClosable,
1752
+ maskClosable: !!modalOpts.maskClosable,
1722
1753
  destroyOnClose: true,
1723
1754
  showFooter: true,
1724
1755
  "onUpdate:modelValue"(value) {
@@ -1727,80 +1758,52 @@ var panel_default = (0, import_comp.defineVxeComponent)({
1727
1758
  },
1728
1759
  scopedSlots
1729
1760
  ) : renderEmptyElement($xeTable);
1730
- }
1731
- return VxeUIModalComponent ? (0, import_vue.h)(
1732
- VxeUIModalComponent,
1733
- {
1734
- key: "modal",
1735
- className: ["vxe-table-custom-modal-wrapper", "vxe-table--ignore-clear", modalOpts.className || ""].join(" "),
1736
- modelValue: customStore.visible,
1737
- title: modalOpts.title || getI18n("vxe.custom.cstmTitle"),
1738
- width: modalOpts.width || Math.min(1e3, document.documentElement.clientWidth),
1739
- minWidth: modalOpts.minWidth || 800,
1740
- height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1741
- minHeight: modalOpts.minHeight || 400,
1742
- showZoom: modalOpts.showZoom,
1743
- showMaximize: modalOpts.showMaximize,
1744
- showMinimize: modalOpts.showMinimize,
1745
- mask: modalOpts.mask,
1746
- lockView: modalOpts.lockView,
1747
- resize: modalOpts.resize,
1748
- transfer: modalOpts.transfer,
1749
- escClosable: !!modalOpts.escClosable,
1750
- maskClosable: !!modalOpts.maskClosable,
1751
- destroyOnClose: true,
1752
- showFooter: true,
1753
- "onUpdate:modelValue"(value) {
1754
- customStore.visible = value;
1755
- }
1756
- },
1757
- scopedSlots
1758
- ) : renderEmptyElement($xeTable);
1759
- };
1760
- const renderVN = () => {
1761
- const customOpts = computeCustomOpts.value;
1762
- if (["modal", "drawer", "popup"].includes(`${customOpts.mode}`)) {
1763
- return renderPopupPanel();
1764
- }
1765
- return renderSimplePanel();
1766
- };
1767
- (0, import_vue.nextTick)(() => {
1768
- const customOpts = computeCustomOpts.value;
1769
- const { mode } = customOpts;
1770
- if (!VxeUIModalComponent && mode === "modal") {
1771
- errLog("vxe.error.reqComp", ["vxe-modal"]);
1772
- }
1773
- if (!VxeUIDrawerComponent && mode === "drawer") {
1774
- errLog("vxe.error.reqComp", ["vxe-drawer"]);
1775
- }
1776
- if (!VxeUIButtonComponent) {
1777
- errLog("vxe.error.reqComp", ["vxe-button"]);
1778
- }
1779
- if (!VxeUINumberInputComponent) {
1780
- errLog("vxe.error.reqComp", ["vxe-number-input"]);
1781
- }
1782
- if (!VxeUIRadioGroupComponent) {
1783
- errLog("vxe.error.reqComp", ["vxe-radio-group"]);
1784
- }
1785
- });
1786
- const $xeTableCustomPanel = {
1787
- xID,
1788
- props,
1789
- context,
1790
- reactData: customPanelReactData,
1791
- internalData: customPanelInternalData,
1792
- xeTable: $xeTable,
1793
- getRefMaps: () => refMaps,
1794
- getComputeMaps: () => computeMaps,
1795
- renderVN
1796
- };
1797
- (0, import_vue.onUnmounted)(() => {
1798
- customPanelInternalData = createInternalData();
1799
- });
1800
- (0, import_vue.provide)("$xeTableCustomPanel", $xeTableCustomPanel);
1801
- return $xeTableCustomPanel;
1802
- },
1803
- render() {
1804
- return this.renderVN();
1805
- }
1806
- });
1761
+ };
1762
+ const renderVN = () => {
1763
+ const customOpts = computeCustomOpts.value;
1764
+ if (["modal", "drawer", "popup"].includes(`${customOpts.mode}`)) {
1765
+ return renderPopupPanel();
1766
+ }
1767
+ return renderSimplePanel();
1768
+ };
1769
+ (0, import_vue.nextTick)(() => {
1770
+ const customOpts = computeCustomOpts.value;
1771
+ const { mode } = customOpts;
1772
+ if (!VxeUIModalComponent && mode === "modal") {
1773
+ errLog("vxe.error.reqComp", ["vxe-modal"]);
1774
+ }
1775
+ if (!VxeUIDrawerComponent && mode === "drawer") {
1776
+ errLog("vxe.error.reqComp", ["vxe-drawer"]);
1777
+ }
1778
+ if (!VxeUIButtonComponent) {
1779
+ errLog("vxe.error.reqComp", ["vxe-button"]);
1780
+ }
1781
+ if (!VxeUINumberInputComponent) {
1782
+ errLog("vxe.error.reqComp", ["vxe-number-input"]);
1783
+ }
1784
+ if (!VxeUIRadioGroupComponent) {
1785
+ errLog("vxe.error.reqComp", ["vxe-radio-group"]);
1786
+ }
1787
+ });
1788
+ const $xeTableCustomPanel = {
1789
+ xID,
1790
+ props,
1791
+ context,
1792
+ reactData: customPanelReactData,
1793
+ internalData: customPanelInternalData,
1794
+ xeTable: $xeTable,
1795
+ getRefMaps: () => refMaps,
1796
+ getComputeMaps: () => computeMaps,
1797
+ renderVN
1798
+ };
1799
+ (0, import_vue.onUnmounted)(() => {
1800
+ customPanelInternalData = createInternalData();
1801
+ });
1802
+ (0, import_vue.provide)("$xeTableCustomPanel", $xeTableCustomPanel);
1803
+ return $xeTableCustomPanel;
1804
+ },
1805
+ render() {
1806
+ return this.renderVN();
1807
+ }
1808
+ })
1809
+ );