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