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