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