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