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,50 @@
1
+ import { openBlock as r, createElementBlock as k, normalizeStyle as C, normalizeClass as s } from "vue";
2
+ import u from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const m = {
4
+ name: "EvIcon",
5
+ props: {
6
+ icon: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ size: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ color: {
15
+ type: String,
16
+ default: ""
17
+ }
18
+ },
19
+ emits: {
20
+ click: null,
21
+ "dbl-click": null,
22
+ "context-menu": null
23
+ },
24
+ setup(c, { emit: n }) {
25
+ return {
26
+ onClick: (l) => {
27
+ n("click", l);
28
+ },
29
+ onDblClick: (l) => {
30
+ n("dbl-click", l);
31
+ },
32
+ onContextMenu: (l) => {
33
+ n("context-menu", l);
34
+ }
35
+ };
36
+ }
37
+ };
38
+ function d(c, n, t, o, i, l) {
39
+ return r(), k("i", {
40
+ class: s([t.icon, { [`ev-icon-${t.size}`]: !!t.size }]),
41
+ style: C({ color: t.color }),
42
+ onClick: n[0] || (n[0] = (...e) => o.onClick && o.onClick(...e)),
43
+ "on:dblClick": n[1] || (n[1] = (...e) => o.onDblClick && o.onDblClick(...e)),
44
+ onContextmenu: n[2] || (n[2] = (...e) => o.onContextMenu && o.onContextMenu(...e))
45
+ }, null, 38);
46
+ }
47
+ const a = /* @__PURE__ */ u(m, [["render", d]]);
48
+ export {
49
+ a as default
50
+ };
@@ -0,0 +1,8 @@
1
+ /* empty css */
2
+ import o from "./Icon.vue.js";
3
+ o.install = (t) => {
4
+ t.component(o.name, o);
5
+ };
6
+ export {
7
+ o as default
8
+ };
@@ -0,0 +1,112 @@
1
+ import { useModel as f, useStep as v, useInit as b } from "./uses.js";
2
+ import { openBlock as p, createElementBlock as m, normalizeClass as u, createElementVNode as o, Fragment as c, renderList as y, withDirectives as V, withKeys as a, withModifiers as d, vModelText as I } from "vue";
3
+ /* empty css */
4
+ import w from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const g = {
6
+ name: "EvInputNumber",
7
+ props: {
8
+ modelValue: {
9
+ type: [String, Number],
10
+ default: null
11
+ },
12
+ placeholder: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ disabled: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ readonly: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ max: {
25
+ type: Number,
26
+ default: 1 / 0
27
+ },
28
+ min: {
29
+ type: Number,
30
+ default: -1 / 0
31
+ },
32
+ step: {
33
+ type: Number,
34
+ default: 1,
35
+ validator: (l) => l > 0
36
+ },
37
+ stepStrictly: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ precision: {
42
+ type: Number,
43
+ default: 0,
44
+ validator: (l) => l >= 0 && l <= 100 && l === parseInt(l, 10)
45
+ }
46
+ },
47
+ emits: ["update:modelValue", "focus", "blur", "input", "change"],
48
+ setup() {
49
+ const { currentValue: l, validateValue: e, focusInput: r, blurInput: n, changeMv: i } = f(), { stepValue: s } = v({
50
+ currentValue: l,
51
+ validateValue: e
52
+ });
53
+ return b({
54
+ currentValue: l,
55
+ validateValue: e
56
+ }), {
57
+ currentValue: l,
58
+ validateValue: e,
59
+ focusInput: r,
60
+ blurInput: n,
61
+ changeMv: i,
62
+ stepValue: s
63
+ };
64
+ }
65
+ }, N = { class: "ev-input-number__wrapper" }, x = ["onClick"], B = ["placeholder", "disabled", "readonly"];
66
+ function M(l, e, r, n, i, s) {
67
+ return p(), m("div", {
68
+ class: u(["ev-input-number", {
69
+ disabled: r.disabled,
70
+ readonly: r.readonly
71
+ }])
72
+ }, [
73
+ o("div", N, [
74
+ (p(), m(c, null, y(["up", "down"], (t) => o("span", {
75
+ key: `step-arrow-${t}`,
76
+ class: u(["ev-input-number-icon", `step-${t}`]),
77
+ onClick: (k) => n.stepValue(t)
78
+ }, [
79
+ o("i", {
80
+ class: u(`ev-icon-s-arrow-${t}`)
81
+ }, null, 2)
82
+ ], 10, x)), 64)),
83
+ V(o("input", {
84
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => n.currentValue = t),
85
+ class: "ev-input",
86
+ type: "text",
87
+ placeholder: r.placeholder,
88
+ disabled: r.disabled,
89
+ readonly: r.readonly,
90
+ onFocus: e[1] || (e[1] = (...t) => n.focusInput && n.focusInput(...t)),
91
+ onBlur: e[2] || (e[2] = (...t) => n.blurInput && n.blurInput(...t)),
92
+ onChange: e[3] || (e[3] = (...t) => n.changeMv && n.changeMv(...t)),
93
+ onKeydown: [
94
+ e[4] || (e[4] = a(d((t) => n.stepValue("up"), ["prevent"]), ["up"])),
95
+ e[5] || (e[5] = a(d((t) => n.stepValue("down"), ["prevent"]), ["down"])),
96
+ e[6] || (e[6] = a(d((t) => n.validateValue(n.currentValue), ["prevent"]), ["enter"]))
97
+ ]
98
+ }, null, 40, B), [
99
+ [
100
+ I,
101
+ n.currentValue,
102
+ void 0,
103
+ { trim: !0 }
104
+ ]
105
+ ])
106
+ ])
107
+ ], 2);
108
+ }
109
+ const F = /* @__PURE__ */ w(g, [["render", M]]);
110
+ export {
111
+ F as default
112
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./InputNumber.vue.js";
2
+ t.install = (e) => {
3
+ e.component(t.name, t);
4
+ };
5
+ export {
6
+ t as default
7
+ };
@@ -0,0 +1,76 @@
1
+ import { getCurrentInstance as m, ref as p, watch as d, onBeforeMount as x } from "vue";
2
+ import { getPrecision as f } from "../../common/utils.js";
3
+ function V(n, { min: e, max: s, step: o }) {
4
+ const r = Math.floor((n - e) / o), c = (n - e) % o, l = Math.floor((s - e) / o), u = Math.max(f(o), f(e));
5
+ let a = !1, t;
6
+ if (u) {
7
+ let i = +parseFloat(o * r).toFixed(u);
8
+ t = +(i + e).toFixed(u), a = r === l && +(s - t).toFixed(u) !== o, c > o / 2 && !a && (t = +(t + o).toFixed(u)), t > s ? (i = +parseFloat(o * l).toFixed(u), t = +(i + e).toFixed(u)) : t < e && (t = e);
9
+ } else
10
+ t = o * r + e, a = r === l && s - t !== o, c > o / 2 && !a && (t += o), t > s ? t = o * l + e : t < e && (t = e);
11
+ return t;
12
+ }
13
+ function M() {
14
+ const { props: n, emit: e } = m(), s = p(n.modelValue), o = p(n.modelValue), r = (t) => n.precision && (t || t === 0) ? Number(t).toFixed(n.precision) : t, c = (t) => {
15
+ let i = t;
16
+ !t && t !== 0 ? i = n.stepStrictly ? o.value : null : isNaN(t) ? i = o.value : n.stepStrictly ? (n.min === -1 / 0 && (n.min = 0), i = V(t, {
17
+ min: n.min,
18
+ max: n.max,
19
+ step: n.step
20
+ })) : (n.min || n.min === 0) && i < n.min ? i = n.min : (n.max || n.max === 0) && i > n.max ? i = n.max : i = +i, s.value = r(i), o.value = r(i), e("update:modelValue", i), e("change", i);
21
+ }, l = (t) => {
22
+ e("focus", t);
23
+ }, u = (t) => {
24
+ e("blur", t);
25
+ }, a = (t) => {
26
+ c(t.target.value);
27
+ };
28
+ return d(
29
+ () => n.modelValue,
30
+ (t, i) => {
31
+ t !== i && (s.value = r(t));
32
+ }
33
+ ), {
34
+ currentValue: s,
35
+ validateValue: c,
36
+ focusInput: l,
37
+ blurInput: u,
38
+ changeMv: a
39
+ };
40
+ }
41
+ function I(n) {
42
+ const { props: e } = m(), { currentValue: s, validateValue: o } = n;
43
+ return {
44
+ stepValue: (c) => {
45
+ if (e.readonly || e.disabled)
46
+ return;
47
+ let l;
48
+ if (!s.value && s.value !== 0)
49
+ l = e.min === -1 / 0 ? 0 : e.min;
50
+ else {
51
+ const u = +s.value, a = c === "up" ? e.step : e.step * -1, i = 10 ** Math.max(f(u), f(e.step));
52
+ l = (Math.round(u * i) + Math.round(a * i)) / i;
53
+ }
54
+ l >= e.min && l <= e.max && o(l);
55
+ }
56
+ };
57
+ }
58
+ function b(n) {
59
+ const { props: e } = m(), { currentValue: s, validateValue: o } = n, r = e.max || e.max === 0, c = e.min || e.min === 0, l = () => {
60
+ r && c && e.max <= e.min && console.warn("[EVUI][InputNumber] Max value must be greater than min value."), e.step && (e.precision || e.precision === 0) && f(e.step) > e.precision && console.warn(
61
+ "[EVUI][InputNumber] It cannot be calculated because the step is smaller than the precision setting."
62
+ );
63
+ }, u = () => {
64
+ let a = s.value;
65
+ isNaN(s.value) && (a = 0), (a || a === 0) && (r && a > e.max ? a = e.max : c && a < e.min && (a = e.min)), o(a);
66
+ };
67
+ x(() => {
68
+ l(), u();
69
+ });
70
+ }
71
+ export {
72
+ V as getValueCloseToStep,
73
+ b as useInit,
74
+ M as useModel,
75
+ I as useStep
76
+ };
@@ -0,0 +1,78 @@
1
+ import { openBlock as a, createBlock as y, Teleport as k, createElementBlock as t, mergeProps as i, toHandlerKey as c, createElementVNode as d, renderSlot as r, normalizeStyle as u, normalizeClass as m, createCommentVNode as f, Fragment as v, computed as g } from "vue";
2
+ /* empty css */
3
+ import E from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const L = {
5
+ name: "EvLoading",
6
+ props: {
7
+ modelValue: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ fullscreen: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ clickOutside: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ iconClass: {
20
+ type: String,
21
+ default: null
22
+ },
23
+ iconStyle: {
24
+ type: Object,
25
+ default: () => {
26
+ }
27
+ }
28
+ },
29
+ emits: {
30
+ "update:modelValue": [Boolean]
31
+ },
32
+ setup(o, { emit: n }) {
33
+ return {
34
+ clickEventName: g(() => o.clickOutside ? "click" : null),
35
+ closeLoading: () => n("update:modelValue", !1)
36
+ };
37
+ }
38
+ }, B = { class: "ev-loading-spinner" }, V = { class: "ev-loading-spinner" };
39
+ function N(o, n, e, l, S, p) {
40
+ return e.fullscreen ? (a(), y(k, {
41
+ key: 0,
42
+ to: "body"
43
+ }, [
44
+ e.modelValue ? (a(), t("div", i({
45
+ key: 0,
46
+ class: "ev-loading full-screen"
47
+ }, {
48
+ [c(`${l.clickEventName}`)]: n[0] || (n[0] = (...s) => l.closeLoading && l.closeLoading(...s))
49
+ }), [
50
+ d("div", B, [
51
+ o.$slots.default ? r(o.$slots, "default", { key: 0 }) : (a(), t("i", {
52
+ key: 1,
53
+ class: m([e.iconClass || "ev-icon-refresh2", "ev-loading-icon"]),
54
+ style: u(e.iconStyle)
55
+ }, null, 6))
56
+ ])
57
+ ], 16)) : f("", !0)
58
+ ])) : (a(), t(v, { key: 1 }, [
59
+ e.modelValue ? (a(), t("div", i({
60
+ key: 0,
61
+ class: "ev-loading"
62
+ }, {
63
+ [c(`${l.clickEventName}`)]: n[1] || (n[1] = (...s) => l.closeLoading && l.closeLoading(...s))
64
+ }), [
65
+ d("div", V, [
66
+ o.$slots.default ? r(o.$slots, "default", { key: 0 }) : (a(), t("i", {
67
+ key: 1,
68
+ class: m([e.iconClass || "ev-icon-refresh2", "ev-loading-icon"]),
69
+ style: u(e.iconStyle)
70
+ }, null, 6))
71
+ ])
72
+ ], 16)) : f("", !0)
73
+ ], 64));
74
+ }
75
+ const b = /* @__PURE__ */ E(L, [["render", N]]);
76
+ export {
77
+ b as default
78
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Loading.vue.js";
2
+ o.install = (a) => {
3
+ a.component(o.name, o);
4
+ };
5
+ export {
6
+ o as default
7
+ };
@@ -0,0 +1,66 @@
1
+ import { resolveComponent as _, openBlock as m, createElementBlock as u, Fragment as b, renderList as d, createBlock as k, createSlots as v, withCtx as M, renderSlot as x, mergeProps as y, ref as g } from "vue";
2
+ import i from "./MenuItem.vue.js";
3
+ /* empty css */
4
+ import h from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const B = {
6
+ name: "EvMenu",
7
+ components: {
8
+ MenuItem: i
9
+ },
10
+ props: {
11
+ modelValue: {
12
+ type: [String, Number],
13
+ default: ""
14
+ },
15
+ items: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ expandable: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: !1
26
+ }
27
+ },
28
+ emits: ["update:modelValue", "change"],
29
+ setup(t, { emit: l }) {
30
+ const e = g(t.items.filter((n) => t.modelValue === n.value));
31
+ return {
32
+ clickMenu: (n) => {
33
+ if (!n.disabled) {
34
+ const o = n.item;
35
+ l("update:modelValue", o.value), l("change", o, e.value), e.value = o;
36
+ }
37
+ },
38
+ component: i
39
+ };
40
+ }
41
+ }, V = { class: "ev-menu" };
42
+ function C(t, l, e, a, s, n) {
43
+ const o = _("menu-item");
44
+ return m(), u("ul", V, [
45
+ (m(!0), u(b, null, d(e.items, (r, p) => (m(), k(o, {
46
+ key: `${r.text}_${p}_0`,
47
+ item: r,
48
+ "selected-item": e.modelValue,
49
+ expandable: e.expandable,
50
+ disabled: e.disabled,
51
+ comp: a.component,
52
+ onClick: a.clickMenu
53
+ }, v({ _: 2 }, [
54
+ d(t.$slots, (E, c) => ({
55
+ name: c,
56
+ fn: M((f) => [
57
+ x(t.$slots, c, y({ ref_for: !0 }, f))
58
+ ])
59
+ }))
60
+ ]), 1032, ["item", "selected-item", "expandable", "disabled", "comp", "onClick"]))), 128))
61
+ ]);
62
+ }
63
+ const A = /* @__PURE__ */ h(B, [["render", C]]);
64
+ export {
65
+ A as default
66
+ };
@@ -0,0 +1,125 @@
1
+ import { ref as b, computed as x, openBlock as l, createElementBlock as d, normalizeClass as u, createElementVNode as s, createCommentVNode as c, renderSlot as v, createTextVNode as r, toDisplayString as o, Fragment as f, withDirectives as k, renderList as I, createBlock as C, resolveDynamicComponent as E, vShow as M } from "vue";
2
+ /* empty css */
3
+ import w from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const V = {
5
+ name: "MenuItem",
6
+ props: {
7
+ selectedItem: {
8
+ type: [String, Number],
9
+ default: ""
10
+ },
11
+ item: {
12
+ type: Object,
13
+ default: () => {
14
+ },
15
+ validator: (t) => {
16
+ if (t.value) {
17
+ if (t.children !== void 0 && !Array.isArray(t.children))
18
+ return console.warn("[EVUI][Menu] children attribute must be 'Array' type."), !1;
19
+ if (t.expand !== void 0 && typeof t.expand != "boolean")
20
+ return console.warn("[EVUI][Menu] expand attribute must be 'Boolean' type."), !1;
21
+ if (t.hidden !== void 0 && typeof t.hidden != "boolean")
22
+ return console.warn("[EVUI][Menu] hidden attribute must be 'Boolean' type."), !1;
23
+ if (t.disabled !== void 0 && typeof t.disabled != "boolean")
24
+ return console.warn("[EVUI][Menu] disabled attribute must be 'Boolean' type."), !1;
25
+ if (t.slotKey !== void 0 && typeof t.slotKey != "string")
26
+ return console.warn("[EVUI][Menu] slotKey attribute must be 'String' type."), !1;
27
+ } else return console.warn("[EVUI][Menu] value attribute is required."), !1;
28
+ return !0;
29
+ }
30
+ },
31
+ depth: {
32
+ type: Number,
33
+ default: 1
34
+ },
35
+ expandable: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ comp: {
40
+ type: Object,
41
+ default: () => {
42
+ }
43
+ },
44
+ disabled: {
45
+ type: Boolean,
46
+ default: !1
47
+ }
48
+ },
49
+ emits: ["click"],
50
+ setup(t, { emit: i }) {
51
+ const e = t.expandable && t.item.expand !== void 0 && typeof t.item.expand == "boolean" ? t.item.expand : !0, n = b(e), m = x(() => !!t.item.children && !!t.item.children.length);
52
+ return {
53
+ isExpand: n,
54
+ hasChild: m,
55
+ clickMenu: (a) => {
56
+ m.value && a.depth === t.depth ? t.expandable && (n.value = !n.value) : i("click", a);
57
+ }
58
+ };
59
+ }
60
+ }, B = { class: "text" };
61
+ function _(t, i, e, n, m, h) {
62
+ return e.item.hidden ? c("", !0) : (l(), d("li", {
63
+ key: 0,
64
+ class: u([
65
+ "ev-menu-item",
66
+ `depth${e.depth}`,
67
+ { active: !e.item.disabled && e.item.value === e.selectedItem }
68
+ ])
69
+ }, [
70
+ s("div", {
71
+ class: u([
72
+ "ev-menu-title",
73
+ {
74
+ expandable: n.hasChild && e.expandable,
75
+ disabled: e.item.disabled
76
+ }
77
+ ]),
78
+ onClick: i[0] || (i[0] = (a) => n.clickMenu({ item: e.item, depth: e.depth, disabled: e.item.disabled }))
79
+ }, [
80
+ e.item.iconClass ? (l(), d("i", {
81
+ key: 0,
82
+ class: u(["front-icon", e.item.iconClass])
83
+ }, null, 2)) : c("", !0),
84
+ s("span", B, [
85
+ e.item.slotKey ? v(t.$slots, e.item.slotKey, {
86
+ key: 0,
87
+ item: e.item,
88
+ depth: e.depth,
89
+ selectedItem: e.selectedItem
90
+ }, () => [
91
+ r(o(e.item.text || e.item.value), 1)
92
+ ]) : (l(), d(f, { key: 1 }, [
93
+ r(o(e.item.text || e.item.value), 1)
94
+ ], 64))
95
+ ]),
96
+ e.expandable && n.hasChild ? (l(), d("span", {
97
+ key: 1,
98
+ class: u(["list-expend-icon", { expend: e.expandable && n.isExpand }])
99
+ }, [...i[1] || (i[1] = [
100
+ s("i", { class: "ev-icon-s-arrow-up" }, null, -1)
101
+ ])], 2)) : c("", !0)
102
+ ], 2),
103
+ n.hasChild ? k((l(), d("ol", {
104
+ key: 0,
105
+ class: u(["ev-menu-sub", `depth${e.depth}`])
106
+ }, [
107
+ (l(!0), d(f, null, I(e.item.children, (a, y) => (l(), C(E(e.comp), {
108
+ key: `${a.value}_${y}_${e.depth + 1}`,
109
+ depth: e.depth + 1,
110
+ item: a,
111
+ "selected-item": e.selectedItem,
112
+ expandable: e.expandable,
113
+ disabled: e.disabled,
114
+ comp: e.comp,
115
+ onClick: n.clickMenu
116
+ }, null, 8, ["depth", "item", "selected-item", "expandable", "disabled", "comp", "onClick"]))), 128))
117
+ ], 2)), [
118
+ [M, n.isExpand]
119
+ ]) : c("", !0)
120
+ ], 2));
121
+ }
122
+ const N = /* @__PURE__ */ w(V, [["render", _]]);
123
+ export {
124
+ N as default
125
+ };
@@ -0,0 +1,7 @@
1
+ import e from "./Menu.vue.js";
2
+ e.install = (n) => {
3
+ n.component(e.name, e);
4
+ };
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,122 @@
1
+ import { openBlock as l, createBlock as y, Teleport as g, createVNode as v, Transition as w, withCtx as C, withDirectives as T, createElementVNode as m, normalizeClass as u, createElementBlock as a, createCommentVNode as d, toDisplayString as k, vShow as M, reactive as h, onMounted as S, onBeforeUnmount as B, toRefs as L } from "vue";
2
+ /* empty css */
3
+ import _ from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const E = {
5
+ name: "EvMessage",
6
+ props: {
7
+ type: {
8
+ type: String,
9
+ default: "info",
10
+ validator: (t) => ["info", "success", "warning", "error"].includes(t)
11
+ },
12
+ message: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ duration: {
17
+ type: Number,
18
+ default: 3e3
19
+ },
20
+ showClose: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ iconClass: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ onClose: {
29
+ type: Function,
30
+ default: null
31
+ },
32
+ useHTML: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ unmount: {
37
+ type: Function,
38
+ default: null
39
+ }
40
+ },
41
+ setup(t, s) {
42
+ const e = h({
43
+ timer: null,
44
+ isShow: !0
45
+ }), n = () => {
46
+ clearTimeout(e.timer), e.timer = null;
47
+ }, i = () => {
48
+ e.isShow = !1, t.onClose && t.onClose(), n(), t.unmount && setTimeout(t.unmount, 1e3);
49
+ }, r = () => {
50
+ t.duration > 0 && (e.timer = setTimeout(() => {
51
+ e.isShow && i();
52
+ }, t.duration));
53
+ }, o = (f) => {
54
+ f.keyCode === 27 && e.isShow && i();
55
+ }, c = () => {
56
+ i();
57
+ };
58
+ return S(() => {
59
+ r(), document.addEventListener("keydown", o);
60
+ }), B(() => {
61
+ document.removeEventListener("keydown", o), n();
62
+ }), s.expose({ hide: c }), {
63
+ startTimer: r,
64
+ clearTimer: n,
65
+ closeMsg: i,
66
+ ...L(e),
67
+ hide: c
68
+ };
69
+ }
70
+ }, x = {
71
+ key: 0,
72
+ class: "ev-message-icon"
73
+ }, H = ["innerHTML"], N = {
74
+ key: 2,
75
+ class: "ev-message-content"
76
+ };
77
+ function V(t, s, e, n, i, r) {
78
+ return l(), y(g, { to: "#ev-message-modal" }, [
79
+ v(w, {
80
+ name: "ev-message-fade",
81
+ appear: ""
82
+ }, {
83
+ default: C(() => [
84
+ T(m("div", {
85
+ ref: "msgRef",
86
+ class: u(["ev-message", {
87
+ [`type-${e.type}`]: !!e.type,
88
+ "show-close": e.showClose,
89
+ "has-icon": !!e.iconClass
90
+ }]),
91
+ onMouseenter: s[1] || (s[1] = (...o) => n.clearTimer && n.clearTimer(...o)),
92
+ onMouseleave: s[2] || (s[2] = (...o) => n.startTimer && n.startTimer(...o))
93
+ }, [
94
+ e.iconClass ? (l(), a("span", x, [
95
+ m("i", {
96
+ class: u(e.iconClass)
97
+ }, null, 2)
98
+ ])) : d("", !0),
99
+ e.useHTML ? (l(), a("div", {
100
+ key: 1,
101
+ class: "ev-message-content",
102
+ innerHTML: e.message
103
+ }, null, 8, H)) : (l(), a("div", N, k(e.message), 1)),
104
+ e.showClose ? (l(), a("span", {
105
+ key: 3,
106
+ class: "ev-message-close",
107
+ onClick: s[0] || (s[0] = (...o) => n.closeMsg && n.closeMsg(...o))
108
+ }, [...s[3] || (s[3] = [
109
+ m("i", { class: "ev-icon-close" }, null, -1)
110
+ ])])) : d("", !0)
111
+ ], 34), [
112
+ [M, t.isShow]
113
+ ])
114
+ ]),
115
+ _: 1
116
+ })
117
+ ]);
118
+ }
119
+ const b = /* @__PURE__ */ _(E, [["render", V]]);
120
+ export {
121
+ b as default
122
+ };
@@ -0,0 +1,16 @@
1
+ import { defineComponent as l, h as i, render as m } from "vue";
2
+ import p from "./Message.vue.js";
3
+ const g = l(p), a = "ev-message-modal", d = document.createElement("div");
4
+ d.id = a;
5
+ const c = (e = {}) => {
6
+ document.getElementById(a) || document.body.appendChild(d);
7
+ const t = document.createElement("div"), n = () => m(null, t), r = typeof e == "string" ? { message: e, unmount: n } : { ...e, unmount: n }, s = i(g, r);
8
+ return m(s, t), s.component.exposed;
9
+ };
10
+ c.install = (e) => {
11
+ const o = e.config.globalProperties;
12
+ o.$message = c;
13
+ };
14
+ export {
15
+ c as default
16
+ };