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,220 +0,0 @@
1
- import { resolveDirective as _, withDirectives as B, openBlock as p, createElementBlock as T, normalizeClass as k, createElementVNode as u, Fragment as I, createCommentVNode as w, normalizeStyle as N, renderList as O, mergeProps as P, withModifiers as y, toDisplayString as U, renderSlot as j, ref as h, computed as C, provide as A, reactive as L, onBeforeUpdate as F, nextTick as M, triggerRef as X } from "vue";
2
- import { ObserveVisibility as q } from "vue3-observe-visibility";
3
- import G from "vue-resize-observer";
4
- /* empty css */
5
- import H from "../../_virtual/_plugin-vue_export-helper.js";
6
- const J = {
7
- name: "EvTabs",
8
- directives: {
9
- observeVisibility: q,
10
- resize: G
11
- },
12
- props: {
13
- modelValue: {
14
- type: [String, Number],
15
- default: null
16
- },
17
- panels: {
18
- type: Array,
19
- default: () => [],
20
- validator: (n) => {
21
- const s = n.map((e) => e.value), d = [...new Set(s)];
22
- return n.length !== d.length ? (console.warn("[EVUI][Tabs] TabPanel 'value' attribute is duplicate values."), !1) : n.every((e) => Object.hasOwnProperty.call(e, "value")) ? !0 : (console.warn("[EVUI][Tabs] TabPanel 'value' attribute is essential."), !1);
23
- }
24
- },
25
- closable: {
26
- type: Boolean,
27
- default: !1
28
- },
29
- stretch: {
30
- type: Boolean,
31
- default: !1
32
- },
33
- draggable: {
34
- type: Boolean,
35
- default: !1
36
- }
37
- },
38
- emits: {
39
- "update:modelValue": [String, Number],
40
- "update:panels": [Array],
41
- change: [String, Number]
42
- },
43
- setup(n, { emit: s }) {
44
- const d = h(!1), e = h([]), c = C({
45
- get: () => n.modelValue,
46
- set: (l) => {
47
- s("update:modelValue", l), s("change", l);
48
- }
49
- });
50
- A("evTabs", c);
51
- const t = C({
52
- get: () => n.panels,
53
- set: (l) => s("update:panels", l)
54
- }), S = C(() => !n.draggable || !d.value ? t.value : e.value), x = t.value.map((l) => l.value), r = h(null), m = h(null), f = h(!1), o = L({
55
- x: 0
56
- }), R = C(() => ({
57
- transform: `translateX(${o.x}px)`
58
- })), z = () => {
59
- const l = r.value.offsetWidth, a = m.value.offsetWidth;
60
- if (f.value = l < a, f.value) {
61
- const v = l - a;
62
- v > o.x && (o.x = v);
63
- } else
64
- o.x = 0;
65
- };
66
- F(() => {
67
- if (x.length === t.value.length + 1) {
68
- let l, a;
69
- x.length > t.value.length ? (l = x, a = t.value.map((i) => i.value)) : (l = t.value.map((i) => i.value), a = x);
70
- const v = l.filter((i) => !a.includes(i))[0];
71
- if (c.value === v) {
72
- const i = x.findIndex((g) => g === v);
73
- i === 0 ? c.value = t.value[0].value : c.value = t.value[i - 1].value;
74
- }
75
- }
76
- });
77
- const D = (l) => {
78
- c.value = l;
79
- }, W = (l) => {
80
- if (t.value.length < 2)
81
- return;
82
- const a = t.value.findIndex((v) => v.value === l);
83
- if (a < 0) {
84
- c.value = t.value[0].value;
85
- return;
86
- }
87
- l === c.value && (a === 0 ? c.value = t.value[1].value : c.value = t.value[a - 1].value), t.value.splice(a, 1), M(() => {
88
- x.splice(a, 1);
89
- }), X(t);
90
- }, E = (l, a = 100) => {
91
- const v = r.value.offsetWidth, i = m.value.offsetWidth, g = v - i;
92
- l === "next" && o.x !== g ? g >= o.x - a ? o.x = g : o.x -= a : l === "prev" && o.x !== 0 && (a * -1 <= o.x ? o.x = 0 : o.x += a);
93
- }, b = L({
94
- item: {},
95
- idx: null
96
- });
97
- return {
98
- mv: c,
99
- computedTabList: S,
100
- clickTab: D,
101
- removeTab: W,
102
- listWrapperRef: r,
103
- listRef: m,
104
- hasScroll: f,
105
- listRefStyle: R,
106
- scrollTab: E,
107
- dragstartTab: (l, a) => {
108
- n.draggable && (e.value = [...t.value], b.item = l, b.idx = a, d.value = !0);
109
- },
110
- dragoverTab: (l) => {
111
- var i;
112
- if (!n.draggable || ((i = b.item) == null ? void 0 : i.value) === l)
113
- return;
114
- const a = e.value.findIndex((g) => {
115
- var V;
116
- return g.value === ((V = b.item) == null ? void 0 : V.value);
117
- }), v = e.value.findIndex((g) => g.value === l);
118
- e.value.splice(a, 1), e.value.splice(v, 0, b.item);
119
- },
120
- dragendTab: () => {
121
- n.draggable && (t.value = [...e.value], b.item = {}, b.idx = null, d.value = !1, e.value.splice(0));
122
- },
123
- dragSelectCls: (l) => {
124
- var a;
125
- return n.draggable && ((a = b.item) == null ? void 0 : a.value) === l;
126
- },
127
- selectIdxCls: (l) => n.draggable && b.idx === l,
128
- onResize: () => {
129
- z();
130
- }
131
- };
132
- }
133
- }, K = { class: "ev-tabs-header" }, Q = {
134
- ref: "listWrapperRef",
135
- class: "ev-tabs-list-wrapper"
136
- }, Y = ["onClick", "onDragstart", "onDragover"], Z = ["title"], $ = ["onClick"], ee = { class: "ev-tabs-body" };
137
- function le(n, s, d, e, c, t) {
138
- const S = _("resize"), x = _("observe-visibility");
139
- return B((p(), T("section", {
140
- class: k(["ev-tabs", {
141
- closable: d.closable,
142
- stretch: d.stretch
143
- }])
144
- }, [
145
- u("div", K, [
146
- u("div", {
147
- class: k(["ev-tabs-nav-wrapper", {
148
- "has-scroll": e.hasScroll
149
- }])
150
- }, [
151
- e.hasScroll ? (p(), T(I, { key: 0 }, [
152
- u("span", {
153
- class: "ev-tabs-arrow prev",
154
- onClick: s[0] || (s[0] = (r) => e.scrollTab("prev"))
155
- }, [...s[3] || (s[3] = [
156
- u("i", { class: "ev-icon-s-arrow-left" }, null, -1)
157
- ])]),
158
- u("span", {
159
- class: "ev-tabs-arrow next",
160
- onClick: s[1] || (s[1] = (r) => e.scrollTab("next"))
161
- }, [...s[4] || (s[4] = [
162
- u("i", { class: "ev-icon-s-arrow-right" }, null, -1)
163
- ])])
164
- ], 64)) : w("", !0),
165
- u("div", Q, [
166
- u("ul", {
167
- ref: "listRef",
168
- class: "ev-tabs-list",
169
- style: N(e.listRefStyle)
170
- }, [
171
- (p(!0), T(I, null, O(e.computedTabList, (r, m) => (p(), T("li", P({
172
- key: `${r.value}_${m}`,
173
- class: "ev-tabs-title"
174
- }, { ref_for: !0 }, { draggable: d.draggable }, {
175
- class: {
176
- active: r.value === e.mv,
177
- "has-icon": r.iconClass,
178
- "drag-select": e.dragSelectCls(r.value),
179
- "select-idx": e.selectIdxCls(m)
180
- },
181
- onClick: (f) => e.clickTab(r.value),
182
- onDragstart: y((f) => e.dragstartTab(r, m), ["stop"]),
183
- onDragover: y((f) => e.dragoverTab(r.value), ["prevent"]),
184
- onDragend: s[2] || (s[2] = y((...f) => e.dragendTab && e.dragendTab(...f), ["prevent"]))
185
- }), [
186
- r.iconClass ? (p(), T("i", {
187
- key: 0,
188
- class: k(["ev-tabs-icon", r.iconClass])
189
- }, null, 2)) : w("", !0),
190
- u("span", {
191
- class: "text",
192
- title: r.text
193
- }, U(r.text), 9, Z),
194
- d.closable ? (p(), T("span", {
195
- key: 1,
196
- class: "close-icon",
197
- onClick: y((f) => e.removeTab(r.value), ["stop"])
198
- }, [...s[5] || (s[5] = [
199
- u("i", { class: "ev-icon-s-close" }, null, -1)
200
- ])], 8, $)) : w("", !0)
201
- ], 16, Y))), 128))
202
- ], 4)
203
- ], 512)
204
- ], 2)
205
- ]),
206
- u("div", ee, [
207
- j(n.$slots, "default")
208
- ])
209
- ], 2)), [
210
- [S, e.onResize],
211
- [x, {
212
- callback: e.onResize,
213
- once: !0
214
- }]
215
- ]);
216
- }
217
- const fe = /* @__PURE__ */ H(J, [["render", le]]);
218
- export {
219
- fe as default
220
- };
@@ -1,7 +0,0 @@
1
- import a from "./Tabs.vue.js";
2
- a.install = (o) => {
3
- o.component(a.name, a);
4
- };
5
- export {
6
- a as default
7
- };
@@ -1,209 +0,0 @@
1
- import { openBlock as i, createElementBlock as s, normalizeClass as f, createElementVNode as u, withDirectives as h, vModelText as I, Fragment as L, vModelDynamic as B, createCommentVNode as d, renderSlot as b, toDisplayString as c, createTextVNode as P, computed as y, ref as C, watch as S } from "vue";
2
- /* empty css */
3
- import U from "../../_virtual/_plugin-vue_export-helper.js";
4
- const T = {
5
- name: "EvTextField",
6
- props: {
7
- modelValue: {
8
- type: [String, Number],
9
- default: null
10
- },
11
- type: {
12
- type: String,
13
- default: "text"
14
- },
15
- placeholder: {
16
- type: String,
17
- default: ""
18
- },
19
- clearable: {
20
- type: Boolean,
21
- default: !1
22
- },
23
- showPassword: {
24
- type: Boolean,
25
- default: !1
26
- },
27
- disabled: {
28
- type: Boolean,
29
- default: !1
30
- },
31
- readonly: {
32
- type: Boolean,
33
- default: !1
34
- },
35
- maxLength: {
36
- type: Number,
37
- default: null
38
- },
39
- maxUnit: {
40
- type: String,
41
- default: "count"
42
- },
43
- showMaxLength: {
44
- type: Boolean,
45
- default: !1
46
- },
47
- errorMsg: {
48
- type: String,
49
- default: ""
50
- },
51
- autocomplete: {
52
- type: String,
53
- default: "off"
54
- }
55
- },
56
- emits: ["update:modelValue", "focus", "blur", "input", "change", "search"],
57
- setup(a, { emit: t }) {
58
- const e = y({
59
- get: () => a.modelValue,
60
- set: (o) => t("update:modelValue", o)
61
- }), l = C(!1), v = () => {
62
- a.type === "password" && (l.value = !l.value);
63
- }, x = y(() => a.type === "password" ? l.value ? "text" : "password" : a.type === "search" ? "text" : a.type);
64
- S(
65
- () => a.type,
66
- (o) => {
67
- o !== "password" && (l.value = !1);
68
- }
69
- );
70
- const n = () => {
71
- e.value = "";
72
- }, g = () => {
73
- t("search", e.value);
74
- }, w = (o) => {
75
- a.type === "search" && (o.key === "Enter" || o.keyCode === 13) && g();
76
- }, M = (o) => {
77
- t("focus", o);
78
- }, V = (o) => {
79
- t("blur", o);
80
- }, m = (o) => new TextEncoder().encode(o).length, k = y(
81
- () => a.maxUnit === "byte" ? m(e.value || "") : (e.value || "").length
82
- );
83
- return {
84
- mv: e,
85
- inputType: x,
86
- isPasswordVisible: l,
87
- clearValue: n,
88
- changePasswordVisible: v,
89
- searchValue: g,
90
- keyupInput: w,
91
- focusInput: M,
92
- blurInput: V,
93
- inputMv: (o) => {
94
- let r = o.target.value;
95
- if (a.maxLength && a.maxUnit === "byte") {
96
- for (; m(r) > a.maxLength; )
97
- r = r.slice(0, -1);
98
- o.target.value = r;
99
- }
100
- e.value = r, t("input", r, o);
101
- },
102
- changeMv: (o) => t("change", e.value, o),
103
- currentLength: k
104
- };
105
- }
106
- }, E = { class: "ev-text-field-wrapper" }, F = ["placeholder", "disabled", "readonly", "autocomplete", "maxlength"], N = ["type", "placeholder", "disabled", "readonly", "autocomplete", "maxlength"], D = {
107
- key: 3,
108
- class: "ev-text-field-icon icon-suffix"
109
- }, z = {
110
- key: 4,
111
- class: "ev-text-field-icon icon-prefix"
112
- }, K = {
113
- key: 0,
114
- class: "ev-text-field-error"
115
- }, j = { class: "curr-length" };
116
- function q(a, t, e, l, v, x) {
117
- return i(), s("div", {
118
- class: f(["ev-text-field", {
119
- disabled: e.disabled,
120
- clearable: e.clearable,
121
- readonly: e.readonly,
122
- error: !!e.errorMsg,
123
- "show-password": e.showPassword,
124
- "show-maxlength": e.showMaxLength,
125
- [`type-${e.type}`]: !!e.type,
126
- "ev-text-field-prefix": a.$slots["icon-prefix"],
127
- "ev-text-field-suffix": a.$slots["icon-suffix"],
128
- "ev-text-field-prefix-suffix": a.$slots["icon-prefix"] && a.$slots["icon-suffix"]
129
- }])
130
- }, [
131
- u("div", E, [
132
- e.type === "textarea" ? h((i(), s("textarea", {
133
- key: 0,
134
- "onUpdate:modelValue": t[0] || (t[0] = (n) => l.mv = n),
135
- class: "ev-textarea",
136
- placeholder: e.placeholder,
137
- disabled: e.disabled,
138
- readonly: e.readonly,
139
- autocomplete: e.autocomplete,
140
- maxlength: e.maxUnit === "byte" ? null : e.maxLength,
141
- onFocus: t[1] || (t[1] = (...n) => l.focusInput && l.focusInput(...n)),
142
- onBlur: t[2] || (t[2] = (...n) => l.blurInput && l.blurInput(...n)),
143
- onInput: t[3] || (t[3] = (...n) => l.inputMv && l.inputMv(...n)),
144
- onChange: t[4] || (t[4] = (...n) => l.changeMv && l.changeMv(...n))
145
- }, null, 40, F)), [
146
- [I, l.mv]
147
- ]) : (i(), s(L, { key: 1 }, [
148
- h(u("input", {
149
- "onUpdate:modelValue": t[5] || (t[5] = (n) => l.mv = n),
150
- class: "ev-input",
151
- type: l.inputType,
152
- placeholder: e.placeholder,
153
- disabled: e.disabled,
154
- readonly: e.readonly,
155
- autocomplete: e.autocomplete,
156
- maxlength: e.maxUnit === "byte" ? null : e.maxLength,
157
- onFocus: t[6] || (t[6] = (...n) => l.focusInput && l.focusInput(...n)),
158
- onBlur: t[7] || (t[7] = (...n) => l.blurInput && l.blurInput(...n)),
159
- onInput: t[8] || (t[8] = (...n) => l.inputMv && l.inputMv(...n)),
160
- onChange: t[9] || (t[9] = (...n) => l.changeMv && l.changeMv(...n)),
161
- onKeyup: t[10] || (t[10] = (...n) => l.keyupInput && l.keyupInput(...n))
162
- }, null, 40, N), [
163
- [B, l.mv]
164
- ]),
165
- e.type === "text" && e.clearable ? (i(), s("span", {
166
- key: 0,
167
- class: "ev-text-field-icon icon-clear",
168
- onClick: t[11] || (t[11] = (...n) => l.clearValue && l.clearValue(...n))
169
- }, [...t[14] || (t[14] = [
170
- u("i", { class: "ev-icon-error" }, null, -1)
171
- ])])) : d("", !0),
172
- e.type === "password" && e.showPassword ? (i(), s("span", {
173
- key: 1,
174
- class: f(["ev-text-field-icon icon-password", { on: l.isPasswordVisible }]),
175
- onClick: t[12] || (t[12] = (...n) => l.changePasswordVisible && l.changePasswordVisible(...n))
176
- }, [
177
- u("i", {
178
- class: f(l.isPasswordVisible ? "ev-icon-visibility" : "ev-icon-visibility-off")
179
- }, null, 2)
180
- ], 2)) : d("", !0),
181
- e.type === "search" ? (i(), s("span", {
182
- key: 2,
183
- class: "ev-text-field-icon icon-search",
184
- onClick: t[13] || (t[13] = (...n) => l.searchValue && l.searchValue(...n))
185
- }, [...t[15] || (t[15] = [
186
- u("i", { class: "ev-icon-search" }, null, -1)
187
- ])])) : d("", !0),
188
- a.$slots["icon-suffix"] ? (i(), s("span", D, [
189
- b(a.$slots, "icon-suffix")
190
- ])) : d("", !0),
191
- a.$slots["icon-prefix"] ? (i(), s("span", z, [
192
- b(a.$slots, "icon-prefix")
193
- ])) : d("", !0)
194
- ], 64))
195
- ]),
196
- e.errorMsg ? (i(), s("div", K, c(e.errorMsg), 1)) : d("", !0),
197
- e.maxLength && e.showMaxLength ? (i(), s("div", {
198
- key: 1,
199
- class: f(["ev-text-field-maxlength", { max: l.currentLength > e.maxLength }])
200
- }, [
201
- u("span", j, c(l.currentLength), 1),
202
- P(" / " + c(e.maxLength) + c(e.maxUnit === "byte" ? " Bytes" : ""), 1)
203
- ], 2)) : d("", !0)
204
- ], 2);
205
- }
206
- const Q = /* @__PURE__ */ U(T, [["render", q]]);
207
- export {
208
- Q as default
209
- };
@@ -1,7 +0,0 @@
1
- import e from "./TextField.vue.js";
2
- e.install = (t) => {
3
- t.component(e.name, e);
4
- };
5
- export {
6
- e as default
7
- };
@@ -1,227 +0,0 @@
1
- import { resolveComponent as p, openBlock as c, createElementBlock as m, createElementVNode as u, normalizeClass as v, withDirectives as f, vModelText as T, createVNode as y, createBlock as g, createCommentVNode as b, computed as E, ref as I, reactive as S } from "vue";
2
- /* empty css */
3
- import x from "../../_virtual/_plugin-vue_export-helper.js";
4
- const V = {
5
- name: "EvTimePicker",
6
- props: {
7
- modelValue: {
8
- type: [Array, String],
9
- default: "",
10
- validator: (t) => {
11
- const l = /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;
12
- return Array.isArray(t) && (!l.test(t[0]) || !l.test(t[1])) || !Array.isArray(t) && !l.test(t) ? (console.warn("[EVUI][TimePicker] Please check the time format in the Timepicker."), !1) : !0;
13
- }
14
- },
15
- type: {
16
- type: String,
17
- default: "range"
18
- },
19
- clearable: {
20
- type: Boolean,
21
- default: !1
22
- },
23
- disabled: {
24
- type: Boolean,
25
- default: !1
26
- },
27
- readonly: {
28
- type: Boolean,
29
- default: !1
30
- },
31
- placeholder: {
32
- type: [String, Array],
33
- required: !1,
34
- default: void 0
35
- }
36
- },
37
- emits: {
38
- "update:modelValue": null,
39
- focus: null,
40
- blur: null,
41
- change: null
42
- },
43
- setup(t, { emit: l }) {
44
- const e = E({
45
- get: () => t.modelValue,
46
- set: (n) => {
47
- if (t.type === "range") {
48
- if (Array.isArray(n)) {
49
- const s = n[0] > n[1] ? "00:00" : n[0], h = s.value > n[1] ? "23:59" : n[1];
50
- l("update:modelValue", [s, h]);
51
- }
52
- } else
53
- l("update:modelValue", n);
54
- }
55
- }), a = E(() => {
56
- const n = ["start time", "end time"];
57
- return Array.isArray(t.placeholder) ? [
58
- typeof t.placeholder[0] == "string" ? t.placeholder[0] : n[0],
59
- typeof t.placeholder[1] == "string" ? t.placeholder[1] : n[1]
60
- ] : typeof t.placeholder == "string" ? [t.placeholder, t.placeholder] : n;
61
- }), o = I(
62
- Array.isArray(e.value) ? [`${e.value[0]}`, `${e.value[1]}`] : `${e.value}`
63
- ), d = S({
64
- single: !1,
65
- rangeStart: !1,
66
- rangeEnd: !1
67
- }), i = (n) => /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/.test(n), r = () => {
68
- Array.isArray(e.value) && (i(e.value[0]) || (e.value[0] = o.value[0]), e.value[1] && e.value[0] > e.value[1] && (e.value[0] = e.value[1]), o.value[0] = e.value[0]);
69
- }, k = () => {
70
- Array.isArray(e.value) && (i(e.value[1]) || (e.value[1] = o.value[1]), e.value[0] && e.value[0] > e.value[1] && (e.value[1] = o.value[1], e.value[0] > o.value[1] && (e.value[1] = e.value[0])), o.value[1] = e.value[1]);
71
- };
72
- return {
73
- time: e,
74
- isWrongType: d,
75
- previousValue: o,
76
- clearContents: () => {
77
- e.value = "", d.single = !0;
78
- },
79
- clearStartTime: () => {
80
- e.value[0] = "", d.rangeStart = !0;
81
- },
82
- clearEndTime: () => {
83
- e.value[1] = "", d.rangeEnd = !0;
84
- },
85
- focusInputTime: (n) => {
86
- l("focus", n);
87
- },
88
- blurInputTime: (n) => {
89
- l("blur", n);
90
- },
91
- changeTime: (n) => {
92
- i(e.value) ? o.value = e.value : e.value = o.value, d.single = !i(e.value), l("change", n, e.value);
93
- },
94
- focusInputStartTime: (n) => {
95
- l("focus", n);
96
- },
97
- blurInputStartTime: (n) => {
98
- l("blur", n);
99
- },
100
- changeStartTime: (n) => {
101
- r(), d.rangeStart = !1, l("change", n, e.value);
102
- },
103
- focusInputEndTime: (n) => {
104
- l("focus", n);
105
- },
106
- blurInputEndTime: (n) => {
107
- l("blur", n);
108
- },
109
- changeEndTime: (n) => {
110
- k(), d.rangeEnd = !1, l("change", n, e.value);
111
- },
112
- placeholders: a
113
- };
114
- }
115
- }, A = { class: "ev-time-picker" }, C = {
116
- key: 0,
117
- class: "ev-time-picker-range"
118
- }, B = ["disabled", "readonly", "placeholder"], w = ["disabled", "readonly", "placeholder"], P = {
119
- key: 1,
120
- class: "ev-time-picker-single"
121
- }, U = ["disabled", "readonly", "placeholder"];
122
- function W(t, l, e, a, o, d) {
123
- const i = p("ev-icon");
124
- return c(), m("div", A, [
125
- e.type === "range" ? (c(), m("div", C, [
126
- u("div", {
127
- class: v([{
128
- error: a.isWrongType.rangeStart,
129
- clearable: e.clearable,
130
- disabled: e.disabled,
131
- readonly: e.readonly
132
- }, "ev-time-picker-wrapper"])
133
- }, [
134
- f(u("input", {
135
- "onUpdate:modelValue": l[0] || (l[0] = (r) => a.time[0] = r),
136
- class: "ev-input",
137
- disabled: e.disabled,
138
- readonly: e.readonly,
139
- placeholder: a.placeholders[0],
140
- onFocus: l[1] || (l[1] = (...r) => a.focusInputStartTime && a.focusInputStartTime(...r)),
141
- onBlur: l[2] || (l[2] = (...r) => a.blurInputStartTime && a.blurInputStartTime(...r)),
142
- onChange: l[3] || (l[3] = (...r) => a.changeStartTime && a.changeStartTime(...r))
143
- }, null, 40, B), [
144
- [T, a.time[0]]
145
- ]),
146
- y(i, {
147
- icon: "ev-icon-time",
148
- class: "ev-input-prefix"
149
- }),
150
- e.clearable ? (c(), g(i, {
151
- key: 0,
152
- icon: "ev-icon-error",
153
- class: "ev-input-suffix",
154
- onClick: a.clearStartTime
155
- }, null, 8, ["onClick"])) : b("", !0)
156
- ], 2),
157
- l[12] || (l[12] = u("p", { class: "tilde" }, "~", -1)),
158
- u("div", {
159
- class: v([{
160
- error: a.isWrongType.rangeEnd,
161
- clearable: e.clearable,
162
- disabled: e.disabled,
163
- readonly: e.readonly
164
- }, "ev-time-picker-wrapper"])
165
- }, [
166
- f(u("input", {
167
- "onUpdate:modelValue": l[4] || (l[4] = (r) => a.time[1] = r),
168
- class: "ev-input",
169
- disabled: e.disabled,
170
- readonly: e.readonly,
171
- placeholder: a.placeholders[1],
172
- onFocus: l[5] || (l[5] = (...r) => a.focusInputEndTime && a.focusInputEndTime(...r)),
173
- onBlur: l[6] || (l[6] = (...r) => a.blurInputEndTime && a.blurInputEndTime(...r)),
174
- onChange: l[7] || (l[7] = (...r) => a.changeEndTime && a.changeEndTime(...r))
175
- }, null, 40, w), [
176
- [T, a.time[1]]
177
- ]),
178
- y(i, {
179
- icon: "ev-icon-time",
180
- class: "ev-input-prefix"
181
- }),
182
- e.clearable ? (c(), g(i, {
183
- key: 0,
184
- icon: "ev-icon-error",
185
- class: "ev-input-suffix",
186
- onClick: a.clearEndTime
187
- }, null, 8, ["onClick"])) : b("", !0)
188
- ], 2)
189
- ])) : (c(), m("div", P, [
190
- u("div", {
191
- class: v([{
192
- error: a.isWrongType.single,
193
- clearable: e.clearable,
194
- disabled: e.disabled,
195
- readonly: e.readonly
196
- }, "ev-time-picker-wrapper"])
197
- }, [
198
- f(u("input", {
199
- "onUpdate:modelValue": l[8] || (l[8] = (r) => a.time = r),
200
- class: "ev-input",
201
- disabled: e.disabled,
202
- readonly: e.readonly,
203
- placeholder: typeof e.placeholder == "string" ? e.placeholder : "Enter time",
204
- onFocus: l[9] || (l[9] = (...r) => a.focusInputTime && a.focusInputTime(...r)),
205
- onBlur: l[10] || (l[10] = (...r) => a.blurInputTime && a.blurInputTime(...r)),
206
- onChange: l[11] || (l[11] = (...r) => a.changeTime && a.changeTime(...r))
207
- }, null, 40, U), [
208
- [T, a.time]
209
- ]),
210
- y(i, {
211
- icon: "ev-icon-time",
212
- class: "ev-input-prefix"
213
- }),
214
- e.clearable ? (c(), g(i, {
215
- key: 0,
216
- icon: "ev-icon-error",
217
- class: "ev-input-suffix",
218
- onClick: a.clearContents
219
- }, null, 8, ["onClick"])) : b("", !0)
220
- ], 2)
221
- ]))
222
- ]);
223
- }
224
- const X = /* @__PURE__ */ x(V, [["render", W]]);
225
- export {
226
- X as default
227
- };
@@ -1,7 +0,0 @@
1
- import e from "./TimePicker.vue.js";
2
- e.install = (m) => {
3
- m.component(e.name, e);
4
- };
5
- export {
6
- e as default
7
- };