ep-craft 0.1.26 → 0.1.27
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/components/date-picker/src/date-picker.js +38 -34
- package/dist/components/date-picker/src/props.js +19 -7
- package/dist/components/form/src/types.d.ts +1 -1
- package/dist/components/scrollbar/index.d.ts +1 -0
- package/dist/components/scrollbar/src/util.d.ts +40 -0
- package/dist/components/scrollbar/src/util.js +25 -0
- package/dist/components/select/select.vue.d.ts +8 -8
- package/dist/components/select/src/useSelect.d.ts +2 -2
- package/dist/components/select-v2/index.d.ts +6 -2
- package/dist/components/select-v2/index.js +7 -4
- package/dist/components/select-v2/src/defaults.d.ts +258 -0
- package/dist/components/select-v2/src/defaults.js +359 -0
- package/dist/components/select-v2/src/group-item.vue.d.ts +40 -0
- package/dist/components/select-v2/src/group-item.vue.js +13 -0
- package/dist/components/select-v2/src/group-item2.vue.js +33 -0
- package/dist/components/select-v2/src/option-item.vue.d.ts +66 -0
- package/dist/components/select-v2/src/option-item.vue.js +37 -0
- package/dist/components/select-v2/src/option-item2.vue.js +46 -0
- package/dist/components/select-v2/src/select-dropdown.d.ts +53 -0
- package/dist/components/select-v2/src/select-dropdown.js +209 -0
- package/dist/components/select-v2/src/select.types.d.ts +2 -1
- package/dist/components/select-v2/src/select.vue.d.ts +918 -0
- package/dist/components/select-v2/src/select.vue.js +388 -0
- package/dist/components/select-v2/src/select2.vue.js +86 -0
- package/dist/components/select-v2/src/token.d.ts +16 -0
- package/dist/components/select-v2/src/token.js +6 -0
- package/dist/components/select-v2/src/useAllowCreate.d.ts +8 -0
- package/dist/components/select-v2/src/useAllowCreate.js +64 -0
- package/dist/components/select-v2/src/useOption.d.ts +7 -0
- package/dist/components/select-v2/src/useOption.js +13 -0
- package/dist/components/select-v2/src/useProps.d.ts +2 -3
- package/dist/components/select-v2/src/useSelect.d.ts +129 -0
- package/dist/components/select-v2/src/useSelect.js +501 -0
- package/dist/components/time-picker/index.js +10 -11
- package/dist/components/time-picker/src/common/picker.vue.d.ts +131 -125
- package/dist/components/time-picker/src/common/picker.vue.js +163 -160
- package/dist/components/time-picker/src/common/props.d.ts +0 -1
- package/dist/components/time-picker/src/common/props.js +13 -14
- package/dist/components/time-picker/src/time-picker.d.ts +0 -3
- package/dist/components/virtual-list/index.d.ts +8 -0
- package/dist/components/virtual-list/src/builders/build-list.d.ts +187 -0
- package/dist/components/virtual-list/src/builders/build-list.js +363 -0
- package/dist/components/virtual-list/src/components/dynamic-size-list.d.ts +186 -0
- package/dist/components/virtual-list/src/components/dynamic-size-list.js +112 -0
- package/dist/components/virtual-list/src/components/fixed-size-list.d.ts +185 -0
- package/dist/components/virtual-list/src/components/fixed-size-list.js +68 -0
- package/dist/components/virtual-list/src/components/scrollbar.d.ts +79 -0
- package/dist/components/virtual-list/src/components/scrollbar.js +134 -0
- package/dist/components/virtual-list/src/defaults.d.ts +27 -0
- package/dist/components/virtual-list/src/defaults.js +26 -0
- package/dist/components/virtual-list/src/hooks/use-cache.d.ts +1 -0
- package/dist/components/virtual-list/src/hooks/use-cache.js +13 -0
- package/dist/components/virtual-list/src/hooks/use-wheel.d.ts +13 -0
- package/dist/components/virtual-list/src/hooks/use-wheel.js +26 -0
- package/dist/components/virtual-list/src/props.d.ts +211 -0
- package/dist/components/virtual-list/src/props.js +151 -0
- package/dist/components/virtual-list/src/types.d.ts +152 -0
- package/dist/components/virtual-list/src/utils.d.ts +16 -0
- package/dist/components/virtual-list/src/utils.js +22 -0
- package/dist/hooks/use-float-label/index.d.ts +6 -2
- package/dist/hooks/use-float-label/index.js +11 -7
- package/dist/index.css +1 -1
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +1 -0
- package/package.json +2 -1
- package/theme-chalk/src/float-label.scss +57 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as He, useAttrs as Ge, inject as Qe, ref as K, computed as u, toRef as Xe, watch as Ze, nextTick as
|
|
1
|
+
import { defineComponent as He, useAttrs as Ge, inject as Qe, ref as K, computed as u, toRef as Xe, watch as Ze, nextTick as ae, unref as l, onBeforeUnmount as xe, provide as ye, openBlock as i, createBlock as d, mergeProps as _e, withCtx as p, renderSlot as ge, withModifiers as V, normalizeStyle as ke, normalizeClass as h, createElementBlock as ea, toDisplayString as Pe, createCommentVNode as F, resolveDynamicComponent as $, createElementVNode as aa } from "vue";
|
|
2
2
|
import { onClickOutside as la, unrefElement as oa } from "@vueuse/core";
|
|
3
|
-
import { useNamespace as
|
|
4
|
-
import { NOOP as
|
|
3
|
+
import { useNamespace as le } from "../../../../hooks/use-namespace/index.js";
|
|
4
|
+
import { NOOP as A, isArray as oe } from "@vue/shared";
|
|
5
5
|
import "lodash-unified";
|
|
6
6
|
import { getEventCode as na } from "../../../../utils/dom/event.js";
|
|
7
7
|
import { Clock as ta, Calendar as ra } from "@element-plus/icons-vue";
|
|
8
|
-
import { EVENT_CODE as
|
|
9
|
-
import { UPDATE_MODEL_EVENT as sa, CHANGE_EVENT as
|
|
8
|
+
import { EVENT_CODE as N } from "../../../../constants/aria.js";
|
|
9
|
+
import { UPDATE_MODEL_EVENT as sa, CHANGE_EVENT as Ce } from "../../../../constants/event.js";
|
|
10
10
|
import "../../../../hooks/use-size/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../../../hooks/use-z-index/index.js";
|
|
@@ -15,25 +15,28 @@ import "../../../../hooks/use-aria/index.js";
|
|
|
15
15
|
import "../../../../hooks/use-model-toggle/index.js";
|
|
16
16
|
import { useEmptyValues as ua } from "../../../../hooks/use-empty-values/index.js";
|
|
17
17
|
import { useFocusController as ia } from "../../../../hooks/use-focus-controller/index.js";
|
|
18
|
-
import {
|
|
18
|
+
import { floatLabelProp as pa, useFloatLabel as ca } from "../../../../hooks/use-float-label/index.js";
|
|
19
19
|
import "../../../form/index.js";
|
|
20
|
-
import { EpInput as
|
|
21
|
-
import { EpIcon as
|
|
22
|
-
import { EpTooltip as
|
|
23
|
-
import { valueEquals as
|
|
24
|
-
import { PICKER_POPPER_OPTIONS_INJECTION_KEY as
|
|
25
|
-
import { useCommonPicker as
|
|
26
|
-
import { timePickerDefaultProps as
|
|
27
|
-
import
|
|
28
|
-
import { useFormItem as
|
|
29
|
-
import { useFormDisabled as
|
|
20
|
+
import { EpInput as da } from "../../../input/index.js";
|
|
21
|
+
import { EpIcon as z } from "../../../icon/index.js";
|
|
22
|
+
import { EpTooltip as fa } from "../../../tooltip/index.js";
|
|
23
|
+
import { valueEquals as va, dayOrDaysToDate as ne } from "../utils.js";
|
|
24
|
+
import { PICKER_POPPER_OPTIONS_INJECTION_KEY as ma, PICKER_BASE_INJECTION_KEY as ba, ROOT_COMMON_PICKER_INJECTION_KEY as ha } from "../constants.js";
|
|
25
|
+
import { useCommonPicker as ya } from "../composables/use-common-picker.js";
|
|
26
|
+
import { timePickerDefaultProps as ga } from "./props.js";
|
|
27
|
+
import ka from "./picker-range-trigger.vue.js";
|
|
28
|
+
import { useFormItem as Pa } from "../../../form/src/hooks/use-form-item.js";
|
|
29
|
+
import { useFormDisabled as Ca, useFormSize as Ea } from "../../../form/src/hooks/use-form-common-props.js";
|
|
30
30
|
const _a = /* @__PURE__ */ He({
|
|
31
31
|
name: "Picker",
|
|
32
32
|
__name: "picker",
|
|
33
|
-
props:
|
|
33
|
+
props: {
|
|
34
|
+
...ga,
|
|
35
|
+
floatLabelEnabled: pa.floatLabel
|
|
36
|
+
},
|
|
34
37
|
emits: [
|
|
35
38
|
sa,
|
|
36
|
-
|
|
39
|
+
Ce,
|
|
37
40
|
"focus",
|
|
38
41
|
"blur",
|
|
39
42
|
"clear",
|
|
@@ -42,25 +45,25 @@ const _a = /* @__PURE__ */ He({
|
|
|
42
45
|
"visible-change",
|
|
43
46
|
"keydown"
|
|
44
47
|
],
|
|
45
|
-
setup(
|
|
46
|
-
const o =
|
|
47
|
-
|
|
48
|
+
setup(C, { expose: Ee, emit: we }) {
|
|
49
|
+
const o = C, g = we, Ie = Ge(), f = le("date"), E = le("input"), k = le("range"), { formItem: v } = Pa(), Oe = Qe(
|
|
50
|
+
ma,
|
|
48
51
|
{}
|
|
49
|
-
),
|
|
50
|
-
let
|
|
51
|
-
const c =
|
|
52
|
-
parsedValue:
|
|
53
|
-
pickerActualVisible:
|
|
52
|
+
), w = ua(o, null), U = K(), b = K(), J = K(null);
|
|
53
|
+
let Y = !1;
|
|
54
|
+
const c = Ca(), te = ya(o, g), {
|
|
55
|
+
parsedValue: S,
|
|
56
|
+
pickerActualVisible: j,
|
|
54
57
|
userInput: n,
|
|
55
58
|
pickerVisible: r,
|
|
56
59
|
pickerOptions: m,
|
|
57
60
|
valueIsEmpty: y,
|
|
58
|
-
emitInput:
|
|
59
|
-
onPick:
|
|
60
|
-
onSetPickerOption:
|
|
61
|
-
onCalendarChange:
|
|
62
|
-
onPanelChange:
|
|
63
|
-
} =
|
|
61
|
+
emitInput: I,
|
|
62
|
+
onPick: W,
|
|
63
|
+
onSetPickerOption: re,
|
|
64
|
+
onCalendarChange: se,
|
|
65
|
+
onPanelChange: ue
|
|
66
|
+
} = te, { isFocused: T, handleFocus: ie, handleBlur: pe } = ia(b, {
|
|
64
67
|
disabled: c,
|
|
65
68
|
beforeFocus() {
|
|
66
69
|
return o.readonly;
|
|
@@ -70,41 +73,41 @@ const _a = /* @__PURE__ */ He({
|
|
|
70
73
|
},
|
|
71
74
|
beforeBlur(e) {
|
|
72
75
|
var a;
|
|
73
|
-
return !
|
|
76
|
+
return !Y && ((a = U.value) == null ? void 0 : a.isFocusInsideContent(e));
|
|
74
77
|
},
|
|
75
78
|
afterBlur() {
|
|
76
79
|
var e, a, t, s;
|
|
77
|
-
|
|
80
|
+
D.value && !o.saveOnBlur ? y.value || (a = (e = m.value).handleCancel) == null || a.call(e) : _(), r.value = !1, Y = !1, o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "blur")) == null || s.catch(A));
|
|
78
81
|
}
|
|
79
|
-
}), { floatLabelClass: Ve } =
|
|
80
|
-
floatLabel: Xe(o, "
|
|
81
|
-
isFocused: u(() => r.value ||
|
|
82
|
+
}), { floatLabelClass: Ve } = ca({
|
|
83
|
+
floatLabel: Xe(o, "floatLabelEnabled"),
|
|
84
|
+
isFocused: u(() => r.value || T.value),
|
|
82
85
|
hasValue: u(() => !y.value),
|
|
83
86
|
isDisabled: c
|
|
84
|
-
}),
|
|
87
|
+
}), q = K(!1), Fe = u(() => [
|
|
85
88
|
f.b("editor"),
|
|
86
89
|
f.bm("editor", o.type),
|
|
87
|
-
|
|
90
|
+
E.e("wrapper"),
|
|
88
91
|
f.is("disabled", c.value),
|
|
89
92
|
f.is("active", r.value),
|
|
90
93
|
k.b("editor"),
|
|
91
|
-
|
|
94
|
+
Z ? k.bm("editor", Z.value) : "",
|
|
92
95
|
Ie.class
|
|
93
96
|
]), Ne = u(() => [
|
|
94
|
-
|
|
97
|
+
E.e("icon"),
|
|
95
98
|
k.e("close-icon"),
|
|
96
|
-
|
|
99
|
+
G.value ? "" : k.em("close-icon", "hidden")
|
|
97
100
|
]);
|
|
98
101
|
Ze(r, (e) => {
|
|
99
|
-
e ?
|
|
100
|
-
e && (
|
|
101
|
-
}) : (n.value = null,
|
|
102
|
-
|
|
102
|
+
e ? ae(() => {
|
|
103
|
+
e && (J.value = o.modelValue);
|
|
104
|
+
}) : (n.value = null, ae(() => {
|
|
105
|
+
H(o.modelValue);
|
|
103
106
|
}));
|
|
104
107
|
});
|
|
105
|
-
const
|
|
108
|
+
const H = (e, a) => {
|
|
106
109
|
var t, s;
|
|
107
|
-
(a || !
|
|
110
|
+
(a || !va(e, J.value)) && (g(Ce, e), a && (J.value = e), o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "change")) == null || s.catch(A)));
|
|
108
111
|
}, Se = (e) => {
|
|
109
112
|
g("keydown", e);
|
|
110
113
|
}, Te = u(() => b.value ? Array.from(
|
|
@@ -113,75 +116,75 @@ const _a = /* @__PURE__ */ He({
|
|
|
113
116
|
const s = Te.value;
|
|
114
117
|
s.length && (!t || t === "min" ? (s[0].setSelectionRange(e, a), s[0].focus()) : t === "max" && (s[1].setSelectionRange(e, a), s[1].focus()));
|
|
115
118
|
}, Me = () => {
|
|
116
|
-
|
|
119
|
+
j.value = !0;
|
|
117
120
|
}, Re = () => {
|
|
118
121
|
g("visible-change", !0);
|
|
119
|
-
},
|
|
120
|
-
|
|
122
|
+
}, ce = () => {
|
|
123
|
+
j.value = !1, r.value = !1, g("visible-change", !1);
|
|
121
124
|
}, Be = () => {
|
|
122
125
|
r.value = !0;
|
|
123
|
-
},
|
|
126
|
+
}, Le = () => {
|
|
124
127
|
r.value = !1;
|
|
125
128
|
}, P = u(() => {
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
129
|
+
const e = ee(S.value);
|
|
130
|
+
return oe(n.value) ? [
|
|
128
131
|
n.value[0] ?? (e && e[0]) ?? "",
|
|
129
132
|
n.value[1] ?? (e && e[1]) ?? ""
|
|
130
|
-
] : n.value !== null ? n.value :
|
|
131
|
-
}),
|
|
132
|
-
() => o.prefixIcon || (
|
|
133
|
-
),
|
|
134
|
-
() => o.clearable && !c.value && !o.readonly && !y.value && (
|
|
135
|
-
),
|
|
136
|
-
o.readonly || c.value || (
|
|
137
|
-
},
|
|
133
|
+
] : n.value !== null ? n.value : D.value && y.value && !o.saveOnBlur || !D.value && y.value || !r.value && y.value ? "" : e ? de.value || fe.value || ve.value ? e.join(", ") : e : "";
|
|
134
|
+
}), Ke = u(() => o.type.includes("time")), D = u(() => o.type.startsWith("time")), de = u(() => o.type === "dates"), fe = u(() => o.type === "months"), ve = u(() => o.type === "years"), M = u(
|
|
135
|
+
() => o.prefixIcon || (Ke.value ? ta : ra)
|
|
136
|
+
), G = u(
|
|
137
|
+
() => o.clearable && !c.value && !o.readonly && !y.value && (q.value || T.value)
|
|
138
|
+
), Q = (e) => {
|
|
139
|
+
o.readonly || c.value || (G.value && (e == null || e.stopPropagation(), m.value.handleClear ? m.value.handleClear() : I(w.valueOnClear.value), H(w.valueOnClear.value, !0), ce()), g("clear"));
|
|
140
|
+
}, R = async (e) => {
|
|
138
141
|
var a;
|
|
139
|
-
o.readonly || c.value || (((a = e.target) == null ? void 0 : a.tagName) !== "INPUT" ||
|
|
140
|
-
}, ve = () => {
|
|
141
|
-
o.readonly || c.value || !y.value && o.clearable && (W.value = !0);
|
|
142
|
+
o.readonly || c.value || (((a = e.target) == null ? void 0 : a.tagName) !== "INPUT" || T.value || !o.automaticDropdown) && (r.value = !0);
|
|
142
143
|
}, me = () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
144
|
+
o.readonly || c.value || !y.value && o.clearable && (q.value = !0);
|
|
145
|
+
}, be = () => {
|
|
146
|
+
q.value = !1;
|
|
147
|
+
}, X = (e) => {
|
|
145
148
|
var a;
|
|
146
|
-
o.readonly || c.value || (((a = e.touches[0].target) == null ? void 0 : a.tagName) !== "INPUT" ||
|
|
147
|
-
}, $e = u(() => o.type.includes("range")),
|
|
149
|
+
o.readonly || c.value || (((a = e.touches[0].target) == null ? void 0 : a.tagName) !== "INPUT" || T.value || !o.automaticDropdown) && (r.value = !0);
|
|
150
|
+
}, $e = u(() => o.type.includes("range")), Z = Ea(), Ae = u(() => {
|
|
148
151
|
var e, a;
|
|
149
|
-
return (a = (e = l(
|
|
150
|
-
}),
|
|
152
|
+
return (a = (e = l(U)) == null ? void 0 : e.popperRef) == null ? void 0 : a.contentRef;
|
|
153
|
+
}), x = la(
|
|
151
154
|
b,
|
|
152
155
|
(e) => {
|
|
153
156
|
const a = l(Ae), t = oa(b);
|
|
154
157
|
a && (e.target === a || e.composedPath().includes(a)) || e.target === t || t && e.composedPath().includes(t) || (r.value = !1);
|
|
155
158
|
}
|
|
156
159
|
);
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
xe(() => {
|
|
161
|
+
x == null || x();
|
|
159
162
|
});
|
|
160
163
|
const _ = () => {
|
|
161
|
-
if (
|
|
162
|
-
const e =
|
|
164
|
+
if (D.value && !o.saveOnBlur) return;
|
|
165
|
+
const e = oe(n.value) && n.value.every((a) => a === "");
|
|
163
166
|
if (n.value && !e) {
|
|
164
|
-
const a =
|
|
165
|
-
a && (
|
|
167
|
+
const a = B(P.value);
|
|
168
|
+
a && (L(a) && I(ne(a)), n.value = null);
|
|
166
169
|
}
|
|
167
|
-
(n.value === "" || e) && (w
|
|
168
|
-
},
|
|
170
|
+
(n.value === "" || e) && (I(w.valueOnClear.value), H(w.valueOnClear.value, !0), n.value = null);
|
|
171
|
+
}, B = (e) => e ? m.value.parseUserInput(e) : null, ee = (e) => e ? oe(e) ? e.map((t) => t.format(o.format)) : e.format(o.format) : null, L = (e) => m.value.isValidValue(e), he = async (e) => {
|
|
169
172
|
if (o.readonly || c.value) return;
|
|
170
173
|
const a = na(e);
|
|
171
|
-
if (Se(e), a ===
|
|
174
|
+
if (Se(e), a === N.esc) {
|
|
172
175
|
r.value === !0 && (r.value = !1, e.preventDefault(), e.stopPropagation());
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
|
-
if (a ===
|
|
178
|
+
if (a === N.down && (m.value.handleFocusPicker && (e.preventDefault(), e.stopPropagation()), r.value === !1 && (r.value = !0, await ae()), m.value.handleFocusPicker)) {
|
|
176
179
|
m.value.handleFocusPicker();
|
|
177
180
|
return;
|
|
178
181
|
}
|
|
179
|
-
if (a ===
|
|
180
|
-
|
|
182
|
+
if (a === N.tab) {
|
|
183
|
+
Y = !0;
|
|
181
184
|
return;
|
|
182
185
|
}
|
|
183
|
-
if (a ===
|
|
184
|
-
r.value ? (n.value === null || n.value === "" || B(
|
|
186
|
+
if (a === N.enter || a === N.numpadEnter) {
|
|
187
|
+
r.value ? (n.value === null || n.value === "" || L(B(P.value))) && (_(), r.value = !1) : r.value = !0, e.preventDefault(), e.stopPropagation();
|
|
185
188
|
return;
|
|
186
189
|
}
|
|
187
190
|
if (n.value) {
|
|
@@ -199,25 +202,25 @@ const _a = /* @__PURE__ */ He({
|
|
|
199
202
|
n.value ? n.value = [n.value[0], a.value] : n.value = [null, a.value];
|
|
200
203
|
}, Ye = () => {
|
|
201
204
|
var s;
|
|
202
|
-
const e = n.value, a =
|
|
205
|
+
const e = n.value, a = B(e && e[0]), t = l(S);
|
|
203
206
|
if (a && a.isValid()) {
|
|
204
207
|
n.value = [
|
|
205
|
-
|
|
208
|
+
ee(a),
|
|
206
209
|
((s = P.value) == null ? void 0 : s[1]) || null
|
|
207
210
|
];
|
|
208
|
-
const
|
|
209
|
-
|
|
211
|
+
const O = [a, t && (t[1] || null)];
|
|
212
|
+
L(O) && (I(ne(O)), n.value = null);
|
|
210
213
|
}
|
|
211
214
|
}, je = () => {
|
|
212
215
|
var s;
|
|
213
|
-
const e = l(n), a =
|
|
216
|
+
const e = l(n), a = B(e && e[1]), t = l(S);
|
|
214
217
|
if (a && a.isValid()) {
|
|
215
218
|
n.value = [
|
|
216
219
|
((s = l(P)) == null ? void 0 : s[0]) || null,
|
|
217
|
-
|
|
220
|
+
ee(a)
|
|
218
221
|
];
|
|
219
|
-
const
|
|
220
|
-
|
|
222
|
+
const O = [t && t[0], a];
|
|
223
|
+
L(O) && (I(ne(O)), n.value = null);
|
|
221
224
|
}
|
|
222
225
|
}, We = () => {
|
|
223
226
|
var e;
|
|
@@ -226,10 +229,10 @@ const _a = /* @__PURE__ */ He({
|
|
|
226
229
|
var e;
|
|
227
230
|
(e = b.value) == null || e.blur();
|
|
228
231
|
};
|
|
229
|
-
return
|
|
232
|
+
return ye(ba, {
|
|
230
233
|
props: o,
|
|
231
|
-
emptyValues:
|
|
232
|
-
}),
|
|
234
|
+
emptyValues: w
|
|
235
|
+
}), ye(ha, te), Ee({
|
|
233
236
|
/**
|
|
234
237
|
* @description focus input box.
|
|
235
238
|
*/
|
|
@@ -245,14 +248,14 @@ const _a = /* @__PURE__ */ He({
|
|
|
245
248
|
/**
|
|
246
249
|
* @description closes picker
|
|
247
250
|
*/
|
|
248
|
-
handleClose:
|
|
251
|
+
handleClose: Le,
|
|
249
252
|
/**
|
|
250
253
|
* @description pick item manually
|
|
251
254
|
*/
|
|
252
|
-
onPick:
|
|
253
|
-
}), (e, a) => (i(), d(l(
|
|
255
|
+
onPick: W
|
|
256
|
+
}), (e, a) => (i(), d(l(fa), _e({
|
|
254
257
|
ref_key: "refPopper",
|
|
255
|
-
ref:
|
|
258
|
+
ref: U,
|
|
256
259
|
visible: l(r),
|
|
257
260
|
effect: "light",
|
|
258
261
|
pure: "",
|
|
@@ -272,10 +275,10 @@ const _a = /* @__PURE__ */ He({
|
|
|
272
275
|
persistent: "",
|
|
273
276
|
onBeforeShow: Me,
|
|
274
277
|
onShow: Re,
|
|
275
|
-
onHide:
|
|
278
|
+
onHide: ce
|
|
276
279
|
}), {
|
|
277
280
|
default: p(() => [
|
|
278
|
-
$e.value ? (i(), d(
|
|
281
|
+
$e.value ? (i(), d(ka, {
|
|
279
282
|
key: 1,
|
|
280
283
|
id: (
|
|
281
284
|
// https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
|
|
@@ -293,59 +296,59 @@ const _a = /* @__PURE__ */ He({
|
|
|
293
296
|
"start-placeholder": e.startPlaceholder,
|
|
294
297
|
"end-placeholder": e.endPlaceholder,
|
|
295
298
|
placeholder: e.placeholder,
|
|
296
|
-
"float-label":
|
|
299
|
+
"float-label": C.floatLabelEnabled,
|
|
297
300
|
class: h(Fe.value),
|
|
298
|
-
style:
|
|
301
|
+
style: ke(e.$attrs.style),
|
|
299
302
|
"aria-label": e.ariaLabel,
|
|
300
303
|
tabindex: e.tabindex,
|
|
301
304
|
autocomplete: "off",
|
|
302
305
|
role: "combobox",
|
|
303
|
-
onClick:
|
|
304
|
-
onFocus: l(
|
|
305
|
-
onBlur: l(
|
|
306
|
+
onClick: R,
|
|
307
|
+
onFocus: l(ie),
|
|
308
|
+
onBlur: l(pe),
|
|
306
309
|
onStartInput: Ue,
|
|
307
310
|
onStartChange: Ye,
|
|
308
311
|
onEndInput: Je,
|
|
309
312
|
onEndChange: je,
|
|
310
|
-
onMousedown:
|
|
311
|
-
onMouseenter:
|
|
312
|
-
onMouseleave:
|
|
313
|
-
onTouchstartPassive:
|
|
314
|
-
onKeydown:
|
|
313
|
+
onMousedown: R,
|
|
314
|
+
onMouseenter: me,
|
|
315
|
+
onMouseleave: be,
|
|
316
|
+
onTouchstartPassive: X,
|
|
317
|
+
onKeydown: he
|
|
315
318
|
}, {
|
|
316
319
|
prefix: p(() => [
|
|
317
|
-
|
|
320
|
+
M.value ? (i(), d(l(z), {
|
|
318
321
|
key: 0,
|
|
319
|
-
class: h([l(
|
|
322
|
+
class: h([l(E).e("icon"), l(k).e("icon")])
|
|
320
323
|
}, {
|
|
321
324
|
default: p(() => [
|
|
322
|
-
(i(), d(
|
|
325
|
+
(i(), d($(M.value)))
|
|
323
326
|
]),
|
|
324
327
|
_: 1
|
|
325
|
-
}, 8, ["class"])) :
|
|
328
|
+
}, 8, ["class"])) : F("", !0)
|
|
326
329
|
]),
|
|
327
330
|
"range-separator": p(() => [
|
|
328
|
-
|
|
331
|
+
ge(e.$slots, "range-separator", {}, () => [
|
|
329
332
|
aa("span", {
|
|
330
333
|
class: h(l(k).b("separator"))
|
|
331
|
-
},
|
|
334
|
+
}, Pe(e.rangeSeparator), 3)
|
|
332
335
|
])
|
|
333
336
|
]),
|
|
334
337
|
suffix: p(() => [
|
|
335
|
-
e.clearIcon ? (i(), d(l(
|
|
338
|
+
e.clearIcon ? (i(), d(l(z), {
|
|
336
339
|
key: 0,
|
|
337
340
|
class: h(Ne.value),
|
|
338
|
-
onMousedown:
|
|
339
|
-
onClick:
|
|
341
|
+
onMousedown: V(l(A), ["prevent"]),
|
|
342
|
+
onClick: Q
|
|
340
343
|
}, {
|
|
341
344
|
default: p(() => [
|
|
342
|
-
(i(), d(
|
|
345
|
+
(i(), d($(e.clearIcon)))
|
|
343
346
|
]),
|
|
344
347
|
_: 1
|
|
345
|
-
}, 8, ["class", "onMousedown"])) :
|
|
348
|
+
}, 8, ["class", "onMousedown"])) : F("", !0)
|
|
346
349
|
]),
|
|
347
350
|
_: 3
|
|
348
|
-
}, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "placeholder", "float-label", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"])) : (i(), d(l(
|
|
351
|
+
}, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "placeholder", "float-label", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"])) : (i(), d(l(da), {
|
|
349
352
|
key: 0,
|
|
350
353
|
id: (
|
|
351
354
|
// https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
|
|
@@ -362,73 +365,73 @@ const _a = /* @__PURE__ */ He({
|
|
|
362
365
|
// https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
|
|
363
366
|
e.name
|
|
364
367
|
),
|
|
365
|
-
size: l(
|
|
368
|
+
size: l(Z),
|
|
366
369
|
disabled: l(c),
|
|
367
|
-
placeholder:
|
|
370
|
+
placeholder: C.floatLabelEnabled ? void 0 : e.placeholder,
|
|
368
371
|
class: h([
|
|
369
372
|
l(f).b("editor"),
|
|
370
373
|
l(f).bm("editor", e.type),
|
|
371
374
|
l(f).is("focus", l(r)),
|
|
372
|
-
l(f).is("float-label",
|
|
375
|
+
l(f).is("float-label", C.floatLabelEnabled),
|
|
373
376
|
e.$attrs.class
|
|
374
377
|
]),
|
|
375
|
-
style:
|
|
376
|
-
readonly: !e.editable || e.readonly ||
|
|
378
|
+
style: ke(e.$attrs.style),
|
|
379
|
+
readonly: !e.editable || e.readonly || de.value || fe.value || ve.value || e.type === "week",
|
|
377
380
|
"aria-label": e.ariaLabel,
|
|
378
381
|
tabindex: e.tabindex,
|
|
379
382
|
"validate-event": !1,
|
|
380
383
|
onInput: ze,
|
|
381
|
-
onFocus: l(
|
|
382
|
-
onBlur: l(
|
|
383
|
-
onKeydown:
|
|
384
|
+
onFocus: l(ie),
|
|
385
|
+
onBlur: l(pe),
|
|
386
|
+
onKeydown: he,
|
|
384
387
|
onChange: _,
|
|
385
|
-
onMousedown:
|
|
386
|
-
onMouseenter:
|
|
387
|
-
onMouseleave:
|
|
388
|
-
onTouchstartPassive:
|
|
389
|
-
onClick: a[0] || (a[0] =
|
|
388
|
+
onMousedown: R,
|
|
389
|
+
onMouseenter: me,
|
|
390
|
+
onMouseleave: be,
|
|
391
|
+
onTouchstartPassive: X,
|
|
392
|
+
onClick: a[0] || (a[0] = V(() => {
|
|
390
393
|
}, ["stop"]))
|
|
391
394
|
}, {
|
|
392
395
|
prefix: p(() => [
|
|
393
|
-
|
|
396
|
+
M.value ? (i(), d(l(z), {
|
|
394
397
|
key: 0,
|
|
395
|
-
class: h(l(
|
|
396
|
-
onMousedown:
|
|
397
|
-
onTouchstartPassive:
|
|
398
|
+
class: h(l(E).e("icon")),
|
|
399
|
+
onMousedown: V(R, ["prevent"]),
|
|
400
|
+
onTouchstartPassive: X
|
|
398
401
|
}, {
|
|
399
402
|
default: p(() => [
|
|
400
|
-
(i(), d(
|
|
403
|
+
(i(), d($(M.value)))
|
|
401
404
|
]),
|
|
402
405
|
_: 1
|
|
403
|
-
}, 8, ["class"])) :
|
|
406
|
+
}, 8, ["class"])) : F("", !0)
|
|
404
407
|
]),
|
|
405
408
|
suffix: p(() => [
|
|
406
|
-
|
|
409
|
+
G.value && e.clearIcon ? (i(), d(l(z), {
|
|
407
410
|
key: 0,
|
|
408
|
-
class: h(`${l(
|
|
409
|
-
onMousedown:
|
|
410
|
-
onClick:
|
|
411
|
+
class: h(`${l(E).e("icon")} clear-icon`),
|
|
412
|
+
onMousedown: V(l(A), ["prevent"]),
|
|
413
|
+
onClick: Q
|
|
411
414
|
}, {
|
|
412
415
|
default: p(() => [
|
|
413
|
-
(i(), d(
|
|
416
|
+
(i(), d($(e.clearIcon)))
|
|
414
417
|
]),
|
|
415
418
|
_: 1
|
|
416
|
-
}, 8, ["class", "onMousedown"])) :
|
|
419
|
+
}, 8, ["class", "onMousedown"])) : F("", !0)
|
|
417
420
|
]),
|
|
418
421
|
default: p(() => [
|
|
419
|
-
|
|
422
|
+
C.floatLabelEnabled ? (i(), ea("span", {
|
|
420
423
|
key: 0,
|
|
421
424
|
class: h(["el-float-label", l(Ve)])
|
|
422
|
-
},
|
|
425
|
+
}, Pe(e.placeholder), 3)) : F("", !0)
|
|
423
426
|
]),
|
|
424
427
|
_: 1
|
|
425
428
|
}, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "aria-label", "tabindex", "onFocus", "onBlur"]))
|
|
426
429
|
]),
|
|
427
430
|
content: p(() => [
|
|
428
|
-
|
|
431
|
+
ge(e.$slots, "default", {
|
|
429
432
|
visible: l(r),
|
|
430
|
-
actualVisible: l(
|
|
431
|
-
parsedValue: l(
|
|
433
|
+
actualVisible: l(j),
|
|
434
|
+
parsedValue: l(S),
|
|
432
435
|
format: e.format,
|
|
433
436
|
dateFormat: e.dateFormat,
|
|
434
437
|
timeFormat: e.timeFormat,
|
|
@@ -441,16 +444,16 @@ const _a = /* @__PURE__ */ He({
|
|
|
441
444
|
showWeekNumber: e.showWeekNumber,
|
|
442
445
|
singlePanel: e.singlePanel,
|
|
443
446
|
onPick: a[1] || (a[1] = //@ts-ignore
|
|
444
|
-
(...t) => l(
|
|
447
|
+
(...t) => l(W) && l(W)(...t)),
|
|
445
448
|
onSelectRange: De,
|
|
446
449
|
onSetPickerOption: a[2] || (a[2] = //@ts-ignore
|
|
447
|
-
(...t) => l(te) && l(te)(...t)),
|
|
448
|
-
onCalendarChange: a[3] || (a[3] = //@ts-ignore
|
|
449
450
|
(...t) => l(re) && l(re)(...t)),
|
|
450
|
-
|
|
451
|
-
onPanelChange: a[4] || (a[4] = //@ts-ignore
|
|
451
|
+
onCalendarChange: a[3] || (a[3] = //@ts-ignore
|
|
452
452
|
(...t) => l(se) && l(se)(...t)),
|
|
453
|
-
|
|
453
|
+
onClear: Q,
|
|
454
|
+
onPanelChange: a[4] || (a[4] = //@ts-ignore
|
|
455
|
+
(...t) => l(ue) && l(ue)(...t)),
|
|
456
|
+
onMousedown: a[5] || (a[5] = V(() => {
|
|
454
457
|
}, ["stop"]))
|
|
455
458
|
})
|
|
456
459
|
]),
|
|
@@ -12,7 +12,6 @@ export type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]
|
|
|
12
12
|
export type GetDisabledMinutes = (hour: number, role: string, comparingDate?: Dayjs) => number[];
|
|
13
13
|
export type GetDisabledSeconds = (hour: number, minute: number, role: string, comparingDate?: Dayjs) => number[];
|
|
14
14
|
export declare const timePickerDefaultProps: {
|
|
15
|
-
readonly floatLabel: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
16
15
|
readonly showNow: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
17
16
|
readonly showConfirm: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
18
17
|
readonly showFooter: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { placements as
|
|
1
|
+
import { placements as o } from "@popperjs/core";
|
|
2
2
|
import "@vue/shared";
|
|
3
3
|
import "lodash-unified";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { CircleClose as
|
|
5
|
+
import { CircleClose as a } from "@element-plus/icons-vue";
|
|
6
6
|
import { buildProps as r, definePropType as e } from "../../../../utils/vue/props/runtime.js";
|
|
7
7
|
import "vue";
|
|
8
|
-
import { useSizeProp as
|
|
8
|
+
import { useSizeProp as l } from "../../../../hooks/use-size/index.js";
|
|
9
9
|
import "../../../../hooks/use-z-index/index.js";
|
|
10
10
|
import "../../../../hooks/use-delayed-toggle/index.js";
|
|
11
|
-
import { useAriaProps as
|
|
11
|
+
import { useAriaProps as p } from "../../../../hooks/use-aria/index.js";
|
|
12
12
|
import "../../../../hooks/use-model-toggle/index.js";
|
|
13
|
-
import { useEmptyValuesProps as
|
|
14
|
-
import { floatLabelProp as
|
|
13
|
+
import { useEmptyValuesProps as i } from "../../../../hooks/use-empty-values/index.js";
|
|
14
|
+
import { floatLabelProp as n } from "../../../../hooks/use-float-label/index.js";
|
|
15
15
|
import "../../../tooltip/index.js";
|
|
16
16
|
import { disabledTimeListsProps as d } from "../props/shared.js";
|
|
17
17
|
import { useTooltipContentProps as t } from "../../../tooltip/src/content.js";
|
|
@@ -78,7 +78,7 @@ const F = r({
|
|
|
78
78
|
*/
|
|
79
79
|
clearIcon: {
|
|
80
80
|
type: e([String, Object]),
|
|
81
|
-
default:
|
|
81
|
+
default: a
|
|
82
82
|
},
|
|
83
83
|
/**
|
|
84
84
|
* @description whether the input is editable
|
|
@@ -104,7 +104,7 @@ const F = r({
|
|
|
104
104
|
/**
|
|
105
105
|
* @description size of Input
|
|
106
106
|
*/
|
|
107
|
-
size:
|
|
107
|
+
size: l,
|
|
108
108
|
/**
|
|
109
109
|
* @description whether TimePicker is read only
|
|
110
110
|
*/
|
|
@@ -219,7 +219,7 @@ const F = r({
|
|
|
219
219
|
*/
|
|
220
220
|
placement: {
|
|
221
221
|
type: e(String),
|
|
222
|
-
values:
|
|
222
|
+
values: o,
|
|
223
223
|
default: "bottom"
|
|
224
224
|
},
|
|
225
225
|
/**
|
|
@@ -229,8 +229,8 @@ const F = r({
|
|
|
229
229
|
type: e(Array),
|
|
230
230
|
default: ["bottom", "top", "right", "left"]
|
|
231
231
|
},
|
|
232
|
-
...
|
|
233
|
-
...
|
|
232
|
+
...i,
|
|
233
|
+
...p(["ariaLabel"]),
|
|
234
234
|
/**
|
|
235
235
|
* @description whether to show the now button
|
|
236
236
|
*/
|
|
@@ -255,8 +255,7 @@ const F = r({
|
|
|
255
255
|
/**
|
|
256
256
|
* @description whether to show the number of the calendar week
|
|
257
257
|
*/
|
|
258
|
-
showWeekNumber: Boolean
|
|
259
|
-
...o
|
|
258
|
+
showWeekNumber: Boolean
|
|
260
259
|
}), k = r({
|
|
261
260
|
id: {
|
|
262
261
|
type: e(Array)
|
|
@@ -274,7 +273,7 @@ const F = r({
|
|
|
274
273
|
*/
|
|
275
274
|
placeholder: String,
|
|
276
275
|
disabled: Boolean,
|
|
277
|
-
...
|
|
276
|
+
...n
|
|
278
277
|
});
|
|
279
278
|
export {
|
|
280
279
|
F as timePickerDefaultProps,
|