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