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