@quidgest/ui 0.17.0 → 0.17.1
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/json/api.json +1 -1
- package/dist/ui.css +1 -2
- package/dist/ui.esm.js +2713 -2669
- package/dist/ui.js +15 -15
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +146 -137
- package/dist/ui.scss +2 -3
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +439 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +471 -427
- package/esm/components/QDateTimePicker/index.d.ts +219 -0
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { WEEKDAY_NAMES as
|
|
1
|
+
import { defineComponent as Yn, mergeModels as Pn, useModel as An, computed as s, ref as R, useTemplateRef as ie, watch as se, onBeforeUnmount as Ln, createElementBlock as H, openBlock as f, Fragment as Y, createVNode as i, createBlock as U, createCommentVNode as M, unref as o, normalizeClass as kt, createSlots as On, withCtx as b, mergeProps as te, renderSlot as Bn, createElementVNode as k, normalizeProps as W, guardReactiveProps as j, renderList as ge, toDisplayString as ze, nextTick as F } from "vue";
|
|
2
|
+
import { WEEKDAY_NAMES as Ue, MONTH_NAMES as We, DEFAULT_TEXTS as Kn, DEFAULT_ICONS as $n } from "./constants.js";
|
|
3
3
|
import { QButton as p } from "../QButton/index.js";
|
|
4
4
|
import { QIcon as w } from "../QIcon/index.js";
|
|
5
|
-
import { QOverlay as
|
|
6
|
-
import { QSwitch as
|
|
7
|
-
import { QTextField as
|
|
8
|
-
import { useInputMask as
|
|
9
|
-
import { formatUsesTime as
|
|
10
|
-
const
|
|
5
|
+
import { QOverlay as zn } from "../QOverlay/index.js";
|
|
6
|
+
import { QSwitch as Un } from "../QSwitch/index.js";
|
|
7
|
+
import { QTextField as Te } from "../QTextField/index.js";
|
|
8
|
+
import { useInputMask as Wn, applyMask as xe, clampNumericSegments as _t, resolveCursorPosition as jn } from "../../composables/useInputMask/index.js";
|
|
9
|
+
import { formatUsesTime as Qn, formatUsesSeconds as Gn, uses12HourFormat as Xn, isTimeOnlyFormat as Zn, parseDate as O, formatDate as Q, getFirstDayOfMonth as Jn, getDaysInMonth as Dt, isBetween as ea, isSameDay as He, convertDatePatternToMask as ta, padNumber as je, parseDateWithCompletion as Qe, inputIncludesTimePortion as Mt } from "../../utils/date.js";
|
|
10
|
+
const na = {
|
|
11
11
|
key: 0,
|
|
12
12
|
ref: "calendar",
|
|
13
13
|
class: "q-date-time-picker__calendar"
|
|
14
|
-
},
|
|
14
|
+
}, aa = { class: "q-date-time-picker__header" }, la = { class: "q-date-time-picker__weekdays" }, ra = { class: "q-date-time-picker__time" }, ua = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "q-date-time-picker__time-period"
|
|
17
|
-
},
|
|
17
|
+
}, oa = { class: "q-date-time-picker__time-inputs" }, ia = { class: "q-date-time-picker__time-input-group" }, sa = { class: "q-date-time-picker__time-input-group" }, ca = { class: "q-date-time-picker__time-input-group" }, da = { class: "q-date-time-picker__month-grid" }, fa = { class: "q-date-time-picker__year" }, va = { class: "q-date-time-picker__year-change" }, ma = { class: "q-date-time-picker__year-interval" }, pa = { class: "q-date-time-picker__year-grid" }, ga = { class: "q-date-time-picker__bottom-bar" }, G = 1001, X = 9999, ce = 26, wt = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', xa = /* @__PURE__ */ Yn({
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "QDateTimePicker",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ Pn({
|
|
21
21
|
id: {},
|
|
22
22
|
class: {},
|
|
23
23
|
label: {},
|
|
@@ -33,42 +33,64 @@ const Kn = {
|
|
|
33
33
|
clearable: { type: Boolean },
|
|
34
34
|
format: { default: "dd/MM/yyyy HH:mm" },
|
|
35
35
|
range: { type: Boolean },
|
|
36
|
-
icons: { default: () =>
|
|
37
|
-
texts: { default: () =>
|
|
36
|
+
icons: { default: () => $n },
|
|
37
|
+
texts: { default: () => Kn }
|
|
38
38
|
}, {
|
|
39
39
|
modelValue: {},
|
|
40
40
|
modelModifiers: {}
|
|
41
41
|
}),
|
|
42
42
|
emits: ["update:modelValue"],
|
|
43
|
-
setup(
|
|
44
|
-
const l =
|
|
45
|
-
get: () =>
|
|
46
|
-
set: (e) =>
|
|
47
|
-
}),
|
|
43
|
+
setup(Ge) {
|
|
44
|
+
const l = Ge, Xe = An(Ge, "modelValue"), v = s({
|
|
45
|
+
get: () => Xe.value,
|
|
46
|
+
set: (e) => Xe.value = e || void 0
|
|
47
|
+
}), Tt = s(
|
|
48
48
|
() => l.readonly || l.disabled ? void 0 : l.placeholder
|
|
49
|
-
),
|
|
49
|
+
), ne = s(() => Qn(l.format)), ye = s(() => Gn(l.format)), Z = s(() => Xn(l.format)), J = s(() => Zn(l.format)), xt = s(
|
|
50
50
|
() => g.value === (/* @__PURE__ */ new Date()).getMonth() && h.value === (/* @__PURE__ */ new Date()).getFullYear()
|
|
51
|
-
),
|
|
51
|
+
), T = R(!1), Se = R(!1), _ = R(""), S = R(null), P = R(!1);
|
|
52
52
|
let de = 0;
|
|
53
|
-
const D =
|
|
54
|
-
let
|
|
55
|
-
function
|
|
53
|
+
const D = R("date"), g = R((/* @__PURE__ */ new Date()).getMonth()), h = R((/* @__PURE__ */ new Date()).getFullYear()), ae = R((/* @__PURE__ */ new Date()).getFullYear());
|
|
54
|
+
let le = null, B = !1, fe = !1, Ce = !1;
|
|
55
|
+
function Ze() {
|
|
56
56
|
queueMicrotask(() => {
|
|
57
57
|
requestAnimationFrame(() => {
|
|
58
58
|
var a, n;
|
|
59
|
-
const e =
|
|
60
|
-
if (e && (t === e || t instanceof Node && ((n =
|
|
61
|
-
|
|
59
|
+
const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
|
|
60
|
+
if (e && (t === e || t instanceof Node && ((n = E.value) != null && n.contains(t)))) {
|
|
61
|
+
B = !0;
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
B = !1;
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
const C =
|
|
68
|
+
const C = ie("field"), E = ie("menu"), Ie = ie("calendar"), Ht = ie("monthHeader"), St = ie("yearHeader"), Ct = ie("toggleTime"), Re = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
|
|
69
|
+
function Ee(e) {
|
|
70
|
+
if (!e) return null;
|
|
71
|
+
if (e instanceof HTMLElement) return e;
|
|
72
|
+
if (typeof e == "object" && "$el" in e) {
|
|
73
|
+
const t = e.$el;
|
|
74
|
+
return t instanceof HTMLElement ? t : null;
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
function It(e, t) {
|
|
79
|
+
const a = Ee(e);
|
|
80
|
+
a ? Re.set(t, a) : Re.delete(t);
|
|
81
|
+
}
|
|
82
|
+
function Rt(e, t) {
|
|
83
|
+
const a = Ee(e);
|
|
84
|
+
a ? qe.set(t, a) : qe.delete(t);
|
|
85
|
+
}
|
|
86
|
+
function qt(e) {
|
|
87
|
+
var t;
|
|
88
|
+
(t = Ee(e)) == null || t.focus();
|
|
89
|
+
}
|
|
90
|
+
const q = s(() => ({
|
|
69
91
|
getMonthIndex: (e, t) => {
|
|
70
92
|
const a = e.toLowerCase();
|
|
71
|
-
return
|
|
93
|
+
return We.findIndex((n) => {
|
|
72
94
|
const r = l.texts[n] ?? n;
|
|
73
95
|
return (t ? r.substring(0, 3) : r).toLowerCase() === a;
|
|
74
96
|
});
|
|
@@ -76,147 +98,150 @@ const Kn = {
|
|
|
76
98
|
getWeekdayIndex: (e, t) => {
|
|
77
99
|
const a = e.toLowerCase();
|
|
78
100
|
for (let n = 0; n < 7; n++) {
|
|
79
|
-
const r = (n + 6) % 7, u =
|
|
101
|
+
const r = (n + 6) % 7, u = Ue[r], c = l.texts[u] ?? u;
|
|
80
102
|
if ((t ? c.substring(0, 3) : c).toLowerCase() === a) return n;
|
|
81
103
|
}
|
|
82
104
|
return null;
|
|
83
105
|
}
|
|
84
|
-
})),
|
|
106
|
+
})), x = s(() => {
|
|
85
107
|
const e = v.value;
|
|
86
|
-
return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ?
|
|
87
|
-
}),
|
|
108
|
+
return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? O(e, l.format, q.value) : null : null;
|
|
109
|
+
}), Fe = s(() => {
|
|
88
110
|
const e = v.value;
|
|
89
111
|
return Array.isArray(e) && e.length > 1 ? e[1] : null;
|
|
90
|
-
}), m =
|
|
91
|
-
if (!l.range) return
|
|
112
|
+
}), m = R(null), ee = R(null), N = R(null), A = R(!1), Et = s(() => !A.value || !m.value ? x.value : N.value && N.value < m.value ? N.value : m.value), Ft = s(() => {
|
|
113
|
+
if (!l.range) return x.value;
|
|
92
114
|
if (!A.value || !m.value)
|
|
93
|
-
return
|
|
94
|
-
const e =
|
|
115
|
+
return Fe.value;
|
|
116
|
+
const e = N.value ?? ee.value;
|
|
95
117
|
return e ? e < m.value ? m.value : e : null;
|
|
96
|
-
}),
|
|
118
|
+
}), K = s(() => ({
|
|
97
119
|
getMonthName: (e, t) => {
|
|
98
120
|
const a = be(e);
|
|
99
121
|
return t ? a.substring(0, 3) : a;
|
|
100
122
|
},
|
|
101
123
|
getWeekdayName: (e, t) => {
|
|
102
|
-
const a = (e + 6) % 7, n =
|
|
124
|
+
const a = (e + 6) % 7, n = Ue[a], r = l.texts[n] ?? n;
|
|
103
125
|
return t ? r.substring(0, 3) : r;
|
|
104
126
|
}
|
|
105
|
-
})),
|
|
127
|
+
})), Nt = s(() => {
|
|
106
128
|
const e = v.value;
|
|
107
129
|
return e ? Array.isArray(e) ? e.map(
|
|
108
|
-
(t) => t instanceof Date ?
|
|
109
|
-
).join(" - ") : e instanceof Date ?
|
|
110
|
-
}),
|
|
130
|
+
(t) => t instanceof Date ? Q(t, l.format, K.value) : t
|
|
131
|
+
).join(" - ") : e instanceof Date ? Q(e, l.format, K.value) : String(e) : "";
|
|
132
|
+
}), Je = s(() => S.value ?? Nt.value);
|
|
111
133
|
function he() {
|
|
112
|
-
_.value =
|
|
134
|
+
_.value = Je.value;
|
|
113
135
|
}
|
|
114
136
|
se(
|
|
115
|
-
|
|
137
|
+
Je,
|
|
116
138
|
() => {
|
|
117
|
-
|
|
139
|
+
Se.value || he();
|
|
118
140
|
},
|
|
119
141
|
{ immediate: !0 }
|
|
120
142
|
);
|
|
121
|
-
const
|
|
122
|
-
const e =
|
|
143
|
+
const et = s(() => {
|
|
144
|
+
const e = Jn(new Date(h.value, g.value, 1)), t = Dt(g.value, h.value), a = (e.getDay() + 6) % 7, n = [], r = g.value === 0 ? 11 : g.value - 1, u = g.value === 0 ? h.value - 1 : h.value, c = Dt(r, u);
|
|
123
145
|
for (let d = a - 1; d >= 0; d--) {
|
|
124
|
-
const
|
|
125
|
-
|
|
146
|
+
const I = new Date(u, r, c - d);
|
|
147
|
+
Ne(n, I, !1);
|
|
126
148
|
}
|
|
127
149
|
for (let d = 1; d <= t; d++) {
|
|
128
|
-
const
|
|
129
|
-
|
|
150
|
+
const I = new Date(h.value, g.value, d);
|
|
151
|
+
Ne(n, I, !0);
|
|
130
152
|
}
|
|
131
|
-
const y = 7 - n.length % 7,
|
|
132
|
-
for (let d = 1; d <=
|
|
133
|
-
const
|
|
134
|
-
|
|
153
|
+
const y = 7 - n.length % 7, L = y === 7 ? 0 : y;
|
|
154
|
+
for (let d = 1; d <= L; d++) {
|
|
155
|
+
const I = new Date(h.value, g.value + 1, d);
|
|
156
|
+
Ne(n, I, !1);
|
|
135
157
|
}
|
|
136
158
|
return n;
|
|
137
159
|
});
|
|
138
|
-
function
|
|
139
|
-
const n =
|
|
160
|
+
function Ne(e, t, a) {
|
|
161
|
+
const n = Et.value, r = Ft.value, u = t.getFullYear(), c = u < G || u > X;
|
|
140
162
|
e.push({
|
|
141
163
|
date: t,
|
|
142
164
|
isCurrentMonth: a,
|
|
143
|
-
isToday:
|
|
144
|
-
isSelected: n ?
|
|
145
|
-
isRangeStart: !!n &&
|
|
146
|
-
isRangeEnd: !!r &&
|
|
147
|
-
isInRange: n && r ?
|
|
165
|
+
isToday: He(t, /* @__PURE__ */ new Date()),
|
|
166
|
+
isSelected: n ? He(t, n) : !1,
|
|
167
|
+
isRangeStart: !!n && He(t, n),
|
|
168
|
+
isRangeEnd: !!r && He(t, r),
|
|
169
|
+
isInRange: n && r ? ea(t, n, r) : !1,
|
|
148
170
|
isDisabled: c
|
|
149
171
|
});
|
|
150
172
|
}
|
|
151
|
-
const
|
|
173
|
+
const Vt = s(() => Ue.map((e) => {
|
|
152
174
|
var a;
|
|
153
175
|
const t = e;
|
|
154
176
|
return ((a = l.texts[t]) == null ? void 0 : a.substring(0, 2)) ?? e;
|
|
155
|
-
})),
|
|
177
|
+
})), Yt = s(
|
|
156
178
|
() => Array.from({ length: 12 }, (e, t) => be(t, 3))
|
|
157
179
|
);
|
|
158
180
|
function be(e, t = 0) {
|
|
159
|
-
const a =
|
|
181
|
+
const a = We[e], n = l.texts[a] ?? We[e];
|
|
160
182
|
return t <= 0 ? n : n.substring(0, t);
|
|
161
183
|
}
|
|
162
|
-
function
|
|
184
|
+
function tt(e) {
|
|
163
185
|
const t = Math.floor(ce / 2);
|
|
164
186
|
let a = e - t, n = a + ce;
|
|
165
187
|
return a < G && (a = G, n = Math.min(a + ce, X)), n > X && (n = X, a = Math.max(G, n - ce)), { startYear: a, endYear: n };
|
|
166
188
|
}
|
|
167
|
-
function
|
|
168
|
-
const { startYear: t, endYear: a } =
|
|
189
|
+
function Pt(e) {
|
|
190
|
+
const { startYear: t, endYear: a } = tt(e);
|
|
169
191
|
return Array.from({ length: a - t + 1 }, (n, r) => t + r);
|
|
170
192
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
193
|
+
function At() {
|
|
194
|
+
nt.value && (ae.value -= ce);
|
|
173
195
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
196
|
+
function Lt() {
|
|
197
|
+
at.value && (ae.value += ce);
|
|
176
198
|
}
|
|
177
|
-
const ke = s(() =>
|
|
199
|
+
const ke = s(() => tt(ae.value)), nt = s(
|
|
178
200
|
() => ke.value.startYear > G
|
|
179
|
-
),
|
|
201
|
+
), at = s(() => ke.value.endYear < X), Ot = s(() => g.value === 0 ? h.value - 1 : h.value), Bt = s(() => g.value === 11 ? h.value + 1 : h.value), lt = s(() => Ot.value >= G), rt = s(() => Bt.value <= X), Kt = s(() => Pt(ae.value)), $t = s(() => J.value ? l.icons.clock : l.icons.calendar), ve = s(() => ta(l.format)), Ve = s(
|
|
180
202
|
() => `${ve.value} - ${ve.value}`
|
|
181
203
|
);
|
|
182
|
-
|
|
204
|
+
Wn(
|
|
183
205
|
() => {
|
|
184
206
|
var e;
|
|
185
207
|
return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
|
|
186
208
|
},
|
|
187
|
-
() => l.range ?
|
|
209
|
+
() => l.range ? Ve.value : ve.value
|
|
188
210
|
), se(
|
|
189
211
|
() => {
|
|
190
212
|
var e;
|
|
191
213
|
return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
|
|
192
214
|
},
|
|
193
215
|
(e, t, a) => {
|
|
194
|
-
const n =
|
|
195
|
-
n && (n.addEventListener("click",
|
|
196
|
-
n.removeEventListener("click",
|
|
216
|
+
const n = oe(e);
|
|
217
|
+
n && (n.addEventListener("click", gt), n.addEventListener("paste", mt, !0), a(() => {
|
|
218
|
+
n.removeEventListener("click", gt), n.removeEventListener("paste", mt, !0);
|
|
197
219
|
}));
|
|
198
220
|
},
|
|
199
221
|
{ flush: "post" }
|
|
200
222
|
), se(v, () => {
|
|
201
|
-
|
|
223
|
+
S.value = null, he();
|
|
202
224
|
});
|
|
203
|
-
|
|
204
|
-
()
|
|
225
|
+
function zt(e) {
|
|
226
|
+
return e === void 0 ? !1 : typeof e == "string" ? e.trim().length > 0 : e instanceof Date ? !0 : Array.isArray(e) ? e.length > 0 : !1;
|
|
227
|
+
}
|
|
228
|
+
const Ye = s(
|
|
229
|
+
() => l.clearable && !l.readonly && !l.disabled && zt(v.value)
|
|
205
230
|
);
|
|
206
|
-
function
|
|
207
|
-
|
|
231
|
+
function Ut() {
|
|
232
|
+
Ye.value && (m.value = null, ee.value = null, N.value = null, A.value = !1, v.value = void 0, _.value = "", we());
|
|
208
233
|
}
|
|
209
|
-
function
|
|
210
|
-
!l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (
|
|
234
|
+
function Pe(e) {
|
|
235
|
+
!l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (N.value = new Date(e));
|
|
211
236
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
237
|
+
function ut() {
|
|
238
|
+
N.value = null;
|
|
214
239
|
}
|
|
215
|
-
function
|
|
240
|
+
function Wt(e) {
|
|
216
241
|
const t = e.currentTarget, a = e.relatedTarget;
|
|
217
|
-
!t || a && t.contains(a) ||
|
|
242
|
+
!t || a && t.contains(a) || ut();
|
|
218
243
|
}
|
|
219
|
-
function
|
|
244
|
+
function ot(e) {
|
|
220
245
|
if (!l.range || !A.value || !m.value) return;
|
|
221
246
|
const t = e.touches.item(0);
|
|
222
247
|
if (!t) return;
|
|
@@ -224,102 +249,102 @@ const Kn = {
|
|
|
224
249
|
if (!n) return;
|
|
225
250
|
const r = Number(n.dataset.dayIndex);
|
|
226
251
|
if (Number.isNaN(r)) return;
|
|
227
|
-
const u =
|
|
228
|
-
u &&
|
|
252
|
+
const u = et.value[r];
|
|
253
|
+
u && Pe(u.date);
|
|
229
254
|
}
|
|
230
|
-
function
|
|
255
|
+
function jt(e) {
|
|
231
256
|
if (!(l.readonly || l.disabled) && !(e.getFullYear() < G || e.getFullYear() > X))
|
|
232
257
|
if (l.range)
|
|
233
258
|
if (A.value) {
|
|
234
259
|
const t = m.value ?? new Date(e), a = new Date(e), [n, r] = a < t ? [a, t] : [t, a];
|
|
235
|
-
|
|
260
|
+
ne.value && r.setHours(23, 59, ye.value ? 59 : 0, 0), v.value = [n, r], m.value = null, ee.value = null, N.value = null, A.value = !1;
|
|
236
261
|
} else {
|
|
237
262
|
const t = new Date(e);
|
|
238
|
-
|
|
263
|
+
ne.value && m.value && t.setHours(
|
|
239
264
|
m.value.getHours(),
|
|
240
265
|
m.value.getMinutes(),
|
|
241
266
|
m.value.getSeconds(),
|
|
242
267
|
m.value.getMilliseconds()
|
|
243
|
-
), m.value = t, ee.value = null,
|
|
268
|
+
), m.value = t, ee.value = null, N.value = null, A.value = !0;
|
|
244
269
|
}
|
|
245
270
|
else {
|
|
246
271
|
const t = new Date(e);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
) :
|
|
272
|
+
x.value && !hn(x.value) ? t.setHours(
|
|
273
|
+
x.value.getHours(),
|
|
274
|
+
x.value.getMinutes(),
|
|
275
|
+
x.value.getSeconds()
|
|
276
|
+
) : ne.value && vt(t), v.value = t;
|
|
252
277
|
}
|
|
253
278
|
}
|
|
254
|
-
function
|
|
255
|
-
h.value = e, t &&
|
|
279
|
+
function re(e, t) {
|
|
280
|
+
h.value = e, t && Me("year");
|
|
256
281
|
}
|
|
257
|
-
function
|
|
258
|
-
g.value = e, t &&
|
|
282
|
+
function $(e, t) {
|
|
283
|
+
g.value = e, t && Me("month");
|
|
259
284
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
285
|
+
function Qt() {
|
|
286
|
+
lt.value && (g.value === 0 ? ($(11), re(h.value - 1)) : $(g.value - 1));
|
|
262
287
|
}
|
|
263
|
-
function
|
|
264
|
-
|
|
288
|
+
function Gt() {
|
|
289
|
+
rt.value && (g.value === 11 ? ($(0), re(h.value + 1)) : $(g.value + 1));
|
|
265
290
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
291
|
+
function Xt() {
|
|
292
|
+
$((/* @__PURE__ */ new Date()).getMonth()), re((/* @__PURE__ */ new Date()).getFullYear()), De();
|
|
268
293
|
}
|
|
269
|
-
function
|
|
270
|
-
let e =
|
|
294
|
+
function Zt() {
|
|
295
|
+
let e = x.value;
|
|
271
296
|
const t = v.value;
|
|
272
297
|
if (l.range && Array.isArray(t) && t.length > 0) {
|
|
273
298
|
const a = t[0];
|
|
274
|
-
a instanceof Date ? e = a : typeof a == "string" && (e =
|
|
299
|
+
a instanceof Date ? e = a : typeof a == "string" && (e = O(a, l.format, q.value));
|
|
275
300
|
}
|
|
276
|
-
e = e ?? /* @__PURE__ */ new Date(),
|
|
301
|
+
e = e ?? /* @__PURE__ */ new Date(), $(e.getMonth()), re(e.getFullYear()), De();
|
|
277
302
|
}
|
|
278
303
|
function me(e) {
|
|
279
|
-
return l.range ? e === 1 ?
|
|
304
|
+
return l.range ? e === 1 ? Fe.value ?? ee.value : x.value ?? m.value : x.value;
|
|
280
305
|
}
|
|
281
|
-
function
|
|
306
|
+
function Jt(e, t) {
|
|
282
307
|
if (!l.range) {
|
|
283
308
|
v.value = t;
|
|
284
309
|
return;
|
|
285
310
|
}
|
|
286
|
-
const a =
|
|
311
|
+
const a = x.value, n = Fe.value;
|
|
287
312
|
if (!a || !n) {
|
|
288
313
|
e === 1 ? ee.value = t : m.value = t;
|
|
289
314
|
return;
|
|
290
315
|
}
|
|
291
316
|
v.value = e === 1 ? [a, t] : [t, n];
|
|
292
317
|
}
|
|
293
|
-
function
|
|
318
|
+
function V(e, t) {
|
|
294
319
|
const a = me(e) ?? (() => {
|
|
295
320
|
const r = /* @__PURE__ */ new Date();
|
|
296
321
|
return r.setHours(0, 0, 0, 0), r;
|
|
297
322
|
})(), n = new Date(a);
|
|
298
|
-
t(n),
|
|
323
|
+
t(n), Jt(e, n);
|
|
299
324
|
}
|
|
300
|
-
function
|
|
325
|
+
function en(e) {
|
|
301
326
|
const t = me(e);
|
|
302
327
|
if (!t) return Z.value ? 12 : 0;
|
|
303
328
|
const a = t.getHours();
|
|
304
329
|
return Z.value ? a % 12 || 12 : a;
|
|
305
330
|
}
|
|
306
|
-
function
|
|
331
|
+
function tn(e) {
|
|
307
332
|
var t;
|
|
308
333
|
return ((t = me(e)) == null ? void 0 : t.getMinutes()) ?? 0;
|
|
309
334
|
}
|
|
310
|
-
function
|
|
335
|
+
function nn(e) {
|
|
311
336
|
var t;
|
|
312
337
|
return ((t = me(e)) == null ? void 0 : t.getSeconds()) ?? 0;
|
|
313
338
|
}
|
|
314
|
-
function
|
|
339
|
+
function an(e) {
|
|
315
340
|
const t = me(e);
|
|
316
341
|
return t ? t.getHours() >= 12 : !1;
|
|
317
342
|
}
|
|
318
343
|
function _e(e, t) {
|
|
319
344
|
return t ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
|
|
320
345
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
346
|
+
function ln(e) {
|
|
347
|
+
V(e, (t) => {
|
|
323
348
|
if (Z.value) {
|
|
324
349
|
const a = t.getHours() % 12 || 12, n = a >= 12 ? 1 : a + 1, r = t.getHours() >= 12;
|
|
325
350
|
t.setHours(_e(n, r));
|
|
@@ -327,8 +352,8 @@ const Kn = {
|
|
|
327
352
|
t.setHours(t.getHours() >= 23 ? 0 : t.getHours() + 1);
|
|
328
353
|
});
|
|
329
354
|
}
|
|
330
|
-
function
|
|
331
|
-
|
|
355
|
+
function rn(e) {
|
|
356
|
+
V(e, (t) => {
|
|
332
357
|
if (Z.value) {
|
|
333
358
|
const a = t.getHours() % 12 || 12, n = a <= 1 ? 12 : a - 1, r = t.getHours() >= 12;
|
|
334
359
|
t.setHours(_e(n, r));
|
|
@@ -336,69 +361,69 @@ const Kn = {
|
|
|
336
361
|
t.setHours(t.getHours() <= 0 ? 23 : t.getHours() - 1);
|
|
337
362
|
});
|
|
338
363
|
}
|
|
339
|
-
function
|
|
340
|
-
|
|
364
|
+
function un(e) {
|
|
365
|
+
V(e, (t) => {
|
|
341
366
|
t.setMinutes(t.getMinutes() >= 59 ? 0 : t.getMinutes() + 1);
|
|
342
367
|
});
|
|
343
368
|
}
|
|
344
|
-
function
|
|
345
|
-
|
|
369
|
+
function on(e) {
|
|
370
|
+
V(e, (t) => {
|
|
346
371
|
t.setMinutes(t.getMinutes() <= 0 ? 59 : t.getMinutes() - 1);
|
|
347
372
|
});
|
|
348
373
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
374
|
+
function sn(e) {
|
|
375
|
+
V(e, (t) => {
|
|
351
376
|
t.setSeconds(t.getSeconds() >= 59 ? 0 : t.getSeconds() + 1);
|
|
352
377
|
});
|
|
353
378
|
}
|
|
354
|
-
function
|
|
355
|
-
|
|
379
|
+
function cn(e) {
|
|
380
|
+
V(e, (t) => {
|
|
356
381
|
t.setSeconds(t.getSeconds() <= 0 ? 59 : t.getSeconds() - 1);
|
|
357
382
|
});
|
|
358
383
|
}
|
|
359
|
-
function
|
|
384
|
+
function Ae(e) {
|
|
360
385
|
return (e ?? "").replace(/\D/g, "");
|
|
361
386
|
}
|
|
362
|
-
function
|
|
387
|
+
function dn(e) {
|
|
363
388
|
return Math.min(23, Math.max(0, e));
|
|
364
389
|
}
|
|
365
|
-
function
|
|
390
|
+
function fn(e) {
|
|
366
391
|
return Math.min(12, Math.max(1, e));
|
|
367
392
|
}
|
|
368
|
-
function
|
|
393
|
+
function it(e) {
|
|
369
394
|
return Math.min(59, Math.max(0, e));
|
|
370
395
|
}
|
|
371
|
-
function
|
|
372
|
-
const a =
|
|
396
|
+
function st(e, t) {
|
|
397
|
+
const a = Ae(e).slice(0, 2);
|
|
373
398
|
if (a === "") return;
|
|
374
399
|
const n = Number.parseInt(a, 10);
|
|
375
400
|
if (Number.isNaN(n)) return;
|
|
376
|
-
const r = Z.value ?
|
|
377
|
-
|
|
401
|
+
const r = Z.value ? fn(n) : dn(n);
|
|
402
|
+
V(t, (u) => {
|
|
378
403
|
Z.value ? u.setHours(_e(r, u.getHours() >= 12)) : u.setHours(r);
|
|
379
404
|
});
|
|
380
405
|
}
|
|
381
|
-
function
|
|
382
|
-
const a =
|
|
406
|
+
function ct(e, t) {
|
|
407
|
+
const a = Ae(e).slice(0, 2);
|
|
383
408
|
if (a === "") return;
|
|
384
409
|
const n = Number.parseInt(a, 10);
|
|
385
410
|
if (Number.isNaN(n)) return;
|
|
386
|
-
const r =
|
|
387
|
-
|
|
411
|
+
const r = it(n);
|
|
412
|
+
V(t, (u) => {
|
|
388
413
|
u.setMinutes(r);
|
|
389
414
|
});
|
|
390
415
|
}
|
|
391
|
-
function
|
|
392
|
-
const a =
|
|
416
|
+
function dt(e, t) {
|
|
417
|
+
const a = Ae(e).slice(0, 2);
|
|
393
418
|
if (a === "") return;
|
|
394
419
|
const n = Number.parseInt(a, 10);
|
|
395
420
|
if (Number.isNaN(n)) return;
|
|
396
|
-
const r =
|
|
397
|
-
|
|
421
|
+
const r = it(n);
|
|
422
|
+
V(t, (u) => {
|
|
398
423
|
u.setSeconds(r);
|
|
399
424
|
});
|
|
400
425
|
}
|
|
401
|
-
async function
|
|
426
|
+
async function Le(e, t, a) {
|
|
402
427
|
if (e.ctrlKey || e.altKey || e.metaKey || !/^\d$/.test(e.key)) return;
|
|
403
428
|
const n = e.target;
|
|
404
429
|
if (!n) return;
|
|
@@ -407,106 +432,106 @@ const Kn = {
|
|
|
407
432
|
return;
|
|
408
433
|
e.preventDefault();
|
|
409
434
|
const c = `${n.value.slice(0, r)}${e.key}${n.value.slice(r + 1)}`;
|
|
410
|
-
t === "hours" ?
|
|
435
|
+
t === "hours" ? st(c, a) : t === "minutes" ? ct(c, a) : dt(c, a);
|
|
411
436
|
const y = Math.min(r + 1, n.maxLength);
|
|
412
437
|
await F(), n.setSelectionRange(y, y);
|
|
413
438
|
}
|
|
414
|
-
function
|
|
415
|
-
|
|
439
|
+
function vn(e, t) {
|
|
440
|
+
V(t, (a) => {
|
|
416
441
|
const n = a.getHours() % 12 || 12;
|
|
417
442
|
a.setHours(_e(n, e));
|
|
418
443
|
});
|
|
419
444
|
}
|
|
420
|
-
async function
|
|
445
|
+
async function Oe(e, t, a, n) {
|
|
421
446
|
if (!e) return;
|
|
422
|
-
const r =
|
|
447
|
+
const r = jn(t, a, n), u = () => e.setSelectionRange(r, r);
|
|
423
448
|
u(), await F(), u(), await new Promise((c) => {
|
|
424
449
|
requestAnimationFrame(() => {
|
|
425
450
|
u(), c();
|
|
426
451
|
});
|
|
427
452
|
});
|
|
428
453
|
}
|
|
429
|
-
async function
|
|
454
|
+
async function ft(e, t, a, n) {
|
|
430
455
|
if (a === t) {
|
|
431
456
|
_.value !== a && (_.value = a);
|
|
432
457
|
return;
|
|
433
458
|
}
|
|
434
|
-
_.value = a, await
|
|
459
|
+
_.value = a, await Oe(e, t, a, n);
|
|
435
460
|
}
|
|
436
|
-
async function
|
|
437
|
-
var
|
|
461
|
+
async function mn(e) {
|
|
462
|
+
var L;
|
|
438
463
|
if (de > 0) return;
|
|
439
464
|
if (l.readonly || l.disabled) {
|
|
440
465
|
he();
|
|
441
466
|
return;
|
|
442
467
|
}
|
|
443
|
-
const t =
|
|
468
|
+
const t = oe((L = C.value) == null ? void 0 : L.inputRef), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
|
|
444
469
|
if (!n) {
|
|
445
|
-
v.value = void 0,
|
|
470
|
+
v.value = void 0, S.value = null, _.value = "", P.value = !1;
|
|
446
471
|
return;
|
|
447
472
|
}
|
|
448
473
|
if (l.range) {
|
|
449
|
-
const d =
|
|
450
|
-
await
|
|
451
|
-
const
|
|
452
|
-
if (
|
|
453
|
-
v.value =
|
|
454
|
-
const
|
|
455
|
-
|
|
474
|
+
const d = xe(n, Ve.value);
|
|
475
|
+
await ft(t, n, d, a), S.value = d;
|
|
476
|
+
const I = Be(d);
|
|
477
|
+
if (I) {
|
|
478
|
+
v.value = I, S.value = null;
|
|
479
|
+
const $e = I.map((Vn) => Q(Vn, l.format, K.value)).join(" - ");
|
|
480
|
+
$e !== d && (_.value = $e, await Oe(t, d, $e, a)), P.value = !1;
|
|
456
481
|
}
|
|
457
482
|
return;
|
|
458
483
|
}
|
|
459
|
-
const r =
|
|
460
|
-
let c = u, y =
|
|
484
|
+
const r = xe(n, ve.value), u = _t(r, l.format);
|
|
485
|
+
let c = u, y = O(u, l.format, q.value);
|
|
461
486
|
if (!y) {
|
|
462
|
-
const d =
|
|
487
|
+
const d = O(n, l.format, q.value);
|
|
463
488
|
d && (c = n, y = d);
|
|
464
489
|
}
|
|
465
|
-
if (await
|
|
466
|
-
const d =
|
|
467
|
-
v.value = d,
|
|
468
|
-
const
|
|
469
|
-
|
|
490
|
+
if (await ft(t, n, c, a), S.value = c, y) {
|
|
491
|
+
const d = ue(y, n);
|
|
492
|
+
v.value = d, S.value = null;
|
|
493
|
+
const I = Q(d, l.format, K.value);
|
|
494
|
+
I !== c && (_.value = I, await Oe(t, c, I, a)), P.value = !1;
|
|
470
495
|
}
|
|
471
496
|
}
|
|
472
|
-
function
|
|
497
|
+
function Be(e, t) {
|
|
473
498
|
const a = e.split(" - ");
|
|
474
499
|
if (a.length !== 2) return null;
|
|
475
500
|
const n = (c) => {
|
|
476
|
-
const y = c.trim(),
|
|
477
|
-
return
|
|
501
|
+
const y = c.trim(), L = O(y, l.format, q.value);
|
|
502
|
+
return L || (t != null && t.complete ? Qe(y, l.format, q.value) : null);
|
|
478
503
|
}, r = n(a[0] ?? ""), u = n(a[1] ?? "");
|
|
479
504
|
return !r || !u ? null : u < r ? [u, r] : [r, u];
|
|
480
505
|
}
|
|
481
|
-
function
|
|
506
|
+
function pn() {
|
|
482
507
|
if (l.readonly || l.disabled) return !1;
|
|
483
|
-
const e =
|
|
508
|
+
const e = S.value ?? _.value;
|
|
484
509
|
if (!e) return !1;
|
|
485
510
|
if (l.range) {
|
|
486
|
-
const c =
|
|
487
|
-
return y ? (v.value = y,
|
|
511
|
+
const c = xe(e, Ve.value), y = Be(c, { complete: !0 });
|
|
512
|
+
return y ? (v.value = y, S.value = null, P.value = !1, _.value = y.map((L) => Q(L, l.format, K.value)).join(" - "), !0) : (S.value = null, v.value = void 0, P.value = !0, _.value = "", !1);
|
|
488
513
|
}
|
|
489
|
-
const t =
|
|
514
|
+
const t = xe(e, ve.value), a = _t(t, l.format), n = Qe(
|
|
490
515
|
a,
|
|
491
516
|
l.format,
|
|
492
|
-
|
|
517
|
+
q.value
|
|
493
518
|
);
|
|
494
519
|
if (!n)
|
|
495
|
-
return
|
|
496
|
-
const u = !!
|
|
497
|
-
return v.value = u,
|
|
520
|
+
return S.value = null, v.value = void 0, P.value = !0, _.value = "", !1;
|
|
521
|
+
const u = !!O(a, l.format, q.value) || Mt(a, l.format) ? n : ue(n, a);
|
|
522
|
+
return v.value = u, S.value = null, P.value = !1, _.value = Q(u, l.format, K.value), !0;
|
|
498
523
|
}
|
|
499
|
-
function
|
|
524
|
+
function gn(e) {
|
|
500
525
|
const t = e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i, "").trim();
|
|
501
526
|
return t && t !== e ? t : null;
|
|
502
527
|
}
|
|
503
|
-
function
|
|
504
|
-
return !
|
|
528
|
+
function yn(e) {
|
|
529
|
+
return !ne.value || O(e, l.format, q.value) || Mt(e, l.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
|
|
505
530
|
}
|
|
506
|
-
function
|
|
531
|
+
function hn(e) {
|
|
507
532
|
return e.getHours() === 0 && e.getMinutes() === 0 && e.getSeconds() === 0 && e.getMilliseconds() === 0;
|
|
508
533
|
}
|
|
509
|
-
function
|
|
534
|
+
function vt(e) {
|
|
510
535
|
const t = /* @__PURE__ */ new Date();
|
|
511
536
|
e.setHours(
|
|
512
537
|
t.getHours(),
|
|
@@ -515,41 +540,41 @@ const Kn = {
|
|
|
515
540
|
ye.value ? t.getMilliseconds() : 0
|
|
516
541
|
);
|
|
517
542
|
}
|
|
518
|
-
function
|
|
519
|
-
if (l.range || !
|
|
543
|
+
function ue(e, t) {
|
|
544
|
+
if (l.range || !ne.value || t !== void 0 && yn(t)) return e;
|
|
520
545
|
const a = new Date(e);
|
|
521
|
-
return
|
|
546
|
+
return vt(a), a;
|
|
522
547
|
}
|
|
523
|
-
function
|
|
548
|
+
function bn(e) {
|
|
524
549
|
if (l.range)
|
|
525
|
-
return
|
|
526
|
-
const t =
|
|
527
|
-
if (t) return
|
|
528
|
-
const a =
|
|
529
|
-
if (a) return
|
|
530
|
-
const n =
|
|
531
|
-
if (n) return
|
|
532
|
-
const r =
|
|
550
|
+
return Be(e);
|
|
551
|
+
const t = O(e, l.format, q.value);
|
|
552
|
+
if (t) return ue(t, e);
|
|
553
|
+
const a = In(e);
|
|
554
|
+
if (a) return ue(a, e);
|
|
555
|
+
const n = Qe(e, l.format, q.value);
|
|
556
|
+
if (n) return ue(n, e);
|
|
557
|
+
const r = gn(l.format);
|
|
533
558
|
if (r) {
|
|
534
|
-
const u =
|
|
535
|
-
if (u) return
|
|
559
|
+
const u = O(e, r, q.value);
|
|
560
|
+
if (u) return ue(u, e);
|
|
536
561
|
}
|
|
537
562
|
return null;
|
|
538
563
|
}
|
|
539
|
-
function
|
|
540
|
-
if (
|
|
541
|
-
const a = e.map((n) =>
|
|
564
|
+
function kn(e) {
|
|
565
|
+
if (P.value = !1, S.value = null, Array.isArray(e)) {
|
|
566
|
+
const a = e.map((n) => Q(n, l.format, K.value)).join(" - ");
|
|
542
567
|
de += 1, v.value = e, _.value = a, F(() => {
|
|
543
568
|
de -= 1;
|
|
544
569
|
});
|
|
545
570
|
return;
|
|
546
571
|
}
|
|
547
|
-
const t =
|
|
572
|
+
const t = Q(e, l.format, K.value);
|
|
548
573
|
de += 1, v.value = e, _.value = t, F(() => {
|
|
549
574
|
de -= 1;
|
|
550
575
|
});
|
|
551
576
|
}
|
|
552
|
-
function
|
|
577
|
+
function mt(e) {
|
|
553
578
|
var n, r, u, c;
|
|
554
579
|
if (l.readonly || l.disabled) {
|
|
555
580
|
e.preventDefault();
|
|
@@ -560,97 +585,97 @@ const Kn = {
|
|
|
560
585
|
e.preventDefault();
|
|
561
586
|
return;
|
|
562
587
|
}
|
|
563
|
-
const a =
|
|
588
|
+
const a = bn(t);
|
|
564
589
|
if (!a) {
|
|
565
590
|
e.preventDefault();
|
|
566
591
|
return;
|
|
567
592
|
}
|
|
568
|
-
e.preventDefault(),
|
|
593
|
+
e.preventDefault(), kn(a);
|
|
569
594
|
}
|
|
570
|
-
function
|
|
595
|
+
function _n(e) {
|
|
571
596
|
const t = e.target;
|
|
572
|
-
if (!(t instanceof Element) || !
|
|
597
|
+
if (!(t instanceof Element) || !E.value) return null;
|
|
573
598
|
const a = t.closest(
|
|
574
599
|
"button, input, select, textarea, a[href], [tabindex], [contenteditable]"
|
|
575
600
|
);
|
|
576
|
-
return a &&
|
|
601
|
+
return a && E.value.contains(a) ? a : null;
|
|
577
602
|
}
|
|
578
|
-
function
|
|
603
|
+
function Dn(e) {
|
|
579
604
|
return !(e.matches(":disabled") || e.getAttribute("aria-disabled") === "true" || e.getAttribute("tabindex") === "-1");
|
|
580
605
|
}
|
|
581
|
-
function
|
|
606
|
+
function Mn(e) {
|
|
582
607
|
var a;
|
|
583
|
-
if (!(e.target instanceof Node) || !((a =
|
|
608
|
+
if (!(e.target instanceof Node) || !((a = E.value) != null && a.contains(e.target))) return;
|
|
584
609
|
fe = !0;
|
|
585
|
-
const t =
|
|
586
|
-
t && !
|
|
610
|
+
const t = _n(e);
|
|
611
|
+
t && !Dn(t) && e.preventDefault();
|
|
587
612
|
}
|
|
588
|
-
function
|
|
589
|
-
return
|
|
613
|
+
function pt() {
|
|
614
|
+
return E.value ? Array.from(E.value.querySelectorAll(wt)).filter(
|
|
590
615
|
(e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0
|
|
591
616
|
) : [];
|
|
592
617
|
}
|
|
593
|
-
function
|
|
618
|
+
function wn() {
|
|
594
619
|
var n, r;
|
|
595
|
-
const e =
|
|
620
|
+
const e = oe((n = C.value) == null ? void 0 : n.inputRef);
|
|
596
621
|
if (!e) return;
|
|
597
622
|
const t = Array.from(
|
|
598
|
-
document.querySelectorAll(
|
|
623
|
+
document.querySelectorAll(wt)
|
|
599
624
|
).filter(
|
|
600
625
|
(u) => u.offsetWidth > 0 || u.offsetHeight > 0 || u.getClientRects().length > 0
|
|
601
626
|
), a = t.indexOf(e);
|
|
602
627
|
a >= 0 && a < t.length - 1 && ((r = t[a + 1]) == null || r.focus());
|
|
603
628
|
}
|
|
604
|
-
function
|
|
605
|
-
if (e.key !== "Tab" || !
|
|
629
|
+
function Tn(e) {
|
|
630
|
+
if (e.key !== "Tab" || !T.value || l.readonly || l.disabled) return;
|
|
606
631
|
if (e.shiftKey) {
|
|
607
|
-
|
|
632
|
+
B = !1, T.value = !1;
|
|
608
633
|
return;
|
|
609
634
|
}
|
|
610
|
-
const [t] =
|
|
635
|
+
const [t] = pt();
|
|
611
636
|
t && (e.preventDefault(), fe = !0, t.focus());
|
|
612
637
|
}
|
|
613
|
-
async function
|
|
638
|
+
async function xn(e) {
|
|
614
639
|
if (e.key !== "Tab") return;
|
|
615
|
-
const t =
|
|
640
|
+
const t = pt();
|
|
616
641
|
if (!t.length) return;
|
|
617
642
|
const a = t[0], n = t[t.length - 1], r = document.activeElement;
|
|
618
643
|
if (e.shiftKey) {
|
|
619
644
|
if (r !== a) return;
|
|
620
|
-
e.preventDefault(), fe = !0,
|
|
645
|
+
e.preventDefault(), fe = !0, we();
|
|
621
646
|
return;
|
|
622
647
|
}
|
|
623
|
-
r === n && (e.preventDefault(),
|
|
648
|
+
r === n && (e.preventDefault(), Ce = !0, T.value = !1, await F(), wn());
|
|
624
649
|
}
|
|
625
|
-
async function
|
|
650
|
+
async function Hn(e) {
|
|
626
651
|
var r, u, c;
|
|
627
|
-
if (
|
|
652
|
+
if (pn(), fe) {
|
|
628
653
|
fe = !1;
|
|
629
654
|
return;
|
|
630
655
|
}
|
|
631
656
|
const t = e == null ? void 0 : e.relatedTarget;
|
|
632
|
-
if (t instanceof Node && ((r =
|
|
657
|
+
if (t instanceof Node && ((r = E.value) != null && r.contains(t)))
|
|
633
658
|
return;
|
|
634
659
|
await F();
|
|
635
|
-
const a =
|
|
636
|
-
a !== n && (n instanceof Node && ((c =
|
|
660
|
+
const a = oe((u = C.value) == null ? void 0 : u.inputRef), n = document.activeElement;
|
|
661
|
+
a !== n && (n instanceof Node && ((c = E.value) != null && c.contains(n)) || (B = !1, T.value = !1, Se.value = !1, he()));
|
|
637
662
|
}
|
|
638
|
-
function
|
|
663
|
+
function Sn() {
|
|
639
664
|
if (!(l.readonly || l.disabled)) {
|
|
640
|
-
if (
|
|
641
|
-
|
|
665
|
+
if (Se.value = !0, B) {
|
|
666
|
+
B = !1;
|
|
642
667
|
return;
|
|
643
668
|
}
|
|
644
|
-
|
|
669
|
+
T.value || (T.value = !0);
|
|
645
670
|
}
|
|
646
671
|
}
|
|
647
|
-
function
|
|
648
|
-
l.readonly || l.disabled || (
|
|
672
|
+
function gt() {
|
|
673
|
+
l.readonly || l.disabled || (B = !1, T.value = !0);
|
|
649
674
|
}
|
|
650
|
-
function
|
|
651
|
-
e ||
|
|
675
|
+
function Cn(e) {
|
|
676
|
+
e || Ze(), T.value = e;
|
|
652
677
|
}
|
|
653
|
-
function
|
|
678
|
+
function In(e) {
|
|
654
679
|
const t = /[A-Za-z]/.test(e), a = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(
|
|
655
680
|
e
|
|
656
681
|
);
|
|
@@ -658,123 +683,131 @@ const Kn = {
|
|
|
658
683
|
const n = new Date(e);
|
|
659
684
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
660
685
|
}
|
|
661
|
-
function
|
|
686
|
+
function oe(e) {
|
|
662
687
|
return e instanceof HTMLInputElement ? e : typeof e == "object" && e !== null && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
|
|
663
688
|
}
|
|
664
|
-
function
|
|
689
|
+
function Rn(e) {
|
|
665
690
|
return e.isSelected || e.isRangeStart || e.isRangeEnd ? "bold" : e.isInRange ? "tonal" : "ghost";
|
|
666
691
|
}
|
|
667
692
|
function pe(e) {
|
|
668
693
|
var t;
|
|
669
|
-
(t =
|
|
694
|
+
(t = E.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
|
|
670
695
|
}
|
|
671
|
-
async function
|
|
696
|
+
async function yt() {
|
|
672
697
|
var e;
|
|
673
|
-
if (!
|
|
698
|
+
if (!T.value || J.value) {
|
|
674
699
|
pe(0);
|
|
675
700
|
return;
|
|
676
701
|
}
|
|
677
702
|
D.value === "date" && (await F(), pe(((e = Ie.value) == null ? void 0 : e.getBoundingClientRect().height) ?? 0));
|
|
678
703
|
}
|
|
679
704
|
function z() {
|
|
680
|
-
|
|
705
|
+
le == null || le.disconnect(), le = null;
|
|
681
706
|
}
|
|
682
|
-
async function
|
|
683
|
-
!
|
|
684
|
-
|
|
685
|
-
}),
|
|
707
|
+
async function ht() {
|
|
708
|
+
!T.value || J.value || D.value !== "date" || (await F(), Ie.value && (z(), le = new MutationObserver(() => {
|
|
709
|
+
yt();
|
|
710
|
+
}), le.observe(Ie.value, {
|
|
686
711
|
childList: !0,
|
|
687
712
|
subtree: !0,
|
|
688
713
|
attributes: !0,
|
|
689
714
|
characterData: !0
|
|
690
|
-
}),
|
|
715
|
+
}), yt()));
|
|
691
716
|
}
|
|
692
|
-
function
|
|
717
|
+
function bt() {
|
|
693
718
|
D.value = "time", z();
|
|
694
719
|
}
|
|
695
|
-
function
|
|
696
|
-
D.value = "date",
|
|
720
|
+
function De() {
|
|
721
|
+
D.value = "date", ht();
|
|
697
722
|
}
|
|
698
|
-
async function
|
|
723
|
+
async function Me(e) {
|
|
699
724
|
var a;
|
|
725
|
+
(a = E.value) == null || a.focus(), De(), await F();
|
|
726
|
+
const t = e === "year" ? St.value : e === "month" ? Ht.value : e === "time" ? Ct.value : null;
|
|
727
|
+
qt(t);
|
|
728
|
+
}
|
|
729
|
+
function qn() {
|
|
730
|
+
const e = D.value;
|
|
731
|
+
e !== "date" && Me(e);
|
|
732
|
+
}
|
|
733
|
+
async function En() {
|
|
700
734
|
z(), D.value = "month", await F();
|
|
701
|
-
const e =
|
|
702
|
-
|
|
735
|
+
const e = Re.get(g.value);
|
|
736
|
+
e == null || e.scrollIntoView({ block: "center" }), e == null || e.focus();
|
|
703
737
|
}
|
|
704
|
-
async function
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
e == null || e.scrollIntoView({ block: "center" });
|
|
738
|
+
async function Fn() {
|
|
739
|
+
var e;
|
|
740
|
+
z(), ae.value = h.value, D.value = "year", await F(), (e = qe.get(ae.value)) == null || e.scrollIntoView({ block: "center" });
|
|
708
741
|
}
|
|
709
|
-
async function
|
|
710
|
-
var a;
|
|
742
|
+
async function Ke(e) {
|
|
711
743
|
if (e.key !== "Escape") return;
|
|
712
|
-
if (
|
|
713
|
-
e.preventDefault(),
|
|
744
|
+
if (B = !0, D.value === "date") {
|
|
745
|
+
e.preventDefault(), T.value = !1;
|
|
714
746
|
return;
|
|
715
747
|
}
|
|
716
|
-
|
|
717
|
-
|
|
748
|
+
e.preventDefault();
|
|
749
|
+
const t = D.value;
|
|
750
|
+
await Me(t);
|
|
718
751
|
}
|
|
719
|
-
function
|
|
752
|
+
function we() {
|
|
720
753
|
var e, t;
|
|
721
754
|
(t = (e = C.value) == null ? void 0 : e.inputRef) == null || t.focus();
|
|
722
755
|
}
|
|
723
|
-
function
|
|
756
|
+
function Nn() {
|
|
724
757
|
var a, n;
|
|
725
|
-
if (
|
|
726
|
-
|
|
758
|
+
if (Ce) {
|
|
759
|
+
Ce = !1;
|
|
727
760
|
return;
|
|
728
761
|
}
|
|
729
|
-
const e =
|
|
730
|
-
e && t !== e && !(t instanceof Node && ((n =
|
|
762
|
+
const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
|
|
763
|
+
e && t !== e && !(t instanceof Node && ((n = E.value) != null && n.contains(t))) || we();
|
|
731
764
|
}
|
|
732
765
|
return se(v, () => {
|
|
733
|
-
|
|
734
|
-
}), se(
|
|
766
|
+
x.value && ($(x.value.getMonth()), re(x.value.getFullYear()));
|
|
767
|
+
}), se(T, (e, t) => {
|
|
735
768
|
if (J.value) {
|
|
736
769
|
z(), pe(0);
|
|
737
770
|
return;
|
|
738
771
|
}
|
|
739
|
-
m.value = null, ee.value = null,
|
|
772
|
+
m.value = null, ee.value = null, N.value = null, A.value = !1, e ? (document.addEventListener("keydown", Ke, { capture: !0 }), Zt(), ht()) : (t && Ze(), document.removeEventListener("keydown", Ke, { capture: !0 }), z(), pe(0));
|
|
740
773
|
}), se(
|
|
741
774
|
J,
|
|
742
775
|
(e) => {
|
|
743
|
-
e && z(),
|
|
776
|
+
e && z(), T.value = !1, e && pe(0), e ? bt() : De();
|
|
744
777
|
},
|
|
745
778
|
{ immediate: !0 }
|
|
746
|
-
),
|
|
747
|
-
z(), document.removeEventListener("keydown",
|
|
779
|
+
), Ln(() => {
|
|
780
|
+
z(), document.removeEventListener("keydown", Ke, { capture: !0 });
|
|
748
781
|
}), (e, t) => {
|
|
749
782
|
var a;
|
|
750
|
-
return f(),
|
|
751
|
-
|
|
783
|
+
return f(), H(
|
|
784
|
+
Y,
|
|
752
785
|
null,
|
|
753
786
|
[
|
|
754
|
-
i(o(
|
|
787
|
+
i(o(Te), {
|
|
755
788
|
id: l.id,
|
|
756
789
|
ref: "field",
|
|
757
790
|
"model-value": _.value,
|
|
758
|
-
class:
|
|
759
|
-
clearable:
|
|
791
|
+
class: kt(["q-date-time-picker", l.class]),
|
|
792
|
+
clearable: Ye.value,
|
|
760
793
|
label: l.label,
|
|
761
794
|
"label-position": l.labelPosition,
|
|
762
795
|
readonly: l.readonly,
|
|
763
796
|
disabled: l.disabled,
|
|
764
|
-
placeholder:
|
|
797
|
+
placeholder: Tt.value,
|
|
765
798
|
required: l.required,
|
|
766
799
|
size: l.size,
|
|
767
|
-
invalid: l.invalid ||
|
|
768
|
-
"onClick:clear":
|
|
769
|
-
onFocusin:
|
|
770
|
-
onKeydown:
|
|
771
|
-
onBlur:
|
|
772
|
-
"onUpdate:modelValue":
|
|
773
|
-
},
|
|
800
|
+
invalid: l.invalid || P.value,
|
|
801
|
+
"onClick:clear": we,
|
|
802
|
+
onFocusin: Sn,
|
|
803
|
+
onKeydown: Tn,
|
|
804
|
+
onBlur: Hn,
|
|
805
|
+
"onUpdate:modelValue": mn
|
|
806
|
+
}, On({
|
|
774
807
|
prepend: b(() => [
|
|
775
808
|
i(
|
|
776
809
|
o(w),
|
|
777
|
-
|
|
810
|
+
te({ class: "q-date-time-picker__input-icon" }, $t.value),
|
|
778
811
|
null,
|
|
779
812
|
16
|
|
780
813
|
/* FULL_PROPS */
|
|
@@ -786,14 +819,14 @@ const Kn = {
|
|
|
786
819
|
e.$slots.extras ? {
|
|
787
820
|
name: "extras",
|
|
788
821
|
fn: b(() => [
|
|
789
|
-
|
|
822
|
+
Bn(e.$slots, "extras")
|
|
790
823
|
]),
|
|
791
824
|
key: "0"
|
|
792
825
|
} : void 0
|
|
793
826
|
]), 1032, ["id", "model-value", "class", "clearable", "label", "label-position", "readonly", "disabled", "placeholder", "required", "size", "invalid"]),
|
|
794
|
-
!l.readonly && !l.disabled ? (f(), U(o(
|
|
827
|
+
!l.readonly && !l.disabled ? (f(), U(o(zn), {
|
|
795
828
|
key: 0,
|
|
796
|
-
"model-value":
|
|
829
|
+
"model-value": T.value,
|
|
797
830
|
anchor: (a = C.value) == null ? void 0 : a.fieldRef,
|
|
798
831
|
inline: l.inline,
|
|
799
832
|
offset: 8,
|
|
@@ -802,8 +835,8 @@ const Kn = {
|
|
|
802
835
|
arrow: "",
|
|
803
836
|
"non-modal": "",
|
|
804
837
|
spy: "",
|
|
805
|
-
onLeave:
|
|
806
|
-
"onUpdate:modelValue":
|
|
838
|
+
onLeave: Nn,
|
|
839
|
+
"onUpdate:modelValue": Cn
|
|
807
840
|
}, {
|
|
808
841
|
default: b(() => [
|
|
809
842
|
k(
|
|
@@ -811,27 +844,28 @@ const Kn = {
|
|
|
811
844
|
{
|
|
812
845
|
ref: "menu",
|
|
813
846
|
class: "q-date-time-picker__menu",
|
|
814
|
-
|
|
815
|
-
|
|
847
|
+
tabindex: "-1",
|
|
848
|
+
onPointerdownCapture: Mn,
|
|
849
|
+
onKeydown: xn
|
|
816
850
|
},
|
|
817
851
|
[
|
|
818
852
|
M(" Calendar View "),
|
|
819
|
-
D.value === "date" ? (f(),
|
|
853
|
+
D.value === "date" ? (f(), H(
|
|
820
854
|
"div",
|
|
821
|
-
|
|
855
|
+
na,
|
|
822
856
|
[
|
|
823
857
|
M(" Header "),
|
|
824
|
-
k("div",
|
|
858
|
+
k("div", aa, [
|
|
825
859
|
i(o(p), {
|
|
826
860
|
variant: "ghost",
|
|
827
|
-
disabled: !
|
|
861
|
+
disabled: !lt.value,
|
|
828
862
|
title: l.texts.previousMonth,
|
|
829
|
-
onClick:
|
|
863
|
+
onClick: Qt
|
|
830
864
|
}, {
|
|
831
865
|
default: b(() => [
|
|
832
866
|
i(
|
|
833
867
|
o(w),
|
|
834
|
-
W(
|
|
868
|
+
W(j(l.icons.back)),
|
|
835
869
|
null,
|
|
836
870
|
16
|
|
837
871
|
/* FULL_PROPS */
|
|
@@ -841,29 +875,31 @@ const Kn = {
|
|
|
841
875
|
/* STABLE */
|
|
842
876
|
}, 8, ["disabled", "title"]),
|
|
843
877
|
i(o(p), {
|
|
844
|
-
|
|
878
|
+
ref: "monthHeader",
|
|
879
|
+
"data-testid": "q-date-time-picker-month-header",
|
|
845
880
|
variant: "ghost",
|
|
846
881
|
label: be(g.value, 3),
|
|
847
882
|
title: l.texts.pickMonth,
|
|
848
|
-
onClick:
|
|
883
|
+
onClick: En
|
|
849
884
|
}, null, 8, ["label", "title"]),
|
|
850
885
|
i(o(p), {
|
|
851
|
-
|
|
886
|
+
ref: "yearHeader",
|
|
887
|
+
"data-testid": "q-date-time-picker-year-header",
|
|
852
888
|
variant: "ghost",
|
|
853
889
|
label: h.value.toString(),
|
|
854
890
|
title: l.texts.pickYear,
|
|
855
|
-
onClick:
|
|
891
|
+
onClick: Fn
|
|
856
892
|
}, null, 8, ["label", "title"]),
|
|
857
893
|
i(o(p), {
|
|
858
894
|
variant: "ghost",
|
|
859
|
-
disabled: !
|
|
895
|
+
disabled: !rt.value,
|
|
860
896
|
title: l.texts.nextMonth,
|
|
861
|
-
onClick:
|
|
897
|
+
onClick: Gt
|
|
862
898
|
}, {
|
|
863
899
|
default: b(() => [
|
|
864
900
|
i(
|
|
865
901
|
o(w),
|
|
866
|
-
W(
|
|
902
|
+
W(j(l.icons.forward)),
|
|
867
903
|
null,
|
|
868
904
|
16
|
|
869
905
|
/* FULL_PROPS */
|
|
@@ -874,17 +910,17 @@ const Kn = {
|
|
|
874
910
|
}, 8, ["disabled", "title"])
|
|
875
911
|
]),
|
|
876
912
|
M(" Weekday Headers "),
|
|
877
|
-
k("div",
|
|
878
|
-
(f(!0),
|
|
879
|
-
|
|
913
|
+
k("div", la, [
|
|
914
|
+
(f(!0), H(
|
|
915
|
+
Y,
|
|
880
916
|
null,
|
|
881
|
-
ge(
|
|
917
|
+
ge(Vt.value, (n) => (f(), H(
|
|
882
918
|
"div",
|
|
883
919
|
{
|
|
884
920
|
key: n,
|
|
885
921
|
class: "q-date-time-picker__weekday"
|
|
886
922
|
},
|
|
887
|
-
|
|
923
|
+
ze(n),
|
|
888
924
|
1
|
|
889
925
|
/* TEXT */
|
|
890
926
|
))),
|
|
@@ -897,19 +933,19 @@ const Kn = {
|
|
|
897
933
|
"div",
|
|
898
934
|
{
|
|
899
935
|
class: "q-date-time-picker__days",
|
|
900
|
-
onMouseleave:
|
|
901
|
-
onFocusout:
|
|
902
|
-
onTouchstartPassive:
|
|
903
|
-
onTouchmovePassive:
|
|
936
|
+
onMouseleave: ut,
|
|
937
|
+
onFocusout: Wt,
|
|
938
|
+
onTouchstartPassive: ot,
|
|
939
|
+
onTouchmovePassive: ot
|
|
904
940
|
},
|
|
905
941
|
[
|
|
906
|
-
(f(!0),
|
|
907
|
-
|
|
942
|
+
(f(!0), H(
|
|
943
|
+
Y,
|
|
908
944
|
null,
|
|
909
|
-
ge(
|
|
945
|
+
ge(et.value, (n, r) => (f(), U(o(p), {
|
|
910
946
|
key: r,
|
|
911
947
|
"data-day-index": r,
|
|
912
|
-
class:
|
|
948
|
+
class: kt([
|
|
913
949
|
"q-date-time-picker__day",
|
|
914
950
|
{
|
|
915
951
|
"q-date-time-picker__day--other-month": !n.isCurrentMonth,
|
|
@@ -921,11 +957,11 @@ const Kn = {
|
|
|
921
957
|
}
|
|
922
958
|
]),
|
|
923
959
|
label: n.date.getDate().toString(),
|
|
924
|
-
variant:
|
|
960
|
+
variant: Rn(n),
|
|
925
961
|
disabled: n.isDisabled,
|
|
926
|
-
onMouseenter: () =>
|
|
927
|
-
onFocus: () =>
|
|
928
|
-
onClick: () =>
|
|
962
|
+
onMouseenter: () => Pe(n.date),
|
|
963
|
+
onFocus: () => Pe(n.date),
|
|
964
|
+
onClick: () => jt(n.date)
|
|
929
965
|
}, null, 8, ["data-day-index", "class", "label", "variant", "disabled", "onMouseenter", "onFocus", "onClick"]))),
|
|
930
966
|
128
|
|
931
967
|
/* KEYED_FRAGMENT */
|
|
@@ -937,41 +973,41 @@ const Kn = {
|
|
|
937
973
|
],
|
|
938
974
|
512
|
|
939
975
|
/* NEED_PATCH */
|
|
940
|
-
)) : D.value === "time" ? (f(),
|
|
941
|
-
|
|
976
|
+
)) : D.value === "time" ? (f(), H(
|
|
977
|
+
Y,
|
|
942
978
|
{ key: 1 },
|
|
943
979
|
[
|
|
944
980
|
M(" Time View "),
|
|
945
|
-
k("div",
|
|
946
|
-
(f(!0),
|
|
947
|
-
|
|
981
|
+
k("div", ra, [
|
|
982
|
+
(f(!0), H(
|
|
983
|
+
Y,
|
|
948
984
|
null,
|
|
949
|
-
ge(l.range ? 2 : 1, (n) => (f(),
|
|
985
|
+
ge(l.range ? 2 : 1, (n) => (f(), H("div", {
|
|
950
986
|
key: n,
|
|
951
987
|
class: "q-date-time-picker__time-group"
|
|
952
988
|
}, [
|
|
953
|
-
Z.value ? (f(),
|
|
954
|
-
i(o(
|
|
955
|
-
"model-value":
|
|
989
|
+
Z.value ? (f(), H("div", ua, [
|
|
990
|
+
i(o(Un), {
|
|
991
|
+
"model-value": an(n - 1),
|
|
956
992
|
"show-state-labels": "",
|
|
957
993
|
size: "small",
|
|
958
994
|
"false-label": l.texts.am,
|
|
959
995
|
"true-label": l.texts.pm,
|
|
960
|
-
"onUpdate:modelValue": (r) =>
|
|
996
|
+
"onUpdate:modelValue": (r) => vn(r ?? !1, n - 1)
|
|
961
997
|
}, null, 8, ["model-value", "false-label", "true-label", "onUpdate:modelValue"])
|
|
962
998
|
])) : M("v-if", !0),
|
|
963
999
|
M(" Time Inputs "),
|
|
964
|
-
k("div",
|
|
965
|
-
k("div",
|
|
1000
|
+
k("div", oa, [
|
|
1001
|
+
k("div", ia, [
|
|
966
1002
|
i(o(p), {
|
|
967
1003
|
variant: "ghost",
|
|
968
1004
|
title: l.texts.increaseHour,
|
|
969
|
-
onClick: (r) =>
|
|
1005
|
+
onClick: (r) => ln(n - 1)
|
|
970
1006
|
}, {
|
|
971
1007
|
default: b(() => [
|
|
972
1008
|
i(
|
|
973
1009
|
o(w),
|
|
974
|
-
|
|
1010
|
+
te({ ref_for: !0 }, l.icons.up),
|
|
975
1011
|
null,
|
|
976
1012
|
16
|
|
977
1013
|
/* FULL_PROPS */
|
|
@@ -980,24 +1016,24 @@ const Kn = {
|
|
|
980
1016
|
_: 1
|
|
981
1017
|
/* STABLE */
|
|
982
1018
|
}, 8, ["title", "onClick"]),
|
|
983
|
-
i(o(
|
|
1019
|
+
i(o(Te), {
|
|
984
1020
|
class: "q-date-time-picker__time-number",
|
|
985
1021
|
size: "small",
|
|
986
1022
|
inputmode: "numeric",
|
|
987
1023
|
"max-length": 2,
|
|
988
|
-
"model-value": o(
|
|
989
|
-
onKeydown: (r) =>
|
|
990
|
-
"onUpdate:modelValue": (r) =>
|
|
1024
|
+
"model-value": o(je)(en(n - 1)),
|
|
1025
|
+
onKeydown: (r) => Le(r, "hours", n - 1),
|
|
1026
|
+
"onUpdate:modelValue": (r) => st(r, n - 1)
|
|
991
1027
|
}, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
|
|
992
1028
|
i(o(p), {
|
|
993
1029
|
variant: "ghost",
|
|
994
1030
|
title: l.texts.decreaseHour,
|
|
995
|
-
onClick: (r) =>
|
|
1031
|
+
onClick: (r) => rn(n - 1)
|
|
996
1032
|
}, {
|
|
997
1033
|
default: b(() => [
|
|
998
1034
|
i(
|
|
999
1035
|
o(w),
|
|
1000
|
-
|
|
1036
|
+
te({ ref_for: !0 }, l.icons.down),
|
|
1001
1037
|
null,
|
|
1002
1038
|
16
|
|
1003
1039
|
/* FULL_PROPS */
|
|
@@ -1014,16 +1050,16 @@ const Kn = {
|
|
|
1014
1050
|
-1
|
|
1015
1051
|
/* CACHED */
|
|
1016
1052
|
)),
|
|
1017
|
-
k("div",
|
|
1053
|
+
k("div", sa, [
|
|
1018
1054
|
i(o(p), {
|
|
1019
1055
|
variant: "ghost",
|
|
1020
1056
|
title: l.texts.increaseMinute,
|
|
1021
|
-
onClick: (r) =>
|
|
1057
|
+
onClick: (r) => un(n - 1)
|
|
1022
1058
|
}, {
|
|
1023
1059
|
default: b(() => [
|
|
1024
1060
|
i(
|
|
1025
1061
|
o(w),
|
|
1026
|
-
|
|
1062
|
+
te({ ref_for: !0 }, l.icons.up),
|
|
1027
1063
|
null,
|
|
1028
1064
|
16
|
|
1029
1065
|
/* FULL_PROPS */
|
|
@@ -1032,24 +1068,24 @@ const Kn = {
|
|
|
1032
1068
|
_: 1
|
|
1033
1069
|
/* STABLE */
|
|
1034
1070
|
}, 8, ["title", "onClick"]),
|
|
1035
|
-
i(o(
|
|
1071
|
+
i(o(Te), {
|
|
1036
1072
|
class: "q-date-time-picker__time-number",
|
|
1037
1073
|
size: "small",
|
|
1038
1074
|
inputmode: "numeric",
|
|
1039
1075
|
"max-length": 2,
|
|
1040
|
-
"model-value": o(
|
|
1041
|
-
onKeydown: (r) =>
|
|
1042
|
-
"onUpdate:modelValue": (r) =>
|
|
1076
|
+
"model-value": o(je)(tn(n - 1)),
|
|
1077
|
+
onKeydown: (r) => Le(r, "minutes", n - 1),
|
|
1078
|
+
"onUpdate:modelValue": (r) => ct(r, n - 1)
|
|
1043
1079
|
}, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
|
|
1044
1080
|
i(o(p), {
|
|
1045
1081
|
variant: "ghost",
|
|
1046
1082
|
title: l.texts.decreaseMinute,
|
|
1047
|
-
onClick: (r) =>
|
|
1083
|
+
onClick: (r) => on(n - 1)
|
|
1048
1084
|
}, {
|
|
1049
1085
|
default: b(() => [
|
|
1050
1086
|
i(
|
|
1051
1087
|
o(w),
|
|
1052
|
-
|
|
1088
|
+
te({ ref_for: !0 }, l.icons.down),
|
|
1053
1089
|
null,
|
|
1054
1090
|
16
|
|
1055
1091
|
/* FULL_PROPS */
|
|
@@ -1059,8 +1095,8 @@ const Kn = {
|
|
|
1059
1095
|
/* STABLE */
|
|
1060
1096
|
}, 8, ["title", "onClick"])
|
|
1061
1097
|
]),
|
|
1062
|
-
ye.value ? (f(),
|
|
1063
|
-
|
|
1098
|
+
ye.value ? (f(), H(
|
|
1099
|
+
Y,
|
|
1064
1100
|
{ key: 0 },
|
|
1065
1101
|
[
|
|
1066
1102
|
t[0] || (t[0] = k(
|
|
@@ -1070,16 +1106,16 @@ const Kn = {
|
|
|
1070
1106
|
-1
|
|
1071
1107
|
/* CACHED */
|
|
1072
1108
|
)),
|
|
1073
|
-
k("div",
|
|
1109
|
+
k("div", ca, [
|
|
1074
1110
|
i(o(p), {
|
|
1075
1111
|
variant: "ghost",
|
|
1076
1112
|
title: l.texts.increaseSecond,
|
|
1077
|
-
onClick: (r) =>
|
|
1113
|
+
onClick: (r) => sn(n - 1)
|
|
1078
1114
|
}, {
|
|
1079
1115
|
default: b(() => [
|
|
1080
1116
|
i(
|
|
1081
1117
|
o(w),
|
|
1082
|
-
|
|
1118
|
+
te({ ref_for: !0 }, l.icons.up),
|
|
1083
1119
|
null,
|
|
1084
1120
|
16
|
|
1085
1121
|
/* FULL_PROPS */
|
|
@@ -1088,24 +1124,24 @@ const Kn = {
|
|
|
1088
1124
|
_: 1
|
|
1089
1125
|
/* STABLE */
|
|
1090
1126
|
}, 8, ["title", "onClick"]),
|
|
1091
|
-
i(o(
|
|
1127
|
+
i(o(Te), {
|
|
1092
1128
|
class: "q-date-time-picker__time-number",
|
|
1093
1129
|
size: "small",
|
|
1094
1130
|
inputmode: "numeric",
|
|
1095
1131
|
"max-length": 2,
|
|
1096
|
-
"model-value": o(
|
|
1097
|
-
onKeydown: (r) =>
|
|
1098
|
-
"onUpdate:modelValue": (r) =>
|
|
1132
|
+
"model-value": o(je)(nn(n - 1)),
|
|
1133
|
+
onKeydown: (r) => Le(r, "seconds", n - 1),
|
|
1134
|
+
"onUpdate:modelValue": (r) => dt(r, n - 1)
|
|
1099
1135
|
}, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
|
|
1100
1136
|
i(o(p), {
|
|
1101
1137
|
variant: "ghost",
|
|
1102
1138
|
title: l.texts.decreaseSecond,
|
|
1103
|
-
onClick: (r) =>
|
|
1139
|
+
onClick: (r) => cn(n - 1)
|
|
1104
1140
|
}, {
|
|
1105
1141
|
default: b(() => [
|
|
1106
1142
|
i(
|
|
1107
1143
|
o(w),
|
|
1108
|
-
|
|
1144
|
+
te({ ref_for: !0 }, l.icons.down),
|
|
1109
1145
|
null,
|
|
1110
1146
|
16
|
|
1111
1147
|
/* FULL_PROPS */
|
|
@@ -1128,24 +1164,27 @@ const Kn = {
|
|
|
1128
1164
|
],
|
|
1129
1165
|
2112
|
|
1130
1166
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1131
|
-
)) : D.value === "month" ? (f(),
|
|
1132
|
-
|
|
1167
|
+
)) : D.value === "month" ? (f(), H(
|
|
1168
|
+
Y,
|
|
1133
1169
|
{ key: 2 },
|
|
1134
1170
|
[
|
|
1135
1171
|
M(" Month View "),
|
|
1136
|
-
k("div",
|
|
1137
|
-
(f(!0),
|
|
1138
|
-
|
|
1172
|
+
k("div", da, [
|
|
1173
|
+
(f(!0), H(
|
|
1174
|
+
Y,
|
|
1139
1175
|
null,
|
|
1140
|
-
ge(
|
|
1141
|
-
id: `q-date-time-month-option-${r}`,
|
|
1176
|
+
ge(Yt.value, (n, r) => (f(), U(o(p), {
|
|
1142
1177
|
key: r,
|
|
1178
|
+
ref_for: !0,
|
|
1179
|
+
ref: (u) => It(u, r),
|
|
1180
|
+
"data-testid": "q-date-time-picker-month-option",
|
|
1181
|
+
"data-month-index": r,
|
|
1143
1182
|
disabled: g.value === r,
|
|
1144
1183
|
label: n,
|
|
1145
1184
|
title: be(r),
|
|
1146
1185
|
variant: "ghost",
|
|
1147
|
-
onClick: () =>
|
|
1148
|
-
}, null, 8, ["
|
|
1186
|
+
onClick: () => $(r, !0)
|
|
1187
|
+
}, null, 8, ["data-month-index", "disabled", "label", "title", "onClick"]))),
|
|
1149
1188
|
128
|
|
1150
1189
|
/* KEYED_FRAGMENT */
|
|
1151
1190
|
))
|
|
@@ -1153,23 +1192,23 @@ const Kn = {
|
|
|
1153
1192
|
],
|
|
1154
1193
|
2112
|
|
1155
1194
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1156
|
-
)) : D.value === "year" ? (f(),
|
|
1157
|
-
|
|
1195
|
+
)) : D.value === "year" ? (f(), H(
|
|
1196
|
+
Y,
|
|
1158
1197
|
{ key: 3 },
|
|
1159
1198
|
[
|
|
1160
1199
|
M(" Year View "),
|
|
1161
|
-
k("div",
|
|
1162
|
-
k("div",
|
|
1200
|
+
k("div", fa, [
|
|
1201
|
+
k("div", va, [
|
|
1163
1202
|
i(o(p), {
|
|
1164
1203
|
variant: "ghost",
|
|
1165
|
-
disabled: !
|
|
1204
|
+
disabled: !nt.value,
|
|
1166
1205
|
title: l.texts.previousYears,
|
|
1167
|
-
onClick:
|
|
1206
|
+
onClick: At
|
|
1168
1207
|
}, {
|
|
1169
1208
|
default: b(() => [
|
|
1170
1209
|
i(
|
|
1171
1210
|
o(w),
|
|
1172
|
-
W(
|
|
1211
|
+
W(j(l.icons.back)),
|
|
1173
1212
|
null,
|
|
1174
1213
|
16
|
|
1175
1214
|
/* FULL_PROPS */
|
|
@@ -1180,21 +1219,21 @@ const Kn = {
|
|
|
1180
1219
|
}, 8, ["disabled", "title"]),
|
|
1181
1220
|
k(
|
|
1182
1221
|
"div",
|
|
1183
|
-
|
|
1184
|
-
|
|
1222
|
+
ma,
|
|
1223
|
+
ze(ke.value.startYear) + " - " + ze(ke.value.endYear),
|
|
1185
1224
|
1
|
|
1186
1225
|
/* TEXT */
|
|
1187
1226
|
),
|
|
1188
1227
|
i(o(p), {
|
|
1189
1228
|
variant: "ghost",
|
|
1190
|
-
disabled: !
|
|
1229
|
+
disabled: !at.value,
|
|
1191
1230
|
title: l.texts.nextYears,
|
|
1192
|
-
onClick:
|
|
1231
|
+
onClick: Lt
|
|
1193
1232
|
}, {
|
|
1194
1233
|
default: b(() => [
|
|
1195
1234
|
i(
|
|
1196
1235
|
o(w),
|
|
1197
|
-
W(
|
|
1236
|
+
W(j(l.icons.forward)),
|
|
1198
1237
|
null,
|
|
1199
1238
|
16
|
|
1200
1239
|
/* FULL_PROPS */
|
|
@@ -1204,19 +1243,22 @@ const Kn = {
|
|
|
1204
1243
|
/* STABLE */
|
|
1205
1244
|
}, 8, ["disabled", "title"])
|
|
1206
1245
|
]),
|
|
1207
|
-
k("div",
|
|
1208
|
-
(f(!0),
|
|
1209
|
-
|
|
1246
|
+
k("div", pa, [
|
|
1247
|
+
(f(!0), H(
|
|
1248
|
+
Y,
|
|
1210
1249
|
null,
|
|
1211
|
-
ge(
|
|
1212
|
-
id: `q-date-time-year-${n}`,
|
|
1250
|
+
ge(Kt.value, (n, r) => (f(), U(o(p), {
|
|
1213
1251
|
key: r,
|
|
1252
|
+
ref_for: !0,
|
|
1253
|
+
ref: (u) => Rt(u, n),
|
|
1254
|
+
"data-testid": "q-date-time-picker-year-option",
|
|
1255
|
+
"data-year": n,
|
|
1214
1256
|
disabled: h.value === n,
|
|
1215
1257
|
label: n.toString(),
|
|
1216
1258
|
title: n,
|
|
1217
1259
|
variant: "ghost",
|
|
1218
|
-
onClick: () =>
|
|
1219
|
-
}, null, 8, ["
|
|
1260
|
+
onClick: () => re(n, !0)
|
|
1261
|
+
}, null, 8, ["data-year", "disabled", "label", "title", "onClick"]))),
|
|
1220
1262
|
128
|
|
1221
1263
|
/* KEYED_FRAGMENT */
|
|
1222
1264
|
))
|
|
@@ -1226,18 +1268,18 @@ const Kn = {
|
|
|
1226
1268
|
2112
|
|
1227
1269
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1228
1270
|
)) : M("v-if", !0),
|
|
1229
|
-
k("div",
|
|
1271
|
+
k("div", ga, [
|
|
1230
1272
|
J.value ? M("v-if", !0) : (f(), U(o(p), {
|
|
1231
1273
|
key: 0,
|
|
1232
1274
|
variant: "ghost",
|
|
1233
|
-
disabled:
|
|
1275
|
+
disabled: xt.value,
|
|
1234
1276
|
title: l.texts.today,
|
|
1235
|
-
onClick:
|
|
1277
|
+
onClick: Xt
|
|
1236
1278
|
}, {
|
|
1237
1279
|
default: b(() => [
|
|
1238
1280
|
i(
|
|
1239
1281
|
o(w),
|
|
1240
|
-
W(
|
|
1282
|
+
W(j(l.icons.today)),
|
|
1241
1283
|
null,
|
|
1242
1284
|
16
|
|
1243
1285
|
/* FULL_PROPS */
|
|
@@ -1246,17 +1288,18 @@ const Kn = {
|
|
|
1246
1288
|
_: 1
|
|
1247
1289
|
/* STABLE */
|
|
1248
1290
|
}, 8, ["disabled", "title"])),
|
|
1249
|
-
|
|
1291
|
+
ne.value && D.value === "date" ? (f(), U(o(p), {
|
|
1250
1292
|
key: 1,
|
|
1251
|
-
|
|
1293
|
+
ref: "toggleTime",
|
|
1294
|
+
"data-testid": "q-date-time-picker-toggle-time",
|
|
1252
1295
|
variant: "ghost",
|
|
1253
1296
|
title: l.texts.toggleMode,
|
|
1254
|
-
onClick:
|
|
1297
|
+
onClick: bt
|
|
1255
1298
|
}, {
|
|
1256
1299
|
default: b(() => [
|
|
1257
1300
|
i(
|
|
1258
1301
|
o(w),
|
|
1259
|
-
W(
|
|
1302
|
+
W(j(l.icons.clock)),
|
|
1260
1303
|
null,
|
|
1261
1304
|
16
|
|
1262
1305
|
/* FULL_PROPS */
|
|
@@ -1266,15 +1309,15 @@ const Kn = {
|
|
|
1266
1309
|
/* STABLE */
|
|
1267
1310
|
}, 8, ["title"])) : D.value !== "date" && !J.value ? (f(), U(o(p), {
|
|
1268
1311
|
key: 2,
|
|
1269
|
-
|
|
1312
|
+
"data-testid": "q-date-time-picker-toggle-date",
|
|
1270
1313
|
variant: "ghost",
|
|
1271
1314
|
title: l.texts.toggleMode,
|
|
1272
|
-
onClick:
|
|
1315
|
+
onClick: qn
|
|
1273
1316
|
}, {
|
|
1274
1317
|
default: b(() => [
|
|
1275
1318
|
i(
|
|
1276
1319
|
o(w),
|
|
1277
|
-
W(
|
|
1320
|
+
W(j(l.icons.calendar)),
|
|
1278
1321
|
null,
|
|
1279
1322
|
16
|
|
1280
1323
|
/* FULL_PROPS */
|
|
@@ -1285,15 +1328,16 @@ const Kn = {
|
|
|
1285
1328
|
}, 8, ["title"])) : M("v-if", !0),
|
|
1286
1329
|
l.clearable ? (f(), U(o(p), {
|
|
1287
1330
|
key: 3,
|
|
1331
|
+
"data-testid": "q-date-time-picker-clear",
|
|
1288
1332
|
variant: "ghost",
|
|
1289
|
-
disabled: !
|
|
1333
|
+
disabled: !Ye.value,
|
|
1290
1334
|
title: l.texts.clearValue,
|
|
1291
|
-
onClick:
|
|
1335
|
+
onClick: Ut
|
|
1292
1336
|
}, {
|
|
1293
1337
|
default: b(() => [
|
|
1294
1338
|
i(
|
|
1295
1339
|
o(w),
|
|
1296
|
-
W(
|
|
1340
|
+
W(j(l.icons.delete)),
|
|
1297
1341
|
null,
|
|
1298
1342
|
16
|
|
1299
1343
|
/* FULL_PROPS */
|
|
@@ -1319,5 +1363,5 @@ const Kn = {
|
|
|
1319
1363
|
}
|
|
1320
1364
|
});
|
|
1321
1365
|
export {
|
|
1322
|
-
|
|
1366
|
+
xa as default
|
|
1323
1367
|
};
|