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