@wssto2/vue-core 0.4.15 → 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
- package/dist/{Activity-4q26REYj.js → Activity-DnFB6WXf.js} +5 -5
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js} +64 -63
- package/dist/{Changes-CKIuGF8O.js → Changes-DMrQYv2e.js} +4 -4
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CVnZzaBm.js} +5 -5
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js → DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js} +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-BIXzNzYo.js +278 -0
- package/dist/{DeadLetters-DPGcQOz1.js → DeadLetters-BF9PS4mA.js} +3 -3
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +1 -1
- package/dist/{General-CUA9b3ML.js → General-yInbmj6I.js} +8 -8
- package/dist/{NewRolePage-DBfCvDWA.js → NewRolePage-09C3P6fE.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js +150 -0
- package/dist/{ProfilePage-On-eAiJ-.js → ProfilePage-CvV44C0m.js} +8 -8
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-D87Hs75d.js → RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js → ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js → RoleEditor.vue_vue_type_script_setup_true_lang-BqWoby16.js} +7 -7
- package/dist/{RolePage-B8oul55j.js → RolePage-DuIFjSKH.js} +8 -8
- package/dist/{RolesPage-DsXVivdj.js → RolesPage-BzqBqils.js} +5 -5
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-B0p_8xQG.js → SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js} +2 -2
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js → SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js} +161 -139
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js → SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js} +3 -3
- package/dist/{Sessions-BTyXDEuY.js → Sessions-_qmODKw2.js} +2 -2
- package/dist/{SettingsPage-DHTmMgif.js → SettingsPage-Bz48sO08.js} +9 -9
- package/dist/{SignIn-DU4DE2wj.js → SignIn-DJsTGQ79.js} +5 -5
- package/dist/{SignInPage-BA22kyOp.js → SignInPage-Bb78MIDk.js} +3 -3
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js → SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js} +1 -1
- package/dist/{SignIns-C8QAZBaL.js → SignIns-yRjJrf47.js} +2 -2
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js +187 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js → Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js} +1 -1
- package/dist/{UserRecord-D1BNmYp9.js → UserRecord-4L0FrCty.js} +9 -9
- package/dist/{UsersList-ltx3G23-.js → UsersList-ww_-FoAq.js} +9 -9
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +1 -1
- package/dist/app/index.js +1 -1
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +1 -1
- package/dist/{control-CX9BG2UB.js → control-B_Nwtmag.js} +96 -82
- package/dist/{fieldMessages-DV6sESpn.js → fieldMessages-6HVzSDqG.js} +1 -1
- package/dist/form/CardSelectField.vue.d.ts +2 -2
- package/dist/form/ChoiceChips.vue.d.ts +2 -2
- package/dist/form/ComboField.vue.d.ts +2 -2
- package/dist/form/CommandDialog.vue.d.ts +3 -0
- package/dist/form/DateField.vue.d.ts +9 -2
- package/dist/form/DateTimeField.vue.d.ts +9 -2
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +9 -2
- package/dist/form/I18nField.vue.d.ts +9 -2
- package/dist/form/MoneyField.vue.d.ts +9 -2
- package/dist/form/MonthYearField.vue.d.ts +9 -2
- package/dist/form/MultiSelectField.vue.d.ts +2 -2
- package/dist/form/NumberField.vue.d.ts +20 -2
- package/dist/form/PhotoField.vue.d.ts +9 -2
- package/dist/form/SegmentedField.vue.d.ts +2 -2
- package/dist/form/SelectField.vue.d.ts +2 -2
- package/dist/form/SwitchField.vue.d.ts +2 -2
- package/dist/form/TextField.vue.d.ts +9 -2
- package/dist/form/TextareaField.vue.d.ts +9 -2
- package/dist/form/TimeField.vue.d.ts +9 -2
- package/dist/form/field.d.ts +9 -0
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +1176 -977
- package/dist/format/index.js +1 -1
- package/dist/format-D8X4zsx6.js +78 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +31 -28
- package/dist/identity/index.js +1 -1
- package/dist/{index-BCw_Ki6z.js → index-C6vCe149.js} +3 -3
- package/dist/{index-Chh4z9xW.js → index-DW9gyWL1.js} +8 -8
- package/dist/{index-DwdVrW6q.js → index-JjALCpwi.js} +13 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +2 -0
- package/dist/intlLocale-CeRU44qJ.js +4 -0
- package/dist/notifications/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/phone/index.js +112 -111
- package/dist/resource/index.js +1 -1
- package/dist/{rowLayout-D1cYQghV.js → rowLayout-BFz4Kdoy.js} +2 -2
- package/dist/{status-cWCAMAmW.js → status-Cz54-7z7.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-B-N6HJOz.js → useCommand-YN9EMb7s.js} +41 -38
- package/dist/{useTypedEntry-aTfPBAhw.js → useTypedEntry-C7k7Dyl-.js} +237 -236
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js +0 -256
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +0 -126
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js +0 -59
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js +0 -65
- package/dist/TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js +0 -270
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js +0 -69
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js +0 -165
- package/dist/format-B8mJm946.js +0 -77
package/dist/form/index.js
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
|
-
import { _ as Me, s as
|
|
2
|
-
import { E as
|
|
3
|
-
import { f as ze } from "../useCommand-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { ref as
|
|
1
|
+
import { _ as Me, s as Pe, c as Se, f as Qe } from "../FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
2
|
+
import { E as Mo, u as Oo, a as jo } from "../FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
3
|
+
import { f as ze } from "../useCommand-YN9EMb7s.js";
|
|
4
|
+
import { _ as Eo, a as Io, u as Go } from "../useCommand-YN9EMb7s.js";
|
|
5
|
+
import { ref as N, computed as x, defineComponent as K, openBlock as i, createBlock as q, mergeProps as J, unref as n, createSlots as re, withCtx as m, createElementVNode as b, normalizeClass as R, createElementBlock as h, Fragment as se, renderList as xe, createVNode as M, createCommentVNode as D, toDisplayString as C, renderSlot as z, mergeDefaults as ue, useModel as oe, useId as Oe, withKeys as Ce, withModifiers as be, createTextVNode as Y, mergeModels as ne, useTemplateRef as A, shallowRef as De, watch as ie, nextTick as ke, provide as Ve, inject as Ze, onBeforeUnmount as je, onMounted as ot, toRef as nt, toValue as qe, getCurrentScope as st, onScopeDispose as rt, shallowReactive as Ae, normalizeStyle as it, resolveDynamicComponent as ut } from "vue";
|
|
6
6
|
import { a as Re } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
|
-
import { M as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { u as et, _ as
|
|
12
|
-
import { useI18n as
|
|
7
|
+
import { M as Ko, c as Po, i as Ao, l as Ho, u as Uo } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { _ as Wo } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
|
|
9
|
+
import { u as Xo } from "../useResourceForm-CP2lCwmD.js";
|
|
10
|
+
import { _ as X } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
|
+
import { u as et, _ as ye, f as de, b as ce, a as tt, c as Ee, e as dt, h as ct, i as ft, d as mt } from "../control-B_Nwtmag.js";
|
|
12
|
+
import { useI18n as Z } from "vue-i18n";
|
|
13
13
|
import { b as vt } from "../controlSurface-t7OEFESJ.js";
|
|
14
|
-
import { a as pt } from "../TextField.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as
|
|
14
|
+
import { a as pt } from "../TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js";
|
|
15
|
+
import { _ as Zo } from "../TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js";
|
|
16
16
|
import { u as bt, l as gt } from "../suggestions-BxMm6MQA.js";
|
|
17
|
-
import { r as
|
|
18
|
-
import { s as
|
|
19
|
-
import { u as Ct, a as Ft, s as Bt } from "../DateField.vue_vue_type_script_setup_true_lang-
|
|
20
|
-
import { _ as
|
|
17
|
+
import { r as tn } from "../suggestions-BxMm6MQA.js";
|
|
18
|
+
import { s as _e, u as He, i as yt, o as $e, e as Fe, k as ht, _ as kt, l as xt, c as wt, b as _t, t as Te, g as $t, q as St } from "../useTypedEntry-C7k7Dyl-.js";
|
|
19
|
+
import { u as Ct, a as Ft, s as Bt } from "../DateField.vue_vue_type_script_setup_true_lang-BIXzNzYo.js";
|
|
20
|
+
import { _ as ln } from "../DateField.vue_vue_type_script_setup_true_lang-BIXzNzYo.js";
|
|
21
21
|
import { _ as at } from "../DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
|
|
22
|
-
import { u as Lt } from "../format-
|
|
23
|
-
import { u as
|
|
24
|
-
import { _ as
|
|
25
|
-
import { u as
|
|
26
|
-
import { _ as
|
|
27
|
-
import { _ as
|
|
28
|
-
import { _ as
|
|
29
|
-
import { a as
|
|
30
|
-
import { _ as
|
|
22
|
+
import { u as Lt } from "../format-D8X4zsx6.js";
|
|
23
|
+
import { u as Ie } from "../mediaQuery-CygcXmFW.js";
|
|
24
|
+
import { _ as Ge } from "../Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
|
|
25
|
+
import { u as Tt } from "../TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js";
|
|
26
|
+
import { _ as nn } from "../TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js";
|
|
27
|
+
import { _ as ge } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
28
|
+
import { _ as zt, r as Dt } from "../FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js";
|
|
29
|
+
import { a as rn, c as un, p as dn, u as cn } from "../FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js";
|
|
30
|
+
import { _ as mn } from "../FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js";
|
|
31
|
+
import { i as Vt } from "../intlLocale-CeRU44qJ.js";
|
|
31
32
|
import { a as qt } from "../environment-Dva-SG8D.js";
|
|
32
|
-
import { _ as Mt } from "../NumberField.vue_vue_type_script_setup_true_lang-
|
|
33
|
+
import { _ as Mt } from "../NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js";
|
|
33
34
|
import { _ as Ot } from "../Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
34
|
-
import { u as jt, a as
|
|
35
|
-
import { _ as
|
|
36
|
-
import { g as
|
|
37
|
-
import { _ as
|
|
38
|
-
import { _ as
|
|
39
|
-
import { _ as _n } from "../SegmentedField.vue_vue_type_script_setup_true_lang-
|
|
40
|
-
import { _ as
|
|
41
|
-
import { _ as
|
|
35
|
+
import { u as jt, a as Ue } from "../SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js";
|
|
36
|
+
import { _ as pn, b as bn } from "../SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js";
|
|
37
|
+
import { g as yn, m as hn } from "../options-Ba_0uLWN.js";
|
|
38
|
+
import { _ as xn } from "../OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
|
|
39
|
+
import { _ as Ye } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js";
|
|
40
|
+
import { _ as _n } from "../SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js";
|
|
41
|
+
import { _ as Sn } from "../SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js";
|
|
42
|
+
import { _ as Fn } from "../TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js";
|
|
42
43
|
import { _ as Rt } from "../Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
43
|
-
import { _ as
|
|
44
|
-
import { D as
|
|
45
|
-
import { t as
|
|
46
|
-
import { a as
|
|
47
|
-
import { _ as
|
|
48
|
-
import { p as
|
|
49
|
-
import { u as
|
|
50
|
-
import { matchedRouteKey as
|
|
51
|
-
function
|
|
52
|
-
const t =
|
|
44
|
+
import { _ as We } from "../Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
45
|
+
import { D as Et } from "../useWaitStatus-fsacMl4W.js";
|
|
46
|
+
import { t as It } from "../toast-CqSDTWRX.js";
|
|
47
|
+
import { a as Gt } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js";
|
|
48
|
+
import { _ as Nt, a as Kt } from "../SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js";
|
|
49
|
+
import { p as Pt } from "../sectionIndex-BS0ic5W7.js";
|
|
50
|
+
import { u as At } from "../useSaveChrome-7huA3FzR.js";
|
|
51
|
+
import { matchedRouteKey as Ht, onBeforeRouteLeave as Ut } from "vue-router";
|
|
52
|
+
function Yt(o) {
|
|
53
|
+
const t = N(null);
|
|
53
54
|
return {
|
|
54
|
-
isDirty:
|
|
55
|
+
isDirty: x(() => t.value !== null && JSON.stringify(o()) !== t.value),
|
|
55
56
|
markClean: () => t.value = JSON.stringify(o())
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
const t =
|
|
59
|
+
function fo(o) {
|
|
60
|
+
const t = N(!1), e = Yt(o), { confirmDiscard: l } = Re(() => t.value && e.isDirty.value);
|
|
60
61
|
return {
|
|
61
62
|
/** The sheet was just filled: its current values are the baseline. */
|
|
62
63
|
opened: () => {
|
|
@@ -66,19 +67,19 @@ function uo(o) {
|
|
|
66
67
|
closed: () => {
|
|
67
68
|
t.value = !1;
|
|
68
69
|
},
|
|
69
|
-
beforeDismiss:
|
|
70
|
+
beforeDismiss: l
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
const
|
|
73
|
+
const Wt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Jt = ["name", "value", "checked", "disabled", "onChange"], Xt = { class: "min-w-0 flex-1" }, Qt = { class: "block text-body font-semibold text-content-strong" }, Zt = {
|
|
73
74
|
key: 0,
|
|
74
75
|
class: "mt-0.5 block text-footnote text-content-muted"
|
|
75
|
-
},
|
|
76
|
+
}, ea = {
|
|
76
77
|
key: 1,
|
|
77
78
|
class: "flex size-5 shrink-0 items-center justify-center rounded-full bg-control-on text-white",
|
|
78
79
|
"aria-hidden": "true"
|
|
79
|
-
},
|
|
80
|
+
}, mo = /* @__PURE__ */ K({
|
|
80
81
|
__name: "CardSelectField",
|
|
81
|
-
props: /* @__PURE__ */
|
|
82
|
+
props: /* @__PURE__ */ ue({
|
|
82
83
|
label: {},
|
|
83
84
|
labelHidden: { type: Boolean },
|
|
84
85
|
hint: {},
|
|
@@ -92,66 +93,88 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
92
93
|
modelValue: {},
|
|
93
94
|
options: {},
|
|
94
95
|
columns: {}
|
|
95
|
-
}, { ...
|
|
96
|
+
}, { ...ce, modelValue: null, columns: 2 }),
|
|
96
97
|
emits: ["update:modelValue"],
|
|
97
98
|
setup(o, { emit: t }) {
|
|
98
|
-
const e = o,
|
|
99
|
-
return (
|
|
100
|
-
value: e.options.find((
|
|
99
|
+
const e = o, l = t, { editable: s } = et(e), a = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, d = x(() => a[e.columns]);
|
|
100
|
+
return (c, g) => (i(), q(ye, J(n(de)(e), {
|
|
101
|
+
value: e.options.find((k) => k.value === e.modelValue)?.label ?? null,
|
|
101
102
|
"row-layout": "stacked"
|
|
102
|
-
}), {
|
|
103
|
-
default:
|
|
104
|
-
|
|
105
|
-
id:
|
|
103
|
+
}), re({
|
|
104
|
+
default: m(({ id: k, describedby: w, invalid: y }) => [
|
|
105
|
+
b("div", {
|
|
106
|
+
id: k,
|
|
106
107
|
role: "radiogroup",
|
|
107
108
|
"aria-label": e.label,
|
|
108
|
-
"aria-describedby":
|
|
109
|
-
"aria-invalid":
|
|
109
|
+
"aria-describedby": w,
|
|
110
|
+
"aria-invalid": y || void 0,
|
|
110
111
|
class: R(["grid w-full gap-2.5", d.value]),
|
|
111
112
|
"data-test": "card-select"
|
|
112
113
|
}, [
|
|
113
|
-
(i(!0),
|
|
114
|
+
(i(!0), h(se, null, xe(e.options, (r) => (i(), h("label", {
|
|
114
115
|
key: r.value,
|
|
115
116
|
class: R(["relative flex items-center gap-3 rounded-group bg-fill p-3.5 transition-colors duration-motion-fast focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus", [r.value === e.modelValue ? "bg-tint-soft ring-[1.5px] ring-inset ring-border-selected" : "hover:bg-fill-strong", e.disabled || !n(s) || r.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
116
117
|
}, [
|
|
117
|
-
|
|
118
|
+
b("input", {
|
|
118
119
|
type: "radio",
|
|
119
120
|
class: "sr-only",
|
|
120
|
-
name: e.name ??
|
|
121
|
+
name: e.name ?? k,
|
|
121
122
|
value: r.value,
|
|
122
123
|
checked: r.value === e.modelValue,
|
|
123
124
|
disabled: e.disabled || !n(s) || r.disabled,
|
|
124
|
-
onChange: (u) =>
|
|
125
|
-
}, null, 40,
|
|
126
|
-
r.icon ? (i(),
|
|
125
|
+
onChange: (u) => l("update:modelValue", r.value)
|
|
126
|
+
}, null, 40, Jt),
|
|
127
|
+
r.icon ? (i(), h("span", {
|
|
127
128
|
key: 0,
|
|
128
129
|
class: R(["flex size-9 shrink-0 items-center justify-center rounded-control", r.value === e.modelValue ? "bg-control-on text-white" : "bg-fill-strong text-content-muted"])
|
|
129
130
|
}, [
|
|
130
|
-
M(n(
|
|
131
|
+
M(n(X), {
|
|
131
132
|
name: r.icon,
|
|
132
133
|
size: 18
|
|
133
134
|
}, null, 8, ["name"])
|
|
134
135
|
], 2)) : D("", !0),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
r.description ? (i(),
|
|
136
|
+
b("span", Xt, [
|
|
137
|
+
b("span", Qt, C(r.label), 1),
|
|
138
|
+
r.description ? (i(), h("span", Zt, C(r.description), 1)) : D("", !0)
|
|
138
139
|
]),
|
|
139
|
-
r.value === e.modelValue ? (i(),
|
|
140
|
-
M(n(
|
|
140
|
+
r.value === e.modelValue ? (i(), h("span", ea, [
|
|
141
|
+
M(n(X), {
|
|
141
142
|
name: "checkCustom",
|
|
142
143
|
size: 12
|
|
143
144
|
})
|
|
144
145
|
])) : D("", !0)
|
|
145
146
|
], 2))), 128))
|
|
146
|
-
], 10,
|
|
147
|
+
], 10, Wt)
|
|
147
148
|
]),
|
|
148
|
-
_:
|
|
149
|
-
},
|
|
149
|
+
_: 2
|
|
150
|
+
}, [
|
|
151
|
+
c.$slots.trailing ? {
|
|
152
|
+
name: "trailing",
|
|
153
|
+
fn: m(() => [
|
|
154
|
+
z(c.$slots, "trailing")
|
|
155
|
+
]),
|
|
156
|
+
key: "0"
|
|
157
|
+
} : void 0,
|
|
158
|
+
c.$slots.labelTrailing ? {
|
|
159
|
+
name: "labelTrailing",
|
|
160
|
+
fn: m(() => [
|
|
161
|
+
z(c.$slots, "labelTrailing")
|
|
162
|
+
]),
|
|
163
|
+
key: "1"
|
|
164
|
+
} : void 0,
|
|
165
|
+
c.$slots.readonly ? {
|
|
166
|
+
name: "readonly",
|
|
167
|
+
fn: m(() => [
|
|
168
|
+
z(c.$slots, "readonly")
|
|
169
|
+
]),
|
|
170
|
+
key: "2"
|
|
171
|
+
} : void 0
|
|
172
|
+
]), 1040, ["value"]));
|
|
150
173
|
}
|
|
151
|
-
}),
|
|
174
|
+
}), ta = ["data-field-error"], aa = ["aria-checked", "aria-disabled", "aria-describedby", "aria-invalid", "tabindex", "onKeydown"], la = { class: "flex min-w-0 flex-1 flex-col items-start" }, oa = {
|
|
152
175
|
key: 0,
|
|
153
176
|
class: "flex shrink-0 items-center gap-2.5"
|
|
154
|
-
},
|
|
177
|
+
}, na = ["id"], vo = /* @__PURE__ */ K({
|
|
155
178
|
__name: "CheckboxField",
|
|
156
179
|
props: /* @__PURE__ */ ne({
|
|
157
180
|
label: {},
|
|
@@ -165,13 +188,13 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
165
188
|
}),
|
|
166
189
|
emits: ["update:modelValue"],
|
|
167
190
|
setup(o) {
|
|
168
|
-
const t = o, e = oe(o, "modelValue"),
|
|
191
|
+
const t = o, e = oe(o, "modelValue"), l = !!tt(), s = Oe(), a = () => {
|
|
169
192
|
t.disabled || (e.value = !e.value);
|
|
170
193
|
};
|
|
171
|
-
return (d,
|
|
194
|
+
return (d, c) => (i(), h("div", {
|
|
172
195
|
"data-field-error": t.error ? "true" : void 0
|
|
173
196
|
}, [
|
|
174
|
-
|
|
197
|
+
b("div", {
|
|
175
198
|
role: "checkbox",
|
|
176
199
|
"aria-checked": e.value,
|
|
177
200
|
"aria-disabled": t.disabled || void 0,
|
|
@@ -179,62 +202,62 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
179
202
|
"aria-invalid": t.error ? !0 : void 0,
|
|
180
203
|
tabindex: t.disabled ? -1 : 0,
|
|
181
204
|
"data-test": "checkbox",
|
|
182
|
-
class: R(["group/check flex items-center transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", [t.variant === "row" ? "gap-3 pl-row-inset focus-visible:-outline-offset-2" : "gap-2.5 rounded-control px-2 py-1.5 focus-visible:outline-offset-1",
|
|
183
|
-
onClick:
|
|
205
|
+
class: R(["group/check flex items-center transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", [t.variant === "row" ? "gap-3 pl-row-inset focus-visible:-outline-offset-2" : "gap-2.5 rounded-control px-2 py-1.5 focus-visible:outline-offset-1", l && t.variant === "row" ? "first:rounded-t-group last:rounded-b-group" : "", t.disabled ? "cursor-not-allowed" : t.variant === "row" ? "cursor-pointer hover:bg-fill/60 active:bg-fill" : "cursor-pointer hover:bg-fill"]]),
|
|
206
|
+
onClick: a,
|
|
184
207
|
onKeydown: [
|
|
185
|
-
|
|
186
|
-
|
|
208
|
+
Ce(be(a, ["prevent"]), ["space"]),
|
|
209
|
+
Ce(be(a, ["prevent"]), ["enter"])
|
|
187
210
|
]
|
|
188
211
|
}, [
|
|
189
|
-
|
|
212
|
+
b("span", {
|
|
190
213
|
class: R(["flex shrink-0 items-center justify-center rounded-full border-2", [t.variant === "row" ? "size-5.5" : "size-5", e.value ? t.disabled ? "border-content-disabled bg-content-disabled text-white" : "border-control-on bg-control-on text-white" : "border-border-control"]]),
|
|
191
214
|
"aria-hidden": "true"
|
|
192
215
|
}, [
|
|
193
|
-
e.value ? (i(), q(n(
|
|
216
|
+
e.value ? (i(), q(n(X), {
|
|
194
217
|
key: 0,
|
|
195
218
|
name: "checkCustom",
|
|
196
219
|
size: 12
|
|
197
220
|
})) : D("", !0)
|
|
198
221
|
], 2),
|
|
199
|
-
|
|
222
|
+
b("div", {
|
|
200
223
|
class: R(["flex min-w-0 flex-1 items-center gap-3", t.variant === "row" ? "min-h-row border-t border-border-separator py-2 pr-row-inset group-first/check:border-t-0" : ""])
|
|
201
224
|
}, [
|
|
202
|
-
|
|
203
|
-
|
|
225
|
+
b("div", la, [
|
|
226
|
+
b("p", {
|
|
204
227
|
class: R(["w-full text-body", [t.variant === "row" ? "break-words" : "truncate", t.disabled ? "text-content-muted" : e.value ? "text-content-strong" : "text-content"]])
|
|
205
|
-
},
|
|
206
|
-
t.description ? (i(),
|
|
228
|
+
}, C(t.label), 3),
|
|
229
|
+
t.description ? (i(), h("p", {
|
|
207
230
|
key: 0,
|
|
208
231
|
class: R(["tabular-nums text-content-muted", t.variant === "row" ? "text-footnote" : "text-xs"])
|
|
209
|
-
},
|
|
210
|
-
|
|
232
|
+
}, C(t.description), 3)) : D("", !0),
|
|
233
|
+
z(d.$slots, "default")
|
|
211
234
|
]),
|
|
212
|
-
d.$slots.trailing ? (i(),
|
|
213
|
-
|
|
235
|
+
d.$slots.trailing ? (i(), h("div", oa, [
|
|
236
|
+
z(d.$slots, "trailing")
|
|
214
237
|
])) : D("", !0)
|
|
215
238
|
], 2)
|
|
216
|
-
], 42,
|
|
217
|
-
t.error ? (i(),
|
|
239
|
+
], 42, aa),
|
|
240
|
+
t.error ? (i(), h("p", {
|
|
218
241
|
key: 0,
|
|
219
242
|
id: `${n(s)}-error`,
|
|
220
243
|
role: "alert",
|
|
221
244
|
class: "flex items-start gap-1.5 px-2 pt-1 text-footnote text-content-destructive"
|
|
222
245
|
}, [
|
|
223
|
-
M(n(
|
|
246
|
+
M(n(X), {
|
|
224
247
|
name: "alertTriangle",
|
|
225
248
|
size: 14,
|
|
226
249
|
class: "mt-px shrink-0"
|
|
227
250
|
}),
|
|
228
|
-
|
|
229
|
-
], 8,
|
|
230
|
-
], 8,
|
|
251
|
+
Y(" " + C(t.error), 1)
|
|
252
|
+
], 8, na)) : D("", !0)
|
|
253
|
+
], 8, ta));
|
|
231
254
|
}
|
|
232
|
-
}),
|
|
255
|
+
}), sa = {
|
|
233
256
|
key: 0,
|
|
234
257
|
class: "text-body text-content-muted"
|
|
235
|
-
},
|
|
258
|
+
}, ra = ["id", "aria-label", "aria-describedby", "aria-invalid"], ia = ["aria-pressed", "disabled", "onClick"], po = /* @__PURE__ */ K({
|
|
236
259
|
__name: "ChoiceChips",
|
|
237
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
260
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
238
261
|
label: {},
|
|
239
262
|
labelHidden: { type: Boolean },
|
|
240
263
|
hint: {},
|
|
@@ -246,51 +269,73 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
246
269
|
presentation: {},
|
|
247
270
|
name: {},
|
|
248
271
|
options: {}
|
|
249
|
-
}, { ...
|
|
272
|
+
}, { ...ce }), {
|
|
250
273
|
modelValue: { default: () => [] },
|
|
251
274
|
modelModifiers: {}
|
|
252
275
|
}),
|
|
253
276
|
emits: ["update:modelValue"],
|
|
254
277
|
setup(o) {
|
|
255
|
-
const t = o, e = oe(o, "modelValue"),
|
|
256
|
-
return (s,
|
|
278
|
+
const t = o, e = oe(o, "modelValue"), l = (s) => e.value = e.value.includes(s) ? e.value.filter((a) => a !== s) : [...e.value, s];
|
|
279
|
+
return (s, a) => (i(), q(ye, J(n(de)(t), {
|
|
257
280
|
value: t.options.filter((d) => e.value.includes(d.value)).map((d) => d.label).join(", ") || null,
|
|
258
281
|
"row-layout": "stacked"
|
|
259
|
-
}), {
|
|
260
|
-
default:
|
|
261
|
-
t.options.length === 0 ? (i(),
|
|
282
|
+
}), re({
|
|
283
|
+
default: m(({ id: d, describedby: c, invalid: g }) => [
|
|
284
|
+
t.options.length === 0 ? (i(), h("span", sa, "—")) : (i(), h("div", {
|
|
262
285
|
key: 1,
|
|
263
286
|
id: d,
|
|
264
287
|
role: "group",
|
|
265
288
|
"aria-label": t.label,
|
|
266
|
-
"aria-describedby":
|
|
267
|
-
"aria-invalid":
|
|
289
|
+
"aria-describedby": c,
|
|
290
|
+
"aria-invalid": g || void 0,
|
|
268
291
|
class: "flex flex-wrap gap-1.5 py-1",
|
|
269
292
|
"data-test": "choice-chips"
|
|
270
293
|
}, [
|
|
271
|
-
(i(!0),
|
|
272
|
-
key:
|
|
294
|
+
(i(!0), h(se, null, xe(t.options, (k) => (i(), h("button", {
|
|
295
|
+
key: k.value,
|
|
273
296
|
type: "button",
|
|
274
|
-
"aria-pressed": e.value.includes(
|
|
275
|
-
disabled: t.disabled ||
|
|
276
|
-
class: R(["inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-full px-3 text-subheadline transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-60", e.value.includes(
|
|
277
|
-
onClick: (
|
|
297
|
+
"aria-pressed": e.value.includes(k.value),
|
|
298
|
+
disabled: t.disabled || k.disabled,
|
|
299
|
+
class: R(["inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-full px-3 text-subheadline transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-60", e.value.includes(k.value) ? "bg-tint-soft font-semibold text-content-link" : "bg-fill font-medium text-content-strong hover:bg-fill-strong"]),
|
|
300
|
+
onClick: (w) => l(k.value)
|
|
278
301
|
}, [
|
|
279
|
-
e.value.includes(
|
|
302
|
+
e.value.includes(k.value) ? (i(), q(n(X), {
|
|
280
303
|
key: 0,
|
|
281
304
|
name: "checkCustom",
|
|
282
305
|
size: 12
|
|
283
306
|
})) : D("", !0),
|
|
284
|
-
|
|
285
|
-
], 10,
|
|
286
|
-
], 8,
|
|
307
|
+
Y(" " + C(k.label), 1)
|
|
308
|
+
], 10, ia))), 128))
|
|
309
|
+
], 8, ra))
|
|
287
310
|
]),
|
|
288
|
-
_:
|
|
289
|
-
},
|
|
311
|
+
_: 2
|
|
312
|
+
}, [
|
|
313
|
+
s.$slots.trailing ? {
|
|
314
|
+
name: "trailing",
|
|
315
|
+
fn: m(() => [
|
|
316
|
+
z(s.$slots, "trailing")
|
|
317
|
+
]),
|
|
318
|
+
key: "0"
|
|
319
|
+
} : void 0,
|
|
320
|
+
s.$slots.labelTrailing ? {
|
|
321
|
+
name: "labelTrailing",
|
|
322
|
+
fn: m(() => [
|
|
323
|
+
z(s.$slots, "labelTrailing")
|
|
324
|
+
]),
|
|
325
|
+
key: "1"
|
|
326
|
+
} : void 0,
|
|
327
|
+
s.$slots.readonly ? {
|
|
328
|
+
name: "readonly",
|
|
329
|
+
fn: m(() => [
|
|
330
|
+
z(s.$slots, "readonly")
|
|
331
|
+
]),
|
|
332
|
+
key: "2"
|
|
333
|
+
} : void 0
|
|
334
|
+
]), 1040, ["value"]));
|
|
290
335
|
}
|
|
291
|
-
}),
|
|
336
|
+
}), ua = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], bo = /* @__PURE__ */ K({
|
|
292
337
|
__name: "ComboField",
|
|
293
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
338
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
294
339
|
label: {},
|
|
295
340
|
labelHidden: { type: Boolean },
|
|
296
341
|
hint: {},
|
|
@@ -310,106 +355,128 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
310
355
|
limit: {},
|
|
311
356
|
recents: {},
|
|
312
357
|
width: {}
|
|
313
|
-
}, { ...
|
|
358
|
+
}, { ...ce, options: void 0, search: void 0, selected: null, placeholder: void 0, minLength: 1, debounce: 300, limit: 30, recents: void 0, width: "md" }), {
|
|
314
359
|
modelValue: { default: null },
|
|
315
360
|
modelModifiers: {}
|
|
316
361
|
}),
|
|
317
362
|
emits: /* @__PURE__ */ ne(["picked"], ["update:modelValue"]),
|
|
318
363
|
setup(o, { expose: t, emit: e }) {
|
|
319
|
-
const
|
|
320
|
-
source: () =>
|
|
321
|
-
minLength: () =>
|
|
322
|
-
debounce: () =>
|
|
323
|
-
limit: () =>
|
|
364
|
+
const l = o, s = oe(o, "modelValue"), a = e, { t: d } = Z(), c = !!tt(), g = Ee("text", () => l.error ? "error" : l.disabled ? "locked" : "rest"), k = x(() => c ? vt(l.width) : "w-full"), w = A("input"), y = A("anchor"), r = De(null), u = De(""), p = bt({
|
|
365
|
+
source: () => l.search ?? l.options,
|
|
366
|
+
minLength: () => l.minLength,
|
|
367
|
+
debounce: () => l.debounce,
|
|
368
|
+
limit: () => l.limit,
|
|
324
369
|
listAllWhenEmpty: !0,
|
|
325
|
-
recents: () =>
|
|
326
|
-
}), { items: F, open: L, status: _, highlighted:
|
|
327
|
-
const
|
|
328
|
-
return
|
|
370
|
+
recents: () => l.recents
|
|
371
|
+
}), { items: F, open: L, status: _, highlighted: G, showingRecent: S } = p, O = x(() => {
|
|
372
|
+
const E = s.value;
|
|
373
|
+
return E === null ? null : [r.value, l.selected, ...l.options ?? []].find((W) => W?.value === E) ?? null;
|
|
329
374
|
});
|
|
330
|
-
|
|
331
|
-
L.value || (u.value =
|
|
375
|
+
ie(O, (E) => {
|
|
376
|
+
L.value || (u.value = E?.label ?? "");
|
|
332
377
|
}, { immediate: !0 });
|
|
333
|
-
function
|
|
334
|
-
u.value =
|
|
378
|
+
function I(E) {
|
|
379
|
+
u.value = E.target.value, p.ask(u.value), u.value === "" && (s.value = null, r.value = null);
|
|
335
380
|
}
|
|
336
|
-
function
|
|
337
|
-
|
|
381
|
+
function H() {
|
|
382
|
+
l.disabled || p.show("");
|
|
338
383
|
}
|
|
339
|
-
function
|
|
340
|
-
|
|
384
|
+
function ee(E) {
|
|
385
|
+
p.close(), p.remember(E), r.value = E, s.value = E.value, u.value = E.label, a("picked", E);
|
|
341
386
|
}
|
|
342
|
-
function
|
|
343
|
-
|
|
387
|
+
function te() {
|
|
388
|
+
p.close(), u.value = O.value?.label ?? "";
|
|
344
389
|
}
|
|
345
|
-
const
|
|
346
|
-
return t({ focus: () =>
|
|
390
|
+
const Q = x(() => gt(L.value, F.value.length, _.value, !0));
|
|
391
|
+
return t({ focus: () => w.value?.focus() }), (E, W) => (i(), q(ye, J(n(de)(l), {
|
|
347
392
|
value: O.value?.label ?? null
|
|
348
|
-
}), {
|
|
349
|
-
default:
|
|
350
|
-
|
|
393
|
+
}), re({
|
|
394
|
+
default: m(({ id: U, describedby: P, invalid: ae }) => [
|
|
395
|
+
b("div", {
|
|
351
396
|
ref_key: "anchor",
|
|
352
|
-
ref:
|
|
353
|
-
class: R(["flex items-center gap-1.5", [n(
|
|
397
|
+
ref: y,
|
|
398
|
+
class: R(["flex items-center gap-1.5", [n(g), k.value]])
|
|
354
399
|
}, [
|
|
355
|
-
|
|
356
|
-
id:
|
|
400
|
+
b("input", {
|
|
401
|
+
id: U,
|
|
357
402
|
ref_key: "input",
|
|
358
|
-
ref:
|
|
403
|
+
ref: w,
|
|
359
404
|
role: "combobox",
|
|
360
405
|
type: "text",
|
|
361
406
|
autocomplete: "off",
|
|
362
407
|
value: u.value,
|
|
363
|
-
name:
|
|
364
|
-
placeholder:
|
|
365
|
-
disabled:
|
|
366
|
-
required:
|
|
408
|
+
name: l.name,
|
|
409
|
+
placeholder: l.placeholder,
|
|
410
|
+
disabled: l.disabled,
|
|
411
|
+
required: l.required,
|
|
367
412
|
"aria-autocomplete": "list",
|
|
368
|
-
"aria-expanded":
|
|
369
|
-
"aria-controls": `${
|
|
370
|
-
"aria-activedescendant":
|
|
371
|
-
"aria-required":
|
|
372
|
-
"aria-invalid":
|
|
373
|
-
"aria-describedby":
|
|
374
|
-
class: R(["block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
375
|
-
onInput:
|
|
376
|
-
onFocus:
|
|
377
|
-
onBlur:
|
|
378
|
-
onKeydown:
|
|
379
|
-
}, null, 42,
|
|
380
|
-
M(n(
|
|
413
|
+
"aria-expanded": Q.value,
|
|
414
|
+
"aria-controls": `${U}-list`,
|
|
415
|
+
"aria-activedescendant": Q.value && n(F).length > 0 ? `${U}-option-${n(G)}` : void 0,
|
|
416
|
+
"aria-required": l.required || void 0,
|
|
417
|
+
"aria-invalid": ae || void 0,
|
|
418
|
+
"aria-describedby": P,
|
|
419
|
+
class: R(["block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", c ? "compact:text-right" : ""]),
|
|
420
|
+
onInput: I,
|
|
421
|
+
onFocus: H,
|
|
422
|
+
onBlur: te,
|
|
423
|
+
onKeydown: W[0] || (W[0] = (le) => n(p).keydown(le, { pick: ee, enterNeedsMove: !1 }))
|
|
424
|
+
}, null, 42, ua),
|
|
425
|
+
M(n(X), {
|
|
381
426
|
name: "search",
|
|
382
427
|
size: 14,
|
|
383
428
|
class: "shrink-0 text-content-muted"
|
|
384
429
|
})
|
|
385
430
|
], 2),
|
|
386
431
|
M(pt, {
|
|
387
|
-
id:
|
|
388
|
-
anchor:
|
|
432
|
+
id: U,
|
|
433
|
+
anchor: y.value,
|
|
389
434
|
open: n(L),
|
|
390
435
|
items: n(F),
|
|
391
|
-
highlighted: n(
|
|
436
|
+
highlighted: n(G),
|
|
392
437
|
query: u.value,
|
|
393
438
|
status: n(_),
|
|
394
|
-
recent: n(
|
|
439
|
+
recent: n(S),
|
|
395
440
|
"empty-message": !0,
|
|
396
441
|
hint: n(d)("core.form.suggestions.keys_pick"),
|
|
397
|
-
onPick:
|
|
398
|
-
onHover:
|
|
442
|
+
onPick: ee,
|
|
443
|
+
onHover: W[1] || (W[1] = (le) => n(p).highlight(le))
|
|
399
444
|
}, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])
|
|
400
445
|
]),
|
|
401
|
-
_:
|
|
402
|
-
},
|
|
446
|
+
_: 2
|
|
447
|
+
}, [
|
|
448
|
+
E.$slots.trailing ? {
|
|
449
|
+
name: "trailing",
|
|
450
|
+
fn: m(() => [
|
|
451
|
+
z(E.$slots, "trailing")
|
|
452
|
+
]),
|
|
453
|
+
key: "0"
|
|
454
|
+
} : void 0,
|
|
455
|
+
E.$slots.labelTrailing ? {
|
|
456
|
+
name: "labelTrailing",
|
|
457
|
+
fn: m(() => [
|
|
458
|
+
z(E.$slots, "labelTrailing")
|
|
459
|
+
]),
|
|
460
|
+
key: "1"
|
|
461
|
+
} : void 0,
|
|
462
|
+
E.$slots.readonly ? {
|
|
463
|
+
name: "readonly",
|
|
464
|
+
fn: m(() => [
|
|
465
|
+
z(E.$slots, "readonly")
|
|
466
|
+
]),
|
|
467
|
+
key: "2"
|
|
468
|
+
} : void 0
|
|
469
|
+
]), 1040, ["value"]));
|
|
403
470
|
}
|
|
404
|
-
}),
|
|
471
|
+
}), da = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ca = ["aria-label", "onClick"], fa = {
|
|
405
472
|
class: "-m-3 flex",
|
|
406
473
|
"data-test": "date-time-popover"
|
|
407
|
-
},
|
|
474
|
+
}, ma = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, va = {
|
|
408
475
|
key: 0,
|
|
409
476
|
class: "border-t border-border-separator pt-2.5"
|
|
410
|
-
},
|
|
477
|
+
}, pa = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, ba = ["for"], ga = ["id", "value", "placeholder", "aria-invalid"], ya = ["onClick"], go = /* @__PURE__ */ K({
|
|
411
478
|
__name: "DateTimeField",
|
|
412
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
479
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
413
480
|
label: {},
|
|
414
481
|
labelHidden: { type: Boolean },
|
|
415
482
|
hint: {},
|
|
@@ -426,216 +493,238 @@ const Yt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Wt = ["name
|
|
|
426
493
|
openOn: {},
|
|
427
494
|
minuteStep: {},
|
|
428
495
|
quickPicks: {}
|
|
429
|
-
}, { ...
|
|
496
|
+
}, { ...ce, min: void 0, max: void 0, disabledDates: void 0, openOn: void 0, minuteStep: 1, quickPicks: void 0 }), {
|
|
430
497
|
modelValue: { default: null },
|
|
431
498
|
modelModifiers: {}
|
|
432
499
|
}),
|
|
433
500
|
emits: ["update:modelValue"],
|
|
434
501
|
setup(o, { expose: t }) {
|
|
435
|
-
const e = o,
|
|
436
|
-
function
|
|
437
|
-
const { date: j, time:
|
|
438
|
-
if (!
|
|
439
|
-
let V = _.value.time ??
|
|
440
|
-
if (
|
|
441
|
-
const B = L.parse(
|
|
502
|
+
const e = o, l = oe(o, "modelValue"), { t: s } = Z(), a = Lt(), d = Ie(), c = A("input"), g = A("popover"), k = A("calendar"), w = A("sheet"), y = x(() => ({ min: e.min?.slice(0, 10), max: e.max?.slice(0, 10), disabled: e.disabledDates })), r = x(() => e.min && e.min.length === 10 ? `${e.min}T00:00` : e.min), u = x(() => e.max && e.max.length === 10 ? `${e.max}T23:59` : e.max), p = ($, j) => !$t(j, { disabled: e.disabledDates }) && (!r.value || $ >= r.value) && (!u.value || $ <= u.value), F = Ct(() => y.value), L = Tt(() => e.minuteStep), _ = x(() => _e(l.value));
|
|
503
|
+
function G($) {
|
|
504
|
+
const { date: j, time: me } = Bt($), v = j === null ? _.value.day ?? Fe() : F.parse(j);
|
|
505
|
+
if (!v) return { error: F.invalidMessage() };
|
|
506
|
+
let V = _.value.time ?? Te(e.minuteStep);
|
|
507
|
+
if (me !== null) {
|
|
508
|
+
const B = L.parse(me);
|
|
442
509
|
if ("error" in B) return B;
|
|
443
510
|
V = B.value;
|
|
444
511
|
}
|
|
445
|
-
const f =
|
|
446
|
-
return
|
|
512
|
+
const f = $e(v, V);
|
|
513
|
+
return p(f, v) ? { value: f } : { error: F.unavailableMessage() };
|
|
447
514
|
}
|
|
448
|
-
const
|
|
515
|
+
const S = He({ model: l, display: ($) => `${a.date(_e($).day)} ${_e($).time ?? ""}`.trim(), parse: G }), O = x({
|
|
449
516
|
get: () => _.value.time,
|
|
450
|
-
set: (
|
|
451
|
-
|
|
517
|
+
set: ($) => {
|
|
518
|
+
$ && yt($) && (l.value = $e(_.value.day ?? Fe(), $));
|
|
452
519
|
}
|
|
453
|
-
}),
|
|
454
|
-
const
|
|
455
|
-
return
|
|
456
|
-
}),
|
|
457
|
-
function
|
|
458
|
-
|
|
520
|
+
}), I = He({ model: O, display: ($) => $, parse: L.parse }), H = Ft(() => e.quickPicks ?? (d.value ? void 0 : []), () => d.value, () => y.value), ee = x(() => e.error || S.message.value || I.message.value), te = x(() => l.value ? a.dateTime(l.value) : null), Q = Ee("date", () => ee.value ? "error" : e.disabled ? "locked" : "rest"), E = x(() => {
|
|
521
|
+
const $ = S.typed.value;
|
|
522
|
+
return $ ? _e($).day ?? null : null;
|
|
523
|
+
}), W = x(() => E.value ?? (ht(_.value.day) ? _.value.day : null)), U = x(() => S.typed.value ? _e(S.typed.value).time : _.value.time);
|
|
524
|
+
function P($) {
|
|
525
|
+
$ && S.set($e($, _.value.time ?? Te(e.minuteStep)));
|
|
459
526
|
}
|
|
460
|
-
function
|
|
461
|
-
|
|
527
|
+
function ae($) {
|
|
528
|
+
$ && S.set($e(_.value.day ?? Fe(), $));
|
|
462
529
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
530
|
+
function le($) {
|
|
531
|
+
S.set($e(Fe(), Te(e.minuteStep))), $();
|
|
465
532
|
}
|
|
466
|
-
const
|
|
467
|
-
async function
|
|
468
|
-
e.disabled || (
|
|
533
|
+
const he = Oe();
|
|
534
|
+
async function fe($) {
|
|
535
|
+
e.disabled || (g.value?.present(), $ && (await ke(), await ke(), k.value?.focus()));
|
|
469
536
|
}
|
|
470
|
-
function
|
|
471
|
-
|
|
537
|
+
function we($) {
|
|
538
|
+
$.key === "Enter" ? (S.commit(), g.value?.dismiss()) : $.key === "ArrowDown" && ($.preventDefault(), fe(!0));
|
|
472
539
|
}
|
|
473
|
-
return t({ focus: () =>
|
|
474
|
-
value:
|
|
540
|
+
return t({ focus: () => c.value?.focus() }), ($, j) => (i(), q(ye, J({ ...n(de)(e), error: ee.value }, {
|
|
541
|
+
value: te.value,
|
|
475
542
|
"value-style": "numeric"
|
|
476
|
-
}), {
|
|
477
|
-
default:
|
|
478
|
-
n(d) ? (i(),
|
|
479
|
-
M(at,
|
|
543
|
+
}), re({
|
|
544
|
+
default: m(({ id: me, describedby: v, invalid: V }) => [
|
|
545
|
+
n(d) ? (i(), h(se, { key: 0 }, [
|
|
546
|
+
M(at, J({ id: me, "aria-describedby": v }, {
|
|
480
547
|
disabled: e.disabled,
|
|
481
548
|
invalid: V,
|
|
482
549
|
placeholder: n(s)("core.form.select.choose"),
|
|
483
|
-
onClick: j[0] || (j[0] = (f) =>
|
|
550
|
+
onClick: j[0] || (j[0] = (f) => w.value?.present())
|
|
484
551
|
}), {
|
|
485
|
-
default:
|
|
486
|
-
|
|
487
|
-
|
|
552
|
+
default: m(() => [
|
|
553
|
+
l.value ? (i(), h(se, { key: 0 }, [
|
|
554
|
+
Y(C(n(S).text.value), 1)
|
|
488
555
|
], 64)) : D("", !0)
|
|
489
556
|
]),
|
|
490
557
|
_: 1
|
|
491
558
|
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
492
|
-
M(
|
|
559
|
+
M(kt, {
|
|
493
560
|
ref_key: "sheet",
|
|
494
|
-
ref:
|
|
561
|
+
ref: w,
|
|
495
562
|
title: e.label ?? n(s)("core.form.date.calendar"),
|
|
496
563
|
mode: "datetime",
|
|
497
|
-
"model-value":
|
|
498
|
-
min:
|
|
499
|
-
max:
|
|
564
|
+
"model-value": l.value,
|
|
565
|
+
min: y.value.min,
|
|
566
|
+
max: y.value.max,
|
|
500
567
|
"disabled-dates": e.disabledDates,
|
|
501
568
|
"open-on": e.openOn,
|
|
502
|
-
shortcuts: n(
|
|
569
|
+
shortcuts: n(H),
|
|
503
570
|
step: e.minuteStep,
|
|
504
571
|
clearable: !e.required,
|
|
505
|
-
"onUpdate:modelValue": n(
|
|
572
|
+
"onUpdate:modelValue": n(S).set
|
|
506
573
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
507
|
-
], 64)) : (i(), q(
|
|
574
|
+
], 64)) : (i(), q(Ge, {
|
|
508
575
|
key: 1,
|
|
509
576
|
ref_key: "popover",
|
|
510
|
-
ref:
|
|
577
|
+
ref: g,
|
|
511
578
|
label: e.label ?? n(s)("core.form.date.calendar"),
|
|
512
579
|
width: "auto",
|
|
513
580
|
placement: "bottom-start",
|
|
514
581
|
arrow: !1,
|
|
515
582
|
autofocus: !1
|
|
516
583
|
}, {
|
|
517
|
-
trigger:
|
|
518
|
-
|
|
519
|
-
class: R(["inline-flex max-w-full items-center gap-2", n(
|
|
584
|
+
trigger: m(({ attrs: f, presented: B }) => [
|
|
585
|
+
b("div", {
|
|
586
|
+
class: R(["inline-flex max-w-full items-center gap-2", n(Q)])
|
|
520
587
|
}, [
|
|
521
|
-
|
|
522
|
-
id:
|
|
588
|
+
b("input", J({
|
|
589
|
+
id: me,
|
|
523
590
|
ref_key: "input",
|
|
524
|
-
ref:
|
|
591
|
+
ref: c
|
|
525
592
|
}, f, {
|
|
526
593
|
type: "text",
|
|
527
594
|
role: "combobox",
|
|
528
595
|
autocomplete: "off",
|
|
529
596
|
size: "20",
|
|
530
597
|
name: e.name,
|
|
531
|
-
value: n(
|
|
598
|
+
value: n(S).text.value,
|
|
532
599
|
placeholder: n(F).placeholder.value,
|
|
533
600
|
disabled: e.disabled,
|
|
534
601
|
required: e.required,
|
|
535
602
|
"aria-required": e.required || void 0,
|
|
536
603
|
"aria-invalid": V || void 0,
|
|
537
|
-
"aria-describedby":
|
|
604
|
+
"aria-describedby": v,
|
|
538
605
|
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
539
|
-
onInput: j[1] || (j[1] = (
|
|
540
|
-
onBlur: j[2] || (j[2] = (
|
|
541
|
-
onKeydown:
|
|
542
|
-
onClick: j[3] || (j[3] = (
|
|
543
|
-
}), null, 16,
|
|
544
|
-
e.disabled ? D("", !0) : (i(),
|
|
606
|
+
onInput: j[1] || (j[1] = (T) => n(S).input(T.target.value)),
|
|
607
|
+
onBlur: j[2] || (j[2] = (T) => n(S).commit()),
|
|
608
|
+
onKeydown: we,
|
|
609
|
+
onClick: j[3] || (j[3] = (T) => fe(!1))
|
|
610
|
+
}), null, 16, da),
|
|
611
|
+
e.disabled ? D("", !0) : (i(), h("button", {
|
|
545
612
|
key: 0,
|
|
546
613
|
type: "button",
|
|
547
614
|
tabindex: "-1",
|
|
548
615
|
"aria-label": n(s)("core.form.date.open"),
|
|
549
616
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
550
|
-
onClick: (
|
|
617
|
+
onClick: (T) => B ? g.value?.dismiss() : fe(!0)
|
|
551
618
|
}, [
|
|
552
|
-
M(n(
|
|
619
|
+
M(n(X), {
|
|
553
620
|
name: "calendarLine",
|
|
554
621
|
size: 18
|
|
555
622
|
})
|
|
556
|
-
], 8,
|
|
623
|
+
], 8, ca))
|
|
557
624
|
], 2)
|
|
558
625
|
]),
|
|
559
|
-
default:
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
M(
|
|
626
|
+
default: m(({ dismiss: f }) => [
|
|
627
|
+
b("div", fa, [
|
|
628
|
+
b("div", ma, [
|
|
629
|
+
M(xt, {
|
|
563
630
|
ref_key: "calendar",
|
|
564
|
-
ref:
|
|
565
|
-
"model-value":
|
|
566
|
-
min:
|
|
567
|
-
max:
|
|
631
|
+
ref: k,
|
|
632
|
+
"model-value": W.value,
|
|
633
|
+
min: y.value.min,
|
|
634
|
+
max: y.value.max,
|
|
568
635
|
"disabled-dates": e.disabledDates,
|
|
569
636
|
"open-on": e.openOn,
|
|
570
|
-
"onUpdate:modelValue":
|
|
637
|
+
"onUpdate:modelValue": P
|
|
571
638
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
572
|
-
n(
|
|
573
|
-
M(
|
|
574
|
-
items: n(
|
|
575
|
-
selected:
|
|
576
|
-
onPick:
|
|
639
|
+
n(H).length > 0 ? (i(), h("div", va, [
|
|
640
|
+
M(wt, {
|
|
641
|
+
items: n(H),
|
|
642
|
+
selected: W.value,
|
|
643
|
+
onPick: P
|
|
577
644
|
}, null, 8, ["items", "selected"])
|
|
578
645
|
])) : D("", !0)
|
|
579
646
|
]),
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
for: n(
|
|
647
|
+
b("div", pa, [
|
|
648
|
+
b("label", {
|
|
649
|
+
for: n(he),
|
|
583
650
|
class: "text-footnote font-semibold text-content-muted"
|
|
584
|
-
},
|
|
585
|
-
|
|
586
|
-
id: n(
|
|
651
|
+
}, C(n(s)("core.form.time.label")), 9, ba),
|
|
652
|
+
b("input", {
|
|
653
|
+
id: n(he),
|
|
587
654
|
type: "text",
|
|
588
655
|
autocomplete: "off",
|
|
589
656
|
inputmode: "numeric",
|
|
590
|
-
value: n(
|
|
657
|
+
value: n(I).text.value,
|
|
591
658
|
placeholder: n(L).placeholder.value,
|
|
592
|
-
"aria-invalid": n(
|
|
659
|
+
"aria-invalid": n(I).message.value ? !0 : void 0,
|
|
593
660
|
class: "rounded-control bg-fill p-1.5 text-center text-[20px] font-semibold tabular-nums text-content-strong placeholder:text-base placeholder:font-normal placeholder:text-content-disabled focus:outline-2 focus:outline-border-focus",
|
|
594
|
-
onInput: j[4] || (j[4] = (B) => n(
|
|
595
|
-
onBlur: j[5] || (j[5] = (B) => n(
|
|
596
|
-
onKeydown: j[6] || (j[6] =
|
|
597
|
-
}, null, 40,
|
|
598
|
-
M(
|
|
599
|
-
"model-value":
|
|
661
|
+
onInput: j[4] || (j[4] = (B) => n(I).input(B.target.value)),
|
|
662
|
+
onBlur: j[5] || (j[5] = (B) => n(I).commit()),
|
|
663
|
+
onKeydown: j[6] || (j[6] = Ce(be((B) => n(I).commit(), ["prevent"]), ["enter"]))
|
|
664
|
+
}, null, 40, ga),
|
|
665
|
+
M(_t, {
|
|
666
|
+
"model-value": U.value,
|
|
600
667
|
step: e.minuteStep,
|
|
601
|
-
"onUpdate:modelValue":
|
|
668
|
+
"onUpdate:modelValue": ae
|
|
602
669
|
}, null, 8, ["model-value", "step"]),
|
|
603
|
-
|
|
670
|
+
b("button", {
|
|
604
671
|
type: "button",
|
|
605
672
|
class: "cursor-pointer self-start rounded-full bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
606
|
-
onClick: (B) =>
|
|
607
|
-
},
|
|
673
|
+
onClick: (B) => le(f)
|
|
674
|
+
}, C(n(s)("core.form.time.now")), 9, ya)
|
|
608
675
|
])
|
|
609
676
|
])
|
|
610
677
|
]),
|
|
611
678
|
_: 2
|
|
612
679
|
}, 1032, ["label"]))
|
|
613
680
|
]),
|
|
614
|
-
_:
|
|
615
|
-
},
|
|
681
|
+
_: 2
|
|
682
|
+
}, [
|
|
683
|
+
$.$slots.trailing ? {
|
|
684
|
+
name: "trailing",
|
|
685
|
+
fn: m(() => [
|
|
686
|
+
z($.$slots, "trailing")
|
|
687
|
+
]),
|
|
688
|
+
key: "0"
|
|
689
|
+
} : void 0,
|
|
690
|
+
$.$slots.labelTrailing ? {
|
|
691
|
+
name: "labelTrailing",
|
|
692
|
+
fn: m(() => [
|
|
693
|
+
z($.$slots, "labelTrailing")
|
|
694
|
+
]),
|
|
695
|
+
key: "1"
|
|
696
|
+
} : void 0,
|
|
697
|
+
$.$slots.readonly ? {
|
|
698
|
+
name: "readonly",
|
|
699
|
+
fn: m(() => [
|
|
700
|
+
z($.$slots, "readonly")
|
|
701
|
+
]),
|
|
702
|
+
key: "2"
|
|
703
|
+
} : void 0
|
|
704
|
+
]), 1040, ["value"]));
|
|
616
705
|
}
|
|
617
706
|
});
|
|
618
707
|
function lt(o, t = {}) {
|
|
619
708
|
const e = t.accept ?? [];
|
|
620
709
|
if (e.length > 0) {
|
|
621
|
-
const
|
|
622
|
-
if (!e.some((
|
|
623
|
-
const
|
|
624
|
-
return
|
|
710
|
+
const l = o.name.lastIndexOf("."), s = l === -1 ? "" : o.name.slice(l).toLowerCase(), a = o.type.toLowerCase();
|
|
711
|
+
if (!e.some((c) => {
|
|
712
|
+
const g = c.trim().toLowerCase();
|
|
713
|
+
return g.startsWith(".") ? g === s : g.endsWith("/*") ? a.startsWith(g.slice(0, -1)) : g === a;
|
|
625
714
|
})) return "invalid_type";
|
|
626
715
|
}
|
|
627
716
|
return (t.maxSize ?? 0) > 0 && o.size > (t.maxSize ?? 0) ? "too_large" : null;
|
|
628
717
|
}
|
|
629
|
-
function
|
|
718
|
+
function Be(o) {
|
|
630
719
|
return o < 1024 ? `${o} B` : o < 1024 * 1024 ? `${Math.round(o / 1024)} KB` : `${(o / (1024 * 1024)).toFixed(o % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
631
720
|
}
|
|
632
|
-
const
|
|
721
|
+
const ha = { class: "w-full" }, ka = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], xa = {
|
|
633
722
|
key: 0,
|
|
634
723
|
class: "flex items-center gap-3 rounded-group bg-fill p-3",
|
|
635
724
|
"data-test": "file-selected"
|
|
636
|
-
},
|
|
725
|
+
}, wa = { class: "min-w-0 flex-1" }, _a = { class: "truncate text-body font-medium text-content-strong" }, $a = { class: "text-footnote text-content-muted" }, Sa = ["disabled", "aria-label", "title"], Ca = ["aria-disabled"], Fa = { class: "font-semibold text-content-link" }, Ba = { class: "text-content-muted" }, yo = /* @__PURE__ */ K({
|
|
637
726
|
__name: "FileField",
|
|
638
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
727
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
639
728
|
label: {},
|
|
640
729
|
labelHidden: { type: Boolean },
|
|
641
730
|
hint: {},
|
|
@@ -649,100 +738,122 @@ const ya = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
649
738
|
variant: {},
|
|
650
739
|
accept: {},
|
|
651
740
|
maxSize: {}
|
|
652
|
-
}, { ...
|
|
741
|
+
}, { ...ce, variant: "button", accept: () => [], maxSize: 0 }), {
|
|
653
742
|
modelValue: { default: null },
|
|
654
743
|
modelModifiers: {}
|
|
655
744
|
}),
|
|
656
745
|
emits: ["update:modelValue"],
|
|
657
746
|
setup(o, { expose: t }) {
|
|
658
|
-
const e = o,
|
|
747
|
+
const e = o, l = oe(o, "modelValue"), { t: s } = Z(), a = A("chooser"), d = N(!1), c = N(null), g = x(() => {
|
|
659
748
|
if (e.hint) return e.hint;
|
|
660
|
-
const
|
|
661
|
-
return e.accept.length &&
|
|
749
|
+
const y = [];
|
|
750
|
+
return e.accept.length && y.push(s("core.form.file.allowed", { formats: e.accept.map((r) => r.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && y.push(s("core.form.file.max_size", { size: Be(e.maxSize) })), y.join(" · ") || void 0;
|
|
662
751
|
});
|
|
663
|
-
function y
|
|
664
|
-
if (!
|
|
665
|
-
const r = lt(
|
|
666
|
-
r ? (
|
|
752
|
+
function k(y) {
|
|
753
|
+
if (!y) return;
|
|
754
|
+
const r = lt(y, { accept: e.accept, maxSize: e.maxSize });
|
|
755
|
+
r ? (c.value = r === "invalid_type" ? s("core.form.file.invalid_type") : s("core.form.file.too_large", { size: Be(e.maxSize) }), l.value = null) : (c.value = null, l.value = y);
|
|
667
756
|
}
|
|
668
|
-
function
|
|
669
|
-
|
|
757
|
+
function w() {
|
|
758
|
+
l.value = null, c.value = null;
|
|
670
759
|
}
|
|
671
|
-
return
|
|
672
|
-
!
|
|
673
|
-
}), t({ clear:
|
|
674
|
-
value:
|
|
760
|
+
return ie(l, (y) => {
|
|
761
|
+
!y && a.value && (a.value.value = "");
|
|
762
|
+
}), t({ clear: w }), (y, r) => (i(), q(ye, J({ ...n(de)(e), hint: g.value, error: c.value ?? e.error }, {
|
|
763
|
+
value: l.value?.name ?? null,
|
|
675
764
|
"row-layout": "stacked"
|
|
676
|
-
}), {
|
|
677
|
-
default:
|
|
678
|
-
|
|
679
|
-
|
|
765
|
+
}), re({
|
|
766
|
+
default: m(({ id: u, describedby: p, invalid: F }) => [
|
|
767
|
+
b("div", ha, [
|
|
768
|
+
b("input", {
|
|
680
769
|
id: u,
|
|
681
770
|
ref_key: "chooser",
|
|
682
|
-
ref:
|
|
771
|
+
ref: a,
|
|
683
772
|
type: "file",
|
|
684
773
|
class: "sr-only",
|
|
685
774
|
tabindex: "-1",
|
|
686
775
|
accept: e.accept.join(",") || void 0,
|
|
687
776
|
disabled: e.disabled,
|
|
688
|
-
"aria-describedby":
|
|
777
|
+
"aria-describedby": p,
|
|
689
778
|
"aria-invalid": F || void 0,
|
|
690
|
-
onChange: r[0] || (r[0] = (L) =>
|
|
691
|
-
}, null, 40,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
779
|
+
onChange: r[0] || (r[0] = (L) => k(L.target.files?.[0]))
|
|
780
|
+
}, null, 40, ka),
|
|
781
|
+
l.value ? (i(), h("div", xa, [
|
|
782
|
+
b("div", wa, [
|
|
783
|
+
b("p", _a, C(l.value.name), 1),
|
|
784
|
+
b("p", $a, C(n(Be)(l.value.size)), 1)
|
|
696
785
|
]),
|
|
697
|
-
|
|
786
|
+
b("button", {
|
|
698
787
|
type: "button",
|
|
699
788
|
disabled: e.disabled,
|
|
700
789
|
"aria-label": n(s)("core.form.file.remove"),
|
|
701
790
|
title: n(s)("core.form.file.remove"),
|
|
702
791
|
class: "flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed",
|
|
703
|
-
onClick:
|
|
792
|
+
onClick: w
|
|
704
793
|
}, [
|
|
705
|
-
M(n(
|
|
794
|
+
M(n(X), {
|
|
706
795
|
name: "close",
|
|
707
796
|
size: 14
|
|
708
797
|
})
|
|
709
|
-
], 8,
|
|
710
|
-
])) : e.variant === "dropzone" ? (i(),
|
|
798
|
+
], 8, Sa)
|
|
799
|
+
])) : e.variant === "dropzone" ? (i(), h("div", {
|
|
711
800
|
key: 1,
|
|
712
801
|
role: "button",
|
|
713
802
|
tabindex: "0",
|
|
714
803
|
"data-test": "file-dropzone",
|
|
715
804
|
"aria-disabled": e.disabled || void 0,
|
|
716
805
|
class: R(["cursor-pointer rounded-group border-2 border-dashed p-6 text-center text-body transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", d.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
717
|
-
onClick: r[1] || (r[1] = (L) => !e.disabled &&
|
|
806
|
+
onClick: r[1] || (r[1] = (L) => !e.disabled && a.value?.click()),
|
|
718
807
|
onKeydown: [
|
|
719
|
-
r[2] || (r[2] =
|
|
720
|
-
r[3] || (r[3] =
|
|
808
|
+
r[2] || (r[2] = Ce(be((L) => !e.disabled && a.value?.click(), ["prevent"]), ["enter"])),
|
|
809
|
+
r[3] || (r[3] = Ce(be((L) => !e.disabled && a.value?.click(), ["prevent"]), ["space"]))
|
|
721
810
|
],
|
|
722
|
-
onDragover: r[4] || (r[4] =
|
|
723
|
-
onDragleave: r[5] || (r[5] =
|
|
724
|
-
onDrop: r[6] || (r[6] =
|
|
725
|
-
d.value = !1, e.disabled ||
|
|
811
|
+
onDragover: r[4] || (r[4] = be((L) => d.value = !0, ["prevent"])),
|
|
812
|
+
onDragleave: r[5] || (r[5] = be((L) => d.value = !1, ["prevent"])),
|
|
813
|
+
onDrop: r[6] || (r[6] = be((L) => {
|
|
814
|
+
d.value = !1, e.disabled || k(L.dataTransfer?.files?.[0]);
|
|
726
815
|
}, ["prevent"]))
|
|
727
816
|
}, [
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
], 42,
|
|
817
|
+
b("span", Fa, C(n(s)("core.form.file.choose")), 1),
|
|
818
|
+
b("span", Ba, C(n(s)("core.form.file.drop")), 1)
|
|
819
|
+
], 42, Ca)) : (i(), q(ge, {
|
|
731
820
|
key: 2,
|
|
732
821
|
disabled: e.disabled,
|
|
733
|
-
onClick: r[7] || (r[7] = (L) =>
|
|
822
|
+
onClick: r[7] || (r[7] = (L) => a.value?.click())
|
|
734
823
|
}, {
|
|
735
|
-
default:
|
|
736
|
-
|
|
824
|
+
default: m(() => [
|
|
825
|
+
Y(C(n(s)("core.form.file.choose")), 1)
|
|
737
826
|
]),
|
|
738
827
|
_: 1
|
|
739
828
|
}, 8, ["disabled"]))
|
|
740
829
|
])
|
|
741
830
|
]),
|
|
742
|
-
_:
|
|
743
|
-
},
|
|
831
|
+
_: 2
|
|
832
|
+
}, [
|
|
833
|
+
y.$slots.trailing ? {
|
|
834
|
+
name: "trailing",
|
|
835
|
+
fn: m(() => [
|
|
836
|
+
z(y.$slots, "trailing")
|
|
837
|
+
]),
|
|
838
|
+
key: "0"
|
|
839
|
+
} : void 0,
|
|
840
|
+
y.$slots.labelTrailing ? {
|
|
841
|
+
name: "labelTrailing",
|
|
842
|
+
fn: m(() => [
|
|
843
|
+
z(y.$slots, "labelTrailing")
|
|
844
|
+
]),
|
|
845
|
+
key: "1"
|
|
846
|
+
} : void 0,
|
|
847
|
+
y.$slots.readonly ? {
|
|
848
|
+
name: "readonly",
|
|
849
|
+
fn: m(() => [
|
|
850
|
+
z(y.$slots, "readonly")
|
|
851
|
+
]),
|
|
852
|
+
key: "2"
|
|
853
|
+
} : void 0
|
|
854
|
+
]), 1040, ["value"]));
|
|
744
855
|
}
|
|
745
|
-
}),
|
|
856
|
+
}), La = ["disabled"], ho = /* @__PURE__ */ K({
|
|
746
857
|
__name: "FormGroupButton",
|
|
747
858
|
props: {
|
|
748
859
|
label: {},
|
|
@@ -751,17 +862,17 @@ const ya = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
751
862
|
},
|
|
752
863
|
emits: ["click"],
|
|
753
864
|
setup(o, { emit: t }) {
|
|
754
|
-
const e = o,
|
|
755
|
-
return (s,
|
|
756
|
-
default:
|
|
865
|
+
const e = o, l = t;
|
|
866
|
+
return (s, a) => (i(), q(zt, null, {
|
|
867
|
+
default: m(() => [
|
|
757
868
|
M(dt, { layout: "stacked" }, {
|
|
758
|
-
default:
|
|
759
|
-
|
|
869
|
+
default: m(() => [
|
|
870
|
+
b("button", {
|
|
760
871
|
type: "button",
|
|
761
872
|
disabled: e.disabled,
|
|
762
873
|
class: R(["w-full py-1 text-center text-body focus-visible:outline-2 focus-visible:outline-border-focus disabled:text-content-disabled", e.tone === "critical" ? "text-content-destructive" : "text-content-link"]),
|
|
763
|
-
onClick:
|
|
764
|
-
},
|
|
874
|
+
onClick: a[0] || (a[0] = (d) => l("click"))
|
|
875
|
+
}, C(e.label), 11, La)
|
|
765
876
|
]),
|
|
766
877
|
_: 1
|
|
767
878
|
})
|
|
@@ -769,13 +880,13 @@ const ya = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
769
880
|
_: 1
|
|
770
881
|
}));
|
|
771
882
|
}
|
|
772
|
-
}),
|
|
883
|
+
}), ko = /* @__PURE__ */ K({
|
|
773
884
|
__name: "FormIndent",
|
|
774
885
|
setup(o) {
|
|
775
|
-
return Ve(ct, ft() + 1), (t, e) =>
|
|
886
|
+
return Ve(ct, ft() + 1), (t, e) => z(t.$slots, "default");
|
|
776
887
|
}
|
|
777
888
|
});
|
|
778
|
-
function
|
|
889
|
+
function Ta(o, t) {
|
|
779
890
|
return t.filter((e) => (o?.[e] ?? "").trim() === "");
|
|
780
891
|
}
|
|
781
892
|
const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Va = ["id", "value", "lang", "name", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], qa = {
|
|
@@ -788,12 +899,12 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
788
899
|
}, Oa = {
|
|
789
900
|
key: 1,
|
|
790
901
|
class: "flex-1"
|
|
791
|
-
}, ja = ["aria-label"], Ra = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"],
|
|
902
|
+
}, ja = ["aria-label"], Ra = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"], Ea = ["data-state"], Ia = { class: "w-full" }, Ga = { class: "whitespace-pre-line break-words text-body text-content-strong" }, Na = ["aria-expanded"], Ka = { class: "flex-1" }, Pa = {
|
|
792
903
|
key: 0,
|
|
793
904
|
class: "mt-1 flex flex-col gap-1.5"
|
|
794
|
-
},
|
|
905
|
+
}, Aa = ["title"], xo = /* @__PURE__ */ K({
|
|
795
906
|
__name: "I18nField",
|
|
796
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
907
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
797
908
|
label: {},
|
|
798
909
|
labelHidden: { type: Boolean },
|
|
799
910
|
hint: {},
|
|
@@ -811,70 +922,70 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
811
922
|
rows: {},
|
|
812
923
|
placeholder: {},
|
|
813
924
|
maxLength: {}
|
|
814
|
-
}, { ...
|
|
925
|
+
}, { ...ce, locales: void 0, defaultLocale: void 0, requiredLocales: () => [], multiline: !1, rows: 3, placeholder: void 0, maxLength: void 0 }), {
|
|
815
926
|
modelValue: { default: () => ({}) },
|
|
816
927
|
modelModifiers: {}
|
|
817
928
|
}),
|
|
818
929
|
emits: ["update:modelValue"],
|
|
819
930
|
setup(o, { expose: t }) {
|
|
820
|
-
const e = o,
|
|
821
|
-
function
|
|
931
|
+
const e = o, l = oe(o, "modelValue"), { t: s, locale: a, availableLocales: d } = Z(), c = Ze(qt, null), g = Oe(), k = A("field"), w = A("root"), { editable: y } = et(e), r = Ee(e.multiline ? "area" : "text", () => e.error || ae.value ? "error" : e.disabled ? "locked" : "rest"), u = x(() => e.locales ?? c?.locales ?? d), p = x(() => e.defaultLocale ?? u.value[0] ?? ""), F = x(() => u.value.includes(p.value) ? [p.value, ...u.value.filter((f) => f !== p.value)] : u.value), L = N(null), _ = x(() => L.value !== null && F.value.includes(L.value) ? L.value : F.value.includes(a.value) ? a.value : p.value), G = (f) => l.value[f] ?? "", S = (f) => G(f).trim() !== "", O = (f) => f.toUpperCase();
|
|
932
|
+
function I(f) {
|
|
822
933
|
try {
|
|
823
|
-
return new Intl.DisplayNames([
|
|
934
|
+
return new Intl.DisplayNames([Vt(a.value)], { type: "language" }).of(f) ?? O(f);
|
|
824
935
|
} catch {
|
|
825
936
|
return O(f);
|
|
826
937
|
}
|
|
827
938
|
}
|
|
828
|
-
const
|
|
829
|
-
function
|
|
830
|
-
|
|
939
|
+
const H = (f) => f.map(I).join(", ");
|
|
940
|
+
function ee(f, B) {
|
|
941
|
+
l.value = { ...l.value, [f]: B };
|
|
831
942
|
}
|
|
832
|
-
const
|
|
833
|
-
function
|
|
834
|
-
L.value = f, B &&
|
|
943
|
+
const te = (f) => `${g}-tab-${f}`;
|
|
944
|
+
function Q(f, B) {
|
|
945
|
+
L.value = f, B && ke(() => k.value?.focus());
|
|
835
946
|
}
|
|
836
|
-
function
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
947
|
+
function E(f, B) {
|
|
948
|
+
const T = F.value.length - 1, ve = { ArrowRight: B + 1, ArrowLeft: B - 1, Home: 0, End: T }[f.key];
|
|
949
|
+
if (ve === void 0) return;
|
|
839
950
|
f.preventDefault();
|
|
840
|
-
const
|
|
841
|
-
|
|
951
|
+
const pe = F.value[(ve + F.value.length) % F.value.length];
|
|
952
|
+
pe !== void 0 && (Q(pe, !1), ke(() => document.getElementById(te(pe))?.focus()));
|
|
842
953
|
}
|
|
843
|
-
const
|
|
844
|
-
function
|
|
845
|
-
|
|
954
|
+
const W = N(!1);
|
|
955
|
+
function U(f) {
|
|
956
|
+
w.value?.contains(f.relatedTarget) || (W.value = !0);
|
|
846
957
|
}
|
|
847
|
-
const
|
|
848
|
-
function
|
|
849
|
-
const f =
|
|
850
|
-
|
|
958
|
+
const P = x(() => Ta(l.value, e.requiredLocales)), ae = x(() => W.value && P.value.length > 0 ? s("core.form.i18n.required", { languages: H(P.value) }) : void 0), le = x(() => e.requiredLocales.length > 0 ? P.value.length === 0 : F.value.some(S)), he = x(() => F.value.filter((f) => !S(f) && !(ae.value && P.value.includes(f)))), fe = x(() => S(p.value) && F.value.some((f) => f !== p.value && !S(f)));
|
|
959
|
+
function we() {
|
|
960
|
+
const f = G(p.value);
|
|
961
|
+
l.value = { ...l.value, ...Object.fromEntries(F.value.filter((B) => !S(B)).map((B) => [B, f])) };
|
|
851
962
|
}
|
|
852
|
-
const
|
|
853
|
-
return t({ focus: () =>
|
|
854
|
-
value: n(
|
|
963
|
+
const $ = x(() => [a.value, p.value, ...F.value].find((f) => F.value.includes(f) && S(f))), j = x(() => F.value.filter((f) => f !== $.value)), me = x(() => j.value.filter(S).length), v = N(!1), V = x(() => e.label && !y.value && $.value ? `${e.label} · ${O($.value)}` : e.label);
|
|
964
|
+
return t({ focus: () => k.value?.focus() }), (f, B) => (i(), q(ye, J({ ...n(de)(e), label: V.value, error: e.error ?? ae.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
965
|
+
value: n(y) ? le.value ? "written" : null : $.value ? G($.value) : null,
|
|
855
966
|
"row-layout": "stacked"
|
|
856
|
-
}),
|
|
857
|
-
default:
|
|
858
|
-
|
|
967
|
+
}), re({
|
|
968
|
+
default: m(({ id: T, describedby: ve, invalid: pe }) => [
|
|
969
|
+
b("div", {
|
|
859
970
|
ref_key: "root",
|
|
860
|
-
ref:
|
|
971
|
+
ref: w,
|
|
861
972
|
class: "w-full",
|
|
862
|
-
onFocusout:
|
|
973
|
+
onFocusout: U
|
|
863
974
|
}, [
|
|
864
|
-
|
|
865
|
-
id: `${n(
|
|
975
|
+
b("div", {
|
|
976
|
+
id: `${n(g)}-panel`,
|
|
866
977
|
role: "tabpanel",
|
|
867
|
-
"aria-labelledby":
|
|
978
|
+
"aria-labelledby": te(_.value)
|
|
868
979
|
}, [
|
|
869
|
-
|
|
980
|
+
b("div", {
|
|
870
981
|
class: R(["w-full", n(r)])
|
|
871
982
|
}, [
|
|
872
|
-
e.multiline ? (i(),
|
|
983
|
+
e.multiline ? (i(), h("textarea", {
|
|
873
984
|
key: 0,
|
|
874
|
-
id:
|
|
985
|
+
id: T,
|
|
875
986
|
ref_key: "field",
|
|
876
|
-
ref:
|
|
877
|
-
value:
|
|
987
|
+
ref: k,
|
|
988
|
+
value: G(_.value),
|
|
878
989
|
lang: _.value,
|
|
879
990
|
name: e.name,
|
|
880
991
|
rows: e.rows,
|
|
@@ -882,17 +993,17 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
882
993
|
maxlength: e.maxLength,
|
|
883
994
|
disabled: e.disabled,
|
|
884
995
|
"aria-required": e.required || void 0,
|
|
885
|
-
"aria-invalid":
|
|
886
|
-
"aria-describedby":
|
|
996
|
+
"aria-invalid": pe || void 0,
|
|
997
|
+
"aria-describedby": ve,
|
|
887
998
|
"data-test": "i18n-input",
|
|
888
999
|
class: "block w-full resize-y border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
889
|
-
onInput: B[0] || (B[0] = (
|
|
890
|
-
}, null, 40, Da)) : (i(),
|
|
1000
|
+
onInput: B[0] || (B[0] = (Le) => ee(_.value, Le.target.value))
|
|
1001
|
+
}, null, 40, Da)) : (i(), h("input", {
|
|
891
1002
|
key: 1,
|
|
892
|
-
id:
|
|
1003
|
+
id: T,
|
|
893
1004
|
ref_key: "field",
|
|
894
|
-
ref:
|
|
895
|
-
value:
|
|
1005
|
+
ref: k,
|
|
1006
|
+
value: G(_.value),
|
|
896
1007
|
lang: _.value,
|
|
897
1008
|
type: "text",
|
|
898
1009
|
name: e.name,
|
|
@@ -900,102 +1011,109 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
900
1011
|
maxlength: e.maxLength,
|
|
901
1012
|
disabled: e.disabled,
|
|
902
1013
|
"aria-required": e.required || void 0,
|
|
903
|
-
"aria-invalid":
|
|
904
|
-
"aria-describedby":
|
|
1014
|
+
"aria-invalid": pe || void 0,
|
|
1015
|
+
"aria-describedby": ve,
|
|
905
1016
|
"data-test": "i18n-input",
|
|
906
1017
|
class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
907
|
-
onInput: B[1] || (B[1] = (
|
|
1018
|
+
onInput: B[1] || (B[1] = (Le) => ee(_.value, Le.target.value))
|
|
908
1019
|
}, null, 40, Va))
|
|
909
1020
|
], 2)
|
|
910
1021
|
], 8, za),
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1022
|
+
he.value.length > 0 || fe.value ? (i(), h("div", qa, [
|
|
1023
|
+
he.value.length > 0 ? (i(), h("p", Ma, C(n(s)("core.form.i18n.missing", { languages: H(he.value) })), 1)) : (i(), h("span", Oa)),
|
|
1024
|
+
fe.value && !e.disabled ? (i(), h("button", {
|
|
914
1025
|
key: 2,
|
|
915
1026
|
type: "button",
|
|
916
1027
|
"data-test": "i18n-copy",
|
|
917
1028
|
class: "shrink-0 cursor-pointer rounded-control bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
918
|
-
onClick:
|
|
919
|
-
},
|
|
1029
|
+
onClick: we
|
|
1030
|
+
}, C(n(s)("core.form.i18n.copy", { language: O(p.value) })), 1)) : D("", !0)
|
|
920
1031
|
])) : D("", !0)
|
|
921
1032
|
], 544)
|
|
922
1033
|
]),
|
|
923
|
-
labelTrailing:
|
|
924
|
-
|
|
1034
|
+
labelTrailing: m(() => [
|
|
1035
|
+
b("div", {
|
|
925
1036
|
role: "tablist",
|
|
926
1037
|
"aria-label": n(s)("core.form.i18n.languages"),
|
|
927
1038
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
928
1039
|
"data-test": "i18n-tabs"
|
|
929
1040
|
}, [
|
|
930
|
-
(i(!0),
|
|
931
|
-
id:
|
|
932
|
-
key:
|
|
1041
|
+
(i(!0), h(se, null, xe(F.value, (T, ve) => (i(), h("button", {
|
|
1042
|
+
id: te(T),
|
|
1043
|
+
key: T,
|
|
933
1044
|
type: "button",
|
|
934
1045
|
role: "tab",
|
|
935
|
-
"aria-selected":
|
|
936
|
-
tabindex:
|
|
937
|
-
"aria-controls": `${n(
|
|
938
|
-
"aria-label": n(s)(
|
|
939
|
-
title: T
|
|
940
|
-
class: R(["flex min-h-7 cursor-pointer items-center gap-1.5 rounded-control px-2.5 py-1 text-footnote font-semibold transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
941
|
-
onClick: (
|
|
942
|
-
onKeydown: (
|
|
1046
|
+
"aria-selected": T === _.value,
|
|
1047
|
+
tabindex: T === _.value ? 0 : -1,
|
|
1048
|
+
"aria-controls": `${n(g)}-panel`,
|
|
1049
|
+
"aria-label": n(s)(S(T) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: I(T) }),
|
|
1050
|
+
title: I(T),
|
|
1051
|
+
class: R(["flex min-h-7 cursor-pointer items-center gap-1.5 rounded-control px-2.5 py-1 text-footnote font-semibold transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", T === _.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
1052
|
+
onClick: (pe) => Q(T, !0),
|
|
1053
|
+
onKeydown: (pe) => E(pe, ve)
|
|
943
1054
|
}, [
|
|
944
|
-
|
|
945
|
-
|
|
1055
|
+
Y(C(O(T)) + " ", 1),
|
|
1056
|
+
b("span", {
|
|
946
1057
|
"aria-hidden": "true",
|
|
947
|
-
class: R(["size-1.5 rounded-full",
|
|
1058
|
+
class: R(["size-1.5 rounded-full", S(T) ? "bg-status-success-solid" : ae.value && P.value.includes(T) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
948
1059
|
"data-test": "i18n-dot",
|
|
949
|
-
"data-state":
|
|
950
|
-
}, null, 10,
|
|
1060
|
+
"data-state": S(T) ? "written" : ae.value && P.value.includes(T) ? "required" : "empty"
|
|
1061
|
+
}, null, 10, Ea)
|
|
951
1062
|
], 42, Ra))), 128))
|
|
952
1063
|
], 8, ja)
|
|
953
1064
|
]),
|
|
954
1065
|
_: 2
|
|
955
1066
|
}, [
|
|
956
|
-
|
|
1067
|
+
$.value ? {
|
|
957
1068
|
name: "readonly",
|
|
958
|
-
fn:
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
j.value.length > 0 ? (i(),
|
|
962
|
-
|
|
1069
|
+
fn: m(() => [
|
|
1070
|
+
b("div", Ia, [
|
|
1071
|
+
b("p", Ga, C(G($.value)), 1),
|
|
1072
|
+
j.value.length > 0 ? (i(), h(se, { key: 0 }, [
|
|
1073
|
+
b("button", {
|
|
963
1074
|
type: "button",
|
|
964
|
-
"aria-expanded":
|
|
1075
|
+
"aria-expanded": v.value,
|
|
965
1076
|
class: "mt-1.5 flex w-full cursor-pointer items-center gap-2 text-left text-footnote text-content-muted focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
966
|
-
onClick: B[2] || (B[2] = (
|
|
1077
|
+
onClick: B[2] || (B[2] = (T) => v.value = !v.value)
|
|
967
1078
|
}, [
|
|
968
|
-
|
|
969
|
-
M(n(
|
|
1079
|
+
b("span", Ka, C(n(s)("core.form.i18n.more", { count: j.value.length, filled: me.value })), 1),
|
|
1080
|
+
M(n(X), {
|
|
970
1081
|
name: "arrowRightSLine",
|
|
971
1082
|
size: 16,
|
|
972
|
-
class: R(["shrink-0 transition-transform duration-motion-fast",
|
|
1083
|
+
class: R(["shrink-0 transition-transform duration-motion-fast", v.value ? "rotate-90" : ""])
|
|
973
1084
|
}, null, 8, ["class"])
|
|
974
|
-
], 8,
|
|
975
|
-
|
|
976
|
-
(i(!0),
|
|
977
|
-
key:
|
|
1085
|
+
], 8, Na),
|
|
1086
|
+
v.value ? (i(), h("dl", Pa, [
|
|
1087
|
+
(i(!0), h(se, null, xe(j.value, (T) => (i(), h("div", {
|
|
1088
|
+
key: T,
|
|
978
1089
|
class: "flex gap-2 text-body"
|
|
979
1090
|
}, [
|
|
980
|
-
|
|
1091
|
+
b("dt", {
|
|
981
1092
|
class: "w-8 shrink-0 text-footnote font-semibold leading-6 text-content-muted",
|
|
982
|
-
title: T
|
|
983
|
-
},
|
|
984
|
-
|
|
985
|
-
class: R(["min-w-0 flex-1 whitespace-pre-line break-words",
|
|
986
|
-
},
|
|
1093
|
+
title: I(T)
|
|
1094
|
+
}, C(O(T)), 9, Aa),
|
|
1095
|
+
b("dd", {
|
|
1096
|
+
class: R(["min-w-0 flex-1 whitespace-pre-line break-words", S(T) ? "text-content-strong" : "text-content-disabled"])
|
|
1097
|
+
}, C(S(T) ? G(T) : n(s)("core.state.no_value")), 3)
|
|
987
1098
|
]))), 128))
|
|
988
1099
|
])) : D("", !0)
|
|
989
1100
|
], 64)) : D("", !0)
|
|
990
1101
|
])
|
|
991
1102
|
]),
|
|
992
1103
|
key: "0"
|
|
1104
|
+
} : void 0,
|
|
1105
|
+
f.$slots.trailing ? {
|
|
1106
|
+
name: "trailing",
|
|
1107
|
+
fn: m(() => [
|
|
1108
|
+
z(f.$slots, "trailing")
|
|
1109
|
+
]),
|
|
1110
|
+
key: "1"
|
|
993
1111
|
} : void 0
|
|
994
1112
|
]), 1040, ["value"]));
|
|
995
1113
|
}
|
|
996
|
-
}),
|
|
1114
|
+
}), wo = /* @__PURE__ */ K({
|
|
997
1115
|
__name: "MoneyField",
|
|
998
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
1116
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
999
1117
|
label: {},
|
|
1000
1118
|
labelHidden: { type: Boolean },
|
|
1001
1119
|
hint: {},
|
|
@@ -1010,28 +1128,50 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1010
1128
|
decimals: {},
|
|
1011
1129
|
negative: { type: Boolean },
|
|
1012
1130
|
width: {}
|
|
1013
|
-
}, { ...
|
|
1131
|
+
}, { ...ce, decimals: 2, negative: !1, width: "sm" }), {
|
|
1014
1132
|
modelValue: { default: null },
|
|
1015
1133
|
modelModifiers: {}
|
|
1016
1134
|
}),
|
|
1017
1135
|
emits: ["update:modelValue"],
|
|
1018
1136
|
setup(o, { expose: t }) {
|
|
1019
|
-
const e = o,
|
|
1020
|
-
return t({ focus: () => s.value?.focus() }), (
|
|
1137
|
+
const e = o, l = oe(o, "modelValue"), s = A("field");
|
|
1138
|
+
return t({ focus: () => s.value?.focus() }), (a, d) => (i(), q(Mt, J({
|
|
1021
1139
|
ref_key: "field",
|
|
1022
1140
|
ref: s,
|
|
1023
|
-
modelValue:
|
|
1024
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1025
|
-
}, n(
|
|
1141
|
+
modelValue: l.value,
|
|
1142
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => l.value = c)
|
|
1143
|
+
}, n(de)(e), {
|
|
1026
1144
|
decimals: e.decimals,
|
|
1027
1145
|
negative: e.negative,
|
|
1028
1146
|
suffix: e.currency,
|
|
1029
1147
|
width: e.width
|
|
1030
|
-
}),
|
|
1148
|
+
}), re({ _: 2 }, [
|
|
1149
|
+
a.$slots.trailing ? {
|
|
1150
|
+
name: "trailing",
|
|
1151
|
+
fn: m(() => [
|
|
1152
|
+
z(a.$slots, "trailing")
|
|
1153
|
+
]),
|
|
1154
|
+
key: "0"
|
|
1155
|
+
} : void 0,
|
|
1156
|
+
a.$slots.labelTrailing ? {
|
|
1157
|
+
name: "labelTrailing",
|
|
1158
|
+
fn: m(() => [
|
|
1159
|
+
z(a.$slots, "labelTrailing")
|
|
1160
|
+
]),
|
|
1161
|
+
key: "1"
|
|
1162
|
+
} : void 0,
|
|
1163
|
+
a.$slots.readonly ? {
|
|
1164
|
+
name: "readonly",
|
|
1165
|
+
fn: m(() => [
|
|
1166
|
+
z(a.$slots, "readonly")
|
|
1167
|
+
]),
|
|
1168
|
+
key: "2"
|
|
1169
|
+
} : void 0
|
|
1170
|
+
]), 1040, ["modelValue", "decimals", "negative", "suffix", "width"]));
|
|
1031
1171
|
}
|
|
1032
|
-
}),
|
|
1172
|
+
}), Ha = { class: "flex flex-col gap-2" }, Ua = ["onClick"], _o = /* @__PURE__ */ K({
|
|
1033
1173
|
__name: "MonthYearField",
|
|
1034
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
1174
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
1035
1175
|
label: {},
|
|
1036
1176
|
labelHidden: { type: Boolean },
|
|
1037
1177
|
hint: {},
|
|
@@ -1044,7 +1184,7 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1044
1184
|
name: {},
|
|
1045
1185
|
minYear: {},
|
|
1046
1186
|
maxYear: {}
|
|
1047
|
-
}, { ...
|
|
1187
|
+
}, { ...ce, minYear: 1970, maxYear: () => (/* @__PURE__ */ new Date()).getFullYear() + 1 }), {
|
|
1048
1188
|
month: { default: null },
|
|
1049
1189
|
monthModifiers: {},
|
|
1050
1190
|
year: { default: null },
|
|
@@ -1052,34 +1192,34 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1052
1192
|
}),
|
|
1053
1193
|
emits: ["update:month", "update:year"],
|
|
1054
1194
|
setup(o) {
|
|
1055
|
-
const t = o, e = oe(o, "month"),
|
|
1056
|
-
function
|
|
1057
|
-
e.value =
|
|
1195
|
+
const t = o, e = oe(o, "month"), l = oe(o, "year"), { t: s } = Z(), a = x(() => e.value !== null && e.value >= 1 && e.value <= 12), d = (w, y) => s(`core.form.months.${y}.${w}`), c = x(() => a.value && l.value !== null ? s("core.form.months.with_year", { month: d(e.value, "long"), year: l.value }) : l.value !== null ? String(l.value) : a.value ? d(e.value, "long") : "");
|
|
1196
|
+
function g(w, y) {
|
|
1197
|
+
e.value = w.month, l.value = w.year, y();
|
|
1058
1198
|
}
|
|
1059
|
-
function
|
|
1060
|
-
e.value = null,
|
|
1199
|
+
function k(w) {
|
|
1200
|
+
e.value = null, l.value = null, w();
|
|
1061
1201
|
}
|
|
1062
|
-
return (
|
|
1063
|
-
value:
|
|
1064
|
-
}), {
|
|
1065
|
-
default:
|
|
1066
|
-
M(
|
|
1067
|
-
label: t.label ??
|
|
1202
|
+
return (w, y) => (i(), q(ye, J(n(de)(t), {
|
|
1203
|
+
value: c.value || null
|
|
1204
|
+
}), re({
|
|
1205
|
+
default: m(({ id: r, describedby: u, invalid: p }) => [
|
|
1206
|
+
M(Ge, {
|
|
1207
|
+
label: t.label ?? c.value,
|
|
1068
1208
|
width: "sm",
|
|
1069
1209
|
placement: "bottom-start",
|
|
1070
1210
|
arrow: !1
|
|
1071
1211
|
}, {
|
|
1072
|
-
trigger:
|
|
1073
|
-
M(at,
|
|
1212
|
+
trigger: m(({ toggle: F, presented: L }) => [
|
|
1213
|
+
M(at, J({ id: r, "aria-describedby": u }, {
|
|
1074
1214
|
expanded: L,
|
|
1075
1215
|
disabled: t.disabled,
|
|
1076
|
-
invalid:
|
|
1216
|
+
invalid: p,
|
|
1077
1217
|
onClick: F
|
|
1078
1218
|
}), {
|
|
1079
|
-
default:
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
M(n(
|
|
1219
|
+
default: m(() => [
|
|
1220
|
+
c.value ? (i(), h(se, { key: 0 }, [
|
|
1221
|
+
Y(C(c.value), 1),
|
|
1222
|
+
M(n(X), {
|
|
1083
1223
|
name: "calendarLine",
|
|
1084
1224
|
size: 16,
|
|
1085
1225
|
class: "ml-2 shrink-0 text-content-muted"
|
|
@@ -1089,32 +1229,54 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1089
1229
|
_: 1
|
|
1090
1230
|
}, 16, ["expanded", "disabled", "invalid", "onClick"])
|
|
1091
1231
|
]),
|
|
1092
|
-
default:
|
|
1093
|
-
|
|
1232
|
+
default: m(({ dismiss: F }) => [
|
|
1233
|
+
b("div", Ha, [
|
|
1094
1234
|
M(St, {
|
|
1095
1235
|
month: e.value,
|
|
1096
|
-
year:
|
|
1236
|
+
year: l.value,
|
|
1097
1237
|
"min-year": t.minYear,
|
|
1098
1238
|
"max-year": t.maxYear,
|
|
1099
|
-
onPick: (L) =>
|
|
1239
|
+
onPick: (L) => g(L, F)
|
|
1100
1240
|
}, null, 8, ["month", "year", "min-year", "max-year", "onPick"]),
|
|
1101
|
-
|
|
1241
|
+
a.value || l.value !== null ? (i(), h("button", {
|
|
1102
1242
|
key: 0,
|
|
1103
1243
|
type: "button",
|
|
1104
1244
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1105
|
-
onClick: (L) =>
|
|
1106
|
-
},
|
|
1245
|
+
onClick: (L) => k(F)
|
|
1246
|
+
}, C(n(s)("core.form.select.clear")), 9, Ua)) : D("", !0)
|
|
1107
1247
|
])
|
|
1108
1248
|
]),
|
|
1109
1249
|
_: 2
|
|
1110
1250
|
}, 1032, ["label"])
|
|
1111
1251
|
]),
|
|
1112
|
-
_:
|
|
1113
|
-
},
|
|
1252
|
+
_: 2
|
|
1253
|
+
}, [
|
|
1254
|
+
w.$slots.trailing ? {
|
|
1255
|
+
name: "trailing",
|
|
1256
|
+
fn: m(() => [
|
|
1257
|
+
z(w.$slots, "trailing")
|
|
1258
|
+
]),
|
|
1259
|
+
key: "0"
|
|
1260
|
+
} : void 0,
|
|
1261
|
+
w.$slots.labelTrailing ? {
|
|
1262
|
+
name: "labelTrailing",
|
|
1263
|
+
fn: m(() => [
|
|
1264
|
+
z(w.$slots, "labelTrailing")
|
|
1265
|
+
]),
|
|
1266
|
+
key: "1"
|
|
1267
|
+
} : void 0,
|
|
1268
|
+
w.$slots.readonly ? {
|
|
1269
|
+
name: "readonly",
|
|
1270
|
+
fn: m(() => [
|
|
1271
|
+
z(w.$slots, "readonly")
|
|
1272
|
+
]),
|
|
1273
|
+
key: "2"
|
|
1274
|
+
} : void 0
|
|
1275
|
+
]), 1040, ["value"]));
|
|
1114
1276
|
}
|
|
1115
|
-
}),
|
|
1277
|
+
}), Ya = { class: "flex min-w-0 flex-wrap items-center gap-1.5 py-0.5" }, Wa = { class: "truncate" }, Ja = ["disabled", "aria-label", "onClick"], Xa = ["id", "disabled", "aria-expanded", "aria-invalid", "aria-describedby", "aria-busy"], Qa = ["id", "disabled", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Za = { class: "max-h-72 overflow-y-auto" }, el = { class: "flex items-center justify-between gap-2" }, Je = "inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-control bg-fill px-2.5 py-1 text-body text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", $o = /* @__PURE__ */ K({
|
|
1116
1278
|
__name: "MultiSelectField",
|
|
1117
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
1279
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
1118
1280
|
label: {},
|
|
1119
1281
|
labelHidden: { type: Boolean },
|
|
1120
1282
|
hint: {},
|
|
@@ -1129,109 +1291,109 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1129
1291
|
selected: {},
|
|
1130
1292
|
placeholder: {},
|
|
1131
1293
|
searchFrom: {}
|
|
1132
|
-
}, { ...
|
|
1294
|
+
}, { ...ce, selected: () => [], placeholder: void 0, searchFrom: 9 }), {
|
|
1133
1295
|
modelValue: { default: () => [] },
|
|
1134
1296
|
modelModifiers: {}
|
|
1135
1297
|
}),
|
|
1136
1298
|
emits: ["update:modelValue"],
|
|
1137
1299
|
setup(o) {
|
|
1138
|
-
const t = o, e = oe(o, "modelValue"), { t:
|
|
1139
|
-
const u = e.value.filter((
|
|
1300
|
+
const t = o, e = oe(o, "modelValue"), { t: l } = Z(), s = Ie(), a = A("sheet"), d = N(!1), c = jt(() => t.options, (r) => {
|
|
1301
|
+
const u = e.value.filter((p) => r.some((F) => F.value === p));
|
|
1140
1302
|
u.length !== e.value.length && (e.value = u);
|
|
1141
|
-
}),
|
|
1142
|
-
const u =
|
|
1303
|
+
}), g = x(() => e.value.flatMap((r) => {
|
|
1304
|
+
const u = c.known.value.find((p) => p.value === r) ?? t.selected.find((p) => p.value === r);
|
|
1143
1305
|
return u ? [u] : [];
|
|
1144
|
-
})),
|
|
1145
|
-
function
|
|
1306
|
+
})), k = x(() => t.placeholder ?? l("core.form.select.choose"));
|
|
1307
|
+
function w(r) {
|
|
1146
1308
|
r !== null && (e.value = e.value.includes(r) ? e.value.filter((u) => u !== r) : [...e.value, r]);
|
|
1147
1309
|
}
|
|
1148
|
-
const
|
|
1149
|
-
return (r, u) => (i(), q(
|
|
1150
|
-
value:
|
|
1310
|
+
const y = (r) => e.value = e.value.filter((u) => u !== r);
|
|
1311
|
+
return (r, u) => (i(), q(ye, J(n(de)(t), {
|
|
1312
|
+
value: g.value.length ? g.value.map((p) => p.label).join(", ") : null,
|
|
1151
1313
|
"row-layout": "stacked"
|
|
1152
|
-
}), {
|
|
1153
|
-
default:
|
|
1154
|
-
|
|
1155
|
-
(i(!0),
|
|
1314
|
+
}), re({
|
|
1315
|
+
default: m(({ id: p, describedby: F, invalid: L }) => [
|
|
1316
|
+
b("div", Ya, [
|
|
1317
|
+
(i(!0), h(se, null, xe(g.value, (_) => (i(), h("span", {
|
|
1156
1318
|
key: String(_.value),
|
|
1157
1319
|
"data-test": "chip",
|
|
1158
1320
|
class: "inline-flex min-h-7 max-w-full items-center gap-1 rounded-full bg-tint-soft pl-3 pr-1 text-subheadline font-medium text-content-link"
|
|
1159
1321
|
}, [
|
|
1160
|
-
|
|
1161
|
-
|
|
1322
|
+
b("span", Wa, C(_.label), 1),
|
|
1323
|
+
b("button", {
|
|
1162
1324
|
type: "button",
|
|
1163
1325
|
disabled: t.disabled,
|
|
1164
|
-
"aria-label": `${n(
|
|
1326
|
+
"aria-label": `${n(l)("core.form.select.clear")}: ${_.label}`,
|
|
1165
1327
|
class: "flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed",
|
|
1166
|
-
onClick: (
|
|
1328
|
+
onClick: (G) => y(_.value)
|
|
1167
1329
|
}, [
|
|
1168
|
-
M(n(
|
|
1330
|
+
M(n(X), {
|
|
1169
1331
|
name: "close",
|
|
1170
1332
|
size: 12
|
|
1171
1333
|
})
|
|
1172
|
-
], 8,
|
|
1334
|
+
], 8, Ja)
|
|
1173
1335
|
]))), 128)),
|
|
1174
|
-
n(s) ? (i(),
|
|
1336
|
+
n(s) ? (i(), h("button", {
|
|
1175
1337
|
key: 0,
|
|
1176
|
-
id:
|
|
1338
|
+
id: p,
|
|
1177
1339
|
type: "button",
|
|
1178
1340
|
disabled: t.disabled,
|
|
1179
1341
|
"aria-haspopup": "dialog",
|
|
1180
1342
|
"aria-expanded": d.value,
|
|
1181
1343
|
"aria-invalid": L || void 0,
|
|
1182
1344
|
"aria-describedby": F,
|
|
1183
|
-
"aria-busy": n(
|
|
1184
|
-
class: R(
|
|
1185
|
-
onClick: u[0] || (u[0] = (_) =>
|
|
1345
|
+
"aria-busy": n(c).loading.value || void 0,
|
|
1346
|
+
class: R(Je),
|
|
1347
|
+
onClick: u[0] || (u[0] = (_) => a.value?.present())
|
|
1186
1348
|
}, [
|
|
1187
|
-
n(
|
|
1349
|
+
n(c).loading.value ? (i(), q(n(X), {
|
|
1188
1350
|
key: 0,
|
|
1189
1351
|
name: "loader4Line",
|
|
1190
1352
|
size: 14,
|
|
1191
1353
|
class: "shrink-0 animate-spin"
|
|
1192
1354
|
})) : D("", !0),
|
|
1193
|
-
|
|
1194
|
-
], 8,
|
|
1355
|
+
Y(" " + C(g.value.length ? n(l)("core.actions.edit") : k.value), 1)
|
|
1356
|
+
], 8, Xa)) : (i(), q(Ge, {
|
|
1195
1357
|
key: 1,
|
|
1196
|
-
label: t.label ??
|
|
1358
|
+
label: t.label ?? k.value,
|
|
1197
1359
|
width: "md",
|
|
1198
1360
|
"match-trigger-width": "",
|
|
1199
1361
|
placement: "bottom-start",
|
|
1200
1362
|
arrow: !1
|
|
1201
1363
|
}, {
|
|
1202
|
-
trigger:
|
|
1203
|
-
|
|
1204
|
-
id:
|
|
1364
|
+
trigger: m(({ toggle: _, attrs: G }) => [
|
|
1365
|
+
b("button", J({
|
|
1366
|
+
id: p,
|
|
1205
1367
|
type: "button"
|
|
1206
|
-
},
|
|
1368
|
+
}, G, {
|
|
1207
1369
|
"aria-haspopup": "listbox",
|
|
1208
1370
|
disabled: t.disabled,
|
|
1209
1371
|
"aria-invalid": L || void 0,
|
|
1210
1372
|
"aria-describedby": F,
|
|
1211
|
-
"aria-busy": n(
|
|
1212
|
-
class:
|
|
1373
|
+
"aria-busy": n(c).loading.value || void 0,
|
|
1374
|
+
class: Je,
|
|
1213
1375
|
onClick: _
|
|
1214
1376
|
}), [
|
|
1215
|
-
n(
|
|
1377
|
+
n(c).loading.value ? (i(), q(n(X), {
|
|
1216
1378
|
key: 0,
|
|
1217
1379
|
name: "loader4Line",
|
|
1218
1380
|
size: 14,
|
|
1219
1381
|
class: "shrink-0 animate-spin"
|
|
1220
1382
|
})) : D("", !0),
|
|
1221
|
-
|
|
1222
|
-
], 16,
|
|
1383
|
+
Y(" " + C(g.value.length ? n(l)("core.actions.edit") : k.value), 1)
|
|
1384
|
+
], 16, Qa)
|
|
1223
1385
|
]),
|
|
1224
|
-
default:
|
|
1225
|
-
|
|
1226
|
-
M(
|
|
1227
|
-
options: n(
|
|
1228
|
-
status: n(
|
|
1386
|
+
default: m(() => [
|
|
1387
|
+
b("div", Za, [
|
|
1388
|
+
M(Ue, {
|
|
1389
|
+
options: n(c).rows.value,
|
|
1390
|
+
status: n(c).status.value,
|
|
1229
1391
|
"model-value": e.value,
|
|
1230
1392
|
multiple: "",
|
|
1231
1393
|
"search-from": t.searchFrom,
|
|
1232
1394
|
presentation: "plain",
|
|
1233
|
-
onSelect:
|
|
1234
|
-
onRetry: u[1] || (u[1] = (_) => n(
|
|
1395
|
+
onSelect: w,
|
|
1396
|
+
onRetry: u[1] || (u[1] = (_) => n(c).reload())
|
|
1235
1397
|
}, null, 8, ["options", "status", "model-value", "search-from"])
|
|
1236
1398
|
])
|
|
1237
1399
|
]),
|
|
@@ -1241,55 +1403,77 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1241
1403
|
n(s) ? (i(), q(Ot, {
|
|
1242
1404
|
key: 0,
|
|
1243
1405
|
ref_key: "sheet",
|
|
1244
|
-
ref:
|
|
1245
|
-
title: t.label ??
|
|
1406
|
+
ref: a,
|
|
1407
|
+
title: t.label ?? k.value,
|
|
1246
1408
|
grouped: "",
|
|
1247
1409
|
onPresented: u[5] || (u[5] = (_) => d.value = !0),
|
|
1248
1410
|
onDismissed: u[6] || (u[6] = (_) => d.value = !1)
|
|
1249
1411
|
}, {
|
|
1250
|
-
footer:
|
|
1251
|
-
|
|
1252
|
-
M(
|
|
1412
|
+
footer: m(() => [
|
|
1413
|
+
b("div", el, [
|
|
1414
|
+
M(ge, {
|
|
1253
1415
|
prominence: "plain",
|
|
1254
1416
|
disabled: e.value.length === 0,
|
|
1255
1417
|
onClick: u[3] || (u[3] = (_) => e.value = [])
|
|
1256
1418
|
}, {
|
|
1257
|
-
default:
|
|
1258
|
-
|
|
1419
|
+
default: m(() => [
|
|
1420
|
+
Y(C(n(l)("core.form.select.clear")), 1)
|
|
1259
1421
|
]),
|
|
1260
1422
|
_: 1
|
|
1261
1423
|
}, 8, ["disabled"]),
|
|
1262
|
-
M(
|
|
1424
|
+
M(ge, {
|
|
1263
1425
|
prominence: "primary",
|
|
1264
|
-
onClick: u[4] || (u[4] = (_) =>
|
|
1426
|
+
onClick: u[4] || (u[4] = (_) => a.value?.dismiss())
|
|
1265
1427
|
}, {
|
|
1266
|
-
default:
|
|
1267
|
-
|
|
1428
|
+
default: m(() => [
|
|
1429
|
+
Y(C(n(l)("core.form.select.done")), 1)
|
|
1268
1430
|
]),
|
|
1269
1431
|
_: 1
|
|
1270
1432
|
})
|
|
1271
1433
|
])
|
|
1272
1434
|
]),
|
|
1273
|
-
default:
|
|
1274
|
-
M(
|
|
1275
|
-
options: n(
|
|
1276
|
-
status: n(
|
|
1435
|
+
default: m(() => [
|
|
1436
|
+
M(Ue, {
|
|
1437
|
+
options: n(c).rows.value,
|
|
1438
|
+
status: n(c).status.value,
|
|
1277
1439
|
"model-value": e.value,
|
|
1278
1440
|
multiple: "",
|
|
1279
1441
|
"search-from": t.searchFrom,
|
|
1280
|
-
onSelect:
|
|
1281
|
-
onRetry: u[2] || (u[2] = (_) => n(
|
|
1442
|
+
onSelect: w,
|
|
1443
|
+
onRetry: u[2] || (u[2] = (_) => n(c).reload())
|
|
1282
1444
|
}, null, 8, ["options", "status", "model-value", "search-from"])
|
|
1283
1445
|
]),
|
|
1284
1446
|
_: 1
|
|
1285
1447
|
}, 8, ["title"])) : D("", !0)
|
|
1286
1448
|
]),
|
|
1287
|
-
_:
|
|
1288
|
-
},
|
|
1449
|
+
_: 2
|
|
1450
|
+
}, [
|
|
1451
|
+
r.$slots.trailing ? {
|
|
1452
|
+
name: "trailing",
|
|
1453
|
+
fn: m(() => [
|
|
1454
|
+
z(r.$slots, "trailing")
|
|
1455
|
+
]),
|
|
1456
|
+
key: "0"
|
|
1457
|
+
} : void 0,
|
|
1458
|
+
r.$slots.labelTrailing ? {
|
|
1459
|
+
name: "labelTrailing",
|
|
1460
|
+
fn: m(() => [
|
|
1461
|
+
z(r.$slots, "labelTrailing")
|
|
1462
|
+
]),
|
|
1463
|
+
key: "1"
|
|
1464
|
+
} : void 0,
|
|
1465
|
+
r.$slots.readonly ? {
|
|
1466
|
+
name: "readonly",
|
|
1467
|
+
fn: m(() => [
|
|
1468
|
+
z(r.$slots, "readonly")
|
|
1469
|
+
]),
|
|
1470
|
+
key: "2"
|
|
1471
|
+
} : void 0
|
|
1472
|
+
]), 1040, ["value"]));
|
|
1289
1473
|
}
|
|
1290
|
-
}),
|
|
1474
|
+
}), tl = ["aria-label"], al = ["src"], ll = { class: "flex flex-wrap items-center gap-3" }, ol = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], nl = ["aria-label"], sl = ["src"], So = /* @__PURE__ */ K({
|
|
1291
1475
|
__name: "PhotoField",
|
|
1292
|
-
props: /* @__PURE__ */ ne(/* @__PURE__ */
|
|
1476
|
+
props: /* @__PURE__ */ ne(/* @__PURE__ */ ue({
|
|
1293
1477
|
label: {},
|
|
1294
1478
|
labelHidden: { type: Boolean },
|
|
1295
1479
|
hint: {},
|
|
@@ -1302,59 +1486,59 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1302
1486
|
name: {},
|
|
1303
1487
|
accept: {},
|
|
1304
1488
|
maxSize: {}
|
|
1305
|
-
}, { ...
|
|
1489
|
+
}, { ...ce, accept: () => ["image/jpeg", "image/png", "image/webp", "image/gif"], maxSize: 5 * 1024 * 1024 }), {
|
|
1306
1490
|
modelValue: { default: null },
|
|
1307
1491
|
modelModifiers: {}
|
|
1308
1492
|
}),
|
|
1309
1493
|
emits: ["update:modelValue"],
|
|
1310
1494
|
setup(o) {
|
|
1311
|
-
const t = o, e = oe(o, "modelValue"), { t:
|
|
1312
|
-
function
|
|
1495
|
+
const t = o, e = oe(o, "modelValue"), { t: l } = Z(), s = A("chooser"), a = N(null), d = N(null);
|
|
1496
|
+
function c() {
|
|
1313
1497
|
d.value && URL.revokeObjectURL(d.value), d.value = null;
|
|
1314
1498
|
}
|
|
1315
|
-
|
|
1499
|
+
ie(
|
|
1316
1500
|
e,
|
|
1317
1501
|
(r) => {
|
|
1318
|
-
|
|
1502
|
+
c(), r instanceof File && (d.value = URL.createObjectURL(r)), r === null && s.value && (s.value.value = "");
|
|
1319
1503
|
},
|
|
1320
1504
|
{ immediate: !0 }
|
|
1321
|
-
), je(
|
|
1322
|
-
const
|
|
1323
|
-
function
|
|
1505
|
+
), je(c);
|
|
1506
|
+
const g = x(() => e.value instanceof File ? d.value : e.value), k = A("viewer"), w = x(() => g.value ? [{ src: g.value, alt: t.label ?? l("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1507
|
+
function y(r) {
|
|
1324
1508
|
if (!r) return;
|
|
1325
1509
|
const u = lt(r, { accept: t.accept, maxSize: t.maxSize });
|
|
1326
|
-
u ?
|
|
1510
|
+
u ? a.value = u === "invalid_type" ? l("core.form.file.invalid_type") : l("core.form.file.too_large", { size: Be(t.maxSize) }) : (a.value = null, e.value = r);
|
|
1327
1511
|
}
|
|
1328
|
-
return (r, u) => (i(), q(
|
|
1329
|
-
value:
|
|
1512
|
+
return (r, u) => (i(), q(ye, J({ ...n(de)(t), error: a.value ?? t.error }, {
|
|
1513
|
+
value: g.value ? n(l)("core.form.file.choose") : null,
|
|
1330
1514
|
"row-layout": "stacked"
|
|
1331
|
-
}), {
|
|
1332
|
-
readonly:
|
|
1333
|
-
|
|
1515
|
+
}), re({
|
|
1516
|
+
readonly: m(() => [
|
|
1517
|
+
g.value ? (i(), h("button", {
|
|
1334
1518
|
key: 0,
|
|
1335
1519
|
type: "button",
|
|
1336
|
-
"aria-label": n(
|
|
1520
|
+
"aria-label": n(l)("core.viewer.open"),
|
|
1337
1521
|
"data-test": "photo-open",
|
|
1338
1522
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1339
|
-
onClick: u[0] || (u[0] = (
|
|
1523
|
+
onClick: u[0] || (u[0] = (p) => k.value?.present(0))
|
|
1340
1524
|
}, [
|
|
1341
|
-
|
|
1342
|
-
src:
|
|
1525
|
+
b("img", {
|
|
1526
|
+
src: g.value,
|
|
1343
1527
|
alt: "",
|
|
1344
1528
|
class: "size-40 rounded-group object-cover"
|
|
1345
|
-
}, null, 8,
|
|
1346
|
-
], 8,
|
|
1347
|
-
|
|
1529
|
+
}, null, 8, al)
|
|
1530
|
+
], 8, tl)) : D("", !0),
|
|
1531
|
+
g.value ? (i(), q(Ye, {
|
|
1348
1532
|
key: 1,
|
|
1349
1533
|
ref_key: "viewer",
|
|
1350
|
-
ref:
|
|
1351
|
-
items:
|
|
1534
|
+
ref: k,
|
|
1535
|
+
items: w.value
|
|
1352
1536
|
}, null, 8, ["items"])) : D("", !0)
|
|
1353
1537
|
]),
|
|
1354
|
-
default:
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
id:
|
|
1538
|
+
default: m(({ id: p, describedby: F, invalid: L }) => [
|
|
1539
|
+
b("div", ll, [
|
|
1540
|
+
b("input", {
|
|
1541
|
+
id: p,
|
|
1358
1542
|
ref_key: "chooser",
|
|
1359
1543
|
ref: s,
|
|
1360
1544
|
type: "file",
|
|
@@ -1364,58 +1548,73 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1364
1548
|
disabled: t.disabled,
|
|
1365
1549
|
"aria-describedby": F,
|
|
1366
1550
|
"aria-invalid": L || void 0,
|
|
1367
|
-
onChange: u[1] || (u[1] = (_) =>
|
|
1368
|
-
}, null, 40,
|
|
1369
|
-
|
|
1551
|
+
onChange: u[1] || (u[1] = (_) => y(_.target.files?.[0]))
|
|
1552
|
+
}, null, 40, ol),
|
|
1553
|
+
g.value ? (i(), h("button", {
|
|
1370
1554
|
key: 0,
|
|
1371
1555
|
type: "button",
|
|
1372
|
-
"aria-label": n(
|
|
1556
|
+
"aria-label": n(l)("core.viewer.open"),
|
|
1373
1557
|
"data-test": "photo-open",
|
|
1374
1558
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1375
|
-
onClick: u[2] || (u[2] = (_) =>
|
|
1559
|
+
onClick: u[2] || (u[2] = (_) => k.value?.present(0))
|
|
1376
1560
|
}, [
|
|
1377
|
-
|
|
1378
|
-
src:
|
|
1561
|
+
b("img", {
|
|
1562
|
+
src: g.value,
|
|
1379
1563
|
alt: "",
|
|
1380
1564
|
"data-test": "photo-preview",
|
|
1381
1565
|
class: "size-28 rounded-group object-cover"
|
|
1382
|
-
}, null, 8,
|
|
1383
|
-
], 8,
|
|
1384
|
-
M(
|
|
1566
|
+
}, null, 8, sl)
|
|
1567
|
+
], 8, nl)) : D("", !0),
|
|
1568
|
+
M(ge, {
|
|
1385
1569
|
disabled: t.disabled,
|
|
1386
1570
|
onClick: u[3] || (u[3] = (_) => s.value?.click())
|
|
1387
1571
|
}, {
|
|
1388
|
-
default:
|
|
1389
|
-
|
|
1572
|
+
default: m(() => [
|
|
1573
|
+
Y(C(n(l)("core.form.file.choose")), 1)
|
|
1390
1574
|
]),
|
|
1391
1575
|
_: 1
|
|
1392
1576
|
}, 8, ["disabled"]),
|
|
1393
|
-
|
|
1577
|
+
g.value ? (i(), q(ge, {
|
|
1394
1578
|
key: 1,
|
|
1395
1579
|
prominence: "plain",
|
|
1396
1580
|
tone: "critical",
|
|
1397
1581
|
disabled: t.disabled,
|
|
1398
1582
|
onClick: u[4] || (u[4] = (_) => {
|
|
1399
|
-
e.value = null,
|
|
1583
|
+
e.value = null, a.value = null;
|
|
1400
1584
|
})
|
|
1401
1585
|
}, {
|
|
1402
|
-
default:
|
|
1403
|
-
|
|
1586
|
+
default: m(() => [
|
|
1587
|
+
Y(C(n(l)("core.form.file.remove")), 1)
|
|
1404
1588
|
]),
|
|
1405
1589
|
_: 1
|
|
1406
1590
|
}, 8, ["disabled"])) : D("", !0)
|
|
1407
1591
|
]),
|
|
1408
|
-
|
|
1592
|
+
g.value ? (i(), q(Ye, {
|
|
1409
1593
|
key: 0,
|
|
1410
1594
|
ref_key: "viewer",
|
|
1411
|
-
ref:
|
|
1412
|
-
items:
|
|
1595
|
+
ref: k,
|
|
1596
|
+
items: w.value
|
|
1413
1597
|
}, null, 8, ["items"])) : D("", !0)
|
|
1414
1598
|
]),
|
|
1415
|
-
_:
|
|
1416
|
-
},
|
|
1599
|
+
_: 2
|
|
1600
|
+
}, [
|
|
1601
|
+
r.$slots.trailing ? {
|
|
1602
|
+
name: "trailing",
|
|
1603
|
+
fn: m(() => [
|
|
1604
|
+
z(r.$slots, "trailing")
|
|
1605
|
+
]),
|
|
1606
|
+
key: "0"
|
|
1607
|
+
} : void 0,
|
|
1608
|
+
r.$slots.labelTrailing ? {
|
|
1609
|
+
name: "labelTrailing",
|
|
1610
|
+
fn: m(() => [
|
|
1611
|
+
z(r.$slots, "labelTrailing")
|
|
1612
|
+
]),
|
|
1613
|
+
key: "1"
|
|
1614
|
+
} : void 0
|
|
1615
|
+
]), 1040, ["value"]));
|
|
1417
1616
|
}
|
|
1418
|
-
}),
|
|
1617
|
+
}), rl = { class: "text-footnote" }, il = { class: "text-footnote" }, Co = /* @__PURE__ */ K({
|
|
1419
1618
|
__name: "GroupSheet",
|
|
1420
1619
|
props: {
|
|
1421
1620
|
sheet: {},
|
|
@@ -1428,57 +1627,57 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1428
1627
|
},
|
|
1429
1628
|
emits: ["saved"],
|
|
1430
1629
|
setup(o, { emit: t }) {
|
|
1431
|
-
const e = o,
|
|
1432
|
-
let
|
|
1433
|
-
|
|
1434
|
-
|
|
1630
|
+
const e = o, l = t, { t: s } = Z(), a = A("modal"), d = A("body"), c = N(!1);
|
|
1631
|
+
let g = null;
|
|
1632
|
+
ie(() => e.sheet.open.value, (y) => {
|
|
1633
|
+
y ? (c.value = !1, a.value?.present()) : a.value?.dismiss();
|
|
1435
1634
|
}), ot(() => {
|
|
1436
|
-
e.sheet.open.value &&
|
|
1635
|
+
e.sheet.open.value && a.value?.present();
|
|
1437
1636
|
}), je(() => {
|
|
1438
|
-
|
|
1637
|
+
g && clearTimeout(g);
|
|
1439
1638
|
});
|
|
1440
|
-
async function
|
|
1441
|
-
await e.sheet.save() && (
|
|
1639
|
+
async function k() {
|
|
1640
|
+
await e.sheet.save() && (c.value = !0, l("saved"), g = setTimeout(() => e.sheet.dismiss(), Et));
|
|
1442
1641
|
}
|
|
1443
|
-
const
|
|
1444
|
-
return (
|
|
1642
|
+
const w = x(() => e.sheet.saving.value ? "processing" : c.value ? "done" : "idle");
|
|
1643
|
+
return (y, r) => (i(), q(Rt, {
|
|
1445
1644
|
ref_key: "modal",
|
|
1446
|
-
ref:
|
|
1645
|
+
ref: a,
|
|
1447
1646
|
size: e.size,
|
|
1448
1647
|
grouped: "",
|
|
1449
1648
|
title: e.title,
|
|
1450
1649
|
subtitle: e.subtitle,
|
|
1451
1650
|
"before-dismiss": e.sheet.beforeDismiss,
|
|
1452
1651
|
"primary-label": e.editable ? n(s)("core.actions.save") : void 0,
|
|
1453
|
-
status:
|
|
1652
|
+
status: w.value,
|
|
1454
1653
|
"processing-label": n(s)("core.actions.saving"),
|
|
1455
1654
|
"done-label": n(s)("core.actions.saved"),
|
|
1456
|
-
onPrimary:
|
|
1655
|
+
onPrimary: k,
|
|
1457
1656
|
onDismissed: r[0] || (r[0] = (u) => e.sheet.closed())
|
|
1458
1657
|
}, {
|
|
1459
|
-
default:
|
|
1460
|
-
|
|
1658
|
+
default: m(() => [
|
|
1659
|
+
b("div", {
|
|
1461
1660
|
ref_key: "body",
|
|
1462
1661
|
ref: d,
|
|
1463
1662
|
class: "flex min-w-0 flex-col gap-group-gap"
|
|
1464
1663
|
}, [
|
|
1465
|
-
e.sheet.notice.value ? (i(), q(
|
|
1664
|
+
e.sheet.notice.value ? (i(), q(We, {
|
|
1466
1665
|
key: 0,
|
|
1467
1666
|
tone: "warning",
|
|
1468
1667
|
"data-test": "group-sheet-notice"
|
|
1469
1668
|
}, {
|
|
1470
|
-
default:
|
|
1471
|
-
|
|
1669
|
+
default: m(() => [
|
|
1670
|
+
b("p", rl, C(e.sheet.notice.value), 1)
|
|
1472
1671
|
]),
|
|
1473
1672
|
_: 1
|
|
1474
1673
|
})) : D("", !0),
|
|
1475
|
-
e.sheet.foreignGroups.value.length ? (i(), q(
|
|
1674
|
+
e.sheet.foreignGroups.value.length ? (i(), q(We, {
|
|
1476
1675
|
key: 1,
|
|
1477
1676
|
tone: "warning",
|
|
1478
1677
|
"data-test": "group-sheet-foreign"
|
|
1479
1678
|
}, {
|
|
1480
|
-
default:
|
|
1481
|
-
|
|
1679
|
+
default: m(() => [
|
|
1680
|
+
b("p", il, C(n(s)("core.form.group.foreign", { groups: e.sheet.foreignGroups.value.map(e.groupLabel).join(", ") })), 1)
|
|
1482
1681
|
]),
|
|
1483
1682
|
_: 1
|
|
1484
1683
|
})) : D("", !0),
|
|
@@ -1487,13 +1686,13 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1487
1686
|
label: e.fieldLabel,
|
|
1488
1687
|
scope: d.value
|
|
1489
1688
|
}, null, 8, ["form", "label", "scope"]),
|
|
1490
|
-
|
|
1689
|
+
z(y.$slots, "default")
|
|
1491
1690
|
], 512)
|
|
1492
1691
|
]),
|
|
1493
1692
|
_: 3
|
|
1494
1693
|
}, 8, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
|
|
1495
1694
|
}
|
|
1496
|
-
}),
|
|
1695
|
+
}), ul = ["data-group"], Fo = /* @__PURE__ */ K({
|
|
1497
1696
|
__name: "RecordGroupScope",
|
|
1498
1697
|
props: {
|
|
1499
1698
|
only: {},
|
|
@@ -1501,140 +1700,140 @@ const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows
|
|
|
1501
1700
|
},
|
|
1502
1701
|
setup(o) {
|
|
1503
1702
|
const t = o;
|
|
1504
|
-
return Ve(
|
|
1703
|
+
return Ve(Dt, { only: nt(t, "only") }), Ve(mt, x(() => t.editable)), (e, l) => (i(), h("div", {
|
|
1505
1704
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
1506
1705
|
"data-test": "record-group-scope",
|
|
1507
1706
|
"data-group": t.only
|
|
1508
1707
|
}, [
|
|
1509
|
-
|
|
1510
|
-
], 8,
|
|
1708
|
+
z(e.$slots, "default")
|
|
1709
|
+
], 8, ul));
|
|
1511
1710
|
}
|
|
1512
1711
|
});
|
|
1513
|
-
function
|
|
1712
|
+
function Bo(o) {
|
|
1514
1713
|
const { form: t } = o;
|
|
1515
1714
|
if (o.rebase && !t.rebase) throw new Error("useGroupSheet: `rebase` needs a record form (useResourceForm), which can take the freshly read record as its base.");
|
|
1516
|
-
const e = () => typeof o.fields == "function" ? o.fields() : o.fields,
|
|
1517
|
-
let
|
|
1518
|
-
const
|
|
1715
|
+
const e = () => typeof o.fields == "function" ? o.fields() : o.fields, l = () => qe(o.restore) ?? e(), s = N(!1), a = N(!1), d = N([]), c = N(null), g = De({});
|
|
1716
|
+
let k = {};
|
|
1717
|
+
const w = (S) => Object.fromEntries(S.map((O) => [O, Se(t.values[O])])), y = x(() => s.value && !Pe(w(l()), g.value)), { confirmDiscard: r } = Re(() => y.value);
|
|
1519
1718
|
function u() {
|
|
1520
|
-
|
|
1719
|
+
k = w(l()), g.value = Se(k);
|
|
1521
1720
|
}
|
|
1522
|
-
function
|
|
1523
|
-
u(), d.value = [],
|
|
1721
|
+
function p() {
|
|
1722
|
+
u(), d.value = [], c.value = null, t.dismissFailure(), s.value = !0;
|
|
1524
1723
|
}
|
|
1525
1724
|
function F() {
|
|
1526
1725
|
if (s.value) {
|
|
1527
|
-
|
|
1528
|
-
for (const
|
|
1726
|
+
y.value && Object.assign(t.values, Se(k));
|
|
1727
|
+
for (const S of e()) t.errors.clear(S);
|
|
1529
1728
|
t.dismissFailure(), s.value = !1;
|
|
1530
1729
|
}
|
|
1531
1730
|
}
|
|
1532
|
-
function L(
|
|
1533
|
-
const O = new Set(e()),
|
|
1534
|
-
for (const
|
|
1535
|
-
const
|
|
1536
|
-
if (O.has(
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1731
|
+
function L(S) {
|
|
1732
|
+
const O = new Set(e()), I = qe(o.group), H = /* @__PURE__ */ new Set();
|
|
1733
|
+
for (const ee of Object.keys(S.all())) {
|
|
1734
|
+
const te = Qe(ee);
|
|
1735
|
+
if (O.has(te)) continue;
|
|
1736
|
+
const Q = o.groupOf?.(te) ?? o.fallbackGroup;
|
|
1737
|
+
Q && Q !== I && H.add(Q);
|
|
1539
1738
|
}
|
|
1540
|
-
d.value = [...
|
|
1739
|
+
d.value = [...H];
|
|
1541
1740
|
}
|
|
1542
|
-
async function _(
|
|
1543
|
-
const O =
|
|
1741
|
+
async function _(S) {
|
|
1742
|
+
const O = Se(w(e().filter((I) => !Pe(t.values[I], g.value[I]))));
|
|
1544
1743
|
try {
|
|
1545
|
-
await
|
|
1744
|
+
await S.reload();
|
|
1546
1745
|
} catch {
|
|
1547
1746
|
return;
|
|
1548
1747
|
}
|
|
1549
|
-
t.rebase?.() && (u(), Object.assign(t.values, O),
|
|
1748
|
+
t.rebase?.() && (u(), Object.assign(t.values, O), c.value = S.message());
|
|
1550
1749
|
}
|
|
1551
|
-
async function
|
|
1552
|
-
if (
|
|
1553
|
-
|
|
1750
|
+
async function G() {
|
|
1751
|
+
if (a.value) return !1;
|
|
1752
|
+
a.value = !0, d.value = [], c.value = null;
|
|
1554
1753
|
try {
|
|
1555
|
-
const
|
|
1754
|
+
const S = o.onSaved ? () => o.onSaved?.() : void 0;
|
|
1556
1755
|
let O;
|
|
1557
|
-
if (o.save) O = await t.submitFields(e(), o.save, { refresh:
|
|
1558
|
-
else if (t.save) O = await t.save({ refresh:
|
|
1756
|
+
if (o.save) O = await t.submitFields(e(), o.save, { refresh: S });
|
|
1757
|
+
else if (t.save) O = await t.save({ refresh: S });
|
|
1559
1758
|
else throw new Error("useGroupSheet: the form has no full-record save(), so give the sheet its own `save` for a dedicated endpoint.");
|
|
1560
1759
|
switch (O.status) {
|
|
1561
1760
|
case "saved":
|
|
1562
1761
|
return u(), !0;
|
|
1563
1762
|
case "saved-refresh-failed":
|
|
1564
|
-
return u(),
|
|
1763
|
+
return u(), It.warning(t.failure.value?.message ?? ""), !0;
|
|
1565
1764
|
case "aborted":
|
|
1566
1765
|
return !1;
|
|
1567
1766
|
case "failed":
|
|
1568
1767
|
return O.failure.kind === "conflict" && o.rebase ? await _(o.rebase) : L(t.errors), !1;
|
|
1569
1768
|
}
|
|
1570
1769
|
} finally {
|
|
1571
|
-
|
|
1770
|
+
a.value = !1;
|
|
1572
1771
|
}
|
|
1573
1772
|
}
|
|
1574
1773
|
return {
|
|
1575
1774
|
open: s,
|
|
1576
|
-
saving:
|
|
1577
|
-
dirty:
|
|
1775
|
+
saving: a,
|
|
1776
|
+
dirty: y,
|
|
1578
1777
|
foreignGroups: d,
|
|
1579
|
-
notice:
|
|
1778
|
+
notice: c,
|
|
1580
1779
|
failure: t.failure,
|
|
1581
1780
|
form: t,
|
|
1582
|
-
present:
|
|
1781
|
+
present: p,
|
|
1583
1782
|
dismiss: () => {
|
|
1584
1783
|
s.value = !1;
|
|
1585
1784
|
},
|
|
1586
|
-
save:
|
|
1785
|
+
save: G,
|
|
1587
1786
|
beforeDismiss: r,
|
|
1588
1787
|
closed: F
|
|
1589
1788
|
};
|
|
1590
1789
|
}
|
|
1591
|
-
const
|
|
1790
|
+
const dl = { hidden: "" }, cl = /* @__PURE__ */ K({
|
|
1592
1791
|
__name: "EditorChrome",
|
|
1593
1792
|
props: {
|
|
1594
1793
|
options: {}
|
|
1595
1794
|
},
|
|
1596
1795
|
setup(o) {
|
|
1597
|
-
return
|
|
1796
|
+
return At(o.options), (e, l) => (i(), h("span", dl));
|
|
1598
1797
|
}
|
|
1599
1798
|
});
|
|
1600
|
-
function
|
|
1601
|
-
const t =
|
|
1799
|
+
function fl(o) {
|
|
1800
|
+
const t = N(0);
|
|
1602
1801
|
let e = 0;
|
|
1603
|
-
const
|
|
1802
|
+
const l = () => {
|
|
1604
1803
|
e || (e = requestAnimationFrame(() => {
|
|
1605
1804
|
e = 0, t.value++;
|
|
1606
1805
|
}));
|
|
1607
|
-
}, s = typeof MutationObserver > "u" ? null : new MutationObserver(
|
|
1608
|
-
|
|
1806
|
+
}, s = typeof MutationObserver > "u" ? null : new MutationObserver(l);
|
|
1807
|
+
ie(
|
|
1609
1808
|
() => o.sections.value,
|
|
1610
|
-
(
|
|
1809
|
+
(c) => {
|
|
1611
1810
|
s?.disconnect();
|
|
1612
|
-
for (const
|
|
1613
|
-
s?.observe(
|
|
1614
|
-
|
|
1811
|
+
for (const g of c)
|
|
1812
|
+
s?.observe(g.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1813
|
+
l();
|
|
1615
1814
|
},
|
|
1616
1815
|
{ immediate: !0 }
|
|
1617
1816
|
), st() && rt(() => {
|
|
1618
1817
|
s?.disconnect(), e && cancelAnimationFrame(e);
|
|
1619
1818
|
});
|
|
1620
|
-
const
|
|
1621
|
-
o.sections.value.map((
|
|
1622
|
-
|
|
1819
|
+
const a = x(() => (t.value, Object.fromEntries(
|
|
1820
|
+
o.sections.value.map((c) => [
|
|
1821
|
+
c.id,
|
|
1623
1822
|
{
|
|
1624
|
-
errors:
|
|
1625
|
-
required: { total:
|
|
1823
|
+
errors: c.element.querySelectorAll("[data-field-error]").length,
|
|
1824
|
+
required: { total: c.element.querySelectorAll("[data-field-required]").length, filled: c.element.querySelectorAll("[data-field-required][data-field-filled]").length }
|
|
1626
1825
|
}
|
|
1627
1826
|
])
|
|
1628
|
-
))), d =
|
|
1629
|
-
return { states:
|
|
1827
|
+
))), d = x(() => Object.values(a.value).reduce((c, g) => ({ filled: c.filled + g.required.filled, total: c.total + g.required.total }), { filled: 0, total: 0 }));
|
|
1828
|
+
return { states: a, totals: d };
|
|
1630
1829
|
}
|
|
1631
|
-
const
|
|
1830
|
+
const ml = {
|
|
1632
1831
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1633
1832
|
"data-test": "editor-page"
|
|
1634
|
-
},
|
|
1833
|
+
}, vl = {
|
|
1635
1834
|
key: 0,
|
|
1636
1835
|
class: "sticky top-[calc(var(--app-bar-height)+1.5rem+var(--shell-banner-h,0px))] hidden min-w-0 flex-col gap-4 self-start lg:flex"
|
|
1637
|
-
},
|
|
1836
|
+
}, Lo = /* @__PURE__ */ K({
|
|
1638
1837
|
__name: "EditorPage",
|
|
1639
1838
|
props: {
|
|
1640
1839
|
title: {},
|
|
@@ -1646,7 +1845,7 @@ const fl = {
|
|
|
1646
1845
|
},
|
|
1647
1846
|
emits: ["save", "cancel"],
|
|
1648
1847
|
setup(o, { emit: t }) {
|
|
1649
|
-
const e = o,
|
|
1848
|
+
const e = o, l = t, { t: s } = Z(), a = Ie(), d = Pt(), { states: c, totals: g } = fl(d), k = A("content"), w = x(
|
|
1650
1849
|
() => e.form ? {
|
|
1651
1850
|
form: e.form,
|
|
1652
1851
|
label: () => e.saveLabel ?? s("core.actions.save"),
|
|
@@ -1654,95 +1853,95 @@ const fl = {
|
|
|
1654
1853
|
disabledWhileClean: !1,
|
|
1655
1854
|
// a create page: an untouched form is submitted to learn what is missing
|
|
1656
1855
|
save: () => {
|
|
1657
|
-
e.form?.submitting.value ||
|
|
1856
|
+
e.form?.submitting.value || l("save");
|
|
1658
1857
|
},
|
|
1659
1858
|
cancel: () => {
|
|
1660
|
-
e.form?.reset(),
|
|
1859
|
+
e.form?.reset(), l("cancel");
|
|
1661
1860
|
}
|
|
1662
1861
|
} : null
|
|
1663
1862
|
);
|
|
1664
|
-
|
|
1863
|
+
ie(
|
|
1665
1864
|
() => e.form?.failure.value,
|
|
1666
1865
|
async (r) => {
|
|
1667
|
-
r?.kind === "invalid" && (await
|
|
1866
|
+
r?.kind === "invalid" && (await ke(), await ze(k.value ?? document, d));
|
|
1668
1867
|
}
|
|
1669
1868
|
);
|
|
1670
|
-
function
|
|
1671
|
-
const u = d.sections.value.find((
|
|
1672
|
-
u &&
|
|
1869
|
+
function y(r) {
|
|
1870
|
+
const u = d.sections.value.find((p) => p.id === r)?.element;
|
|
1871
|
+
u && ke(() => ze(u));
|
|
1673
1872
|
}
|
|
1674
|
-
return (r, u) => (i(), q(
|
|
1873
|
+
return (r, u) => (i(), q(Gt, {
|
|
1675
1874
|
title: e.title,
|
|
1676
1875
|
back: e.back,
|
|
1677
1876
|
width: "content"
|
|
1678
|
-
},
|
|
1679
|
-
default:
|
|
1680
|
-
|
|
1877
|
+
}, re({
|
|
1878
|
+
default: m(() => [
|
|
1879
|
+
w.value ? (i(), q(cl, {
|
|
1681
1880
|
key: 0,
|
|
1682
|
-
options:
|
|
1881
|
+
options: w.value
|
|
1683
1882
|
}, null, 8, ["options"])) : D("", !0),
|
|
1684
|
-
|
|
1685
|
-
n(
|
|
1686
|
-
M(
|
|
1883
|
+
b("div", ml, [
|
|
1884
|
+
n(a) ? D("", !0) : (i(), h("aside", vl, [
|
|
1885
|
+
M(Nt, {
|
|
1687
1886
|
standalone: "",
|
|
1688
|
-
states: n(
|
|
1689
|
-
progress: n(
|
|
1690
|
-
onSelect:
|
|
1887
|
+
states: n(c),
|
|
1888
|
+
progress: n(g),
|
|
1889
|
+
onSelect: y
|
|
1691
1890
|
}, null, 8, ["states", "progress"]),
|
|
1692
|
-
|
|
1891
|
+
z(r.$slots, "aside")
|
|
1693
1892
|
])),
|
|
1694
|
-
|
|
1893
|
+
b("div", {
|
|
1695
1894
|
ref_key: "content",
|
|
1696
|
-
ref:
|
|
1895
|
+
ref: k,
|
|
1697
1896
|
class: "flex min-w-0 flex-col gap-section-gap"
|
|
1698
1897
|
}, [
|
|
1699
1898
|
e.form ? (i(), q(Me, {
|
|
1700
1899
|
key: 0,
|
|
1701
1900
|
form: e.form,
|
|
1702
1901
|
label: e.fieldLabel,
|
|
1703
|
-
scope:
|
|
1902
|
+
scope: k.value
|
|
1704
1903
|
}, null, 8, ["form", "label", "scope"])) : D("", !0),
|
|
1705
|
-
|
|
1904
|
+
z(r.$slots, "default")
|
|
1706
1905
|
], 512)
|
|
1707
1906
|
]),
|
|
1708
|
-
n(
|
|
1907
|
+
n(a) ? (i(), q(Kt, {
|
|
1709
1908
|
key: 1,
|
|
1710
|
-
states: n(
|
|
1909
|
+
states: n(c)
|
|
1711
1910
|
}, null, 8, ["states"])) : D("", !0)
|
|
1712
1911
|
]),
|
|
1713
1912
|
_: 2
|
|
1714
1913
|
}, [
|
|
1715
1914
|
r.$slots.header ? {
|
|
1716
1915
|
name: "header",
|
|
1717
|
-
fn:
|
|
1718
|
-
|
|
1916
|
+
fn: m(() => [
|
|
1917
|
+
z(r.$slots, "header")
|
|
1719
1918
|
]),
|
|
1720
1919
|
key: "0"
|
|
1721
1920
|
} : void 0,
|
|
1722
1921
|
r.$slots.pager ? {
|
|
1723
1922
|
name: "pager",
|
|
1724
|
-
fn:
|
|
1725
|
-
|
|
1923
|
+
fn: m(() => [
|
|
1924
|
+
z(r.$slots, "pager")
|
|
1726
1925
|
]),
|
|
1727
1926
|
key: "1"
|
|
1728
1927
|
} : void 0,
|
|
1729
1928
|
r.$slots.notices ? {
|
|
1730
1929
|
name: "notices",
|
|
1731
|
-
fn:
|
|
1732
|
-
|
|
1930
|
+
fn: m(() => [
|
|
1931
|
+
z(r.$slots, "notices")
|
|
1733
1932
|
]),
|
|
1734
1933
|
key: "2"
|
|
1735
1934
|
} : void 0,
|
|
1736
1935
|
r.$slots.bottom ? {
|
|
1737
1936
|
name: "bottom",
|
|
1738
|
-
fn:
|
|
1739
|
-
|
|
1937
|
+
fn: m(() => [
|
|
1938
|
+
z(r.$slots, "bottom")
|
|
1740
1939
|
]),
|
|
1741
1940
|
key: "3"
|
|
1742
1941
|
} : void 0
|
|
1743
1942
|
]), 1032, ["title", "back"]));
|
|
1744
1943
|
}
|
|
1745
|
-
}),
|
|
1944
|
+
}), pl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], To = /* @__PURE__ */ K({
|
|
1746
1945
|
__name: "NumberCell",
|
|
1747
1946
|
props: /* @__PURE__ */ ne({
|
|
1748
1947
|
label: {},
|
|
@@ -1759,12 +1958,12 @@ const fl = {
|
|
|
1759
1958
|
emits: ["update:modelValue"],
|
|
1760
1959
|
setup(o) {
|
|
1761
1960
|
const t = o, e = oe(o, "modelValue");
|
|
1762
|
-
function a
|
|
1763
|
-
const d =
|
|
1961
|
+
function l(a) {
|
|
1962
|
+
const d = a.target.value.replace(/\D/g, "");
|
|
1764
1963
|
e.value = d === "" ? null : Math.min(t.max, Math.max(t.min, Number(d)));
|
|
1765
1964
|
}
|
|
1766
|
-
const s = (
|
|
1767
|
-
return (
|
|
1965
|
+
const s = (a) => a.target.value = e.value === null ? "" : String(e.value);
|
|
1966
|
+
return (a, d) => (i(), h("input", {
|
|
1768
1967
|
value: e.value ?? "",
|
|
1769
1968
|
type: "text",
|
|
1770
1969
|
inputmode: "numeric",
|
|
@@ -1774,21 +1973,21 @@ const fl = {
|
|
|
1774
1973
|
"aria-invalid": t.invalid || void 0,
|
|
1775
1974
|
placeholder: t.placeholder,
|
|
1776
1975
|
class: R(["rounded-control bg-fill px-2 py-1 text-right text-body tabular-nums text-content-strong transition-[background-color,box-shadow] duration-motion-fast ease-motion-standard placeholder:text-content-disabled focus:bg-surface-cell focus:outline-none focus:ring-[1.5px] focus:ring-inset focus:ring-border-focus disabled:opacity-45", [t.wide ? "w-28" : "w-16", t.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : ""]]),
|
|
1777
|
-
onInput:
|
|
1976
|
+
onInput: l,
|
|
1778
1977
|
onBlur: s
|
|
1779
|
-
}, null, 42,
|
|
1978
|
+
}, null, 42, pl));
|
|
1780
1979
|
}
|
|
1781
|
-
}),
|
|
1782
|
-
function
|
|
1980
|
+
}), Ne = "vue-core:step-draft:";
|
|
1981
|
+
function Ke(o) {
|
|
1783
1982
|
try {
|
|
1784
1983
|
return (o.storage === "local" ? window.localStorage : window.sessionStorage) ?? null;
|
|
1785
1984
|
} catch {
|
|
1786
1985
|
return null;
|
|
1787
1986
|
}
|
|
1788
1987
|
}
|
|
1789
|
-
function
|
|
1988
|
+
function bl(o) {
|
|
1790
1989
|
try {
|
|
1791
|
-
const t =
|
|
1990
|
+
const t = Ke(o)?.getItem(Ne + o.key);
|
|
1792
1991
|
if (!t) return null;
|
|
1793
1992
|
const e = JSON.parse(t);
|
|
1794
1993
|
return !e || e.version !== (o.version ?? 1) || typeof e.values != "object" || e.values === null || typeof e.step != "string" || !Array.isArray(e.passed) ? null : e;
|
|
@@ -1796,308 +1995,308 @@ function pl(o) {
|
|
|
1796
1995
|
return null;
|
|
1797
1996
|
}
|
|
1798
1997
|
}
|
|
1799
|
-
function
|
|
1998
|
+
function gl(o, t) {
|
|
1800
1999
|
try {
|
|
1801
|
-
const e =
|
|
2000
|
+
const e = Ke(o);
|
|
1802
2001
|
if (!e) return !1;
|
|
1803
|
-
const
|
|
1804
|
-
return e.setItem(
|
|
2002
|
+
const l = (s, a) => typeof Blob < "u" && a instanceof Blob ? null : a;
|
|
2003
|
+
return e.setItem(Ne + o.key, JSON.stringify({ version: o.version ?? 1, ...t }, l)), !0;
|
|
1805
2004
|
} catch {
|
|
1806
2005
|
return !1;
|
|
1807
2006
|
}
|
|
1808
2007
|
}
|
|
1809
|
-
function
|
|
2008
|
+
function Xe(o) {
|
|
1810
2009
|
try {
|
|
1811
|
-
|
|
2010
|
+
Ke(o)?.removeItem(Ne + o.key);
|
|
1812
2011
|
} catch {
|
|
1813
2012
|
}
|
|
1814
2013
|
}
|
|
1815
|
-
function
|
|
1816
|
-
for (const [e,
|
|
2014
|
+
function yl(o, t) {
|
|
2015
|
+
for (const [e, l] of Object.entries(o)) {
|
|
1817
2016
|
if (!(e in t)) continue;
|
|
1818
2017
|
const s = t[e];
|
|
1819
|
-
(s === null ||
|
|
2018
|
+
(s === null || l === null || l === void 0 || typeof s == typeof l && Array.isArray(s) === Array.isArray(l)) && (o[e] = s);
|
|
1820
2019
|
}
|
|
1821
2020
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const { t: e } =
|
|
1824
|
-
if (
|
|
1825
|
-
const s =
|
|
2021
|
+
function zo(o, t) {
|
|
2022
|
+
const { t: e } = Z(), l = x(() => qe(t.steps));
|
|
2023
|
+
if (l.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
2024
|
+
const s = N(l.value[0].name), a = Ae(/* @__PURE__ */ new Set()), d = Ae(/* @__PURE__ */ new Set([l.value[0].name])), c = N(null), g = N(!1), k = N(0), w = N(!1), y = N(!1);
|
|
1826
2025
|
let r = !1, u = 0;
|
|
1827
|
-
const
|
|
1828
|
-
() =>
|
|
1829
|
-
const f = F(
|
|
2026
|
+
const p = x(() => Math.max(0, l.value.findIndex((v) => v.name === s.value))), F = (v) => v.fields?.filter((V) => o.errors.has(V)).length ?? 0, L = x(
|
|
2027
|
+
() => l.value.map((v, V) => {
|
|
2028
|
+
const f = F(v), B = V === p.value;
|
|
1830
2029
|
return {
|
|
1831
|
-
name:
|
|
1832
|
-
label:
|
|
2030
|
+
name: v.name,
|
|
2031
|
+
label: v.label,
|
|
1833
2032
|
position: V + 1,
|
|
1834
|
-
state: B ? "current" :
|
|
2033
|
+
state: B ? "current" : a.has(v.name) && f === 0 ? "done" : "todo",
|
|
1835
2034
|
errors: f,
|
|
1836
|
-
reachable: !B && (d.has(
|
|
2035
|
+
reachable: !B && (d.has(v.name) || V < p.value)
|
|
1837
2036
|
};
|
|
1838
2037
|
})
|
|
1839
|
-
), _ =
|
|
1840
|
-
function
|
|
1841
|
-
const V =
|
|
1842
|
-
V && (
|
|
2038
|
+
), _ = x(() => L.value[p.value]), G = x(() => L.value.length), S = x(() => p.value === 0), O = x(() => p.value === G.value - 1), I = x(() => g.value || o.submitting.value);
|
|
2039
|
+
function H(v) {
|
|
2040
|
+
const V = l.value[v];
|
|
2041
|
+
V && (c.value = v > p.value ? "forward" : "back", s.value = V.name, d.add(V.name), u = v, w.value = !1);
|
|
1843
2042
|
}
|
|
1844
|
-
|
|
1845
|
-
() =>
|
|
2043
|
+
ie(
|
|
2044
|
+
() => l.value.map((v) => v.name).join("\0"),
|
|
1846
2045
|
() => {
|
|
1847
|
-
const
|
|
1848
|
-
s.value =
|
|
1849
|
-
|
|
2046
|
+
const v = l.value, V = v.findIndex((B) => B.name === s.value), f = V === -1 ? Math.min(u, v.length - 1) : V;
|
|
2047
|
+
s.value = v[f].name, u = f, v.forEach((B, T) => {
|
|
2048
|
+
T > f && (a.delete(B.name), d.delete(B.name));
|
|
1850
2049
|
}), d.add(s.value);
|
|
1851
|
-
for (const B of [
|
|
2050
|
+
for (const B of [a, d]) for (const T of [...B]) v.some((ve) => ve.name === T) || B.delete(T);
|
|
1852
2051
|
}
|
|
1853
2052
|
);
|
|
1854
|
-
function
|
|
1855
|
-
const V =
|
|
2053
|
+
function ee(v) {
|
|
2054
|
+
const V = v.fields;
|
|
1856
2055
|
if (!V?.length) return !0;
|
|
1857
|
-
const f = Object.entries(o.errors.all()).filter(([
|
|
2056
|
+
const f = Object.entries(o.errors.all()).filter(([T]) => !V.includes(Qe(T))), B = o.check(v.fields);
|
|
1858
2057
|
return f.length > 0 && o.errors.set({ ...Object.fromEntries(f), ...o.errors.all() }), B;
|
|
1859
2058
|
}
|
|
1860
|
-
async function
|
|
1861
|
-
if (!
|
|
1862
|
-
return
|
|
1863
|
-
if (!
|
|
1864
|
-
|
|
2059
|
+
async function te(v) {
|
|
2060
|
+
if (!ee(v))
|
|
2061
|
+
return k.value++, !1;
|
|
2062
|
+
if (!v.beforeNext) return !0;
|
|
2063
|
+
g.value = !0;
|
|
1865
2064
|
try {
|
|
1866
|
-
if (await
|
|
2065
|
+
if (await v.beforeNext()) return !0;
|
|
1867
2066
|
} finally {
|
|
1868
|
-
|
|
2067
|
+
g.value = !1;
|
|
1869
2068
|
}
|
|
1870
|
-
return
|
|
2069
|
+
return k.value++, !1;
|
|
1871
2070
|
}
|
|
1872
|
-
async function
|
|
1873
|
-
const
|
|
1874
|
-
if (
|
|
1875
|
-
return r = !0,
|
|
1876
|
-
if (
|
|
2071
|
+
async function Q() {
|
|
2072
|
+
const v = await o.submit(t.submit, t.submitOptions);
|
|
2073
|
+
if (v.status === "saved" || v.status === "saved-refresh-failed")
|
|
2074
|
+
return r = !0, le(), t.onSaved?.(v.value), !0;
|
|
2075
|
+
if (v.status === "failed" && (k.value++, _.value.errors === 0)) {
|
|
1877
2076
|
const V = L.value.findIndex((f) => f.errors > 0);
|
|
1878
|
-
V !== -1 &&
|
|
2077
|
+
V !== -1 && H(V);
|
|
1879
2078
|
}
|
|
1880
2079
|
return !1;
|
|
1881
2080
|
}
|
|
1882
|
-
async function
|
|
1883
|
-
if (
|
|
1884
|
-
const
|
|
1885
|
-
return await
|
|
2081
|
+
async function E() {
|
|
2082
|
+
if (I.value) return !1;
|
|
2083
|
+
const v = l.value[p.value];
|
|
2084
|
+
return await te(v) ? (a.add(v.name), p.value < G.value - 1 ? (H(p.value + 1), !0) : Q()) : !1;
|
|
1886
2085
|
}
|
|
1887
|
-
async function
|
|
1888
|
-
if (
|
|
1889
|
-
const V =
|
|
2086
|
+
async function W(v) {
|
|
2087
|
+
if (I.value) return !1;
|
|
2088
|
+
const V = l.value.findIndex((f) => f.name === v);
|
|
1890
2089
|
if (V === -1) return !1;
|
|
1891
|
-
if (V <=
|
|
1892
|
-
return V <
|
|
1893
|
-
if (!d.has(
|
|
1894
|
-
for (;
|
|
1895
|
-
return
|
|
2090
|
+
if (V <= p.value)
|
|
2091
|
+
return V < p.value && H(V), !0;
|
|
2092
|
+
if (!d.has(v)) return !1;
|
|
2093
|
+
for (; p.value < V; ) if (!await E()) return !1;
|
|
2094
|
+
return p.value === V;
|
|
1896
2095
|
}
|
|
1897
|
-
const
|
|
1898
|
-
let
|
|
1899
|
-
function
|
|
1900
|
-
if (
|
|
2096
|
+
const U = t.draft;
|
|
2097
|
+
let P;
|
|
2098
|
+
function ae() {
|
|
2099
|
+
if (P = void 0, !(!U || r)) {
|
|
1901
2100
|
if (!o.dirty.value) {
|
|
1902
|
-
|
|
2101
|
+
Xe(U), y.value = !1;
|
|
1903
2102
|
return;
|
|
1904
2103
|
}
|
|
1905
|
-
|
|
2104
|
+
y.value = gl(U, { values: Se(o.values), step: s.value, passed: [...a] });
|
|
1906
2105
|
}
|
|
1907
2106
|
}
|
|
1908
|
-
function
|
|
1909
|
-
r = !0, clearTimeout(
|
|
2107
|
+
function le() {
|
|
2108
|
+
r = !0, clearTimeout(P), P = void 0, y.value = !1, U && Xe(U);
|
|
1910
2109
|
}
|
|
1911
|
-
if (
|
|
1912
|
-
const
|
|
1913
|
-
if (
|
|
1914
|
-
|
|
1915
|
-
const V =
|
|
1916
|
-
V.includes(
|
|
1917
|
-
for (const f of
|
|
1918
|
-
for (const f of [...
|
|
1919
|
-
u =
|
|
2110
|
+
if (U) {
|
|
2111
|
+
const v = bl(U);
|
|
2112
|
+
if (v) {
|
|
2113
|
+
yl(o.values, v.values);
|
|
2114
|
+
const V = l.value.map((f) => f.name);
|
|
2115
|
+
V.includes(v.step) && (s.value = v.step);
|
|
2116
|
+
for (const f of v.passed) V.includes(f) && a.add(f);
|
|
2117
|
+
for (const f of [...a, s.value]) d.add(f);
|
|
2118
|
+
u = p.value, w.value = o.dirty.value, y.value = w.value;
|
|
1920
2119
|
}
|
|
1921
|
-
|
|
1922
|
-
[() => o.values, s, () => [...
|
|
2120
|
+
ie(
|
|
2121
|
+
[() => o.values, s, () => [...a].join("\0")],
|
|
1923
2122
|
() => {
|
|
1924
|
-
r || (clearTimeout(
|
|
2123
|
+
r || (clearTimeout(P), P = setTimeout(ae, 400));
|
|
1925
2124
|
},
|
|
1926
2125
|
{ deep: !0 }
|
|
1927
2126
|
), je(() => {
|
|
1928
|
-
|
|
2127
|
+
P !== void 0 && (clearTimeout(P), ae());
|
|
1929
2128
|
});
|
|
1930
2129
|
}
|
|
1931
|
-
const { confirmDiscard:
|
|
1932
|
-
|
|
1933
|
-
async function
|
|
1934
|
-
const
|
|
1935
|
-
return
|
|
2130
|
+
const { confirmDiscard: he } = Re(() => !r && o.dirty.value);
|
|
2131
|
+
Ze(Ht, null) && Ut(() => (r || le(), !0));
|
|
2132
|
+
async function fe() {
|
|
2133
|
+
const v = await he();
|
|
2134
|
+
return v && le(), v;
|
|
1936
2135
|
}
|
|
1937
|
-
function
|
|
1938
|
-
o.reset(),
|
|
2136
|
+
function we() {
|
|
2137
|
+
o.reset(), a.clear(), d.clear(), c.value = null, s.value = l.value[0].name, d.add(s.value), u = 0, w.value = !1, le(), r = !1;
|
|
1939
2138
|
}
|
|
1940
|
-
const
|
|
1941
|
-
const
|
|
1942
|
-
return
|
|
1943
|
-
}), j =
|
|
1944
|
-
const
|
|
1945
|
-
return
|
|
1946
|
-
}),
|
|
2139
|
+
const $ = x(() => {
|
|
2140
|
+
const v = [e("core.steps.position", { current: p.value + 1, total: G.value }), _.value.label];
|
|
2141
|
+
return y.value && v.push(e("core.steps.draft_saved")), v.join(" · ");
|
|
2142
|
+
}), j = x(() => {
|
|
2143
|
+
const v = l.value[p.value];
|
|
2144
|
+
return v.nextLabel ? v.nextLabel : O.value ? t.submitLabel ?? e("core.actions.save") : e("core.steps.next_named", { step: l.value[p.value + 1].label });
|
|
2145
|
+
}), me = x(() => S.value ? null : l.value[p.value - 1].label);
|
|
1947
2146
|
return {
|
|
1948
2147
|
steps: L,
|
|
1949
2148
|
current: _,
|
|
1950
|
-
index:
|
|
1951
|
-
count:
|
|
1952
|
-
isFirst:
|
|
2149
|
+
index: p,
|
|
2150
|
+
count: G,
|
|
2151
|
+
isFirst: S,
|
|
1953
2152
|
isLast: O,
|
|
1954
|
-
busy:
|
|
1955
|
-
direction:
|
|
1956
|
-
subtitle:
|
|
2153
|
+
busy: I,
|
|
2154
|
+
direction: c,
|
|
2155
|
+
subtitle: $,
|
|
1957
2156
|
nextLabel: j,
|
|
1958
|
-
backLabel:
|
|
1959
|
-
restored:
|
|
1960
|
-
refusals:
|
|
2157
|
+
backLabel: me,
|
|
2158
|
+
restored: w,
|
|
2159
|
+
refusals: k,
|
|
1961
2160
|
errors: o.errors,
|
|
1962
2161
|
failure: o.failure,
|
|
1963
|
-
next:
|
|
1964
|
-
back: () =>
|
|
1965
|
-
goTo:
|
|
1966
|
-
restart:
|
|
1967
|
-
confirmDiscard:
|
|
1968
|
-
bindDialog: () => ({ subtitle:
|
|
2162
|
+
next: E,
|
|
2163
|
+
back: () => H(p.value - 1),
|
|
2164
|
+
goTo: W,
|
|
2165
|
+
restart: we,
|
|
2166
|
+
confirmDiscard: fe,
|
|
2167
|
+
bindDialog: () => ({ subtitle: $.value, primaryLabel: j.value, status: I.value ? "processing" : "idle", beforeDismiss: fe })
|
|
1969
2168
|
};
|
|
1970
2169
|
}
|
|
1971
|
-
const
|
|
2170
|
+
const hl = {
|
|
1972
2171
|
class: "flex flex-wrap items-center gap-2.5 border-t border-border-separator pt-3.5",
|
|
1973
2172
|
"data-test": "step-navigation"
|
|
1974
|
-
},
|
|
2173
|
+
}, kl = /* @__PURE__ */ K({
|
|
1975
2174
|
__name: "StepNavigation",
|
|
1976
2175
|
props: {
|
|
1977
2176
|
flow: {}
|
|
1978
2177
|
},
|
|
1979
2178
|
emits: ["cancel"],
|
|
1980
2179
|
setup(o) {
|
|
1981
|
-
const t = o, { t: e } =
|
|
1982
|
-
return (
|
|
1983
|
-
t.flow.backLabel.value ? (i(), q(
|
|
2180
|
+
const t = o, { t: e } = Z();
|
|
2181
|
+
return (l, s) => (i(), h("div", hl, [
|
|
2182
|
+
t.flow.backLabel.value ? (i(), q(ge, {
|
|
1984
2183
|
key: 0,
|
|
1985
2184
|
prominence: "plain",
|
|
1986
2185
|
icon: "arrowLeftSLine",
|
|
1987
2186
|
disabled: t.flow.busy.value,
|
|
1988
2187
|
"data-test": "step-back",
|
|
1989
|
-
onClick: s[0] || (s[0] = (
|
|
2188
|
+
onClick: s[0] || (s[0] = (a) => t.flow.back())
|
|
1990
2189
|
}, {
|
|
1991
|
-
default:
|
|
1992
|
-
|
|
2190
|
+
default: m(() => [
|
|
2191
|
+
Y(C(t.flow.backLabel.value), 1)
|
|
1993
2192
|
]),
|
|
1994
2193
|
_: 1
|
|
1995
2194
|
}, 8, ["disabled"])) : D("", !0),
|
|
1996
|
-
s[3] || (s[3] =
|
|
1997
|
-
M(
|
|
2195
|
+
s[3] || (s[3] = b("div", { class: "grow" }, null, -1)),
|
|
2196
|
+
M(ge, {
|
|
1998
2197
|
prominence: "plain",
|
|
1999
2198
|
"data-test": "step-cancel",
|
|
2000
|
-
onClick: s[1] || (s[1] = (
|
|
2199
|
+
onClick: s[1] || (s[1] = (a) => l.$emit("cancel"))
|
|
2001
2200
|
}, {
|
|
2002
|
-
default:
|
|
2003
|
-
|
|
2201
|
+
default: m(() => [
|
|
2202
|
+
Y(C(n(e)("core.actions.cancel")), 1)
|
|
2004
2203
|
]),
|
|
2005
2204
|
_: 1
|
|
2006
2205
|
}),
|
|
2007
|
-
M(
|
|
2206
|
+
M(ge, {
|
|
2008
2207
|
prominence: "primary",
|
|
2009
2208
|
processing: t.flow.busy.value,
|
|
2010
2209
|
"data-test": "step-next",
|
|
2011
|
-
onClick: s[2] || (s[2] = (
|
|
2210
|
+
onClick: s[2] || (s[2] = (a) => t.flow.next())
|
|
2012
2211
|
}, {
|
|
2013
|
-
default:
|
|
2014
|
-
|
|
2212
|
+
default: m(() => [
|
|
2213
|
+
Y(C(t.flow.nextLabel.value), 1)
|
|
2015
2214
|
]),
|
|
2016
2215
|
_: 1
|
|
2017
2216
|
}, 8, ["processing"])
|
|
2018
2217
|
]));
|
|
2019
2218
|
}
|
|
2020
|
-
}), xl = ["aria-label"],
|
|
2219
|
+
}), xl = ["aria-label"], wl = ["aria-current"], _l = ["aria-label"], $l = {
|
|
2021
2220
|
key: 2,
|
|
2022
2221
|
class: "sr-only"
|
|
2023
|
-
},
|
|
2222
|
+
}, Sl = {
|
|
2024
2223
|
key: 1,
|
|
2025
2224
|
"data-test": "step-dots",
|
|
2026
2225
|
class: "flex justify-center gap-1.5",
|
|
2027
2226
|
"aria-hidden": "true"
|
|
2028
|
-
},
|
|
2227
|
+
}, Cl = ["data-state"], Fl = /* @__PURE__ */ K({
|
|
2029
2228
|
__name: "StepProgress",
|
|
2030
2229
|
props: {
|
|
2031
2230
|
flow: {},
|
|
2032
2231
|
progress: { default: "bar" }
|
|
2033
2232
|
},
|
|
2034
2233
|
setup(o) {
|
|
2035
|
-
const t = o, { t: e } =
|
|
2036
|
-
return (
|
|
2234
|
+
const t = o, { t: e } = Z();
|
|
2235
|
+
return (l, s) => t.progress === "bar" ? (i(), h("ol", {
|
|
2037
2236
|
key: 0,
|
|
2038
2237
|
"aria-label": n(e)("core.steps.label"),
|
|
2039
2238
|
"data-test": "step-bar",
|
|
2040
2239
|
class: "grid min-w-0 gap-2",
|
|
2041
2240
|
style: it({ gridTemplateColumns: `repeat(${t.flow.count.value}, minmax(0, 1fr))` })
|
|
2042
2241
|
}, [
|
|
2043
|
-
(i(!0),
|
|
2044
|
-
key:
|
|
2242
|
+
(i(!0), h(se, null, xe(t.flow.steps.value, (a) => (i(), h("li", {
|
|
2243
|
+
key: a.name,
|
|
2045
2244
|
class: "flex min-w-0",
|
|
2046
|
-
"aria-current":
|
|
2245
|
+
"aria-current": a.state === "current" ? "step" : void 0
|
|
2047
2246
|
}, [
|
|
2048
|
-
(i(), q(ut(
|
|
2049
|
-
type:
|
|
2050
|
-
disabled:
|
|
2051
|
-
"data-test": `step-${
|
|
2052
|
-
"data-state":
|
|
2053
|
-
class: R(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left",
|
|
2054
|
-
onClick: (d) =>
|
|
2247
|
+
(i(), q(ut(a.reachable ? "button" : "div"), {
|
|
2248
|
+
type: a.reachable ? "button" : void 0,
|
|
2249
|
+
disabled: a.reachable ? t.flow.busy.value : void 0,
|
|
2250
|
+
"data-test": `step-${a.name}`,
|
|
2251
|
+
"data-state": a.errors > 0 ? "error" : a.state,
|
|
2252
|
+
class: R(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left", a.reachable ? "cursor-pointer rounded-control focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-default" : ""]),
|
|
2253
|
+
onClick: (d) => a.reachable ? t.flow.goTo(a.name) : void 0
|
|
2055
2254
|
}, {
|
|
2056
|
-
default:
|
|
2057
|
-
|
|
2058
|
-
class: R(["h-1 rounded-full transition-colors duration-motion-normal",
|
|
2255
|
+
default: m(() => [
|
|
2256
|
+
b("span", {
|
|
2257
|
+
class: R(["h-1 rounded-full transition-colors duration-motion-normal", a.errors > 0 ? "bg-status-danger-solid" : a.state === "current" ? "bg-tint" : a.state === "done" ? "bg-control-on" : "bg-fill-strong"]),
|
|
2059
2258
|
"aria-hidden": "true"
|
|
2060
2259
|
}, null, 2),
|
|
2061
|
-
|
|
2062
|
-
class: R(["flex min-w-0 items-center gap-1.5 text-footnote",
|
|
2260
|
+
b("span", {
|
|
2261
|
+
class: R(["flex min-w-0 items-center gap-1.5 text-footnote", a.state === "current" ? "font-bold text-content-strong" : a.state === "done" ? "font-medium text-content-link" : "font-medium text-content-muted"])
|
|
2063
2262
|
}, [
|
|
2064
|
-
|
|
2263
|
+
a.state === "done" ? (i(), q(n(X), {
|
|
2065
2264
|
key: 0,
|
|
2066
2265
|
name: "checkCustom",
|
|
2067
2266
|
size: 12,
|
|
2068
2267
|
class: "shrink-0"
|
|
2069
2268
|
})) : D("", !0),
|
|
2070
|
-
|
|
2071
|
-
class: R(["truncate",
|
|
2072
|
-
},
|
|
2073
|
-
|
|
2269
|
+
b("span", {
|
|
2270
|
+
class: R(["truncate", a.reachable ? "group-hover:text-content-link" : ""])
|
|
2271
|
+
}, C(a.position) + ". " + C(a.label), 3),
|
|
2272
|
+
a.errors > 0 ? (i(), h("span", {
|
|
2074
2273
|
key: 1,
|
|
2075
2274
|
"data-test": "step-errors",
|
|
2076
|
-
"aria-label": n(e)("core.form.sections.errors", { count:
|
|
2275
|
+
"aria-label": n(e)("core.form.sections.errors", { count: a.errors }),
|
|
2077
2276
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2078
|
-
},
|
|
2079
|
-
|
|
2277
|
+
}, C(a.errors), 9, _l)) : D("", !0),
|
|
2278
|
+
a.state === "done" ? (i(), h("span", $l, C(n(e)("core.steps.done")), 1)) : D("", !0)
|
|
2080
2279
|
], 2)
|
|
2081
2280
|
]),
|
|
2082
2281
|
_: 2
|
|
2083
2282
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2084
|
-
], 8,
|
|
2085
|
-
], 12, xl)) : (i(),
|
|
2086
|
-
(i(!0),
|
|
2087
|
-
key:
|
|
2088
|
-
class: R(["h-1.5 rounded-full transition-all duration-motion-fast", [
|
|
2089
|
-
"data-state":
|
|
2090
|
-
}, null, 10,
|
|
2283
|
+
], 8, wl))), 128))
|
|
2284
|
+
], 12, xl)) : (i(), h("div", Sl, [
|
|
2285
|
+
(i(!0), h(se, null, xe(t.flow.steps.value, (a) => (i(), h("span", {
|
|
2286
|
+
key: a.name,
|
|
2287
|
+
class: R(["h-1.5 rounded-full transition-all duration-motion-fast", [a.state === "current" ? "w-4.5" : "w-1.5", a.errors > 0 ? "bg-status-danger-solid" : a.state === "todo" && a.position > t.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2288
|
+
"data-state": a.errors > 0 ? "error" : a.state
|
|
2289
|
+
}, null, 10, Cl))), 128))
|
|
2091
2290
|
]));
|
|
2092
2291
|
}
|
|
2093
|
-
}),
|
|
2292
|
+
}), Bl = ["data-step"], Ll = {
|
|
2094
2293
|
class: "sr-only",
|
|
2095
2294
|
"aria-live": "polite"
|
|
2096
|
-
},
|
|
2295
|
+
}, Tl = {
|
|
2097
2296
|
key: 1,
|
|
2098
2297
|
"data-test": "step-restored",
|
|
2099
2298
|
class: "flex items-center gap-2 text-footnote text-content-muted"
|
|
2100
|
-
},
|
|
2299
|
+
}, Do = /* @__PURE__ */ K({
|
|
2101
2300
|
__name: "StepForm",
|
|
2102
2301
|
props: {
|
|
2103
2302
|
flow: {},
|
|
@@ -2106,31 +2305,31 @@ const yl = {
|
|
|
2106
2305
|
},
|
|
2107
2306
|
emits: ["cancel"],
|
|
2108
2307
|
setup(o) {
|
|
2109
|
-
const t = o, { t: e } =
|
|
2110
|
-
return
|
|
2111
|
-
await
|
|
2112
|
-
}),
|
|
2113
|
-
await
|
|
2114
|
-
}), (s,
|
|
2308
|
+
const t = o, { t: e } = Z(), l = A("body");
|
|
2309
|
+
return ie(() => t.flow.current.value.name, async () => {
|
|
2310
|
+
await ke(), l.value?.focus();
|
|
2311
|
+
}), ie(() => t.flow.refusals.value, async () => {
|
|
2312
|
+
await ke(), l.value && await ze(l.value);
|
|
2313
|
+
}), (s, a) => (i(), h("div", {
|
|
2115
2314
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2116
2315
|
"data-test": "step-form",
|
|
2117
2316
|
"data-step": t.flow.current.value.name
|
|
2118
2317
|
}, [
|
|
2119
|
-
t.progress !== "none" ? (i(), q(
|
|
2318
|
+
t.progress !== "none" ? (i(), q(Fl, {
|
|
2120
2319
|
key: 0,
|
|
2121
2320
|
flow: t.flow,
|
|
2122
2321
|
progress: t.progress
|
|
2123
2322
|
}, null, 8, ["flow", "progress"])) : D("", !0),
|
|
2124
|
-
|
|
2125
|
-
t.flow.restored.value ? (i(),
|
|
2126
|
-
|
|
2127
|
-
M(
|
|
2323
|
+
b("p", Ll, C(t.flow.subtitle.value), 1),
|
|
2324
|
+
t.flow.restored.value ? (i(), h("div", Tl, [
|
|
2325
|
+
b("span", null, C(n(e)("core.steps.restored")), 1),
|
|
2326
|
+
M(ge, {
|
|
2128
2327
|
prominence: "link",
|
|
2129
2328
|
size: "sm",
|
|
2130
|
-
onClick:
|
|
2329
|
+
onClick: a[0] || (a[0] = (d) => t.flow.restart())
|
|
2131
2330
|
}, {
|
|
2132
|
-
default:
|
|
2133
|
-
|
|
2331
|
+
default: m(() => [
|
|
2332
|
+
Y(C(n(e)("core.steps.start_over")), 1)
|
|
2134
2333
|
]),
|
|
2135
2334
|
_: 1
|
|
2136
2335
|
})
|
|
@@ -2139,104 +2338,104 @@ const yl = {
|
|
|
2139
2338
|
key: t.flow.current.value.name,
|
|
2140
2339
|
form: t.flow
|
|
2141
2340
|
}, null, 8, ["form"])),
|
|
2142
|
-
(i(),
|
|
2341
|
+
(i(), h("form", {
|
|
2143
2342
|
key: t.flow.current.value.name,
|
|
2144
2343
|
ref_key: "body",
|
|
2145
|
-
ref:
|
|
2344
|
+
ref: l,
|
|
2146
2345
|
tabindex: "-1",
|
|
2147
2346
|
novalidate: "",
|
|
2148
2347
|
"data-test": "step-body",
|
|
2149
2348
|
class: R(["flex min-w-0 flex-col gap-group-gap outline-none", t.flow.direction.value === "back" ? "animate-step-back" : t.flow.direction.value === "forward" ? "animate-step-in" : ""]),
|
|
2150
|
-
onSubmit:
|
|
2349
|
+
onSubmit: a[1] || (a[1] = be((d) => t.flow.next(), ["prevent"]))
|
|
2151
2350
|
}, [
|
|
2152
|
-
|
|
2153
|
-
|
|
2351
|
+
z(s.$slots, t.flow.current.value.name),
|
|
2352
|
+
a[3] || (a[3] = b("button", {
|
|
2154
2353
|
type: "submit",
|
|
2155
2354
|
class: "sr-only",
|
|
2156
2355
|
tabindex: "-1",
|
|
2157
2356
|
"aria-hidden": "true"
|
|
2158
2357
|
}, null, -1))
|
|
2159
2358
|
], 34)),
|
|
2160
|
-
t.navigation === "inline" ? (i(), q(
|
|
2359
|
+
t.navigation === "inline" ? (i(), q(kl, {
|
|
2161
2360
|
key: 2,
|
|
2162
2361
|
flow: t.flow,
|
|
2163
|
-
onCancel:
|
|
2362
|
+
onCancel: a[2] || (a[2] = (d) => s.$emit("cancel"))
|
|
2164
2363
|
}, null, 8, ["flow"])) : D("", !0)
|
|
2165
|
-
], 8,
|
|
2364
|
+
], 8, Bl));
|
|
2166
2365
|
}
|
|
2167
2366
|
});
|
|
2168
2367
|
export {
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2368
|
+
xt as Calendar,
|
|
2369
|
+
mo as CardSelectField,
|
|
2370
|
+
vo as CheckboxField,
|
|
2371
|
+
po as ChoiceChips,
|
|
2372
|
+
bo as ComboField,
|
|
2373
|
+
Eo as CommandDialog,
|
|
2374
|
+
ln as DateField,
|
|
2375
|
+
go as DateTimeField,
|
|
2376
|
+
Lo as EditorPage,
|
|
2377
|
+
Mo as ErrorBag,
|
|
2378
|
+
ye as Field,
|
|
2379
|
+
yo as FileField,
|
|
2181
2380
|
Me as FormErrors,
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2381
|
+
zt as FormGroup,
|
|
2382
|
+
ho as FormGroupButton,
|
|
2383
|
+
ko as FormIndent,
|
|
2185
2384
|
dt as FormRow,
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2385
|
+
mn as FormView,
|
|
2386
|
+
rn as GroupEditAction,
|
|
2387
|
+
Co as GroupSheet,
|
|
2388
|
+
xo as I18nField,
|
|
2389
|
+
Wo as LeaveGuardRoot,
|
|
2390
|
+
Ko as MissingLeaveGuardRootError,
|
|
2391
|
+
wo as MoneyField,
|
|
2193
2392
|
_o as MonthYearField,
|
|
2194
|
-
|
|
2195
|
-
|
|
2393
|
+
$o as MultiSelectField,
|
|
2394
|
+
To as NumberCell,
|
|
2196
2395
|
Mt as NumberField,
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2396
|
+
Ue as OptionList,
|
|
2397
|
+
xn as OtpInput,
|
|
2398
|
+
So as PhotoField,
|
|
2399
|
+
Fo as RecordGroupScope,
|
|
2201
2400
|
_n as SegmentedField,
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2401
|
+
pn as SelectField,
|
|
2402
|
+
Do as StepForm,
|
|
2403
|
+
kl as StepNavigation,
|
|
2404
|
+
Fl as StepProgress,
|
|
2405
|
+
Sn as SwitchField,
|
|
2406
|
+
Zo as TextField,
|
|
2407
|
+
Fn as TextareaField,
|
|
2408
|
+
nn as TimeField,
|
|
2210
2409
|
lt as checkFile,
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2410
|
+
un as createFieldGroups,
|
|
2411
|
+
Po as createLeaveGuard,
|
|
2412
|
+
ce as fieldDefaults,
|
|
2413
|
+
Io as fieldKey,
|
|
2414
|
+
de as fieldProps,
|
|
2216
2415
|
ze as focusFirstError,
|
|
2217
2416
|
mt as formEditableKey,
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2417
|
+
Be as formatBytes,
|
|
2418
|
+
yn as groupOptions,
|
|
2419
|
+
Ao as installLeaveGuard,
|
|
2420
|
+
Ho as leaveGuardKey,
|
|
2421
|
+
hn as matchOptions,
|
|
2422
|
+
Ta as missingLocales,
|
|
2423
|
+
dn as provideRecordGroups,
|
|
2424
|
+
tn as recentChoicesKey,
|
|
2425
|
+
Dt as recordGroupsKey,
|
|
2426
|
+
Go as useCommand,
|
|
2427
|
+
Yt as useDirtySnapshot,
|
|
2229
2428
|
et as useFieldMode,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2429
|
+
Oo as useForm,
|
|
2430
|
+
Bo as useGroupSheet,
|
|
2431
|
+
jo as useHiddenFieldErrors,
|
|
2233
2432
|
Re as useLeaveGuard,
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2433
|
+
Uo as useLeaveGuardContext,
|
|
2434
|
+
bn as useOptions,
|
|
2435
|
+
cn as useRecordGroups,
|
|
2436
|
+
Xo as useResourceForm,
|
|
2437
|
+
At as useSaveChrome,
|
|
2438
|
+
fl as useSectionStates,
|
|
2439
|
+
fo as useSheetDiscardGuard,
|
|
2440
|
+
zo as useStepForm
|
|
2242
2441
|
};
|