vxe-table 4.16.16 → 4.16.17

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 (230) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/src/table.js +5 -0
  3. package/es/ui/index.js +1 -1
  4. package/es/ui/src/log.js +1 -1
  5. package/lib/index.umd.js +3 -3
  6. package/lib/index.umd.min.js +1 -1
  7. package/lib/locale/lang/ar-EG.min.js +1 -1
  8. package/lib/locale/lang/de-DE.min.js +1 -1
  9. package/lib/locale/lang/en-US.min.js +1 -1
  10. package/lib/locale/lang/es-ES.min.js +1 -1
  11. package/lib/locale/lang/fr-FR.min.js +1 -1
  12. package/lib/locale/lang/hu-HU.min.js +1 -1
  13. package/lib/locale/lang/hy-AM.min.js +1 -1
  14. package/lib/locale/lang/id-ID.min.js +1 -1
  15. package/lib/locale/lang/it-IT.min.js +1 -1
  16. package/lib/locale/lang/ja-JP.min.js +1 -1
  17. package/lib/locale/lang/ko-KR.min.js +1 -1
  18. package/lib/locale/lang/ms-MY.min.js +1 -1
  19. package/lib/locale/lang/nb-NO.min.js +1 -1
  20. package/lib/locale/lang/pt-BR.min.js +1 -1
  21. package/lib/locale/lang/ru-RU.min.js +1 -1
  22. package/lib/locale/lang/th-TH.min.js +1 -1
  23. package/lib/locale/lang/ug-CN.min.js +1 -1
  24. package/lib/locale/lang/uk-UA.min.js +1 -1
  25. package/lib/locale/lang/uz-UZ.min.js +1 -1
  26. package/lib/locale/lang/vi-VN.min.js +1 -1
  27. package/lib/locale/lang/zh-CHT.min.js +1 -1
  28. package/lib/locale/lang/zh-CN.min.js +1 -1
  29. package/lib/locale/lang/zh-HK.min.js +1 -1
  30. package/lib/locale/lang/zh-MO.min.js +1 -1
  31. package/lib/locale/lang/zh-TW.min.js +1 -1
  32. package/lib/style.css +1 -1
  33. package/lib/table/src/props.js +0 -318
  34. package/lib/ui/index.js +1 -1
  35. package/lib/ui/index.min.js +1 -1
  36. package/lib/ui/src/log.js +1 -1
  37. package/lib/ui/src/log.min.js +1 -1
  38. package/package.json +1 -1
  39. package/packages/table/src/table.ts +5 -0
  40. package/es/colgroup/style.css +0 -0
  41. package/es/colgroup/style.min.css +0 -0
  42. package/es/column/style.css +0 -0
  43. package/es/column/style.min.css +0 -0
  44. package/es/grid/style.css +0 -86
  45. package/es/grid/style.min.css +0 -1
  46. package/es/iconfont.1758344508103.ttf +0 -0
  47. package/es/iconfont.1758344508103.woff +0 -0
  48. package/es/iconfont.1758344508103.woff2 +0 -0
  49. package/es/index.esm.js +0 -3
  50. package/es/locale/lang/ar-EG.d.ts +0 -2
  51. package/es/locale/lang/de-DE.d.ts +0 -2
  52. package/es/locale/lang/en-US.d.ts +0 -2
  53. package/es/locale/lang/es-ES.d.ts +0 -2
  54. package/es/locale/lang/fr-FR.d.ts +0 -2
  55. package/es/locale/lang/hu-HU.d.ts +0 -2
  56. package/es/locale/lang/hy-AM.d.ts +0 -2
  57. package/es/locale/lang/id-ID.d.ts +0 -2
  58. package/es/locale/lang/it-IT.d.ts +0 -2
  59. package/es/locale/lang/ja-JP.d.ts +0 -2
  60. package/es/locale/lang/ko-KR.d.ts +0 -2
  61. package/es/locale/lang/ms-MY.d.ts +0 -2
  62. package/es/locale/lang/nb-NO.d.ts +0 -2
  63. package/es/locale/lang/pt-BR.d.ts +0 -2
  64. package/es/locale/lang/ru-RU.d.ts +0 -2
  65. package/es/locale/lang/th-TH.d.ts +0 -2
  66. package/es/locale/lang/ug-CN.d.ts +0 -2
  67. package/es/locale/lang/uk-UA.d.ts +0 -2
  68. package/es/locale/lang/uz-UZ.d.ts +0 -2
  69. package/es/locale/lang/vi-VN.d.ts +0 -2
  70. package/es/locale/lang/zh-CHT.d.ts +0 -2
  71. package/es/locale/lang/zh-CN.d.ts +0 -2
  72. package/es/locale/lang/zh-HK.d.ts +0 -2
  73. package/es/locale/lang/zh-MO.d.ts +0 -2
  74. package/es/locale/lang/zh-TW.d.ts +0 -2
  75. package/es/table/style.css +0 -3657
  76. package/es/table/style.min.css +0 -1
  77. package/es/toolbar/style.css +0 -90
  78. package/es/toolbar/style.min.css +0 -1
  79. package/es/ui/style.css +0 -0
  80. package/es/ui/style.min.css +0 -0
  81. package/es/v-x-e-table/style.css +0 -0
  82. package/es/v-x-e-table/style.min.css +0 -0
  83. package/es/vxe-colgroup/style.css +0 -0
  84. package/es/vxe-colgroup/style.min.css +0 -0
  85. package/es/vxe-column/style.css +0 -0
  86. package/es/vxe-column/style.min.css +0 -0
  87. package/es/vxe-grid/style.css +0 -86
  88. package/es/vxe-grid/style.min.css +0 -1
  89. package/es/vxe-table/style.css +0 -3657
  90. package/es/vxe-table/style.min.css +0 -1
  91. package/es/vxe-toolbar/style.css +0 -90
  92. package/es/vxe-toolbar/style.min.css +0 -1
  93. package/es/vxe-ui/style.css +0 -0
  94. package/es/vxe-ui/style.min.css +0 -0
  95. package/es/vxe-v-x-e-table/style.css +0 -0
  96. package/es/vxe-v-x-e-table/style.min.css +0 -0
  97. package/lib/colgroup/style/index.js +0 -1
  98. package/lib/colgroup/style/style.css +0 -0
  99. package/lib/colgroup/style/style.min.css +0 -0
  100. package/lib/column/style/index.js +0 -1
  101. package/lib/column/style/style.css +0 -0
  102. package/lib/column/style/style.min.css +0 -0
  103. package/lib/grid/style/index.js +0 -1
  104. package/lib/grid/style/style.css +0 -86
  105. package/lib/grid/style/style.min.css +0 -1
  106. package/lib/iconfont.1758344508103.ttf +0 -0
  107. package/lib/iconfont.1758344508103.woff +0 -0
  108. package/lib/iconfont.1758344508103.woff2 +0 -0
  109. package/lib/index.common.js +0 -22
  110. package/lib/locale/lang/ar-EG.d.ts +0 -2
  111. package/lib/locale/lang/ar-EG.umd.js +0 -806
  112. package/lib/locale/lang/de-DE.d.ts +0 -2
  113. package/lib/locale/lang/de-DE.umd.js +0 -806
  114. package/lib/locale/lang/en-US.d.ts +0 -2
  115. package/lib/locale/lang/en-US.umd.js +0 -806
  116. package/lib/locale/lang/es-ES.d.ts +0 -2
  117. package/lib/locale/lang/es-ES.umd.js +0 -806
  118. package/lib/locale/lang/fr-FR.d.ts +0 -2
  119. package/lib/locale/lang/fr-FR.umd.js +0 -806
  120. package/lib/locale/lang/hu-HU.d.ts +0 -2
  121. package/lib/locale/lang/hu-HU.umd.js +0 -806
  122. package/lib/locale/lang/hy-AM.d.ts +0 -2
  123. package/lib/locale/lang/hy-AM.umd.js +0 -806
  124. package/lib/locale/lang/id-ID.d.ts +0 -2
  125. package/lib/locale/lang/id-ID.umd.js +0 -806
  126. package/lib/locale/lang/it-IT.d.ts +0 -2
  127. package/lib/locale/lang/it-IT.umd.js +0 -806
  128. package/lib/locale/lang/ja-JP.d.ts +0 -2
  129. package/lib/locale/lang/ja-JP.umd.js +0 -806
  130. package/lib/locale/lang/ko-KR.d.ts +0 -2
  131. package/lib/locale/lang/ko-KR.umd.js +0 -806
  132. package/lib/locale/lang/ms-MY.d.ts +0 -2
  133. package/lib/locale/lang/ms-MY.umd.js +0 -806
  134. package/lib/locale/lang/nb-NO.d.ts +0 -2
  135. package/lib/locale/lang/nb-NO.umd.js +0 -806
  136. package/lib/locale/lang/pt-BR.d.ts +0 -2
  137. package/lib/locale/lang/pt-BR.umd.js +0 -806
  138. package/lib/locale/lang/ru-RU.d.ts +0 -2
  139. package/lib/locale/lang/ru-RU.umd.js +0 -806
  140. package/lib/locale/lang/th-TH.d.ts +0 -2
  141. package/lib/locale/lang/th-TH.umd.js +0 -806
  142. package/lib/locale/lang/ug-CN.d.ts +0 -2
  143. package/lib/locale/lang/ug-CN.umd.js +0 -806
  144. package/lib/locale/lang/uk-UA.d.ts +0 -2
  145. package/lib/locale/lang/uk-UA.umd.js +0 -806
  146. package/lib/locale/lang/uz-UZ.d.ts +0 -2
  147. package/lib/locale/lang/uz-UZ.umd.js +0 -806
  148. package/lib/locale/lang/vi-VN.d.ts +0 -2
  149. package/lib/locale/lang/vi-VN.umd.js +0 -806
  150. package/lib/locale/lang/zh-CHT.d.ts +0 -2
  151. package/lib/locale/lang/zh-CHT.umd.js +0 -806
  152. package/lib/locale/lang/zh-CN.d.ts +0 -2
  153. package/lib/locale/lang/zh-CN.umd.js +0 -808
  154. package/lib/locale/lang/zh-HK.d.ts +0 -2
  155. package/lib/locale/lang/zh-HK.umd.js +0 -23
  156. package/lib/locale/lang/zh-MO.d.ts +0 -2
  157. package/lib/locale/lang/zh-MO.umd.js +0 -23
  158. package/lib/locale/lang/zh-TW.d.ts +0 -2
  159. package/lib/locale/lang/zh-TW.umd.js +0 -23
  160. package/lib/table/module/custom/hook.js +0 -430
  161. package/lib/table/module/custom/hook.min.js +0 -1
  162. package/lib/table/module/custom/panel.js +0 -1193
  163. package/lib/table/module/custom/panel.min.js +0 -1
  164. package/lib/table/module/edit/hook.js +0 -1308
  165. package/lib/table/module/edit/hook.min.js +0 -1
  166. package/lib/table/module/export/export-panel.js +0 -467
  167. package/lib/table/module/export/export-panel.min.js +0 -1
  168. package/lib/table/module/export/hook.js +0 -1888
  169. package/lib/table/module/export/hook.min.js +0 -1
  170. package/lib/table/module/export/import-panel.js +0 -226
  171. package/lib/table/module/export/import-panel.min.js +0 -1
  172. package/lib/table/module/export/util.js +0 -20
  173. package/lib/table/module/export/util.min.js +0 -1
  174. package/lib/table/module/filter/hook.js +0 -442
  175. package/lib/table/module/filter/hook.min.js +0 -1
  176. package/lib/table/module/filter/panel.js +0 -265
  177. package/lib/table/module/filter/panel.min.js +0 -1
  178. package/lib/table/module/keyboard/hook.js +0 -579
  179. package/lib/table/module/keyboard/hook.min.js +0 -1
  180. package/lib/table/module/menu/hook.js +0 -392
  181. package/lib/table/module/menu/hook.min.js +0 -1
  182. package/lib/table/module/menu/panel.js +0 -145
  183. package/lib/table/module/menu/panel.min.js +0 -1
  184. package/lib/table/module/validator/hook.js +0 -681
  185. package/lib/table/module/validator/hook.min.js +0 -1
  186. package/lib/table/src/header.min.js +0 -1
  187. package/lib/table/src/props.min.js +0 -1
  188. package/lib/table/src/store.js +0 -15
  189. package/lib/table/src/store.min.js +0 -1
  190. package/lib/table/src/table.js +0 -902
  191. package/lib/table/src/table.min.js +0 -1
  192. package/lib/table/src/use/cell-view.js +0 -57
  193. package/lib/table/src/use/cell-view.min.js +0 -1
  194. package/lib/table/src/use/index.js +0 -16
  195. package/lib/table/src/use/index.min.js +0 -1
  196. package/lib/table/src/util.js +0 -916
  197. package/lib/table/src/util.min.js +0 -1
  198. package/lib/table/style/index.js +0 -1
  199. package/lib/table/style/style.css +0 -3657
  200. package/lib/table/style/style.min.css +0 -1
  201. package/lib/toolbar/style/index.js +0 -1
  202. package/lib/toolbar/style/style.css +0 -90
  203. package/lib/toolbar/style/style.min.css +0 -1
  204. package/lib/ui/style/index.js +0 -1
  205. package/lib/ui/style/style.css +0 -0
  206. package/lib/ui/style/style.min.css +0 -0
  207. package/lib/v-x-e-table/style/index.js +0 -1
  208. package/lib/v-x-e-table/style/style.css +0 -0
  209. package/lib/v-x-e-table/style/style.min.css +0 -0
  210. package/lib/vxe-colgroup/style/index.js +0 -1
  211. package/lib/vxe-colgroup/style/style.css +0 -0
  212. package/lib/vxe-colgroup/style/style.min.css +0 -0
  213. package/lib/vxe-column/style/index.js +0 -1
  214. package/lib/vxe-column/style/style.css +0 -0
  215. package/lib/vxe-column/style/style.min.css +0 -0
  216. package/lib/vxe-grid/style/index.js +0 -1
  217. package/lib/vxe-grid/style/style.css +0 -86
  218. package/lib/vxe-grid/style/style.min.css +0 -1
  219. package/lib/vxe-table/style/index.js +0 -1
  220. package/lib/vxe-table/style/style.css +0 -3657
  221. package/lib/vxe-table/style/style.min.css +0 -1
  222. package/lib/vxe-toolbar/style/index.js +0 -1
  223. package/lib/vxe-toolbar/style/style.css +0 -90
  224. package/lib/vxe-toolbar/style/style.min.css +0 -1
  225. package/lib/vxe-ui/style/index.js +0 -1
  226. package/lib/vxe-ui/style/style.css +0 -0
  227. package/lib/vxe-ui/style/style.min.css +0 -0
  228. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  229. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  230. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
@@ -1,265 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _vue = require("vue");
8
- var _comp = require("../../../ui/src/comp");
9
- var _ui = require("../../../ui");
10
- var _utils = require("../../../ui/src/utils");
11
- var _dom = require("../../../ui/src/dom");
12
- var _vn = require("../../../ui/src/vn");
13
- var _log = require("../../../ui/src/log");
14
- var _xeUtils = _interopRequireDefault(require("xe-utils"));
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- const {
17
- getI18n,
18
- getIcon,
19
- renderer
20
- } = _ui.VxeUI;
21
- var _default = exports.default = (0, _comp.defineVxeComponent)({
22
- name: 'VxeTableFilterPanel',
23
- props: {
24
- filterStore: Object
25
- },
26
- setup(props, context) {
27
- const xID = _xeUtils.default.uniqueId();
28
- const $xeTable = (0, _vue.inject)('$xeTable', {});
29
- const {
30
- reactData: tableReactData,
31
- internalData: tableInternalData,
32
- getComputeMaps
33
- } = $xeTable;
34
- const {
35
- computeFilterOpts
36
- } = getComputeMaps();
37
- const refElem = (0, _vue.ref)();
38
- const refMaps = {
39
- refElem
40
- };
41
- const $xeFilterPanel = {
42
- xID,
43
- props,
44
- context,
45
- getRefMaps: () => refMaps
46
- };
47
- const computeHasCheckOption = (0, _vue.computed)(() => {
48
- const {
49
- filterStore
50
- } = props;
51
- return filterStore && filterStore.options.some(option => option.checked);
52
- });
53
- // 全部筛选事件
54
- const filterCheckAllEvent = (evnt, value) => {
55
- const {
56
- filterStore
57
- } = props;
58
- filterStore.options.forEach(option => {
59
- option._checked = value;
60
- option.checked = value;
61
- });
62
- filterStore.isAllSelected = value;
63
- filterStore.isIndeterminate = false;
64
- };
65
- /*************************
66
- * Publish methods
67
- *************************/
68
- // 确认筛选
69
- const confirmFilter = evnt => {
70
- if (!evnt) {
71
- (0, _log.warnLog)('vxe.error.delFunc', ['confirmFilter', 'saveFilterPanelByEvent']);
72
- }
73
- $xeTable.handleFilterConfirmFilter(evnt || new Event('click'));
74
- };
75
- // (单选)筛选发生改变
76
- const changeRadioOption = (evnt, checked, item) => {
77
- $xeTable.handleFilterChangeRadioOption(evnt, checked, item);
78
- };
79
- /**
80
- * 重置筛选
81
- * 当筛选面板中的重置按钮被按下时触发
82
- * @param {Event} evnt 事件
83
- */
84
- const resetFilter = evnt => {
85
- $xeTable.handleFilterResetFilter(evnt);
86
- };
87
- // (多选)筛选发生改变
88
- const changeMultipleOption = (evnt, checked, item) => {
89
- $xeTable.handleFilterChangeMultipleOption(evnt, checked, item);
90
- };
91
- // 筛选发生改变
92
- const changeOption = (evnt, checked, item) => {
93
- $xeTable.handleFilterChangeOption(evnt, checked, item);
94
- };
95
- const changeAllOption = (evnt, checked) => {
96
- const {
97
- filterStore
98
- } = props;
99
- if (filterStore.multiple) {
100
- filterCheckAllEvent(evnt, checked);
101
- } else {
102
- resetFilter(evnt);
103
- }
104
- };
105
- /*************************
106
- * Publish methods
107
- *************************/
108
- const filterPanelMethods = {
109
- changeRadioOption,
110
- changeMultipleOption,
111
- changeAllOption,
112
- changeOption,
113
- confirmFilter,
114
- resetFilter
115
- };
116
- Object.assign($xeFilterPanel, filterPanelMethods);
117
- const renderOptions = (filterRender, compConf) => {
118
- const {
119
- filterStore
120
- } = props;
121
- const {
122
- column,
123
- multiple,
124
- maxHeight
125
- } = filterStore;
126
- const slots = column ? column.slots : null;
127
- const filterSlot = slots ? slots.filter : null;
128
- const params = Object.assign({}, tableInternalData._currFilterParams, {
129
- $panel: $xeFilterPanel,
130
- $table: $xeTable
131
- });
132
- const rtFilter = compConf ? compConf.renderTableFilter || compConf.renderFilter : null;
133
- if (filterSlot) {
134
- return [(0, _vue.h)('div', {
135
- class: 'vxe-table--filter-template',
136
- style: maxHeight ? {
137
- maxHeight: `${maxHeight}px`
138
- } : {}
139
- }, $xeTable.callSlot(filterSlot, params))];
140
- } else if (rtFilter) {
141
- return [(0, _vue.h)('div', {
142
- class: 'vxe-table--filter-template',
143
- style: maxHeight ? {
144
- maxHeight: `${maxHeight}px`
145
- } : {}
146
- }, (0, _vn.getSlotVNs)(rtFilter(filterRender, params)))];
147
- }
148
- const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some(item => item._checked);
149
- const isAllIndeterminate = multiple && filterStore.isIndeterminate;
150
- return [(0, _vue.h)('ul', {
151
- class: 'vxe-table--filter-header'
152
- }, [(0, _vue.h)('li', {
153
- class: ['vxe-table--filter-option', {
154
- 'is--checked': isAllChecked,
155
- 'is--indeterminate': isAllIndeterminate
156
- }],
157
- title: getI18n(multiple ? 'vxe.table.allTitle' : 'vxe.table.allFilter'),
158
- onClick: evnt => {
159
- changeAllOption(evnt, !filterStore.isAllSelected);
160
- }
161
- }, (multiple ? [(0, _vue.h)('span', {
162
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
163
- })] : []).concat([(0, _vue.h)('span', {
164
- class: 'vxe-checkbox--label'
165
- }, getI18n('vxe.table.allFilter'))]))]), (0, _vue.h)('ul', {
166
- class: 'vxe-table--filter-body',
167
- style: maxHeight ? {
168
- maxHeight: `${maxHeight}px`
169
- } : {}
170
- }, filterStore.options.map(item => {
171
- const isChecked = item._checked;
172
- const isIndeterminate = false;
173
- return (0, _vue.h)('li', {
174
- class: ['vxe-table--filter-option', {
175
- 'is--checked': item._checked
176
- }],
177
- title: item.label,
178
- onClick: evnt => {
179
- changeOption(evnt, !item._checked, item);
180
- }
181
- }, (multiple ? [(0, _vue.h)('span', {
182
- class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
183
- })] : []).concat([(0, _vue.h)('span', {
184
- class: 'vxe-checkbox--label'
185
- }, (0, _utils.formatText)(item.label, 1))]));
186
- }))];
187
- };
188
- const renderFooters = () => {
189
- const {
190
- filterStore
191
- } = props;
192
- const {
193
- column,
194
- multiple
195
- } = filterStore;
196
- const filterOpts = computeFilterOpts.value;
197
- const hasCheckOption = computeHasCheckOption.value;
198
- const {
199
- filterRender
200
- } = column;
201
- const compConf = (0, _utils.isEnableConf)(filterRender) ? renderer.get(filterRender.name) : null;
202
- const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate;
203
- return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true) ? [(0, _vue.h)('div', {
204
- class: 'vxe-table--filter-footer'
205
- }, [(0, _vue.h)('button', {
206
- class: {
207
- 'is--disabled': isDisabled
208
- },
209
- disabled: isDisabled,
210
- onClick: confirmFilter
211
- }, filterOpts.confirmButtonText || getI18n('vxe.table.confirmFilter')), (0, _vue.h)('button', {
212
- onClick: resetFilter
213
- }, filterOpts.resetButtonText || getI18n('vxe.table.resetFilter'))])] : [];
214
- };
215
- const renderVN = () => {
216
- const {
217
- filterStore
218
- } = props;
219
- const {
220
- initStore
221
- } = tableReactData;
222
- const {
223
- visible,
224
- multiple,
225
- column
226
- } = filterStore;
227
- const filterRender = column ? column.filterRender : null;
228
- const compConf = (0, _utils.isEnableConf)(filterRender) ? renderer.get(filterRender.name) : null;
229
- const filterClassName = compConf ? compConf.tableFilterClassName || compConf.filterClassName : '';
230
- const params = Object.assign({}, tableInternalData._currFilterParams, {
231
- $panel: $xeFilterPanel,
232
- $table: $xeTable
233
- });
234
- const tableProps = $xeTable.props;
235
- const {
236
- computeSize
237
- } = $xeTable.getComputeMaps();
238
- const vSize = computeSize.value;
239
- const filterOpts = computeFilterOpts.value;
240
- const {
241
- transfer,
242
- destroyOnClose,
243
- className
244
- } = filterOpts;
245
- return (0, _vue.h)(_vue.Teleport, {
246
- to: 'body',
247
- disabled: !transfer
248
- }, [(0, _vue.h)('div', {
249
- ref: refElem,
250
- class: ['vxe-table--filter-wrapper', 'filter--prevent-default', className, (0, _dom.getPropClass)(filterClassName, params), {
251
- [`size--${vSize}`]: vSize,
252
- 'is--animat': tableProps.animat,
253
- 'is--multiple': multiple,
254
- 'is--active': visible
255
- }],
256
- style: filterStore.style
257
- }, initStore.filter && (destroyOnClose ? visible : true) && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : [])]);
258
- };
259
- $xeFilterPanel.renderVN = renderVN;
260
- return $xeFilterPanel;
261
- },
262
- render() {
263
- return this.renderVN();
264
- }
265
- });
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../../ui/src/comp"),_ui=require("../../../ui"),_utils=require("../../../ui/src/utils"),_dom=require("../../../ui/src/dom"),_vn=require("../../../ui/src/vn"),_log=require("../../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getI18n,getIcon,renderer}=_ui.VxeUI;var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableFilterPanel",props:{filterStore:Object},setup(_,e){var t=_xeUtils.default.uniqueId();let m=(0,_vue.inject)("$xeTable",{}),{reactData:h,internalData:f,getComputeMaps:l}=m,x=l().computeFilterOpts,b=(0,_vue.ref)(),r={refElem:b},g={xID:t,props:_,context:e,getRefMaps:()=>r},C=(0,_vue.computed)(()=>{var e=_.filterStore;return e&&e.options.some(e=>e.checked)}),i=(e,t)=>{var l=_.filterStore;l.options.forEach(e=>{e._checked=t,e.checked=t}),l.isAllSelected=t,l.isIndeterminate=!1},F=e=>{e||(0,_log.warnLog)("vxe.error.delFunc",["confirmFilter","saveFilterPanelByEvent"]),m.handleFilterConfirmFilter(e||new Event("click"))};let E=e=>{m.handleFilterResetFilter(e)};let I=(e,t,l)=>{m.handleFilterChangeOption(e,t,l)},O=(e,t)=>{var l=_.filterStore;l.multiple?i(0,t):E(e)};t={changeRadioOption:(e,t,l)=>{m.handleFilterChangeRadioOption(e,t,l)},changeMultipleOption:(e,t,l)=>{m.handleFilterChangeMultipleOption(e,t,l)},changeAllOption:O,changeOption:I,confirmFilter:F,resetFilter:E};Object.assign(g,t);return g.renderVN=()=>{var e=_.filterStore,t=h.initStore,{visible:l,multiple:r,column:i}=e,a=i?i.filterRender:null,n=(0,_utils.isEnableConf)(a)?renderer.get(a.name):null,s=n?n.tableFilterClassName||n.filterClassName:"",o=Object.assign({},f._currFilterParams,{$panel:g,$table:m}),u=m.props,c=m.getComputeMaps().computeSize,c=c.value,{transfer:v,destroyOnClose:d,className:p}=x.value;return(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!v},[(0,_vue.h)("div",{ref:b,class:["vxe-table--filter-wrapper","filter--prevent-default",p,(0,_dom.getPropClass)(s,o),{["size--"+c]:c,"is--animat":u.animat,"is--multiple":r,"is--active":l}],style:e.style},t.filter&&(!d||l)&&i?((e,t)=>{let l=_.filterStore,{column:r,multiple:i,maxHeight:a}=l;var n=r?r.slots:null,n=n?n.filter:null,s=Object.assign({},f._currFilterParams,{$panel:g,$table:m}),t=t?t.renderTableFilter||t.renderFilter:null;return n?[(0,_vue.h)("div",{class:"vxe-table--filter-template",style:a?{maxHeight:a+"px"}:{}},m.callSlot(n,s))]:t?[(0,_vue.h)("div",{class:"vxe-table--filter-template",style:a?{maxHeight:a+"px"}:{}},(0,_vn.getSlotVNs)(t(e,s)))]:(n=i?l.isAllSelected:!l.options.some(e=>e._checked),t=i&&l.isIndeterminate,[(0,_vue.h)("ul",{class:"vxe-table--filter-header"},[(0,_vue.h)("li",{class:["vxe-table--filter-option",{"is--checked":n,"is--indeterminate":t}],title:getI18n(i?"vxe.table.allTitle":"vxe.table.allFilter"),onClick:e=>{O(e,!l.isAllSelected)}},(i?[(0,_vue.h)("span",{class:["vxe-checkbox--icon",t?getIcon().TABLE_CHECKBOX_INDETERMINATE:n?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]:[]).concat([(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.table.allFilter"))]))]),(0,_vue.h)("ul",{class:"vxe-table--filter-body",style:a?{maxHeight:a+"px"}:{}},l.options.map(t=>{var e=t._checked;return(0,_vue.h)("li",{class:["vxe-table--filter-option",{"is--checked":t._checked}],title:t.label,onClick:e=>{I(e,!t._checked,t)}},(i?[(0,_vue.h)("span",{class:["vxe-checkbox--icon",e?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]:[]).concat([(0,_vue.h)("span",{class:"vxe-checkbox--label"},(0,_utils.formatText)(t.label,1))]))}))])})(a,n).concat((()=>{var e=_.filterStore,{column:t,multiple:l}=e,r=x.value,i=C.value,t=t.filterRender,t=(0,_utils.isEnableConf)(t)?renderer.get(t.name):null,i=!i&&!e.isAllSelected&&!e.isIndeterminate;return l&&(!t||!1!==t.showTableFilterFooter&&!1!==t.showFilterFooter&&!1!==t.isFooter)?[(0,_vue.h)("div",{class:"vxe-table--filter-footer"},[(0,_vue.h)("button",{class:{"is--disabled":i},disabled:i,onClick:F},r.confirmButtonText||getI18n("vxe.table.confirmFilter")),(0,_vue.h)("button",{onClick:E},r.resetButtonText||getI18n("vxe.table.resetFilter"))])]:[]})()):[])])},g},render(){return this.renderVN()}});