evui 3.5.0 → 3.5.2

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 (134) hide show
  1. package/dist/index.js +23148 -0
  2. package/dist/index.umd.cjs +28 -0
  3. package/package.json +5 -11
  4. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  5. package/dist/common/utils.bignumber.js +0 -23
  6. package/dist/common/utils.debounce.js +0 -66
  7. package/dist/common/utils.js +0 -64
  8. package/dist/common/utils.throttle.js +0 -15
  9. package/dist/components/button/Button.vue.js +0 -65
  10. package/dist/components/button/index.js +0 -7
  11. package/dist/components/buttonGroup/ButtonGroup.vue.js +0 -14
  12. package/dist/components/buttonGroup/index.js +0 -7
  13. package/dist/components/calendar/Calendar.vue.js +0 -299
  14. package/dist/components/calendar/index.js +0 -7
  15. package/dist/components/calendar/uses.js +0 -579
  16. package/dist/components/chart/Chart.vue.js +0 -261
  17. package/dist/components/chart/ChartToolbar.vue.js +0 -32
  18. package/dist/components/chart/chart.core.js +0 -738
  19. package/dist/components/chart/chartZoom.core.js +0 -221
  20. package/dist/components/chart/element/element.bar.js +0 -358
  21. package/dist/components/chart/element/element.bar.time.js +0 -55
  22. package/dist/components/chart/element/element.heatmap.js +0 -403
  23. package/dist/components/chart/element/element.line.js +0 -292
  24. package/dist/components/chart/element/element.pie.js +0 -73
  25. package/dist/components/chart/element/element.scatter.js +0 -209
  26. package/dist/components/chart/element/element.tip.js +0 -312
  27. package/dist/components/chart/helpers/helpers.canvas.js +0 -141
  28. package/dist/components/chart/helpers/helpers.constant.js +0 -253
  29. package/dist/components/chart/helpers/helpers.util.js +0 -265
  30. package/dist/components/chart/index.js +0 -7
  31. package/dist/components/chart/model/index.js +0 -6
  32. package/dist/components/chart/model/model.series.js +0 -82
  33. package/dist/components/chart/model/model.store.js +0 -650
  34. package/dist/components/chart/plugins/plugins.interaction.js +0 -823
  35. package/dist/components/chart/plugins/plugins.legend.gradient.js +0 -281
  36. package/dist/components/chart/plugins/plugins.legend.js +0 -665
  37. package/dist/components/chart/plugins/plugins.pie.js +0 -86
  38. package/dist/components/chart/plugins/plugins.scrollbar.js +0 -345
  39. package/dist/components/chart/plugins/plugins.title.js +0 -43
  40. package/dist/components/chart/plugins/plugins.tooltip.js +0 -508
  41. package/dist/components/chart/scale/scale.js +0 -492
  42. package/dist/components/chart/scale/scale.linear.js +0 -248
  43. package/dist/components/chart/scale/scale.logarithmic.js +0 -82
  44. package/dist/components/chart/scale/scale.step.js +0 -227
  45. package/dist/components/chart/scale/scale.time.category.js +0 -148
  46. package/dist/components/chart/scale/scale.time.js +0 -95
  47. package/dist/components/chart/uses.js +0 -479
  48. package/dist/components/chartBrush/ChartBrush.vue.js +0 -198
  49. package/dist/components/chartBrush/chartBrush.core.js +0 -265
  50. package/dist/components/chartBrush/index.js +0 -7
  51. package/dist/components/chartBrush/uses.js +0 -18
  52. package/dist/components/chartGroup/ChartGroup.vue.js +0 -128
  53. package/dist/components/chartGroup/index.js +0 -7
  54. package/dist/components/chartGroup/uses.js +0 -47
  55. package/dist/components/checkbox/Checkbox.vue.js +0 -99
  56. package/dist/components/checkbox/index.js +0 -7
  57. package/dist/components/checkboxGroup/CheckboxGroup.vue.js +0 -40
  58. package/dist/components/checkboxGroup/index.js +0 -7
  59. package/dist/components/contextMenu/ContextMenu.vue.js +0 -70
  60. package/dist/components/contextMenu/MenuList.vue.js +0 -105
  61. package/dist/components/contextMenu/index.js +0 -7
  62. package/dist/components/contextMenu/uses.js +0 -79
  63. package/dist/components/datePicker/DatePicker.vue.js +0 -310
  64. package/dist/components/datePicker/index.js +0 -7
  65. package/dist/components/datePicker/uses.js +0 -190
  66. package/dist/components/grid/Grid.vue.js +0 -1261
  67. package/dist/components/grid/GridColumnSetting.vue.js +0 -212
  68. package/dist/components/grid/GridFilterSetting.vue.js +0 -222
  69. package/dist/components/grid/GridPagination.vue.js +0 -69
  70. package/dist/components/grid/GridSummary.vue.js +0 -186
  71. package/dist/components/grid/GridToolbar.vue.js +0 -15
  72. package/dist/components/grid/icon/icon-option-button.vue.js +0 -39
  73. package/dist/components/grid/icon/icon-sort-button.vue.js +0 -56
  74. package/dist/components/grid/index.js +0 -7
  75. package/dist/components/grid/uses.js +0 -697
  76. package/dist/components/icon/Icon.vue.js +0 -50
  77. package/dist/components/icon/index.js +0 -8
  78. package/dist/components/inputNumber/InputNumber.vue.js +0 -112
  79. package/dist/components/inputNumber/index.js +0 -7
  80. package/dist/components/inputNumber/uses.js +0 -76
  81. package/dist/components/loading/Loading.vue.js +0 -78
  82. package/dist/components/loading/index.js +0 -7
  83. package/dist/components/menu/Menu.vue.js +0 -66
  84. package/dist/components/menu/MenuItem.vue.js +0 -125
  85. package/dist/components/menu/index.js +0 -7
  86. package/dist/components/message/Message.vue.js +0 -122
  87. package/dist/components/message/index.js +0 -16
  88. package/dist/components/messageBox/MessageBox.vue.js +0 -216
  89. package/dist/components/messageBox/index.js +0 -13
  90. package/dist/components/notification/Notification.vue.js +0 -140
  91. package/dist/components/notification/index.js +0 -23
  92. package/dist/components/pagination/Pagination.vue.js +0 -215
  93. package/dist/components/pagination/index.js +0 -7
  94. package/dist/components/pagination/pageButton.vue.js +0 -35
  95. package/dist/components/progress/Progress.vue.js +0 -88
  96. package/dist/components/progress/index.js +0 -7
  97. package/dist/components/radio/Radio.vue.js +0 -75
  98. package/dist/components/radio/index.js +0 -7
  99. package/dist/components/radioGroup/RadioGroup.vue.js +0 -37
  100. package/dist/components/radioGroup/index.js +0 -7
  101. package/dist/components/scheduler/Scheduler.vue.js +0 -128
  102. package/dist/components/scheduler/index.js +0 -7
  103. package/dist/components/scheduler/uses.js +0 -73
  104. package/dist/components/select/Select.vue.js +0 -381
  105. package/dist/components/select/index.js +0 -7
  106. package/dist/components/select/uses.js +0 -147
  107. package/dist/components/slider/Slider.vue.js +0 -243
  108. package/dist/components/slider/index.js +0 -7
  109. package/dist/components/slider/uses.js +0 -188
  110. package/dist/components/tabPanel/TabPanel.vue.js +0 -39
  111. package/dist/components/tabPanel/index.js +0 -7
  112. package/dist/components/tabs/Tabs.vue.js +0 -220
  113. package/dist/components/tabs/index.js +0 -7
  114. package/dist/components/textField/TextField.vue.js +0 -209
  115. package/dist/components/textField/index.js +0 -7
  116. package/dist/components/timePicker/TimePicker.vue.js +0 -227
  117. package/dist/components/timePicker/index.js +0 -7
  118. package/dist/components/toggle/Toggle.vue.js +0 -66
  119. package/dist/components/toggle/index.js +0 -7
  120. package/dist/components/tree/Tree.vue.js +0 -220
  121. package/dist/components/tree/TreeNode.vue.js +0 -146
  122. package/dist/components/tree/index.js +0 -7
  123. package/dist/components/treeGrid/TreeGrid.vue.js +0 -898
  124. package/dist/components/treeGrid/TreeGridNode.vue.js +0 -274
  125. package/dist/components/treeGrid/TreeGridToolbar.vue.js +0 -15
  126. package/dist/components/treeGrid/index.js +0 -7
  127. package/dist/components/treeGrid/uses.js +0 -497
  128. package/dist/components/window/Window.vue.js +0 -211
  129. package/dist/components/window/index.js +0 -7
  130. package/dist/components/window/uses.js +0 -345
  131. package/dist/directives/clickoutside.js +0 -47
  132. package/dist/main.js +0 -142
  133. package/dist/package.json.js +0 -4
  134. package/dist/resolver.js +0 -17
@@ -1,898 +0,0 @@
1
- import { resolveComponent as P, resolveDirective as ye, openBlock as h, createElementBlock as S, Fragment as F, normalizeStyle as M, createVNode as A, withCtx as $, createBlock as D, createCommentVNode as y, renderSlot as N, withDirectives as _, createElementVNode as b, normalizeClass as x, renderList as ee, withModifiers as J, createTextVNode as $e, toDisplayString as te, vShow as ke, createSlots as _e, ref as be, computed as r, reactive as p, onMounted as et, onUnmounted as tt, onActivated as nt, watch as f, nextTick as ne, toRefs as v } from "vue";
2
- import { cloneDeep as ot } from "lodash-es";
3
- import { ObserveVisibility as it } from "vue3-observe-visibility";
4
- import lt from "vue-resize-observer";
5
- import rt from "./TreeGridNode.vue.js";
6
- import st from "./TreeGridToolbar.vue.js";
7
- import dt from "../grid/GridPagination.vue.js";
8
- import at from "../grid/GridSummary.vue.js";
9
- import ut from "../grid/GridColumnSetting.vue.js";
10
- import ct from "../grid/icon/icon-sort-button.vue.js";
11
- import ht from "../grid/icon/icon-option-button.vue.js";
12
- import { getUpdatedColumns as gt, commonFunctions as mt, pagingEvent as ft, clickEvent as Ct, checkEvent as St, resizeEvent as wt, treeEvent as yt, sortEvent as kt, contextMenuEvent as bt, scrollEvent as pt, filterEvent as vt } from "./uses.js";
13
- import { columnSettingEvent as It } from "../grid/uses.js";
14
- /* empty css */
15
- import Mt from "../../_virtual/_plugin-vue_export-helper.js";
16
- const Ht = {
17
- name: "EvTreeGrid",
18
- components: {
19
- TreeGridNode: rt,
20
- Toolbar: st,
21
- GridPagination: dt,
22
- GridSummary: at,
23
- ColumnSetting: ut,
24
- GridSortButton: ct,
25
- GridOptionButton: ht
26
- },
27
- directives: {
28
- observeVisibility: it,
29
- resize: lt
30
- },
31
- props: {
32
- columns: {
33
- type: [Array],
34
- default: () => []
35
- },
36
- rows: {
37
- type: [Array, Object],
38
- default: () => null
39
- },
40
- width: {
41
- type: [String, Number],
42
- default: "100%"
43
- },
44
- height: {
45
- type: [String, Number],
46
- default: "100%"
47
- },
48
- selected: {
49
- type: [Array],
50
- default: () => []
51
- },
52
- checked: {
53
- type: [Array],
54
- default: () => []
55
- },
56
- option: {
57
- type: Object,
58
- default: () => ({})
59
- },
60
- expandIcon: {
61
- type: String,
62
- default: ""
63
- },
64
- collapseIcon: {
65
- type: String,
66
- default: ""
67
- }
68
- },
69
- emits: {
70
- "update:selected": null,
71
- "update:checked": null,
72
- "click-row": null,
73
- "dblclick-row": null,
74
- "check-row": null,
75
- "check-all": null,
76
- "page-change": null,
77
- "sort-column": null,
78
- "toggle-row": null,
79
- "resize-column": ({ column: e, columns: u }) => ({ column: e, columns: u }),
80
- "change-column-status": ({ columns: e }) => ({ columns: e }),
81
- "change-column-info": ({ type: e, columns: u }) => ({ type: e, columns: u })
82
- },
83
- setup(e) {
84
- var ue, ce, he, ge, me, fe, Ce, Se, we;
85
- const u = be(null), E = r(() => {
86
- var t, n;
87
- return ((n = (t = e.option) == null ? void 0 : t.useGridSetting) == null ? void 0 : n.use) || !1;
88
- }), l = r(() => {
89
- var t;
90
- return ((t = e.option) == null ? void 0 : t.useSummary) || !1;
91
- }), oe = r(() => e.option.emptyText ?? "No records"), z = p({
92
- body: null,
93
- header: null,
94
- table: null,
95
- resizeLine: null,
96
- "grid-wrapper": null
97
- }), O = p({
98
- isSearch: !1,
99
- searchWord: ""
100
- }), T = p({
101
- isShowColumnSetting: !1,
102
- isFilteringColumn: !1,
103
- // hide된 컬럼이 있는지
104
- visibleColumnIdx: [],
105
- // 보여지는 컬럼의 인덱스 목록
106
- hiddenColumn: "",
107
- columnSettingPosition: {
108
- top: 0,
109
- left: 0,
110
- columnListMenuWidth: 0
111
- },
112
- useDefaultColumnSetting: r(
113
- () => {
114
- var t, n;
115
- return ((n = (t = e.option) == null ? void 0 : t.useGridSetting) == null ? void 0 : n.useDefaultColumnSetting) ?? !0;
116
- }
117
- ),
118
- columnSettingTextInfo: {
119
- title: ((ce = (ue = e.option) == null ? void 0 : ue.useGridSetting) == null ? void 0 : ce.columnMenuText) ?? "Column List",
120
- search: ((ge = (he = e.option) == null ? void 0 : he.useGridSetting) == null ? void 0 : ge.searchText) ?? "Search",
121
- empty: ((fe = (me = e.option) == null ? void 0 : me.useGridSetting) == null ? void 0 : fe.emptyText) ?? "No records",
122
- ok: ((Se = (Ce = e.option) == null ? void 0 : Ce.useGridSetting) == null ? void 0 : Se.okBtnText) ?? "OK"
123
- }
124
- }), i = p({
125
- treeStore: [],
126
- viewStore: [],
127
- filterStore: [],
128
- pagingStore: [],
129
- originStore: [],
130
- showTreeStore: r(() => i.treeStore.filter((t) => t.show)),
131
- searchStore: r(() => i.treeStore.filter((t) => t.isFilter)),
132
- store: r(() => O.isSearch ? i.searchStore : i.treeStore),
133
- treeRows: e.rows,
134
- filteredColumns: [],
135
- originColumns: r(
136
- () => e.columns.map((t, n) => {
137
- var s;
138
- return {
139
- index: n,
140
- hiddenDisplay: !1,
141
- ...t,
142
- width: isFinite(t.width) ? t.width : void 0,
143
- sortOption: {
144
- sortType: ((s = t == null ? void 0 : t.sortOption) == null ? void 0 : s.sortType) || "init"
145
- }
146
- };
147
- })
148
- ),
149
- orderedColumns: r(
150
- () => i.filteredColumns.length ? i.filteredColumns : i.originColumns
151
- ),
152
- updatedColumns: r(() => gt(i))
153
- }), d = p({
154
- usePage: r(() => {
155
- var t;
156
- return ((t = e.option.page) == null ? void 0 : t.use) || !1;
157
- }),
158
- useClient: ((we = e.option.page) == null ? void 0 : we.useClient) || !1,
159
- isInfinite: r(() => {
160
- var t;
161
- return ((t = e.option.page) == null ? void 0 : t.isInfinite) || !1;
162
- }),
163
- startIndex: 0,
164
- prevPage: 0,
165
- currentPage: 0,
166
- pageTotal: r(() => {
167
- var t;
168
- return ((t = e.option.page) == null ? void 0 : t.total) || 0;
169
- }),
170
- perPage: r(() => {
171
- var t;
172
- return ((t = e.option.page) == null ? void 0 : t.perPage) || 20;
173
- }),
174
- visiblePage: r(() => {
175
- var t;
176
- return ((t = e.option.page) == null ? void 0 : t.visiblePage) || 8;
177
- }),
178
- order: r(() => {
179
- var t;
180
- return ((t = e.option.page) == null ? void 0 : t.order) || "center";
181
- }),
182
- showPageInfo: r(() => {
183
- var t;
184
- return ((t = e.option.page) == null ? void 0 : t.showPageInfo) || !1;
185
- }),
186
- isClientPaging: r(
187
- () => d.useClient && d.usePage && !d.isInfinite
188
- ),
189
- isHighlight: !1,
190
- highlightPage: 0
191
- }), g = p({
192
- prevCheckedRow: [],
193
- isHeaderChecked: !1,
194
- isHeaderUncheckable: !1,
195
- isHeaderIndeterminate: !1,
196
- checkedRows: e.checked,
197
- useCheckbox: r(() => e.option.useCheckbox || {})
198
- }), {
199
- isRenderer: R,
200
- getComponentName: Q,
201
- getConvertValue: U,
202
- getColumnIndex: X,
203
- setPixelUnit: B,
204
- checkHeader: V
205
- } = mt({ checkInfo: g }), W = p({
206
- lastScroll: {
207
- top: 0,
208
- left: 0
209
- },
210
- vScrollTopHeight: 0,
211
- vScrollBottomHeight: 0,
212
- hasVerticalScrollBar: !1,
213
- hasHorizontalScrollBar: !1
214
- }), o = p({
215
- selectedRow: e.selected,
216
- useSelect: r(() => {
217
- var t, n;
218
- return ((n = (t = e.option) == null ? void 0 : t.useSelection) == null ? void 0 : n.use) ?? !0;
219
- }),
220
- limitCount: r(() => {
221
- var n, s;
222
- let t = (s = (n = e.option) == null ? void 0 : n.useSelection) == null ? void 0 : s.limitCount;
223
- return t = t && t >= 2 ? t : 0, t;
224
- }),
225
- multiple: r(() => {
226
- var t, n;
227
- return ((n = (t = e.option) == null ? void 0 : t.useSelection) == null ? void 0 : n.multiple) ?? !1;
228
- })
229
- }), k = p({
230
- isSorting: !1,
231
- sortField: "",
232
- sortOrder: "",
233
- sortColumn: {},
234
- sortFunction: e.option.customAscFunction ?? {}
235
- }), a = p({
236
- menu: null,
237
- contextMenuItems: [],
238
- contextMenuClass: e.option.customContextMenuClass || "",
239
- columnMenu: null,
240
- columnMenuItems: [],
241
- columnMenuTextInfo: e.option.columnMenuText || {},
242
- hiddenColumnMenuItem: e.option.hiddenColumnMenuItem || {},
243
- customContextMenu: e.option.customContextMenu || [],
244
- gridSettingMenu: null,
245
- gridSettingContextMenuItems: [],
246
- customGridSettingContextMenu: r(
247
- () => {
248
- var t, n;
249
- return ((n = (t = e.option) == null ? void 0 : t.useGridSetting) == null ? void 0 : n.customContextMenu) || [];
250
- }
251
- ),
252
- isShowMenuOnClick: !1
253
- }), C = p({
254
- minWidth: 40,
255
- rendererMinWidth: 80,
256
- showResizeLine: !1,
257
- adjust: e.option.adjust || !1,
258
- columnWidth: e.option.columnWidth || 80,
259
- scrollWidth: e.option.scrollWidth || 17,
260
- rowHeight: r(() => e.option.rowHeight || 35),
261
- gridWidth: r(() => e.width ? B(e.width) : "100%"),
262
- gridHeight: r(() => e.height ? B(e.height) : "100%"),
263
- isResize: !1
264
- }), m = p({
265
- showHeader: r(
266
- () => e.option.showHeader === void 0 ? !0 : e.option.showHeader
267
- ),
268
- stripeStyle: r(() => {
269
- var t;
270
- return ((t = e.option.style) == null ? void 0 : t.stripe) || !1;
271
- }),
272
- borderStyle: r(() => {
273
- var t;
274
- return ((t = e.option.style) == null ? void 0 : t.border) || "";
275
- }),
276
- highlightIdx: r(() => {
277
- var t;
278
- return ((t = e.option.style) == null ? void 0 : t.highlight) ?? -1;
279
- })
280
- }), j = () => {
281
- o.selectedRow.length = 0, i.store.forEach((t) => {
282
- t.selected = !1;
283
- });
284
- }, Y = () => {
285
- g.isHeaderChecked = !1, g.isHeaderIndeterminate = !1, g.checkedRows.length = 0, i.store.forEach((t) => {
286
- t.checked = !1, t.indeterminate = !1;
287
- });
288
- }, { getPagingData: K, updatePagingInfo: ie, changePage: pe } = ft({
289
- stores: i,
290
- pageInfo: d,
291
- sortInfo: k,
292
- filterInfo: O,
293
- elementInfo: z,
294
- clearCheckInfo: Y
295
- }), le = be(0), { updateVScroll: L, updateHScroll: re, onScroll: ve } = pt({
296
- scrollInfo: W,
297
- stores: i,
298
- elementInfo: z,
299
- resizeInfo: C,
300
- pageInfo: d,
301
- summaryScroll: le,
302
- getPagingData: K,
303
- updatePagingInfo: ie
304
- }), { onRowClick: Ie, onRowDblClick: Me } = Ct(o), { onCheck: He, onCheckAll: Pe } = St({
305
- checkInfo: g,
306
- stores: i,
307
- checkHeader: V,
308
- pageInfo: d,
309
- getPagingData: K
310
- }), { calculatedColumn: xe, onResize: G, onShow: Te, onColumnResize: Re } = wt({
311
- resizeInfo: C,
312
- elementInfo: z,
313
- checkInfo: g,
314
- stores: i,
315
- isRenderer: R,
316
- updateVScroll: L,
317
- updateHScroll: re,
318
- contextInfo: a
319
- }), { setTreeNodeStore: se, handleExpand: Ee } = yt({ stores: i, onResize: G }), { onSort: de, initSortInfo: ze, setSortInfo: ae } = kt({
320
- sortInfo: k,
321
- stores: i
322
- }), { onSearch: Z } = vt({
323
- stores: i,
324
- filterInfo: O,
325
- pageInfo: d,
326
- getConvertValue: U,
327
- onResize: G,
328
- checkHeader: V,
329
- getPagingData: K,
330
- updatePagingInfo: ie
331
- }), { setPositionColumnSetting: We, initColumnSettingInfo: Ge, onApplyColumn: De, setColumnHidden: Oe } = It({
332
- stores: i,
333
- columnSettingInfo: T,
334
- contextInfo: a,
335
- onSearch: Z,
336
- onResize: G
337
- }), { setContextMenu: Ve, onContextMenu: Fe, onColumnContextMenu: Ne, onGridSettingContextMenu: Be } = bt({
338
- contextInfo: a,
339
- stores: i,
340
- selectInfo: o,
341
- useGridSetting: E,
342
- columnSettingInfo: T,
343
- setColumnHidden: Oe,
344
- onSort: de
345
- }), Le = (t) => {
346
- a.gridSettingContextMenuItems.length = 0, a.customGridSettingContextMenu.length ? Be(t) : T.isShowColumnSetting = !0;
347
- }, q = (t) => {
348
- var n, s, c, w, I, H;
349
- t.type === "wheel" && ((n = a.menu) == null || n.hide(t)), t.type === "scroll" && !((s = t.target.classList) != null && s.contains("table-body")) && !((w = (c = t.target.offsetParent) == null ? void 0 : c.classList) != null && w.contains("ev-grid-column-setting")) && (T.isShowColumnSetting = !1, a.isShowMenuOnClick = !1, (I = a.columnMenu) == null || I.hide(t), (H = a.gridSettingMenu) == null || H.hide());
350
- };
351
- et(() => {
352
- var t;
353
- if (i.treeStore = se(), i.originStore = ot(i.treeStore), (t = e.option) != null && t.useSort)
354
- ae(e.columns, !1);
355
- else {
356
- const n = a.hiddenColumnMenuItem;
357
- n.ascending = !0, n.descending = !0;
358
- }
359
- document.addEventListener("wheel", q, { capture: !1 }), document.addEventListener("scroll", q, { capture: !0 });
360
- }), tt(() => {
361
- document.removeEventListener("wheel", q, { capture: !1 }), document.removeEventListener("scroll", q, { capture: !0 });
362
- }), nt(() => {
363
- G();
364
- }), f(
365
- () => {
366
- var t;
367
- return (t = e.option) == null ? void 0 : t.useSort;
368
- },
369
- (t) => {
370
- const n = e.option.hiddenColumnMenuItem, s = a.hiddenColumnMenuItem;
371
- t ? (s.ascending = (n == null ? void 0 : n.ascending) ?? !1, s.descending = (n == null ? void 0 : n.descending) ?? !1, ae(e.columns, !1)) : (s.ascending = !0, s.descending = !0, ze(e.columns));
372
- }
373
- ), f(
374
- () => T.isShowColumnSetting,
375
- (t) => {
376
- var n;
377
- if (!t) {
378
- (n = a.gridSettingMenu) == null || n.hide();
379
- return;
380
- }
381
- We(u.value);
382
- }
383
- ), f(
384
- () => e.columns,
385
- () => {
386
- Ge();
387
- },
388
- { deep: !0, immediate: !0 }
389
- ), f(
390
- () => e.checked,
391
- (t) => {
392
- g.checkedRows = t;
393
- }
394
- ), f(
395
- () => g.checkedRows,
396
- (t) => {
397
- g.isHeaderChecked = !1;
398
- let n = i.store;
399
- d.isClientPaging && (n = K()), n.length && (n.forEach((s) => {
400
- s.checked = !!t.find((c) => c.index === s.index);
401
- }), V(n)), L();
402
- }
403
- ), f(
404
- () => e.selected,
405
- (t) => {
406
- o.useSelect && (o.selectedRow = t);
407
- }
408
- ), f(
409
- () => o.selectedRow,
410
- (t) => {
411
- o.useSelect && (i.store.forEach((n) => {
412
- n.selected = !!t.find((s) => s.index === n.index);
413
- }), L());
414
- },
415
- { deep: !0 }
416
- ), f(
417
- () => m.highlightIdx,
418
- async (t) => {
419
- await ne();
420
- const n = (c) => {
421
- if (!(c != null && c.children))
422
- return;
423
- const { children: w } = c;
424
- w.forEach((I) => {
425
- const H = I;
426
- H.parent.show && H.parent.expand ? H.show = !0 : H.show = !1, H.isFilter = !0, H.hasChild && n(H);
427
- });
428
- }, s = (c) => {
429
- if (!(c != null && c.parent)) {
430
- n(c);
431
- return;
432
- }
433
- const { parent: w } = c;
434
- w.show = !0, w.isFilter = !0, w.expand = !0, n(w), s(w);
435
- };
436
- if (t >= 0) {
437
- const c = i.store.find((I) => I.index === t);
438
- if (!c)
439
- return;
440
- c.show = !0, c.isFilter = !0, s(c);
441
- const w = i.showTreeStore.map((I) => I.index).indexOf(c.index);
442
- if (d.usePage && !d.isInfinite) {
443
- const I = Math.ceil(w / d.perPage);
444
- if (d.highlightPage = w === d.perPage ? I + 1 : I || 1, d.highlightPage !== d.currentPage) {
445
- d.currentPage = d.highlightPage, d.isHighlight = !0;
446
- return;
447
- }
448
- }
449
- z.body.scrollTop = C.rowHeight * w;
450
- }
451
- }
452
- ), f(
453
- () => g.useCheckbox.mode,
454
- () => {
455
- g.checkedRows = [], g.isHeaderChecked = !1;
456
- }
457
- ), f(
458
- () => o.useSelect,
459
- () => {
460
- j();
461
- }
462
- ), f(
463
- () => o.multiple,
464
- () => {
465
- j();
466
- }
467
- ), f(
468
- () => e.rows,
469
- (t) => {
470
- i.treeRows = t, i.treeStore = se(), G();
471
- },
472
- { deep: !0 }
473
- ), f(
474
- () => i.treeStore.length,
475
- () => {
476
- V(i.store);
477
- }
478
- ), f(
479
- () => [e.width, e.height, e.option.columnWidth],
480
- () => {
481
- e.option.columnWidth != null && (C.columnWidth = e.option.columnWidth), i.orderedColumns.map((t) => {
482
- var s;
483
- const n = t;
484
- return !((s = e.columns[t.index]) != null && s.width) && !n.resized && (n.width = 0), n;
485
- }), G();
486
- }
487
- ), f(
488
- () => e.option.searchValue,
489
- (t) => {
490
- ne(() => {
491
- t !== void 0 && (Z((t == null ? void 0 : t.value) ?? t), d.isClientPaging && (Y(), j()));
492
- });
493
- },
494
- { immediate: !0 }
495
- ), f(
496
- () => {
497
- var t;
498
- return (t = e.option.page) == null ? void 0 : t.currentPage;
499
- },
500
- (t) => {
501
- var s;
502
- const n = t || 1;
503
- d.currentPage = (s = e.option.page) != null && s.isInfinite ? 1 : n;
504
- },
505
- { immediate: !0 }
506
- ), f(
507
- () => d.currentPage,
508
- (t, n) => {
509
- ne(() => {
510
- if (pe(n), d.isClientPaging && t !== n && (Y(), j()), L(), t === d.highlightPage && d.isHighlight) {
511
- const s = i.pagingStore.map((c) => c.index).indexOf(m.highlightIdx);
512
- z.body.scrollTop = C.rowHeight * s, d.isHighlight = !d.isHighlight;
513
- }
514
- });
515
- }
516
- );
517
- const Ae = () => ({
518
- "column-sort__icon": !0,
519
- "column-sort__icon--asc": k.sortOrder === "asc",
520
- "column-sort__icon--desc": k.sortOrder === "desc"
521
- }), Ue = r(() => ({
522
- width: C.gridWidth,
523
- height: C.gridHeight
524
- })), je = r(() => ({
525
- "table-body": !0,
526
- stripe: m.stripeStyle,
527
- "bottom-border": !!i.viewStore.length,
528
- "non-border": !!m.borderStyle
529
- })), Ke = r(() => ({
530
- table: !0,
531
- "ev-grid": !0,
532
- "ev-tree-grid": !0,
533
- adjust: C.adjust,
534
- "non-header": !m.showHeader,
535
- "ev-tree-grid--empty": !i.viewStore.length
536
- })), qe = r(() => ({
537
- "table-header": !0,
538
- "non-border": !!m.borderStyle
539
- })), Je = r(() => ({
540
- column: !0,
541
- "checkbox-all": !0,
542
- "non-border": !!m.borderStyle
543
- })), Qe = r(
544
- () => g.useCheckbox.use && g.useCheckbox.headerCheck && g.useCheckbox.mode !== "single"
545
- ), Xe = (t) => ({
546
- column: !0,
547
- render: R(t),
548
- "non-border": !!m.borderStyle,
549
- [t.field]: t.field
550
- }), Ye = (t, n) => {
551
- const s = R(t);
552
- return {
553
- width: `${t.width}px`,
554
- "min-width": s ? `${C.rendererMinWidth}px;` : `${C.minWidth}px`,
555
- "margin-right": i.orderedColumns.length - 1 === n && W.hasVerticalScrollBar && W.hasHorizontalScrollBar ? `${C.scrollWidth}px` : "0px",
556
- "border-right": i.orderedColumns.length - 1 === n ? "none" : "1px solid #CFCFCF"
557
- };
558
- }, Ze = (t) => `${t}Node`;
559
- return {
560
- summaryScroll: le,
561
- gridStyle: Ue,
562
- gridClass: Ke,
563
- headerClass: qe,
564
- headerCheckboxClass: Je,
565
- isHeaderCheckbox: Qe,
566
- bodyStyle: je,
567
- useSummary: l,
568
- useGridSetting: E,
569
- toolbarRef: u,
570
- stores: i,
571
- emptyText: oe,
572
- ...v(m),
573
- ...v(z),
574
- ...v(i),
575
- ...v(O),
576
- ...v(W),
577
- ...v(C),
578
- ...v(o),
579
- ...v(g),
580
- ...v(k),
581
- ...v(a),
582
- ...v(d),
583
- ...v(T),
584
- isRenderer: R,
585
- getComponentName: Q,
586
- getConvertValue: U,
587
- getColumnIndex: X,
588
- setPixelUnit: B,
589
- updateVScroll: L,
590
- updateHScroll: re,
591
- onScroll: ve,
592
- calculatedColumn: xe,
593
- onResize: G,
594
- onShow: Te,
595
- onColumnResize: Re,
596
- onRowClick: Ie,
597
- onRowDblClick: Me,
598
- onCheck: He,
599
- onCheckAll: Pe,
600
- setContextMenu: Ve,
601
- onContextMenu: Fe,
602
- onSearch: Z,
603
- handleExpand: Ee,
604
- getColumnClass: Xe,
605
- getColumnStyle: Ye,
606
- getSlotName: Ze,
607
- setGridSetting: Le,
608
- onApplyColumn: De,
609
- onColumnContextMenu: Ne,
610
- onSort: de,
611
- sortIconClass: Ae
612
- };
613
- }
614
- }, Pt = { class: "column-list" }, xt = ["data-index"], Tt = ["title", "onClick"], Rt = ["onClick"], Et = ["onMousedown"], zt = { ref: "table" }, Wt = ["title"], Gt = { key: 0 }, Dt = { class: "is-empty" }, Ot = {
615
- ref: "resizeLine",
616
- class: "table-resize-line"
617
- };
618
- function Vt(e, u, E, l, oe, z) {
619
- var W;
620
- const O = P("grid-option-button"), T = P("toolbar"), i = P("ev-checkbox"), d = P("grid-sort-button"), g = P("tree-grid-node"), R = P("ev-context-menu"), Q = P("grid-summary"), U = P("grid-pagination"), X = P("column-setting"), B = ye("resize"), V = ye("observe-visibility");
621
- return h(), S(F, null, [
622
- e.$slots.toolbar || l.useGridSetting ? (h(), S("div", {
623
- key: 0,
624
- ref: "toolbarRef",
625
- class: "toolbar-wrapper",
626
- style: M(`width: ${e.gridWidth};`)
627
- }, [
628
- A(T, null, {
629
- toolbarWrapper: $(() => [
630
- l.useGridSetting ? (h(), D(O, {
631
- key: 0,
632
- class: "grid-setting__icon",
633
- onClick: l.setGridSetting
634
- }, null, 8, ["onClick"])) : y("", !0),
635
- N(e.$slots, "toolbar", {
636
- item: {
637
- onSearch: l.onSearch
638
- }
639
- }, void 0, !0)
640
- ]),
641
- _: 3
642
- })
643
- ], 4)) : y("", !0),
644
- _((h(), S("div", {
645
- ref: "grid-wrapper",
646
- style: M(l.gridStyle)
647
- }, [
648
- b("div", {
649
- ref: "grid",
650
- class: x(l.gridClass)
651
- }, [
652
- _(b("div", {
653
- ref: "header",
654
- class: x(l.headerClass)
655
- }, [
656
- b("ul", Pt, [
657
- e.useCheckbox.use ? (h(), S("li", {
658
- key: 0,
659
- class: x(l.headerCheckboxClass),
660
- style: M({
661
- width: `${e.minWidth}px`,
662
- "border-right": "1px solid #CFCFCF"
663
- })
664
- }, [
665
- l.isHeaderCheckbox ? (h(), D(i, {
666
- key: 0,
667
- modelValue: e.isHeaderChecked,
668
- "onUpdate:modelValue": u[0] || (u[0] = (o) => e.isHeaderChecked = o),
669
- disabled: e.isHeaderUncheckable,
670
- indeterminate: e.isHeaderIndeterminate,
671
- onChange: l.onCheckAll
672
- }, null, 8, ["modelValue", "disabled", "indeterminate", "onChange"])) : y("", !0)
673
- ], 6)) : y("", !0),
674
- (h(!0), S(F, null, ee(e.orderedColumns, (o, k) => {
675
- var a, C;
676
- return h(), S(F, { key: k }, [
677
- !o.hide && !o.hiddenDisplay ? (h(), S("li", {
678
- key: 0,
679
- "data-index": k,
680
- class: x(l.getColumnClass(o)),
681
- style: M(l.getColumnStyle(o, k))
682
- }, [
683
- o.customHeader && e.$slots.customHeader ? N(e.$slots, "customHeader", { key: 0 }, void 0, !0) : (h(), S("span", {
684
- key: 1,
685
- title: o.caption,
686
- class: x(["column-name", { "column-name--click": l.useGridSetting }]),
687
- onClick: [
688
- (m) => l.onColumnContextMenu(m, o),
689
- u[1] || (u[1] = J((...m) => e.columnMenu.show && e.columnMenu.show(...m), ["prevent"]))
690
- ]
691
- }, [
692
- $e(te(o.caption) + " ", 1),
693
- b("span", {
694
- onClick: J((m) => l.onSort(o), ["stop"])
695
- }, [
696
- e.$slots.sortIcon ? (h(), S(F, { key: 0 }, [
697
- (a = e.$props.option) != null && a.useSort && (o != null && o.sortable) ? (h(), S("span", {
698
- key: 0,
699
- class: "column-sort__icon column-sort__icon--basic",
700
- style: M({
701
- height: `${e.rowHeight}px`,
702
- "line-height": `${e.rowHeight}px`
703
- })
704
- }, [
705
- N(e.$slots, "sortIcon", {}, void 0, !0)
706
- ], 4)) : y("", !0),
707
- e.sortField === o.field ? (h(), S("span", {
708
- key: 1,
709
- class: x(l.sortIconClass(o)),
710
- style: M({
711
- height: `${e.rowHeight}px`,
712
- "line-height": `${e.rowHeight}px`
713
- })
714
- }, [
715
- N(e.$slots, `sortIcon_${e.sortOrder}`, {}, void 0, !0)
716
- ], 6)) : y("", !0)
717
- ], 64)) : (h(), S(F, { key: 1 }, [
718
- (C = e.$props.option) != null && C.useSort && (o != null && o.sortable) ? (h(), D(d, {
719
- key: 0,
720
- class: "column-sort__icon column-sort__icon--basic",
721
- icon: "basic",
722
- style: M({
723
- height: `${e.rowHeight}px`,
724
- "line-height": `${e.rowHeight}px`
725
- })
726
- }, null, 8, ["style"])) : y("", !0),
727
- e.sortField === o.field ? (h(), D(d, {
728
- key: 1,
729
- class: x(l.sortIconClass(o)),
730
- icon: e.sortOrder,
731
- style: M({
732
- height: `${e.rowHeight}px`,
733
- "line-height": `${e.rowHeight}px`,
734
- visibility: e.sortOrder ? o.hidden : !0
735
- })
736
- }, null, 8, ["class", "icon", "style"])) : y("", !0)
737
- ], 64))
738
- ], 8, Rt)
739
- ], 10, Tt)),
740
- b("span", {
741
- class: "column-resize",
742
- onMousedown: J((m) => l.onColumnResize(k, m), ["stop", "left"])
743
- }, null, 40, Et)
744
- ], 14, xt)) : y("", !0)
745
- ], 64);
746
- }), 128)),
747
- (W = e.$props.option.customContextMenu) != null && W.length ? (h(), S("li", {
748
- key: 1,
749
- class: x({
750
- column: !0,
751
- "non-border": !!e.borderStyle
752
- }),
753
- style: M({
754
- width: "30px",
755
- "min-width": "30px",
756
- "margin-right": e.hasVerticalScrollBar || e.hasHorizontalScrollBar ? `${e.scrollWidth}px` : "0px"
757
- })
758
- }, null, 6)) : y("", !0)
759
- ])
760
- ], 2), [
761
- [ke, e.showHeader]
762
- ]),
763
- b("div", {
764
- ref: "body",
765
- class: x(l.bodyStyle),
766
- onScroll: u[2] || (u[2] = (...o) => l.onScroll && l.onScroll(...o)),
767
- onContextmenu: [
768
- u[3] || (u[3] = (o) => l.onContextMenu(o)),
769
- u[4] || (u[4] = J((...o) => e.menu.show && e.menu.show(...o), ["prevent"]))
770
- ]
771
- }, [
772
- b("div", {
773
- style: M(`height: ${e.vScrollTopHeight}px;`),
774
- class: "vscroll-spacer"
775
- }, null, 4),
776
- b("table", zt, [
777
- b("tbody", null, [
778
- (h(!0), S(F, null, ee(e.viewStore, (o, k) => (h(), D(g, {
779
- key: k,
780
- "selected-data": e.selectedRow,
781
- "node-data": o,
782
- "use-checkbox": e.useCheckbox,
783
- "ordered-columns": e.orderedColumns,
784
- "expand-icon": E.option.expandIcon,
785
- "collapse-icon": E.option.collapseIcon,
786
- "parent-icon": E.option.parentIcon,
787
- "child-icon": E.option.childIcon,
788
- "custom-context-menu": e.customContextMenu,
789
- "menu-ref": e.menu,
790
- "is-resize": e.isResize,
791
- "row-height": e.rowHeight,
792
- "min-width": e.minWidth,
793
- "highlight-index": e.highlightIdx,
794
- "border-style": e.borderStyle,
795
- onCheckTreeData: l.onCheck,
796
- onExpandTreeData: l.handleExpand,
797
- onClickTreeData: l.onRowClick,
798
- onDblClickTreeData: l.onRowDblClick,
799
- onContextMenu: l.onContextMenu
800
- }, _e({ _: 2 }, [
801
- ee(e.orderedColumns, (a, C) => ({
802
- name: l.getSlotName(a.field),
803
- fn: $(({ item: m }) => [
804
- e.$slots[a.field] ? N(e.$slots, a.field, {
805
- key: 0,
806
- item: {
807
- data: m.data,
808
- fieldName: a.field
809
- }
810
- }, void 0, !0) : (h(), S("span", {
811
- key: 1,
812
- title: l.getConvertValue(a, o[a.field])
813
- }, te(l.getConvertValue(a, o[a.field])), 9, Wt))
814
- ])
815
- })),
816
- e.$slots.contextmenuIcon ? {
817
- name: "contextmenuIconNode",
818
- fn: $(() => [
819
- N(e.$slots, "contextmenuIcon", {}, void 0, !0)
820
- ]),
821
- key: "0"
822
- } : void 0
823
- ]), 1032, ["selected-data", "node-data", "use-checkbox", "ordered-columns", "expand-icon", "collapse-icon", "parent-icon", "child-icon", "custom-context-menu", "menu-ref", "is-resize", "row-height", "min-width", "highlight-index", "border-style", "onCheckTreeData", "onExpandTreeData", "onClickTreeData", "onDblClickTreeData", "onContextMenu"]))), 128)),
824
- e.viewStore.length ? y("", !0) : (h(), S("tr", Gt, [
825
- b("td", Dt, te(l.emptyText), 1)
826
- ]))
827
- ])
828
- ], 512),
829
- b("div", {
830
- style: M(`height: ${e.vScrollBottomHeight}px;`),
831
- class: "vscroll-spacer"
832
- }, null, 4),
833
- A(R, {
834
- ref: "menu",
835
- "custom-class": e.contextMenuClass,
836
- items: e.contextMenuItems
837
- }, null, 8, ["custom-class", "items"]),
838
- A(R, {
839
- ref: "columnMenu",
840
- items: e.columnMenuItems
841
- }, null, 8, ["items"]),
842
- A(R, {
843
- ref: "gridSettingMenu",
844
- items: e.gridSettingContextMenuItems,
845
- "is-show-menu-on-click": e.isShowMenuOnClick
846
- }, null, 8, ["items", "is-show-menu-on-click"])
847
- ], 34),
848
- _(b("div", Ot, null, 512), [
849
- [ke, e.showResizeLine]
850
- ])
851
- ], 2)
852
- ], 4)), [
853
- [B, l.onResize],
854
- [V, {
855
- callback: l.onShow,
856
- once: !0
857
- }]
858
- ]),
859
- l.useSummary ? (h(), D(Q, {
860
- key: 1,
861
- "is-tree": !0,
862
- "ordered-columns": e.orderedColumns,
863
- stores: l.stores,
864
- "use-checkbox": e.useCheckbox.use,
865
- "style-option": {
866
- borderStyle: e.borderStyle,
867
- minWidth: e.minWidth,
868
- rowHeight: e.rowHeight
869
- },
870
- "scroll-left": l.summaryScroll
871
- }, null, 8, ["ordered-columns", "stores", "use-checkbox", "style-option", "scroll-left"])) : y("", !0),
872
- e.usePage && !e.isInfinite ? (h(), D(U, {
873
- key: 2,
874
- modelValue: e.currentPage,
875
- "onUpdate:modelValue": u[5] || (u[5] = (o) => e.currentPage = o),
876
- total: e.showTreeStore.length,
877
- "per-page": e.perPage,
878
- "visible-page": e.visiblePage,
879
- "show-page-info": e.showPageInfo,
880
- order: e.order
881
- }, null, 8, ["modelValue", "total", "per-page", "visible-page", "show-page-info", "order"])) : y("", !0),
882
- A(X, {
883
- "is-show": e.isShowColumnSetting,
884
- "onUpdate:isShow": u[6] || (u[6] = (o) => e.isShowColumnSetting = o),
885
- "is-show-menu-on-click": e.isShowMenuOnClick,
886
- "onUpdate:isShowMenuOnClick": u[7] || (u[7] = (o) => e.isShowMenuOnClick = o),
887
- columns: e.updatedColumns,
888
- "hidden-column": e.hiddenColumn,
889
- position: e.columnSettingPosition,
890
- "text-info": e.columnSettingTextInfo,
891
- onApplyColumn: l.onApplyColumn
892
- }, null, 8, ["is-show", "is-show-menu-on-click", "columns", "hidden-column", "position", "text-info", "onApplyColumn"])
893
- ], 64);
894
- }
895
- const _t = /* @__PURE__ */ Mt(Ht, [["render", Vt], ["__scopeId", "data-v-4721d54a"]]);
896
- export {
897
- _t as default
898
- };