@wssto2/vue-core 0.12.1 → 0.13.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 +33 -0
- package/README.md +4 -2
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CzQbD2Pc.js → AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js} +1 -1
- package/dist/{Activity-CdkJW68R.js → Activity-ChfxdvXf.js} +24 -23
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js} +33 -33
- package/dist/{Changes-DxK_QfiB.js → Changes-BCa43_mO.js} +18 -17
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js → CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js → DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js → DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js} +2 -2
- package/dist/{DeadLetters-DnA7LP1w.js → DeadLetters-wFTqhISU.js} +5 -5
- package/dist/{General-2matxl2Y.js → General-jW7u4MjH.js} +16 -15
- package/dist/{IncidentRecord-Bt3G4HlX.js → IncidentRecord-zTemLz2R.js} +6 -6
- package/dist/{IncidentsList-2iwgqp9J.js → IncidentsList-yu0xSMrH.js} +6 -6
- package/dist/{NewRolePage-DhGFwvk3.js → NewRolePage-CQ5UVaHs.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js → NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js → PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js} +2 -2
- package/dist/{ProfilePage-CpuyDBAv.js → ProfilePage-Ca3x3UAH.js} +79 -77
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js → RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js → ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js → RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js} +2 -2
- package/dist/{RolePage-DaNv049g.js → RolePage-BUj1w1m1.js} +5 -5
- package/dist/{RolesPage-6hlzJes_.js → RolesPage-NKzBUsrM.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js} +2 -2
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js} +10 -9
- package/dist/{ServiceAccountRecord-0-JF5lRx.js → ServiceAccountRecord-ClbyeLhL.js} +8 -8
- package/dist/{ServiceAccountsList-DcsnOcf-.js → ServiceAccountsList-B2VDnYxD.js} +5 -5
- package/dist/{Sessions-DgWhpk-i.js → Sessions-BjkciyHH.js} +23 -21
- package/dist/{SettingsPage-BXPWATYU.js → SettingsPage-Csb14qsx.js} +7 -7
- package/dist/{SignIn-DPoUwHZd.js → SignIn-DPFMv4C7.js} +14 -12
- package/dist/{SignInPage-OyrVemro.js → SignInPage-DukoFqkt.js} +2 -2
- package/dist/{SignIns-BMDrZVVp.js → SignIns-DvdpNkiS.js} +23 -22
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js → TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js} +2 -2
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js → Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js} +1 -1
- package/dist/{UserRecord-BW-gdCqi.js → UserRecord-B9SeSWQh.js} +57 -55
- package/dist/{UsersList-B3ZF_1Dj.js → UsersList-CREG8q3l.js} +4 -4
- package/dist/access/index.js +4 -4
- package/dist/app/application.d.ts +14 -6
- package/dist/app/current.d.ts +11 -0
- package/dist/app/environment.d.ts +8 -0
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +14 -12
- package/dist/application-DomS6sbx.js +435 -0
- package/dist/collection/http.d.ts +16 -1
- package/dist/collection/index.d.ts +1 -1
- package/dist/collection/index.js +34 -32
- package/dist/content/Money.vue.d.ts +1 -1
- package/dist/content/index.js +151 -158
- package/dist/{contributions-CeG4bszd.js → contributions-obnyn03x.js} +1 -1
- package/dist/current-B0lHKTWr.js +17 -0
- package/dist/form/DateField.vue.d.ts +2 -2
- package/dist/form/DateTimeField.vue.d.ts +2 -2
- package/dist/form/MoneyField.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +1 -1
- package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
- package/dist/form/date/days.d.ts +3 -3
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1111 -1081
- package/dist/form/zodErrorMap.d.ts +35 -0
- package/dist/format/format.d.ts +51 -6
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/format-DoKs29bZ.js +118 -0
- package/dist/{guards-Biv_SlGn.js → guards-DGcSfTEh.js} +1 -1
- package/dist/http-DOEfFCDA.js +107 -0
- package/dist/i18n/index.js +15 -15
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.js +43 -40
- package/dist/identity/usePreferences.d.ts +19 -0
- package/dist/incidents/clientErrorReporter.d.ts +2 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-kEHY7hcG.js → index-Be9Q1PB_.js} +78 -76
- package/dist/{index-Cq9TuOqH.js → index-DZikGJ8L.js} +457 -511
- package/dist/{index-ClJeyW3F.js → index-D_yyd4C2.js} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +5 -2
- package/dist/modules/identity/entities.d.ts +4 -0
- package/dist/modules/identity/routes.d.ts +5 -2
- package/dist/modules/identity/schemas.d.ts +6 -2
- package/dist/modules/incident/routes.d.ts +2 -0
- package/dist/modules/incident/schemas.d.ts +2 -0
- package/dist/{navigation-TnVFYRaX.js → navigation-CctcxT51.js} +1 -1
- package/dist/{neighbors-OyvGi233.js → neighbors-Csfan8Ho.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/Tip.vue.d.ts +41 -0
- package/dist/onboarding/index.d.ts +1 -0
- package/dist/onboarding/index.js +145 -0
- package/dist/onboarding/tips.d.ts +5 -0
- package/dist/page/index.js +3 -3
- package/dist/phone/index.js +74 -74
- package/dist/phone/phone.d.ts +3 -3
- package/dist/platform/httpSession.d.ts +1 -1
- package/dist/platform/index.d.ts +2 -0
- package/dist/platform/index.js +16 -13
- package/dist/platform/preferences.d.ts +35 -0
- package/dist/platform/session.d.ts +6 -1
- package/dist/platform-DtISOEt7.js +284 -0
- package/dist/playwright/session.d.ts +2 -0
- package/dist/preferences-hYhrw8Uy.js +91 -0
- package/dist/resource/index.d.ts +1 -0
- package/dist/resource/index.js +24 -8
- package/dist/resource/read.d.ts +16 -0
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-BsKEzEME.js → rowLayout-y1IB_h2r.js} +2 -2
- package/dist/{sections-CvUwZ-S1.js → sections-fkW_IJLc.js} +1 -1
- package/dist/{serverMessages-B6GHgi40.js → serverMessages-Ddghrewh.js} +1 -1
- package/dist/shell/darkMode.d.ts +13 -8
- package/dist/shell/index.js +396 -384
- package/dist/{state-6KSYsVw0.js → state-CXMexi0l.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/app.d.ts +11 -0
- package/dist/testing/format.d.ts +4 -2
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +96 -89
- package/dist/testing/platform.d.ts +2 -0
- package/dist/usePreferences-B8LIZp_f.js +47 -0
- package/dist/{useTypedEntry-C_Bk4sI0.js → useTypedEntry-DKs8I1yP.js} +279 -280
- package/package.json +6 -2
- package/src/styles/components.css +17 -0
- package/dist/application-CuzT-0vW.js +0 -420
- package/dist/format-D8KUBmbS.js +0 -87
- package/dist/http-Dm0uXY9O.js +0 -95
- package/dist/intlLocale-CeRU44qJ.js +0 -4
- package/dist/platform-BQOX_Ntw.js +0 -283
|
@@ -1,128 +1,127 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { _ as Oe } from "./Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js";
|
|
1
|
+
import { defineComponent as B, ref as I, watch as oe, computed as _, openBlock as f, createElementBlock as b, Fragment as A, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Pe, toDisplayString as M, renderList as j, useModel as de, useId as De, useTemplateRef as ce, createCommentVNode as G, createBlock as ie, mergeModels as me, nextTick as Te, onMounted as Ee, onBeforeUnmount as Fe, normalizeStyle as X, withCtx as he } from "vue";
|
|
2
|
+
import { useI18n as J } from "vue-i18n";
|
|
3
|
+
import { u as Ce } from "./format-DoKs29bZ.js";
|
|
4
|
+
import { _ as je } from "./Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js";
|
|
6
5
|
import { _ as F } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
7
|
-
import { a as
|
|
8
|
-
const
|
|
6
|
+
import { a as Oe } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
+
const We = /^(\d{4})-(\d{2})-(\d{2})$/, Me = 864e5, W = (e, t = 2) => String(e).padStart(t, "0"), Re = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], He = (e) => e % 4 === 0 && e % 100 !== 0 || e % 400 === 0, re = (e, t) => t === 2 && He(e) ? 29 : Re[t - 1] ?? 0;
|
|
9
8
|
function O(e, t, a) {
|
|
10
|
-
return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a >
|
|
9
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a > re(e, t) ? null : `${W(e, 4)}-${W(t)}-${W(a)}`;
|
|
11
10
|
}
|
|
12
|
-
function
|
|
13
|
-
const t = e ?
|
|
11
|
+
function R(e) {
|
|
12
|
+
const t = e ? We.exec(e) : null;
|
|
14
13
|
if (!t) return null;
|
|
15
14
|
const a = { year: Number(t[1]), month: Number(t[2]), day: Number(t[3]) };
|
|
16
15
|
return O(a.year, a.month, a.day) ? a : null;
|
|
17
16
|
}
|
|
18
|
-
const
|
|
19
|
-
function
|
|
17
|
+
const ne = (e) => R(e) !== null, Ve = (e) => `${W(e.year, 4)}-${W(e.month)}-${W(e.day)}`;
|
|
18
|
+
function Ne(e) {
|
|
20
19
|
const t = /* @__PURE__ */ new Date(0);
|
|
21
|
-
return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() /
|
|
20
|
+
return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() / Me);
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
const t = new Date(e *
|
|
22
|
+
function Be(e) {
|
|
23
|
+
const t = new Date(e * Me);
|
|
25
24
|
return { year: t.getUTCFullYear(), month: t.getUTCMonth() + 1, day: t.getUTCDate() };
|
|
26
25
|
}
|
|
27
|
-
const
|
|
28
|
-
function
|
|
29
|
-
return
|
|
26
|
+
const se = (e) => R(e) ?? { year: 1970, month: 1, day: 1 };
|
|
27
|
+
function U(e, t) {
|
|
28
|
+
return Ve(Be(Ne(se(e)) + t));
|
|
30
29
|
}
|
|
31
|
-
function
|
|
32
|
-
const a =
|
|
33
|
-
return O(u, m, Math.min(a.day,
|
|
30
|
+
function H(e, t) {
|
|
31
|
+
const a = se(e), n = a.year * 12 + (a.month - 1) + t, u = Math.floor(n / 12), m = n % 12 + 1;
|
|
32
|
+
return O(u, m, Math.min(a.day, re(u, m))) ?? e;
|
|
34
33
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
const t =
|
|
38
|
-
return
|
|
34
|
+
const ye = (e, t) => H(e, t * 12);
|
|
35
|
+
function le(e) {
|
|
36
|
+
const t = se(e);
|
|
37
|
+
return Ve({ ...t, day: re(t.year, t.month) });
|
|
39
38
|
}
|
|
40
|
-
function
|
|
41
|
-
const t = (
|
|
39
|
+
function fe(e) {
|
|
40
|
+
const t = (Ne(se(e)) + 3) % 7;
|
|
42
41
|
return (t < 0 ? t + 7 : t) + 1;
|
|
43
42
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
43
|
+
function ve(e, t) {
|
|
44
|
+
return U(e, -((fe(e) - t + 7) % 7));
|
|
46
45
|
}
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
let t =
|
|
50
|
-
for (;
|
|
46
|
+
const Ke = (e, t) => U(ve(e, t), 6);
|
|
47
|
+
function Qe(e) {
|
|
48
|
+
let t = U(e, 1);
|
|
49
|
+
for (; fe(t) >= 6; ) t = U(t, 1);
|
|
51
50
|
return t;
|
|
52
51
|
}
|
|
53
|
-
function
|
|
52
|
+
function ue(e = /* @__PURE__ */ new Date()) {
|
|
54
53
|
return O(e.getFullYear(), e.getMonth() + 1, e.getDate()) ?? "1970-01-01";
|
|
55
54
|
}
|
|
56
|
-
function
|
|
55
|
+
function qe(e, t) {
|
|
57
56
|
if (t.min && e < t.min || t.max && e > t.max) return !0;
|
|
58
57
|
const a = t.disabled;
|
|
59
58
|
return a ? typeof a == "function" ? a(e) : a.some((n) => typeof n == "string" ? n === e : e >= n.from && e <= n.to) : !1;
|
|
60
59
|
}
|
|
61
|
-
function
|
|
60
|
+
function ee(e, t) {
|
|
62
61
|
return t.min && e < t.min ? t.min : t.max && e > t.max ? t.max : e;
|
|
63
62
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
63
|
+
function Ge(e) {
|
|
64
|
+
return Se(e)?.firstDay ?? 1;
|
|
66
65
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
66
|
+
function Ze(e) {
|
|
67
|
+
return Se(e)?.weekend ?? [6, 7];
|
|
69
68
|
}
|
|
70
|
-
function
|
|
69
|
+
function Se(e) {
|
|
71
70
|
try {
|
|
72
|
-
const t = new Intl.Locale(
|
|
71
|
+
const t = new Intl.Locale(e);
|
|
73
72
|
return t.getWeekInfo?.() ?? t.weekInfo ?? null;
|
|
74
73
|
} catch {
|
|
75
74
|
return null;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
function
|
|
79
|
-
const n = O(e, t, 1) ?? "1970-01-01", u =
|
|
80
|
-
for (let r =
|
|
77
|
+
function Je(e, t, a) {
|
|
78
|
+
const n = O(e, t, 1) ?? "1970-01-01", u = le(n), m = [];
|
|
79
|
+
for (let r = ve(n, a.firstWeekday); r <= u; r = U(r, 7))
|
|
81
80
|
m.push(
|
|
82
81
|
Array.from({ length: 7 }, (d, o) => {
|
|
83
|
-
const c =
|
|
82
|
+
const c = U(r, o);
|
|
84
83
|
return {
|
|
85
84
|
day: c,
|
|
86
85
|
date: Number(c.slice(8)),
|
|
87
86
|
inMonth: c.startsWith(n.slice(0, 7)),
|
|
88
|
-
weekend: a.weekend.includes(
|
|
87
|
+
weekend: a.weekend.includes(fe(c)),
|
|
89
88
|
today: c === a.today,
|
|
90
89
|
selected: c === a.selected,
|
|
91
|
-
disabled:
|
|
90
|
+
disabled: qe(c, a.rules)
|
|
92
91
|
};
|
|
93
92
|
})
|
|
94
93
|
);
|
|
95
94
|
return m;
|
|
96
95
|
}
|
|
97
|
-
function
|
|
96
|
+
function Xe(e, t, a, n) {
|
|
98
97
|
switch (t) {
|
|
99
98
|
case "ArrowLeft":
|
|
100
|
-
return
|
|
99
|
+
return U(e, -1);
|
|
101
100
|
case "ArrowRight":
|
|
102
|
-
return
|
|
101
|
+
return U(e, 1);
|
|
103
102
|
case "ArrowUp":
|
|
104
|
-
return
|
|
103
|
+
return U(e, -7);
|
|
105
104
|
case "ArrowDown":
|
|
106
|
-
return
|
|
105
|
+
return U(e, 7);
|
|
107
106
|
case "PageUp":
|
|
108
|
-
return a ?
|
|
107
|
+
return a ? ye(e, -1) : H(e, -1);
|
|
109
108
|
case "PageDown":
|
|
110
|
-
return a ?
|
|
109
|
+
return a ? ye(e, 1) : H(e, 1);
|
|
111
110
|
case "Home":
|
|
112
|
-
return
|
|
111
|
+
return ve(e, n);
|
|
113
112
|
case "End":
|
|
114
|
-
return
|
|
113
|
+
return Ke(e, n);
|
|
115
114
|
default:
|
|
116
115
|
return null;
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
|
-
const
|
|
118
|
+
const et = {
|
|
120
119
|
class: "flex flex-col gap-2",
|
|
121
120
|
"data-test": "month-year-panel"
|
|
122
|
-
},
|
|
121
|
+
}, tt = { class: "flex items-center" }, at = ["disabled", "aria-label"], nt = ["aria-label"], lt = ["disabled", "aria-label"], ot = { class: "grid grid-cols-3 gap-1.5" }, rt = ["aria-pressed", "aria-label", "disabled", "onClick"], st = { class: "flex items-center" }, it = ["disabled", "aria-label"], ut = {
|
|
123
122
|
class: "grow text-center text-body font-semibold tabular-nums",
|
|
124
123
|
"aria-live": "polite"
|
|
125
|
-
},
|
|
124
|
+
}, dt = ["disabled", "aria-label"], ct = { class: "grid grid-cols-3 gap-1.5" }, mt = ["aria-pressed", "disabled", "onClick"], te = "flex size-8 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", xe = "min-h-9 cursor-pointer rounded-full px-1 text-subheadline focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-fill", ft = /* @__PURE__ */ B({
|
|
126
125
|
__name: "MonthYearPanel",
|
|
127
126
|
props: {
|
|
128
127
|
month: { default: null },
|
|
@@ -134,8 +133,8 @@ const tt = {
|
|
|
134
133
|
},
|
|
135
134
|
emits: ["pick"],
|
|
136
135
|
setup(e, { emit: t }) {
|
|
137
|
-
const a = e, n = t, { t: u } =
|
|
138
|
-
|
|
136
|
+
const a = e, n = t, { t: u } = J(), m = (k) => Math.floor(k / 10) * 10, r = I(c(a.year ?? a.viewYear ?? (/* @__PURE__ */ new Date()).getFullYear())), d = I(!1), o = I(m(r.value));
|
|
137
|
+
oe(
|
|
139
138
|
() => a.year,
|
|
140
139
|
(k) => {
|
|
141
140
|
k !== null && (r.value = c(k));
|
|
@@ -145,110 +144,110 @@ const tt = {
|
|
|
145
144
|
return Math.min(a.maxYear, Math.max(a.minYear, k));
|
|
146
145
|
}
|
|
147
146
|
const v = _(() => Array.from({ length: 12 }, (k, g) => o.value + g)), w = (k, g) => u(`core.form.months.${g}.${k}`), D = (k) => a.month === k && a.year === r.value;
|
|
148
|
-
function
|
|
147
|
+
function Y() {
|
|
149
148
|
o.value = m(r.value), d.value = !0;
|
|
150
149
|
}
|
|
151
150
|
function S(k) {
|
|
152
151
|
r.value = k, d.value = !1;
|
|
153
152
|
}
|
|
154
153
|
const P = (k) => k ? "bg-tint font-semibold text-content-on-tint" : "bg-fill text-content-strong hover:bg-fill-strong";
|
|
155
|
-
return (k, g) => (f(), b("div",
|
|
156
|
-
d.value ? (f(), b(
|
|
157
|
-
h("div",
|
|
154
|
+
return (k, g) => (f(), b("div", et, [
|
|
155
|
+
d.value ? (f(), b(A, { key: 1 }, [
|
|
156
|
+
h("div", st, [
|
|
158
157
|
h("button", {
|
|
159
158
|
type: "button",
|
|
160
159
|
disabled: o.value <= a.minYear,
|
|
161
160
|
"aria-label": y(u)("core.form.date.previous_years"),
|
|
162
|
-
class: $(
|
|
161
|
+
class: $(te),
|
|
163
162
|
onClick: g[2] || (g[2] = (p) => o.value -= 12)
|
|
164
163
|
}, [
|
|
165
164
|
N(y(F), {
|
|
166
165
|
name: "arrowLeftSLine",
|
|
167
166
|
size: 18
|
|
168
167
|
})
|
|
169
|
-
], 8,
|
|
170
|
-
h("p",
|
|
168
|
+
], 8, it),
|
|
169
|
+
h("p", ut, M(v.value[0]) + " – " + M(v.value[11]), 1),
|
|
171
170
|
h("button", {
|
|
172
171
|
type: "button",
|
|
173
172
|
disabled: o.value + 11 >= a.maxYear,
|
|
174
173
|
"aria-label": y(u)("core.form.date.next_years"),
|
|
175
|
-
class: $(
|
|
174
|
+
class: $(te),
|
|
176
175
|
onClick: g[3] || (g[3] = (p) => o.value += 12)
|
|
177
176
|
}, [
|
|
178
177
|
N(y(F), {
|
|
179
178
|
name: "arrowRightSLine",
|
|
180
179
|
size: 18
|
|
181
180
|
})
|
|
182
|
-
], 8,
|
|
181
|
+
], 8, dt)
|
|
183
182
|
]),
|
|
184
|
-
h("div",
|
|
185
|
-
(f(!0), b(
|
|
183
|
+
h("div", ct, [
|
|
184
|
+
(f(!0), b(A, null, j(v.value, (p) => (f(), b("button", {
|
|
186
185
|
key: p,
|
|
187
186
|
type: "button",
|
|
188
187
|
"aria-pressed": a.year === p,
|
|
189
188
|
disabled: p < a.minYear || p > a.maxYear,
|
|
190
|
-
class: $([
|
|
189
|
+
class: $([xe, "tabular-nums", P(a.year === p || a.year === null && r.value === p)]),
|
|
191
190
|
onClick: (l) => S(p)
|
|
192
|
-
}, M(p), 11,
|
|
191
|
+
}, M(p), 11, mt))), 128))
|
|
193
192
|
])
|
|
194
|
-
], 64)) : (f(), b(
|
|
195
|
-
h("div",
|
|
193
|
+
], 64)) : (f(), b(A, { key: 0 }, [
|
|
194
|
+
h("div", tt, [
|
|
196
195
|
h("button", {
|
|
197
196
|
type: "button",
|
|
198
197
|
disabled: r.value <= a.minYear,
|
|
199
198
|
"aria-label": y(u)("core.form.date.previous_year"),
|
|
200
|
-
class: $(
|
|
199
|
+
class: $(te),
|
|
201
200
|
onClick: g[0] || (g[0] = (p) => r.value = c(r.value - 1))
|
|
202
201
|
}, [
|
|
203
202
|
N(y(F), {
|
|
204
203
|
name: "arrowLeftSLine",
|
|
205
204
|
size: 18
|
|
206
205
|
})
|
|
207
|
-
], 8,
|
|
206
|
+
], 8, at),
|
|
208
207
|
h("button", {
|
|
209
208
|
type: "button",
|
|
210
209
|
"aria-label": y(u)("core.form.date.years"),
|
|
211
210
|
"aria-expanded": "false",
|
|
212
211
|
class: "flex min-h-8 grow cursor-pointer items-center justify-center gap-1 rounded-control text-lg font-semibold tabular-nums hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
213
|
-
onClick:
|
|
212
|
+
onClick: Y
|
|
214
213
|
}, [
|
|
215
|
-
|
|
214
|
+
Pe(M(r.value), 1),
|
|
216
215
|
N(y(F), {
|
|
217
216
|
name: "arrowDownSLine",
|
|
218
217
|
size: 14,
|
|
219
218
|
class: "text-content-link"
|
|
220
219
|
})
|
|
221
|
-
], 8,
|
|
220
|
+
], 8, nt),
|
|
222
221
|
h("button", {
|
|
223
222
|
type: "button",
|
|
224
223
|
disabled: r.value >= a.maxYear,
|
|
225
224
|
"aria-label": y(u)("core.form.date.next_year"),
|
|
226
|
-
class: $(
|
|
225
|
+
class: $(te),
|
|
227
226
|
onClick: g[1] || (g[1] = (p) => r.value = c(r.value + 1))
|
|
228
227
|
}, [
|
|
229
228
|
N(y(F), {
|
|
230
229
|
name: "arrowRightSLine",
|
|
231
230
|
size: 18
|
|
232
231
|
})
|
|
233
|
-
], 8,
|
|
232
|
+
], 8, lt)
|
|
234
233
|
]),
|
|
235
|
-
h("div",
|
|
236
|
-
(f(), b(
|
|
234
|
+
h("div", ot, [
|
|
235
|
+
(f(), b(A, null, j(12, (p) => h("button", {
|
|
237
236
|
key: p,
|
|
238
237
|
type: "button",
|
|
239
238
|
"aria-pressed": D(p),
|
|
240
239
|
"aria-label": `${w(p, "long")} ${r.value}`,
|
|
241
240
|
disabled: a.monthDisabled?.(r.value, p),
|
|
242
|
-
class: $([
|
|
241
|
+
class: $([xe, P(D(p))]),
|
|
243
242
|
onClick: (l) => n("pick", { month: p, year: r.value })
|
|
244
|
-
}, M(w(p, "short")), 11,
|
|
243
|
+
}, M(w(p, "short")), 11, rt)), 64))
|
|
245
244
|
])
|
|
246
245
|
], 64))
|
|
247
246
|
]));
|
|
248
247
|
}
|
|
249
|
-
}),
|
|
248
|
+
}), vt = ["aria-expanded", "aria-label"], bt = ["id"], pt = ["id"], ht = ["disabled", "aria-label"], yt = ["disabled", "aria-label"], xt = ["aria-labelledby"], gt = ["aria-selected"], kt = ["data-day", "aria-label", "aria-current", "aria-disabled", "tabindex", "onClick"], ge = "flex shrink-0 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", _t = /* @__PURE__ */ B({
|
|
250
249
|
__name: "Calendar",
|
|
251
|
-
props: /* @__PURE__ */
|
|
250
|
+
props: /* @__PURE__ */ me({
|
|
252
251
|
min: { default: null },
|
|
253
252
|
max: { default: null },
|
|
254
253
|
disabledDates: { type: [Array, Function], default: void 0 },
|
|
@@ -261,69 +260,69 @@ const tt = {
|
|
|
261
260
|
}),
|
|
262
261
|
emits: ["update:modelValue"],
|
|
263
262
|
setup(e, { expose: t }) {
|
|
264
|
-
const a = e, n =
|
|
263
|
+
const a = e, n = de(e, "modelValue"), { t: u } = J(), m = Ce(), r = De(), d = ce("grid"), o = _(() => ({ min: a.min, max: a.max, disabled: a.disabledDates })), c = _(() => Ge(m.intlLocale));
|
|
265
264
|
function v() {
|
|
266
|
-
return
|
|
265
|
+
return ne(n.value) ? n.value : ee(ne(a.openOn) ? a.openOn : ue(), o.value);
|
|
267
266
|
}
|
|
268
|
-
const w =
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
const w = R(v()), D = I({ year: w.year, month: w.month }), Y = I(v()), S = I(!1);
|
|
268
|
+
oe(n, (i) => {
|
|
269
|
+
ne(i) && P(i);
|
|
271
270
|
});
|
|
272
271
|
function P(i) {
|
|
273
|
-
const x =
|
|
274
|
-
D.value = { year: x.year, month: x.month },
|
|
272
|
+
const x = R(i);
|
|
273
|
+
D.value = { year: x.year, month: x.month }, Y.value = i;
|
|
275
274
|
}
|
|
276
275
|
const k = _(
|
|
277
|
-
() =>
|
|
278
|
-
), g = _(() => O(D.value.year, D.value.month, 1) ?? "1970-01-01"), p = _(() =>
|
|
279
|
-
const i = new Intl.DateTimeFormat(
|
|
276
|
+
() => Je(D.value.year, D.value.month, { firstWeekday: c.value, weekend: Ze(m.intlLocale), today: ue(), selected: n.value, rules: o.value })
|
|
277
|
+
), g = _(() => O(D.value.year, D.value.month, 1) ?? "1970-01-01"), p = _(() => Y.value.startsWith(g.value.slice(0, 7)) ? Y.value : g.value), l = _(() => u("core.form.months.with_year", { month: u(`core.form.months.long.${D.value.month}`), year: D.value.year })), T = _(() => {
|
|
278
|
+
const i = new Intl.DateTimeFormat(m.intlLocale, { weekday: "short", timeZone: "UTC" });
|
|
280
279
|
return Array.from({ length: 7 }, (x, C) => {
|
|
281
|
-
const
|
|
282
|
-
return V.charAt(0).toLocaleUpperCase(
|
|
280
|
+
const Q = new Date(Date.UTC(2026, 8, 28 + (c.value - 1 + C) % 7)), V = i.format(Q).replace(/\.$/, "");
|
|
281
|
+
return V.charAt(0).toLocaleUpperCase(m.intlLocale) + V.slice(1, 2);
|
|
283
282
|
});
|
|
284
283
|
}), s = _(() => {
|
|
285
|
-
const i = new Intl.DateTimeFormat(
|
|
284
|
+
const i = new Intl.DateTimeFormat(m.intlLocale, { dateStyle: "full", timeZone: "UTC" });
|
|
286
285
|
return (x) => {
|
|
287
|
-
const C =
|
|
286
|
+
const C = R(x);
|
|
288
287
|
return i.format(new Date(Date.UTC(C.year, C.month - 1, C.day)));
|
|
289
288
|
};
|
|
290
|
-
}),
|
|
291
|
-
async function
|
|
292
|
-
P(i), x && (await
|
|
289
|
+
}), z = _(() => !a.min || le(H(g.value, -1)) >= a.min), E = _(() => !a.max || H(g.value, 1) <= a.max);
|
|
290
|
+
async function K(i, x) {
|
|
291
|
+
P(i), x && (await Te(), be());
|
|
293
292
|
}
|
|
294
|
-
function
|
|
293
|
+
function be() {
|
|
295
294
|
d.value?.querySelector(`[data-day="${p.value}"]`)?.focus();
|
|
296
295
|
}
|
|
297
|
-
function
|
|
296
|
+
function Ue(i) {
|
|
298
297
|
if (i.altKey || i.ctrlKey || i.metaKey) return;
|
|
299
|
-
const x =
|
|
300
|
-
x && (i.preventDefault(),
|
|
298
|
+
const x = Xe(p.value, i.key, i.shiftKey, c.value);
|
|
299
|
+
x && (i.preventDefault(), K(ee(x, o.value), !0));
|
|
301
300
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
|
|
301
|
+
const pe = (i) => K(ee(H(p.value, i), o.value), !1);
|
|
302
|
+
function Ye(i, x) {
|
|
303
|
+
Y.value = i, x || (n.value = i);
|
|
305
304
|
}
|
|
306
|
-
function
|
|
307
|
-
const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)),
|
|
308
|
-
S.value = !1,
|
|
305
|
+
function ze(i) {
|
|
306
|
+
const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)), re(i.year, i.month)));
|
|
307
|
+
S.value = !1, K(ee(x ?? g.value, o.value), !0);
|
|
309
308
|
}
|
|
310
|
-
const
|
|
309
|
+
const Ae = (i, x) => {
|
|
311
310
|
const C = O(i, x, 1) ?? "";
|
|
312
|
-
return !!a.max && C > a.max || !!a.min &&
|
|
311
|
+
return !!a.max && C > a.max || !!a.min && le(C) < a.min;
|
|
313
312
|
};
|
|
314
|
-
t({ focus:
|
|
315
|
-
const
|
|
316
|
-
function
|
|
313
|
+
t({ focus: be });
|
|
314
|
+
const L = _(() => a.size === "touch");
|
|
315
|
+
function Ie(i) {
|
|
317
316
|
if (i.selected) return "bg-tint font-semibold text-content-on-tint";
|
|
318
317
|
const x = i.disabled ? "cursor-default text-content-disabled line-through decoration-1" : i.inMonth ? i.weekend ? "text-content-muted" : "text-content-strong" : "text-content-disabled", C = i.today ? "font-bold text-content-link ring-[1.5px] ring-inset ring-tint" : "";
|
|
319
318
|
return [x, C, i.disabled ? "" : "hover:bg-fill"].join(" ");
|
|
320
319
|
}
|
|
321
320
|
return (i, x) => (f(), b("div", {
|
|
322
|
-
class: $(["flex flex-col",
|
|
321
|
+
class: $(["flex flex-col", L.value ? "gap-1" : "gap-2"]),
|
|
323
322
|
"data-test": "calendar"
|
|
324
323
|
}, [
|
|
325
324
|
h("div", {
|
|
326
|
-
class: $(["flex items-center gap-1",
|
|
325
|
+
class: $(["flex items-center gap-1", L.value ? "px-1" : ""])
|
|
327
326
|
}, [
|
|
328
327
|
a.monthPicker ? (f(), b("button", {
|
|
329
328
|
key: 0,
|
|
@@ -336,79 +335,79 @@ const tt = {
|
|
|
336
335
|
h("span", {
|
|
337
336
|
id: y(r),
|
|
338
337
|
"aria-live": "polite"
|
|
339
|
-
}, M(l.value), 9,
|
|
338
|
+
}, M(l.value), 9, bt),
|
|
340
339
|
N(y(F), {
|
|
341
340
|
name: "arrowDownSLine",
|
|
342
341
|
size: 14,
|
|
343
342
|
class: "text-content-link"
|
|
344
343
|
})
|
|
345
|
-
], 8,
|
|
344
|
+
], 8, vt)) : (f(), b("p", {
|
|
346
345
|
key: 1,
|
|
347
346
|
id: y(r),
|
|
348
347
|
"aria-live": "polite",
|
|
349
|
-
class: $(["ml-1.5 font-semibold",
|
|
350
|
-
}, M(l.value), 11,
|
|
348
|
+
class: $(["ml-1.5 font-semibold", L.value ? "text-headline" : "text-lg"])
|
|
349
|
+
}, M(l.value), 11, pt)),
|
|
351
350
|
x[3] || (x[3] = h("span", { class: "grow" }, null, -1)),
|
|
352
|
-
S.value ?
|
|
351
|
+
S.value ? G("", !0) : (f(), b(A, { key: 2 }, [
|
|
353
352
|
h("button", {
|
|
354
353
|
type: "button",
|
|
355
|
-
disabled: !
|
|
354
|
+
disabled: !z.value,
|
|
356
355
|
"aria-label": y(u)("core.form.date.previous_month"),
|
|
357
|
-
class: $([
|
|
358
|
-
onClick: x[1] || (x[1] = (C) =>
|
|
356
|
+
class: $([ge, L.value ? "size-11" : "size-8"]),
|
|
357
|
+
onClick: x[1] || (x[1] = (C) => pe(-1))
|
|
359
358
|
}, [
|
|
360
359
|
N(y(F), {
|
|
361
360
|
name: "arrowLeftSLine",
|
|
362
|
-
size:
|
|
361
|
+
size: L.value ? 22 : 18
|
|
363
362
|
}, null, 8, ["size"])
|
|
364
|
-
], 10,
|
|
363
|
+
], 10, ht),
|
|
365
364
|
h("button", {
|
|
366
365
|
type: "button",
|
|
367
366
|
disabled: !E.value,
|
|
368
367
|
"aria-label": y(u)("core.form.date.next_month"),
|
|
369
|
-
class: $([
|
|
370
|
-
onClick: x[2] || (x[2] = (C) =>
|
|
368
|
+
class: $([ge, L.value ? "size-11" : "size-8"]),
|
|
369
|
+
onClick: x[2] || (x[2] = (C) => pe(1))
|
|
371
370
|
}, [
|
|
372
371
|
N(y(F), {
|
|
373
372
|
name: "arrowRightSLine",
|
|
374
|
-
size:
|
|
373
|
+
size: L.value ? 22 : 18
|
|
375
374
|
}, null, 8, ["size"])
|
|
376
|
-
], 10,
|
|
375
|
+
], 10, yt)
|
|
377
376
|
], 64))
|
|
378
377
|
], 2),
|
|
379
|
-
S.value ? (f(),
|
|
378
|
+
S.value ? (f(), ie(ft, {
|
|
380
379
|
key: 0,
|
|
381
380
|
month: D.value.month,
|
|
382
381
|
year: D.value.year,
|
|
383
382
|
"min-year": a.min ? Number(a.min.slice(0, 4)) : 1,
|
|
384
383
|
"max-year": a.max ? Number(a.max.slice(0, 4)) : 9999,
|
|
385
|
-
"month-disabled":
|
|
386
|
-
onPick:
|
|
384
|
+
"month-disabled": Ae,
|
|
385
|
+
onPick: ze
|
|
387
386
|
}, null, 8, ["month", "year", "min-year", "max-year"])) : (f(), b("div", {
|
|
388
387
|
key: 1,
|
|
389
388
|
ref_key: "grid",
|
|
390
389
|
ref: d,
|
|
391
390
|
role: "grid",
|
|
392
391
|
"aria-labelledby": y(r),
|
|
393
|
-
class: $(["flex flex-col",
|
|
394
|
-
onKeydown:
|
|
392
|
+
class: $(["flex flex-col", L.value ? "gap-y-1" : "gap-0.5"]),
|
|
393
|
+
onKeydown: Ue
|
|
395
394
|
}, [
|
|
396
395
|
h("div", {
|
|
397
396
|
role: "row",
|
|
398
|
-
class: $(["grid grid-cols-7 text-center",
|
|
397
|
+
class: $(["grid grid-cols-7 text-center", L.value ? "" : "gap-0.5"])
|
|
399
398
|
}, [
|
|
400
|
-
(f(!0), b(
|
|
401
|
-
key:
|
|
399
|
+
(f(!0), b(A, null, j(T.value, (C, Q) => (f(), b("div", {
|
|
400
|
+
key: Q,
|
|
402
401
|
role: "columnheader",
|
|
403
|
-
class: $(["py-1 font-semibold text-content-disabled",
|
|
402
|
+
class: $(["py-1 font-semibold text-content-disabled", L.value ? "text-footnote" : "text-caption"])
|
|
404
403
|
}, M(C), 3))), 128))
|
|
405
404
|
], 2),
|
|
406
|
-
(f(!0), b(
|
|
407
|
-
key:
|
|
405
|
+
(f(!0), b(A, null, j(k.value, (C, Q) => (f(), b("div", {
|
|
406
|
+
key: Q,
|
|
408
407
|
role: "row",
|
|
409
|
-
class: $(["grid grid-cols-7",
|
|
408
|
+
class: $(["grid grid-cols-7", L.value ? "" : "gap-0.5"])
|
|
410
409
|
}, [
|
|
411
|
-
(f(!0), b(
|
|
410
|
+
(f(!0), b(A, null, j(C, (V) => (f(), b("div", {
|
|
412
411
|
key: V.day,
|
|
413
412
|
role: "gridcell",
|
|
414
413
|
"aria-selected": V.selected
|
|
@@ -420,15 +419,15 @@ const tt = {
|
|
|
420
419
|
"aria-current": V.today ? "date" : void 0,
|
|
421
420
|
"aria-disabled": V.disabled || void 0,
|
|
422
421
|
tabindex: V.day === p.value ? 0 : -1,
|
|
423
|
-
class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [
|
|
424
|
-
onClick: (
|
|
425
|
-
}, M(V.date), 11,
|
|
426
|
-
], 8,
|
|
422
|
+
class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [L.value ? "h-11 text-body" : "h-9 text-body", Ie(V)]]),
|
|
423
|
+
onClick: (Kt) => Ye(V.day, V.disabled)
|
|
424
|
+
}, M(V.date), 11, kt)
|
|
425
|
+
], 8, gt))), 128))
|
|
427
426
|
], 2))), 128))
|
|
428
|
-
], 42,
|
|
427
|
+
], 42, xt))
|
|
429
428
|
], 2));
|
|
430
429
|
}
|
|
431
|
-
}),
|
|
430
|
+
}), wt = ["aria-label"], $t = ["disabled", "aria-pressed", "onClick"], Dt = /* @__PURE__ */ B({
|
|
432
431
|
__name: "QuickChips",
|
|
433
432
|
props: {
|
|
434
433
|
items: {},
|
|
@@ -437,14 +436,14 @@ const tt = {
|
|
|
437
436
|
},
|
|
438
437
|
emits: ["pick"],
|
|
439
438
|
setup(e, { emit: t }) {
|
|
440
|
-
const a = e, n = t, { t: u } =
|
|
439
|
+
const a = e, n = t, { t: u } = J();
|
|
441
440
|
return (m, r) => (f(), b("div", {
|
|
442
441
|
role: "group",
|
|
443
442
|
"aria-label": y(u)("core.form.date.quick"),
|
|
444
443
|
class: "flex flex-wrap gap-1.5",
|
|
445
444
|
"data-test": "quick-picks"
|
|
446
445
|
}, [
|
|
447
|
-
(f(!0), b(
|
|
446
|
+
(f(!0), b(A, null, j(a.items, (d) => (f(), b("button", {
|
|
448
447
|
key: d.key,
|
|
449
448
|
type: "button",
|
|
450
449
|
disabled: d.disabled,
|
|
@@ -454,28 +453,28 @@ const tt = {
|
|
|
454
453
|
d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
|
|
455
454
|
]]),
|
|
456
455
|
onClick: (o) => n("pick", d.value)
|
|
457
|
-
}, M(d.label), 11,
|
|
458
|
-
], 8,
|
|
456
|
+
}, M(d.label), 11, $t))), 128))
|
|
457
|
+
], 8, wt));
|
|
459
458
|
}
|
|
460
|
-
}),
|
|
461
|
-
function
|
|
462
|
-
return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${
|
|
459
|
+
}), Tt = /^(\d{2}):(\d{2})$/, ke = (e) => String(e).padStart(2, "0");
|
|
460
|
+
function Z(e, t) {
|
|
461
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${ke(e)}:${ke(t)}`;
|
|
463
462
|
}
|
|
464
|
-
function
|
|
465
|
-
const t = e ?
|
|
466
|
-
return t &&
|
|
463
|
+
function Le(e) {
|
|
464
|
+
const t = e ? Tt.exec(e) : null;
|
|
465
|
+
return t && Z(Number(t[1]), Number(t[2])) ? { hour: Number(t[1]), minute: Number(t[2]) } : null;
|
|
467
466
|
}
|
|
468
|
-
const
|
|
469
|
-
function
|
|
467
|
+
const ea = (e) => Le(e) !== null;
|
|
468
|
+
function Ct(e) {
|
|
470
469
|
const t = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
471
470
|
return Array.from({ length: Math.ceil(60 / t) }, (a, n) => n * t);
|
|
472
471
|
}
|
|
473
|
-
const
|
|
474
|
-
function
|
|
472
|
+
const _e = Array.from({ length: 24 }, (e, t) => t);
|
|
473
|
+
function we(e = 1, t = /* @__PURE__ */ new Date()) {
|
|
475
474
|
const a = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
476
|
-
return
|
|
475
|
+
return Z(t.getHours(), t.getMinutes() - t.getMinutes() % a) ?? "00:00";
|
|
477
476
|
}
|
|
478
|
-
function
|
|
477
|
+
function ta(e, t = 1) {
|
|
479
478
|
const a = e.trim().toLowerCase();
|
|
480
479
|
let n, u;
|
|
481
480
|
const m = /^(\d{1,2})\s*[:.,h]\s*(\d{1,2})?$/.exec(a);
|
|
@@ -486,17 +485,17 @@ function na(e, t = 1) {
|
|
|
486
485
|
else if (/^\d{3,4}$/.test(a))
|
|
487
486
|
n = Number(a.slice(0, -2)), u = Number(a.slice(-2));
|
|
488
487
|
else return { error: "invalid" };
|
|
489
|
-
const r =
|
|
488
|
+
const r = Z(n, u);
|
|
490
489
|
return r ? t > 1 && u % t !== 0 ? { error: "step" } : { time: r } : { error: "invalid" };
|
|
491
490
|
}
|
|
492
|
-
const
|
|
493
|
-
function
|
|
491
|
+
const Mt = (e, t) => `${e}T${t}`;
|
|
492
|
+
function Vt(e) {
|
|
494
493
|
const t = e ? /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}:\d{2}))?/.exec(e) : null;
|
|
495
494
|
return { day: t?.[1] ?? null, time: t?.[2] ?? null };
|
|
496
495
|
}
|
|
497
|
-
const
|
|
496
|
+
const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected", "data-value", "onClick"], Lt = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected", "data-value", "onClick"], q = 30, $e = 150, ae = /* @__PURE__ */ B({
|
|
498
497
|
__name: "ValueColumn",
|
|
499
|
-
props: /* @__PURE__ */
|
|
498
|
+
props: /* @__PURE__ */ me({
|
|
500
499
|
values: {},
|
|
501
500
|
label: {},
|
|
502
501
|
variant: { default: "list" }
|
|
@@ -506,13 +505,13 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
506
505
|
}),
|
|
507
506
|
emits: ["update:modelValue"],
|
|
508
507
|
setup(e) {
|
|
509
|
-
const t = e, a =
|
|
508
|
+
const t = e, a = de(e, "modelValue"), n = ($e - q) / 2, u = De(), m = ce("scroller"), r = Oe("(prefers-reduced-motion: reduce)"), d = _(() => a.value === null ? -1 : t.values.indexOf(a.value)), o = I(Math.max(0, d.value));
|
|
510
509
|
let c;
|
|
511
510
|
const v = (l) => String(l).padStart(2, "0"), w = (l) => `${u}-${l}`;
|
|
512
511
|
function D(l) {
|
|
513
512
|
l !== void 0 && (a.value = l);
|
|
514
513
|
}
|
|
515
|
-
function
|
|
514
|
+
function Y(l) {
|
|
516
515
|
const T = t.values.length - 1, s = d.value, E = {
|
|
517
516
|
ArrowDown: s < 0 ? 0 : Math.min(T, s + 1),
|
|
518
517
|
ArrowUp: s < 0 ? 0 : Math.max(0, s - 1),
|
|
@@ -529,24 +528,24 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
529
528
|
function P(l, T) {
|
|
530
529
|
const s = m.value;
|
|
531
530
|
if (!s || l < 0 || typeof s.scrollTo != "function") return;
|
|
532
|
-
const
|
|
531
|
+
const z = T || r.value ? "instant" : "smooth";
|
|
533
532
|
if (t.variant === "wheel") {
|
|
534
|
-
Math.abs(s.scrollTop - l *
|
|
533
|
+
Math.abs(s.scrollTop - l * q) > 1 && s.scrollTo({ top: l * q, behavior: z });
|
|
535
534
|
return;
|
|
536
535
|
}
|
|
537
536
|
const E = s.querySelector(`[data-value="${t.values[l]}"]`);
|
|
538
537
|
if (!E) return;
|
|
539
|
-
const
|
|
540
|
-
s.scrollTo({ top: Math.max(0,
|
|
538
|
+
const K = E.offsetTop - (s.clientHeight - E.offsetHeight) / 2;
|
|
539
|
+
s.scrollTo({ top: Math.max(0, K), behavior: z });
|
|
541
540
|
}
|
|
542
541
|
function k() {
|
|
543
542
|
const l = m.value;
|
|
544
|
-
t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop /
|
|
543
|
+
t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop / q))), clearTimeout(c), c = setTimeout(() => {
|
|
545
544
|
const T = t.values[o.value];
|
|
546
545
|
T !== void 0 && T !== a.value && (a.value = T);
|
|
547
546
|
}, 90));
|
|
548
547
|
}
|
|
549
|
-
|
|
548
|
+
Ee(() => void Te(() => P(d.value, !0))), Fe(() => clearTimeout(c)), oe(d, (l) => {
|
|
550
549
|
o.value = Math.max(0, l), P(l, !1);
|
|
551
550
|
});
|
|
552
551
|
const g = (l) => Math.abs(l - o.value), p = (l) => g(l) === 0 ? "text-[22px] font-semibold text-content-strong" : g(l) === 1 ? "text-[19px] text-content-muted" : "text-base text-content-disabled";
|
|
@@ -559,18 +558,18 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
559
558
|
"aria-label": t.label,
|
|
560
559
|
"aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
|
|
561
560
|
class: "relative flex min-w-0 grow flex-col gap-0.5 overflow-y-auto rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
|
|
562
|
-
onKeydown:
|
|
561
|
+
onKeydown: Y
|
|
563
562
|
}, [
|
|
564
|
-
(f(!0), b(
|
|
563
|
+
(f(!0), b(A, null, j(t.values, (s) => (f(), b("div", {
|
|
565
564
|
id: w(s),
|
|
566
565
|
key: s,
|
|
567
566
|
role: "option",
|
|
568
567
|
"aria-selected": s === a.value,
|
|
569
568
|
"data-value": s,
|
|
570
569
|
class: $(["flex min-h-6.5 shrink-0 cursor-pointer items-center justify-center rounded-md text-body tabular-nums transition-colors duration-motion-fast", s === a.value ? "bg-tint font-semibold text-content-on-tint" : "text-content-strong hover:bg-fill"]),
|
|
571
|
-
onClick: (
|
|
572
|
-
}, M(v(s)), 11,
|
|
573
|
-
], 40,
|
|
570
|
+
onClick: (z) => S(s)
|
|
571
|
+
}, M(v(s)), 11, St))), 128))
|
|
572
|
+
], 40, Nt)) : (f(), b("div", {
|
|
574
573
|
key: 1,
|
|
575
574
|
ref_key: "scroller",
|
|
576
575
|
ref: m,
|
|
@@ -579,41 +578,41 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
579
578
|
"aria-label": t.label,
|
|
580
579
|
"aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
|
|
581
580
|
class: "relative w-16 snap-y snap-mandatory overflow-y-auto overscroll-contain rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
|
|
582
|
-
style:
|
|
581
|
+
style: X({ height: `${$e}px` }),
|
|
583
582
|
onScrollPassive: k,
|
|
584
|
-
onKeydown:
|
|
583
|
+
onKeydown: Y
|
|
585
584
|
}, [
|
|
586
585
|
h("div", {
|
|
587
|
-
style:
|
|
586
|
+
style: X({ height: `${n}px` }),
|
|
588
587
|
"aria-hidden": "true"
|
|
589
588
|
}, null, 4),
|
|
590
|
-
(f(!0), b(
|
|
589
|
+
(f(!0), b(A, null, j(t.values, (s, z) => (f(), b("div", {
|
|
591
590
|
id: w(s),
|
|
592
591
|
key: s,
|
|
593
592
|
role: "option",
|
|
594
593
|
"aria-selected": s === a.value,
|
|
595
594
|
"data-value": s,
|
|
596
|
-
class: $(["flex cursor-pointer snap-center items-center justify-center tabular-nums", p(
|
|
597
|
-
style:
|
|
595
|
+
class: $(["flex cursor-pointer snap-center items-center justify-center tabular-nums", p(z)]),
|
|
596
|
+
style: X({ height: `${q}px` }),
|
|
598
597
|
onClick: (E) => S(s)
|
|
599
|
-
}, M(v(s)), 15,
|
|
598
|
+
}, M(v(s)), 15, Ut))), 128)),
|
|
600
599
|
h("div", {
|
|
601
|
-
style:
|
|
600
|
+
style: X({ height: `${n}px` }),
|
|
602
601
|
"aria-hidden": "true"
|
|
603
602
|
}, null, 4)
|
|
604
|
-
], 44,
|
|
603
|
+
], 44, Lt));
|
|
605
604
|
}
|
|
606
|
-
}),
|
|
605
|
+
}), Yt = {
|
|
607
606
|
key: 0,
|
|
608
607
|
class: "flex h-49 gap-1.5",
|
|
609
608
|
"data-test": "time-columns"
|
|
610
|
-
},
|
|
609
|
+
}, zt = {
|
|
611
610
|
key: 1,
|
|
612
611
|
class: "relative flex items-center justify-center gap-1",
|
|
613
612
|
"data-test": "time-columns"
|
|
614
|
-
},
|
|
613
|
+
}, At = /* @__PURE__ */ B({
|
|
615
614
|
__name: "TimeColumns",
|
|
616
|
-
props: /* @__PURE__ */
|
|
615
|
+
props: /* @__PURE__ */ me({
|
|
617
616
|
step: { default: 1 },
|
|
618
617
|
variant: { default: "list" }
|
|
619
618
|
}, {
|
|
@@ -622,39 +621,39 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
622
621
|
}),
|
|
623
622
|
emits: ["update:modelValue"],
|
|
624
623
|
setup(e) {
|
|
625
|
-
const t = e, a =
|
|
624
|
+
const t = e, a = de(e, "modelValue"), { t: n } = J(), u = _(() => Le(a.value)), m = _(() => Ct(t.step)), r = _({
|
|
626
625
|
get: () => u.value?.hour ?? null,
|
|
627
626
|
set: (o) => {
|
|
628
|
-
o !== null && (a.value =
|
|
627
|
+
o !== null && (a.value = Z(o, u.value?.minute ?? 0));
|
|
629
628
|
}
|
|
630
629
|
}), d = _({
|
|
631
630
|
get: () => u.value?.minute ?? null,
|
|
632
631
|
set: (o) => {
|
|
633
|
-
o !== null && (a.value =
|
|
632
|
+
o !== null && (a.value = Z(u.value?.hour ?? 0, o));
|
|
634
633
|
}
|
|
635
634
|
});
|
|
636
|
-
return (o, c) => t.variant === "list" ? (f(), b("div",
|
|
637
|
-
N(
|
|
635
|
+
return (o, c) => t.variant === "list" ? (f(), b("div", Yt, [
|
|
636
|
+
N(ae, {
|
|
638
637
|
modelValue: r.value,
|
|
639
638
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => r.value = v),
|
|
640
|
-
values: y(
|
|
639
|
+
values: y(_e),
|
|
641
640
|
label: y(n)("core.form.time.hour")
|
|
642
641
|
}, null, 8, ["modelValue", "values", "label"]),
|
|
643
|
-
N(
|
|
642
|
+
N(ae, {
|
|
644
643
|
modelValue: d.value,
|
|
645
644
|
"onUpdate:modelValue": c[1] || (c[1] = (v) => d.value = v),
|
|
646
645
|
values: m.value,
|
|
647
646
|
label: y(n)("core.form.time.minute")
|
|
648
647
|
}, null, 8, ["modelValue", "values", "label"])
|
|
649
|
-
])) : (f(), b("div",
|
|
648
|
+
])) : (f(), b("div", zt, [
|
|
650
649
|
c[4] || (c[4] = h("div", {
|
|
651
650
|
class: "pointer-events-none absolute inset-x-0 h-9 rounded-lg bg-fill",
|
|
652
651
|
"aria-hidden": "true"
|
|
653
652
|
}, null, -1)),
|
|
654
|
-
N(
|
|
653
|
+
N(ae, {
|
|
655
654
|
modelValue: r.value,
|
|
656
655
|
"onUpdate:modelValue": c[2] || (c[2] = (v) => r.value = v),
|
|
657
|
-
values: y(
|
|
656
|
+
values: y(_e),
|
|
658
657
|
label: y(n)("core.form.time.hour"),
|
|
659
658
|
variant: "wheel",
|
|
660
659
|
class: "relative"
|
|
@@ -663,7 +662,7 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
663
662
|
class: "relative text-[22px] font-semibold",
|
|
664
663
|
"aria-hidden": "true"
|
|
665
664
|
}, ":", -1)),
|
|
666
|
-
N(
|
|
665
|
+
N(ae, {
|
|
667
666
|
modelValue: d.value,
|
|
668
667
|
"onUpdate:modelValue": c[3] || (c[3] = (v) => d.value = v),
|
|
669
668
|
values: m.value,
|
|
@@ -673,22 +672,22 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
673
672
|
}, null, 8, ["modelValue", "values", "label"])
|
|
674
673
|
]));
|
|
675
674
|
}
|
|
676
|
-
}),
|
|
675
|
+
}), It = { class: "flex min-h-bar-height items-center gap-2 px-4 pb-1" }, Pt = ["disabled"], Et = ["id"], Ft = {
|
|
677
676
|
class: "flex flex-col gap-3.5",
|
|
678
677
|
"data-test": "date-picker-sheet"
|
|
679
|
-
},
|
|
678
|
+
}, jt = {
|
|
680
679
|
key: 1,
|
|
681
680
|
class: "rounded-group bg-surface-cell p-2.5 shadow-group"
|
|
682
|
-
},
|
|
681
|
+
}, Ot = {
|
|
683
682
|
key: 2,
|
|
684
683
|
class: "flex items-center gap-2 rounded-group bg-surface-cell px-4 py-2 shadow-group"
|
|
685
|
-
},
|
|
684
|
+
}, Wt = {
|
|
686
685
|
key: 0,
|
|
687
686
|
class: "w-22 shrink-0 text-body"
|
|
688
|
-
},
|
|
687
|
+
}, Rt = { class: "flex grow justify-center" }, Ht = {
|
|
689
688
|
class: "min-h-5 text-center text-subheadline text-content-muted",
|
|
690
689
|
"aria-live": "polite"
|
|
691
|
-
},
|
|
690
|
+
}, aa = /* @__PURE__ */ B({
|
|
692
691
|
__name: "DatePickerSheet",
|
|
693
692
|
props: {
|
|
694
693
|
title: {},
|
|
@@ -704,16 +703,16 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
704
703
|
},
|
|
705
704
|
emits: ["update:modelValue"],
|
|
706
705
|
setup(e, { expose: t, emit: a }) {
|
|
707
|
-
const n = e, u = a, { t: m } =
|
|
706
|
+
const n = e, u = a, { t: m } = J(), r = Ce(), d = ce("sheet"), o = _(() => n.mode !== "time"), c = _(() => n.mode !== "date"), v = I(null), w = I(null);
|
|
708
707
|
function D() {
|
|
709
|
-
const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } :
|
|
710
|
-
v.value =
|
|
708
|
+
const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Vt(n.modelValue);
|
|
709
|
+
v.value = ne(l.day) ? l.day : null, w.value = c.value ? l.time ?? we(n.step) : null, d.value?.present();
|
|
711
710
|
}
|
|
712
|
-
function
|
|
713
|
-
return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value :
|
|
711
|
+
function Y() {
|
|
712
|
+
return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Mt(v.value, w.value ?? we(n.step)) : null;
|
|
714
713
|
}
|
|
715
714
|
function S() {
|
|
716
|
-
u("update:modelValue",
|
|
715
|
+
u("update:modelValue", Y()), d.value?.dismiss();
|
|
717
716
|
}
|
|
718
717
|
function P() {
|
|
719
718
|
u("update:modelValue", null), d.value?.dismiss();
|
|
@@ -722,33 +721,33 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
722
721
|
n.mode === "time" ? w.value = l : v.value = l;
|
|
723
722
|
}
|
|
724
723
|
function g(l) {
|
|
725
|
-
w.value = l, o.value && !v.value && (v.value =
|
|
724
|
+
w.value = l, o.value && !v.value && (v.value = ue());
|
|
726
725
|
}
|
|
727
726
|
const p = _(() => {
|
|
728
727
|
const l = (T) => {
|
|
729
|
-
const s =
|
|
730
|
-
return
|
|
728
|
+
const s = R(T), z = new Intl.DateTimeFormat(r.intlLocale, { dateStyle: "full", timeZone: "UTC" }).format(new Date(Date.UTC(s.year, s.month - 1, s.day)));
|
|
729
|
+
return z.charAt(0).toLocaleUpperCase(r.intlLocale) + z.slice(1);
|
|
731
730
|
};
|
|
732
731
|
return n.mode === "time" ? w.value ?? "" : v.value ? n.mode === "date" || !w.value ? l(v.value) : m("core.form.time.at", { date: l(v.value), time: w.value }) : "";
|
|
733
732
|
});
|
|
734
|
-
return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(),
|
|
733
|
+
return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(), ie(je, {
|
|
735
734
|
ref_key: "sheet",
|
|
736
735
|
ref: d,
|
|
737
736
|
title: n.title,
|
|
738
737
|
grouped: ""
|
|
739
738
|
}, {
|
|
740
|
-
header:
|
|
741
|
-
h("div",
|
|
739
|
+
header: he(({ titleId: s }) => [
|
|
740
|
+
h("div", It, [
|
|
742
741
|
h("button", {
|
|
743
742
|
type: "button",
|
|
744
743
|
disabled: !n.clearable,
|
|
745
744
|
class: "min-w-16 cursor-pointer py-1.5 text-start text-headline text-content-link focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled",
|
|
746
745
|
onClick: P
|
|
747
|
-
}, M(y(m)("core.form.select.clear")), 9,
|
|
746
|
+
}, M(y(m)("core.form.select.clear")), 9, Pt),
|
|
748
747
|
h("h3", {
|
|
749
748
|
id: s,
|
|
750
749
|
class: "min-w-0 grow truncate text-center text-headline font-semibold"
|
|
751
|
-
}, M(n.title), 9,
|
|
750
|
+
}, M(n.title), 9, Et),
|
|
752
751
|
h("button", {
|
|
753
752
|
type: "button",
|
|
754
753
|
class: "min-w-16 cursor-pointer py-1.5 text-end text-headline font-semibold text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
@@ -756,17 +755,17 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
756
755
|
}, M(y(m)("core.form.select.done")), 1)
|
|
757
756
|
])
|
|
758
757
|
]),
|
|
759
|
-
default:
|
|
760
|
-
h("div",
|
|
761
|
-
n.shortcuts.length > 0 ? (f(),
|
|
758
|
+
default: he(() => [
|
|
759
|
+
h("div", Ft, [
|
|
760
|
+
n.shortcuts.length > 0 ? (f(), ie(Dt, {
|
|
762
761
|
key: 0,
|
|
763
762
|
variant: "sheet",
|
|
764
763
|
items: n.shortcuts,
|
|
765
764
|
selected: n.mode === "time" ? w.value : v.value,
|
|
766
765
|
onPick: k
|
|
767
|
-
}, null, 8, ["items", "selected"])) :
|
|
768
|
-
o.value ? (f(), b("div",
|
|
769
|
-
N(
|
|
766
|
+
}, null, 8, ["items", "selected"])) : G("", !0),
|
|
767
|
+
o.value ? (f(), b("div", jt, [
|
|
768
|
+
N(_t, {
|
|
770
769
|
modelValue: v.value,
|
|
771
770
|
"onUpdate:modelValue": T[0] || (T[0] = (s) => v.value = s),
|
|
772
771
|
size: "touch",
|
|
@@ -775,39 +774,39 @@ const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected",
|
|
|
775
774
|
"disabled-dates": n.disabledDates,
|
|
776
775
|
"open-on": n.openOn
|
|
777
776
|
}, null, 8, ["modelValue", "min", "max", "disabled-dates", "open-on"])
|
|
778
|
-
])) :
|
|
779
|
-
c.value ? (f(), b("div",
|
|
780
|
-
o.value ? (f(), b("p",
|
|
781
|
-
h("div",
|
|
782
|
-
N(
|
|
777
|
+
])) : G("", !0),
|
|
778
|
+
c.value ? (f(), b("div", Ot, [
|
|
779
|
+
o.value ? (f(), b("p", Wt, M(y(m)("core.form.time.label")), 1)) : G("", !0),
|
|
780
|
+
h("div", Rt, [
|
|
781
|
+
N(At, {
|
|
783
782
|
"model-value": w.value,
|
|
784
783
|
variant: "wheel",
|
|
785
784
|
step: n.step,
|
|
786
785
|
"onUpdate:modelValue": g
|
|
787
786
|
}, null, 8, ["model-value", "step"])
|
|
788
787
|
])
|
|
789
|
-
])) :
|
|
790
|
-
h("p",
|
|
788
|
+
])) : G("", !0),
|
|
789
|
+
h("p", Ht, M(p.value), 1)
|
|
791
790
|
])
|
|
792
791
|
]),
|
|
793
792
|
_: 1
|
|
794
793
|
}, 8, ["title"]));
|
|
795
794
|
}
|
|
796
|
-
}),
|
|
795
|
+
}), na = (e) => e ? ["today", "tomorrow", "next-working-day"] : ["today", "tomorrow", "week", "month-end"], la = ["now", "08:00", "12:00"], Bt = {
|
|
797
796
|
today: (e) => e,
|
|
798
|
-
tomorrow: (e) =>
|
|
799
|
-
week: (e) =>
|
|
800
|
-
"month-end": (e) =>
|
|
801
|
-
"next-working-day": (e) =>
|
|
797
|
+
tomorrow: (e) => U(e, 1),
|
|
798
|
+
week: (e) => U(e, 7),
|
|
799
|
+
"month-end": (e) => le(e),
|
|
800
|
+
"next-working-day": (e) => Qe(e)
|
|
802
801
|
};
|
|
803
|
-
function
|
|
804
|
-
return typeof e == "string" ? { key: e, label: t(e), value:
|
|
802
|
+
function oa(e, t, a) {
|
|
803
|
+
return typeof e == "string" ? { key: e, label: t(e), value: Bt[e](a) } : { key: e.label, label: e.label, value: e.day(a) };
|
|
805
804
|
}
|
|
806
|
-
function
|
|
805
|
+
function ra(e, t, a) {
|
|
807
806
|
return e === "now" ? { key: "now", label: t, value: a } : typeof e == "string" ? { key: e, label: `${Number(e.slice(0, 2))}${e.slice(2)}`, value: e } : { key: e.label, label: e.label, value: e.time() };
|
|
808
807
|
}
|
|
809
|
-
function
|
|
810
|
-
const t =
|
|
808
|
+
function sa(e) {
|
|
809
|
+
const t = I(null), a = I(), n = _(() => t.value ?? (e.model.value ? e.display(e.model.value) : "")), u = _(() => {
|
|
811
810
|
if (t.value === null || t.value.trim() === "") return null;
|
|
812
811
|
const o = e.parse(t.value);
|
|
813
812
|
return "value" in o ? o.value : null;
|
|
@@ -828,31 +827,31 @@ function ua(e) {
|
|
|
828
827
|
}
|
|
829
828
|
r(o.value);
|
|
830
829
|
}
|
|
831
|
-
return
|
|
830
|
+
return oe(e.model, (o) => {
|
|
832
831
|
o === null && a.value || (t.value = null, a.value = void 0);
|
|
833
832
|
}), { text: n, typed: u, message: a, input: m, commit: d, set: r };
|
|
834
833
|
}
|
|
835
834
|
export {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
835
|
+
aa as _,
|
|
836
|
+
Le as a,
|
|
837
|
+
At as b,
|
|
838
|
+
Dt as c,
|
|
839
|
+
la as d,
|
|
840
|
+
ue as e,
|
|
841
|
+
U as f,
|
|
842
|
+
qe as g,
|
|
843
|
+
na as h,
|
|
844
|
+
ea as i,
|
|
845
|
+
oa as j,
|
|
846
|
+
ne as k,
|
|
847
|
+
_t as l,
|
|
849
848
|
O as m,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
849
|
+
Z as n,
|
|
850
|
+
Mt as o,
|
|
851
|
+
ta as p,
|
|
852
|
+
ft as q,
|
|
853
|
+
ra as r,
|
|
854
|
+
Vt as s,
|
|
855
|
+
we as t,
|
|
856
|
+
sa as u
|
|
858
857
|
};
|