evui 3.5.0-rc.1 → 3.5.0

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 (135) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/common/utils.bignumber.js +23 -0
  3. package/dist/common/utils.debounce.js +66 -0
  4. package/dist/common/utils.js +64 -0
  5. package/dist/common/utils.throttle.js +15 -0
  6. package/dist/components/button/Button.vue.js +65 -0
  7. package/dist/components/button/index.js +7 -0
  8. package/dist/components/buttonGroup/ButtonGroup.vue.js +14 -0
  9. package/dist/components/buttonGroup/index.js +7 -0
  10. package/dist/components/calendar/Calendar.vue.js +299 -0
  11. package/dist/components/calendar/index.js +7 -0
  12. package/dist/components/calendar/uses.js +579 -0
  13. package/dist/components/chart/Chart.vue.js +261 -0
  14. package/dist/components/chart/ChartToolbar.vue.js +32 -0
  15. package/dist/components/chart/chart.core.js +738 -0
  16. package/dist/components/chart/chartZoom.core.js +221 -0
  17. package/dist/components/chart/element/element.bar.js +358 -0
  18. package/dist/components/chart/element/element.bar.time.js +55 -0
  19. package/dist/components/chart/element/element.heatmap.js +403 -0
  20. package/dist/components/chart/element/element.line.js +292 -0
  21. package/dist/components/chart/element/element.pie.js +73 -0
  22. package/dist/components/chart/element/element.scatter.js +209 -0
  23. package/dist/components/chart/element/element.tip.js +312 -0
  24. package/dist/components/chart/helpers/helpers.canvas.js +141 -0
  25. package/dist/components/chart/helpers/helpers.constant.js +253 -0
  26. package/dist/components/chart/helpers/helpers.util.js +265 -0
  27. package/dist/components/chart/index.js +7 -0
  28. package/dist/components/chart/model/index.js +6 -0
  29. package/dist/components/chart/model/model.series.js +82 -0
  30. package/dist/components/chart/model/model.store.js +650 -0
  31. package/dist/components/chart/plugins/plugins.interaction.js +823 -0
  32. package/dist/components/chart/plugins/plugins.legend.gradient.js +281 -0
  33. package/dist/components/chart/plugins/plugins.legend.js +665 -0
  34. package/dist/components/chart/plugins/plugins.pie.js +86 -0
  35. package/dist/components/chart/plugins/plugins.scrollbar.js +345 -0
  36. package/dist/components/chart/plugins/plugins.title.js +43 -0
  37. package/dist/components/chart/plugins/plugins.tooltip.js +508 -0
  38. package/dist/components/chart/scale/scale.js +492 -0
  39. package/dist/components/chart/scale/scale.linear.js +248 -0
  40. package/dist/components/chart/scale/scale.logarithmic.js +82 -0
  41. package/dist/components/chart/scale/scale.step.js +227 -0
  42. package/dist/components/chart/scale/scale.time.category.js +148 -0
  43. package/dist/components/chart/scale/scale.time.js +95 -0
  44. package/dist/components/chart/uses.js +479 -0
  45. package/dist/components/chartBrush/ChartBrush.vue.js +198 -0
  46. package/dist/components/chartBrush/chartBrush.core.js +265 -0
  47. package/dist/components/chartBrush/index.js +7 -0
  48. package/dist/components/chartBrush/uses.js +18 -0
  49. package/dist/components/chartGroup/ChartGroup.vue.js +128 -0
  50. package/dist/components/chartGroup/index.js +7 -0
  51. package/dist/components/chartGroup/uses.js +47 -0
  52. package/dist/components/checkbox/Checkbox.vue.js +99 -0
  53. package/dist/components/checkbox/index.js +7 -0
  54. package/dist/components/checkboxGroup/CheckboxGroup.vue.js +40 -0
  55. package/dist/components/checkboxGroup/index.js +7 -0
  56. package/dist/components/contextMenu/ContextMenu.vue.js +70 -0
  57. package/dist/components/contextMenu/MenuList.vue.js +105 -0
  58. package/dist/components/contextMenu/index.js +7 -0
  59. package/dist/components/contextMenu/uses.js +79 -0
  60. package/dist/components/datePicker/DatePicker.vue.js +310 -0
  61. package/dist/components/datePicker/index.js +7 -0
  62. package/dist/components/datePicker/uses.js +190 -0
  63. package/dist/components/grid/Grid.vue.js +1261 -0
  64. package/dist/components/grid/GridColumnSetting.vue.js +212 -0
  65. package/dist/components/grid/GridFilterSetting.vue.js +222 -0
  66. package/dist/components/grid/GridPagination.vue.js +69 -0
  67. package/dist/components/grid/GridSummary.vue.js +186 -0
  68. package/dist/components/grid/GridToolbar.vue.js +15 -0
  69. package/dist/components/grid/icon/icon-option-button.vue.js +39 -0
  70. package/dist/components/grid/icon/icon-sort-button.vue.js +56 -0
  71. package/dist/components/grid/index.js +7 -0
  72. package/dist/components/grid/uses.js +697 -0
  73. package/dist/components/icon/Icon.vue.js +50 -0
  74. package/dist/components/icon/index.js +8 -0
  75. package/dist/components/inputNumber/InputNumber.vue.js +112 -0
  76. package/dist/components/inputNumber/index.js +7 -0
  77. package/dist/components/inputNumber/uses.js +76 -0
  78. package/dist/components/loading/Loading.vue.js +78 -0
  79. package/dist/components/loading/index.js +7 -0
  80. package/dist/components/menu/Menu.vue.js +66 -0
  81. package/dist/components/menu/MenuItem.vue.js +125 -0
  82. package/dist/components/menu/index.js +7 -0
  83. package/dist/components/message/Message.vue.js +122 -0
  84. package/dist/components/message/index.js +16 -0
  85. package/dist/components/messageBox/MessageBox.vue.js +216 -0
  86. package/dist/components/messageBox/index.js +13 -0
  87. package/dist/components/notification/Notification.vue.js +140 -0
  88. package/dist/components/notification/index.js +23 -0
  89. package/dist/components/pagination/Pagination.vue.js +215 -0
  90. package/dist/components/pagination/index.js +7 -0
  91. package/dist/components/pagination/pageButton.vue.js +35 -0
  92. package/dist/components/progress/Progress.vue.js +88 -0
  93. package/dist/components/progress/index.js +7 -0
  94. package/dist/components/radio/Radio.vue.js +75 -0
  95. package/dist/components/radio/index.js +7 -0
  96. package/dist/components/radioGroup/RadioGroup.vue.js +37 -0
  97. package/dist/components/radioGroup/index.js +7 -0
  98. package/dist/components/scheduler/Scheduler.vue.js +128 -0
  99. package/dist/components/scheduler/index.js +7 -0
  100. package/dist/components/scheduler/uses.js +73 -0
  101. package/dist/components/select/Select.vue.js +381 -0
  102. package/dist/components/select/index.js +7 -0
  103. package/dist/components/select/uses.js +147 -0
  104. package/dist/components/slider/Slider.vue.js +243 -0
  105. package/dist/components/slider/index.js +7 -0
  106. package/dist/components/slider/uses.js +188 -0
  107. package/dist/components/tabPanel/TabPanel.vue.js +39 -0
  108. package/dist/components/tabPanel/index.js +7 -0
  109. package/dist/components/tabs/Tabs.vue.js +220 -0
  110. package/dist/components/tabs/index.js +7 -0
  111. package/dist/components/textField/TextField.vue.js +209 -0
  112. package/dist/components/textField/index.js +7 -0
  113. package/dist/components/timePicker/TimePicker.vue.js +227 -0
  114. package/dist/components/timePicker/index.js +7 -0
  115. package/dist/components/toggle/Toggle.vue.js +66 -0
  116. package/dist/components/toggle/index.js +7 -0
  117. package/dist/components/tree/Tree.vue.js +220 -0
  118. package/dist/components/tree/TreeNode.vue.js +146 -0
  119. package/dist/components/tree/index.js +7 -0
  120. package/dist/components/treeGrid/TreeGrid.vue.js +898 -0
  121. package/dist/components/treeGrid/TreeGridNode.vue.js +274 -0
  122. package/dist/components/treeGrid/TreeGridToolbar.vue.js +15 -0
  123. package/dist/components/treeGrid/index.js +7 -0
  124. package/dist/components/treeGrid/uses.js +497 -0
  125. package/dist/components/window/Window.vue.js +211 -0
  126. package/dist/components/window/index.js +7 -0
  127. package/dist/components/window/uses.js +345 -0
  128. package/dist/directives/clickoutside.js +47 -0
  129. package/dist/main.js +142 -0
  130. package/dist/package.json.js +4 -0
  131. package/dist/resolver.js +17 -0
  132. package/dist/style.css +1 -1
  133. package/package.json +56 -23
  134. package/dist/index.js +0 -21754
  135. package/dist/index.umd.cjs +0 -28
@@ -0,0 +1,212 @@
1
+ import { computed as x, ref as c, reactive as X, onBeforeMount as Z, watch as E, resolveComponent as b, resolveDirective as $, openBlock as h, createBlock as I, Teleport as ee, withDirectives as te, createElementBlock as M, normalizeStyle as ne, createElementVNode as w, toDisplayString as V, createVNode as W, withCtx as O, Fragment as le, renderList as oe, createTextVNode as A, createCommentVNode as ie, nextTick as ae } from "vue";
2
+ import { cloneDeep as j } from "lodash-es";
3
+ import { clickoutside as se } from "../../directives/clickoutside.js";
4
+ /* empty css */
5
+ import de from "../../_virtual/_plugin-vue_export-helper.js";
6
+ const ce = {
7
+ name: "EVGridColumnSetting",
8
+ directives: {
9
+ clickoutside: se
10
+ },
11
+ props: {
12
+ isShow: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ columns: {
17
+ type: [Array],
18
+ default: () => []
19
+ },
20
+ hiddenColumn: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ position: {
25
+ type: Object,
26
+ default: () => ({
27
+ top: 0,
28
+ left: 0,
29
+ columnListMenuWidth: 0
30
+ })
31
+ },
32
+ isShowMenuOnClick: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ textInfo: {
37
+ type: Object,
38
+ default: () => ({
39
+ title: "Column List",
40
+ search: "Search",
41
+ empty: "No records",
42
+ ok: "OK"
43
+ })
44
+ }
45
+ },
46
+ emits: {
47
+ "update:isShow": [Boolean],
48
+ "update:isShowMenuOnClick": [Boolean],
49
+ "apply-column": null
50
+ },
51
+ setup(u, { emit: r }) {
52
+ const i = x({
53
+ get: () => u.isShow,
54
+ set: (e) => r("update:isShow", e)
55
+ }), o = c(null), L = c(""), f = c(!1), d = c([]), a = c([]), v = c([]), s = c([]), g = x(
56
+ () => f.value ? v.value : a.value
57
+ ), l = x(() => !g.value.length);
58
+ let p = null, C = null;
59
+ const D = X({
60
+ top: null,
61
+ left: null
62
+ }), N = x({
63
+ get: () => u.isShowMenuOnClick,
64
+ set: (e) => r("update:isShowMenuOnClick", e)
65
+ }), P = (e) => {
66
+ var t;
67
+ (e == null ? void 0 : e.length) === 1 ? C = e[0] : (e == null ? void 0 : e.length) < 1 && (C == null && (C = (t = a.value[0]) == null ? void 0 : t.text), d.value.push(C));
68
+ }, U = (e) => {
69
+ p && clearTimeout(p), p = setTimeout(() => {
70
+ if (f.value = !1, e) {
71
+ const t = e.toString().toLowerCase();
72
+ v.value = a.value.filter((n) => n.label.toString().toLowerCase().includes(t)), f.value = !0;
73
+ }
74
+ }, 500);
75
+ }, z = () => {
76
+ L.value = "", f.value = !1, v.value.length = 0;
77
+ }, F = () => {
78
+ const e = s.value.length ? s.value : a.value;
79
+ d.value = e.filter((t) => t.originChecked).map((t) => t.text), z();
80
+ }, K = () => {
81
+ s.value = a.value.filter(
82
+ (t) => d.value.includes(t.text)
83
+ );
84
+ const e = s.value.map((t) => t.text);
85
+ r("apply-column", e), i.value = !1, N.value = !1;
86
+ }, T = c(), B = c(), Y = () => {
87
+ B.value = j(d.value), a.value = u.columns.filter((e) => !e.hide && e.caption).map((e) => {
88
+ var m, _;
89
+ const t = (m = T.value) == null ? void 0 : m.find((k) => k.field === e.field);
90
+ let n = !1;
91
+ return t ? n = (t == null ? void 0 : t.hiddenDisplay) !== (e == null ? void 0 : e.hiddenDisplay) || !((_ = B.value) != null && _.length) ? !(e != null && e.hiddenDisplay) : B.value.includes(e.field) : n = !e.hiddenDisplay, {
92
+ label: e.caption,
93
+ text: e.field,
94
+ originChecked: !e.hiddenDisplay,
95
+ checked: n,
96
+ fixed: e.fixed
97
+ };
98
+ }), d.value = a.value.filter((e) => e.checked).map((e) => e.text), s.value.length = 0, T.value = j(u.columns);
99
+ }, q = () => {
100
+ i.value = !1, N.value = !1;
101
+ }, J = () => {
102
+ const e = document.createElement("div");
103
+ e.id = "ev-grid-column-setting-modal", e.setAttribute("style", "position: absolute; top: 0; left: 0;"), document.getElementById("ev-grid-column-setting-modal") || document.body.appendChild(e);
104
+ }, Q = async () => {
105
+ var H;
106
+ await ae();
107
+ const e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = (H = o.value) == null ? void 0 : H.getBoundingClientRect(), m = n == null ? void 0 : n.width, _ = n == null ? void 0 : n.height, { top: k, left: y, columnListMenuWidth: G } = u.position;
108
+ let S;
109
+ G ? (S = y, e < y + m && (S = y - m - G)) : S = y - m;
110
+ const R = t - _;
111
+ D.top = `${Math.min(k, R) + document.documentElement.scrollTop}px`, D.left = `${S + document.documentElement.scrollLeft}px`;
112
+ };
113
+ return Z(() => J()), E(
114
+ () => u.columns,
115
+ () => {
116
+ Y();
117
+ },
118
+ { immediate: !0, deep: !0 }
119
+ ), E(
120
+ () => i.value,
121
+ async () => {
122
+ F(), i.value && await Q();
123
+ }
124
+ ), E(
125
+ () => u.hiddenColumn,
126
+ (e) => {
127
+ const t = s.value.length ? s.value.filter((n) => n.text !== e) : a.value.filter((n) => n.text !== e && n.checked);
128
+ s.value = t, d.value = t.map((n) => n.text);
129
+ }
130
+ ), {
131
+ columnSettingWrapper: o,
132
+ columnSettingStyle: D,
133
+ isShowColumnSetting: i,
134
+ checkColumnGroup: d,
135
+ columnList: g,
136
+ searchVm: L,
137
+ isDisabled: l,
138
+ onSearchColumn: U,
139
+ onApplyColumn: K,
140
+ onCheckColumn: P,
141
+ hideColumnSetting: q
142
+ };
143
+ }
144
+ }, ue = { class: "ev-grid-column-setting__header" }, re = { class: "header-title" }, me = { class: "ev-grid-column-setting__content" }, he = {
145
+ key: 1,
146
+ class: "is-empty"
147
+ }, fe = { class: "ev-grid-column-setting__footer" };
148
+ function ve(u, r, i, o, L, f) {
149
+ const d = b("ev-text-field"), a = b("ev-checkbox"), v = b("ev-checkbox-group"), s = b("ev-button"), g = $("clickoutside");
150
+ return o.isShowColumnSetting ? (h(), I(ee, {
151
+ key: 0,
152
+ to: "#ev-grid-column-setting-modal"
153
+ }, [
154
+ te((h(), M("section", {
155
+ ref: "columnSettingWrapper",
156
+ class: "ev-grid-column-setting",
157
+ style: ne(o.columnSettingStyle)
158
+ }, [
159
+ w("div", ue, [
160
+ w("p", re, V(i.textInfo.title), 1),
161
+ W(d, {
162
+ modelValue: o.searchVm,
163
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => o.searchVm = l),
164
+ type: "search",
165
+ placeholder: i.textInfo.search,
166
+ onInput: o.onSearchColumn
167
+ }, null, 8, ["modelValue", "placeholder", "onInput"])
168
+ ]),
169
+ w("div", me, [
170
+ o.columnList.length ? (h(), I(v, {
171
+ key: 0,
172
+ modelValue: o.checkColumnGroup,
173
+ "onUpdate:modelValue": r[1] || (r[1] = (l) => o.checkColumnGroup = l),
174
+ onChange: o.onCheckColumn
175
+ }, {
176
+ default: O(() => [
177
+ (h(!0), M(le, null, oe(o.columnList, (l, p) => (h(), I(a, {
178
+ key: `column_${p}`,
179
+ label: l == null ? void 0 : l.text,
180
+ disabled: !!(l != null && l.fixed),
181
+ "tooltip-title": (l == null ? void 0 : l.label) ?? ""
182
+ }, {
183
+ default: O(() => [
184
+ A(V(l == null ? void 0 : l.label), 1)
185
+ ]),
186
+ _: 2
187
+ }, 1032, ["label", "disabled", "tooltip-title"]))), 128))
188
+ ]),
189
+ _: 1
190
+ }, 8, ["modelValue", "onChange"])) : (h(), M("p", he, V(i.textInfo.empty), 1))
191
+ ]),
192
+ w("div", fe, [
193
+ W(s, {
194
+ type: "primary",
195
+ disabled: o.isDisabled,
196
+ onClick: o.onApplyColumn
197
+ }, {
198
+ default: O(() => [
199
+ A(V(i.textInfo.ok), 1)
200
+ ]),
201
+ _: 1
202
+ }, 8, ["disabled", "onClick"])
203
+ ])
204
+ ], 4)), [
205
+ [g, o.hideColumnSetting]
206
+ ])
207
+ ])) : ie("", !0);
208
+ }
209
+ const ye = /* @__PURE__ */ de(ce, [["render", ve]]);
210
+ export {
211
+ ye as default
212
+ };
@@ -0,0 +1,222 @@
1
+ import { ref as B, computed as V, watch as D, onBeforeMount as R, resolveComponent as _, resolveDirective as L, openBlock as r, createBlock as b, Teleport as j, withDirectives as A, createElementBlock as w, normalizeStyle as C, createElementVNode as d, createVNode as v, toDisplayString as z, Fragment as G, renderList as K, withCtx as M, createTextVNode as T, createCommentVNode as W } from "vue";
2
+ import { cloneDeep as q } from "lodash-es";
3
+ import { clickoutside as H } from "../../directives/clickoutside.js";
4
+ /* empty css */
5
+ import J from "../../_virtual/_plugin-vue_export-helper.js";
6
+ const P = {
7
+ name: "EVGridFilterSetting",
8
+ directives: {
9
+ clickoutside: H
10
+ },
11
+ props: {
12
+ isShow: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ position: {
17
+ type: Object,
18
+ default: () => ({
19
+ top: 0,
20
+ left: 0
21
+ })
22
+ },
23
+ column: {
24
+ type: Object,
25
+ default: () => ({})
26
+ },
27
+ items: {
28
+ type: Object,
29
+ default: () => ({})
30
+ }
31
+ },
32
+ emits: {
33
+ "update:isShow": null,
34
+ "apply-filtering": null
35
+ },
36
+ setup(i, { emit: c }) {
37
+ const l = B([]), t = V(() => i.column), S = [
38
+ { name: "AND", value: "and" },
39
+ { name: "OR", value: "or" }
40
+ ], k = [
41
+ { name: "true", value: "true" },
42
+ { name: "false", value: "false" }
43
+ ], p = [
44
+ { name: "=", value: "=" },
45
+ { name: "!=", value: "!=" },
46
+ { name: "<", value: "<" },
47
+ { name: ">", value: ">" },
48
+ { name: "<=", value: "<=" },
49
+ { name: ">=", value: ">=" }
50
+ ], m = [
51
+ { name: "s%", value: "s%" },
52
+ // starts with
53
+ { name: "%s", value: "%s" },
54
+ // ends with
55
+ { name: "%s%", value: "%s%" },
56
+ // contains
57
+ { name: "Not Like", value: "notLike" },
58
+ // does not contains
59
+ { name: "=", value: "=" },
60
+ // is
61
+ { name: "!=", value: "!=" }
62
+ // is not
63
+ ], f = [
64
+ { name: "Is empty", value: "isEmpty" },
65
+ { name: "Is not empty", value: "isNotEmpty" }
66
+ ], h = (e) => e === "string" || e === "stringNumber" ? [...m, ...f] : e === "number" || e === "float" ? [...p, ...f] : e === "boolean" ? [{ name: "=", value: "=" }] : [], y = V(() => h(i.column.type)), o = V({
67
+ get: () => i.isShow,
68
+ set: (e) => c("update:isShow", e)
69
+ }), s = () => {
70
+ const e = l.value.length >= 2 ? l.value[1].operator : "and";
71
+ l.value.push({
72
+ comparison: "=",
73
+ operator: e,
74
+ value: "",
75
+ caption: t.value.caption
76
+ });
77
+ }, a = (e) => {
78
+ l.value.length > 1 ? l.value.splice(e, 1) : e === 0 && (l.value[0].comparison = "=", l.value[0].value = "");
79
+ }, E = (e, n) => {
80
+ (e === "isEmpty" || e === "isNotEmpty") && (l.value[n].value = "");
81
+ }, I = (e) => {
82
+ l.value = l.value.map((n) => ({ ...n, operator: e }));
83
+ }, N = () => {
84
+ c(
85
+ "apply-filtering",
86
+ t.value.field,
87
+ l.value.filter(
88
+ (e) => e.value || e.comparison === "isEmpty" || e.comparison === "isNotEmpty"
89
+ )
90
+ );
91
+ };
92
+ D(
93
+ () => i.isShow,
94
+ (e) => {
95
+ var g;
96
+ const n = [], u = q(i.items);
97
+ e && t.value.field && ((g = u[t.value.field]) != null && g.length ? u[t.value.field].forEach((O) => {
98
+ n.push(O);
99
+ }) : n.push({
100
+ comparison: "=",
101
+ operator: "and",
102
+ value: "",
103
+ caption: t.value.caption
104
+ }), l.value = n);
105
+ }
106
+ );
107
+ const F = (e, n) => {
108
+ var u;
109
+ return ((u = e.find((g) => g.value === n)) == null ? void 0 : u.name) || "";
110
+ }, U = () => {
111
+ const e = document.createElement("div");
112
+ e.id = "ev-grid-filter-setting-modal", e.setAttribute("style", "position: absolute; top: 0; left: 0;"), document.getElementById("ev-grid-filter-setting-modal") || document.body.appendChild(e);
113
+ };
114
+ return R(() => {
115
+ U();
116
+ }), {
117
+ filteringItems: l,
118
+ isShowFilterSetting: o,
119
+ items1: S,
120
+ items2: y,
121
+ booleanItems: k,
122
+ addRow: s,
123
+ removeRow: a,
124
+ changeOperator: I,
125
+ applyFiltering: N,
126
+ changeComparison: E,
127
+ getSelectTitle: F,
128
+ validateValue: (e, n) => {
129
+ (e === "number" || e === "float") && (n.value = n.value.replace(/[^0-9.,]/g, ""));
130
+ }
131
+ };
132
+ }
133
+ }, Q = { class: "ev-grid-filter-setting__header" }, X = { class: "header-title" }, Y = { class: "ev-grid-filter-setting__content" }, Z = { class: "ev-grid-filter-setting__row--button" }, x = { class: "ev-grid-filter-setting__footer" };
134
+ function $(i, c, l, t, S, k) {
135
+ const p = _("ev-icon"), m = _("ev-select"), f = _("ev-text-field"), h = _("ev-button"), y = L("clickoutside");
136
+ return t.isShowFilterSetting ? (r(), b(j, {
137
+ key: 0,
138
+ to: "#ev-grid-filter-setting-modal"
139
+ }, [
140
+ A((r(), w("section", {
141
+ class: "ev-grid-filter-setting",
142
+ style: C({
143
+ top: i.$props.position.top,
144
+ left: i.$props.position.left
145
+ })
146
+ }, [
147
+ d("div", Q, [
148
+ v(p, { icon: "ev-icon-filter-list" }),
149
+ d("span", X, " Filter (" + z(i.$props.column.caption) + ") ", 1)
150
+ ]),
151
+ d("div", Y, [
152
+ (r(!0), w(G, null, K(t.filteringItems, (o, s) => (r(), w("div", {
153
+ key: s,
154
+ class: "ev-grid-filter-setting__row"
155
+ }, [
156
+ v(m, {
157
+ modelValue: o.operator,
158
+ "onUpdate:modelValue": (a) => o.operator = a,
159
+ class: "ev-grid-filter-setting__row--operator",
160
+ title: t.getSelectTitle(t.items1, o.operator),
161
+ items: t.items1,
162
+ disabled: s > 1,
163
+ style: C({
164
+ visibility: s > 0 ? "visible" : "hidden"
165
+ }),
166
+ onChange: t.changeOperator
167
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "title", "items", "disabled", "style", "onChange"]),
168
+ v(m, {
169
+ modelValue: o.comparison,
170
+ "onUpdate:modelValue": (a) => o.comparison = a,
171
+ class: "ev-grid-filter-setting__row--comparison",
172
+ title: t.getSelectTitle(t.items2, o.comparison),
173
+ items: t.items2,
174
+ onChange: (a) => t.changeComparison(o.comparison, s)
175
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "title", "items", "onChange"]),
176
+ i.$props.column.type === "boolean" ? (r(), b(m, {
177
+ key: 0,
178
+ modelValue: o.value,
179
+ "onUpdate:modelValue": (a) => o.value = a,
180
+ class: "ev-grid-filter-setting__row--comparison",
181
+ items: t.booleanItems
182
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : (r(), b(f, {
183
+ key: 1,
184
+ modelValue: o.value,
185
+ "onUpdate:modelValue": (a) => o.value = a,
186
+ class: "ev-grid-filter-setting__row--value",
187
+ disabled: o.comparison === "isEmpty" || o.comparison === "isNotEmpty",
188
+ onInput: (a) => t.validateValue(i.$props.column.type, o)
189
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "onInput"])),
190
+ d("div", Z, [
191
+ v(p, {
192
+ icon: "ev-icon-trash2",
193
+ onClick: (a) => t.removeRow(s)
194
+ }, null, 8, ["onClick"])
195
+ ])
196
+ ]))), 128))
197
+ ]),
198
+ d("div", x, [
199
+ v(h, {
200
+ type: "primary",
201
+ onClick: t.applyFiltering
202
+ }, {
203
+ default: M(() => [...c[0] || (c[0] = [
204
+ T(" OK ", -1)
205
+ ])]),
206
+ _: 1
207
+ }, 8, ["onClick"])
208
+ ])
209
+ ], 4)), [
210
+ [
211
+ y,
212
+ () => {
213
+ t.isShowFilterSetting = !1;
214
+ }
215
+ ]
216
+ ])
217
+ ])) : W("", !0);
218
+ }
219
+ const ie = /* @__PURE__ */ J(P, [["render", $]]);
220
+ export {
221
+ ie as default
222
+ };
@@ -0,0 +1,69 @@
1
+ import { ref as i, watch as d, resolveComponent as u, openBlock as g, createElementBlock as c, createVNode as m } from "vue";
2
+ /* empty css */
3
+ import p from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = {
5
+ name: "EvGridPagination",
6
+ props: {
7
+ total: {
8
+ type: [Number, String],
9
+ default: 0
10
+ },
11
+ visiblePage: {
12
+ type: [Number, String],
13
+ default: 8
14
+ },
15
+ perPage: {
16
+ type: [Number, String],
17
+ default: 20
18
+ },
19
+ modelValue: {
20
+ type: [Number, String],
21
+ default: 1
22
+ },
23
+ showPageInfo: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ order: {
28
+ type: String,
29
+ default: "left",
30
+ validator: (a) => ["left", "right", "center"].includes(a)
31
+ }
32
+ },
33
+ emits: {
34
+ "update:modelValue": null
35
+ },
36
+ setup(a, { emit: n }) {
37
+ const e = i(a.modelValue), t = (o) => {
38
+ e.value = o > 0 ? o : 1, n("update:modelValue", e.value);
39
+ };
40
+ return d(
41
+ () => a.modelValue,
42
+ (o) => {
43
+ e.value = o;
44
+ }
45
+ ), {
46
+ currentValue: e,
47
+ changePage: t
48
+ };
49
+ }
50
+ }, f = { class: "grid-pagination" };
51
+ function v(a, n, e, t, o, _) {
52
+ const l = u("ev-pagination");
53
+ return g(), c("div", f, [
54
+ m(l, {
55
+ modelValue: t.currentValue,
56
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.currentValue = r),
57
+ total: e.total,
58
+ "per-page": e.perPage,
59
+ "visible-page": e.visiblePage,
60
+ "show-page-info": e.showPageInfo,
61
+ order: e.order,
62
+ onChange: t.changePage
63
+ }, null, 8, ["modelValue", "total", "per-page", "visible-page", "show-page-info", "order", "onChange"])
64
+ ]);
65
+ }
66
+ const b = /* @__PURE__ */ p(s, [["render", v], ["__scopeId", "data-v-2e265290"]]);
67
+ export {
68
+ b as default
69
+ };
@@ -0,0 +1,186 @@
1
+ import { ref as W, computed as k, watch as j, nextTick as A, openBlock as u, createElementBlock as m, normalizeClass as C, createElementVNode as D, normalizeStyle as p, createCommentVNode as R, Fragment as O, renderList as F, toDisplayString as T } from "vue";
2
+ import { numberWithComma as M } from "../../common/utils.js";
3
+ import { bnPlus as E, bnFloor as B, bnDivide as z } from "../../common/utils.bignumber.js";
4
+ /* empty css */
5
+ import G from "../../_virtual/_plugin-vue_export-helper.js";
6
+ const P = {
7
+ name: "EvGridSummary",
8
+ props: {
9
+ stores: {
10
+ type: Object,
11
+ default: () => ({})
12
+ },
13
+ orderedColumns: {
14
+ type: Object,
15
+ default: () => ({})
16
+ },
17
+ useCheckbox: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ styleOption: {
22
+ type: Object,
23
+ default: () => ({})
24
+ },
25
+ isTree: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ scrollLeft: {
30
+ type: Number,
31
+ default: 0
32
+ }
33
+ },
34
+ setup(y) {
35
+ const c = {
36
+ max: 20,
37
+ default: 3
38
+ }, I = W(), e = 2, b = k(() => y.stores), V = k(() => y.orderedColumns), n = k(() => y.useCheckbox), w = k(() => y.styleOption), N = (t) => t == null || t < 0 ? c.default : t > c.max ? c.max : t, H = (t, s) => {
39
+ if (typeof s == "string" && s.length === 0)
40
+ return s;
41
+ const { type: d, decimal: h } = t;
42
+ let l = s;
43
+ return d === "number" ? (l = M(s), l = l === !1 ? s : l) : d === "float" && (l = l.toFixed(N(h ?? c.default)).replace(/\B(?=(\d{3})+(?!\d))/g, ",")), l;
44
+ }, S = (t) => V.value.findIndex((s) => s.field === t), v = (t) => {
45
+ const { type: s, field: d, summaryType: h, summaryDecimal: l, summaryOnlyTopParent: _ } = t;
46
+ let o = "";
47
+ const x = S(d);
48
+ if (x >= 0) {
49
+ if (h === "count")
50
+ return b.value.store.length;
51
+ if (s === "number" || s === "float") {
52
+ let i = [];
53
+ switch (y.isTree ? i = b.value.store.reduce((r, a) => {
54
+ var g, f;
55
+ return _ ? a.parent || r.push((g = a.data) == null ? void 0 : g[d]) : r.push((f = a.data) == null ? void 0 : f[d]), r;
56
+ }, []) : i = b.value.store.map((r) => r[e][x]), h) {
57
+ case "sum": {
58
+ const r = i.reduce((a, g) => {
59
+ const f = Number(g);
60
+ return Number.isNaN(f) ? a : E(a, f);
61
+ }, 0);
62
+ o = r && B(r, N(l ?? c.default));
63
+ break;
64
+ }
65
+ case "average": {
66
+ const r = i.reduce((a, g) => {
67
+ const f = Number(g);
68
+ return Number.isNaN(f) ? a : E(a, f);
69
+ }, 0);
70
+ o = r && B(
71
+ z(r, i.length),
72
+ N(l ?? c.default)
73
+ );
74
+ break;
75
+ }
76
+ case "max": {
77
+ const r = i.filter((a) => a != null);
78
+ o = r.length ? Math.max(...r) : "";
79
+ break;
80
+ }
81
+ case "min": {
82
+ const r = i.filter((a) => a != null);
83
+ o = r.length ? Math.min(...r) : "";
84
+ break;
85
+ }
86
+ }
87
+ o = H(t, o);
88
+ }
89
+ }
90
+ return o;
91
+ }, L = (t) => {
92
+ const s = t.summaryRenderer, d = t.summaryData ? t.summaryData : [], h = [t.field, ...d];
93
+ let l = s;
94
+ return h.forEach((_, o) => {
95
+ const x = S(_);
96
+ if (x >= 0) {
97
+ const i = v(b.value.orderedColumns[x]);
98
+ l = l.replace(`{${o}}`, i);
99
+ }
100
+ }), l;
101
+ };
102
+ return j(
103
+ () => y.scrollLeft,
104
+ (t) => {
105
+ A(() => {
106
+ I.value.scrollLeft = t;
107
+ });
108
+ }
109
+ ), {
110
+ columns: V,
111
+ styleInfo: w,
112
+ showCheckbox: n,
113
+ summaryRef: I,
114
+ getSummaryValue: v,
115
+ getSummaryRenderer: L
116
+ };
117
+ }
118
+ }, X = { class: "column-list" }, q = ["title"], J = ["title"];
119
+ function K(y, c, I, e, b, V) {
120
+ return u(), m("div", {
121
+ ref: "summaryRef",
122
+ class: C({
123
+ "grid-summary": !0,
124
+ "non-border": e.styleInfo.borderStyle === "none"
125
+ })
126
+ }, [
127
+ D("ul", X, [
128
+ e.showCheckbox ? (u(), m("li", {
129
+ key: 0,
130
+ class: C({
131
+ column: !0,
132
+ "non-border": !!e.styleInfo.borderStyle
133
+ }),
134
+ style: p({
135
+ width: `${e.styleInfo.minWidth}px`,
136
+ "line-height": `${e.styleInfo.rowHeight}px`
137
+ })
138
+ }, [
139
+ D("span", {
140
+ style: p({ height: `${e.styleInfo.rowHeight}px` })
141
+ }, null, 4)
142
+ ], 6)) : R("", !0),
143
+ (u(!0), m(O, null, F(e.columns, (n, w) => (u(), m(O, {
144
+ key: `summary_${w}`
145
+ }, [
146
+ n.hide ? R("", !0) : (u(), m("li", {
147
+ key: 0,
148
+ class: C({
149
+ column: !0,
150
+ "non-border": !!e.styleInfo.borderStyle,
151
+ [n.type]: n.type,
152
+ [n.align]: n.align
153
+ }),
154
+ style: p({
155
+ width: `${n.width}px`,
156
+ "min-width": `${e.styleInfo.minWidth}px`,
157
+ "line-height": `${e.styleInfo.rowHeight}px`
158
+ })
159
+ }, [
160
+ n.summaryType || n.summaryRenderer ? (u(), m("span", {
161
+ key: 0,
162
+ style: p({
163
+ width: "100%",
164
+ height: `${e.styleInfo.rowHeight}px`
165
+ })
166
+ }, [
167
+ n.summaryRenderer ? (u(), m("div", {
168
+ key: 0,
169
+ title: e.getSummaryRenderer(n)
170
+ }, T(e.getSummaryRenderer(n)), 9, q)) : (u(), m("div", {
171
+ key: 1,
172
+ title: e.getSummaryValue(n)
173
+ }, T(e.getSummaryValue(n)), 9, J))
174
+ ], 4)) : (u(), m("span", {
175
+ key: 1,
176
+ style: p({ height: `${e.styleInfo.rowHeight}px` })
177
+ }, null, 4))
178
+ ], 6))
179
+ ], 64))), 128))
180
+ ])
181
+ ], 2);
182
+ }
183
+ const ee = /* @__PURE__ */ G(P, [["render", K], ["__scopeId", "data-v-4b9bef37"]]);
184
+ export {
185
+ ee as default
186
+ };