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