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,190 +0,0 @@
1
- import { getCurrentInstance as $, computed as A, ref as p, reactive as C, watch as I, nextTick as P } from "vue";
2
- import { getChangedValueByTimeFormat as v, getLastDateOfMonth as W } from "../calendar/uses.js";
3
- const B = new RegExp(/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/), Y = new RegExp(
4
- /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]/
5
- ), j = () => {
6
- var F;
7
- const { props: t, emit: n } = $(), m = (F = t.options) == null ? void 0 : F.timeFormat, h = ["dateTimeRange", "dateRange", "dateMulti"].includes(t.mode), V = (s) => {
8
- let e;
9
- if (t.mode === "dateTime")
10
- e = v(m, s);
11
- else if (t.modelValue.length) {
12
- const [o, i] = m;
13
- e = [
14
- v(o, s[0]),
15
- v(i, s[1])
16
- ];
17
- }
18
- return e;
19
- }, l = A({
20
- get: () => t.modelValue ? ["dateTime", "dateTimeRange"].includes(t.mode) && m ? V(t.modelValue) : h ? [...t.modelValue] : t.modelValue : t.mode === "date" || t.mode === "dateTime" ? "" : [],
21
- set: (s) => {
22
- if (["dateTime", "dateTimeRange"].includes(t.mode) && m) {
23
- n("update:modelValue", V(s));
24
- return;
25
- }
26
- n("update:modelValue", s);
27
- }
28
- });
29
- let c;
30
- if (["dateTimeRange", "dateTime"].includes(t.mode) && m)
31
- if (t.mode === "dateTimeRange" && Array.isArray(t.modelValue) && t.modelValue.length === 2) {
32
- const [s, e] = t.modelValue, [o, i] = m;
33
- t.modelValue = [
34
- v(o, s),
35
- v(i, e)
36
- ], c = p([...t.modelValue]);
37
- } else t.mode === "dateTime" && t.modelValue ? c = p(v(m, t.modelValue)) : c = p(t.modelValue);
38
- else
39
- c = p(h ? [...t.modelValue] : t.modelValue);
40
- const x = (s) => {
41
- const e = (a) => !!(a.length === 10 && B.exec(a)), o = (a) => !!(a.length === 19 && Y.exec(a)), i = (a) => {
42
- const f = a.split(" ")[0], d = +f.split("-")[0], g = +f.split("-")[1], R = +f.split("-")[2], y = W(d, g);
43
- return +R <= y && d >= (/* @__PURE__ */ new Date(0)).getFullYear();
44
- };
45
- let u = !0;
46
- t.mode === "date" ? u = e(s) && i(s) : t.mode === "dateTime" ? u = o(s) && i(s) : t.mode === "dateRange" ? u = s.every((a) => e(a) && i(a)) : t.mode === "dateTimeRange" && (u = s.every((a) => o(a) && i(a))), u && (l.value = h ? [...s] : s), c.value = h ? [...l.value] : l.value;
47
- }, T = A(() => t.mode === "date" || t.mode === "dateTime" ? l.value : l.value.length);
48
- return {
49
- mv: l,
50
- currentValue: c,
51
- isClearableIcon: T,
52
- validateValue: x,
53
- removeAllMv: () => {
54
- t.mode === "date" || t.mode === "dateTime" ? l.value = null : (l.value.splice(0), l.value = [...l.value]);
55
- },
56
- changeMv: async (s) => {
57
- await P(), n("change", l.value, s);
58
- },
59
- removeMv: (s) => {
60
- if (!t.disabled) {
61
- const e = l.value.indexOf(s);
62
- l.value.splice(e, 1), l.value = [...l.value];
63
- }
64
- }
65
- };
66
- }, q = () => {
67
- const { props: t } = $(), n = p(!1), m = p(null), h = p(null), V = p(null), l = p(null), c = C({
68
- top: null,
69
- right: null,
70
- left: null
71
- }), x = async () => {
72
- var f, d;
73
- await P();
74
- const r = (f = h.value) == null ? void 0 : f.getBoundingClientRect(), k = (d = V.value) == null ? void 0 : d.getBoundingClientRect(), F = r.height, s = r.y, e = r.x, o = k.height, i = k.width, u = document.documentElement.clientHeight, a = document.documentElement.clientWidth;
75
- u < s + F + o ? (c.top = `-${o}px`, a < e + i ? (c.left = "auto", c.right = "0px") : (c.left = "0px", c.right = "auto")) : (c.top = `${F}px`, a < e + i ? (c.left = "auto", c.right = "0px") : (c.left = "0px", c.right = "auto"));
76
- };
77
- return {
78
- isDropbox: n,
79
- datePicker: m,
80
- datePickerWrapper: h,
81
- dropbox: V,
82
- itemWrapper: l,
83
- dropboxPosition: c,
84
- clickSelectInput: async () => {
85
- t.disabled || (n.value = t.enableTextInput ? !0 : !n.value, n.value && await x());
86
- },
87
- clickOutsideDropbox: () => {
88
- n.value = !1;
89
- },
90
- changeDropboxPosition: x
91
- };
92
- }, z = (t) => {
93
- var s;
94
- const { props: n } = $(), { mv: m, currentValue: h, clickOutsideDropbox: V } = t, l = C([]);
95
- (s = n.shortcuts) == null || s.forEach(({ value: e, label: o, shortcutDate: i }) => {
96
- l.push({
97
- key: e,
98
- label: o,
99
- shortcutDate: i,
100
- isActive: !1
101
- });
102
- });
103
- const c = () => {
104
- const e = l.find((o) => o.isActive);
105
- e && (e.isActive = !1);
106
- }, x = (e) => {
107
- const o = l.find((i) => i.key === e);
108
- o && (o.isActive = !0);
109
- }, T = (e) => e === null ? "00" : +e < 10 ? `0${e}` : e, D = (e) => {
110
- const o = e ? new Date(e) : /* @__PURE__ */ new Date(), i = o.getFullYear(), u = o.getMonth() + 1, a = o.getDate();
111
- return `${i}-${T(u)}-${T(a)}`;
112
- }, r = (e) => {
113
- const o = e ? new Date(e) : /* @__PURE__ */ new Date(), i = o.getHours(), u = o.getMinutes(), a = o.getSeconds();
114
- return `${D(o)} ${T(i)}:${T(u)}:${T(a)}`;
115
- }, k = () => {
116
- var i, u;
117
- c();
118
- const e = ["dateRange", "dateTimeRange"].includes(n.mode);
119
- if (!l.length || n.mode === "dateMulti" && ((i = n.options) == null ? void 0 : i.multiType) !== "date" || e && !m.value.length || !e && !m.value)
120
- return;
121
- let o;
122
- if (e) {
123
- const a = (u = n.options) == null ? void 0 : u.timeFormat, [f, d] = m.value;
124
- let g;
125
- n.mode === "dateTimeRange" && (a != null && a.length) ? g = l.find(({ shortcutDate: R }) => {
126
- const [y, b] = R(), [M, w] = a, S = v(
127
- M,
128
- r(y)
129
- ), O = v(w, r(b)), E = S === r(f), H = O === r(d);
130
- return E && H;
131
- }) : g = l.find(({ shortcutDate: R }) => {
132
- const [y, b] = R(), M = n.mode === "dateTimeRange" ? r : D, w = M(y) === M(f), S = M(b) === M(d);
133
- return w && S;
134
- }), o = g == null ? void 0 : g.key;
135
- } else {
136
- const a = n.mode === "dateTime" ? r : D, f = a(m.value), d = l.find(({ shortcutDate: g }) => a(g()) === f);
137
- o = d == null ? void 0 : d.key;
138
- }
139
- o && x(o);
140
- }, F = (e) => {
141
- var f;
142
- const o = ["dateRange", "dateTimeRange"].includes(n.mode), i = l.find(({ key: d }) => d === e);
143
- if (!i)
144
- return;
145
- const u = i.shortcutDate, a = (f = n.options) == null ? void 0 : f.timeFormat;
146
- if (o) {
147
- const [d, g] = u();
148
- if (n.mode === "dateTimeRange")
149
- if (a != null && a.length) {
150
- const [R, y] = a;
151
- m.value = [
152
- v(R, r(d)),
153
- v(y, r(g))
154
- ];
155
- } else
156
- m.value = [r(d), r(g)];
157
- else
158
- m.value = [D(d), D(g)];
159
- } else {
160
- const d = u();
161
- m.value = n.mode === "dateTime" ? v(a, r(d)) : D(d);
162
- }
163
- c(), x(e);
164
- };
165
- return I(
166
- () => n.modelValue,
167
- (e) => {
168
- var o, i;
169
- if (k(), !(n.mode === "dateMulti" && ((o = n == null ? void 0 : n.options) == null ? void 0 : o.multiType) === "date" && ((i = n == null ? void 0 : n.options) == null ? void 0 : i.multiDayLimit) > e.length)) {
170
- if (n.mode === "dateRange" || n.mode === "dateTimeRange") {
171
- h.value = [...e];
172
- return;
173
- } else if (n.mode === "dateTime") {
174
- h.value = e;
175
- return;
176
- }
177
- h.value = e, V();
178
- }
179
- }
180
- ), {
181
- usedShortcuts: l,
182
- clickShortcut: F,
183
- setActiveShortcut: k
184
- };
185
- };
186
- export {
187
- q as useDropdown,
188
- j as useModel,
189
- z as useShortcuts
190
- };