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.
- package/dist/index.js +23148 -0
- package/dist/index.umd.cjs +28 -0
- package/package.json +5 -11
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/common/utils.bignumber.js +0 -23
- package/dist/common/utils.debounce.js +0 -66
- package/dist/common/utils.js +0 -64
- package/dist/common/utils.throttle.js +0 -15
- package/dist/components/button/Button.vue.js +0 -65
- package/dist/components/button/index.js +0 -7
- package/dist/components/buttonGroup/ButtonGroup.vue.js +0 -14
- package/dist/components/buttonGroup/index.js +0 -7
- package/dist/components/calendar/Calendar.vue.js +0 -299
- package/dist/components/calendar/index.js +0 -7
- package/dist/components/calendar/uses.js +0 -579
- package/dist/components/chart/Chart.vue.js +0 -261
- package/dist/components/chart/ChartToolbar.vue.js +0 -32
- package/dist/components/chart/chart.core.js +0 -738
- package/dist/components/chart/chartZoom.core.js +0 -221
- package/dist/components/chart/element/element.bar.js +0 -358
- package/dist/components/chart/element/element.bar.time.js +0 -55
- package/dist/components/chart/element/element.heatmap.js +0 -403
- package/dist/components/chart/element/element.line.js +0 -292
- package/dist/components/chart/element/element.pie.js +0 -73
- package/dist/components/chart/element/element.scatter.js +0 -209
- package/dist/components/chart/element/element.tip.js +0 -312
- package/dist/components/chart/helpers/helpers.canvas.js +0 -141
- package/dist/components/chart/helpers/helpers.constant.js +0 -253
- package/dist/components/chart/helpers/helpers.util.js +0 -265
- package/dist/components/chart/index.js +0 -7
- package/dist/components/chart/model/index.js +0 -6
- package/dist/components/chart/model/model.series.js +0 -82
- package/dist/components/chart/model/model.store.js +0 -650
- package/dist/components/chart/plugins/plugins.interaction.js +0 -823
- package/dist/components/chart/plugins/plugins.legend.gradient.js +0 -281
- package/dist/components/chart/plugins/plugins.legend.js +0 -665
- package/dist/components/chart/plugins/plugins.pie.js +0 -86
- package/dist/components/chart/plugins/plugins.scrollbar.js +0 -345
- package/dist/components/chart/plugins/plugins.title.js +0 -43
- package/dist/components/chart/plugins/plugins.tooltip.js +0 -508
- package/dist/components/chart/scale/scale.js +0 -492
- package/dist/components/chart/scale/scale.linear.js +0 -248
- package/dist/components/chart/scale/scale.logarithmic.js +0 -82
- package/dist/components/chart/scale/scale.step.js +0 -227
- package/dist/components/chart/scale/scale.time.category.js +0 -148
- package/dist/components/chart/scale/scale.time.js +0 -95
- package/dist/components/chart/uses.js +0 -479
- package/dist/components/chartBrush/ChartBrush.vue.js +0 -198
- package/dist/components/chartBrush/chartBrush.core.js +0 -265
- package/dist/components/chartBrush/index.js +0 -7
- package/dist/components/chartBrush/uses.js +0 -18
- package/dist/components/chartGroup/ChartGroup.vue.js +0 -128
- package/dist/components/chartGroup/index.js +0 -7
- package/dist/components/chartGroup/uses.js +0 -47
- package/dist/components/checkbox/Checkbox.vue.js +0 -99
- package/dist/components/checkbox/index.js +0 -7
- package/dist/components/checkboxGroup/CheckboxGroup.vue.js +0 -40
- package/dist/components/checkboxGroup/index.js +0 -7
- package/dist/components/contextMenu/ContextMenu.vue.js +0 -70
- package/dist/components/contextMenu/MenuList.vue.js +0 -105
- package/dist/components/contextMenu/index.js +0 -7
- package/dist/components/contextMenu/uses.js +0 -79
- package/dist/components/datePicker/DatePicker.vue.js +0 -310
- package/dist/components/datePicker/index.js +0 -7
- package/dist/components/datePicker/uses.js +0 -190
- package/dist/components/grid/Grid.vue.js +0 -1261
- package/dist/components/grid/GridColumnSetting.vue.js +0 -212
- package/dist/components/grid/GridFilterSetting.vue.js +0 -222
- package/dist/components/grid/GridPagination.vue.js +0 -69
- package/dist/components/grid/GridSummary.vue.js +0 -186
- package/dist/components/grid/GridToolbar.vue.js +0 -15
- package/dist/components/grid/icon/icon-option-button.vue.js +0 -39
- package/dist/components/grid/icon/icon-sort-button.vue.js +0 -56
- package/dist/components/grid/index.js +0 -7
- package/dist/components/grid/uses.js +0 -697
- package/dist/components/icon/Icon.vue.js +0 -50
- package/dist/components/icon/index.js +0 -8
- package/dist/components/inputNumber/InputNumber.vue.js +0 -112
- package/dist/components/inputNumber/index.js +0 -7
- package/dist/components/inputNumber/uses.js +0 -76
- package/dist/components/loading/Loading.vue.js +0 -78
- package/dist/components/loading/index.js +0 -7
- package/dist/components/menu/Menu.vue.js +0 -66
- package/dist/components/menu/MenuItem.vue.js +0 -125
- package/dist/components/menu/index.js +0 -7
- package/dist/components/message/Message.vue.js +0 -122
- package/dist/components/message/index.js +0 -16
- package/dist/components/messageBox/MessageBox.vue.js +0 -216
- package/dist/components/messageBox/index.js +0 -13
- package/dist/components/notification/Notification.vue.js +0 -140
- package/dist/components/notification/index.js +0 -23
- package/dist/components/pagination/Pagination.vue.js +0 -215
- package/dist/components/pagination/index.js +0 -7
- package/dist/components/pagination/pageButton.vue.js +0 -35
- package/dist/components/progress/Progress.vue.js +0 -88
- package/dist/components/progress/index.js +0 -7
- package/dist/components/radio/Radio.vue.js +0 -75
- package/dist/components/radio/index.js +0 -7
- package/dist/components/radioGroup/RadioGroup.vue.js +0 -37
- package/dist/components/radioGroup/index.js +0 -7
- package/dist/components/scheduler/Scheduler.vue.js +0 -128
- package/dist/components/scheduler/index.js +0 -7
- package/dist/components/scheduler/uses.js +0 -73
- package/dist/components/select/Select.vue.js +0 -381
- package/dist/components/select/index.js +0 -7
- package/dist/components/select/uses.js +0 -147
- package/dist/components/slider/Slider.vue.js +0 -243
- package/dist/components/slider/index.js +0 -7
- package/dist/components/slider/uses.js +0 -188
- package/dist/components/tabPanel/TabPanel.vue.js +0 -39
- package/dist/components/tabPanel/index.js +0 -7
- package/dist/components/tabs/Tabs.vue.js +0 -220
- package/dist/components/tabs/index.js +0 -7
- package/dist/components/textField/TextField.vue.js +0 -209
- package/dist/components/textField/index.js +0 -7
- package/dist/components/timePicker/TimePicker.vue.js +0 -227
- package/dist/components/timePicker/index.js +0 -7
- package/dist/components/toggle/Toggle.vue.js +0 -66
- package/dist/components/toggle/index.js +0 -7
- package/dist/components/tree/Tree.vue.js +0 -220
- package/dist/components/tree/TreeNode.vue.js +0 -146
- package/dist/components/tree/index.js +0 -7
- package/dist/components/treeGrid/TreeGrid.vue.js +0 -898
- package/dist/components/treeGrid/TreeGridNode.vue.js +0 -274
- package/dist/components/treeGrid/TreeGridToolbar.vue.js +0 -15
- package/dist/components/treeGrid/index.js +0 -7
- package/dist/components/treeGrid/uses.js +0 -497
- package/dist/components/window/Window.vue.js +0 -211
- package/dist/components/window/index.js +0 -7
- package/dist/components/window/uses.js +0 -345
- package/dist/directives/clickoutside.js +0 -47
- package/dist/main.js +0 -142
- package/dist/package.json.js +0 -4
- 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
|
-
};
|