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