@wssto2/vue-core 0.5.3 → 0.6.0
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/CHANGELOG.md +32 -0
- package/README.md +3 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js → ActionRow.vue_vue_type_script_setup_true_lang-D8NCXX4p.js} +1 -1
- package/dist/{Activity-DUjDaPfP.js → Activity-DGodh6BU.js} +4 -4
- package/dist/{Changes-B0tZO6BZ.js → Changes-38u4xY6e.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-o_Pj-JcD.js → CollectionPage.vue_vue_type_script_setup_true_lang-DPcCnrjr.js} +3 -3
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CDg31ZU7.js → DateField.vue_vue_type_script_setup_true_lang-BxUuUypB.js} +1 -1
- package/dist/{DeadLetters-IgVHao84.js → DeadLetters-CeHfhFHP.js} +6 -5
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-CSgT4ITL.js → FormGroup.vue_vue_type_script_setup_true_lang-CNb2CK01.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js → FormView.vue_vue_type_script_setup_true_lang-nyz8EkzM.js} +1 -1
- package/dist/{General-C40HxupS.js → General-BNTjPvat.js} +6 -6
- package/dist/{NewRolePage-Bhy8KJO1.js → NewRolePage-Btg7gzzH.js} +7 -6
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BdS7BxuS.js → NumberField.vue_vue_type_script_setup_true_lang-C8um4ARi.js} +1 -1
- package/dist/PersonAccess.vue_vue_type_script_setup_true_lang-ClmawvYm.js +600 -0
- package/dist/{ProfilePage-Bf7dFzGd.js → ProfilePage-CoZyG11N.js} +9 -9
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C6oloGIh.js → RoleEditor.vue_vue_type_script_setup_true_lang-Bs9bo0Zb.js} +30 -29
- package/dist/{RolePage-BjbvciTg.js → RolePage-CPlwZA6X.js} +37 -35
- package/dist/{RolesPage-DzVOgF4z.js → RolesPage-CdYdIHR4.js} +29 -27
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-DXe_iOS8.js → SegmentedField.vue_vue_type_script_setup_true_lang-B_hBL5f4.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BN4vzvV9.js → SelectField.vue_vue_type_script_setup_true_lang-CBZhGNpm.js} +4 -4
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DuvSSBbX.js +126 -0
- package/dist/ServiceAccountRecord-BtaUZuWU.js +511 -0
- package/dist/ServiceAccountsList-CcRJvNaf.js +137 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-PuWIK-Wa.js → SessionList.vue_vue_type_script_setup_true_lang-VvBB2EZz.js} +2 -2
- package/dist/{Sessions-CRUObe5G.js → Sessions-DkGNO1FO.js} +2 -2
- package/dist/{SettingsPage-C0qEC0uI.js → SettingsPage-D4G1HGbG.js} +8 -8
- package/dist/{SignIn-Uy0Jujzz.js → SignIn-DS1YymqD.js} +4 -4
- package/dist/{SignInPage-CpVZfrLZ.js → SignInPage-BrmL0PUw.js} +3 -3
- package/dist/{SignIns-Cp5Gx2dk.js → SignIns-C7l7IPHQ.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Dj5Aq8QT.js → SwitchField.vue_vue_type_script_setup_true_lang-DXZK89A3.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js → TextField.vue_vue_type_script_setup_true_lang-CX3LdZLK.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-aT1P8Xqr.js → TextareaField.vue_vue_type_script_setup_true_lang-BOtn_1GT.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-jPKPE1hc.js → TimeField.vue_vue_type_script_setup_true_lang-CbflIrq6.js} +1 -1
- package/dist/{UserRecord-DbSMnTbj.js → UserRecord-Du8M_kuk.js} +25 -25
- package/dist/{UsersList-9MicE2pG.js → UsersList-D3ydQice.js} +13 -13
- package/dist/access/api.d.ts +7 -8
- package/dist/access/context.d.ts +2 -7
- package/dist/access/feature.d.ts +0 -8
- package/dist/access/index.js +47 -15
- package/dist/client/client.d.ts +2 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/route.d.ts +22 -3
- package/dist/collection/http.d.ts +3 -2
- package/dist/collection/index.js +17 -16
- package/dist/form/index.js +586 -611
- package/dist/http-nz92KjdS.js +42 -0
- package/dist/i18n/index.js +32 -32
- package/dist/identity/index.d.ts +7 -0
- package/dist/identity/index.js +19 -15
- package/dist/identity/serviceaccounts/ApiKeysPanel.vue.d.ts +17 -0
- package/dist/identity/serviceaccounts/CreatedApiKeyDialog.vue.d.ts +53 -0
- package/dist/identity/serviceaccounts/NewApiKeyDialog.vue.d.ts +24 -0
- package/dist/identity/serviceaccounts/ServiceAccountDialog.vue.d.ts +22 -0
- package/dist/identity/serviceaccounts/ServiceAccountRecord.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/ServiceAccountsList.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/access.d.ts +4 -0
- package/dist/identity/serviceaccounts/api.d.ts +27 -0
- package/dist/identity/serviceaccounts/context.d.ts +14 -0
- package/dist/identity/serviceaccounts/feature.d.ts +23 -0
- package/dist/identity/serviceaccounts/form.d.ts +4 -0
- package/dist/identity/serviceaccounts/messages.d.ts +11 -0
- package/dist/identity/serviceaccounts/routes.d.ts +22 -0
- package/dist/{index-Ok29ucE3.js → index-Cmj9iZmT.js} +191 -168
- package/dist/{index-C-oM_Mnf.js → index-DH0MoFqg.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/copyText.d.ts +5 -0
- package/dist/modules/access/routes.d.ts +13 -13
- package/dist/modules/events/routes.d.ts +4 -4
- package/dist/modules/identity/routes.d.ts +31 -31
- package/dist/modules/notification/routes.d.ts +16 -16
- package/dist/modules/serviceaccount/entities.d.ts +127 -0
- package/dist/modules/serviceaccount/routes.d.ts +58 -0
- package/dist/modules/serviceaccount/schemas.d.ts +49 -0
- package/dist/{neighbors-Bv6vnWlW.js → neighbors-DNZuGlQH.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-Bu0XbEpN.js → options-e_CAfvDQ.js} +3 -3
- package/dist/phone/index.js +1 -1
- package/dist/refusals-COPr15XZ.js +135 -0
- package/dist/routes-CVckt7Pj.js +19 -0
- package/dist/state-BC1Fc6U2.js +154 -0
- package/dist/{status-C78NpXyB.js → status-C8XtnK6m.js} +7 -6
- package/dist/styles.css +1 -1
- package/dist/{suggestions-ClyLexMO.js → suggestions-cPjs5gQz.js} +1 -1
- package/dist/{useCommand-DyuPTosF.js → useCommand-CfG727e8.js} +1 -1
- package/dist/{useGroupSheet-C2NyqWRp.js → useGroupSheet-BVcNDWbP.js} +2 -2
- package/dist/useRecordDialog-D65FF85F.js +30 -0
- package/package.json +2 -2
- package/dist/http-CdQowFlW.js +0 -194
- package/dist/index-BdGnA1Jh.js +0 -765
package/dist/form/index.js
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
import { _ as He, c as et, f as tt } from "../FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js";
|
|
2
|
-
import { E as
|
|
3
|
-
import { f as Te
|
|
4
|
-
import { _ as
|
|
5
|
-
import { ref as A, computed as h, defineComponent as G, openBlock as u, createBlock as D, mergeProps as W, unref as
|
|
2
|
+
import { E as $o, u as _o, a as Co } from "../FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js";
|
|
3
|
+
import { f as Te } from "../useCommand-CfG727e8.js";
|
|
4
|
+
import { _ as Fo, a as Bo, u as Lo } from "../useCommand-CfG727e8.js";
|
|
5
|
+
import { ref as A, computed as h, defineComponent as G, openBlock as u, createBlock as D, mergeProps as W, unref as l, createSlots as J, withCtx as f, createElementVNode as y, normalizeClass as I, createElementBlock as g, Fragment as ie, renderList as xe, createVNode as j, createCommentVNode as L, toDisplayString as _, renderSlot as F, mergeDefaults as ue, useModel as re, useId as qe, withKeys as Ce, withModifiers as pe, createTextVNode as H, mergeModels as le, useTemplateRef as U, shallowRef as Oe, watch as ye, normalizeProps as ze, guardReactiveProps as Ve, nextTick as he, provide as at, inject as Ue, onBeforeUnmount as Ye, getCurrentScope as lt, onScopeDispose as ot, toValue as nt, shallowReactive as Ee, normalizeStyle as st, resolveDynamicComponent as rt } from "vue";
|
|
6
6
|
import { a as We } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
|
-
import { M as zo, c as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
7
|
+
import { M as zo, c as Vo, i as qo, l as Do, u as Ro } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { _ as jo } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
|
|
9
|
+
import { u as Oo } from "../useResourceForm-CJfl8rj_.js";
|
|
10
10
|
import { _ as Z } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
|
-
import { u as Je, _ as ge, f as de, b as ce, a as Ze,
|
|
12
|
-
import {
|
|
11
|
+
import { u as Je, _ as ge, f as de, b as ce, a as Ze, e as De, g as it, j as ut, k as dt } from "../options-e_CAfvDQ.js";
|
|
12
|
+
import { d as No, i as Go, m as Ko } from "../options-e_CAfvDQ.js";
|
|
13
13
|
import { useI18n as oe } from "vue-i18n";
|
|
14
|
-
import { b as
|
|
15
|
-
import { a as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { u as
|
|
18
|
-
import { r as
|
|
19
|
-
import { s as $e, u as Ne, i as
|
|
20
|
-
import { u as
|
|
21
|
-
import { _ as
|
|
14
|
+
import { b as ct } from "../controlSurface-t7OEFESJ.js";
|
|
15
|
+
import { a as ft } from "../TextField.vue_vue_type_script_setup_true_lang-CX3LdZLK.js";
|
|
16
|
+
import { _ as Ao } from "../TextField.vue_vue_type_script_setup_true_lang-CX3LdZLK.js";
|
|
17
|
+
import { u as mt, l as vt } from "../suggestions-cPjs5gQz.js";
|
|
18
|
+
import { r as Uo } from "../suggestions-cPjs5gQz.js";
|
|
19
|
+
import { s as $e, u as Ne, i as pt, o as _e, e as Se, k as bt, _ as yt, l as gt, c as ht, b as kt, t as Le, g as xt, q as wt } from "../useTypedEntry-C7k7Dyl-.js";
|
|
20
|
+
import { u as $t, a as _t, s as Ct } from "../DateField.vue_vue_type_script_setup_true_lang-BxUuUypB.js";
|
|
21
|
+
import { _ as Wo } from "../DateField.vue_vue_type_script_setup_true_lang-BxUuUypB.js";
|
|
22
22
|
import { _ as Xe } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
23
|
-
import { u as
|
|
24
|
-
import { u as
|
|
25
|
-
import { _ as
|
|
26
|
-
import { u as
|
|
27
|
-
import { _ as
|
|
23
|
+
import { u as St } from "../format-D8X4zsx6.js";
|
|
24
|
+
import { u as Re } from "../mediaQuery-CygcXmFW.js";
|
|
25
|
+
import { _ as Me } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
|
|
26
|
+
import { u as Ft } from "../TimeField.vue_vue_type_script_setup_true_lang-CbflIrq6.js";
|
|
27
|
+
import { _ as Zo } from "../TimeField.vue_vue_type_script_setup_true_lang-CbflIrq6.js";
|
|
28
28
|
import { _ as be } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
29
|
-
import { _ as
|
|
30
|
-
import { a as
|
|
31
|
-
import { _ as
|
|
32
|
-
import { i as
|
|
33
|
-
import { a as
|
|
34
|
-
import { _ as zt } from "../NumberField.vue_vue_type_script_setup_true_lang-
|
|
35
|
-
import { _ as
|
|
36
|
-
import {
|
|
37
|
-
import { _ as
|
|
38
|
-
import { _ as
|
|
29
|
+
import { _ as Bt } from "../FormGroup.vue_vue_type_script_setup_true_lang-CNb2CK01.js";
|
|
30
|
+
import { a as Qo, c as en, p as tn, r as an, u as ln } from "../FormGroup.vue_vue_type_script_setup_true_lang-CNb2CK01.js";
|
|
31
|
+
import { _ as nn } from "../FormView.vue_vue_type_script_setup_true_lang-nyz8EkzM.js";
|
|
32
|
+
import { i as Lt } from "../intlLocale-CeRU44qJ.js";
|
|
33
|
+
import { a as Tt } from "../environment-Dva-SG8D.js";
|
|
34
|
+
import { _ as zt } from "../NumberField.vue_vue_type_script_setup_true_lang-C8um4ARi.js";
|
|
35
|
+
import { _ as Vt } from "../Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
36
|
+
import { b as qt, a as Ge } from "../SelectField.vue_vue_type_script_setup_true_lang-CBZhGNpm.js";
|
|
37
|
+
import { _ as rn, u as un } from "../SelectField.vue_vue_type_script_setup_true_lang-CBZhGNpm.js";
|
|
38
|
+
import { _ as cn, b as fn, a as mn, u as vn } from "../useGroupSheet-BVcNDWbP.js";
|
|
39
39
|
import { _ as Ke } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-CY5EZiyK.js";
|
|
40
|
-
import { _ as
|
|
41
|
-
import { _ as
|
|
42
|
-
import { _ as
|
|
43
|
-
import { a as
|
|
44
|
-
import { _ as
|
|
45
|
-
import { p as
|
|
46
|
-
import { u as
|
|
47
|
-
import {
|
|
48
|
-
|
|
40
|
+
import { _ as bn } from "../SegmentedField.vue_vue_type_script_setup_true_lang-B_hBL5f4.js";
|
|
41
|
+
import { _ as gn } from "../SwitchField.vue_vue_type_script_setup_true_lang-DXZK89A3.js";
|
|
42
|
+
import { _ as kn } from "../TextareaField.vue_vue_type_script_setup_true_lang-BOtn_1GT.js";
|
|
43
|
+
import { a as Dt } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-GUTIXuNd.js";
|
|
44
|
+
import { _ as Rt, a as Mt } from "../SectionList.vue_vue_type_script_setup_true_lang-wyW7n3Uq.js";
|
|
45
|
+
import { p as jt } from "../sectionIndex-BS0ic5W7.js";
|
|
46
|
+
import { u as It } from "../useSaveChrome-7huA3FzR.js";
|
|
47
|
+
import { u as wn } from "../useRecordDialog-D65FF85F.js";
|
|
48
|
+
import { matchedRouteKey as Ot, onBeforeRouteLeave as Et } from "vue-router";
|
|
49
|
+
function Nt(r) {
|
|
49
50
|
const a = A(null);
|
|
50
51
|
return {
|
|
51
|
-
isDirty: h(() => a.value !== null && JSON.stringify(
|
|
52
|
-
markClean: () => a.value = JSON.stringify(
|
|
52
|
+
isDirty: h(() => a.value !== null && JSON.stringify(r()) !== a.value),
|
|
53
|
+
markClean: () => a.value = JSON.stringify(r())
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
const a = A(!1), e =
|
|
56
|
+
function ao(r) {
|
|
57
|
+
const a = A(!1), e = Nt(r), { confirmDiscard: t } = We(() => a.value && e.isDirty.value);
|
|
57
58
|
return {
|
|
58
59
|
/** The sheet was just filled: its current values are the baseline. */
|
|
59
60
|
opened: () => {
|
|
@@ -66,14 +67,14 @@ function lo(s) {
|
|
|
66
67
|
beforeDismiss: t
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
const
|
|
70
|
+
const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name", "value", "checked", "disabled", "onChange"], Pt = { class: "min-w-0 flex-1" }, At = { class: "block text-body font-semibold text-content-strong" }, Ht = {
|
|
70
71
|
key: 0,
|
|
71
72
|
class: "mt-0.5 block text-footnote text-content-muted"
|
|
72
|
-
},
|
|
73
|
+
}, Ut = {
|
|
73
74
|
key: 1,
|
|
74
75
|
class: "flex size-5 shrink-0 items-center justify-center rounded-full bg-control-on text-white",
|
|
75
76
|
"aria-hidden": "true"
|
|
76
|
-
},
|
|
77
|
+
}, lo = /* @__PURE__ */ G({
|
|
77
78
|
__name: "CardSelectField",
|
|
78
79
|
props: /* @__PURE__ */ ue({
|
|
79
80
|
label: {},
|
|
@@ -91,9 +92,9 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
91
92
|
columns: {}
|
|
92
93
|
}, { ...ce, modelValue: null, columns: 2 }),
|
|
93
94
|
emits: ["update:modelValue"],
|
|
94
|
-
setup(
|
|
95
|
-
const e =
|
|
96
|
-
return (i, p) => (u(), D(ge, W(
|
|
95
|
+
setup(r, { emit: a }) {
|
|
96
|
+
const e = r, t = a, { editable: n } = Je(e), o = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, c = h(() => o[e.columns]);
|
|
97
|
+
return (i, p) => (u(), D(ge, W(l(de)(e), {
|
|
97
98
|
value: e.options.find((k) => k.value === e.modelValue)?.label ?? null,
|
|
98
99
|
"row-layout": "stacked"
|
|
99
100
|
}), J({
|
|
@@ -107,40 +108,40 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
107
108
|
class: I(["grid w-full gap-2.5", c.value]),
|
|
108
109
|
"data-test": "card-select"
|
|
109
110
|
}, [
|
|
110
|
-
(u(!0), g(ie, null, xe(e.options, (
|
|
111
|
-
key:
|
|
112
|
-
class: I(["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", [
|
|
111
|
+
(u(!0), g(ie, null, xe(e.options, (s) => (u(), g("label", {
|
|
112
|
+
key: s.value,
|
|
113
|
+
class: I(["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", [s.value === e.modelValue ? "bg-tint-soft ring-[1.5px] ring-inset ring-border-selected" : "hover:bg-fill-strong", e.disabled || !l(n) || s.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
113
114
|
}, [
|
|
114
115
|
y("input", {
|
|
115
116
|
type: "radio",
|
|
116
117
|
class: "sr-only",
|
|
117
118
|
name: e.name ?? k,
|
|
118
|
-
value:
|
|
119
|
-
checked:
|
|
120
|
-
disabled: e.disabled || !n
|
|
121
|
-
onChange: (m) => t("update:modelValue",
|
|
122
|
-
}, null, 40,
|
|
123
|
-
|
|
119
|
+
value: s.value,
|
|
120
|
+
checked: s.value === e.modelValue,
|
|
121
|
+
disabled: e.disabled || !l(n) || s.disabled,
|
|
122
|
+
onChange: (m) => t("update:modelValue", s.value)
|
|
123
|
+
}, null, 40, Kt),
|
|
124
|
+
s.icon ? (u(), g("span", {
|
|
124
125
|
key: 0,
|
|
125
|
-
class: I(["flex size-9 shrink-0 items-center justify-center rounded-control",
|
|
126
|
+
class: I(["flex size-9 shrink-0 items-center justify-center rounded-control", s.value === e.modelValue ? "bg-control-on text-white" : "bg-fill-strong text-content-muted"])
|
|
126
127
|
}, [
|
|
127
|
-
j(
|
|
128
|
-
name:
|
|
128
|
+
j(l(Z), {
|
|
129
|
+
name: s.icon,
|
|
129
130
|
size: 18
|
|
130
131
|
}, null, 8, ["name"])
|
|
131
132
|
], 2)) : L("", !0),
|
|
132
|
-
y("span",
|
|
133
|
-
y("span",
|
|
134
|
-
|
|
133
|
+
y("span", Pt, [
|
|
134
|
+
y("span", At, _(s.label), 1),
|
|
135
|
+
s.description ? (u(), g("span", Ht, _(s.description), 1)) : L("", !0)
|
|
135
136
|
]),
|
|
136
|
-
|
|
137
|
-
j(
|
|
137
|
+
s.value === e.modelValue ? (u(), g("span", Ut, [
|
|
138
|
+
j(l(Z), {
|
|
138
139
|
name: "checkCustom",
|
|
139
140
|
size: 12
|
|
140
141
|
})
|
|
141
142
|
])) : L("", !0)
|
|
142
143
|
], 2))), 128))
|
|
143
|
-
], 10,
|
|
144
|
+
], 10, Gt)
|
|
144
145
|
]),
|
|
145
146
|
_: 2
|
|
146
147
|
}, [
|
|
@@ -167,10 +168,10 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
167
168
|
} : void 0
|
|
168
169
|
]), 1040, ["value"]));
|
|
169
170
|
}
|
|
170
|
-
}),
|
|
171
|
+
}), Yt = ["data-field-error"], Wt = ["aria-checked", "aria-disabled", "aria-describedby", "aria-invalid", "tabindex", "onKeydown"], Jt = { class: "flex min-w-0 flex-1 flex-col items-start" }, Zt = {
|
|
171
172
|
key: 0,
|
|
172
173
|
class: "flex shrink-0 items-center gap-2.5"
|
|
173
|
-
},
|
|
174
|
+
}, Xt = ["id"], oo = /* @__PURE__ */ G({
|
|
174
175
|
__name: "CheckboxField",
|
|
175
176
|
props: /* @__PURE__ */ le({
|
|
176
177
|
label: {},
|
|
@@ -183,8 +184,8 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
183
184
|
modelModifiers: {}
|
|
184
185
|
}),
|
|
185
186
|
emits: ["update:modelValue"],
|
|
186
|
-
setup(
|
|
187
|
-
const a =
|
|
187
|
+
setup(r) {
|
|
188
|
+
const a = r, e = re(r, "modelValue"), t = !!Ze(), n = qe(), o = () => {
|
|
188
189
|
a.disabled || (e.value = !e.value);
|
|
189
190
|
};
|
|
190
191
|
return (c, i) => (u(), g("div", {
|
|
@@ -194,7 +195,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
194
195
|
role: "checkbox",
|
|
195
196
|
"aria-checked": e.value,
|
|
196
197
|
"aria-disabled": a.disabled || void 0,
|
|
197
|
-
"aria-describedby": a.error ? `${n
|
|
198
|
+
"aria-describedby": a.error ? `${l(n)}-error` : void 0,
|
|
198
199
|
"aria-invalid": a.error ? !0 : void 0,
|
|
199
200
|
tabindex: a.disabled ? -1 : 0,
|
|
200
201
|
"data-test": "checkbox",
|
|
@@ -209,7 +210,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
209
210
|
class: I(["flex shrink-0 items-center justify-center rounded-full border-2", [a.variant === "row" ? "size-5.5" : "size-5", e.value ? a.disabled ? "border-content-disabled bg-content-disabled text-white" : "border-control-on bg-control-on text-white" : "border-border-control"]]),
|
|
210
211
|
"aria-hidden": "true"
|
|
211
212
|
}, [
|
|
212
|
-
e.value ? (u(), D(
|
|
213
|
+
e.value ? (u(), D(l(Z), {
|
|
213
214
|
key: 0,
|
|
214
215
|
name: "checkCustom",
|
|
215
216
|
size: 12
|
|
@@ -218,7 +219,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
218
219
|
y("div", {
|
|
219
220
|
class: I(["flex min-w-0 flex-1 items-center gap-3", a.variant === "row" ? "min-h-row border-t border-border-separator py-2 pr-row-inset group-first/check:border-t-0" : ""])
|
|
220
221
|
}, [
|
|
221
|
-
y("div",
|
|
222
|
+
y("div", Jt, [
|
|
222
223
|
y("p", {
|
|
223
224
|
class: I(["w-full text-body", [a.variant === "row" ? "break-words" : "truncate", a.disabled ? "text-content-muted" : e.value ? "text-content-strong" : "text-content"]])
|
|
224
225
|
}, _(a.label), 3),
|
|
@@ -228,30 +229,30 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
228
229
|
}, _(a.description), 3)) : L("", !0),
|
|
229
230
|
F(c.$slots, "default")
|
|
230
231
|
]),
|
|
231
|
-
c.$slots.trailing ? (u(), g("div",
|
|
232
|
+
c.$slots.trailing ? (u(), g("div", Zt, [
|
|
232
233
|
F(c.$slots, "trailing")
|
|
233
234
|
])) : L("", !0)
|
|
234
235
|
], 2)
|
|
235
|
-
], 42,
|
|
236
|
+
], 42, Wt),
|
|
236
237
|
a.error ? (u(), g("p", {
|
|
237
238
|
key: 0,
|
|
238
|
-
id: `${n
|
|
239
|
+
id: `${l(n)}-error`,
|
|
239
240
|
role: "alert",
|
|
240
241
|
class: "flex items-start gap-1.5 px-2 pt-1 text-footnote text-content-destructive"
|
|
241
242
|
}, [
|
|
242
|
-
j(
|
|
243
|
+
j(l(Z), {
|
|
243
244
|
name: "alertTriangle",
|
|
244
245
|
size: 14,
|
|
245
246
|
class: "mt-px shrink-0"
|
|
246
247
|
}),
|
|
247
248
|
H(" " + _(a.error), 1)
|
|
248
|
-
], 8,
|
|
249
|
-
], 8,
|
|
249
|
+
], 8, Xt)) : L("", !0)
|
|
250
|
+
], 8, Yt));
|
|
250
251
|
}
|
|
251
|
-
}),
|
|
252
|
+
}), Qt = {
|
|
252
253
|
key: 0,
|
|
253
254
|
class: "text-body text-content-muted"
|
|
254
|
-
},
|
|
255
|
+
}, ea = ["id", "aria-label", "aria-describedby", "aria-invalid"], ta = ["aria-pressed", "disabled", "onClick"], no = /* @__PURE__ */ G({
|
|
255
256
|
__name: "ChoiceChips",
|
|
256
257
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
257
258
|
label: {},
|
|
@@ -270,14 +271,14 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
270
271
|
modelModifiers: {}
|
|
271
272
|
}),
|
|
272
273
|
emits: ["update:modelValue"],
|
|
273
|
-
setup(
|
|
274
|
-
const a =
|
|
275
|
-
return (
|
|
274
|
+
setup(r) {
|
|
275
|
+
const a = r, e = re(r, "modelValue"), t = (n) => e.value = e.value.includes(n) ? e.value.filter((o) => o !== n) : [...e.value, n];
|
|
276
|
+
return (n, o) => (u(), D(ge, W(l(de)(a), {
|
|
276
277
|
value: a.options.filter((c) => e.value.includes(c.value)).map((c) => c.label).join(", ") || null,
|
|
277
278
|
"row-layout": "stacked"
|
|
278
279
|
}), J({
|
|
279
280
|
default: f(({ id: c, describedby: i, invalid: p }) => [
|
|
280
|
-
a.options.length === 0 ? (u(), g("span",
|
|
281
|
+
a.options.length === 0 ? (u(), g("span", Qt, "—")) : (u(), g("div", {
|
|
281
282
|
key: 1,
|
|
282
283
|
id: c,
|
|
283
284
|
role: "group",
|
|
@@ -295,45 +296,45 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
295
296
|
class: I(["inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-full px-3 text-subheadline transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-60", e.value.includes(k.value) ? "bg-tint-soft font-semibold text-content-link" : "bg-fill font-medium text-content-strong hover:bg-fill-strong"]),
|
|
296
297
|
onClick: (w) => t(k.value)
|
|
297
298
|
}, [
|
|
298
|
-
e.value.includes(k.value) ? (u(), D(
|
|
299
|
+
e.value.includes(k.value) ? (u(), D(l(Z), {
|
|
299
300
|
key: 0,
|
|
300
301
|
name: "checkCustom",
|
|
301
302
|
size: 12
|
|
302
303
|
})) : L("", !0),
|
|
303
304
|
H(" " + _(k.label), 1)
|
|
304
|
-
], 10,
|
|
305
|
-
], 8,
|
|
305
|
+
], 10, ta))), 128))
|
|
306
|
+
], 8, ea))
|
|
306
307
|
]),
|
|
307
308
|
_: 2
|
|
308
309
|
}, [
|
|
309
|
-
|
|
310
|
+
n.$slots.trailing ? {
|
|
310
311
|
name: "trailing",
|
|
311
312
|
fn: f(() => [
|
|
312
|
-
F(
|
|
313
|
+
F(n.$slots, "trailing")
|
|
313
314
|
]),
|
|
314
315
|
key: "0"
|
|
315
316
|
} : void 0,
|
|
316
|
-
|
|
317
|
+
n.$slots.labelTrailing ? {
|
|
317
318
|
name: "labelTrailing",
|
|
318
319
|
fn: f(() => [
|
|
319
|
-
F(
|
|
320
|
+
F(n.$slots, "labelTrailing")
|
|
320
321
|
]),
|
|
321
322
|
key: "1"
|
|
322
323
|
} : void 0,
|
|
323
|
-
|
|
324
|
+
n.$slots.readonly ? {
|
|
324
325
|
name: "readonly",
|
|
325
326
|
fn: f(() => [
|
|
326
|
-
F(
|
|
327
|
+
F(n.$slots, "readonly")
|
|
327
328
|
]),
|
|
328
329
|
key: "2"
|
|
329
330
|
} : void 0
|
|
330
331
|
]), 1040, ["value"]));
|
|
331
332
|
}
|
|
332
|
-
}),
|
|
333
|
+
}), aa = {
|
|
333
334
|
key: 0,
|
|
334
335
|
class: "flex shrink-0 items-center",
|
|
335
336
|
"data-test": "field-value"
|
|
336
|
-
},
|
|
337
|
+
}, la = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], oa = { class: "block break-words text-body text-content-strong" }, so = /* @__PURE__ */ G({
|
|
337
338
|
__name: "ComboField",
|
|
338
339
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
339
340
|
label: {},
|
|
@@ -361,8 +362,8 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
361
362
|
modelModifiers: {}
|
|
362
363
|
}),
|
|
363
364
|
emits: /* @__PURE__ */ le(["picked", "focus", "blur"], ["update:modelValue"]),
|
|
364
|
-
setup(
|
|
365
|
-
const t =
|
|
365
|
+
setup(r, { expose: a, emit: e }) {
|
|
366
|
+
const t = r, n = re(r, "modelValue"), o = e, { t: c } = oe(), i = !!Ze(), p = De("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), k = h(() => t.rowLayout === "stacked"), w = h(() => i && !k.value ? ct(t.width) : "w-full"), $ = U("input"), s = U("anchor"), m = Oe(null), b = Oe(""), C = mt({
|
|
366
367
|
source: () => t.search ?? t.options,
|
|
367
368
|
minLength: () => t.minLength,
|
|
368
369
|
debounce: () => t.debounce,
|
|
@@ -370,36 +371,36 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
370
371
|
listAllWhenEmpty: !0,
|
|
371
372
|
recents: () => t.recents
|
|
372
373
|
}), { items: q, open: x, status: O, highlighted: R, showingRecent: X } = C, M = h(() => {
|
|
373
|
-
const T =
|
|
374
|
+
const T = n.value;
|
|
374
375
|
return T === null ? null : [m.value, t.selected, ...t.options ?? []].find((K) => K?.value === T) ?? null;
|
|
375
376
|
});
|
|
376
377
|
ye(M, (T) => {
|
|
377
378
|
x.value || (b.value = T?.label ?? "");
|
|
378
379
|
}, { immediate: !0 });
|
|
379
380
|
function ne(T) {
|
|
380
|
-
b.value = T.target.value, C.ask(b.value), b.value === "" && (
|
|
381
|
+
b.value = T.target.value, C.ask(b.value), b.value === "" && (n.value = null, m.value = null);
|
|
381
382
|
}
|
|
382
383
|
function Q(T) {
|
|
383
384
|
o("focus", T), t.disabled || C.show("");
|
|
384
385
|
}
|
|
385
386
|
function te(T) {
|
|
386
|
-
C.close(), C.remember(T), m.value = T,
|
|
387
|
+
C.close(), C.remember(T), m.value = T, n.value = T.value, b.value = T.label, o("picked", T);
|
|
387
388
|
}
|
|
388
389
|
function fe(T) {
|
|
389
390
|
C.close(), b.value = M.value?.label ?? "", o("blur", T);
|
|
390
391
|
}
|
|
391
|
-
const me = h(() =>
|
|
392
|
-
return a({ focus: () => $.value?.focus() }), (T, K) => (u(), D(ge, W(
|
|
392
|
+
const me = h(() => vt(x.value, q.value.length, O.value, !0));
|
|
393
|
+
return a({ focus: () => $.value?.focus() }), (T, K) => (u(), D(ge, W(l(de)(t), {
|
|
393
394
|
value: M.value?.label ?? null,
|
|
394
395
|
"row-layout": t.rowLayout
|
|
395
396
|
}), J({
|
|
396
397
|
default: f(({ id: E, describedby: ae, invalid: se }) => [
|
|
397
398
|
y("div", {
|
|
398
399
|
ref_key: "anchor",
|
|
399
|
-
ref:
|
|
400
|
-
class: I(["flex items-center gap-1.5", [
|
|
400
|
+
ref: s,
|
|
401
|
+
class: I(["flex items-center gap-1.5", [l(p), w.value]])
|
|
401
402
|
}, [
|
|
402
|
-
T.$slots.value && M.value ? (u(), g("span",
|
|
403
|
+
T.$slots.value && M.value ? (u(), g("span", aa, [
|
|
403
404
|
F(T.$slots, "value", {
|
|
404
405
|
option: M.value
|
|
405
406
|
})
|
|
@@ -419,7 +420,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
419
420
|
"aria-autocomplete": "list",
|
|
420
421
|
"aria-expanded": me.value,
|
|
421
422
|
"aria-controls": `${E}-list`,
|
|
422
|
-
"aria-activedescendant": me.value &&
|
|
423
|
+
"aria-activedescendant": me.value && l(q).length > 0 ? `${E}-option-${l(R)}` : void 0,
|
|
423
424
|
"aria-required": t.required || void 0,
|
|
424
425
|
"aria-invalid": se || void 0,
|
|
425
426
|
"aria-describedby": ae,
|
|
@@ -427,33 +428,33 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
427
428
|
onInput: ne,
|
|
428
429
|
onFocus: Q,
|
|
429
430
|
onBlur: fe,
|
|
430
|
-
onKeydown: K[0] || (K[0] = (ee) =>
|
|
431
|
-
}, null, 42,
|
|
432
|
-
j(
|
|
431
|
+
onKeydown: K[0] || (K[0] = (ee) => l(C).keydown(ee, { pick: te, enterNeedsMove: !1 }))
|
|
432
|
+
}, null, 42, la),
|
|
433
|
+
j(l(Z), {
|
|
433
434
|
name: "search",
|
|
434
435
|
size: 14,
|
|
435
436
|
class: "shrink-0 text-content-muted"
|
|
436
437
|
})
|
|
437
438
|
], 2),
|
|
438
|
-
j(
|
|
439
|
+
j(ft, {
|
|
439
440
|
id: E,
|
|
440
|
-
anchor:
|
|
441
|
-
open:
|
|
442
|
-
items:
|
|
443
|
-
highlighted:
|
|
441
|
+
anchor: s.value,
|
|
442
|
+
open: l(x),
|
|
443
|
+
items: l(q),
|
|
444
|
+
highlighted: l(R),
|
|
444
445
|
query: b.value,
|
|
445
|
-
status:
|
|
446
|
-
recent:
|
|
446
|
+
status: l(O),
|
|
447
|
+
recent: l(X),
|
|
447
448
|
"empty-message": !0,
|
|
448
|
-
selected:
|
|
449
|
-
hint:
|
|
449
|
+
selected: n.value,
|
|
450
|
+
hint: l(c)("core.form.suggestions.keys_pick"),
|
|
450
451
|
onPick: te,
|
|
451
|
-
onHover: K[1] || (K[1] = (ee) =>
|
|
452
|
+
onHover: K[1] || (K[1] = (ee) => l(C).highlight(ee))
|
|
452
453
|
}, J({ _: 2 }, [
|
|
453
454
|
T.$slots.option ? {
|
|
454
455
|
name: "option",
|
|
455
456
|
fn: f((ee) => [
|
|
456
|
-
F(T.$slots, "option", ze(
|
|
457
|
+
F(T.$slots, "option", ze(Ve(ee)))
|
|
457
458
|
]),
|
|
458
459
|
key: "0"
|
|
459
460
|
} : void 0
|
|
@@ -484,7 +485,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
484
485
|
} : T.$slots.value && M.value ? {
|
|
485
486
|
name: "readonly",
|
|
486
487
|
fn: f(() => [
|
|
487
|
-
y("span",
|
|
488
|
+
y("span", oa, [
|
|
488
489
|
F(T.$slots, "value", {
|
|
489
490
|
option: M.value
|
|
490
491
|
})
|
|
@@ -494,16 +495,16 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
494
495
|
} : void 0
|
|
495
496
|
]), 1040, ["value", "row-layout"]));
|
|
496
497
|
}
|
|
497
|
-
}),
|
|
498
|
+
}), na = {
|
|
498
499
|
key: 0,
|
|
499
500
|
class: "whitespace-normal"
|
|
500
|
-
},
|
|
501
|
+
}, sa = { class: "whitespace-nowrap" }, ra = { class: "whitespace-nowrap" }, ia = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ua = ["aria-label", "onClick"], da = {
|
|
501
502
|
class: "-m-3 flex",
|
|
502
503
|
"data-test": "date-time-popover"
|
|
503
|
-
},
|
|
504
|
+
}, ca = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, fa = {
|
|
504
505
|
key: 0,
|
|
505
506
|
class: "border-t border-border-separator pt-2.5"
|
|
506
|
-
},
|
|
507
|
+
}, ma = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, va = ["for"], pa = ["id", "value", "placeholder", "aria-invalid"], ba = ["onClick"], ro = /* @__PURE__ */ G({
|
|
507
508
|
__name: "DateTimeField",
|
|
508
509
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
509
510
|
label: {},
|
|
@@ -527,29 +528,29 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
527
528
|
modelModifiers: {}
|
|
528
529
|
}),
|
|
529
530
|
emits: /* @__PURE__ */ le(["focus", "blur"], ["update:modelValue"]),
|
|
530
|
-
setup(
|
|
531
|
-
const t =
|
|
531
|
+
setup(r, { expose: a, emit: e }) {
|
|
532
|
+
const t = r, n = re(r, "modelValue"), o = e, { t: c } = oe(), i = St(), p = Re(), k = U("input"), w = U("popover"), $ = U("calendar"), s = U("sheet"), m = h(() => ({ min: t.min?.slice(0, 10), max: t.max?.slice(0, 10), disabled: t.disabledDates })), b = h(() => t.min && t.min.length === 10 ? `${t.min}T00:00` : t.min), C = h(() => t.max && t.max.length === 10 ? `${t.max}T23:59` : t.max), q = (B, d) => !xt(d, { disabled: t.disabledDates }) && (!b.value || B >= b.value) && (!C.value || B <= C.value), x = $t(() => m.value), O = Ft(() => t.minuteStep), R = h(() => $e(n.value));
|
|
532
533
|
function X(B) {
|
|
533
|
-
const { date: d, time:
|
|
534
|
+
const { date: d, time: z } = Ct(B), v = d === null ? R.value.day ?? Se() : x.parse(d);
|
|
534
535
|
if (!v) return { error: x.invalidMessage() };
|
|
535
|
-
let
|
|
536
|
-
if (
|
|
537
|
-
const N = O.parse(
|
|
536
|
+
let V = R.value.time ?? Le(t.minuteStep);
|
|
537
|
+
if (z !== null) {
|
|
538
|
+
const N = O.parse(z);
|
|
538
539
|
if ("error" in N) return N;
|
|
539
|
-
|
|
540
|
+
V = N.value;
|
|
540
541
|
}
|
|
541
|
-
const S = _e(v,
|
|
542
|
+
const S = _e(v, V);
|
|
542
543
|
return q(S, v) ? { value: S } : { error: x.unavailableMessage() };
|
|
543
544
|
}
|
|
544
|
-
const M = Ne({ model:
|
|
545
|
+
const M = Ne({ model: n, display: (B) => `${i.date($e(B).day)} ${$e(B).time ?? ""}`.trim(), parse: X }), ne = h({
|
|
545
546
|
get: () => R.value.time,
|
|
546
547
|
set: (B) => {
|
|
547
|
-
B &&
|
|
548
|
+
B && pt(B) && (n.value = _e(R.value.day ?? Se(), B));
|
|
548
549
|
}
|
|
549
|
-
}), Q = Ne({ model: ne, display: (B) => B, parse: O.parse }), te =
|
|
550
|
+
}), Q = Ne({ model: ne, display: (B) => B, parse: O.parse }), te = _t(() => t.quickPicks ?? (p.value ? void 0 : []), () => p.value, () => m.value), fe = h(() => t.error || M.message.value || Q.message.value), me = h(() => n.value ? i.dateTime(n.value) : null), T = De("date", () => fe.value ? "error" : t.disabled ? "locked" : "rest"), K = h(() => {
|
|
550
551
|
const B = M.typed.value;
|
|
551
552
|
return B ? $e(B).day ?? null : null;
|
|
552
|
-
}), E = h(() => K.value ?? (
|
|
553
|
+
}), E = h(() => K.value ?? (bt(R.value.day) ? R.value.day : null)), ae = h(() => M.typed.value ? $e(M.typed.value).time : R.value.time);
|
|
553
554
|
function se(B) {
|
|
554
555
|
B && M.set(_e(B, R.value.time ?? Le(t.minuteStep)));
|
|
555
556
|
}
|
|
@@ -559,54 +560,54 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
559
560
|
function ke(B) {
|
|
560
561
|
M.set(_e(Se(), Le(t.minuteStep))), B();
|
|
561
562
|
}
|
|
562
|
-
const we =
|
|
563
|
+
const we = qe();
|
|
563
564
|
async function Y(B) {
|
|
564
565
|
t.disabled || (w.value?.present(), B && (await he(), await he(), $.value?.focus()));
|
|
565
566
|
}
|
|
566
567
|
function ve(B) {
|
|
567
568
|
B.key === "Enter" ? (M.commit(), w.value?.dismiss()) : B.key === "ArrowDown" && (B.preventDefault(), Y(!0));
|
|
568
569
|
}
|
|
569
|
-
return a({ focus: () => k.value?.focus() }), (B, d) => (u(), D(ge, W({ ...
|
|
570
|
+
return a({ focus: () => k.value?.focus() }), (B, d) => (u(), D(ge, W({ ...l(de)(t), error: fe.value }, {
|
|
570
571
|
value: me.value,
|
|
571
572
|
"value-style": "numeric"
|
|
572
573
|
}), J({
|
|
573
|
-
default: f(({ id:
|
|
574
|
-
|
|
575
|
-
j(Xe, W({ id:
|
|
574
|
+
default: f(({ id: z, describedby: v, invalid: V }) => [
|
|
575
|
+
l(p) ? (u(), g(ie, { key: 0 }, [
|
|
576
|
+
j(Xe, W({ id: z, "aria-describedby": v }, {
|
|
576
577
|
disabled: t.disabled,
|
|
577
|
-
invalid:
|
|
578
|
-
placeholder:
|
|
579
|
-
onClick: d[0] || (d[0] = (S) =>
|
|
578
|
+
invalid: V,
|
|
579
|
+
placeholder: l(c)("core.form.select.choose"),
|
|
580
|
+
onClick: d[0] || (d[0] = (S) => s.value?.present())
|
|
580
581
|
}), {
|
|
581
582
|
default: f(() => [
|
|
582
|
-
|
|
583
|
-
y("span",
|
|
583
|
+
n.value ? (u(), g("span", na, [
|
|
584
|
+
y("span", sa, _(l(i).date(R.value.day)), 1),
|
|
584
585
|
d[8] || (d[8] = H(_(" "), -1)),
|
|
585
|
-
y("span",
|
|
586
|
+
y("span", ra, _(R.value.time), 1)
|
|
586
587
|
])) : L("", !0)
|
|
587
588
|
]),
|
|
588
589
|
_: 1
|
|
589
590
|
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
590
|
-
j(
|
|
591
|
+
j(yt, {
|
|
591
592
|
ref_key: "sheet",
|
|
592
|
-
ref:
|
|
593
|
-
title: t.label ??
|
|
593
|
+
ref: s,
|
|
594
|
+
title: t.label ?? l(c)("core.form.date.calendar"),
|
|
594
595
|
mode: "datetime",
|
|
595
|
-
"model-value":
|
|
596
|
+
"model-value": n.value,
|
|
596
597
|
min: m.value.min,
|
|
597
598
|
max: m.value.max,
|
|
598
599
|
"disabled-dates": t.disabledDates,
|
|
599
600
|
"open-on": t.openOn,
|
|
600
|
-
shortcuts:
|
|
601
|
+
shortcuts: l(te),
|
|
601
602
|
step: t.minuteStep,
|
|
602
603
|
clearable: !t.required,
|
|
603
|
-
"onUpdate:modelValue":
|
|
604
|
+
"onUpdate:modelValue": l(M).set
|
|
604
605
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
605
|
-
], 64)) : (u(), D(
|
|
606
|
+
], 64)) : (u(), D(Me, {
|
|
606
607
|
key: 1,
|
|
607
608
|
ref_key: "popover",
|
|
608
609
|
ref: w,
|
|
609
|
-
label: t.label ??
|
|
610
|
+
label: t.label ?? l(c)("core.form.date.calendar"),
|
|
610
611
|
width: "auto",
|
|
611
612
|
placement: "bottom-start",
|
|
612
613
|
arrow: !1,
|
|
@@ -614,10 +615,10 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
614
615
|
}, {
|
|
615
616
|
trigger: f(({ attrs: S, presented: N }) => [
|
|
616
617
|
y("div", {
|
|
617
|
-
class: I(["inline-flex max-w-full items-center gap-2",
|
|
618
|
+
class: I(["inline-flex max-w-full items-center gap-2", l(T)])
|
|
618
619
|
}, [
|
|
619
620
|
y("input", W({
|
|
620
|
-
id:
|
|
621
|
+
id: z,
|
|
621
622
|
ref_key: "input",
|
|
622
623
|
ref: k
|
|
623
624
|
}, S, {
|
|
@@ -626,41 +627,41 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
626
627
|
autocomplete: "off",
|
|
627
628
|
size: "20",
|
|
628
629
|
name: t.name,
|
|
629
|
-
value:
|
|
630
|
-
placeholder:
|
|
630
|
+
value: l(M).text.value,
|
|
631
|
+
placeholder: l(x).placeholder.value,
|
|
631
632
|
disabled: t.disabled,
|
|
632
633
|
required: t.required,
|
|
633
634
|
"aria-required": t.required || void 0,
|
|
634
|
-
"aria-invalid":
|
|
635
|
+
"aria-invalid": V || void 0,
|
|
635
636
|
"aria-describedby": v,
|
|
636
637
|
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",
|
|
637
|
-
onInput: d[1] || (d[1] = (P) =>
|
|
638
|
+
onInput: d[1] || (d[1] = (P) => l(M).input(P.target.value)),
|
|
638
639
|
onFocus: d[2] || (d[2] = (P) => o("focus", P)),
|
|
639
640
|
onBlur: d[3] || (d[3] = (P) => {
|
|
640
|
-
|
|
641
|
+
l(M).commit(), o("blur", P);
|
|
641
642
|
}),
|
|
642
643
|
onKeydown: ve,
|
|
643
644
|
onClick: d[4] || (d[4] = (P) => Y(!1))
|
|
644
|
-
}), null, 16,
|
|
645
|
+
}), null, 16, ia),
|
|
645
646
|
t.disabled ? L("", !0) : (u(), g("button", {
|
|
646
647
|
key: 0,
|
|
647
648
|
type: "button",
|
|
648
649
|
tabindex: "-1",
|
|
649
|
-
"aria-label":
|
|
650
|
+
"aria-label": l(c)("core.form.date.open"),
|
|
650
651
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
651
652
|
onClick: (P) => N ? w.value?.dismiss() : Y(!0)
|
|
652
653
|
}, [
|
|
653
|
-
j(
|
|
654
|
+
j(l(Z), {
|
|
654
655
|
name: "calendarLine",
|
|
655
656
|
size: 18
|
|
656
657
|
})
|
|
657
|
-
], 8,
|
|
658
|
+
], 8, ua))
|
|
658
659
|
], 2)
|
|
659
660
|
]),
|
|
660
661
|
default: f(({ dismiss: S }) => [
|
|
661
|
-
y("div",
|
|
662
|
-
y("div",
|
|
663
|
-
j(
|
|
662
|
+
y("div", da, [
|
|
663
|
+
y("div", ca, [
|
|
664
|
+
j(gt, {
|
|
664
665
|
ref_key: "calendar",
|
|
665
666
|
ref: $,
|
|
666
667
|
"model-value": E.value,
|
|
@@ -670,33 +671,33 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
670
671
|
"open-on": t.openOn,
|
|
671
672
|
"onUpdate:modelValue": se
|
|
672
673
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
673
|
-
|
|
674
|
-
j(
|
|
675
|
-
items:
|
|
674
|
+
l(te).length > 0 ? (u(), g("div", fa, [
|
|
675
|
+
j(ht, {
|
|
676
|
+
items: l(te),
|
|
676
677
|
selected: E.value,
|
|
677
678
|
onPick: se
|
|
678
679
|
}, null, 8, ["items", "selected"])
|
|
679
680
|
])) : L("", !0)
|
|
680
681
|
]),
|
|
681
|
-
y("div",
|
|
682
|
+
y("div", ma, [
|
|
682
683
|
y("label", {
|
|
683
|
-
for:
|
|
684
|
+
for: l(we),
|
|
684
685
|
class: "text-footnote font-semibold text-content-muted"
|
|
685
|
-
}, _(
|
|
686
|
+
}, _(l(c)("core.form.time.label")), 9, va),
|
|
686
687
|
y("input", {
|
|
687
|
-
id:
|
|
688
|
+
id: l(we),
|
|
688
689
|
type: "text",
|
|
689
690
|
autocomplete: "off",
|
|
690
691
|
inputmode: "numeric",
|
|
691
|
-
value:
|
|
692
|
-
placeholder:
|
|
693
|
-
"aria-invalid":
|
|
692
|
+
value: l(Q).text.value,
|
|
693
|
+
placeholder: l(O).placeholder.value,
|
|
694
|
+
"aria-invalid": l(Q).message.value ? !0 : void 0,
|
|
694
695
|
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",
|
|
695
|
-
onInput: d[5] || (d[5] = (N) =>
|
|
696
|
-
onBlur: d[6] || (d[6] = (N) =>
|
|
697
|
-
onKeydown: d[7] || (d[7] = Ce(pe((N) =>
|
|
698
|
-
}, null, 40,
|
|
699
|
-
j(
|
|
696
|
+
onInput: d[5] || (d[5] = (N) => l(Q).input(N.target.value)),
|
|
697
|
+
onBlur: d[6] || (d[6] = (N) => l(Q).commit()),
|
|
698
|
+
onKeydown: d[7] || (d[7] = Ce(pe((N) => l(Q).commit(), ["prevent"]), ["enter"]))
|
|
699
|
+
}, null, 40, pa),
|
|
700
|
+
j(kt, {
|
|
700
701
|
"model-value": ae.value,
|
|
701
702
|
step: t.minuteStep,
|
|
702
703
|
"onUpdate:modelValue": ee
|
|
@@ -705,7 +706,7 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
705
706
|
type: "button",
|
|
706
707
|
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",
|
|
707
708
|
onClick: (N) => ke(S)
|
|
708
|
-
}, _(
|
|
709
|
+
}, _(l(c)("core.form.time.now")), 9, ba)
|
|
709
710
|
])
|
|
710
711
|
])
|
|
711
712
|
]),
|
|
@@ -738,25 +739,25 @@ const Kt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Pt = ["name
|
|
|
738
739
|
]), 1040, ["value"]));
|
|
739
740
|
}
|
|
740
741
|
});
|
|
741
|
-
function Qe(
|
|
742
|
+
function Qe(r, a = {}) {
|
|
742
743
|
const e = a.accept ?? [];
|
|
743
744
|
if (e.length > 0) {
|
|
744
|
-
const t =
|
|
745
|
+
const t = r.name.lastIndexOf("."), n = t === -1 ? "" : r.name.slice(t).toLowerCase(), o = r.type.toLowerCase();
|
|
745
746
|
if (!e.some((i) => {
|
|
746
747
|
const p = i.trim().toLowerCase();
|
|
747
|
-
return p.startsWith(".") ? p ===
|
|
748
|
+
return p.startsWith(".") ? p === n : p.endsWith("/*") ? o.startsWith(p.slice(0, -1)) : p === o;
|
|
748
749
|
})) return "invalid_type";
|
|
749
750
|
}
|
|
750
|
-
return (a.maxSize ?? 0) > 0 &&
|
|
751
|
+
return (a.maxSize ?? 0) > 0 && r.size > (a.maxSize ?? 0) ? "too_large" : null;
|
|
751
752
|
}
|
|
752
|
-
function Fe(
|
|
753
|
-
return
|
|
753
|
+
function Fe(r) {
|
|
754
|
+
return r < 1024 ? `${r} B` : r < 1024 * 1024 ? `${Math.round(r / 1024)} KB` : `${(r / (1024 * 1024)).toFixed(r % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
754
755
|
}
|
|
755
|
-
const
|
|
756
|
+
const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], ha = {
|
|
756
757
|
key: 0,
|
|
757
758
|
class: "flex items-center gap-3 rounded-group bg-fill p-3",
|
|
758
759
|
"data-test": "file-selected"
|
|
759
|
-
},
|
|
760
|
+
}, ka = { class: "min-w-0 flex-1" }, xa = { class: "truncate text-body font-medium text-content-strong" }, wa = { class: "text-footnote text-content-muted" }, $a = ["disabled", "aria-label", "title"], _a = ["aria-disabled"], Ca = { class: "font-semibold text-content-link" }, Sa = { class: "text-content-muted" }, io = /* @__PURE__ */ G({
|
|
760
761
|
__name: "FileField",
|
|
761
762
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
762
763
|
label: {},
|
|
@@ -777,28 +778,28 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
777
778
|
modelModifiers: {}
|
|
778
779
|
}),
|
|
779
780
|
emits: ["update:modelValue"],
|
|
780
|
-
setup(
|
|
781
|
-
const e =
|
|
781
|
+
setup(r, { expose: a }) {
|
|
782
|
+
const e = r, t = re(r, "modelValue"), { t: n } = oe(), o = U("chooser"), c = A(!1), i = A(null), p = h(() => {
|
|
782
783
|
if (e.hint) return e.hint;
|
|
783
784
|
const $ = [];
|
|
784
|
-
return e.accept.length && $.push(
|
|
785
|
+
return e.accept.length && $.push(n("core.form.file.allowed", { formats: e.accept.map((s) => s.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && $.push(n("core.form.file.max_size", { size: Fe(e.maxSize) })), $.join(" · ") || void 0;
|
|
785
786
|
});
|
|
786
787
|
function k($) {
|
|
787
788
|
if (!$) return;
|
|
788
|
-
const
|
|
789
|
-
|
|
789
|
+
const s = Qe($, { accept: e.accept, maxSize: e.maxSize });
|
|
790
|
+
s ? (i.value = s === "invalid_type" ? n("core.form.file.invalid_type") : n("core.form.file.too_large", { size: Fe(e.maxSize) }), t.value = null) : (i.value = null, t.value = $);
|
|
790
791
|
}
|
|
791
792
|
function w() {
|
|
792
793
|
t.value = null, i.value = null;
|
|
793
794
|
}
|
|
794
795
|
return ye(t, ($) => {
|
|
795
796
|
!$ && o.value && (o.value.value = "");
|
|
796
|
-
}), a({ clear: w }), ($,
|
|
797
|
+
}), a({ clear: w }), ($, s) => (u(), D(ge, W({ ...l(de)(e), hint: p.value, error: i.value ?? e.error }, {
|
|
797
798
|
value: t.value?.name ?? null,
|
|
798
799
|
"row-layout": "stacked"
|
|
799
800
|
}), J({
|
|
800
801
|
default: f(({ id: m, describedby: b, invalid: C }) => [
|
|
801
|
-
y("div",
|
|
802
|
+
y("div", ya, [
|
|
802
803
|
y("input", {
|
|
803
804
|
id: m,
|
|
804
805
|
ref_key: "chooser",
|
|
@@ -810,26 +811,26 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
810
811
|
disabled: e.disabled,
|
|
811
812
|
"aria-describedby": b,
|
|
812
813
|
"aria-invalid": C || void 0,
|
|
813
|
-
onChange:
|
|
814
|
-
}, null, 40,
|
|
815
|
-
t.value ? (u(), g("div",
|
|
816
|
-
y("div",
|
|
817
|
-
y("p",
|
|
818
|
-
y("p",
|
|
814
|
+
onChange: s[0] || (s[0] = (q) => k(q.target.files?.[0]))
|
|
815
|
+
}, null, 40, ga),
|
|
816
|
+
t.value ? (u(), g("div", ha, [
|
|
817
|
+
y("div", ka, [
|
|
818
|
+
y("p", xa, _(t.value.name), 1),
|
|
819
|
+
y("p", wa, _(l(Fe)(t.value.size)), 1)
|
|
819
820
|
]),
|
|
820
821
|
y("button", {
|
|
821
822
|
type: "button",
|
|
822
823
|
disabled: e.disabled,
|
|
823
|
-
"aria-label": n
|
|
824
|
-
title: n
|
|
824
|
+
"aria-label": l(n)("core.form.file.remove"),
|
|
825
|
+
title: l(n)("core.form.file.remove"),
|
|
825
826
|
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",
|
|
826
827
|
onClick: w
|
|
827
828
|
}, [
|
|
828
|
-
j(
|
|
829
|
+
j(l(Z), {
|
|
829
830
|
name: "close",
|
|
830
831
|
size: 14
|
|
831
832
|
})
|
|
832
|
-
], 8,
|
|
833
|
+
], 8, $a)
|
|
833
834
|
])) : e.variant === "dropzone" ? (u(), g("div", {
|
|
834
835
|
key: 1,
|
|
835
836
|
role: "button",
|
|
@@ -837,26 +838,26 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
837
838
|
"data-test": "file-dropzone",
|
|
838
839
|
"aria-disabled": e.disabled || void 0,
|
|
839
840
|
class: I(["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", c.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
840
|
-
onClick:
|
|
841
|
+
onClick: s[1] || (s[1] = (q) => !e.disabled && o.value?.click()),
|
|
841
842
|
onKeydown: [
|
|
842
|
-
|
|
843
|
-
|
|
843
|
+
s[2] || (s[2] = Ce(pe((q) => !e.disabled && o.value?.click(), ["prevent"]), ["enter"])),
|
|
844
|
+
s[3] || (s[3] = Ce(pe((q) => !e.disabled && o.value?.click(), ["prevent"]), ["space"]))
|
|
844
845
|
],
|
|
845
|
-
onDragover:
|
|
846
|
-
onDragleave:
|
|
847
|
-
onDrop:
|
|
846
|
+
onDragover: s[4] || (s[4] = pe((q) => c.value = !0, ["prevent"])),
|
|
847
|
+
onDragleave: s[5] || (s[5] = pe((q) => c.value = !1, ["prevent"])),
|
|
848
|
+
onDrop: s[6] || (s[6] = pe((q) => {
|
|
848
849
|
c.value = !1, e.disabled || k(q.dataTransfer?.files?.[0]);
|
|
849
850
|
}, ["prevent"]))
|
|
850
851
|
}, [
|
|
851
|
-
y("span",
|
|
852
|
-
y("span",
|
|
853
|
-
], 42,
|
|
852
|
+
y("span", Ca, _(l(n)("core.form.file.choose")), 1),
|
|
853
|
+
y("span", Sa, _(" " + l(n)("core.form.file.drop")), 1)
|
|
854
|
+
], 42, _a)) : (u(), D(be, {
|
|
854
855
|
key: 2,
|
|
855
856
|
disabled: e.disabled,
|
|
856
|
-
onClick:
|
|
857
|
+
onClick: s[7] || (s[7] = (q) => o.value?.click())
|
|
857
858
|
}, {
|
|
858
859
|
default: f(() => [
|
|
859
|
-
H(_(n
|
|
860
|
+
H(_(l(n)("core.form.file.choose")), 1)
|
|
860
861
|
]),
|
|
861
862
|
_: 1
|
|
862
863
|
}, 8, ["disabled"]))
|
|
@@ -887,7 +888,7 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
887
888
|
} : void 0
|
|
888
889
|
]), 1040, ["value"]));
|
|
889
890
|
}
|
|
890
|
-
}),
|
|
891
|
+
}), Fa = ["disabled"], uo = /* @__PURE__ */ G({
|
|
891
892
|
__name: "FormGroupButton",
|
|
892
893
|
props: {
|
|
893
894
|
label: {},
|
|
@@ -895,18 +896,18 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
895
896
|
disabled: { type: Boolean, default: !1 }
|
|
896
897
|
},
|
|
897
898
|
emits: ["click"],
|
|
898
|
-
setup(
|
|
899
|
-
const e =
|
|
900
|
-
return (
|
|
899
|
+
setup(r, { emit: a }) {
|
|
900
|
+
const e = r, t = a;
|
|
901
|
+
return (n, o) => (u(), D(Bt, null, {
|
|
901
902
|
default: f(() => [
|
|
902
|
-
j(
|
|
903
|
+
j(it, { layout: "stacked" }, {
|
|
903
904
|
default: f(() => [
|
|
904
905
|
y("button", {
|
|
905
906
|
type: "button",
|
|
906
907
|
disabled: e.disabled,
|
|
907
908
|
class: I(["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"]),
|
|
908
909
|
onClick: o[0] || (o[0] = (c) => t("click"))
|
|
909
|
-
}, _(e.label), 11,
|
|
910
|
+
}, _(e.label), 11, Fa)
|
|
910
911
|
]),
|
|
911
912
|
_: 1
|
|
912
913
|
})
|
|
@@ -914,29 +915,29 @@ const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describe
|
|
|
914
915
|
_: 1
|
|
915
916
|
}));
|
|
916
917
|
}
|
|
917
|
-
}),
|
|
918
|
+
}), co = /* @__PURE__ */ G({
|
|
918
919
|
__name: "FormIndent",
|
|
919
|
-
setup(
|
|
920
|
-
return
|
|
920
|
+
setup(r) {
|
|
921
|
+
return at(ut, dt() + 1), (a, e) => F(a.$slots, "default");
|
|
921
922
|
}
|
|
922
923
|
});
|
|
923
|
-
function
|
|
924
|
-
return a.filter((e) => (
|
|
924
|
+
function Ba(r, a) {
|
|
925
|
+
return a.filter((e) => (r?.[e] ?? "").trim() === "");
|
|
925
926
|
}
|
|
926
|
-
const
|
|
927
|
+
const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], za = ["id", "value", "lang", "name", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Va = {
|
|
927
928
|
key: 0,
|
|
928
929
|
class: "mt-1.5 flex items-center gap-2"
|
|
929
|
-
},
|
|
930
|
+
}, qa = {
|
|
930
931
|
key: 0,
|
|
931
932
|
class: "flex-1 text-footnote text-status-warning-content",
|
|
932
933
|
"data-test": "i18n-missing"
|
|
933
|
-
},
|
|
934
|
+
}, Da = {
|
|
934
935
|
key: 1,
|
|
935
936
|
class: "flex-1"
|
|
936
|
-
},
|
|
937
|
+
}, Ra = ["aria-label"], Ma = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"], ja = ["data-state"], Ia = { class: "w-full" }, Oa = { class: "whitespace-pre-line break-words text-body text-content-strong" }, Ea = ["aria-expanded"], Na = { class: "flex-1" }, Ga = {
|
|
937
938
|
key: 0,
|
|
938
939
|
class: "mt-1 flex flex-col gap-1.5"
|
|
939
|
-
},
|
|
940
|
+
}, Ka = ["title"], fo = /* @__PURE__ */ G({
|
|
940
941
|
__name: "I18nField",
|
|
941
942
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
942
943
|
label: {},
|
|
@@ -961,25 +962,25 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
961
962
|
modelModifiers: {}
|
|
962
963
|
}),
|
|
963
964
|
emits: ["update:modelValue"],
|
|
964
|
-
setup(
|
|
965
|
-
const e =
|
|
965
|
+
setup(r, { expose: a }) {
|
|
966
|
+
const e = r, t = re(r, "modelValue"), { t: n, locale: o, availableLocales: c } = oe(), i = Ue(Tt, null), p = qe(), k = U("field"), w = U("root"), { editable: $ } = Je(e), s = De(e.multiline ? "area" : "text", () => e.error || ae.value ? "error" : e.disabled ? "locked" : "rest"), m = h(() => e.locales ?? i?.locales ?? c), b = h(() => e.defaultLocale ?? m.value[0] ?? ""), C = h(() => m.value.includes(b.value) ? [b.value, ...m.value.filter((v) => v !== b.value)] : m.value), q = A(null), x = h(() => q.value !== null && C.value.includes(q.value) ? q.value : C.value.includes(o.value) ? o.value : b.value), O = (v) => t.value[v] ?? "", R = (v) => O(v).trim() !== "", X = (v) => v.toUpperCase();
|
|
966
967
|
function M(v) {
|
|
967
968
|
try {
|
|
968
|
-
return new Intl.DisplayNames([
|
|
969
|
+
return new Intl.DisplayNames([Lt(o.value)], { type: "language" }).of(v) ?? X(v);
|
|
969
970
|
} catch {
|
|
970
971
|
return X(v);
|
|
971
972
|
}
|
|
972
973
|
}
|
|
973
974
|
const ne = (v) => v.map(M).join(", ");
|
|
974
|
-
function Q(v,
|
|
975
|
-
t.value = { ...t.value, [v]:
|
|
975
|
+
function Q(v, V) {
|
|
976
|
+
t.value = { ...t.value, [v]: V };
|
|
976
977
|
}
|
|
977
978
|
const te = (v) => `${p}-tab-${v}`;
|
|
978
|
-
function fe(v,
|
|
979
|
-
q.value = v,
|
|
979
|
+
function fe(v, V) {
|
|
980
|
+
q.value = v, V && he(() => k.value?.focus());
|
|
980
981
|
}
|
|
981
|
-
function me(v,
|
|
982
|
-
const S = C.value.length - 1, N = { ArrowRight:
|
|
982
|
+
function me(v, V) {
|
|
983
|
+
const S = C.value.length - 1, N = { ArrowRight: V + 1, ArrowLeft: V - 1, Home: 0, End: S }[v.key];
|
|
983
984
|
if (N === void 0) return;
|
|
984
985
|
v.preventDefault();
|
|
985
986
|
const P = C.value[(N + C.value.length) % C.value.length];
|
|
@@ -989,14 +990,14 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
989
990
|
function K(v) {
|
|
990
991
|
w.value?.contains(v.relatedTarget) || (T.value = !0);
|
|
991
992
|
}
|
|
992
|
-
const E = h(() =>
|
|
993
|
+
const E = h(() => Ba(t.value, e.requiredLocales)), ae = h(() => T.value && E.value.length > 0 ? n("core.form.i18n.required", { languages: ne(E.value) }) : void 0), se = h(() => e.requiredLocales.length > 0 ? E.value.length === 0 : C.value.some(R)), ee = h(() => C.value.filter((v) => !R(v) && !(ae.value && E.value.includes(v)))), ke = h(() => R(b.value) && C.value.some((v) => v !== b.value && !R(v)));
|
|
993
994
|
function we() {
|
|
994
995
|
const v = O(b.value);
|
|
995
|
-
t.value = { ...t.value, ...Object.fromEntries(C.value.filter((
|
|
996
|
+
t.value = { ...t.value, ...Object.fromEntries(C.value.filter((V) => !R(V)).map((V) => [V, v])) };
|
|
996
997
|
}
|
|
997
|
-
const Y = h(() => [o.value, b.value, ...C.value].find((v) => C.value.includes(v) && R(v))), ve = h(() => C.value.filter((v) => v !== Y.value)), B = h(() => ve.value.filter(R).length), d = A(!1),
|
|
998
|
-
return a({ focus: () => k.value?.focus() }), (v,
|
|
999
|
-
value:
|
|
998
|
+
const Y = h(() => [o.value, b.value, ...C.value].find((v) => C.value.includes(v) && R(v))), ve = h(() => C.value.filter((v) => v !== Y.value)), B = h(() => ve.value.filter(R).length), d = A(!1), z = h(() => e.label && !$.value && Y.value ? `${e.label} · ${X(Y.value)}` : e.label);
|
|
999
|
+
return a({ focus: () => k.value?.focus() }), (v, V) => (u(), D(ge, W({ ...l(de)(e), label: z.value, error: e.error ?? ae.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
1000
|
+
value: l($) ? se.value ? "written" : null : Y.value ? O(Y.value) : null,
|
|
1000
1001
|
"row-layout": "stacked"
|
|
1001
1002
|
}), J({
|
|
1002
1003
|
default: f(({ id: S, describedby: N, invalid: P }) => [
|
|
@@ -1007,12 +1008,12 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1007
1008
|
onFocusout: K
|
|
1008
1009
|
}, [
|
|
1009
1010
|
y("div", {
|
|
1010
|
-
id: `${
|
|
1011
|
+
id: `${l(p)}-panel`,
|
|
1011
1012
|
role: "tabpanel",
|
|
1012
1013
|
"aria-labelledby": te(x.value)
|
|
1013
1014
|
}, [
|
|
1014
1015
|
y("div", {
|
|
1015
|
-
class: I(["w-full",
|
|
1016
|
+
class: I(["w-full", l(s)])
|
|
1016
1017
|
}, [
|
|
1017
1018
|
e.multiline ? (u(), g("textarea", {
|
|
1018
1019
|
key: 0,
|
|
@@ -1031,8 +1032,8 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1031
1032
|
"aria-describedby": N,
|
|
1032
1033
|
"data-test": "i18n-input",
|
|
1033
1034
|
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",
|
|
1034
|
-
onInput:
|
|
1035
|
-
}, null, 40,
|
|
1035
|
+
onInput: V[0] || (V[0] = (Be) => Q(x.value, Be.target.value))
|
|
1036
|
+
}, null, 40, Ta)) : (u(), g("input", {
|
|
1036
1037
|
key: 1,
|
|
1037
1038
|
id: S,
|
|
1038
1039
|
ref_key: "field",
|
|
@@ -1049,26 +1050,26 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1049
1050
|
"aria-describedby": N,
|
|
1050
1051
|
"data-test": "i18n-input",
|
|
1051
1052
|
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",
|
|
1052
|
-
onInput:
|
|
1053
|
+
onInput: V[1] || (V[1] = (Be) => Q(x.value, Be.target.value))
|
|
1053
1054
|
}, null, 40, za))
|
|
1054
1055
|
], 2)
|
|
1055
|
-
], 8,
|
|
1056
|
-
ee.value.length > 0 || ke.value ? (u(), g("div",
|
|
1057
|
-
ee.value.length > 0 ? (u(), g("p",
|
|
1056
|
+
], 8, La),
|
|
1057
|
+
ee.value.length > 0 || ke.value ? (u(), g("div", Va, [
|
|
1058
|
+
ee.value.length > 0 ? (u(), g("p", qa, _(l(n)("core.form.i18n.missing", { languages: ne(ee.value) })), 1)) : (u(), g("span", Da)),
|
|
1058
1059
|
ke.value && !e.disabled ? (u(), g("button", {
|
|
1059
1060
|
key: 2,
|
|
1060
1061
|
type: "button",
|
|
1061
1062
|
"data-test": "i18n-copy",
|
|
1062
1063
|
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",
|
|
1063
1064
|
onClick: we
|
|
1064
|
-
}, _(n
|
|
1065
|
+
}, _(l(n)("core.form.i18n.copy", { language: X(b.value) })), 1)) : L("", !0)
|
|
1065
1066
|
])) : L("", !0)
|
|
1066
1067
|
], 544)
|
|
1067
1068
|
]),
|
|
1068
1069
|
labelTrailing: f(() => [
|
|
1069
1070
|
y("div", {
|
|
1070
1071
|
role: "tablist",
|
|
1071
|
-
"aria-label": n
|
|
1072
|
+
"aria-label": l(n)("core.form.i18n.languages"),
|
|
1072
1073
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
1073
1074
|
"data-test": "i18n-tabs"
|
|
1074
1075
|
}, [
|
|
@@ -1079,8 +1080,8 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1079
1080
|
role: "tab",
|
|
1080
1081
|
"aria-selected": S === x.value,
|
|
1081
1082
|
tabindex: S === x.value ? 0 : -1,
|
|
1082
|
-
"aria-controls": `${
|
|
1083
|
-
"aria-label": n
|
|
1083
|
+
"aria-controls": `${l(p)}-panel`,
|
|
1084
|
+
"aria-label": l(n)(R(S) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: M(S) }),
|
|
1084
1085
|
title: M(S),
|
|
1085
1086
|
class: I(["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", S === x.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
1086
1087
|
onClick: (P) => fe(S, !0),
|
|
@@ -1092,32 +1093,32 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1092
1093
|
class: I(["size-1.5 rounded-full", R(S) ? "bg-status-success-solid" : ae.value && E.value.includes(S) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
1093
1094
|
"data-test": "i18n-dot",
|
|
1094
1095
|
"data-state": R(S) ? "written" : ae.value && E.value.includes(S) ? "required" : "empty"
|
|
1095
|
-
}, null, 10,
|
|
1096
|
-
], 42,
|
|
1097
|
-
], 8,
|
|
1096
|
+
}, null, 10, ja)
|
|
1097
|
+
], 42, Ma))), 128))
|
|
1098
|
+
], 8, Ra)
|
|
1098
1099
|
]),
|
|
1099
1100
|
_: 2
|
|
1100
1101
|
}, [
|
|
1101
1102
|
Y.value ? {
|
|
1102
1103
|
name: "readonly",
|
|
1103
1104
|
fn: f(() => [
|
|
1104
|
-
y("div",
|
|
1105
|
-
y("p",
|
|
1105
|
+
y("div", Ia, [
|
|
1106
|
+
y("p", Oa, _(O(Y.value)), 1),
|
|
1106
1107
|
ve.value.length > 0 ? (u(), g(ie, { key: 0 }, [
|
|
1107
1108
|
y("button", {
|
|
1108
1109
|
type: "button",
|
|
1109
1110
|
"aria-expanded": d.value,
|
|
1110
1111
|
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",
|
|
1111
|
-
onClick:
|
|
1112
|
+
onClick: V[2] || (V[2] = (S) => d.value = !d.value)
|
|
1112
1113
|
}, [
|
|
1113
|
-
y("span",
|
|
1114
|
-
j(
|
|
1114
|
+
y("span", Na, _(l(n)("core.form.i18n.more", { count: ve.value.length, filled: B.value })), 1),
|
|
1115
|
+
j(l(Z), {
|
|
1115
1116
|
name: "arrowRightSLine",
|
|
1116
1117
|
size: 16,
|
|
1117
1118
|
class: I(["shrink-0 transition-transform duration-motion-fast", d.value ? "rotate-90" : ""])
|
|
1118
1119
|
}, null, 8, ["class"])
|
|
1119
|
-
], 8,
|
|
1120
|
-
d.value ? (u(), g("dl",
|
|
1120
|
+
], 8, Ea),
|
|
1121
|
+
d.value ? (u(), g("dl", Ga, [
|
|
1121
1122
|
(u(!0), g(ie, null, xe(ve.value, (S) => (u(), g("div", {
|
|
1122
1123
|
key: S,
|
|
1123
1124
|
class: "flex gap-2 text-body"
|
|
@@ -1125,10 +1126,10 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1125
1126
|
y("dt", {
|
|
1126
1127
|
class: "w-8 shrink-0 text-footnote font-semibold leading-6 text-content-muted",
|
|
1127
1128
|
title: M(S)
|
|
1128
|
-
}, _(X(S)), 9,
|
|
1129
|
+
}, _(X(S)), 9, Ka),
|
|
1129
1130
|
y("dd", {
|
|
1130
1131
|
class: I(["min-w-0 flex-1 whitespace-pre-line break-words", R(S) ? "text-content-strong" : "text-content-disabled"])
|
|
1131
|
-
}, _(R(S) ? O(S) : n
|
|
1132
|
+
}, _(R(S) ? O(S) : l(n)("core.state.no_value")), 3)
|
|
1132
1133
|
]))), 128))
|
|
1133
1134
|
])) : L("", !0)
|
|
1134
1135
|
], 64)) : L("", !0)
|
|
@@ -1145,7 +1146,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1145
1146
|
} : void 0
|
|
1146
1147
|
]), 1040, ["value"]));
|
|
1147
1148
|
}
|
|
1148
|
-
}),
|
|
1149
|
+
}), mo = /* @__PURE__ */ G({
|
|
1149
1150
|
__name: "MoneyField",
|
|
1150
1151
|
props: /* @__PURE__ */ ue({
|
|
1151
1152
|
label: {},
|
|
@@ -1166,21 +1167,21 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1166
1167
|
width: {}
|
|
1167
1168
|
}, { ...ce, modelValue: void 0, decimals: 2, blankZero: !1, negative: !1, width: "sm" }),
|
|
1168
1169
|
emits: ["update:modelValue", "focus", "blur"],
|
|
1169
|
-
setup(
|
|
1170
|
-
const t =
|
|
1170
|
+
setup(r, { expose: a, emit: e }) {
|
|
1171
|
+
const t = r, n = e, o = U("field");
|
|
1171
1172
|
return a({ focus: () => o.value?.focus() }), (c, i) => (u(), D(zt, W({
|
|
1172
1173
|
ref_key: "field",
|
|
1173
1174
|
ref: o,
|
|
1174
1175
|
"model-value": t.modelValue,
|
|
1175
|
-
"onUpdate:modelValue": i[0] || (i[0] = (p) =>
|
|
1176
|
-
},
|
|
1176
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => n("update:modelValue", p))
|
|
1177
|
+
}, l(de)(t), {
|
|
1177
1178
|
decimals: t.decimals,
|
|
1178
1179
|
negative: t.negative,
|
|
1179
1180
|
"blank-zero": t.blankZero,
|
|
1180
1181
|
suffix: t.currency,
|
|
1181
1182
|
width: t.width,
|
|
1182
|
-
onFocus: i[1] || (i[1] = (p) =>
|
|
1183
|
-
onBlur: i[2] || (i[2] = (p) =>
|
|
1183
|
+
onFocus: i[1] || (i[1] = (p) => n("focus", p)),
|
|
1184
|
+
onBlur: i[2] || (i[2] = (p) => n("blur", p))
|
|
1184
1185
|
}), J({ _: 2 }, [
|
|
1185
1186
|
c.$slots.trailing ? {
|
|
1186
1187
|
name: "trailing",
|
|
@@ -1205,7 +1206,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1205
1206
|
} : void 0
|
|
1206
1207
|
]), 1040, ["model-value", "decimals", "negative", "blank-zero", "suffix", "width"]));
|
|
1207
1208
|
}
|
|
1208
|
-
}),
|
|
1209
|
+
}), Pa = { class: "flex flex-col gap-2" }, Aa = ["onClick"], vo = /* @__PURE__ */ G({
|
|
1209
1210
|
__name: "MonthYearField",
|
|
1210
1211
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1211
1212
|
label: {},
|
|
@@ -1228,36 +1229,36 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1228
1229
|
yearModifiers: {}
|
|
1229
1230
|
}),
|
|
1230
1231
|
emits: ["update:month", "update:year"],
|
|
1231
|
-
setup(
|
|
1232
|
-
const a =
|
|
1232
|
+
setup(r) {
|
|
1233
|
+
const a = r, e = re(r, "month"), t = re(r, "year"), { t: n } = oe(), o = h(() => e.value !== null && e.value >= 1 && e.value <= 12), c = (w, $) => n(`core.form.months.${$}.${w}`), i = h(() => o.value && t.value !== null ? n("core.form.months.with_year", { month: c(e.value, "long"), year: t.value }) : t.value !== null ? String(t.value) : o.value ? c(e.value, "long") : "");
|
|
1233
1234
|
function p(w, $) {
|
|
1234
1235
|
e.value = w.month, t.value = w.year, $();
|
|
1235
1236
|
}
|
|
1236
1237
|
function k(w) {
|
|
1237
1238
|
e.value = null, t.value = null, w();
|
|
1238
1239
|
}
|
|
1239
|
-
return (w, $) => (u(), D(ge, W(
|
|
1240
|
+
return (w, $) => (u(), D(ge, W(l(de)(a), {
|
|
1240
1241
|
value: i.value || null
|
|
1241
1242
|
}), J({
|
|
1242
|
-
default: f(({ id:
|
|
1243
|
-
j(
|
|
1243
|
+
default: f(({ id: s, describedby: m, invalid: b }) => [
|
|
1244
|
+
j(Me, {
|
|
1244
1245
|
label: a.label ?? i.value,
|
|
1245
1246
|
width: "sm",
|
|
1246
1247
|
placement: "bottom-start",
|
|
1247
1248
|
arrow: !1
|
|
1248
1249
|
}, {
|
|
1249
1250
|
trigger: f(({ toggle: C, presented: q }) => [
|
|
1250
|
-
j(Xe, W({ id:
|
|
1251
|
+
j(Xe, W({ id: s, "aria-describedby": m }, {
|
|
1251
1252
|
expanded: q,
|
|
1252
1253
|
disabled: a.disabled,
|
|
1253
1254
|
invalid: b,
|
|
1254
|
-
placeholder: a.placeholder ?? n
|
|
1255
|
+
placeholder: a.placeholder ?? l(n)("core.form.select.choose"),
|
|
1255
1256
|
onClick: C
|
|
1256
1257
|
}), {
|
|
1257
1258
|
default: f(() => [
|
|
1258
1259
|
i.value ? (u(), g(ie, { key: 0 }, [
|
|
1259
1260
|
H(_(i.value), 1),
|
|
1260
|
-
j(
|
|
1261
|
+
j(l(Z), {
|
|
1261
1262
|
name: "calendarLine",
|
|
1262
1263
|
size: 16,
|
|
1263
1264
|
class: "ml-2 shrink-0 text-content-muted"
|
|
@@ -1268,8 +1269,8 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1268
1269
|
}, 16, ["expanded", "disabled", "invalid", "placeholder", "onClick"])
|
|
1269
1270
|
]),
|
|
1270
1271
|
default: f(({ dismiss: C }) => [
|
|
1271
|
-
y("div",
|
|
1272
|
-
j(
|
|
1272
|
+
y("div", Pa, [
|
|
1273
|
+
j(wt, {
|
|
1273
1274
|
month: e.value,
|
|
1274
1275
|
year: t.value,
|
|
1275
1276
|
"min-year": a.minYear,
|
|
@@ -1281,7 +1282,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1281
1282
|
type: "button",
|
|
1282
1283
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1283
1284
|
onClick: (q) => k(C)
|
|
1284
|
-
}, _(n
|
|
1285
|
+
}, _(l(n)("core.form.select.clear")), 9, Aa)) : L("", !0)
|
|
1285
1286
|
])
|
|
1286
1287
|
]),
|
|
1287
1288
|
_: 2
|
|
@@ -1312,7 +1313,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1312
1313
|
} : void 0
|
|
1313
1314
|
]), 1040, ["value"]));
|
|
1314
1315
|
}
|
|
1315
|
-
}),
|
|
1316
|
+
}), Ha = { class: "flex min-w-0 flex-wrap items-center gap-1.5 py-0.5" }, Ua = { class: "truncate" }, Ya = ["disabled", "aria-label", "onClick"], Wa = ["id", "disabled", "aria-expanded", "aria-invalid", "aria-describedby", "aria-busy"], Ja = ["id", "disabled", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Za = { class: "max-h-72 overflow-y-auto" }, Xa = { class: "flex items-center justify-between gap-2" }, Pe = "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", po = /* @__PURE__ */ G({
|
|
1316
1317
|
__name: "MultiSelectField",
|
|
1317
1318
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1318
1319
|
label: {},
|
|
@@ -1334,44 +1335,44 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1334
1335
|
modelModifiers: {}
|
|
1335
1336
|
}),
|
|
1336
1337
|
emits: ["update:modelValue"],
|
|
1337
|
-
setup(
|
|
1338
|
-
const a =
|
|
1339
|
-
const m = e.value.filter((b) =>
|
|
1338
|
+
setup(r) {
|
|
1339
|
+
const a = r, e = re(r, "modelValue"), { t } = oe(), n = Re(), o = U("sheet"), c = A(!1), i = qt(() => a.options, (s) => {
|
|
1340
|
+
const m = e.value.filter((b) => s.some((C) => C.value === b));
|
|
1340
1341
|
m.length !== e.value.length && (e.value = m);
|
|
1341
|
-
}), p = h(() => e.value.flatMap((
|
|
1342
|
-
const m = i.known.value.find((b) => b.value ===
|
|
1342
|
+
}), p = h(() => e.value.flatMap((s) => {
|
|
1343
|
+
const m = i.known.value.find((b) => b.value === s) ?? a.selected.find((b) => b.value === s);
|
|
1343
1344
|
return m ? [m] : [];
|
|
1344
1345
|
})), k = h(() => a.placeholder ?? t("core.form.select.choose"));
|
|
1345
|
-
function w(
|
|
1346
|
-
|
|
1346
|
+
function w(s) {
|
|
1347
|
+
s !== null && (e.value = e.value.includes(s) ? e.value.filter((m) => m !== s) : [...e.value, s]);
|
|
1347
1348
|
}
|
|
1348
|
-
const $ = (
|
|
1349
|
-
return (
|
|
1349
|
+
const $ = (s) => e.value = e.value.filter((m) => m !== s);
|
|
1350
|
+
return (s, m) => (u(), D(ge, W(l(de)(a), {
|
|
1350
1351
|
value: p.value.length ? p.value.map((b) => b.label).join(", ") : null,
|
|
1351
1352
|
"row-layout": "stacked"
|
|
1352
1353
|
}), J({
|
|
1353
1354
|
default: f(({ id: b, describedby: C, invalid: q }) => [
|
|
1354
|
-
y("div",
|
|
1355
|
+
y("div", Ha, [
|
|
1355
1356
|
(u(!0), g(ie, null, xe(p.value, (x) => (u(), g("span", {
|
|
1356
1357
|
key: String(x.value),
|
|
1357
1358
|
"data-test": "chip",
|
|
1358
1359
|
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"
|
|
1359
1360
|
}, [
|
|
1360
|
-
y("span",
|
|
1361
|
+
y("span", Ua, _(x.label), 1),
|
|
1361
1362
|
y("button", {
|
|
1362
1363
|
type: "button",
|
|
1363
1364
|
disabled: a.disabled,
|
|
1364
|
-
"aria-label": `${
|
|
1365
|
+
"aria-label": `${l(t)("core.form.select.clear")}: ${x.label}`,
|
|
1365
1366
|
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",
|
|
1366
1367
|
onClick: (O) => $(x.value)
|
|
1367
1368
|
}, [
|
|
1368
|
-
j(
|
|
1369
|
+
j(l(Z), {
|
|
1369
1370
|
name: "close",
|
|
1370
1371
|
size: 12
|
|
1371
1372
|
})
|
|
1372
|
-
], 8,
|
|
1373
|
+
], 8, Ya)
|
|
1373
1374
|
]))), 128)),
|
|
1374
|
-
n
|
|
1375
|
+
l(n) ? (u(), g("button", {
|
|
1375
1376
|
key: 0,
|
|
1376
1377
|
id: b,
|
|
1377
1378
|
type: "button",
|
|
@@ -1380,18 +1381,18 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1380
1381
|
"aria-expanded": c.value,
|
|
1381
1382
|
"aria-invalid": q || void 0,
|
|
1382
1383
|
"aria-describedby": C,
|
|
1383
|
-
"aria-busy":
|
|
1384
|
+
"aria-busy": l(i).loading.value || void 0,
|
|
1384
1385
|
class: I(Pe),
|
|
1385
1386
|
onClick: m[0] || (m[0] = (x) => o.value?.present())
|
|
1386
1387
|
}, [
|
|
1387
|
-
|
|
1388
|
+
l(i).loading.value ? (u(), D(l(Z), {
|
|
1388
1389
|
key: 0,
|
|
1389
1390
|
name: "loader4Line",
|
|
1390
1391
|
size: 14,
|
|
1391
1392
|
class: "shrink-0 animate-spin"
|
|
1392
1393
|
})) : L("", !0),
|
|
1393
|
-
H(" " + _(p.value.length ?
|
|
1394
|
-
], 8,
|
|
1394
|
+
H(" " + _(p.value.length ? l(t)("core.actions.edit") : k.value), 1)
|
|
1395
|
+
], 8, Wa)) : (u(), D(Me, {
|
|
1395
1396
|
key: 1,
|
|
1396
1397
|
label: a.label ?? k.value,
|
|
1397
1398
|
width: "lg",
|
|
@@ -1408,35 +1409,35 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1408
1409
|
disabled: a.disabled,
|
|
1409
1410
|
"aria-invalid": q || void 0,
|
|
1410
1411
|
"aria-describedby": C,
|
|
1411
|
-
"aria-busy":
|
|
1412
|
+
"aria-busy": l(i).loading.value || void 0,
|
|
1412
1413
|
class: Pe,
|
|
1413
1414
|
onClick: x
|
|
1414
1415
|
}), [
|
|
1415
|
-
|
|
1416
|
+
l(i).loading.value ? (u(), D(l(Z), {
|
|
1416
1417
|
key: 0,
|
|
1417
1418
|
name: "loader4Line",
|
|
1418
1419
|
size: 14,
|
|
1419
1420
|
class: "shrink-0 animate-spin"
|
|
1420
1421
|
})) : L("", !0),
|
|
1421
|
-
H(" " + _(p.value.length ?
|
|
1422
|
-
], 16,
|
|
1422
|
+
H(" " + _(p.value.length ? l(t)("core.actions.edit") : k.value), 1)
|
|
1423
|
+
], 16, Ja)
|
|
1423
1424
|
]),
|
|
1424
1425
|
default: f(() => [
|
|
1425
|
-
y("div",
|
|
1426
|
+
y("div", Za, [
|
|
1426
1427
|
j(Ge, {
|
|
1427
|
-
options:
|
|
1428
|
-
status:
|
|
1428
|
+
options: l(i).rows.value,
|
|
1429
|
+
status: l(i).status.value,
|
|
1429
1430
|
"model-value": e.value,
|
|
1430
1431
|
multiple: "",
|
|
1431
1432
|
"search-from": a.searchFrom,
|
|
1432
1433
|
presentation: "plain",
|
|
1433
1434
|
onSelect: w,
|
|
1434
|
-
onRetry: m[1] || (m[1] = (x) =>
|
|
1435
|
+
onRetry: m[1] || (m[1] = (x) => l(i).reload())
|
|
1435
1436
|
}, J({ _: 2 }, [
|
|
1436
|
-
|
|
1437
|
+
s.$slots.option ? {
|
|
1437
1438
|
name: "option",
|
|
1438
1439
|
fn: f((x) => [
|
|
1439
|
-
F(
|
|
1440
|
+
F(s.$slots, "option", ze(Ve(x)))
|
|
1440
1441
|
]),
|
|
1441
1442
|
key: "0"
|
|
1442
1443
|
} : void 0
|
|
@@ -1446,7 +1447,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1446
1447
|
_: 2
|
|
1447
1448
|
}, 1032, ["label"]))
|
|
1448
1449
|
]),
|
|
1449
|
-
n
|
|
1450
|
+
l(n) ? (u(), D(Vt, {
|
|
1450
1451
|
key: 0,
|
|
1451
1452
|
ref_key: "sheet",
|
|
1452
1453
|
ref: o,
|
|
@@ -1456,14 +1457,14 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1456
1457
|
onDismissed: m[6] || (m[6] = (x) => c.value = !1)
|
|
1457
1458
|
}, {
|
|
1458
1459
|
footer: f(() => [
|
|
1459
|
-
y("div",
|
|
1460
|
+
y("div", Xa, [
|
|
1460
1461
|
j(be, {
|
|
1461
1462
|
prominence: "plain",
|
|
1462
1463
|
disabled: e.value.length === 0,
|
|
1463
1464
|
onClick: m[3] || (m[3] = (x) => e.value = [])
|
|
1464
1465
|
}, {
|
|
1465
1466
|
default: f(() => [
|
|
1466
|
-
H(_(
|
|
1467
|
+
H(_(l(t)("core.form.select.clear")), 1)
|
|
1467
1468
|
]),
|
|
1468
1469
|
_: 1
|
|
1469
1470
|
}, 8, ["disabled"]),
|
|
@@ -1472,7 +1473,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1472
1473
|
onClick: m[4] || (m[4] = (x) => o.value?.dismiss())
|
|
1473
1474
|
}, {
|
|
1474
1475
|
default: f(() => [
|
|
1475
|
-
H(_(
|
|
1476
|
+
H(_(l(t)("core.form.select.done")), 1)
|
|
1476
1477
|
]),
|
|
1477
1478
|
_: 1
|
|
1478
1479
|
})
|
|
@@ -1480,18 +1481,18 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1480
1481
|
]),
|
|
1481
1482
|
default: f(() => [
|
|
1482
1483
|
j(Ge, {
|
|
1483
|
-
options:
|
|
1484
|
-
status:
|
|
1484
|
+
options: l(i).rows.value,
|
|
1485
|
+
status: l(i).status.value,
|
|
1485
1486
|
"model-value": e.value,
|
|
1486
1487
|
multiple: "",
|
|
1487
1488
|
"search-from": a.searchFrom,
|
|
1488
1489
|
onSelect: w,
|
|
1489
|
-
onRetry: m[2] || (m[2] = (x) =>
|
|
1490
|
+
onRetry: m[2] || (m[2] = (x) => l(i).reload())
|
|
1490
1491
|
}, J({ _: 2 }, [
|
|
1491
|
-
|
|
1492
|
+
s.$slots.option ? {
|
|
1492
1493
|
name: "option",
|
|
1493
1494
|
fn: f((x) => [
|
|
1494
|
-
F(
|
|
1495
|
+
F(s.$slots, "option", ze(Ve(x)))
|
|
1495
1496
|
]),
|
|
1496
1497
|
key: "0"
|
|
1497
1498
|
} : void 0
|
|
@@ -1502,30 +1503,30 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1502
1503
|
]),
|
|
1503
1504
|
_: 2
|
|
1504
1505
|
}, [
|
|
1505
|
-
|
|
1506
|
+
s.$slots.trailing ? {
|
|
1506
1507
|
name: "trailing",
|
|
1507
1508
|
fn: f(() => [
|
|
1508
|
-
F(
|
|
1509
|
+
F(s.$slots, "trailing")
|
|
1509
1510
|
]),
|
|
1510
1511
|
key: "0"
|
|
1511
1512
|
} : void 0,
|
|
1512
|
-
|
|
1513
|
+
s.$slots.labelTrailing ? {
|
|
1513
1514
|
name: "labelTrailing",
|
|
1514
1515
|
fn: f(() => [
|
|
1515
|
-
F(
|
|
1516
|
+
F(s.$slots, "labelTrailing")
|
|
1516
1517
|
]),
|
|
1517
1518
|
key: "1"
|
|
1518
1519
|
} : void 0,
|
|
1519
|
-
|
|
1520
|
+
s.$slots.readonly ? {
|
|
1520
1521
|
name: "readonly",
|
|
1521
1522
|
fn: f(() => [
|
|
1522
|
-
F(
|
|
1523
|
+
F(s.$slots, "readonly")
|
|
1523
1524
|
]),
|
|
1524
1525
|
key: "2"
|
|
1525
1526
|
} : void 0
|
|
1526
1527
|
]), 1040, ["value"]));
|
|
1527
1528
|
}
|
|
1528
|
-
}),
|
|
1529
|
+
}), Qa = ["aria-label"], el = ["src"], tl = { class: "flex flex-wrap items-center gap-3" }, al = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], ll = ["aria-label"], ol = ["src"], bo = /* @__PURE__ */ G({
|
|
1529
1530
|
__name: "PhotoField",
|
|
1530
1531
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1531
1532
|
label: {},
|
|
@@ -1545,33 +1546,33 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1545
1546
|
modelModifiers: {}
|
|
1546
1547
|
}),
|
|
1547
1548
|
emits: ["update:modelValue"],
|
|
1548
|
-
setup(
|
|
1549
|
-
const a =
|
|
1549
|
+
setup(r) {
|
|
1550
|
+
const a = r, e = re(r, "modelValue"), { t } = oe(), n = U("chooser"), o = A(null), c = A(null);
|
|
1550
1551
|
function i() {
|
|
1551
1552
|
c.value && URL.revokeObjectURL(c.value), c.value = null;
|
|
1552
1553
|
}
|
|
1553
1554
|
ye(
|
|
1554
1555
|
e,
|
|
1555
|
-
(
|
|
1556
|
-
i(),
|
|
1556
|
+
(s) => {
|
|
1557
|
+
i(), s instanceof File && (c.value = URL.createObjectURL(s)), s === null && n.value && (n.value.value = "");
|
|
1557
1558
|
},
|
|
1558
1559
|
{ immediate: !0 }
|
|
1559
1560
|
), Ye(i);
|
|
1560
1561
|
const p = h(() => e.value instanceof File ? c.value : e.value), k = U("viewer"), w = h(() => p.value ? [{ src: p.value, alt: a.label ?? t("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1561
|
-
function $(
|
|
1562
|
-
if (!
|
|
1563
|
-
const m = Qe(
|
|
1564
|
-
m ? o.value = m === "invalid_type" ? t("core.form.file.invalid_type") : t("core.form.file.too_large", { size: Fe(a.maxSize) }) : (o.value = null, e.value =
|
|
1562
|
+
function $(s) {
|
|
1563
|
+
if (!s) return;
|
|
1564
|
+
const m = Qe(s, { accept: a.accept, maxSize: a.maxSize });
|
|
1565
|
+
m ? o.value = m === "invalid_type" ? t("core.form.file.invalid_type") : t("core.form.file.too_large", { size: Fe(a.maxSize) }) : (o.value = null, e.value = s);
|
|
1565
1566
|
}
|
|
1566
|
-
return (
|
|
1567
|
-
value: p.value ?
|
|
1567
|
+
return (s, m) => (u(), D(ge, W({ ...l(de)(a), error: o.value ?? a.error }, {
|
|
1568
|
+
value: p.value ? l(t)("core.form.file.choose") : null,
|
|
1568
1569
|
"row-layout": "stacked"
|
|
1569
1570
|
}), J({
|
|
1570
1571
|
readonly: f(() => [
|
|
1571
1572
|
p.value ? (u(), g("button", {
|
|
1572
1573
|
key: 0,
|
|
1573
1574
|
type: "button",
|
|
1574
|
-
"aria-label":
|
|
1575
|
+
"aria-label": l(t)("core.viewer.open"),
|
|
1575
1576
|
"data-test": "photo-open",
|
|
1576
1577
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1577
1578
|
onClick: m[0] || (m[0] = (b) => k.value?.present(0))
|
|
@@ -1580,8 +1581,8 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1580
1581
|
src: p.value,
|
|
1581
1582
|
alt: "",
|
|
1582
1583
|
class: "size-40 rounded-group object-cover"
|
|
1583
|
-
}, null, 8,
|
|
1584
|
-
], 8,
|
|
1584
|
+
}, null, 8, el)
|
|
1585
|
+
], 8, Qa)) : L("", !0),
|
|
1585
1586
|
p.value ? (u(), D(Ke, {
|
|
1586
1587
|
key: 1,
|
|
1587
1588
|
ref_key: "viewer",
|
|
@@ -1590,11 +1591,11 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1590
1591
|
}, null, 8, ["items"])) : L("", !0)
|
|
1591
1592
|
]),
|
|
1592
1593
|
default: f(({ id: b, describedby: C, invalid: q }) => [
|
|
1593
|
-
y("div",
|
|
1594
|
+
y("div", tl, [
|
|
1594
1595
|
y("input", {
|
|
1595
1596
|
id: b,
|
|
1596
1597
|
ref_key: "chooser",
|
|
1597
|
-
ref:
|
|
1598
|
+
ref: n,
|
|
1598
1599
|
type: "file",
|
|
1599
1600
|
class: "sr-only",
|
|
1600
1601
|
tabindex: "-1",
|
|
@@ -1603,11 +1604,11 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1603
1604
|
"aria-describedby": C,
|
|
1604
1605
|
"aria-invalid": q || void 0,
|
|
1605
1606
|
onChange: m[1] || (m[1] = (x) => $(x.target.files?.[0]))
|
|
1606
|
-
}, null, 40,
|
|
1607
|
+
}, null, 40, al),
|
|
1607
1608
|
p.value ? (u(), g("button", {
|
|
1608
1609
|
key: 0,
|
|
1609
1610
|
type: "button",
|
|
1610
|
-
"aria-label":
|
|
1611
|
+
"aria-label": l(t)("core.viewer.open"),
|
|
1611
1612
|
"data-test": "photo-open",
|
|
1612
1613
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1613
1614
|
onClick: m[2] || (m[2] = (x) => k.value?.present(0))
|
|
@@ -1617,14 +1618,14 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1617
1618
|
alt: "",
|
|
1618
1619
|
"data-test": "photo-preview",
|
|
1619
1620
|
class: "size-28 rounded-group object-cover"
|
|
1620
|
-
}, null, 8,
|
|
1621
|
-
], 8,
|
|
1621
|
+
}, null, 8, ol)
|
|
1622
|
+
], 8, ll)) : L("", !0),
|
|
1622
1623
|
j(be, {
|
|
1623
1624
|
disabled: a.disabled,
|
|
1624
|
-
onClick: m[3] || (m[3] = (x) =>
|
|
1625
|
+
onClick: m[3] || (m[3] = (x) => n.value?.click())
|
|
1625
1626
|
}, {
|
|
1626
1627
|
default: f(() => [
|
|
1627
|
-
H(_(
|
|
1628
|
+
H(_(l(t)("core.form.file.choose")), 1)
|
|
1628
1629
|
]),
|
|
1629
1630
|
_: 1
|
|
1630
1631
|
}, 8, ["disabled"]),
|
|
@@ -1638,7 +1639,7 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1638
1639
|
})
|
|
1639
1640
|
}, {
|
|
1640
1641
|
default: f(() => [
|
|
1641
|
-
H(_(
|
|
1642
|
+
H(_(l(t)("core.form.file.remove")), 1)
|
|
1642
1643
|
]),
|
|
1643
1644
|
_: 1
|
|
1644
1645
|
}, 8, ["disabled"])) : L("", !0)
|
|
@@ -1652,53 +1653,53 @@ const Ta = ["id", "aria-labelledby"], Va = ["id", "value", "lang", "name", "rows
|
|
|
1652
1653
|
]),
|
|
1653
1654
|
_: 2
|
|
1654
1655
|
}, [
|
|
1655
|
-
|
|
1656
|
+
s.$slots.trailing ? {
|
|
1656
1657
|
name: "trailing",
|
|
1657
1658
|
fn: f(() => [
|
|
1658
|
-
F(
|
|
1659
|
+
F(s.$slots, "trailing")
|
|
1659
1660
|
]),
|
|
1660
1661
|
key: "0"
|
|
1661
1662
|
} : void 0,
|
|
1662
|
-
|
|
1663
|
+
s.$slots.labelTrailing ? {
|
|
1663
1664
|
name: "labelTrailing",
|
|
1664
1665
|
fn: f(() => [
|
|
1665
|
-
F(
|
|
1666
|
+
F(s.$slots, "labelTrailing")
|
|
1666
1667
|
]),
|
|
1667
1668
|
key: "1"
|
|
1668
1669
|
} : void 0
|
|
1669
1670
|
]), 1040, ["value"]));
|
|
1670
1671
|
}
|
|
1671
|
-
}),
|
|
1672
|
+
}), nl = { hidden: "" }, sl = /* @__PURE__ */ G({
|
|
1672
1673
|
__name: "EditorChrome",
|
|
1673
1674
|
props: {
|
|
1674
1675
|
options: {}
|
|
1675
1676
|
},
|
|
1676
|
-
setup(
|
|
1677
|
-
return
|
|
1677
|
+
setup(r) {
|
|
1678
|
+
return It(r.options), (e, t) => (u(), g("span", nl));
|
|
1678
1679
|
}
|
|
1679
1680
|
});
|
|
1680
|
-
function
|
|
1681
|
+
function rl(r) {
|
|
1681
1682
|
const a = A(0);
|
|
1682
1683
|
let e = 0;
|
|
1683
1684
|
const t = () => {
|
|
1684
1685
|
e || (e = requestAnimationFrame(() => {
|
|
1685
1686
|
e = 0, a.value++;
|
|
1686
1687
|
}));
|
|
1687
|
-
},
|
|
1688
|
+
}, n = typeof MutationObserver > "u" ? null : new MutationObserver(t);
|
|
1688
1689
|
ye(
|
|
1689
|
-
() =>
|
|
1690
|
+
() => r.sections.value,
|
|
1690
1691
|
(i) => {
|
|
1691
|
-
|
|
1692
|
+
n?.disconnect();
|
|
1692
1693
|
for (const p of i)
|
|
1693
|
-
|
|
1694
|
+
n?.observe(p.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1694
1695
|
t();
|
|
1695
1696
|
},
|
|
1696
1697
|
{ immediate: !0 }
|
|
1697
|
-
),
|
|
1698
|
-
|
|
1698
|
+
), lt() && ot(() => {
|
|
1699
|
+
n?.disconnect(), e && cancelAnimationFrame(e);
|
|
1699
1700
|
});
|
|
1700
1701
|
const o = h(() => (a.value, Object.fromEntries(
|
|
1701
|
-
|
|
1702
|
+
r.sections.value.map((i) => [
|
|
1702
1703
|
i.id,
|
|
1703
1704
|
{
|
|
1704
1705
|
errors: i.element.querySelectorAll("[data-field-error]").length,
|
|
@@ -1708,13 +1709,13 @@ function il(s) {
|
|
|
1708
1709
|
))), c = h(() => Object.values(o.value).reduce((i, p) => ({ filled: i.filled + p.required.filled, total: i.total + p.required.total }), { filled: 0, total: 0 }));
|
|
1709
1710
|
return { states: o, totals: c };
|
|
1710
1711
|
}
|
|
1711
|
-
const
|
|
1712
|
+
const il = {
|
|
1712
1713
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1713
1714
|
"data-test": "editor-page"
|
|
1714
|
-
},
|
|
1715
|
+
}, ul = {
|
|
1715
1716
|
key: 0,
|
|
1716
1717
|
class: "sticky top-[calc(var(--app-bar-height)+1.5rem+var(--shell-banner-h,0px))] hidden min-w-0 flex-col gap-4 self-start lg:flex"
|
|
1717
|
-
},
|
|
1718
|
+
}, yo = /* @__PURE__ */ G({
|
|
1718
1719
|
__name: "EditorPage",
|
|
1719
1720
|
props: {
|
|
1720
1721
|
title: {},
|
|
@@ -1725,11 +1726,11 @@ const ul = {
|
|
|
1725
1726
|
fieldLabel: { type: Function, default: void 0 }
|
|
1726
1727
|
},
|
|
1727
1728
|
emits: ["save", "cancel"],
|
|
1728
|
-
setup(
|
|
1729
|
-
const e =
|
|
1729
|
+
setup(r, { emit: a }) {
|
|
1730
|
+
const e = r, t = a, { t: n } = oe(), o = Re(), c = jt(), { states: i, totals: p } = rl(c), k = U("content"), w = h(
|
|
1730
1731
|
() => e.form ? {
|
|
1731
1732
|
form: e.form,
|
|
1732
|
-
label: () => e.saveLabel ??
|
|
1733
|
+
label: () => e.saveLabel ?? n("core.actions.save"),
|
|
1733
1734
|
allowed: () => e.canSave,
|
|
1734
1735
|
disabledWhileClean: !1,
|
|
1735
1736
|
// a create page: an untouched form is submitted to learn what is missing
|
|
@@ -1743,33 +1744,33 @@ const ul = {
|
|
|
1743
1744
|
);
|
|
1744
1745
|
ye(
|
|
1745
1746
|
() => e.form?.failure.value,
|
|
1746
|
-
async (
|
|
1747
|
-
|
|
1747
|
+
async (s) => {
|
|
1748
|
+
s?.kind === "invalid" && (await he(), await Te(k.value ?? document, c));
|
|
1748
1749
|
}
|
|
1749
1750
|
);
|
|
1750
|
-
function $(
|
|
1751
|
-
const m = c.sections.value.find((b) => b.id ===
|
|
1751
|
+
function $(s) {
|
|
1752
|
+
const m = c.sections.value.find((b) => b.id === s)?.element;
|
|
1752
1753
|
m && he(() => Te(m));
|
|
1753
1754
|
}
|
|
1754
|
-
return (
|
|
1755
|
+
return (s, m) => (u(), D(Dt, {
|
|
1755
1756
|
title: e.title,
|
|
1756
1757
|
back: e.back,
|
|
1757
1758
|
width: "content"
|
|
1758
1759
|
}, J({
|
|
1759
1760
|
default: f(() => [
|
|
1760
|
-
w.value ? (u(), D(
|
|
1761
|
+
w.value ? (u(), D(sl, {
|
|
1761
1762
|
key: 0,
|
|
1762
1763
|
options: w.value
|
|
1763
1764
|
}, null, 8, ["options"])) : L("", !0),
|
|
1764
|
-
y("div",
|
|
1765
|
-
|
|
1766
|
-
j(
|
|
1765
|
+
y("div", il, [
|
|
1766
|
+
l(o) ? L("", !0) : (u(), g("aside", ul, [
|
|
1767
|
+
j(Rt, {
|
|
1767
1768
|
standalone: "",
|
|
1768
|
-
states:
|
|
1769
|
-
progress:
|
|
1769
|
+
states: l(i),
|
|
1770
|
+
progress: l(p),
|
|
1770
1771
|
onSelect: $
|
|
1771
1772
|
}, null, 8, ["states", "progress"]),
|
|
1772
|
-
F(
|
|
1773
|
+
F(s.$slots, "aside")
|
|
1773
1774
|
])),
|
|
1774
1775
|
y("div", {
|
|
1775
1776
|
ref_key: "content",
|
|
@@ -1782,73 +1783,47 @@ const ul = {
|
|
|
1782
1783
|
label: e.fieldLabel,
|
|
1783
1784
|
scope: k.value
|
|
1784
1785
|
}, null, 8, ["form", "label", "scope"])) : L("", !0),
|
|
1785
|
-
F(
|
|
1786
|
+
F(s.$slots, "default")
|
|
1786
1787
|
], 512)
|
|
1787
1788
|
]),
|
|
1788
|
-
|
|
1789
|
+
l(o) ? (u(), D(Mt, {
|
|
1789
1790
|
key: 1,
|
|
1790
|
-
states:
|
|
1791
|
+
states: l(i)
|
|
1791
1792
|
}, null, 8, ["states"])) : L("", !0)
|
|
1792
1793
|
]),
|
|
1793
1794
|
_: 2
|
|
1794
1795
|
}, [
|
|
1795
|
-
|
|
1796
|
+
s.$slots.header ? {
|
|
1796
1797
|
name: "header",
|
|
1797
1798
|
fn: f(() => [
|
|
1798
|
-
F(
|
|
1799
|
+
F(s.$slots, "header")
|
|
1799
1800
|
]),
|
|
1800
1801
|
key: "0"
|
|
1801
1802
|
} : void 0,
|
|
1802
|
-
|
|
1803
|
+
s.$slots.pager ? {
|
|
1803
1804
|
name: "pager",
|
|
1804
1805
|
fn: f(() => [
|
|
1805
|
-
F(
|
|
1806
|
+
F(s.$slots, "pager")
|
|
1806
1807
|
]),
|
|
1807
1808
|
key: "1"
|
|
1808
1809
|
} : void 0,
|
|
1809
|
-
|
|
1810
|
+
s.$slots.notices ? {
|
|
1810
1811
|
name: "notices",
|
|
1811
1812
|
fn: f(() => [
|
|
1812
|
-
F(
|
|
1813
|
+
F(s.$slots, "notices")
|
|
1813
1814
|
]),
|
|
1814
1815
|
key: "2"
|
|
1815
1816
|
} : void 0,
|
|
1816
|
-
|
|
1817
|
+
s.$slots.bottom ? {
|
|
1817
1818
|
name: "bottom",
|
|
1818
1819
|
fn: f(() => [
|
|
1819
|
-
F(
|
|
1820
|
+
F(s.$slots, "bottom")
|
|
1820
1821
|
]),
|
|
1821
1822
|
key: "3"
|
|
1822
1823
|
} : void 0
|
|
1823
1824
|
]), 1032, ["title", "back"]));
|
|
1824
1825
|
}
|
|
1825
|
-
})
|
|
1826
|
-
function ho(s) {
|
|
1827
|
-
const a = Ve(null);
|
|
1828
|
-
let e = null;
|
|
1829
|
-
const t = at({
|
|
1830
|
-
...s,
|
|
1831
|
-
done: s.done ? (l) => s.done?.(l, { editing: e }) : void 0,
|
|
1832
|
-
run(l, o) {
|
|
1833
|
-
const c = e = a.value;
|
|
1834
|
-
if (c === null) return s.create(l, o);
|
|
1835
|
-
if (!s.update) throw new Error("useRecordDialog: edit() needs an `update`.");
|
|
1836
|
-
return s.update(c, l, o);
|
|
1837
|
-
}
|
|
1838
|
-
});
|
|
1839
|
-
return {
|
|
1840
|
-
command: t,
|
|
1841
|
-
form: t.form,
|
|
1842
|
-
editing: a,
|
|
1843
|
-
create(l) {
|
|
1844
|
-
a.value = null, t.present(l);
|
|
1845
|
-
},
|
|
1846
|
-
edit(l) {
|
|
1847
|
-
a.value = l, t.present(s.toValues?.(l));
|
|
1848
|
-
}
|
|
1849
|
-
};
|
|
1850
|
-
}
|
|
1851
|
-
const cl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], ko = /* @__PURE__ */ G({
|
|
1826
|
+
}), dl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], go = /* @__PURE__ */ G({
|
|
1852
1827
|
__name: "NumberCell",
|
|
1853
1828
|
props: /* @__PURE__ */ le({
|
|
1854
1829
|
label: {},
|
|
@@ -1863,13 +1838,13 @@ const cl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], k
|
|
|
1863
1838
|
modelModifiers: {}
|
|
1864
1839
|
}),
|
|
1865
1840
|
emits: ["update:modelValue"],
|
|
1866
|
-
setup(
|
|
1867
|
-
const a =
|
|
1841
|
+
setup(r) {
|
|
1842
|
+
const a = r, e = re(r, "modelValue");
|
|
1868
1843
|
function t(o) {
|
|
1869
1844
|
const c = o.target.value.replace(/\D/g, "");
|
|
1870
1845
|
e.value = c === "" ? null : Math.min(a.max, Math.max(a.min, Number(c)));
|
|
1871
1846
|
}
|
|
1872
|
-
const
|
|
1847
|
+
const n = (o) => o.target.value = e.value === null ? "" : String(e.value);
|
|
1873
1848
|
return (o, c) => (u(), g("input", {
|
|
1874
1849
|
value: e.value ?? "",
|
|
1875
1850
|
type: "text",
|
|
@@ -1881,87 +1856,87 @@ const cl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], k
|
|
|
1881
1856
|
placeholder: a.placeholder,
|
|
1882
1857
|
class: I(["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", [a.wide ? "w-28" : "w-16", a.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : ""]]),
|
|
1883
1858
|
onInput: t,
|
|
1884
|
-
onBlur:
|
|
1885
|
-
}, null, 42,
|
|
1859
|
+
onBlur: n
|
|
1860
|
+
}, null, 42, dl));
|
|
1886
1861
|
}
|
|
1887
|
-
}),
|
|
1888
|
-
function
|
|
1862
|
+
}), je = "vue-core:step-draft:";
|
|
1863
|
+
function Ie(r) {
|
|
1889
1864
|
try {
|
|
1890
|
-
return (
|
|
1865
|
+
return (r.storage === "local" ? window.localStorage : window.sessionStorage) ?? null;
|
|
1891
1866
|
} catch {
|
|
1892
1867
|
return null;
|
|
1893
1868
|
}
|
|
1894
1869
|
}
|
|
1895
|
-
function
|
|
1870
|
+
function cl(r) {
|
|
1896
1871
|
try {
|
|
1897
|
-
const a =
|
|
1872
|
+
const a = Ie(r)?.getItem(je + r.key);
|
|
1898
1873
|
if (!a) return null;
|
|
1899
1874
|
const e = JSON.parse(a);
|
|
1900
|
-
return !e || e.version !== (
|
|
1875
|
+
return !e || e.version !== (r.version ?? 1) || typeof e.values != "object" || e.values === null || typeof e.step != "string" || !Array.isArray(e.passed) ? null : e;
|
|
1901
1876
|
} catch {
|
|
1902
1877
|
return null;
|
|
1903
1878
|
}
|
|
1904
1879
|
}
|
|
1905
|
-
function
|
|
1880
|
+
function fl(r, a) {
|
|
1906
1881
|
try {
|
|
1907
|
-
const e =
|
|
1882
|
+
const e = Ie(r);
|
|
1908
1883
|
if (!e) return !1;
|
|
1909
|
-
const t = (
|
|
1910
|
-
return e.setItem(
|
|
1884
|
+
const t = (n, o) => typeof Blob < "u" && o instanceof Blob ? null : o;
|
|
1885
|
+
return e.setItem(je + r.key, JSON.stringify({ version: r.version ?? 1, ...a }, t)), !0;
|
|
1911
1886
|
} catch {
|
|
1912
1887
|
return !1;
|
|
1913
1888
|
}
|
|
1914
1889
|
}
|
|
1915
|
-
function Ae(
|
|
1890
|
+
function Ae(r) {
|
|
1916
1891
|
try {
|
|
1917
|
-
|
|
1892
|
+
Ie(r)?.removeItem(je + r.key);
|
|
1918
1893
|
} catch {
|
|
1919
1894
|
}
|
|
1920
1895
|
}
|
|
1921
|
-
function
|
|
1922
|
-
for (const [e, t] of Object.entries(
|
|
1896
|
+
function ml(r, a) {
|
|
1897
|
+
for (const [e, t] of Object.entries(r)) {
|
|
1923
1898
|
if (!(e in a)) continue;
|
|
1924
|
-
const
|
|
1925
|
-
(
|
|
1899
|
+
const n = a[e];
|
|
1900
|
+
(n === null || t === null || t === void 0 || typeof n == typeof t && Array.isArray(n) === Array.isArray(t)) && (r[e] = n);
|
|
1926
1901
|
}
|
|
1927
1902
|
}
|
|
1928
|
-
function
|
|
1929
|
-
const { t: e } = oe(), t = h(() =>
|
|
1903
|
+
function ho(r, a) {
|
|
1904
|
+
const { t: e } = oe(), t = h(() => nt(a.steps));
|
|
1930
1905
|
if (t.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
1931
|
-
const
|
|
1932
|
-
let
|
|
1933
|
-
const b = h(() => Math.max(0, t.value.findIndex((d) => d.name ===
|
|
1934
|
-
() => t.value.map((d,
|
|
1935
|
-
const v = C(d),
|
|
1906
|
+
const n = A(t.value[0].name), o = Ee(/* @__PURE__ */ new Set()), c = Ee(/* @__PURE__ */ new Set([t.value[0].name])), i = A(null), p = A(!1), k = A(0), w = A(!1), $ = A(!1);
|
|
1907
|
+
let s = !1, m = 0;
|
|
1908
|
+
const b = h(() => Math.max(0, t.value.findIndex((d) => d.name === n.value))), C = (d) => d.fields?.filter((z) => r.errors.has(z)).length ?? 0, q = h(
|
|
1909
|
+
() => t.value.map((d, z) => {
|
|
1910
|
+
const v = C(d), V = z === b.value;
|
|
1936
1911
|
return {
|
|
1937
1912
|
name: d.name,
|
|
1938
1913
|
label: d.label,
|
|
1939
|
-
position:
|
|
1940
|
-
state:
|
|
1914
|
+
position: z + 1,
|
|
1915
|
+
state: V ? "current" : o.has(d.name) && v === 0 ? "done" : "todo",
|
|
1941
1916
|
errors: v,
|
|
1942
|
-
reachable: !
|
|
1917
|
+
reachable: !V && (c.has(d.name) || z < b.value)
|
|
1943
1918
|
};
|
|
1944
1919
|
})
|
|
1945
|
-
), x = h(() => q.value[b.value]), O = h(() => q.value.length), R = h(() => b.value === 0), X = h(() => b.value === O.value - 1), M = h(() => p.value ||
|
|
1920
|
+
), x = h(() => q.value[b.value]), O = h(() => q.value.length), R = h(() => b.value === 0), X = h(() => b.value === O.value - 1), M = h(() => p.value || r.submitting.value);
|
|
1946
1921
|
function ne(d) {
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1922
|
+
const z = t.value[d];
|
|
1923
|
+
z && (i.value = d > b.value ? "forward" : "back", n.value = z.name, c.add(z.name), m = d, w.value = !1);
|
|
1949
1924
|
}
|
|
1950
1925
|
ye(
|
|
1951
1926
|
() => t.value.map((d) => d.name).join("\0"),
|
|
1952
1927
|
() => {
|
|
1953
|
-
const d = t.value,
|
|
1954
|
-
|
|
1955
|
-
S > v && (o.delete(
|
|
1956
|
-
}), c.add(
|
|
1957
|
-
for (const
|
|
1928
|
+
const d = t.value, z = d.findIndex((V) => V.name === n.value), v = z === -1 ? Math.min(m, d.length - 1) : z;
|
|
1929
|
+
n.value = d[v].name, m = v, d.forEach((V, S) => {
|
|
1930
|
+
S > v && (o.delete(V.name), c.delete(V.name));
|
|
1931
|
+
}), c.add(n.value);
|
|
1932
|
+
for (const V of [o, c]) for (const S of [...V]) d.some((N) => N.name === S) || V.delete(S);
|
|
1958
1933
|
}
|
|
1959
1934
|
);
|
|
1960
1935
|
function Q(d) {
|
|
1961
|
-
const
|
|
1962
|
-
if (!
|
|
1963
|
-
const v = Object.entries(
|
|
1964
|
-
return v.length > 0 &&
|
|
1936
|
+
const z = d.fields;
|
|
1937
|
+
if (!z?.length) return !0;
|
|
1938
|
+
const v = Object.entries(r.errors.all()).filter(([S]) => !z.includes(tt(S))), V = r.check(d.fields);
|
|
1939
|
+
return v.length > 0 && r.errors.set({ ...Object.fromEntries(v), ...r.errors.all() }), V;
|
|
1965
1940
|
}
|
|
1966
1941
|
async function te(d) {
|
|
1967
1942
|
if (!Q(d))
|
|
@@ -1976,12 +1951,12 @@ function xo(s, a) {
|
|
|
1976
1951
|
return k.value++, !1;
|
|
1977
1952
|
}
|
|
1978
1953
|
async function fe() {
|
|
1979
|
-
const d = await
|
|
1954
|
+
const d = await r.submit(a.submit, a.submitOptions);
|
|
1980
1955
|
if (d.status === "saved" || d.status === "saved-refresh-failed")
|
|
1981
|
-
return
|
|
1956
|
+
return s = !0, se(), a.onSaved?.(d.value), !0;
|
|
1982
1957
|
if (d.status === "failed" && (k.value++, x.value.errors === 0)) {
|
|
1983
|
-
const
|
|
1984
|
-
|
|
1958
|
+
const z = q.value.findIndex((v) => v.errors > 0);
|
|
1959
|
+
z !== -1 && ne(z);
|
|
1985
1960
|
}
|
|
1986
1961
|
return !1;
|
|
1987
1962
|
}
|
|
@@ -1992,56 +1967,56 @@ function xo(s, a) {
|
|
|
1992
1967
|
}
|
|
1993
1968
|
async function T(d) {
|
|
1994
1969
|
if (M.value) return !1;
|
|
1995
|
-
const
|
|
1996
|
-
if (
|
|
1997
|
-
if (
|
|
1998
|
-
return
|
|
1970
|
+
const z = t.value.findIndex((v) => v.name === d);
|
|
1971
|
+
if (z === -1) return !1;
|
|
1972
|
+
if (z <= b.value)
|
|
1973
|
+
return z < b.value && ne(z), !0;
|
|
1999
1974
|
if (!c.has(d)) return !1;
|
|
2000
|
-
for (; b.value <
|
|
2001
|
-
return b.value ===
|
|
1975
|
+
for (; b.value < z; ) if (!await me()) return !1;
|
|
1976
|
+
return b.value === z;
|
|
2002
1977
|
}
|
|
2003
1978
|
const K = a.draft;
|
|
2004
1979
|
let E;
|
|
2005
1980
|
function ae() {
|
|
2006
|
-
if (E = void 0, !(!K ||
|
|
2007
|
-
if (!
|
|
1981
|
+
if (E = void 0, !(!K || s)) {
|
|
1982
|
+
if (!r.dirty.value) {
|
|
2008
1983
|
Ae(K), $.value = !1;
|
|
2009
1984
|
return;
|
|
2010
1985
|
}
|
|
2011
|
-
$.value =
|
|
1986
|
+
$.value = fl(K, { values: et(r.values), step: n.value, passed: [...o] });
|
|
2012
1987
|
}
|
|
2013
1988
|
}
|
|
2014
1989
|
function se() {
|
|
2015
|
-
|
|
1990
|
+
s = !0, clearTimeout(E), E = void 0, $.value = !1, K && Ae(K);
|
|
2016
1991
|
}
|
|
2017
1992
|
if (K) {
|
|
2018
|
-
const d =
|
|
1993
|
+
const d = cl(K);
|
|
2019
1994
|
if (d) {
|
|
2020
|
-
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2023
|
-
for (const v of d.passed)
|
|
2024
|
-
for (const v of [...o,
|
|
2025
|
-
m = b.value, w.value =
|
|
1995
|
+
ml(r.values, d.values);
|
|
1996
|
+
const z = t.value.map((v) => v.name);
|
|
1997
|
+
z.includes(d.step) && (n.value = d.step);
|
|
1998
|
+
for (const v of d.passed) z.includes(v) && o.add(v);
|
|
1999
|
+
for (const v of [...o, n.value]) c.add(v);
|
|
2000
|
+
m = b.value, w.value = r.dirty.value, $.value = w.value;
|
|
2026
2001
|
}
|
|
2027
2002
|
ye(
|
|
2028
|
-
[() =>
|
|
2003
|
+
[() => r.values, n, () => [...o].join("\0")],
|
|
2029
2004
|
() => {
|
|
2030
|
-
|
|
2005
|
+
s || (clearTimeout(E), E = setTimeout(ae, 400));
|
|
2031
2006
|
},
|
|
2032
2007
|
{ deep: !0 }
|
|
2033
2008
|
), Ye(() => {
|
|
2034
2009
|
E !== void 0 && (clearTimeout(E), ae());
|
|
2035
2010
|
});
|
|
2036
2011
|
}
|
|
2037
|
-
const { confirmDiscard: ee } = We(() => !
|
|
2038
|
-
Ue(
|
|
2012
|
+
const { confirmDiscard: ee } = We(() => !s && r.dirty.value);
|
|
2013
|
+
Ue(Ot, null) && Et(() => (s || se(), !0));
|
|
2039
2014
|
async function ke() {
|
|
2040
2015
|
const d = await ee();
|
|
2041
2016
|
return d && se(), d;
|
|
2042
2017
|
}
|
|
2043
2018
|
function we() {
|
|
2044
|
-
|
|
2019
|
+
r.reset(), o.clear(), c.clear(), i.value = null, n.value = t.value[0].name, c.add(n.value), m = 0, w.value = !1, se(), s = !1;
|
|
2045
2020
|
}
|
|
2046
2021
|
const Y = h(() => {
|
|
2047
2022
|
const d = [e("core.steps.position", { current: b.value + 1, total: O.value }), x.value.label];
|
|
@@ -2064,8 +2039,8 @@ function xo(s, a) {
|
|
|
2064
2039
|
backLabel: B,
|
|
2065
2040
|
restored: w,
|
|
2066
2041
|
refusals: k,
|
|
2067
|
-
errors:
|
|
2068
|
-
failure:
|
|
2042
|
+
errors: r.errors,
|
|
2043
|
+
failure: r.failure,
|
|
2069
2044
|
next: me,
|
|
2070
2045
|
back: () => ne(b.value - 1),
|
|
2071
2046
|
goTo: T,
|
|
@@ -2074,39 +2049,39 @@ function xo(s, a) {
|
|
|
2074
2049
|
bindDialog: () => ({ subtitle: Y.value, primaryLabel: ve.value, status: M.value ? "processing" : "idle", beforeDismiss: ke })
|
|
2075
2050
|
};
|
|
2076
2051
|
}
|
|
2077
|
-
const
|
|
2052
|
+
const vl = {
|
|
2078
2053
|
class: "flex flex-wrap items-center gap-2.5 border-t border-border-separator pt-3.5",
|
|
2079
2054
|
"data-test": "step-navigation"
|
|
2080
|
-
},
|
|
2055
|
+
}, pl = /* @__PURE__ */ G({
|
|
2081
2056
|
__name: "StepNavigation",
|
|
2082
2057
|
props: {
|
|
2083
2058
|
flow: {}
|
|
2084
2059
|
},
|
|
2085
2060
|
emits: ["cancel"],
|
|
2086
|
-
setup(
|
|
2087
|
-
const a =
|
|
2088
|
-
return (t,
|
|
2061
|
+
setup(r) {
|
|
2062
|
+
const a = r, { t: e } = oe();
|
|
2063
|
+
return (t, n) => (u(), g("div", vl, [
|
|
2089
2064
|
a.flow.backLabel.value ? (u(), D(be, {
|
|
2090
2065
|
key: 0,
|
|
2091
2066
|
prominence: "plain",
|
|
2092
2067
|
icon: "arrowLeftSLine",
|
|
2093
2068
|
disabled: a.flow.busy.value,
|
|
2094
2069
|
"data-test": "step-back",
|
|
2095
|
-
onClick:
|
|
2070
|
+
onClick: n[0] || (n[0] = (o) => a.flow.back())
|
|
2096
2071
|
}, {
|
|
2097
2072
|
default: f(() => [
|
|
2098
2073
|
H(_(a.flow.backLabel.value), 1)
|
|
2099
2074
|
]),
|
|
2100
2075
|
_: 1
|
|
2101
2076
|
}, 8, ["disabled"])) : L("", !0),
|
|
2102
|
-
|
|
2077
|
+
n[3] || (n[3] = y("div", { class: "grow" }, null, -1)),
|
|
2103
2078
|
j(be, {
|
|
2104
2079
|
prominence: "plain",
|
|
2105
2080
|
"data-test": "step-cancel",
|
|
2106
|
-
onClick:
|
|
2081
|
+
onClick: n[1] || (n[1] = (o) => t.$emit("cancel"))
|
|
2107
2082
|
}, {
|
|
2108
2083
|
default: f(() => [
|
|
2109
|
-
H(_(
|
|
2084
|
+
H(_(l(e)("core.actions.cancel")), 1)
|
|
2110
2085
|
]),
|
|
2111
2086
|
_: 1
|
|
2112
2087
|
}),
|
|
@@ -2114,7 +2089,7 @@ const pl = {
|
|
|
2114
2089
|
prominence: "primary",
|
|
2115
2090
|
processing: a.flow.busy.value,
|
|
2116
2091
|
"data-test": "step-next",
|
|
2117
|
-
onClick:
|
|
2092
|
+
onClick: n[2] || (n[2] = (o) => a.flow.next())
|
|
2118
2093
|
}, {
|
|
2119
2094
|
default: f(() => [
|
|
2120
2095
|
H(_(a.flow.nextLabel.value), 1)
|
|
@@ -2123,35 +2098,35 @@ const pl = {
|
|
|
2123
2098
|
}, 8, ["processing"])
|
|
2124
2099
|
]));
|
|
2125
2100
|
}
|
|
2126
|
-
}),
|
|
2101
|
+
}), bl = ["aria-label"], yl = ["aria-current"], gl = ["aria-label"], hl = {
|
|
2127
2102
|
key: 2,
|
|
2128
2103
|
class: "sr-only"
|
|
2129
|
-
},
|
|
2104
|
+
}, kl = {
|
|
2130
2105
|
key: 1,
|
|
2131
2106
|
"data-test": "step-dots",
|
|
2132
2107
|
class: "flex justify-center gap-1.5",
|
|
2133
2108
|
"aria-hidden": "true"
|
|
2134
|
-
},
|
|
2109
|
+
}, xl = ["data-state"], wl = /* @__PURE__ */ G({
|
|
2135
2110
|
__name: "StepProgress",
|
|
2136
2111
|
props: {
|
|
2137
2112
|
flow: {},
|
|
2138
2113
|
progress: { default: "bar" }
|
|
2139
2114
|
},
|
|
2140
|
-
setup(
|
|
2141
|
-
const a =
|
|
2142
|
-
return (t,
|
|
2115
|
+
setup(r) {
|
|
2116
|
+
const a = r, { t: e } = oe();
|
|
2117
|
+
return (t, n) => a.progress === "bar" ? (u(), g("ol", {
|
|
2143
2118
|
key: 0,
|
|
2144
|
-
"aria-label":
|
|
2119
|
+
"aria-label": l(e)("core.steps.label"),
|
|
2145
2120
|
"data-test": "step-bar",
|
|
2146
2121
|
class: "grid min-w-0 gap-2",
|
|
2147
|
-
style:
|
|
2122
|
+
style: st({ gridTemplateColumns: `repeat(${a.flow.count.value}, minmax(0, 1fr))` })
|
|
2148
2123
|
}, [
|
|
2149
2124
|
(u(!0), g(ie, null, xe(a.flow.steps.value, (o) => (u(), g("li", {
|
|
2150
2125
|
key: o.name,
|
|
2151
2126
|
class: "flex min-w-0",
|
|
2152
2127
|
"aria-current": o.state === "current" ? "step" : void 0
|
|
2153
2128
|
}, [
|
|
2154
|
-
(u(), D(
|
|
2129
|
+
(u(), D(rt(o.reachable ? "button" : "div"), {
|
|
2155
2130
|
type: o.reachable ? "button" : void 0,
|
|
2156
2131
|
disabled: o.reachable ? a.flow.busy.value : void 0,
|
|
2157
2132
|
"data-test": `step-${o.name}`,
|
|
@@ -2167,7 +2142,7 @@ const pl = {
|
|
|
2167
2142
|
y("span", {
|
|
2168
2143
|
class: I(["flex min-w-0 items-center gap-1.5 text-footnote", o.state === "current" ? "font-bold text-content-strong" : o.state === "done" ? "font-medium text-content-link" : "font-medium text-content-muted"])
|
|
2169
2144
|
}, [
|
|
2170
|
-
o.state === "done" ? (u(), D(
|
|
2145
|
+
o.state === "done" ? (u(), D(l(Z), {
|
|
2171
2146
|
key: 0,
|
|
2172
2147
|
name: "checkCustom",
|
|
2173
2148
|
size: 12,
|
|
@@ -2179,31 +2154,31 @@ const pl = {
|
|
|
2179
2154
|
o.errors > 0 ? (u(), g("span", {
|
|
2180
2155
|
key: 1,
|
|
2181
2156
|
"data-test": "step-errors",
|
|
2182
|
-
"aria-label":
|
|
2157
|
+
"aria-label": l(e)("core.form.sections.errors", { count: o.errors }),
|
|
2183
2158
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2184
|
-
}, _(o.errors), 9,
|
|
2185
|
-
o.state === "done" ? (u(), g("span",
|
|
2159
|
+
}, _(o.errors), 9, gl)) : L("", !0),
|
|
2160
|
+
o.state === "done" ? (u(), g("span", hl, _(l(e)("core.steps.done")), 1)) : L("", !0)
|
|
2186
2161
|
], 2)
|
|
2187
2162
|
]),
|
|
2188
2163
|
_: 2
|
|
2189
2164
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2190
|
-
], 8,
|
|
2191
|
-
], 12,
|
|
2165
|
+
], 8, yl))), 128))
|
|
2166
|
+
], 12, bl)) : (u(), g("div", kl, [
|
|
2192
2167
|
(u(!0), g(ie, null, xe(a.flow.steps.value, (o) => (u(), g("span", {
|
|
2193
2168
|
key: o.name,
|
|
2194
2169
|
class: I(["h-1.5 rounded-full transition-all duration-motion-fast", [o.state === "current" ? "w-4.5" : "w-1.5", o.errors > 0 ? "bg-status-danger-solid" : o.state === "todo" && o.position > a.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2195
2170
|
"data-state": o.errors > 0 ? "error" : o.state
|
|
2196
|
-
}, null, 10,
|
|
2171
|
+
}, null, 10, xl))), 128))
|
|
2197
2172
|
]));
|
|
2198
2173
|
}
|
|
2199
|
-
}),
|
|
2174
|
+
}), $l = ["data-step"], _l = {
|
|
2200
2175
|
class: "sr-only",
|
|
2201
2176
|
"aria-live": "polite"
|
|
2202
|
-
},
|
|
2177
|
+
}, Cl = {
|
|
2203
2178
|
key: 1,
|
|
2204
2179
|
"data-test": "step-restored",
|
|
2205
2180
|
class: "flex items-center gap-2 text-footnote text-content-muted"
|
|
2206
|
-
},
|
|
2181
|
+
}, ko = /* @__PURE__ */ G({
|
|
2207
2182
|
__name: "StepForm",
|
|
2208
2183
|
props: {
|
|
2209
2184
|
flow: {},
|
|
@@ -2211,8 +2186,8 @@ const pl = {
|
|
|
2211
2186
|
navigation: { default: "inline" }
|
|
2212
2187
|
},
|
|
2213
2188
|
emits: ["cancel"],
|
|
2214
|
-
setup(
|
|
2215
|
-
const a =
|
|
2189
|
+
setup(r) {
|
|
2190
|
+
const a = r, { t: e } = oe(), t = U("body"), n = U("root");
|
|
2216
2191
|
function o(c) {
|
|
2217
2192
|
for (let i = c.parentElement; i; i = i.parentElement) {
|
|
2218
2193
|
const p = getComputedStyle(i).overflowY;
|
|
@@ -2221,31 +2196,31 @@ const pl = {
|
|
|
2221
2196
|
return c.getBoundingClientRect().top < 0;
|
|
2222
2197
|
}
|
|
2223
2198
|
return ye(() => a.flow.current.value.name, async () => {
|
|
2224
|
-
await he(),
|
|
2199
|
+
await he(), n.value && o(n.value) && n.value.scrollIntoView?.({ block: "start" }), t.value?.focus({ preventScroll: !0 });
|
|
2225
2200
|
}), ye(() => a.flow.refusals.value, async () => {
|
|
2226
2201
|
await he(), t.value && await Te(t.value);
|
|
2227
2202
|
}), (c, i) => (u(), g("div", {
|
|
2228
2203
|
ref_key: "root",
|
|
2229
|
-
ref:
|
|
2204
|
+
ref: n,
|
|
2230
2205
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2231
2206
|
"data-test": "step-form",
|
|
2232
2207
|
"data-step": a.flow.current.value.name
|
|
2233
2208
|
}, [
|
|
2234
|
-
a.progress !== "none" ? (u(), D(
|
|
2209
|
+
a.progress !== "none" ? (u(), D(wl, {
|
|
2235
2210
|
key: 0,
|
|
2236
2211
|
flow: a.flow,
|
|
2237
2212
|
progress: a.progress
|
|
2238
2213
|
}, null, 8, ["flow", "progress"])) : L("", !0),
|
|
2239
|
-
y("p",
|
|
2240
|
-
a.flow.restored.value ? (u(), g("div",
|
|
2241
|
-
y("span", null, _(
|
|
2214
|
+
y("p", _l, _(a.flow.subtitle.value), 1),
|
|
2215
|
+
a.flow.restored.value ? (u(), g("div", Cl, [
|
|
2216
|
+
y("span", null, _(l(e)("core.steps.restored")), 1),
|
|
2242
2217
|
j(be, {
|
|
2243
2218
|
prominence: "link",
|
|
2244
2219
|
size: "sm",
|
|
2245
2220
|
onClick: i[0] || (i[0] = (p) => a.flow.restart())
|
|
2246
2221
|
}, {
|
|
2247
2222
|
default: f(() => [
|
|
2248
|
-
H(_(
|
|
2223
|
+
H(_(l(e)("core.steps.start_over")), 1)
|
|
2249
2224
|
]),
|
|
2250
2225
|
_: 1
|
|
2251
2226
|
})
|
|
@@ -2272,87 +2247,87 @@ const pl = {
|
|
|
2272
2247
|
"aria-hidden": "true"
|
|
2273
2248
|
}, null, -1))
|
|
2274
2249
|
], 34)),
|
|
2275
|
-
a.navigation === "inline" ? (u(), D(
|
|
2250
|
+
a.navigation === "inline" ? (u(), D(pl, {
|
|
2276
2251
|
key: 2,
|
|
2277
2252
|
flow: a.flow,
|
|
2278
2253
|
onCancel: i[2] || (i[2] = (p) => c.$emit("cancel"))
|
|
2279
2254
|
}, null, 8, ["flow"])) : L("", !0)
|
|
2280
|
-
], 8,
|
|
2255
|
+
], 8, $l));
|
|
2281
2256
|
}
|
|
2282
2257
|
});
|
|
2283
2258
|
export {
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2259
|
+
gt as Calendar,
|
|
2260
|
+
lo as CardSelectField,
|
|
2261
|
+
oo as CheckboxField,
|
|
2262
|
+
no as ChoiceChips,
|
|
2263
|
+
so as ComboField,
|
|
2264
|
+
Fo as CommandDialog,
|
|
2265
|
+
Wo as DateField,
|
|
2266
|
+
ro as DateTimeField,
|
|
2267
|
+
yo as EditorPage,
|
|
2268
|
+
$o as ErrorBag,
|
|
2294
2269
|
ge as Field,
|
|
2295
|
-
|
|
2270
|
+
io as FileField,
|
|
2296
2271
|
He as FormErrors,
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2272
|
+
Bt as FormGroup,
|
|
2273
|
+
uo as FormGroupButton,
|
|
2274
|
+
co as FormIndent,
|
|
2275
|
+
it as FormRow,
|
|
2276
|
+
nn as FormView,
|
|
2277
|
+
Qo as GroupEditAction,
|
|
2278
|
+
cn as GroupSheet,
|
|
2279
|
+
fo as I18nField,
|
|
2280
|
+
jo as LeaveGuardRoot,
|
|
2306
2281
|
zo as MissingLeaveGuardRootError,
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2282
|
+
mo as MoneyField,
|
|
2283
|
+
vo as MonthYearField,
|
|
2284
|
+
po as MultiSelectField,
|
|
2285
|
+
go as NumberCell,
|
|
2311
2286
|
zt as NumberField,
|
|
2312
2287
|
Ge as OptionList,
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2288
|
+
fn as OtpInput,
|
|
2289
|
+
bo as PhotoField,
|
|
2290
|
+
mn as RecordGroupScope,
|
|
2291
|
+
bn as SegmentedField,
|
|
2292
|
+
rn as SelectField,
|
|
2293
|
+
ko as StepForm,
|
|
2294
|
+
pl as StepNavigation,
|
|
2295
|
+
wl as StepProgress,
|
|
2296
|
+
gn as SwitchField,
|
|
2297
|
+
Ao as TextField,
|
|
2298
|
+
kn as TextareaField,
|
|
2299
|
+
Zo as TimeField,
|
|
2325
2300
|
Qe as checkFile,
|
|
2326
|
-
|
|
2327
|
-
|
|
2301
|
+
en as createFieldGroups,
|
|
2302
|
+
Vo as createLeaveGuard,
|
|
2328
2303
|
ce as fieldDefaults,
|
|
2329
|
-
|
|
2304
|
+
Bo as fieldKey,
|
|
2330
2305
|
de as fieldProps,
|
|
2331
2306
|
Te as focusFirstError,
|
|
2332
|
-
|
|
2307
|
+
No as formEditableKey,
|
|
2333
2308
|
Fe as formatBytes,
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2309
|
+
Go as groupOptions,
|
|
2310
|
+
qo as installLeaveGuard,
|
|
2311
|
+
Do as leaveGuardKey,
|
|
2312
|
+
Ko as matchOptions,
|
|
2313
|
+
Ba as missingLocales,
|
|
2314
|
+
tn as provideRecordGroups,
|
|
2315
|
+
Uo as recentChoicesKey,
|
|
2316
|
+
an as recordGroupsKey,
|
|
2317
|
+
Lo as useCommand,
|
|
2318
|
+
Nt as useDirtySnapshot,
|
|
2344
2319
|
Je as useFieldMode,
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2320
|
+
_o as useForm,
|
|
2321
|
+
vn as useGroupSheet,
|
|
2322
|
+
Co as useHiddenFieldErrors,
|
|
2348
2323
|
We as useLeaveGuard,
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2324
|
+
Ro as useLeaveGuardContext,
|
|
2325
|
+
un as useOptions,
|
|
2326
|
+
wn as useRecordDialog,
|
|
2327
|
+
ln as useRecordGroups,
|
|
2328
|
+
Oo as useResourceForm,
|
|
2329
|
+
It as useSaveChrome,
|
|
2330
|
+
rl as useSectionStates,
|
|
2331
|
+
ao as useSheetDiscardGuard,
|
|
2332
|
+
ho as useStepForm
|
|
2358
2333
|
};
|