@wssto2/vue-core 0.4.20 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Activity-C0NvjIi5.js → Activity-DX-RK9xj.js} +1 -1
- package/dist/{Changes-hoMHeAZt.js → Changes-_nARQ9IC.js} +1 -1
- package/dist/{General-9Sgxb74n.js → General-CkZoXu29.js} +1 -1
- package/dist/{NewRolePage-D-LunWMH.js → NewRolePage-OosTaMfZ.js} +2 -2
- package/dist/{ProfilePage-DJUDCyEr.js → ProfilePage-Dn8fQ3ff.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-D-b-O6SG.js → RoleEditor.vue_vue_type_script_setup_true_lang-2IOio1Sa.js} +1 -1
- package/dist/{RolePage-Ha-EgoEJ.js → RolePage-33RUvHYD.js} +3 -3
- package/dist/{RolesPage-8uWWCClN.js → RolesPage-BGPoUCMP.js} +1 -1
- package/dist/{Sessions-Dz4KYMu9.js → Sessions-BbAdbjmG.js} +1 -1
- package/dist/{SignIn-CNv68Tba.js → SignIn-DDCRzlUq.js} +1 -1
- package/dist/{SignInPage-CsjC4aiV.js → SignInPage-D9jryXA7.js} +1 -1
- package/dist/{SignIns-CgsNf8uf.js → SignIns-C_5sRrB4.js} +1 -1
- package/dist/{UserRecord-B9r_9U1z.js → UserRecord-CUhbz62x.js} +3 -3
- package/dist/{UsersList-BBLa3OCv.js → UsersList-BE8fnICz.js} +3 -3
- package/dist/access/index.js +1 -1
- package/dist/form/CommandDialog.vue.d.ts +4 -1
- package/dist/form/index.js +721 -712
- package/dist/form/useCommand.d.ts +18 -0
- package/dist/identity/index.js +1 -1
- package/dist/{index-D6BjUQJT.js → index-C3HWRCEe.js} +4 -4
- package/dist/{index-Dxu7ZfCC.js → index-DiEoRV9D.js} +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{status-BLTC7wi1.js → status-UWWFHi9t.js} +1 -1
- package/dist/useCommand-VIZE7xG-.js +168 -0
- package/package.json +1 -1
- package/dist/useCommand-YN9EMb7s.js +0 -138
package/dist/form/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { _ as Me, s as He, c as Se, f as et } from "../FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
2
2
|
import { E as Ko, u as Ao, a as Ho } from "../FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
3
|
-
import { f as De, u as st } from "../useCommand-
|
|
4
|
-
import { _ as Yo, a as Wo } from "../useCommand-
|
|
5
|
-
import { ref as N, computed as k, defineComponent as P, openBlock as
|
|
3
|
+
import { f as De, u as st } from "../useCommand-VIZE7xG-.js";
|
|
4
|
+
import { _ as Yo, a as Wo } from "../useCommand-VIZE7xG-.js";
|
|
5
|
+
import { ref as N, computed as k, defineComponent as P, openBlock as u, createBlock as O, mergeProps as Q, unref as s, createSlots as ee, withCtx as v, createElementVNode as b, normalizeClass as j, createElementBlock as y, Fragment as ue, renderList as we, createVNode as M, createCommentVNode as T, toDisplayString as _, renderSlot as C, mergeDefaults as ce, useModel as ie, useId as je, withKeys as Ce, withModifiers as be, createTextVNode as Y, mergeModels as se, useTemplateRef as H, shallowRef as Le, watch as de, normalizeProps as Ve, guardReactiveProps as qe, nextTick as he, provide as Re, inject as tt, onBeforeUnmount as Ee, onMounted as rt, toRef as it, toValue as Oe, 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
7
|
import { M as Zo, c as Xo, i as Qo, l as en, u as tn } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
8
|
import { _ as ln } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
|
|
9
9
|
import { u as nn } from "../useResourceForm-CP2lCwmD.js";
|
|
10
10
|
import { _ as te } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
|
-
import { u as at, _ as ye, f as fe, b as
|
|
11
|
+
import { u as at, _ as ye, f as fe, b as ve, a as lt, c as Ge, e as vt, h as mt, i as pt, d as bt } from "../control-B4SdblL6.js";
|
|
12
12
|
import { useI18n as oe } from "vue-i18n";
|
|
13
13
|
import { b as gt } from "../controlSurface-t7OEFESJ.js";
|
|
14
14
|
import { a as yt } from "../TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
|
|
15
15
|
import { _ as rn } from "../TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
|
|
16
16
|
import { u as ht, l as kt } from "../suggestions-DHJFKB26.js";
|
|
17
17
|
import { r as dn } from "../suggestions-DHJFKB26.js";
|
|
18
|
-
import { s as $e, u as Ye, i as
|
|
18
|
+
import { s as $e, u as Ye, i as wt, o as _e, e as Fe, k as xt, _ as $t, l as _t, c as St, b as Ct, t as ze, g as Ft, q as Bt } from "../useTypedEntry-C7k7Dyl-.js";
|
|
19
19
|
import { u as Lt, a as Tt, s as zt } from "../DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js";
|
|
20
20
|
import { _ as fn } from "../DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js";
|
|
21
21
|
import { _ as ot } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
@@ -23,11 +23,11 @@ import { u as Dt } from "../format-D8X4zsx6.js";
|
|
|
23
23
|
import { u as Ne } from "../mediaQuery-CygcXmFW.js";
|
|
24
24
|
import { _ as Pe } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
|
|
25
25
|
import { u as Vt } from "../TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js";
|
|
26
|
-
import { _ as
|
|
26
|
+
import { _ as mn } from "../TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js";
|
|
27
27
|
import { _ as ge } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
28
28
|
import { _ as qt, r as Rt } from "../FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
|
|
29
29
|
import { a as bn, c as gn, p as yn, u as hn } from "../FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
|
|
30
|
-
import { _ as
|
|
30
|
+
import { _ as wn } from "../FormView.vue_vue_type_script_setup_true_lang-Dbfg_jGh.js";
|
|
31
31
|
import { i as Ot } from "../intlLocale-CeRU44qJ.js";
|
|
32
32
|
import { a as Mt } from "../environment-Dva-SG8D.js";
|
|
33
33
|
import { _ as jt } from "../NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js";
|
|
@@ -49,15 +49,15 @@ import { _ as At, a as Ht } from "../SectionList.vue_vue_type_script_setup_true_
|
|
|
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
|
-
function Zt(
|
|
52
|
+
function Zt(l) {
|
|
53
53
|
const t = N(null);
|
|
54
54
|
return {
|
|
55
|
-
isDirty: k(() => t.value !== null && JSON.stringify(
|
|
56
|
-
markClean: () => t.value = JSON.stringify(
|
|
55
|
+
isDirty: k(() => t.value !== null && JSON.stringify(l()) !== t.value),
|
|
56
|
+
markClean: () => t.value = JSON.stringify(l())
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function ko(
|
|
60
|
-
const t = N(!1), e = Zt(
|
|
59
|
+
function ko(l) {
|
|
60
|
+
const t = N(!1), e = Zt(l), { 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: () => {
|
|
@@ -77,7 +77,7 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["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
|
+
}, wo = /* @__PURE__ */ P({
|
|
81
81
|
__name: "CardSelectField",
|
|
82
82
|
props: /* @__PURE__ */ ce({
|
|
83
83
|
label: {},
|
|
@@ -93,38 +93,38 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
93
93
|
modelValue: {},
|
|
94
94
|
options: {},
|
|
95
95
|
columns: {}
|
|
96
|
-
}, { ...
|
|
96
|
+
}, { ...ve, modelValue: null, columns: 2 }),
|
|
97
97
|
emits: ["update:modelValue"],
|
|
98
|
-
setup(
|
|
99
|
-
const e =
|
|
100
|
-
return (
|
|
98
|
+
setup(l, { emit: t }) {
|
|
99
|
+
const e = l, a = t, { editable: o } = at(e), n = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, d = k(() => n[e.columns]);
|
|
100
|
+
return (i, m) => (u(), O(ye, Q(s(fe)(e), {
|
|
101
101
|
value: e.options.find((h) => h.value === e.modelValue)?.label ?? null,
|
|
102
102
|
"row-layout": "stacked"
|
|
103
103
|
}), ee({
|
|
104
|
-
default:
|
|
105
|
-
|
|
104
|
+
default: v(({ id: h, describedby: x, invalid: w }) => [
|
|
105
|
+
b("div", {
|
|
106
106
|
id: h,
|
|
107
107
|
role: "radiogroup",
|
|
108
108
|
"aria-label": e.label,
|
|
109
|
-
"aria-describedby":
|
|
110
|
-
"aria-invalid":
|
|
111
|
-
class: j(["grid w-full gap-2.5",
|
|
109
|
+
"aria-describedby": x,
|
|
110
|
+
"aria-invalid": w || void 0,
|
|
111
|
+
class: j(["grid w-full gap-2.5", d.value]),
|
|
112
112
|
"data-test": "card-select"
|
|
113
113
|
}, [
|
|
114
|
-
(
|
|
114
|
+
(u(!0), y(ue, null, we(e.options, (r) => (u(), y("label", {
|
|
115
115
|
key: r.value,
|
|
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(
|
|
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(o) || r.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
118
|
+
b("input", {
|
|
119
119
|
type: "radio",
|
|
120
120
|
class: "sr-only",
|
|
121
121
|
name: e.name ?? h,
|
|
122
122
|
value: r.value,
|
|
123
123
|
checked: r.value === e.modelValue,
|
|
124
|
-
disabled: e.disabled || !s(
|
|
124
|
+
disabled: e.disabled || !s(o) || r.disabled,
|
|
125
125
|
onChange: (f) => a("update:modelValue", r.value)
|
|
126
126
|
}, null, 40, Qt),
|
|
127
|
-
r.icon ? (
|
|
127
|
+
r.icon ? (u(), y("span", {
|
|
128
128
|
key: 0,
|
|
129
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
|
}, [
|
|
@@ -133,11 +133,11 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
133
133
|
size: 18
|
|
134
134
|
}, null, 8, ["name"])
|
|
135
135
|
], 2)) : T("", !0),
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
r.description ? (
|
|
136
|
+
b("span", ea, [
|
|
137
|
+
b("span", ta, _(r.label), 1),
|
|
138
|
+
r.description ? (u(), y("span", aa, _(r.description), 1)) : T("", !0)
|
|
139
139
|
]),
|
|
140
|
-
r.value === e.modelValue ? (
|
|
140
|
+
r.value === e.modelValue ? (u(), y("span", la, [
|
|
141
141
|
M(s(te), {
|
|
142
142
|
name: "checkCustom",
|
|
143
143
|
size: 12
|
|
@@ -148,24 +148,24 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
148
148
|
]),
|
|
149
149
|
_: 2
|
|
150
150
|
}, [
|
|
151
|
-
|
|
151
|
+
i.$slots.trailing ? {
|
|
152
152
|
name: "trailing",
|
|
153
|
-
fn:
|
|
154
|
-
C(
|
|
153
|
+
fn: v(() => [
|
|
154
|
+
C(i.$slots, "trailing")
|
|
155
155
|
]),
|
|
156
156
|
key: "0"
|
|
157
157
|
} : void 0,
|
|
158
|
-
|
|
158
|
+
i.$slots.labelTrailing ? {
|
|
159
159
|
name: "labelTrailing",
|
|
160
|
-
fn:
|
|
161
|
-
C(
|
|
160
|
+
fn: v(() => [
|
|
161
|
+
C(i.$slots, "labelTrailing")
|
|
162
162
|
]),
|
|
163
163
|
key: "1"
|
|
164
164
|
} : void 0,
|
|
165
|
-
|
|
165
|
+
i.$slots.readonly ? {
|
|
166
166
|
name: "readonly",
|
|
167
|
-
fn:
|
|
168
|
-
C(
|
|
167
|
+
fn: v(() => [
|
|
168
|
+
C(i.$slots, "readonly")
|
|
169
169
|
]),
|
|
170
170
|
key: "2"
|
|
171
171
|
} : void 0
|
|
@@ -174,7 +174,7 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["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"], xo = /* @__PURE__ */ P({
|
|
178
178
|
__name: "CheckboxField",
|
|
179
179
|
props: /* @__PURE__ */ se({
|
|
180
180
|
label: {},
|
|
@@ -187,59 +187,59 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
187
187
|
modelModifiers: {}
|
|
188
188
|
}),
|
|
189
189
|
emits: ["update:modelValue"],
|
|
190
|
-
setup(
|
|
191
|
-
const t =
|
|
190
|
+
setup(l) {
|
|
191
|
+
const t = l, e = ie(l, "modelValue"), a = !!lt(), o = je(), n = () => {
|
|
192
192
|
t.disabled || (e.value = !e.value);
|
|
193
193
|
};
|
|
194
|
-
return (
|
|
194
|
+
return (d, i) => (u(), y("div", {
|
|
195
195
|
"data-field-error": t.error ? "true" : void 0
|
|
196
196
|
}, [
|
|
197
|
-
|
|
197
|
+
b("div", {
|
|
198
198
|
role: "checkbox",
|
|
199
199
|
"aria-checked": e.value,
|
|
200
200
|
"aria-disabled": t.disabled || void 0,
|
|
201
|
-
"aria-describedby": t.error ? `${s(
|
|
201
|
+
"aria-describedby": t.error ? `${s(o)}-error` : void 0,
|
|
202
202
|
"aria-invalid": t.error ? !0 : void 0,
|
|
203
203
|
tabindex: t.disabled ? -1 : 0,
|
|
204
204
|
"data-test": "checkbox",
|
|
205
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:
|
|
206
|
+
onClick: n,
|
|
207
207
|
onKeydown: [
|
|
208
|
-
Ce(be(
|
|
209
|
-
Ce(be(
|
|
208
|
+
Ce(be(n, ["prevent"]), ["space"]),
|
|
209
|
+
Ce(be(n, ["prevent"]), ["enter"])
|
|
210
210
|
]
|
|
211
211
|
}, [
|
|
212
|
-
|
|
212
|
+
b("span", {
|
|
213
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 ? (
|
|
216
|
+
e.value ? (u(), O(s(te), {
|
|
217
217
|
key: 0,
|
|
218
218
|
name: "checkCustom",
|
|
219
219
|
size: 12
|
|
220
220
|
})) : T("", !0)
|
|
221
221
|
], 2),
|
|
222
|
-
|
|
222
|
+
b("div", {
|
|
223
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
|
-
|
|
225
|
+
b("div", sa, [
|
|
226
|
+
b("p", {
|
|
227
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
|
}, _(t.label), 3),
|
|
229
|
-
t.description ? (
|
|
229
|
+
t.description ? (u(), y("p", {
|
|
230
230
|
key: 0,
|
|
231
231
|
class: j(["tabular-nums text-content-muted", t.variant === "row" ? "text-footnote" : "text-xs"])
|
|
232
232
|
}, _(t.description), 3)) : T("", !0),
|
|
233
|
-
C(
|
|
233
|
+
C(d.$slots, "default")
|
|
234
234
|
]),
|
|
235
|
-
|
|
236
|
-
C(
|
|
235
|
+
d.$slots.trailing ? (u(), y("div", ra, [
|
|
236
|
+
C(d.$slots, "trailing")
|
|
237
237
|
])) : T("", !0)
|
|
238
238
|
], 2)
|
|
239
239
|
], 42, na),
|
|
240
|
-
t.error ? (
|
|
240
|
+
t.error ? (u(), y("p", {
|
|
241
241
|
key: 0,
|
|
242
|
-
id: `${s(
|
|
242
|
+
id: `${s(o)}-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
|
}, [
|
|
@@ -269,37 +269,37 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
269
269
|
presentation: {},
|
|
270
270
|
name: {},
|
|
271
271
|
options: {}
|
|
272
|
-
}, { ...
|
|
272
|
+
}, { ...ve }), {
|
|
273
273
|
modelValue: { default: () => [] },
|
|
274
274
|
modelModifiers: {}
|
|
275
275
|
}),
|
|
276
276
|
emits: ["update:modelValue"],
|
|
277
|
-
setup(
|
|
278
|
-
const t =
|
|
279
|
-
return (
|
|
280
|
-
value: t.options.filter((
|
|
277
|
+
setup(l) {
|
|
278
|
+
const t = l, e = ie(l, "modelValue"), a = (o) => e.value = e.value.includes(o) ? e.value.filter((n) => n !== o) : [...e.value, o];
|
|
279
|
+
return (o, n) => (u(), O(ye, Q(s(fe)(t), {
|
|
280
|
+
value: t.options.filter((d) => e.value.includes(d.value)).map((d) => d.label).join(", ") || null,
|
|
281
281
|
"row-layout": "stacked"
|
|
282
282
|
}), ee({
|
|
283
|
-
default:
|
|
284
|
-
t.options.length === 0 ? (
|
|
283
|
+
default: v(({ id: d, describedby: i, invalid: m }) => [
|
|
284
|
+
t.options.length === 0 ? (u(), y("span", ua, "—")) : (u(), y("div", {
|
|
285
285
|
key: 1,
|
|
286
|
-
id:
|
|
286
|
+
id: d,
|
|
287
287
|
role: "group",
|
|
288
288
|
"aria-label": t.label,
|
|
289
|
-
"aria-describedby":
|
|
290
|
-
"aria-invalid":
|
|
289
|
+
"aria-describedby": i,
|
|
290
|
+
"aria-invalid": m || void 0,
|
|
291
291
|
class: "flex flex-wrap gap-1.5 py-1",
|
|
292
292
|
"data-test": "choice-chips"
|
|
293
293
|
}, [
|
|
294
|
-
(
|
|
294
|
+
(u(!0), y(ue, null, we(t.options, (h) => (u(), y("button", {
|
|
295
295
|
key: h.value,
|
|
296
296
|
type: "button",
|
|
297
297
|
"aria-pressed": e.value.includes(h.value),
|
|
298
298
|
disabled: t.disabled || h.disabled,
|
|
299
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(h.value) ? "bg-tint-soft font-semibold text-content-link" : "bg-fill font-medium text-content-strong hover:bg-fill-strong"]),
|
|
300
|
-
onClick: (
|
|
300
|
+
onClick: (x) => a(h.value)
|
|
301
301
|
}, [
|
|
302
|
-
e.value.includes(h.value) ? (
|
|
302
|
+
e.value.includes(h.value) ? (u(), O(s(te), {
|
|
303
303
|
key: 0,
|
|
304
304
|
name: "checkCustom",
|
|
305
305
|
size: 12
|
|
@@ -310,24 +310,24 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
310
310
|
]),
|
|
311
311
|
_: 2
|
|
312
312
|
}, [
|
|
313
|
-
|
|
313
|
+
o.$slots.trailing ? {
|
|
314
314
|
name: "trailing",
|
|
315
|
-
fn:
|
|
316
|
-
C(
|
|
315
|
+
fn: v(() => [
|
|
316
|
+
C(o.$slots, "trailing")
|
|
317
317
|
]),
|
|
318
318
|
key: "0"
|
|
319
319
|
} : void 0,
|
|
320
|
-
|
|
320
|
+
o.$slots.labelTrailing ? {
|
|
321
321
|
name: "labelTrailing",
|
|
322
|
-
fn:
|
|
323
|
-
C(
|
|
322
|
+
fn: v(() => [
|
|
323
|
+
C(o.$slots, "labelTrailing")
|
|
324
324
|
]),
|
|
325
325
|
key: "1"
|
|
326
326
|
} : void 0,
|
|
327
|
-
|
|
327
|
+
o.$slots.readonly ? {
|
|
328
328
|
name: "readonly",
|
|
329
|
-
fn:
|
|
330
|
-
C(
|
|
329
|
+
fn: v(() => [
|
|
330
|
+
C(o.$slots, "readonly")
|
|
331
331
|
]),
|
|
332
332
|
key: "2"
|
|
333
333
|
} : void 0
|
|
@@ -337,7 +337,7 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
337
337
|
key: 0,
|
|
338
338
|
class: "flex shrink-0 items-center",
|
|
339
339
|
"data-test": "field-value"
|
|
340
|
-
},
|
|
340
|
+
}, va = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], ma = { class: "block break-words text-body text-content-strong" }, _o = /* @__PURE__ */ P({
|
|
341
341
|
__name: "ComboField",
|
|
342
342
|
props: /* @__PURE__ */ se(/* @__PURE__ */ ce({
|
|
343
343
|
label: {},
|
|
@@ -360,13 +360,13 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
360
360
|
recents: {},
|
|
361
361
|
width: {},
|
|
362
362
|
rowLayout: {}
|
|
363
|
-
}, { ...
|
|
363
|
+
}, { ...ve, 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 }), {
|
|
364
364
|
modelValue: { default: null },
|
|
365
365
|
modelModifiers: {}
|
|
366
366
|
}),
|
|
367
367
|
emits: /* @__PURE__ */ se(["picked", "focus", "blur"], ["update:modelValue"]),
|
|
368
|
-
setup(
|
|
369
|
-
const a =
|
|
368
|
+
setup(l, { expose: t, emit: e }) {
|
|
369
|
+
const a = l, o = ie(l, "modelValue"), n = e, { t: d } = oe(), i = !!lt(), m = Ge("text", () => a.error ? "error" : a.disabled ? "locked" : "rest"), h = k(() => a.rowLayout === "stacked"), x = k(() => i && !h.value ? gt(a.width) : "w-full"), w = H("input"), r = H("anchor"), f = Le(null), g = Le(""), S = ht({
|
|
370
370
|
source: () => a.search ?? a.options,
|
|
371
371
|
minLength: () => a.minLength,
|
|
372
372
|
debounce: () => a.debounce,
|
|
@@ -374,44 +374,44 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
374
374
|
listAllWhenEmpty: !0,
|
|
375
375
|
recents: () => a.recents
|
|
376
376
|
}), { items: z, open: $, status: I, highlighted: F, showingRecent: E } = S, R = k(() => {
|
|
377
|
-
const D =
|
|
377
|
+
const D = o.value;
|
|
378
378
|
return D === null ? null : [f.value, a.selected, ...a.options ?? []].find((A) => A?.value === D) ?? null;
|
|
379
379
|
});
|
|
380
380
|
de(R, (D) => {
|
|
381
381
|
$.value || (g.value = D?.label ?? "");
|
|
382
382
|
}, { immediate: !0 });
|
|
383
383
|
function Z(D) {
|
|
384
|
-
g.value = D.target.value, S.ask(g.value), g.value === "" && (
|
|
384
|
+
g.value = D.target.value, S.ask(g.value), g.value === "" && (o.value = null, f.value = null);
|
|
385
385
|
}
|
|
386
386
|
function W(D) {
|
|
387
|
-
|
|
387
|
+
n("focus", D), a.disabled || S.show("");
|
|
388
388
|
}
|
|
389
389
|
function J(D) {
|
|
390
|
-
S.close(), S.remember(D), f.value = D,
|
|
390
|
+
S.close(), S.remember(D), f.value = D, o.value = D.value, g.value = D.label, n("picked", D);
|
|
391
391
|
}
|
|
392
392
|
function ae(D) {
|
|
393
|
-
S.close(), g.value = R.value?.label ?? "",
|
|
393
|
+
S.close(), g.value = R.value?.label ?? "", n("blur", D);
|
|
394
394
|
}
|
|
395
|
-
const
|
|
396
|
-
return t({ focus: () =>
|
|
395
|
+
const me = k(() => kt($.value, z.value.length, I.value, !0));
|
|
396
|
+
return t({ focus: () => w.value?.focus() }), (D, A) => (u(), O(ye, Q(s(fe)(a), {
|
|
397
397
|
value: R.value?.label ?? null,
|
|
398
398
|
"row-layout": a.rowLayout
|
|
399
399
|
}), ee({
|
|
400
|
-
default:
|
|
401
|
-
|
|
400
|
+
default: v(({ id: G, describedby: ne, invalid: re }) => [
|
|
401
|
+
b("div", {
|
|
402
402
|
ref_key: "anchor",
|
|
403
403
|
ref: r,
|
|
404
|
-
class: j(["flex items-center gap-1.5", [s(
|
|
404
|
+
class: j(["flex items-center gap-1.5", [s(m), x.value]])
|
|
405
405
|
}, [
|
|
406
|
-
D.$slots.value && R.value ? (
|
|
406
|
+
D.$slots.value && R.value ? (u(), y("span", fa, [
|
|
407
407
|
C(D.$slots, "value", {
|
|
408
408
|
option: R.value
|
|
409
409
|
})
|
|
410
410
|
])) : T("", !0),
|
|
411
|
-
|
|
411
|
+
b("input", {
|
|
412
412
|
id: G,
|
|
413
413
|
ref_key: "input",
|
|
414
|
-
ref:
|
|
414
|
+
ref: w,
|
|
415
415
|
role: "combobox",
|
|
416
416
|
type: "text",
|
|
417
417
|
autocomplete: "off",
|
|
@@ -421,18 +421,18 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
421
421
|
disabled: a.disabled,
|
|
422
422
|
required: a.required,
|
|
423
423
|
"aria-autocomplete": "list",
|
|
424
|
-
"aria-expanded":
|
|
424
|
+
"aria-expanded": me.value,
|
|
425
425
|
"aria-controls": `${G}-list`,
|
|
426
|
-
"aria-activedescendant":
|
|
426
|
+
"aria-activedescendant": me.value && s(z).length > 0 ? `${G}-option-${s(F)}` : void 0,
|
|
427
427
|
"aria-required": a.required || void 0,
|
|
428
428
|
"aria-invalid": re || void 0,
|
|
429
429
|
"aria-describedby": ne,
|
|
430
|
-
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",
|
|
430
|
+
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", i && !h.value ? "compact:text-right" : ""]),
|
|
431
431
|
onInput: Z,
|
|
432
432
|
onFocus: W,
|
|
433
433
|
onBlur: ae,
|
|
434
434
|
onKeydown: A[0] || (A[0] = (le) => s(S).keydown(le, { pick: J, enterNeedsMove: !1 }))
|
|
435
|
-
}, null, 42,
|
|
435
|
+
}, null, 42, va),
|
|
436
436
|
M(s(te), {
|
|
437
437
|
name: "search",
|
|
438
438
|
size: 14,
|
|
@@ -449,14 +449,14 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
449
449
|
status: s(I),
|
|
450
450
|
recent: s(E),
|
|
451
451
|
"empty-message": !0,
|
|
452
|
-
selected:
|
|
453
|
-
hint: s(
|
|
452
|
+
selected: o.value,
|
|
453
|
+
hint: s(d)("core.form.suggestions.keys_pick"),
|
|
454
454
|
onPick: J,
|
|
455
455
|
onHover: A[1] || (A[1] = (le) => s(S).highlight(le))
|
|
456
456
|
}, ee({ _: 2 }, [
|
|
457
457
|
D.$slots.option ? {
|
|
458
458
|
name: "option",
|
|
459
|
-
fn:
|
|
459
|
+
fn: v((le) => [
|
|
460
460
|
C(D.$slots, "option", Ve(qe(le)))
|
|
461
461
|
]),
|
|
462
462
|
key: "0"
|
|
@@ -467,28 +467,28 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
467
467
|
}, [
|
|
468
468
|
D.$slots.trailing ? {
|
|
469
469
|
name: "trailing",
|
|
470
|
-
fn:
|
|
470
|
+
fn: v(() => [
|
|
471
471
|
C(D.$slots, "trailing")
|
|
472
472
|
]),
|
|
473
473
|
key: "0"
|
|
474
474
|
} : void 0,
|
|
475
475
|
D.$slots.labelTrailing ? {
|
|
476
476
|
name: "labelTrailing",
|
|
477
|
-
fn:
|
|
477
|
+
fn: v(() => [
|
|
478
478
|
C(D.$slots, "labelTrailing")
|
|
479
479
|
]),
|
|
480
480
|
key: "1"
|
|
481
481
|
} : void 0,
|
|
482
482
|
D.$slots.readonly ? {
|
|
483
483
|
name: "readonly",
|
|
484
|
-
fn:
|
|
484
|
+
fn: v(() => [
|
|
485
485
|
C(D.$slots, "readonly")
|
|
486
486
|
]),
|
|
487
487
|
key: "2"
|
|
488
488
|
} : D.$slots.value && R.value ? {
|
|
489
489
|
name: "readonly",
|
|
490
|
-
fn:
|
|
491
|
-
|
|
490
|
+
fn: v(() => [
|
|
491
|
+
b("span", ma, [
|
|
492
492
|
C(D.$slots, "value", {
|
|
493
493
|
option: R.value
|
|
494
494
|
})
|
|
@@ -504,7 +504,7 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
504
504
|
}, ba = { class: "whitespace-nowrap" }, ga = { class: "whitespace-nowrap" }, ya = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ha = ["aria-label", "onClick"], ka = {
|
|
505
505
|
class: "-m-3 flex",
|
|
506
506
|
"data-test": "date-time-popover"
|
|
507
|
-
},
|
|
507
|
+
}, wa = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, xa = {
|
|
508
508
|
key: 0,
|
|
509
509
|
class: "border-t border-border-separator pt-2.5"
|
|
510
510
|
}, $a = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, _a = ["for"], Sa = ["id", "value", "placeholder", "aria-invalid"], Ca = ["onClick"], So = /* @__PURE__ */ P({
|
|
@@ -526,34 +526,34 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
526
526
|
openOn: {},
|
|
527
527
|
minuteStep: {},
|
|
528
528
|
quickPicks: {}
|
|
529
|
-
}, { ...
|
|
529
|
+
}, { ...ve, min: void 0, max: void 0, disabledDates: void 0, openOn: void 0, minuteStep: 1, quickPicks: void 0 }), {
|
|
530
530
|
modelValue: { default: null },
|
|
531
531
|
modelModifiers: {}
|
|
532
532
|
}),
|
|
533
533
|
emits: /* @__PURE__ */ se(["focus", "blur"], ["update:modelValue"]),
|
|
534
|
-
setup(
|
|
535
|
-
const a =
|
|
534
|
+
setup(l, { expose: t, emit: e }) {
|
|
535
|
+
const a = l, o = ie(l, "modelValue"), n = e, { t: d } = oe(), i = Dt(), m = Ne(), h = H("input"), x = H("popover"), w = H("calendar"), r = H("sheet"), f = k(() => ({ min: a.min?.slice(0, 10), max: a.max?.slice(0, 10), disabled: a.disabledDates })), g = k(() => a.min && a.min.length === 10 ? `${a.min}T00:00` : a.min), S = k(() => a.max && a.max.length === 10 ? `${a.max}T23:59` : a.max), z = (L, c) => !Ft(c, { disabled: a.disabledDates }) && (!g.value || L >= g.value) && (!S.value || L <= S.value), $ = Lt(() => f.value), I = Vt(() => a.minuteStep), F = k(() => $e(o.value));
|
|
536
536
|
function E(L) {
|
|
537
|
-
const { date:
|
|
538
|
-
if (!
|
|
537
|
+
const { date: c, time: V } = zt(L), p = c === null ? F.value.day ?? Fe() : $.parse(c);
|
|
538
|
+
if (!p) return { error: $.invalidMessage() };
|
|
539
539
|
let q = F.value.time ?? ze(a.minuteStep);
|
|
540
540
|
if (V !== null) {
|
|
541
541
|
const K = I.parse(V);
|
|
542
542
|
if ("error" in K) return K;
|
|
543
543
|
q = K.value;
|
|
544
544
|
}
|
|
545
|
-
const B = _e(
|
|
546
|
-
return z(B,
|
|
545
|
+
const B = _e(p, q);
|
|
546
|
+
return z(B, p) ? { value: B } : { error: $.unavailableMessage() };
|
|
547
547
|
}
|
|
548
|
-
const R = Ye({ model:
|
|
548
|
+
const R = Ye({ model: o, display: (L) => `${i.date($e(L).day)} ${$e(L).time ?? ""}`.trim(), parse: E }), Z = k({
|
|
549
549
|
get: () => F.value.time,
|
|
550
550
|
set: (L) => {
|
|
551
|
-
L &&
|
|
551
|
+
L && wt(L) && (o.value = _e(F.value.day ?? Fe(), L));
|
|
552
552
|
}
|
|
553
|
-
}), W = Ye({ model: Z, display: (L) => L, parse: I.parse }), J = Tt(() => a.quickPicks ?? (
|
|
553
|
+
}), W = Ye({ model: Z, display: (L) => L, parse: I.parse }), J = Tt(() => a.quickPicks ?? (m.value ? void 0 : []), () => m.value, () => f.value), ae = k(() => a.error || R.message.value || W.message.value), me = k(() => o.value ? i.dateTime(o.value) : null), D = Ge("date", () => ae.value ? "error" : a.disabled ? "locked" : "rest"), A = k(() => {
|
|
554
554
|
const L = R.typed.value;
|
|
555
555
|
return L ? $e(L).day ?? null : null;
|
|
556
|
-
}), G = k(() => A.value ?? (
|
|
556
|
+
}), G = k(() => A.value ?? (xt(F.value.day) ? F.value.day : null)), ne = k(() => R.typed.value ? $e(R.typed.value).time : F.value.time);
|
|
557
557
|
function re(L) {
|
|
558
558
|
L && R.set(_e(L, F.value.time ?? ze(a.minuteStep)));
|
|
559
559
|
}
|
|
@@ -563,30 +563,30 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
563
563
|
function ke(L) {
|
|
564
564
|
R.set(_e(Fe(), ze(a.minuteStep))), L();
|
|
565
565
|
}
|
|
566
|
-
const
|
|
566
|
+
const xe = je();
|
|
567
567
|
async function X(L) {
|
|
568
|
-
a.disabled || (
|
|
568
|
+
a.disabled || (x.value?.present(), L && (await he(), await he(), w.value?.focus()));
|
|
569
569
|
}
|
|
570
570
|
function pe(L) {
|
|
571
|
-
L.key === "Enter" ? (R.commit(),
|
|
571
|
+
L.key === "Enter" ? (R.commit(), x.value?.dismiss()) : L.key === "ArrowDown" && (L.preventDefault(), X(!0));
|
|
572
572
|
}
|
|
573
|
-
return t({ focus: () => h.value?.focus() }), (L,
|
|
574
|
-
value:
|
|
573
|
+
return t({ focus: () => h.value?.focus() }), (L, c) => (u(), O(ye, Q({ ...s(fe)(a), error: ae.value }, {
|
|
574
|
+
value: me.value,
|
|
575
575
|
"value-style": "numeric"
|
|
576
576
|
}), ee({
|
|
577
|
-
default:
|
|
578
|
-
s(
|
|
579
|
-
M(ot, Q({ id: V, "aria-describedby":
|
|
577
|
+
default: v(({ id: V, describedby: p, invalid: q }) => [
|
|
578
|
+
s(m) ? (u(), y(ue, { key: 0 }, [
|
|
579
|
+
M(ot, Q({ id: V, "aria-describedby": p }, {
|
|
580
580
|
disabled: a.disabled,
|
|
581
581
|
invalid: q,
|
|
582
|
-
placeholder: s(
|
|
583
|
-
onClick:
|
|
582
|
+
placeholder: s(d)("core.form.select.choose"),
|
|
583
|
+
onClick: c[0] || (c[0] = (B) => r.value?.present())
|
|
584
584
|
}), {
|
|
585
|
-
default:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
585
|
+
default: v(() => [
|
|
586
|
+
o.value ? (u(), y("span", pa, [
|
|
587
|
+
b("span", ba, _(s(i).date(F.value.day)), 1),
|
|
588
|
+
c[8] || (c[8] = Y(_(" "), -1)),
|
|
589
|
+
b("span", ga, _(F.value.time), 1)
|
|
590
590
|
])) : T("", !0)
|
|
591
591
|
]),
|
|
592
592
|
_: 1
|
|
@@ -594,9 +594,9 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
594
594
|
M($t, {
|
|
595
595
|
ref_key: "sheet",
|
|
596
596
|
ref: r,
|
|
597
|
-
title: a.label ?? s(
|
|
597
|
+
title: a.label ?? s(d)("core.form.date.calendar"),
|
|
598
598
|
mode: "datetime",
|
|
599
|
-
"model-value":
|
|
599
|
+
"model-value": o.value,
|
|
600
600
|
min: f.value.min,
|
|
601
601
|
max: f.value.max,
|
|
602
602
|
"disabled-dates": a.disabledDates,
|
|
@@ -606,21 +606,21 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
606
606
|
clearable: !a.required,
|
|
607
607
|
"onUpdate:modelValue": s(R).set
|
|
608
608
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
609
|
-
], 64)) : (
|
|
609
|
+
], 64)) : (u(), O(Pe, {
|
|
610
610
|
key: 1,
|
|
611
611
|
ref_key: "popover",
|
|
612
|
-
ref:
|
|
613
|
-
label: a.label ?? s(
|
|
612
|
+
ref: x,
|
|
613
|
+
label: a.label ?? s(d)("core.form.date.calendar"),
|
|
614
614
|
width: "auto",
|
|
615
615
|
placement: "bottom-start",
|
|
616
616
|
arrow: !1,
|
|
617
617
|
autofocus: !1
|
|
618
618
|
}, {
|
|
619
|
-
trigger:
|
|
620
|
-
|
|
619
|
+
trigger: v(({ attrs: B, presented: K }) => [
|
|
620
|
+
b("div", {
|
|
621
621
|
class: j(["inline-flex max-w-full items-center gap-2", s(D)])
|
|
622
622
|
}, [
|
|
623
|
-
|
|
623
|
+
b("input", Q({
|
|
624
624
|
id: V,
|
|
625
625
|
ref_key: "input",
|
|
626
626
|
ref: h
|
|
@@ -636,23 +636,23 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
636
636
|
required: a.required,
|
|
637
637
|
"aria-required": a.required || void 0,
|
|
638
638
|
"aria-invalid": q || void 0,
|
|
639
|
-
"aria-describedby":
|
|
639
|
+
"aria-describedby": p,
|
|
640
640
|
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",
|
|
641
|
-
onInput:
|
|
642
|
-
onFocus:
|
|
643
|
-
onBlur:
|
|
644
|
-
s(R).commit(),
|
|
641
|
+
onInput: c[1] || (c[1] = (U) => s(R).input(U.target.value)),
|
|
642
|
+
onFocus: c[2] || (c[2] = (U) => n("focus", U)),
|
|
643
|
+
onBlur: c[3] || (c[3] = (U) => {
|
|
644
|
+
s(R).commit(), n("blur", U);
|
|
645
645
|
}),
|
|
646
646
|
onKeydown: pe,
|
|
647
|
-
onClick:
|
|
647
|
+
onClick: c[4] || (c[4] = (U) => X(!1))
|
|
648
648
|
}), null, 16, ya),
|
|
649
|
-
a.disabled ? T("", !0) : (
|
|
649
|
+
a.disabled ? T("", !0) : (u(), y("button", {
|
|
650
650
|
key: 0,
|
|
651
651
|
type: "button",
|
|
652
652
|
tabindex: "-1",
|
|
653
|
-
"aria-label": s(
|
|
653
|
+
"aria-label": s(d)("core.form.date.open"),
|
|
654
654
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
655
|
-
onClick: (
|
|
655
|
+
onClick: (U) => K ? x.value?.dismiss() : X(!0)
|
|
656
656
|
}, [
|
|
657
657
|
M(s(te), {
|
|
658
658
|
name: "calendarLine",
|
|
@@ -661,12 +661,12 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
661
661
|
], 8, ha))
|
|
662
662
|
], 2)
|
|
663
663
|
]),
|
|
664
|
-
default:
|
|
665
|
-
|
|
666
|
-
|
|
664
|
+
default: v(({ dismiss: B }) => [
|
|
665
|
+
b("div", ka, [
|
|
666
|
+
b("div", wa, [
|
|
667
667
|
M(_t, {
|
|
668
668
|
ref_key: "calendar",
|
|
669
|
-
ref:
|
|
669
|
+
ref: w,
|
|
670
670
|
"model-value": G.value,
|
|
671
671
|
min: f.value.min,
|
|
672
672
|
max: f.value.max,
|
|
@@ -674,7 +674,7 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
674
674
|
"open-on": a.openOn,
|
|
675
675
|
"onUpdate:modelValue": re
|
|
676
676
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
677
|
-
s(J).length > 0 ? (
|
|
677
|
+
s(J).length > 0 ? (u(), y("div", xa, [
|
|
678
678
|
M(St, {
|
|
679
679
|
items: s(J),
|
|
680
680
|
selected: G.value,
|
|
@@ -682,13 +682,13 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
682
682
|
}, null, 8, ["items", "selected"])
|
|
683
683
|
])) : T("", !0)
|
|
684
684
|
]),
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
for: s(
|
|
685
|
+
b("div", $a, [
|
|
686
|
+
b("label", {
|
|
687
|
+
for: s(xe),
|
|
688
688
|
class: "text-footnote font-semibold text-content-muted"
|
|
689
|
-
}, _(s(
|
|
690
|
-
|
|
691
|
-
id: s(
|
|
689
|
+
}, _(s(d)("core.form.time.label")), 9, _a),
|
|
690
|
+
b("input", {
|
|
691
|
+
id: s(xe),
|
|
692
692
|
type: "text",
|
|
693
693
|
autocomplete: "off",
|
|
694
694
|
inputmode: "numeric",
|
|
@@ -696,20 +696,20 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
696
696
|
placeholder: s(I).placeholder.value,
|
|
697
697
|
"aria-invalid": s(W).message.value ? !0 : void 0,
|
|
698
698
|
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",
|
|
699
|
-
onInput:
|
|
700
|
-
onBlur:
|
|
701
|
-
onKeydown:
|
|
699
|
+
onInput: c[5] || (c[5] = (K) => s(W).input(K.target.value)),
|
|
700
|
+
onBlur: c[6] || (c[6] = (K) => s(W).commit()),
|
|
701
|
+
onKeydown: c[7] || (c[7] = Ce(be((K) => s(W).commit(), ["prevent"]), ["enter"]))
|
|
702
702
|
}, null, 40, Sa),
|
|
703
703
|
M(Ct, {
|
|
704
704
|
"model-value": ne.value,
|
|
705
705
|
step: a.minuteStep,
|
|
706
706
|
"onUpdate:modelValue": le
|
|
707
707
|
}, null, 8, ["model-value", "step"]),
|
|
708
|
-
|
|
708
|
+
b("button", {
|
|
709
709
|
type: "button",
|
|
710
710
|
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",
|
|
711
711
|
onClick: (K) => ke(B)
|
|
712
|
-
}, _(s(
|
|
712
|
+
}, _(s(d)("core.form.time.now")), 9, Ca)
|
|
713
713
|
])
|
|
714
714
|
])
|
|
715
715
|
]),
|
|
@@ -720,21 +720,21 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
720
720
|
}, [
|
|
721
721
|
L.$slots.trailing ? {
|
|
722
722
|
name: "trailing",
|
|
723
|
-
fn:
|
|
723
|
+
fn: v(() => [
|
|
724
724
|
C(L.$slots, "trailing")
|
|
725
725
|
]),
|
|
726
726
|
key: "0"
|
|
727
727
|
} : void 0,
|
|
728
728
|
L.$slots.labelTrailing ? {
|
|
729
729
|
name: "labelTrailing",
|
|
730
|
-
fn:
|
|
730
|
+
fn: v(() => [
|
|
731
731
|
C(L.$slots, "labelTrailing")
|
|
732
732
|
]),
|
|
733
733
|
key: "1"
|
|
734
734
|
} : void 0,
|
|
735
735
|
L.$slots.readonly ? {
|
|
736
736
|
name: "readonly",
|
|
737
|
-
fn:
|
|
737
|
+
fn: v(() => [
|
|
738
738
|
C(L.$slots, "readonly")
|
|
739
739
|
]),
|
|
740
740
|
key: "2"
|
|
@@ -742,19 +742,19 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Qt = ["name
|
|
|
742
742
|
]), 1040, ["value"]));
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
|
-
function nt(
|
|
745
|
+
function nt(l, t = {}) {
|
|
746
746
|
const e = t.accept ?? [];
|
|
747
747
|
if (e.length > 0) {
|
|
748
|
-
const a =
|
|
749
|
-
if (!e.some((
|
|
750
|
-
const
|
|
751
|
-
return
|
|
748
|
+
const a = l.name.lastIndexOf("."), o = a === -1 ? "" : l.name.slice(a).toLowerCase(), n = l.type.toLowerCase();
|
|
749
|
+
if (!e.some((i) => {
|
|
750
|
+
const m = i.trim().toLowerCase();
|
|
751
|
+
return m.startsWith(".") ? m === o : m.endsWith("/*") ? n.startsWith(m.slice(0, -1)) : m === n;
|
|
752
752
|
})) return "invalid_type";
|
|
753
753
|
}
|
|
754
|
-
return (t.maxSize ?? 0) > 0 &&
|
|
754
|
+
return (t.maxSize ?? 0) > 0 && l.size > (t.maxSize ?? 0) ? "too_large" : null;
|
|
755
755
|
}
|
|
756
|
-
function Be(
|
|
757
|
-
return
|
|
756
|
+
function Be(l) {
|
|
757
|
+
return l < 1024 ? `${l} B` : l < 1024 * 1024 ? `${Math.round(l / 1024)} KB` : `${(l / (1024 * 1024)).toFixed(l % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
758
758
|
}
|
|
759
759
|
const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], La = {
|
|
760
760
|
key: 0,
|
|
@@ -776,37 +776,37 @@ const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describe
|
|
|
776
776
|
variant: {},
|
|
777
777
|
accept: {},
|
|
778
778
|
maxSize: {}
|
|
779
|
-
}, { ...
|
|
779
|
+
}, { ...ve, variant: "button", accept: () => [], maxSize: 0 }), {
|
|
780
780
|
modelValue: { default: null },
|
|
781
781
|
modelModifiers: {}
|
|
782
782
|
}),
|
|
783
783
|
emits: ["update:modelValue"],
|
|
784
|
-
setup(
|
|
785
|
-
const e =
|
|
784
|
+
setup(l, { expose: t }) {
|
|
785
|
+
const e = l, a = ie(l, "modelValue"), { t: o } = oe(), n = H("chooser"), d = N(!1), i = N(null), m = k(() => {
|
|
786
786
|
if (e.hint) return e.hint;
|
|
787
|
-
const
|
|
788
|
-
return e.accept.length &&
|
|
787
|
+
const w = [];
|
|
788
|
+
return e.accept.length && w.push(o("core.form.file.allowed", { formats: e.accept.map((r) => r.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && w.push(o("core.form.file.max_size", { size: Be(e.maxSize) })), w.join(" · ") || void 0;
|
|
789
789
|
});
|
|
790
|
-
function h(
|
|
791
|
-
if (!
|
|
792
|
-
const r = nt(
|
|
793
|
-
r ? (
|
|
790
|
+
function h(w) {
|
|
791
|
+
if (!w) return;
|
|
792
|
+
const r = nt(w, { accept: e.accept, maxSize: e.maxSize });
|
|
793
|
+
r ? (i.value = r === "invalid_type" ? o("core.form.file.invalid_type") : o("core.form.file.too_large", { size: Be(e.maxSize) }), a.value = null) : (i.value = null, a.value = w);
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
a.value = null,
|
|
795
|
+
function x() {
|
|
796
|
+
a.value = null, i.value = null;
|
|
797
797
|
}
|
|
798
|
-
return de(a, (
|
|
799
|
-
!
|
|
800
|
-
}), t({ clear:
|
|
798
|
+
return de(a, (w) => {
|
|
799
|
+
!w && n.value && (n.value.value = "");
|
|
800
|
+
}), t({ clear: x }), (w, r) => (u(), O(ye, Q({ ...s(fe)(e), hint: m.value, error: i.value ?? e.error }, {
|
|
801
801
|
value: a.value?.name ?? null,
|
|
802
802
|
"row-layout": "stacked"
|
|
803
803
|
}), ee({
|
|
804
|
-
default:
|
|
805
|
-
|
|
806
|
-
|
|
804
|
+
default: v(({ id: f, describedby: g, invalid: S }) => [
|
|
805
|
+
b("div", Fa, [
|
|
806
|
+
b("input", {
|
|
807
807
|
id: f,
|
|
808
808
|
ref_key: "chooser",
|
|
809
|
-
ref:
|
|
809
|
+
ref: n,
|
|
810
810
|
type: "file",
|
|
811
811
|
class: "sr-only",
|
|
812
812
|
tabindex: "-1",
|
|
@@ -816,51 +816,51 @@ const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describe
|
|
|
816
816
|
"aria-invalid": S || void 0,
|
|
817
817
|
onChange: r[0] || (r[0] = (z) => h(z.target.files?.[0]))
|
|
818
818
|
}, null, 40, Ba),
|
|
819
|
-
a.value ? (
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
819
|
+
a.value ? (u(), y("div", La, [
|
|
820
|
+
b("div", Ta, [
|
|
821
|
+
b("p", za, _(a.value.name), 1),
|
|
822
|
+
b("p", Da, _(s(Be)(a.value.size)), 1)
|
|
823
823
|
]),
|
|
824
|
-
|
|
824
|
+
b("button", {
|
|
825
825
|
type: "button",
|
|
826
826
|
disabled: e.disabled,
|
|
827
|
-
"aria-label": s(
|
|
828
|
-
title: s(
|
|
827
|
+
"aria-label": s(o)("core.form.file.remove"),
|
|
828
|
+
title: s(o)("core.form.file.remove"),
|
|
829
829
|
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",
|
|
830
|
-
onClick:
|
|
830
|
+
onClick: x
|
|
831
831
|
}, [
|
|
832
832
|
M(s(te), {
|
|
833
833
|
name: "close",
|
|
834
834
|
size: 14
|
|
835
835
|
})
|
|
836
836
|
], 8, Va)
|
|
837
|
-
])) : e.variant === "dropzone" ? (
|
|
837
|
+
])) : e.variant === "dropzone" ? (u(), y("div", {
|
|
838
838
|
key: 1,
|
|
839
839
|
role: "button",
|
|
840
840
|
tabindex: "0",
|
|
841
841
|
"data-test": "file-dropzone",
|
|
842
842
|
"aria-disabled": e.disabled || void 0,
|
|
843
|
-
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",
|
|
844
|
-
onClick: r[1] || (r[1] = (z) => !e.disabled &&
|
|
843
|
+
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", d.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
844
|
+
onClick: r[1] || (r[1] = (z) => !e.disabled && n.value?.click()),
|
|
845
845
|
onKeydown: [
|
|
846
|
-
r[2] || (r[2] = Ce(be((z) => !e.disabled &&
|
|
847
|
-
r[3] || (r[3] = Ce(be((z) => !e.disabled &&
|
|
846
|
+
r[2] || (r[2] = Ce(be((z) => !e.disabled && n.value?.click(), ["prevent"]), ["enter"])),
|
|
847
|
+
r[3] || (r[3] = Ce(be((z) => !e.disabled && n.value?.click(), ["prevent"]), ["space"]))
|
|
848
848
|
],
|
|
849
|
-
onDragover: r[4] || (r[4] = be((z) =>
|
|
850
|
-
onDragleave: r[5] || (r[5] = be((z) =>
|
|
849
|
+
onDragover: r[4] || (r[4] = be((z) => d.value = !0, ["prevent"])),
|
|
850
|
+
onDragleave: r[5] || (r[5] = be((z) => d.value = !1, ["prevent"])),
|
|
851
851
|
onDrop: r[6] || (r[6] = be((z) => {
|
|
852
|
-
|
|
852
|
+
d.value = !1, e.disabled || h(z.dataTransfer?.files?.[0]);
|
|
853
853
|
}, ["prevent"]))
|
|
854
854
|
}, [
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
], 42, qa)) : (
|
|
855
|
+
b("span", Ra, _(s(o)("core.form.file.choose")), 1),
|
|
856
|
+
b("span", Oa, _(" " + s(o)("core.form.file.drop")), 1)
|
|
857
|
+
], 42, qa)) : (u(), O(ge, {
|
|
858
858
|
key: 2,
|
|
859
859
|
disabled: e.disabled,
|
|
860
|
-
onClick: r[7] || (r[7] = (z) =>
|
|
860
|
+
onClick: r[7] || (r[7] = (z) => n.value?.click())
|
|
861
861
|
}, {
|
|
862
|
-
default:
|
|
863
|
-
Y(_(s(
|
|
862
|
+
default: v(() => [
|
|
863
|
+
Y(_(s(o)("core.form.file.choose")), 1)
|
|
864
864
|
]),
|
|
865
865
|
_: 1
|
|
866
866
|
}, 8, ["disabled"]))
|
|
@@ -868,24 +868,24 @@ const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describe
|
|
|
868
868
|
]),
|
|
869
869
|
_: 2
|
|
870
870
|
}, [
|
|
871
|
-
|
|
871
|
+
w.$slots.trailing ? {
|
|
872
872
|
name: "trailing",
|
|
873
|
-
fn:
|
|
874
|
-
C(
|
|
873
|
+
fn: v(() => [
|
|
874
|
+
C(w.$slots, "trailing")
|
|
875
875
|
]),
|
|
876
876
|
key: "0"
|
|
877
877
|
} : void 0,
|
|
878
|
-
|
|
878
|
+
w.$slots.labelTrailing ? {
|
|
879
879
|
name: "labelTrailing",
|
|
880
|
-
fn:
|
|
881
|
-
C(
|
|
880
|
+
fn: v(() => [
|
|
881
|
+
C(w.$slots, "labelTrailing")
|
|
882
882
|
]),
|
|
883
883
|
key: "1"
|
|
884
884
|
} : void 0,
|
|
885
|
-
|
|
885
|
+
w.$slots.readonly ? {
|
|
886
886
|
name: "readonly",
|
|
887
|
-
fn:
|
|
888
|
-
C(
|
|
887
|
+
fn: v(() => [
|
|
888
|
+
C(w.$slots, "readonly")
|
|
889
889
|
]),
|
|
890
890
|
key: "2"
|
|
891
891
|
} : void 0
|
|
@@ -899,17 +899,17 @@ const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describe
|
|
|
899
899
|
disabled: { type: Boolean, default: !1 }
|
|
900
900
|
},
|
|
901
901
|
emits: ["click"],
|
|
902
|
-
setup(
|
|
903
|
-
const e =
|
|
904
|
-
return (
|
|
905
|
-
default:
|
|
906
|
-
M(
|
|
907
|
-
default:
|
|
908
|
-
|
|
902
|
+
setup(l, { emit: t }) {
|
|
903
|
+
const e = l, a = t;
|
|
904
|
+
return (o, n) => (u(), O(qt, null, {
|
|
905
|
+
default: v(() => [
|
|
906
|
+
M(vt, { layout: "stacked" }, {
|
|
907
|
+
default: v(() => [
|
|
908
|
+
b("button", {
|
|
909
909
|
type: "button",
|
|
910
910
|
disabled: e.disabled,
|
|
911
911
|
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"]),
|
|
912
|
-
onClick:
|
|
912
|
+
onClick: n[0] || (n[0] = (d) => a("click"))
|
|
913
913
|
}, _(e.label), 11, Ma)
|
|
914
914
|
]),
|
|
915
915
|
_: 1
|
|
@@ -920,12 +920,12 @@ const Fa = { class: "w-full" }, Ba = ["id", "accept", "disabled", "aria-describe
|
|
|
920
920
|
}
|
|
921
921
|
}), Bo = /* @__PURE__ */ P({
|
|
922
922
|
__name: "FormIndent",
|
|
923
|
-
setup(
|
|
924
|
-
return Re(
|
|
923
|
+
setup(l) {
|
|
924
|
+
return Re(mt, pt() + 1), (t, e) => C(t.$slots, "default");
|
|
925
925
|
}
|
|
926
926
|
});
|
|
927
|
-
function ja(
|
|
928
|
-
return t.filter((e) => (
|
|
927
|
+
function ja(l, t) {
|
|
928
|
+
return t.filter((e) => (l?.[e] ?? "").trim() === "");
|
|
929
929
|
}
|
|
930
930
|
const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Ga = ["id", "value", "lang", "name", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Na = {
|
|
931
931
|
key: 0,
|
|
@@ -960,65 +960,65 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
960
960
|
rows: {},
|
|
961
961
|
placeholder: {},
|
|
962
962
|
maxLength: {}
|
|
963
|
-
}, { ...
|
|
963
|
+
}, { ...ve, locales: void 0, defaultLocale: void 0, requiredLocales: () => [], multiline: !1, rows: 3, placeholder: void 0, maxLength: void 0 }), {
|
|
964
964
|
modelValue: { default: () => ({}) },
|
|
965
965
|
modelModifiers: {}
|
|
966
966
|
}),
|
|
967
967
|
emits: ["update:modelValue"],
|
|
968
|
-
setup(
|
|
969
|
-
const e =
|
|
970
|
-
function R(
|
|
968
|
+
setup(l, { expose: t }) {
|
|
969
|
+
const e = l, a = ie(l, "modelValue"), { t: o, locale: n, availableLocales: d } = oe(), i = tt(Mt, null), m = je(), h = H("field"), x = H("root"), { editable: w } = at(e), r = Ge(e.multiline ? "area" : "text", () => e.error || ne.value ? "error" : e.disabled ? "locked" : "rest"), f = k(() => e.locales ?? i?.locales ?? d), g = k(() => e.defaultLocale ?? f.value[0] ?? ""), S = k(() => f.value.includes(g.value) ? [g.value, ...f.value.filter((p) => p !== g.value)] : f.value), z = N(null), $ = k(() => z.value !== null && S.value.includes(z.value) ? z.value : S.value.includes(n.value) ? n.value : g.value), I = (p) => a.value[p] ?? "", F = (p) => I(p).trim() !== "", E = (p) => p.toUpperCase();
|
|
970
|
+
function R(p) {
|
|
971
971
|
try {
|
|
972
|
-
return new Intl.DisplayNames([Ot(
|
|
972
|
+
return new Intl.DisplayNames([Ot(n.value)], { type: "language" }).of(p) ?? E(p);
|
|
973
973
|
} catch {
|
|
974
|
-
return E(
|
|
974
|
+
return E(p);
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
const Z = (
|
|
978
|
-
function W(
|
|
979
|
-
a.value = { ...a.value, [
|
|
977
|
+
const Z = (p) => p.map(R).join(", ");
|
|
978
|
+
function W(p, q) {
|
|
979
|
+
a.value = { ...a.value, [p]: q };
|
|
980
980
|
}
|
|
981
|
-
const J = (
|
|
982
|
-
function ae(
|
|
983
|
-
z.value =
|
|
981
|
+
const J = (p) => `${m}-tab-${p}`;
|
|
982
|
+
function ae(p, q) {
|
|
983
|
+
z.value = p, q && he(() => h.value?.focus());
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
const B = S.value.length - 1, K = { ArrowRight: q + 1, ArrowLeft: q - 1, Home: 0, End: B }[
|
|
985
|
+
function me(p, q) {
|
|
986
|
+
const B = S.value.length - 1, K = { ArrowRight: q + 1, ArrowLeft: q - 1, Home: 0, End: B }[p.key];
|
|
987
987
|
if (K === void 0) return;
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
|
|
988
|
+
p.preventDefault();
|
|
989
|
+
const U = S.value[(K + S.value.length) % S.value.length];
|
|
990
|
+
U !== void 0 && (ae(U, !1), he(() => document.getElementById(J(U))?.focus()));
|
|
991
991
|
}
|
|
992
992
|
const D = N(!1);
|
|
993
|
-
function A(
|
|
994
|
-
|
|
993
|
+
function A(p) {
|
|
994
|
+
x.value?.contains(p.relatedTarget) || (D.value = !0);
|
|
995
995
|
}
|
|
996
|
-
const G = k(() => ja(a.value, e.requiredLocales)), ne = k(() => D.value && G.value.length > 0 ?
|
|
997
|
-
function
|
|
998
|
-
const
|
|
999
|
-
a.value = { ...a.value, ...Object.fromEntries(S.value.filter((q) => !F(q)).map((q) => [q,
|
|
996
|
+
const G = k(() => ja(a.value, e.requiredLocales)), ne = k(() => D.value && G.value.length > 0 ? o("core.form.i18n.required", { languages: Z(G.value) }) : void 0), re = k(() => e.requiredLocales.length > 0 ? G.value.length === 0 : S.value.some(F)), le = k(() => S.value.filter((p) => !F(p) && !(ne.value && G.value.includes(p)))), ke = k(() => F(g.value) && S.value.some((p) => p !== g.value && !F(p)));
|
|
997
|
+
function xe() {
|
|
998
|
+
const p = I(g.value);
|
|
999
|
+
a.value = { ...a.value, ...Object.fromEntries(S.value.filter((q) => !F(q)).map((q) => [q, p])) };
|
|
1000
1000
|
}
|
|
1001
|
-
const X = k(() => [
|
|
1002
|
-
return t({ focus: () => h.value?.focus() }), (
|
|
1003
|
-
value: s(
|
|
1001
|
+
const X = k(() => [n.value, g.value, ...S.value].find((p) => S.value.includes(p) && F(p))), pe = k(() => S.value.filter((p) => p !== X.value)), L = k(() => pe.value.filter(F).length), c = N(!1), V = k(() => e.label && !w.value && X.value ? `${e.label} · ${E(X.value)}` : e.label);
|
|
1002
|
+
return t({ focus: () => h.value?.focus() }), (p, q) => (u(), O(ye, Q({ ...s(fe)(e), label: V.value, error: e.error ?? ne.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
1003
|
+
value: s(w) ? re.value ? "written" : null : X.value ? I(X.value) : null,
|
|
1004
1004
|
"row-layout": "stacked"
|
|
1005
1005
|
}), ee({
|
|
1006
|
-
default:
|
|
1007
|
-
|
|
1006
|
+
default: v(({ id: B, describedby: K, invalid: U }) => [
|
|
1007
|
+
b("div", {
|
|
1008
1008
|
ref_key: "root",
|
|
1009
|
-
ref:
|
|
1009
|
+
ref: x,
|
|
1010
1010
|
class: "w-full",
|
|
1011
1011
|
onFocusout: A
|
|
1012
1012
|
}, [
|
|
1013
|
-
|
|
1014
|
-
id: `${s(
|
|
1013
|
+
b("div", {
|
|
1014
|
+
id: `${s(m)}-panel`,
|
|
1015
1015
|
role: "tabpanel",
|
|
1016
1016
|
"aria-labelledby": J($.value)
|
|
1017
1017
|
}, [
|
|
1018
|
-
|
|
1018
|
+
b("div", {
|
|
1019
1019
|
class: j(["w-full", s(r)])
|
|
1020
1020
|
}, [
|
|
1021
|
-
e.multiline ? (
|
|
1021
|
+
e.multiline ? (u(), y("textarea", {
|
|
1022
1022
|
key: 0,
|
|
1023
1023
|
id: B,
|
|
1024
1024
|
ref_key: "field",
|
|
@@ -1031,12 +1031,12 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1031
1031
|
maxlength: e.maxLength,
|
|
1032
1032
|
disabled: e.disabled,
|
|
1033
1033
|
"aria-required": e.required || void 0,
|
|
1034
|
-
"aria-invalid":
|
|
1034
|
+
"aria-invalid": U || void 0,
|
|
1035
1035
|
"aria-describedby": K,
|
|
1036
1036
|
"data-test": "i18n-input",
|
|
1037
1037
|
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",
|
|
1038
1038
|
onInput: q[0] || (q[0] = (Te) => W($.value, Te.target.value))
|
|
1039
|
-
}, null, 40, Ia)) : (
|
|
1039
|
+
}, null, 40, Ia)) : (u(), y("input", {
|
|
1040
1040
|
key: 1,
|
|
1041
1041
|
id: B,
|
|
1042
1042
|
ref_key: "field",
|
|
@@ -1049,7 +1049,7 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1049
1049
|
maxlength: e.maxLength,
|
|
1050
1050
|
disabled: e.disabled,
|
|
1051
1051
|
"aria-required": e.required || void 0,
|
|
1052
|
-
"aria-invalid":
|
|
1052
|
+
"aria-invalid": U || void 0,
|
|
1053
1053
|
"aria-describedby": K,
|
|
1054
1054
|
"data-test": "i18n-input",
|
|
1055
1055
|
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",
|
|
@@ -1057,41 +1057,41 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1057
1057
|
}, null, 40, Ga))
|
|
1058
1058
|
], 2)
|
|
1059
1059
|
], 8, Ea),
|
|
1060
|
-
le.value.length > 0 || ke.value ? (
|
|
1061
|
-
le.value.length > 0 ? (
|
|
1062
|
-
ke.value && !e.disabled ? (
|
|
1060
|
+
le.value.length > 0 || ke.value ? (u(), y("div", Na, [
|
|
1061
|
+
le.value.length > 0 ? (u(), y("p", Pa, _(s(o)("core.form.i18n.missing", { languages: Z(le.value) })), 1)) : (u(), y("span", Ka)),
|
|
1062
|
+
ke.value && !e.disabled ? (u(), y("button", {
|
|
1063
1063
|
key: 2,
|
|
1064
1064
|
type: "button",
|
|
1065
1065
|
"data-test": "i18n-copy",
|
|
1066
1066
|
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",
|
|
1067
|
-
onClick:
|
|
1068
|
-
}, _(s(
|
|
1067
|
+
onClick: xe
|
|
1068
|
+
}, _(s(o)("core.form.i18n.copy", { language: E(g.value) })), 1)) : T("", !0)
|
|
1069
1069
|
])) : T("", !0)
|
|
1070
1070
|
], 544)
|
|
1071
1071
|
]),
|
|
1072
|
-
labelTrailing:
|
|
1073
|
-
|
|
1072
|
+
labelTrailing: v(() => [
|
|
1073
|
+
b("div", {
|
|
1074
1074
|
role: "tablist",
|
|
1075
|
-
"aria-label": s(
|
|
1075
|
+
"aria-label": s(o)("core.form.i18n.languages"),
|
|
1076
1076
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
1077
1077
|
"data-test": "i18n-tabs"
|
|
1078
1078
|
}, [
|
|
1079
|
-
(
|
|
1079
|
+
(u(!0), y(ue, null, we(S.value, (B, K) => (u(), y("button", {
|
|
1080
1080
|
id: J(B),
|
|
1081
1081
|
key: B,
|
|
1082
1082
|
type: "button",
|
|
1083
1083
|
role: "tab",
|
|
1084
1084
|
"aria-selected": B === $.value,
|
|
1085
1085
|
tabindex: B === $.value ? 0 : -1,
|
|
1086
|
-
"aria-controls": `${s(
|
|
1087
|
-
"aria-label": s(
|
|
1086
|
+
"aria-controls": `${s(m)}-panel`,
|
|
1087
|
+
"aria-label": s(o)(F(B) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: R(B) }),
|
|
1088
1088
|
title: R(B),
|
|
1089
1089
|
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", B === $.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
1090
|
-
onClick: (
|
|
1091
|
-
onKeydown: (
|
|
1090
|
+
onClick: (U) => ae(B, !0),
|
|
1091
|
+
onKeydown: (U) => me(U, K)
|
|
1092
1092
|
}, [
|
|
1093
1093
|
Y(_(E(B)) + " ", 1),
|
|
1094
|
-
|
|
1094
|
+
b("span", {
|
|
1095
1095
|
"aria-hidden": "true",
|
|
1096
1096
|
class: j(["size-1.5 rounded-full", F(B) ? "bg-status-success-solid" : ne.value && G.value.includes(B) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
1097
1097
|
"data-test": "i18n-dot",
|
|
@@ -1104,35 +1104,35 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1104
1104
|
}, [
|
|
1105
1105
|
X.value ? {
|
|
1106
1106
|
name: "readonly",
|
|
1107
|
-
fn:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
pe.value.length > 0 ? (
|
|
1111
|
-
|
|
1107
|
+
fn: v(() => [
|
|
1108
|
+
b("div", Ya, [
|
|
1109
|
+
b("p", Wa, _(I(X.value)), 1),
|
|
1110
|
+
pe.value.length > 0 ? (u(), y(ue, { key: 0 }, [
|
|
1111
|
+
b("button", {
|
|
1112
1112
|
type: "button",
|
|
1113
|
-
"aria-expanded":
|
|
1113
|
+
"aria-expanded": c.value,
|
|
1114
1114
|
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",
|
|
1115
|
-
onClick: q[2] || (q[2] = (B) =>
|
|
1115
|
+
onClick: q[2] || (q[2] = (B) => c.value = !c.value)
|
|
1116
1116
|
}, [
|
|
1117
|
-
|
|
1117
|
+
b("span", Za, _(s(o)("core.form.i18n.more", { count: pe.value.length, filled: L.value })), 1),
|
|
1118
1118
|
M(s(te), {
|
|
1119
1119
|
name: "arrowRightSLine",
|
|
1120
1120
|
size: 16,
|
|
1121
|
-
class: j(["shrink-0 transition-transform duration-motion-fast",
|
|
1121
|
+
class: j(["shrink-0 transition-transform duration-motion-fast", c.value ? "rotate-90" : ""])
|
|
1122
1122
|
}, null, 8, ["class"])
|
|
1123
1123
|
], 8, Ja),
|
|
1124
|
-
|
|
1125
|
-
(
|
|
1124
|
+
c.value ? (u(), y("dl", Xa, [
|
|
1125
|
+
(u(!0), y(ue, null, we(pe.value, (B) => (u(), y("div", {
|
|
1126
1126
|
key: B,
|
|
1127
1127
|
class: "flex gap-2 text-body"
|
|
1128
1128
|
}, [
|
|
1129
|
-
|
|
1129
|
+
b("dt", {
|
|
1130
1130
|
class: "w-8 shrink-0 text-footnote font-semibold leading-6 text-content-muted",
|
|
1131
1131
|
title: R(B)
|
|
1132
1132
|
}, _(E(B)), 9, Qa),
|
|
1133
|
-
|
|
1133
|
+
b("dd", {
|
|
1134
1134
|
class: j(["min-w-0 flex-1 whitespace-pre-line break-words", F(B) ? "text-content-strong" : "text-content-disabled"])
|
|
1135
|
-
}, _(F(B) ? I(B) : s(
|
|
1135
|
+
}, _(F(B) ? I(B) : s(o)("core.state.no_value")), 3)
|
|
1136
1136
|
]))), 128))
|
|
1137
1137
|
])) : T("", !0)
|
|
1138
1138
|
], 64)) : T("", !0)
|
|
@@ -1140,10 +1140,10 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1140
1140
|
]),
|
|
1141
1141
|
key: "0"
|
|
1142
1142
|
} : void 0,
|
|
1143
|
-
|
|
1143
|
+
p.$slots.trailing ? {
|
|
1144
1144
|
name: "trailing",
|
|
1145
|
-
fn:
|
|
1146
|
-
C(
|
|
1145
|
+
fn: v(() => [
|
|
1146
|
+
C(p.$slots, "trailing")
|
|
1147
1147
|
]),
|
|
1148
1148
|
key: "1"
|
|
1149
1149
|
} : void 0
|
|
@@ -1168,42 +1168,42 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1168
1168
|
blankZero: { type: Boolean },
|
|
1169
1169
|
negative: { type: Boolean },
|
|
1170
1170
|
width: {}
|
|
1171
|
-
}, { ...
|
|
1171
|
+
}, { ...ve, modelValue: void 0, decimals: 2, blankZero: !1, negative: !1, width: "sm" }),
|
|
1172
1172
|
emits: ["update:modelValue", "focus", "blur"],
|
|
1173
|
-
setup(
|
|
1174
|
-
const a =
|
|
1175
|
-
return t({ focus: () =>
|
|
1173
|
+
setup(l, { expose: t, emit: e }) {
|
|
1174
|
+
const a = l, o = e, n = H("field");
|
|
1175
|
+
return t({ focus: () => n.value?.focus() }), (d, i) => (u(), O(jt, Q({
|
|
1176
1176
|
ref_key: "field",
|
|
1177
|
-
ref:
|
|
1177
|
+
ref: n,
|
|
1178
1178
|
"model-value": a.modelValue,
|
|
1179
|
-
"onUpdate:modelValue":
|
|
1179
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => o("update:modelValue", m))
|
|
1180
1180
|
}, s(fe)(a), {
|
|
1181
1181
|
decimals: a.decimals,
|
|
1182
1182
|
negative: a.negative,
|
|
1183
1183
|
"blank-zero": a.blankZero,
|
|
1184
1184
|
suffix: a.currency,
|
|
1185
1185
|
width: a.width,
|
|
1186
|
-
onFocus:
|
|
1187
|
-
onBlur:
|
|
1186
|
+
onFocus: i[1] || (i[1] = (m) => o("focus", m)),
|
|
1187
|
+
onBlur: i[2] || (i[2] = (m) => o("blur", m))
|
|
1188
1188
|
}), ee({ _: 2 }, [
|
|
1189
|
-
|
|
1189
|
+
d.$slots.trailing ? {
|
|
1190
1190
|
name: "trailing",
|
|
1191
|
-
fn:
|
|
1192
|
-
C(
|
|
1191
|
+
fn: v(() => [
|
|
1192
|
+
C(d.$slots, "trailing")
|
|
1193
1193
|
]),
|
|
1194
1194
|
key: "0"
|
|
1195
1195
|
} : void 0,
|
|
1196
|
-
|
|
1196
|
+
d.$slots.labelTrailing ? {
|
|
1197
1197
|
name: "labelTrailing",
|
|
1198
|
-
fn:
|
|
1199
|
-
C(
|
|
1198
|
+
fn: v(() => [
|
|
1199
|
+
C(d.$slots, "labelTrailing")
|
|
1200
1200
|
]),
|
|
1201
1201
|
key: "1"
|
|
1202
1202
|
} : void 0,
|
|
1203
|
-
|
|
1203
|
+
d.$slots.readonly ? {
|
|
1204
1204
|
name: "readonly",
|
|
1205
|
-
fn:
|
|
1206
|
-
C(
|
|
1205
|
+
fn: v(() => [
|
|
1206
|
+
C(d.$slots, "readonly")
|
|
1207
1207
|
]),
|
|
1208
1208
|
key: "2"
|
|
1209
1209
|
} : void 0
|
|
@@ -1224,41 +1224,41 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1224
1224
|
name: {},
|
|
1225
1225
|
minYear: {},
|
|
1226
1226
|
maxYear: {}
|
|
1227
|
-
}, { ...
|
|
1227
|
+
}, { ...ve, minYear: 1970, maxYear: () => (/* @__PURE__ */ new Date()).getFullYear() + 1 }), {
|
|
1228
1228
|
month: { default: null },
|
|
1229
1229
|
monthModifiers: {},
|
|
1230
1230
|
year: { default: null },
|
|
1231
1231
|
yearModifiers: {}
|
|
1232
1232
|
}),
|
|
1233
1233
|
emits: ["update:month", "update:year"],
|
|
1234
|
-
setup(
|
|
1235
|
-
const t =
|
|
1236
|
-
function
|
|
1237
|
-
e.value =
|
|
1234
|
+
setup(l) {
|
|
1235
|
+
const t = l, e = ie(l, "month"), a = ie(l, "year"), { t: o } = oe(), n = k(() => e.value !== null && e.value >= 1 && e.value <= 12), d = (x, w) => o(`core.form.months.${w}.${x}`), i = k(() => n.value && a.value !== null ? o("core.form.months.with_year", { month: d(e.value, "long"), year: a.value }) : a.value !== null ? String(a.value) : n.value ? d(e.value, "long") : "");
|
|
1236
|
+
function m(x, w) {
|
|
1237
|
+
e.value = x.month, a.value = x.year, w();
|
|
1238
1238
|
}
|
|
1239
|
-
function h(
|
|
1240
|
-
e.value = null, a.value = null,
|
|
1239
|
+
function h(x) {
|
|
1240
|
+
e.value = null, a.value = null, x();
|
|
1241
1241
|
}
|
|
1242
|
-
return (
|
|
1243
|
-
value:
|
|
1242
|
+
return (x, w) => (u(), O(ye, Q(s(fe)(t), {
|
|
1243
|
+
value: i.value || null
|
|
1244
1244
|
}), ee({
|
|
1245
|
-
default:
|
|
1245
|
+
default: v(({ id: r, describedby: f, invalid: g }) => [
|
|
1246
1246
|
M(Pe, {
|
|
1247
|
-
label: t.label ??
|
|
1247
|
+
label: t.label ?? i.value,
|
|
1248
1248
|
width: "sm",
|
|
1249
1249
|
placement: "bottom-start",
|
|
1250
1250
|
arrow: !1
|
|
1251
1251
|
}, {
|
|
1252
|
-
trigger:
|
|
1252
|
+
trigger: v(({ toggle: S, presented: z }) => [
|
|
1253
1253
|
M(ot, Q({ id: r, "aria-describedby": f }, {
|
|
1254
1254
|
expanded: z,
|
|
1255
1255
|
disabled: t.disabled,
|
|
1256
1256
|
invalid: g,
|
|
1257
1257
|
onClick: S
|
|
1258
1258
|
}), {
|
|
1259
|
-
default:
|
|
1260
|
-
|
|
1261
|
-
Y(_(
|
|
1259
|
+
default: v(() => [
|
|
1260
|
+
i.value ? (u(), y(ue, { key: 0 }, [
|
|
1261
|
+
Y(_(i.value), 1),
|
|
1262
1262
|
M(s(te), {
|
|
1263
1263
|
name: "calendarLine",
|
|
1264
1264
|
size: 16,
|
|
@@ -1269,21 +1269,21 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1269
1269
|
_: 1
|
|
1270
1270
|
}, 16, ["expanded", "disabled", "invalid", "onClick"])
|
|
1271
1271
|
]),
|
|
1272
|
-
default:
|
|
1273
|
-
|
|
1272
|
+
default: v(({ dismiss: S }) => [
|
|
1273
|
+
b("div", el, [
|
|
1274
1274
|
M(Bt, {
|
|
1275
1275
|
month: e.value,
|
|
1276
1276
|
year: a.value,
|
|
1277
1277
|
"min-year": t.minYear,
|
|
1278
1278
|
"max-year": t.maxYear,
|
|
1279
|
-
onPick: (z) =>
|
|
1279
|
+
onPick: (z) => m(z, S)
|
|
1280
1280
|
}, null, 8, ["month", "year", "min-year", "max-year", "onPick"]),
|
|
1281
|
-
|
|
1281
|
+
n.value || a.value !== null ? (u(), y("button", {
|
|
1282
1282
|
key: 0,
|
|
1283
1283
|
type: "button",
|
|
1284
1284
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1285
1285
|
onClick: (z) => h(S)
|
|
1286
|
-
}, _(s(
|
|
1286
|
+
}, _(s(o)("core.form.select.clear")), 9, tl)) : T("", !0)
|
|
1287
1287
|
])
|
|
1288
1288
|
]),
|
|
1289
1289
|
_: 2
|
|
@@ -1291,24 +1291,24 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1291
1291
|
]),
|
|
1292
1292
|
_: 2
|
|
1293
1293
|
}, [
|
|
1294
|
-
|
|
1294
|
+
x.$slots.trailing ? {
|
|
1295
1295
|
name: "trailing",
|
|
1296
|
-
fn:
|
|
1297
|
-
C(
|
|
1296
|
+
fn: v(() => [
|
|
1297
|
+
C(x.$slots, "trailing")
|
|
1298
1298
|
]),
|
|
1299
1299
|
key: "0"
|
|
1300
1300
|
} : void 0,
|
|
1301
|
-
|
|
1301
|
+
x.$slots.labelTrailing ? {
|
|
1302
1302
|
name: "labelTrailing",
|
|
1303
|
-
fn:
|
|
1304
|
-
C(
|
|
1303
|
+
fn: v(() => [
|
|
1304
|
+
C(x.$slots, "labelTrailing")
|
|
1305
1305
|
]),
|
|
1306
1306
|
key: "1"
|
|
1307
1307
|
} : void 0,
|
|
1308
|
-
|
|
1308
|
+
x.$slots.readonly ? {
|
|
1309
1309
|
name: "readonly",
|
|
1310
|
-
fn:
|
|
1311
|
-
C(
|
|
1310
|
+
fn: v(() => [
|
|
1311
|
+
C(x.$slots, "readonly")
|
|
1312
1312
|
]),
|
|
1313
1313
|
key: "2"
|
|
1314
1314
|
} : void 0
|
|
@@ -1331,41 +1331,41 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1331
1331
|
selected: {},
|
|
1332
1332
|
placeholder: {},
|
|
1333
1333
|
searchFrom: {}
|
|
1334
|
-
}, { ...
|
|
1334
|
+
}, { ...ve, selected: () => [], placeholder: void 0, searchFrom: 9 }), {
|
|
1335
1335
|
modelValue: { default: () => [] },
|
|
1336
1336
|
modelModifiers: {}
|
|
1337
1337
|
}),
|
|
1338
1338
|
emits: ["update:modelValue"],
|
|
1339
|
-
setup(
|
|
1340
|
-
const t =
|
|
1339
|
+
setup(l) {
|
|
1340
|
+
const t = l, e = ie(l, "modelValue"), { t: a } = oe(), o = Ne(), n = H("sheet"), d = N(!1), i = It(() => t.options, (r) => {
|
|
1341
1341
|
const f = e.value.filter((g) => r.some((S) => S.value === g));
|
|
1342
1342
|
f.length !== e.value.length && (e.value = f);
|
|
1343
|
-
}),
|
|
1344
|
-
const f =
|
|
1343
|
+
}), m = k(() => e.value.flatMap((r) => {
|
|
1344
|
+
const f = i.known.value.find((g) => g.value === r) ?? t.selected.find((g) => g.value === r);
|
|
1345
1345
|
return f ? [f] : [];
|
|
1346
1346
|
})), h = k(() => t.placeholder ?? a("core.form.select.choose"));
|
|
1347
|
-
function
|
|
1347
|
+
function x(r) {
|
|
1348
1348
|
r !== null && (e.value = e.value.includes(r) ? e.value.filter((f) => f !== r) : [...e.value, r]);
|
|
1349
1349
|
}
|
|
1350
|
-
const
|
|
1351
|
-
return (r, f) => (
|
|
1352
|
-
value:
|
|
1350
|
+
const w = (r) => e.value = e.value.filter((f) => f !== r);
|
|
1351
|
+
return (r, f) => (u(), O(ye, Q(s(fe)(t), {
|
|
1352
|
+
value: m.value.length ? m.value.map((g) => g.label).join(", ") : null,
|
|
1353
1353
|
"row-layout": "stacked"
|
|
1354
1354
|
}), ee({
|
|
1355
|
-
default:
|
|
1356
|
-
|
|
1357
|
-
(
|
|
1355
|
+
default: v(({ id: g, describedby: S, invalid: z }) => [
|
|
1356
|
+
b("div", al, [
|
|
1357
|
+
(u(!0), y(ue, null, we(m.value, ($) => (u(), y("span", {
|
|
1358
1358
|
key: String($.value),
|
|
1359
1359
|
"data-test": "chip",
|
|
1360
1360
|
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"
|
|
1361
1361
|
}, [
|
|
1362
|
-
|
|
1363
|
-
|
|
1362
|
+
b("span", ll, _($.label), 1),
|
|
1363
|
+
b("button", {
|
|
1364
1364
|
type: "button",
|
|
1365
1365
|
disabled: t.disabled,
|
|
1366
1366
|
"aria-label": `${s(a)("core.form.select.clear")}: ${$.label}`,
|
|
1367
1367
|
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",
|
|
1368
|
-
onClick: (I) =>
|
|
1368
|
+
onClick: (I) => w($.value)
|
|
1369
1369
|
}, [
|
|
1370
1370
|
M(s(te), {
|
|
1371
1371
|
name: "close",
|
|
@@ -1373,27 +1373,27 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1373
1373
|
})
|
|
1374
1374
|
], 8, ol)
|
|
1375
1375
|
]))), 128)),
|
|
1376
|
-
s(
|
|
1376
|
+
s(o) ? (u(), y("button", {
|
|
1377
1377
|
key: 0,
|
|
1378
1378
|
id: g,
|
|
1379
1379
|
type: "button",
|
|
1380
1380
|
disabled: t.disabled,
|
|
1381
1381
|
"aria-haspopup": "dialog",
|
|
1382
|
-
"aria-expanded":
|
|
1382
|
+
"aria-expanded": d.value,
|
|
1383
1383
|
"aria-invalid": z || void 0,
|
|
1384
1384
|
"aria-describedby": S,
|
|
1385
|
-
"aria-busy": s(
|
|
1385
|
+
"aria-busy": s(i).loading.value || void 0,
|
|
1386
1386
|
class: j(Xe),
|
|
1387
|
-
onClick: f[0] || (f[0] = ($) =>
|
|
1387
|
+
onClick: f[0] || (f[0] = ($) => n.value?.present())
|
|
1388
1388
|
}, [
|
|
1389
|
-
s(
|
|
1389
|
+
s(i).loading.value ? (u(), O(s(te), {
|
|
1390
1390
|
key: 0,
|
|
1391
1391
|
name: "loader4Line",
|
|
1392
1392
|
size: 14,
|
|
1393
1393
|
class: "shrink-0 animate-spin"
|
|
1394
1394
|
})) : T("", !0),
|
|
1395
|
-
Y(" " + _(
|
|
1396
|
-
], 8, nl)) : (
|
|
1395
|
+
Y(" " + _(m.value.length ? s(a)("core.actions.edit") : h.value), 1)
|
|
1396
|
+
], 8, nl)) : (u(), O(Pe, {
|
|
1397
1397
|
key: 1,
|
|
1398
1398
|
label: t.label ?? h.value,
|
|
1399
1399
|
width: "lg",
|
|
@@ -1401,8 +1401,8 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1401
1401
|
placement: "bottom-start",
|
|
1402
1402
|
arrow: !1
|
|
1403
1403
|
}, {
|
|
1404
|
-
trigger:
|
|
1405
|
-
|
|
1404
|
+
trigger: v(({ toggle: $, attrs: I }) => [
|
|
1405
|
+
b("button", Q({
|
|
1406
1406
|
id: g,
|
|
1407
1407
|
type: "button"
|
|
1408
1408
|
}, I, {
|
|
@@ -1410,34 +1410,34 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1410
1410
|
disabled: t.disabled,
|
|
1411
1411
|
"aria-invalid": z || void 0,
|
|
1412
1412
|
"aria-describedby": S,
|
|
1413
|
-
"aria-busy": s(
|
|
1413
|
+
"aria-busy": s(i).loading.value || void 0,
|
|
1414
1414
|
class: Xe,
|
|
1415
1415
|
onClick: $
|
|
1416
1416
|
}), [
|
|
1417
|
-
s(
|
|
1417
|
+
s(i).loading.value ? (u(), O(s(te), {
|
|
1418
1418
|
key: 0,
|
|
1419
1419
|
name: "loader4Line",
|
|
1420
1420
|
size: 14,
|
|
1421
1421
|
class: "shrink-0 animate-spin"
|
|
1422
1422
|
})) : T("", !0),
|
|
1423
|
-
Y(" " + _(
|
|
1423
|
+
Y(" " + _(m.value.length ? s(a)("core.actions.edit") : h.value), 1)
|
|
1424
1424
|
], 16, sl)
|
|
1425
1425
|
]),
|
|
1426
|
-
default:
|
|
1427
|
-
|
|
1426
|
+
default: v(() => [
|
|
1427
|
+
b("div", rl, [
|
|
1428
1428
|
M(We, {
|
|
1429
|
-
options: s(
|
|
1430
|
-
status: s(
|
|
1429
|
+
options: s(i).rows.value,
|
|
1430
|
+
status: s(i).status.value,
|
|
1431
1431
|
"model-value": e.value,
|
|
1432
1432
|
multiple: "",
|
|
1433
1433
|
"search-from": t.searchFrom,
|
|
1434
1434
|
presentation: "plain",
|
|
1435
|
-
onSelect:
|
|
1436
|
-
onRetry: f[1] || (f[1] = ($) => s(
|
|
1435
|
+
onSelect: x,
|
|
1436
|
+
onRetry: f[1] || (f[1] = ($) => s(i).reload())
|
|
1437
1437
|
}, ee({ _: 2 }, [
|
|
1438
1438
|
r.$slots.option ? {
|
|
1439
1439
|
name: "option",
|
|
1440
|
-
fn:
|
|
1440
|
+
fn: v(($) => [
|
|
1441
1441
|
C(r.$slots, "option", Ve(qe($)))
|
|
1442
1442
|
]),
|
|
1443
1443
|
key: "0"
|
|
@@ -1448,51 +1448,51 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1448
1448
|
_: 2
|
|
1449
1449
|
}, 1032, ["label"]))
|
|
1450
1450
|
]),
|
|
1451
|
-
s(
|
|
1451
|
+
s(o) ? (u(), O(Et, {
|
|
1452
1452
|
key: 0,
|
|
1453
1453
|
ref_key: "sheet",
|
|
1454
|
-
ref:
|
|
1454
|
+
ref: n,
|
|
1455
1455
|
title: t.label ?? h.value,
|
|
1456
1456
|
grouped: "",
|
|
1457
|
-
onPresented: f[5] || (f[5] = ($) =>
|
|
1458
|
-
onDismissed: f[6] || (f[6] = ($) =>
|
|
1457
|
+
onPresented: f[5] || (f[5] = ($) => d.value = !0),
|
|
1458
|
+
onDismissed: f[6] || (f[6] = ($) => d.value = !1)
|
|
1459
1459
|
}, {
|
|
1460
|
-
footer:
|
|
1461
|
-
|
|
1460
|
+
footer: v(() => [
|
|
1461
|
+
b("div", il, [
|
|
1462
1462
|
M(ge, {
|
|
1463
1463
|
prominence: "plain",
|
|
1464
1464
|
disabled: e.value.length === 0,
|
|
1465
1465
|
onClick: f[3] || (f[3] = ($) => e.value = [])
|
|
1466
1466
|
}, {
|
|
1467
|
-
default:
|
|
1467
|
+
default: v(() => [
|
|
1468
1468
|
Y(_(s(a)("core.form.select.clear")), 1)
|
|
1469
1469
|
]),
|
|
1470
1470
|
_: 1
|
|
1471
1471
|
}, 8, ["disabled"]),
|
|
1472
1472
|
M(ge, {
|
|
1473
1473
|
prominence: "primary",
|
|
1474
|
-
onClick: f[4] || (f[4] = ($) =>
|
|
1474
|
+
onClick: f[4] || (f[4] = ($) => n.value?.dismiss())
|
|
1475
1475
|
}, {
|
|
1476
|
-
default:
|
|
1476
|
+
default: v(() => [
|
|
1477
1477
|
Y(_(s(a)("core.form.select.done")), 1)
|
|
1478
1478
|
]),
|
|
1479
1479
|
_: 1
|
|
1480
1480
|
})
|
|
1481
1481
|
])
|
|
1482
1482
|
]),
|
|
1483
|
-
default:
|
|
1483
|
+
default: v(() => [
|
|
1484
1484
|
M(We, {
|
|
1485
|
-
options: s(
|
|
1486
|
-
status: s(
|
|
1485
|
+
options: s(i).rows.value,
|
|
1486
|
+
status: s(i).status.value,
|
|
1487
1487
|
"model-value": e.value,
|
|
1488
1488
|
multiple: "",
|
|
1489
1489
|
"search-from": t.searchFrom,
|
|
1490
|
-
onSelect:
|
|
1491
|
-
onRetry: f[2] || (f[2] = ($) => s(
|
|
1490
|
+
onSelect: x,
|
|
1491
|
+
onRetry: f[2] || (f[2] = ($) => s(i).reload())
|
|
1492
1492
|
}, ee({ _: 2 }, [
|
|
1493
1493
|
r.$slots.option ? {
|
|
1494
1494
|
name: "option",
|
|
1495
|
-
fn:
|
|
1495
|
+
fn: v(($) => [
|
|
1496
1496
|
C(r.$slots, "option", Ve(qe($)))
|
|
1497
1497
|
]),
|
|
1498
1498
|
key: "0"
|
|
@@ -1506,28 +1506,28 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1506
1506
|
}, [
|
|
1507
1507
|
r.$slots.trailing ? {
|
|
1508
1508
|
name: "trailing",
|
|
1509
|
-
fn:
|
|
1509
|
+
fn: v(() => [
|
|
1510
1510
|
C(r.$slots, "trailing")
|
|
1511
1511
|
]),
|
|
1512
1512
|
key: "0"
|
|
1513
1513
|
} : void 0,
|
|
1514
1514
|
r.$slots.labelTrailing ? {
|
|
1515
1515
|
name: "labelTrailing",
|
|
1516
|
-
fn:
|
|
1516
|
+
fn: v(() => [
|
|
1517
1517
|
C(r.$slots, "labelTrailing")
|
|
1518
1518
|
]),
|
|
1519
1519
|
key: "1"
|
|
1520
1520
|
} : void 0,
|
|
1521
1521
|
r.$slots.readonly ? {
|
|
1522
1522
|
name: "readonly",
|
|
1523
|
-
fn:
|
|
1523
|
+
fn: v(() => [
|
|
1524
1524
|
C(r.$slots, "readonly")
|
|
1525
1525
|
]),
|
|
1526
1526
|
key: "2"
|
|
1527
1527
|
} : void 0
|
|
1528
1528
|
]), 1040, ["value"]));
|
|
1529
1529
|
}
|
|
1530
|
-
}), ul = ["aria-label"], dl = ["src"], cl = { class: "flex flex-wrap items-center gap-3" }, fl = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"],
|
|
1530
|
+
}), ul = ["aria-label"], dl = ["src"], cl = { class: "flex flex-wrap items-center gap-3" }, fl = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], vl = ["aria-label"], ml = ["src"], Vo = /* @__PURE__ */ P({
|
|
1531
1531
|
__name: "PhotoField",
|
|
1532
1532
|
props: /* @__PURE__ */ se(/* @__PURE__ */ ce({
|
|
1533
1533
|
label: {},
|
|
@@ -1542,35 +1542,35 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1542
1542
|
name: {},
|
|
1543
1543
|
accept: {},
|
|
1544
1544
|
maxSize: {}
|
|
1545
|
-
}, { ...
|
|
1545
|
+
}, { ...ve, accept: () => ["image/jpeg", "image/png", "image/webp", "image/gif"], maxSize: 5 * 1024 * 1024 }), {
|
|
1546
1546
|
modelValue: { default: null },
|
|
1547
1547
|
modelModifiers: {}
|
|
1548
1548
|
}),
|
|
1549
1549
|
emits: ["update:modelValue"],
|
|
1550
|
-
setup(
|
|
1551
|
-
const t =
|
|
1552
|
-
function
|
|
1553
|
-
|
|
1550
|
+
setup(l) {
|
|
1551
|
+
const t = l, e = ie(l, "modelValue"), { t: a } = oe(), o = H("chooser"), n = N(null), d = N(null);
|
|
1552
|
+
function i() {
|
|
1553
|
+
d.value && URL.revokeObjectURL(d.value), d.value = null;
|
|
1554
1554
|
}
|
|
1555
1555
|
de(
|
|
1556
1556
|
e,
|
|
1557
1557
|
(r) => {
|
|
1558
|
-
|
|
1558
|
+
i(), r instanceof File && (d.value = URL.createObjectURL(r)), r === null && o.value && (o.value.value = "");
|
|
1559
1559
|
},
|
|
1560
1560
|
{ immediate: !0 }
|
|
1561
|
-
), Ee(
|
|
1562
|
-
const
|
|
1563
|
-
function
|
|
1561
|
+
), Ee(i);
|
|
1562
|
+
const m = k(() => e.value instanceof File ? d.value : e.value), h = H("viewer"), x = k(() => m.value ? [{ src: m.value, alt: t.label ?? a("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1563
|
+
function w(r) {
|
|
1564
1564
|
if (!r) return;
|
|
1565
1565
|
const f = nt(r, { accept: t.accept, maxSize: t.maxSize });
|
|
1566
|
-
f ?
|
|
1566
|
+
f ? n.value = f === "invalid_type" ? a("core.form.file.invalid_type") : a("core.form.file.too_large", { size: Be(t.maxSize) }) : (n.value = null, e.value = r);
|
|
1567
1567
|
}
|
|
1568
|
-
return (r, f) => (
|
|
1569
|
-
value:
|
|
1568
|
+
return (r, f) => (u(), O(ye, Q({ ...s(fe)(t), error: n.value ?? t.error }, {
|
|
1569
|
+
value: m.value ? s(a)("core.form.file.choose") : null,
|
|
1570
1570
|
"row-layout": "stacked"
|
|
1571
1571
|
}), ee({
|
|
1572
|
-
readonly:
|
|
1573
|
-
|
|
1572
|
+
readonly: v(() => [
|
|
1573
|
+
m.value ? (u(), y("button", {
|
|
1574
1574
|
key: 0,
|
|
1575
1575
|
type: "button",
|
|
1576
1576
|
"aria-label": s(a)("core.viewer.open"),
|
|
@@ -1578,25 +1578,25 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1578
1578
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1579
1579
|
onClick: f[0] || (f[0] = (g) => h.value?.present(0))
|
|
1580
1580
|
}, [
|
|
1581
|
-
|
|
1582
|
-
src:
|
|
1581
|
+
b("img", {
|
|
1582
|
+
src: m.value,
|
|
1583
1583
|
alt: "",
|
|
1584
1584
|
class: "size-40 rounded-group object-cover"
|
|
1585
1585
|
}, null, 8, dl)
|
|
1586
1586
|
], 8, ul)) : T("", !0),
|
|
1587
|
-
|
|
1587
|
+
m.value ? (u(), O(Je, {
|
|
1588
1588
|
key: 1,
|
|
1589
1589
|
ref_key: "viewer",
|
|
1590
1590
|
ref: h,
|
|
1591
|
-
items:
|
|
1591
|
+
items: x.value
|
|
1592
1592
|
}, null, 8, ["items"])) : T("", !0)
|
|
1593
1593
|
]),
|
|
1594
|
-
default:
|
|
1595
|
-
|
|
1596
|
-
|
|
1594
|
+
default: v(({ id: g, describedby: S, invalid: z }) => [
|
|
1595
|
+
b("div", cl, [
|
|
1596
|
+
b("input", {
|
|
1597
1597
|
id: g,
|
|
1598
1598
|
ref_key: "chooser",
|
|
1599
|
-
ref:
|
|
1599
|
+
ref: o,
|
|
1600
1600
|
type: "file",
|
|
1601
1601
|
class: "sr-only",
|
|
1602
1602
|
tabindex: "-1",
|
|
@@ -1604,9 +1604,9 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1604
1604
|
disabled: t.disabled,
|
|
1605
1605
|
"aria-describedby": S,
|
|
1606
1606
|
"aria-invalid": z || void 0,
|
|
1607
|
-
onChange: f[1] || (f[1] = ($) =>
|
|
1607
|
+
onChange: f[1] || (f[1] = ($) => w($.target.files?.[0]))
|
|
1608
1608
|
}, null, 40, fl),
|
|
1609
|
-
|
|
1609
|
+
m.value ? (u(), y("button", {
|
|
1610
1610
|
key: 0,
|
|
1611
1611
|
type: "button",
|
|
1612
1612
|
"aria-label": s(a)("core.viewer.open"),
|
|
@@ -1614,56 +1614,56 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1614
1614
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1615
1615
|
onClick: f[2] || (f[2] = ($) => h.value?.present(0))
|
|
1616
1616
|
}, [
|
|
1617
|
-
|
|
1618
|
-
src:
|
|
1617
|
+
b("img", {
|
|
1618
|
+
src: m.value,
|
|
1619
1619
|
alt: "",
|
|
1620
1620
|
"data-test": "photo-preview",
|
|
1621
1621
|
class: "size-28 rounded-group object-cover"
|
|
1622
|
-
}, null, 8,
|
|
1623
|
-
], 8,
|
|
1622
|
+
}, null, 8, ml)
|
|
1623
|
+
], 8, vl)) : T("", !0),
|
|
1624
1624
|
M(ge, {
|
|
1625
1625
|
disabled: t.disabled,
|
|
1626
|
-
onClick: f[3] || (f[3] = ($) =>
|
|
1626
|
+
onClick: f[3] || (f[3] = ($) => o.value?.click())
|
|
1627
1627
|
}, {
|
|
1628
|
-
default:
|
|
1628
|
+
default: v(() => [
|
|
1629
1629
|
Y(_(s(a)("core.form.file.choose")), 1)
|
|
1630
1630
|
]),
|
|
1631
1631
|
_: 1
|
|
1632
1632
|
}, 8, ["disabled"]),
|
|
1633
|
-
|
|
1633
|
+
m.value ? (u(), O(ge, {
|
|
1634
1634
|
key: 1,
|
|
1635
1635
|
prominence: "plain",
|
|
1636
1636
|
tone: "critical",
|
|
1637
1637
|
disabled: t.disabled,
|
|
1638
1638
|
onClick: f[4] || (f[4] = ($) => {
|
|
1639
|
-
e.value = null,
|
|
1639
|
+
e.value = null, n.value = null;
|
|
1640
1640
|
})
|
|
1641
1641
|
}, {
|
|
1642
|
-
default:
|
|
1642
|
+
default: v(() => [
|
|
1643
1643
|
Y(_(s(a)("core.form.file.remove")), 1)
|
|
1644
1644
|
]),
|
|
1645
1645
|
_: 1
|
|
1646
1646
|
}, 8, ["disabled"])) : T("", !0)
|
|
1647
1647
|
]),
|
|
1648
|
-
|
|
1648
|
+
m.value ? (u(), O(Je, {
|
|
1649
1649
|
key: 0,
|
|
1650
1650
|
ref_key: "viewer",
|
|
1651
1651
|
ref: h,
|
|
1652
|
-
items:
|
|
1652
|
+
items: x.value
|
|
1653
1653
|
}, null, 8, ["items"])) : T("", !0)
|
|
1654
1654
|
]),
|
|
1655
1655
|
_: 2
|
|
1656
1656
|
}, [
|
|
1657
1657
|
r.$slots.trailing ? {
|
|
1658
1658
|
name: "trailing",
|
|
1659
|
-
fn:
|
|
1659
|
+
fn: v(() => [
|
|
1660
1660
|
C(r.$slots, "trailing")
|
|
1661
1661
|
]),
|
|
1662
1662
|
key: "0"
|
|
1663
1663
|
} : void 0,
|
|
1664
1664
|
r.$slots.labelTrailing ? {
|
|
1665
1665
|
name: "labelTrailing",
|
|
1666
|
-
fn:
|
|
1666
|
+
fn: v(() => [
|
|
1667
1667
|
C(r.$slots, "labelTrailing")
|
|
1668
1668
|
]),
|
|
1669
1669
|
key: "1"
|
|
@@ -1682,67 +1682,67 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1682
1682
|
fieldLabel: { type: Function, default: void 0 }
|
|
1683
1683
|
},
|
|
1684
1684
|
emits: ["saved"],
|
|
1685
|
-
setup(
|
|
1686
|
-
const e =
|
|
1687
|
-
let
|
|
1688
|
-
de(() => e.sheet.open.value, (
|
|
1689
|
-
|
|
1685
|
+
setup(l, { emit: t }) {
|
|
1686
|
+
const e = l, a = t, { t: o } = oe(), n = H("modal"), d = H("body"), i = N(!1);
|
|
1687
|
+
let m = null;
|
|
1688
|
+
de(() => e.sheet.open.value, (w) => {
|
|
1689
|
+
w ? (i.value = !1, n.value?.present()) : n.value?.dismiss();
|
|
1690
1690
|
}), rt(() => {
|
|
1691
|
-
e.sheet.open.value &&
|
|
1691
|
+
e.sheet.open.value && n.value?.present();
|
|
1692
1692
|
}), Ee(() => {
|
|
1693
|
-
|
|
1693
|
+
m && clearTimeout(m);
|
|
1694
1694
|
});
|
|
1695
1695
|
async function h() {
|
|
1696
|
-
await e.sheet.save() && (
|
|
1696
|
+
await e.sheet.save() && (i.value = !0, a("saved"), m = setTimeout(() => e.sheet.dismiss(), Nt));
|
|
1697
1697
|
}
|
|
1698
|
-
const
|
|
1699
|
-
return (
|
|
1698
|
+
const x = k(() => e.sheet.saving.value ? "processing" : i.value ? "done" : "idle");
|
|
1699
|
+
return (w, r) => (u(), O(Gt, {
|
|
1700
1700
|
ref_key: "modal",
|
|
1701
|
-
ref:
|
|
1701
|
+
ref: n,
|
|
1702
1702
|
size: e.size,
|
|
1703
1703
|
grouped: "",
|
|
1704
1704
|
title: e.title,
|
|
1705
1705
|
subtitle: e.subtitle,
|
|
1706
1706
|
"before-dismiss": e.sheet.beforeDismiss,
|
|
1707
|
-
"primary-label": e.editable ? s(
|
|
1708
|
-
status:
|
|
1709
|
-
"processing-label": s(
|
|
1710
|
-
"done-label": s(
|
|
1707
|
+
"primary-label": e.editable ? s(o)("core.actions.save") : void 0,
|
|
1708
|
+
status: x.value,
|
|
1709
|
+
"processing-label": s(o)("core.actions.saving"),
|
|
1710
|
+
"done-label": s(o)("core.actions.saved"),
|
|
1711
1711
|
onPrimary: h,
|
|
1712
1712
|
onDismissed: r[0] || (r[0] = (f) => e.sheet.closed())
|
|
1713
1713
|
}, {
|
|
1714
|
-
default:
|
|
1715
|
-
|
|
1714
|
+
default: v(() => [
|
|
1715
|
+
b("div", {
|
|
1716
1716
|
ref_key: "body",
|
|
1717
|
-
ref:
|
|
1717
|
+
ref: d,
|
|
1718
1718
|
class: "flex min-w-0 flex-col gap-group-gap"
|
|
1719
1719
|
}, [
|
|
1720
|
-
e.sheet.notice.value ? (
|
|
1720
|
+
e.sheet.notice.value ? (u(), O(Ze, {
|
|
1721
1721
|
key: 0,
|
|
1722
1722
|
tone: "warning",
|
|
1723
1723
|
"data-test": "group-sheet-notice"
|
|
1724
1724
|
}, {
|
|
1725
|
-
default:
|
|
1726
|
-
|
|
1725
|
+
default: v(() => [
|
|
1726
|
+
b("p", pl, _(e.sheet.notice.value), 1)
|
|
1727
1727
|
]),
|
|
1728
1728
|
_: 1
|
|
1729
1729
|
})) : T("", !0),
|
|
1730
|
-
e.sheet.foreignGroups.value.length ? (
|
|
1730
|
+
e.sheet.foreignGroups.value.length ? (u(), O(Ze, {
|
|
1731
1731
|
key: 1,
|
|
1732
1732
|
tone: "warning",
|
|
1733
1733
|
"data-test": "group-sheet-foreign"
|
|
1734
1734
|
}, {
|
|
1735
|
-
default:
|
|
1736
|
-
|
|
1735
|
+
default: v(() => [
|
|
1736
|
+
b("p", bl, _(s(o)("core.form.group.foreign", { groups: e.sheet.foreignGroups.value.map(e.groupLabel).join(", ") })), 1)
|
|
1737
1737
|
]),
|
|
1738
1738
|
_: 1
|
|
1739
1739
|
})) : T("", !0),
|
|
1740
1740
|
M(Me, {
|
|
1741
1741
|
form: e.sheet.form,
|
|
1742
1742
|
label: e.fieldLabel,
|
|
1743
|
-
scope:
|
|
1743
|
+
scope: d.value
|
|
1744
1744
|
}, null, 8, ["form", "label", "scope"]),
|
|
1745
|
-
C(
|
|
1745
|
+
C(w.$slots, "default")
|
|
1746
1746
|
], 512)
|
|
1747
1747
|
]),
|
|
1748
1748
|
_: 3
|
|
@@ -1754,9 +1754,9 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1754
1754
|
only: {},
|
|
1755
1755
|
editable: { type: Boolean }
|
|
1756
1756
|
},
|
|
1757
|
-
setup(
|
|
1758
|
-
const t =
|
|
1759
|
-
return Re(Rt, { only: it(t, "only") }), Re(bt, k(() => t.editable)), (e, a) => (
|
|
1757
|
+
setup(l) {
|
|
1758
|
+
const t = l;
|
|
1759
|
+
return Re(Rt, { only: it(t, "only") }), Re(bt, k(() => t.editable)), (e, a) => (u(), y("div", {
|
|
1760
1760
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
1761
1761
|
"data-test": "record-group-scope",
|
|
1762
1762
|
"data-group": t.only
|
|
@@ -1765,51 +1765,51 @@ const Ea = ["id", "aria-labelledby"], Ia = ["id", "value", "lang", "name", "rows
|
|
|
1765
1765
|
], 8, gl));
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
|
-
function Oo(
|
|
1769
|
-
const { form: t } =
|
|
1770
|
-
if (
|
|
1771
|
-
const e = () => typeof
|
|
1768
|
+
function Oo(l) {
|
|
1769
|
+
const { form: t } = l;
|
|
1770
|
+
if (l.rebase && !t.rebase) throw new Error("useGroupSheet: `rebase` needs a record form (useResourceForm), which can take the freshly read record as its base.");
|
|
1771
|
+
const e = () => typeof l.fields == "function" ? l.fields() : l.fields, a = () => Oe(l.restore) ?? e(), o = N(!1), n = N(!1), d = N([]), i = N(null), m = Le({});
|
|
1772
1772
|
let h = {};
|
|
1773
|
-
const
|
|
1773
|
+
const x = (F) => Object.fromEntries(F.map((E) => [E, Se(t.values[E])])), w = k(() => o.value && !He(x(a()), m.value)), { confirmDiscard: r } = Ie(() => w.value);
|
|
1774
1774
|
function f() {
|
|
1775
|
-
h =
|
|
1775
|
+
h = x(a()), m.value = Se(h);
|
|
1776
1776
|
}
|
|
1777
1777
|
function g() {
|
|
1778
|
-
f(),
|
|
1778
|
+
f(), d.value = [], i.value = null, t.dismissFailure(), o.value = !0;
|
|
1779
1779
|
}
|
|
1780
1780
|
function S() {
|
|
1781
|
-
if (
|
|
1782
|
-
|
|
1781
|
+
if (o.value) {
|
|
1782
|
+
w.value && Object.assign(t.values, Se(h));
|
|
1783
1783
|
for (const F of e()) t.errors.clear(F);
|
|
1784
|
-
t.dismissFailure(),
|
|
1784
|
+
t.dismissFailure(), o.value = !1;
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
function z(F) {
|
|
1788
|
-
const E = new Set(e()), R = Oe(
|
|
1788
|
+
const E = new Set(e()), R = Oe(l.group), Z = /* @__PURE__ */ new Set();
|
|
1789
1789
|
for (const W of Object.keys(F.all())) {
|
|
1790
1790
|
const J = et(W);
|
|
1791
1791
|
if (E.has(J)) continue;
|
|
1792
|
-
const ae =
|
|
1792
|
+
const ae = l.groupOf?.(J) ?? l.fallbackGroup;
|
|
1793
1793
|
ae && ae !== R && Z.add(ae);
|
|
1794
1794
|
}
|
|
1795
|
-
|
|
1795
|
+
d.value = [...Z];
|
|
1796
1796
|
}
|
|
1797
1797
|
async function $(F) {
|
|
1798
|
-
const E = Se(
|
|
1798
|
+
const E = Se(x(e().filter((R) => !He(t.values[R], m.value[R]))));
|
|
1799
1799
|
try {
|
|
1800
1800
|
await F.reload();
|
|
1801
1801
|
} catch {
|
|
1802
1802
|
return;
|
|
1803
1803
|
}
|
|
1804
|
-
t.rebase?.() && (f(), Object.assign(t.values, E),
|
|
1804
|
+
t.rebase?.() && (f(), Object.assign(t.values, E), i.value = F.message());
|
|
1805
1805
|
}
|
|
1806
1806
|
async function I() {
|
|
1807
|
-
if (
|
|
1808
|
-
|
|
1807
|
+
if (n.value) return !1;
|
|
1808
|
+
n.value = !0, d.value = [], i.value = null;
|
|
1809
1809
|
try {
|
|
1810
|
-
const F =
|
|
1810
|
+
const F = l.onSaved ? () => l.onSaved?.() : void 0;
|
|
1811
1811
|
let E;
|
|
1812
|
-
if (
|
|
1812
|
+
if (l.save) E = await t.submitFields(e(), l.save, { refresh: F });
|
|
1813
1813
|
else if (t.save) E = await t.save({ refresh: F });
|
|
1814
1814
|
else throw new Error("useGroupSheet: the form has no full-record save(), so give the sheet its own `save` for a dedicated endpoint.");
|
|
1815
1815
|
switch (E.status) {
|
|
@@ -1820,23 +1820,23 @@ function Oo(o) {
|
|
|
1820
1820
|
case "aborted":
|
|
1821
1821
|
return !1;
|
|
1822
1822
|
case "failed":
|
|
1823
|
-
return E.failure.kind === "conflict" &&
|
|
1823
|
+
return E.failure.kind === "conflict" && l.rebase ? await $(l.rebase) : z(t.errors), !1;
|
|
1824
1824
|
}
|
|
1825
1825
|
} finally {
|
|
1826
|
-
|
|
1826
|
+
n.value = !1;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
1829
|
return {
|
|
1830
|
-
open:
|
|
1831
|
-
saving:
|
|
1832
|
-
dirty:
|
|
1833
|
-
foreignGroups:
|
|
1834
|
-
notice:
|
|
1830
|
+
open: o,
|
|
1831
|
+
saving: n,
|
|
1832
|
+
dirty: w,
|
|
1833
|
+
foreignGroups: d,
|
|
1834
|
+
notice: i,
|
|
1835
1835
|
failure: t.failure,
|
|
1836
1836
|
form: t,
|
|
1837
1837
|
present: g,
|
|
1838
1838
|
dismiss: () => {
|
|
1839
|
-
|
|
1839
|
+
o.value = !1;
|
|
1840
1840
|
},
|
|
1841
1841
|
save: I,
|
|
1842
1842
|
beforeDismiss: r,
|
|
@@ -1848,45 +1848,45 @@ const yl = { hidden: "" }, hl = /* @__PURE__ */ P({
|
|
|
1848
1848
|
props: {
|
|
1849
1849
|
options: {}
|
|
1850
1850
|
},
|
|
1851
|
-
setup(
|
|
1852
|
-
return Yt(
|
|
1851
|
+
setup(l) {
|
|
1852
|
+
return Yt(l.options), (e, a) => (u(), y("span", yl));
|
|
1853
1853
|
}
|
|
1854
1854
|
});
|
|
1855
|
-
function kl(
|
|
1855
|
+
function kl(l) {
|
|
1856
1856
|
const t = N(0);
|
|
1857
1857
|
let e = 0;
|
|
1858
1858
|
const a = () => {
|
|
1859
1859
|
e || (e = requestAnimationFrame(() => {
|
|
1860
1860
|
e = 0, t.value++;
|
|
1861
1861
|
}));
|
|
1862
|
-
},
|
|
1862
|
+
}, o = typeof MutationObserver > "u" ? null : new MutationObserver(a);
|
|
1863
1863
|
de(
|
|
1864
|
-
() =>
|
|
1865
|
-
(
|
|
1866
|
-
|
|
1867
|
-
for (const
|
|
1868
|
-
|
|
1864
|
+
() => l.sections.value,
|
|
1865
|
+
(i) => {
|
|
1866
|
+
o?.disconnect();
|
|
1867
|
+
for (const m of i)
|
|
1868
|
+
o?.observe(m.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1869
1869
|
a();
|
|
1870
1870
|
},
|
|
1871
1871
|
{ immediate: !0 }
|
|
1872
1872
|
), ut() && dt(() => {
|
|
1873
|
-
|
|
1873
|
+
o?.disconnect(), e && cancelAnimationFrame(e);
|
|
1874
1874
|
});
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
|
|
1875
|
+
const n = k(() => (t.value, Object.fromEntries(
|
|
1876
|
+
l.sections.value.map((i) => [
|
|
1877
|
+
i.id,
|
|
1878
1878
|
{
|
|
1879
|
-
errors:
|
|
1880
|
-
required: { total:
|
|
1879
|
+
errors: i.element.querySelectorAll("[data-field-error]").length,
|
|
1880
|
+
required: { total: i.element.querySelectorAll("[data-field-required]").length, filled: i.element.querySelectorAll("[data-field-required][data-field-filled]").length }
|
|
1881
1881
|
}
|
|
1882
1882
|
])
|
|
1883
|
-
))),
|
|
1884
|
-
return { states:
|
|
1883
|
+
))), d = k(() => Object.values(n.value).reduce((i, m) => ({ filled: i.filled + m.required.filled, total: i.total + m.required.total }), { filled: 0, total: 0 }));
|
|
1884
|
+
return { states: n, totals: d };
|
|
1885
1885
|
}
|
|
1886
|
-
const
|
|
1886
|
+
const wl = {
|
|
1887
1887
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1888
1888
|
"data-test": "editor-page"
|
|
1889
|
-
},
|
|
1889
|
+
}, xl = {
|
|
1890
1890
|
key: 0,
|
|
1891
1891
|
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"
|
|
1892
1892
|
}, Mo = /* @__PURE__ */ P({
|
|
@@ -1900,11 +1900,11 @@ const xl = {
|
|
|
1900
1900
|
fieldLabel: { type: Function, default: void 0 }
|
|
1901
1901
|
},
|
|
1902
1902
|
emits: ["save", "cancel"],
|
|
1903
|
-
setup(
|
|
1904
|
-
const e =
|
|
1903
|
+
setup(l, { emit: t }) {
|
|
1904
|
+
const e = l, a = t, { t: o } = oe(), n = Ne(), d = Ut(), { states: i, totals: m } = kl(d), h = H("content"), x = k(
|
|
1905
1905
|
() => e.form ? {
|
|
1906
1906
|
form: e.form,
|
|
1907
|
-
label: () => e.saveLabel ??
|
|
1907
|
+
label: () => e.saveLabel ?? o("core.actions.save"),
|
|
1908
1908
|
allowed: () => e.canSave,
|
|
1909
1909
|
disabledWhileClean: !1,
|
|
1910
1910
|
// a create page: an untouched form is submitted to learn what is missing
|
|
@@ -1919,39 +1919,39 @@ const xl = {
|
|
|
1919
1919
|
de(
|
|
1920
1920
|
() => e.form?.failure.value,
|
|
1921
1921
|
async (r) => {
|
|
1922
|
-
r?.kind === "invalid" && (await he(), await De(h.value ?? document,
|
|
1922
|
+
r?.kind === "invalid" && (await he(), await De(h.value ?? document, d));
|
|
1923
1923
|
}
|
|
1924
1924
|
);
|
|
1925
|
-
function
|
|
1926
|
-
const f =
|
|
1925
|
+
function w(r) {
|
|
1926
|
+
const f = d.sections.value.find((g) => g.id === r)?.element;
|
|
1927
1927
|
f && he(() => De(f));
|
|
1928
1928
|
}
|
|
1929
|
-
return (r, f) => (
|
|
1929
|
+
return (r, f) => (u(), O(Kt, {
|
|
1930
1930
|
title: e.title,
|
|
1931
1931
|
back: e.back,
|
|
1932
1932
|
width: "content"
|
|
1933
1933
|
}, ee({
|
|
1934
|
-
default:
|
|
1935
|
-
|
|
1934
|
+
default: v(() => [
|
|
1935
|
+
x.value ? (u(), O(hl, {
|
|
1936
1936
|
key: 0,
|
|
1937
|
-
options:
|
|
1937
|
+
options: x.value
|
|
1938
1938
|
}, null, 8, ["options"])) : T("", !0),
|
|
1939
|
-
|
|
1940
|
-
s(
|
|
1939
|
+
b("div", wl, [
|
|
1940
|
+
s(n) ? T("", !0) : (u(), y("aside", xl, [
|
|
1941
1941
|
M(At, {
|
|
1942
1942
|
standalone: "",
|
|
1943
|
-
states: s(
|
|
1944
|
-
progress: s(
|
|
1945
|
-
onSelect:
|
|
1943
|
+
states: s(i),
|
|
1944
|
+
progress: s(m),
|
|
1945
|
+
onSelect: w
|
|
1946
1946
|
}, null, 8, ["states", "progress"]),
|
|
1947
1947
|
C(r.$slots, "aside")
|
|
1948
1948
|
])),
|
|
1949
|
-
|
|
1949
|
+
b("div", {
|
|
1950
1950
|
ref_key: "content",
|
|
1951
1951
|
ref: h,
|
|
1952
1952
|
class: "flex min-w-0 flex-col gap-section-gap"
|
|
1953
1953
|
}, [
|
|
1954
|
-
e.form ? (
|
|
1954
|
+
e.form ? (u(), O(Me, {
|
|
1955
1955
|
key: 0,
|
|
1956
1956
|
form: e.form,
|
|
1957
1957
|
label: e.fieldLabel,
|
|
@@ -1960,37 +1960,37 @@ const xl = {
|
|
|
1960
1960
|
C(r.$slots, "default")
|
|
1961
1961
|
], 512)
|
|
1962
1962
|
]),
|
|
1963
|
-
s(
|
|
1963
|
+
s(n) ? (u(), O(Ht, {
|
|
1964
1964
|
key: 1,
|
|
1965
|
-
states: s(
|
|
1965
|
+
states: s(i)
|
|
1966
1966
|
}, null, 8, ["states"])) : T("", !0)
|
|
1967
1967
|
]),
|
|
1968
1968
|
_: 2
|
|
1969
1969
|
}, [
|
|
1970
1970
|
r.$slots.header ? {
|
|
1971
1971
|
name: "header",
|
|
1972
|
-
fn:
|
|
1972
|
+
fn: v(() => [
|
|
1973
1973
|
C(r.$slots, "header")
|
|
1974
1974
|
]),
|
|
1975
1975
|
key: "0"
|
|
1976
1976
|
} : void 0,
|
|
1977
1977
|
r.$slots.pager ? {
|
|
1978
1978
|
name: "pager",
|
|
1979
|
-
fn:
|
|
1979
|
+
fn: v(() => [
|
|
1980
1980
|
C(r.$slots, "pager")
|
|
1981
1981
|
]),
|
|
1982
1982
|
key: "1"
|
|
1983
1983
|
} : void 0,
|
|
1984
1984
|
r.$slots.notices ? {
|
|
1985
1985
|
name: "notices",
|
|
1986
|
-
fn:
|
|
1986
|
+
fn: v(() => [
|
|
1987
1987
|
C(r.$slots, "notices")
|
|
1988
1988
|
]),
|
|
1989
1989
|
key: "2"
|
|
1990
1990
|
} : void 0,
|
|
1991
1991
|
r.$slots.bottom ? {
|
|
1992
1992
|
name: "bottom",
|
|
1993
|
-
fn:
|
|
1993
|
+
fn: v(() => [
|
|
1994
1994
|
C(r.$slots, "bottom")
|
|
1995
1995
|
]),
|
|
1996
1996
|
key: "3"
|
|
@@ -1998,17 +1998,17 @@ const xl = {
|
|
|
1998
1998
|
]), 1032, ["title", "back"]));
|
|
1999
1999
|
}
|
|
2000
2000
|
});
|
|
2001
|
-
function jo(
|
|
2001
|
+
function jo(l) {
|
|
2002
2002
|
const t = Le(null);
|
|
2003
2003
|
let e = null;
|
|
2004
2004
|
const a = st({
|
|
2005
|
-
...
|
|
2006
|
-
done:
|
|
2007
|
-
run(
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2010
|
-
if (!
|
|
2011
|
-
return
|
|
2005
|
+
...l,
|
|
2006
|
+
done: l.done ? (o) => l.done?.(o, { editing: e }) : void 0,
|
|
2007
|
+
run(o, n) {
|
|
2008
|
+
const d = e = t.value;
|
|
2009
|
+
if (d === null) return l.create(o, n);
|
|
2010
|
+
if (!l.update) throw new Error("useRecordDialog: edit() needs an `update`.");
|
|
2011
|
+
return l.update(d, o, n);
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
return {
|
|
@@ -2018,8 +2018,8 @@ function jo(o) {
|
|
|
2018
2018
|
create() {
|
|
2019
2019
|
t.value = null, a.present();
|
|
2020
2020
|
},
|
|
2021
|
-
edit(
|
|
2022
|
-
t.value =
|
|
2021
|
+
edit(o) {
|
|
2022
|
+
t.value = o, a.present(l.toValues?.(o));
|
|
2023
2023
|
}
|
|
2024
2024
|
};
|
|
2025
2025
|
}
|
|
@@ -2038,14 +2038,14 @@ const $l = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], E
|
|
|
2038
2038
|
modelModifiers: {}
|
|
2039
2039
|
}),
|
|
2040
2040
|
emits: ["update:modelValue"],
|
|
2041
|
-
setup(
|
|
2042
|
-
const t =
|
|
2043
|
-
function a(
|
|
2044
|
-
const
|
|
2045
|
-
e.value =
|
|
2041
|
+
setup(l) {
|
|
2042
|
+
const t = l, e = ie(l, "modelValue");
|
|
2043
|
+
function a(n) {
|
|
2044
|
+
const d = n.target.value.replace(/\D/g, "");
|
|
2045
|
+
e.value = d === "" ? null : Math.min(t.max, Math.max(t.min, Number(d)));
|
|
2046
2046
|
}
|
|
2047
|
-
const
|
|
2048
|
-
return (
|
|
2047
|
+
const o = (n) => n.target.value = e.value === null ? "" : String(e.value);
|
|
2048
|
+
return (n, d) => (u(), y("input", {
|
|
2049
2049
|
value: e.value ?? "",
|
|
2050
2050
|
type: "text",
|
|
2051
2051
|
inputmode: "numeric",
|
|
@@ -2056,151 +2056,151 @@ const $l = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], E
|
|
|
2056
2056
|
placeholder: t.placeholder,
|
|
2057
2057
|
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" : ""]]),
|
|
2058
2058
|
onInput: a,
|
|
2059
|
-
onBlur:
|
|
2059
|
+
onBlur: o
|
|
2060
2060
|
}, null, 42, $l));
|
|
2061
2061
|
}
|
|
2062
2062
|
}), Ke = "vue-core:step-draft:";
|
|
2063
|
-
function Ae(
|
|
2063
|
+
function Ae(l) {
|
|
2064
2064
|
try {
|
|
2065
|
-
return (
|
|
2065
|
+
return (l.storage === "local" ? window.localStorage : window.sessionStorage) ?? null;
|
|
2066
2066
|
} catch {
|
|
2067
2067
|
return null;
|
|
2068
2068
|
}
|
|
2069
2069
|
}
|
|
2070
|
-
function _l(
|
|
2070
|
+
function _l(l) {
|
|
2071
2071
|
try {
|
|
2072
|
-
const t = Ae(
|
|
2072
|
+
const t = Ae(l)?.getItem(Ke + l.key);
|
|
2073
2073
|
if (!t) return null;
|
|
2074
2074
|
const e = JSON.parse(t);
|
|
2075
|
-
return !e || e.version !== (
|
|
2075
|
+
return !e || e.version !== (l.version ?? 1) || typeof e.values != "object" || e.values === null || typeof e.step != "string" || !Array.isArray(e.passed) ? null : e;
|
|
2076
2076
|
} catch {
|
|
2077
2077
|
return null;
|
|
2078
2078
|
}
|
|
2079
2079
|
}
|
|
2080
|
-
function Sl(
|
|
2080
|
+
function Sl(l, t) {
|
|
2081
2081
|
try {
|
|
2082
|
-
const e = Ae(
|
|
2082
|
+
const e = Ae(l);
|
|
2083
2083
|
if (!e) return !1;
|
|
2084
|
-
const a = (
|
|
2085
|
-
return e.setItem(Ke +
|
|
2084
|
+
const a = (o, n) => typeof Blob < "u" && n instanceof Blob ? null : n;
|
|
2085
|
+
return e.setItem(Ke + l.key, JSON.stringify({ version: l.version ?? 1, ...t }, a)), !0;
|
|
2086
2086
|
} catch {
|
|
2087
2087
|
return !1;
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
|
-
function Qe(
|
|
2090
|
+
function Qe(l) {
|
|
2091
2091
|
try {
|
|
2092
|
-
Ae(
|
|
2092
|
+
Ae(l)?.removeItem(Ke + l.key);
|
|
2093
2093
|
} catch {
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
|
-
function Cl(
|
|
2097
|
-
for (const [e, a] of Object.entries(
|
|
2096
|
+
function Cl(l, t) {
|
|
2097
|
+
for (const [e, a] of Object.entries(l)) {
|
|
2098
2098
|
if (!(e in t)) continue;
|
|
2099
|
-
const
|
|
2100
|
-
(
|
|
2099
|
+
const o = t[e];
|
|
2100
|
+
(o === null || a === null || a === void 0 || typeof o == typeof a && Array.isArray(o) === Array.isArray(a)) && (l[e] = o);
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
function Io(
|
|
2103
|
+
function Io(l, t) {
|
|
2104
2104
|
const { t: e } = oe(), a = k(() => Oe(t.steps));
|
|
2105
2105
|
if (a.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
2106
|
-
const
|
|
2106
|
+
const o = N(a.value[0].name), n = Ue(/* @__PURE__ */ new Set()), d = Ue(/* @__PURE__ */ new Set([a.value[0].name])), i = N(null), m = N(!1), h = N(0), x = N(!1), w = N(!1);
|
|
2107
2107
|
let r = !1, f = 0;
|
|
2108
|
-
const g = k(() => Math.max(0, a.value.findIndex((
|
|
2109
|
-
() => a.value.map((
|
|
2110
|
-
const
|
|
2108
|
+
const g = k(() => Math.max(0, a.value.findIndex((c) => c.name === o.value))), S = (c) => c.fields?.filter((V) => l.errors.has(V)).length ?? 0, z = k(
|
|
2109
|
+
() => a.value.map((c, V) => {
|
|
2110
|
+
const p = S(c), q = V === g.value;
|
|
2111
2111
|
return {
|
|
2112
|
-
name:
|
|
2113
|
-
label:
|
|
2112
|
+
name: c.name,
|
|
2113
|
+
label: c.label,
|
|
2114
2114
|
position: V + 1,
|
|
2115
|
-
state: q ? "current" :
|
|
2116
|
-
errors:
|
|
2117
|
-
reachable: !q && (
|
|
2115
|
+
state: q ? "current" : n.has(c.name) && p === 0 ? "done" : "todo",
|
|
2116
|
+
errors: p,
|
|
2117
|
+
reachable: !q && (d.has(c.name) || V < g.value)
|
|
2118
2118
|
};
|
|
2119
2119
|
})
|
|
2120
|
-
), $ = k(() => z.value[g.value]), I = k(() => z.value.length), F = k(() => g.value === 0), E = k(() => g.value === I.value - 1), R = k(() =>
|
|
2121
|
-
function Z(
|
|
2122
|
-
const V = a.value[
|
|
2123
|
-
V && (
|
|
2120
|
+
), $ = k(() => z.value[g.value]), I = k(() => z.value.length), F = k(() => g.value === 0), E = k(() => g.value === I.value - 1), R = k(() => m.value || l.submitting.value);
|
|
2121
|
+
function Z(c) {
|
|
2122
|
+
const V = a.value[c];
|
|
2123
|
+
V && (i.value = c > g.value ? "forward" : "back", o.value = V.name, d.add(V.name), f = c, x.value = !1);
|
|
2124
2124
|
}
|
|
2125
2125
|
de(
|
|
2126
|
-
() => a.value.map((
|
|
2126
|
+
() => a.value.map((c) => c.name).join("\0"),
|
|
2127
2127
|
() => {
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2130
|
-
B >
|
|
2131
|
-
}),
|
|
2132
|
-
for (const q of [
|
|
2128
|
+
const c = a.value, V = c.findIndex((q) => q.name === o.value), p = V === -1 ? Math.min(f, c.length - 1) : V;
|
|
2129
|
+
o.value = c[p].name, f = p, c.forEach((q, B) => {
|
|
2130
|
+
B > p && (n.delete(q.name), d.delete(q.name));
|
|
2131
|
+
}), d.add(o.value);
|
|
2132
|
+
for (const q of [n, d]) for (const B of [...q]) c.some((K) => K.name === B) || q.delete(B);
|
|
2133
2133
|
}
|
|
2134
2134
|
);
|
|
2135
|
-
function W(
|
|
2136
|
-
const V =
|
|
2135
|
+
function W(c) {
|
|
2136
|
+
const V = c.fields;
|
|
2137
2137
|
if (!V?.length) return !0;
|
|
2138
|
-
const
|
|
2139
|
-
return
|
|
2138
|
+
const p = Object.entries(l.errors.all()).filter(([B]) => !V.includes(et(B))), q = l.check(c.fields);
|
|
2139
|
+
return p.length > 0 && l.errors.set({ ...Object.fromEntries(p), ...l.errors.all() }), q;
|
|
2140
2140
|
}
|
|
2141
|
-
async function J(
|
|
2142
|
-
if (!W(
|
|
2141
|
+
async function J(c) {
|
|
2142
|
+
if (!W(c))
|
|
2143
2143
|
return h.value++, !1;
|
|
2144
|
-
if (!
|
|
2145
|
-
|
|
2144
|
+
if (!c.beforeNext) return !0;
|
|
2145
|
+
m.value = !0;
|
|
2146
2146
|
try {
|
|
2147
|
-
if (await
|
|
2147
|
+
if (await c.beforeNext()) return !0;
|
|
2148
2148
|
} finally {
|
|
2149
|
-
|
|
2149
|
+
m.value = !1;
|
|
2150
2150
|
}
|
|
2151
2151
|
return h.value++, !1;
|
|
2152
2152
|
}
|
|
2153
2153
|
async function ae() {
|
|
2154
|
-
const
|
|
2155
|
-
if (
|
|
2156
|
-
return r = !0, re(), t.onSaved?.(
|
|
2157
|
-
if (
|
|
2158
|
-
const V = z.value.findIndex((
|
|
2154
|
+
const c = await l.submit(t.submit, t.submitOptions);
|
|
2155
|
+
if (c.status === "saved" || c.status === "saved-refresh-failed")
|
|
2156
|
+
return r = !0, re(), t.onSaved?.(c.value), !0;
|
|
2157
|
+
if (c.status === "failed" && (h.value++, $.value.errors === 0)) {
|
|
2158
|
+
const V = z.value.findIndex((p) => p.errors > 0);
|
|
2159
2159
|
V !== -1 && Z(V);
|
|
2160
2160
|
}
|
|
2161
2161
|
return !1;
|
|
2162
2162
|
}
|
|
2163
|
-
async function
|
|
2163
|
+
async function me() {
|
|
2164
2164
|
if (R.value) return !1;
|
|
2165
|
-
const
|
|
2166
|
-
return await J(
|
|
2165
|
+
const c = a.value[g.value];
|
|
2166
|
+
return await J(c) ? (n.add(c.name), g.value < I.value - 1 ? (Z(g.value + 1), !0) : ae()) : !1;
|
|
2167
2167
|
}
|
|
2168
|
-
async function D(
|
|
2168
|
+
async function D(c) {
|
|
2169
2169
|
if (R.value) return !1;
|
|
2170
|
-
const V = a.value.findIndex((
|
|
2170
|
+
const V = a.value.findIndex((p) => p.name === c);
|
|
2171
2171
|
if (V === -1) return !1;
|
|
2172
2172
|
if (V <= g.value)
|
|
2173
2173
|
return V < g.value && Z(V), !0;
|
|
2174
|
-
if (!
|
|
2175
|
-
for (; g.value < V; ) if (!await
|
|
2174
|
+
if (!d.has(c)) return !1;
|
|
2175
|
+
for (; g.value < V; ) if (!await me()) return !1;
|
|
2176
2176
|
return g.value === V;
|
|
2177
2177
|
}
|
|
2178
2178
|
const A = t.draft;
|
|
2179
2179
|
let G;
|
|
2180
2180
|
function ne() {
|
|
2181
2181
|
if (G = void 0, !(!A || r)) {
|
|
2182
|
-
if (!
|
|
2183
|
-
Qe(A),
|
|
2182
|
+
if (!l.dirty.value) {
|
|
2183
|
+
Qe(A), w.value = !1;
|
|
2184
2184
|
return;
|
|
2185
2185
|
}
|
|
2186
|
-
|
|
2186
|
+
w.value = Sl(A, { values: Se(l.values), step: o.value, passed: [...n] });
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
2189
|
function re() {
|
|
2190
|
-
r = !0, clearTimeout(G), G = void 0,
|
|
2190
|
+
r = !0, clearTimeout(G), G = void 0, w.value = !1, A && Qe(A);
|
|
2191
2191
|
}
|
|
2192
2192
|
if (A) {
|
|
2193
|
-
const
|
|
2194
|
-
if (
|
|
2195
|
-
Cl(
|
|
2196
|
-
const V = a.value.map((
|
|
2197
|
-
V.includes(
|
|
2198
|
-
for (const
|
|
2199
|
-
for (const
|
|
2200
|
-
f = g.value,
|
|
2193
|
+
const c = _l(A);
|
|
2194
|
+
if (c) {
|
|
2195
|
+
Cl(l.values, c.values);
|
|
2196
|
+
const V = a.value.map((p) => p.name);
|
|
2197
|
+
V.includes(c.step) && (o.value = c.step);
|
|
2198
|
+
for (const p of c.passed) V.includes(p) && n.add(p);
|
|
2199
|
+
for (const p of [...n, o.value]) d.add(p);
|
|
2200
|
+
f = g.value, x.value = l.dirty.value, w.value = x.value;
|
|
2201
2201
|
}
|
|
2202
2202
|
de(
|
|
2203
|
-
[() =>
|
|
2203
|
+
[() => l.values, o, () => [...n].join("\0")],
|
|
2204
2204
|
() => {
|
|
2205
2205
|
r || (clearTimeout(G), G = setTimeout(ne, 400));
|
|
2206
2206
|
},
|
|
@@ -2209,21 +2209,21 @@ function Io(o, t) {
|
|
|
2209
2209
|
G !== void 0 && (clearTimeout(G), ne());
|
|
2210
2210
|
});
|
|
2211
2211
|
}
|
|
2212
|
-
const { confirmDiscard: le } = Ie(() => !r &&
|
|
2212
|
+
const { confirmDiscard: le } = Ie(() => !r && l.dirty.value);
|
|
2213
2213
|
tt(Wt, null) && Jt(() => (r || re(), !0));
|
|
2214
2214
|
async function ke() {
|
|
2215
|
-
const
|
|
2216
|
-
return
|
|
2215
|
+
const c = await le();
|
|
2216
|
+
return c && re(), c;
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2219
|
-
|
|
2218
|
+
function xe() {
|
|
2219
|
+
l.reset(), n.clear(), d.clear(), i.value = null, o.value = a.value[0].name, d.add(o.value), f = 0, x.value = !1, re(), r = !1;
|
|
2220
2220
|
}
|
|
2221
2221
|
const X = k(() => {
|
|
2222
|
-
const
|
|
2223
|
-
return
|
|
2222
|
+
const c = [e("core.steps.position", { current: g.value + 1, total: I.value }), $.value.label];
|
|
2223
|
+
return w.value && c.push(e("core.steps.draft_saved")), c.join(" · ");
|
|
2224
2224
|
}), pe = k(() => {
|
|
2225
|
-
const
|
|
2226
|
-
return
|
|
2225
|
+
const c = a.value[g.value];
|
|
2226
|
+
return c.nextLabel ? c.nextLabel : E.value ? t.submitLabel ?? e("core.actions.save") : e("core.steps.next_named", { step: a.value[g.value + 1].label });
|
|
2227
2227
|
}), L = k(() => F.value ? null : a.value[g.value - 1].label);
|
|
2228
2228
|
return {
|
|
2229
2229
|
steps: z,
|
|
@@ -2233,18 +2233,18 @@ function Io(o, t) {
|
|
|
2233
2233
|
isFirst: F,
|
|
2234
2234
|
isLast: E,
|
|
2235
2235
|
busy: R,
|
|
2236
|
-
direction:
|
|
2236
|
+
direction: i,
|
|
2237
2237
|
subtitle: X,
|
|
2238
2238
|
nextLabel: pe,
|
|
2239
2239
|
backLabel: L,
|
|
2240
|
-
restored:
|
|
2240
|
+
restored: x,
|
|
2241
2241
|
refusals: h,
|
|
2242
|
-
errors:
|
|
2243
|
-
failure:
|
|
2244
|
-
next:
|
|
2242
|
+
errors: l.errors,
|
|
2243
|
+
failure: l.failure,
|
|
2244
|
+
next: me,
|
|
2245
2245
|
back: () => Z(g.value - 1),
|
|
2246
2246
|
goTo: D,
|
|
2247
|
-
restart:
|
|
2247
|
+
restart: xe,
|
|
2248
2248
|
confirmDiscard: ke,
|
|
2249
2249
|
bindDialog: () => ({ subtitle: X.value, primaryLabel: pe.value, status: R.value ? "processing" : "idle", beforeDismiss: ke })
|
|
2250
2250
|
};
|
|
@@ -2258,29 +2258,29 @@ const Fl = {
|
|
|
2258
2258
|
flow: {}
|
|
2259
2259
|
},
|
|
2260
2260
|
emits: ["cancel"],
|
|
2261
|
-
setup(
|
|
2262
|
-
const t =
|
|
2263
|
-
return (a,
|
|
2264
|
-
t.flow.backLabel.value ? (
|
|
2261
|
+
setup(l) {
|
|
2262
|
+
const t = l, { t: e } = oe();
|
|
2263
|
+
return (a, o) => (u(), y("div", Fl, [
|
|
2264
|
+
t.flow.backLabel.value ? (u(), O(ge, {
|
|
2265
2265
|
key: 0,
|
|
2266
2266
|
prominence: "plain",
|
|
2267
2267
|
icon: "arrowLeftSLine",
|
|
2268
2268
|
disabled: t.flow.busy.value,
|
|
2269
2269
|
"data-test": "step-back",
|
|
2270
|
-
onClick:
|
|
2270
|
+
onClick: o[0] || (o[0] = (n) => t.flow.back())
|
|
2271
2271
|
}, {
|
|
2272
|
-
default:
|
|
2272
|
+
default: v(() => [
|
|
2273
2273
|
Y(_(t.flow.backLabel.value), 1)
|
|
2274
2274
|
]),
|
|
2275
2275
|
_: 1
|
|
2276
2276
|
}, 8, ["disabled"])) : T("", !0),
|
|
2277
|
-
|
|
2277
|
+
o[3] || (o[3] = b("div", { class: "grow" }, null, -1)),
|
|
2278
2278
|
M(ge, {
|
|
2279
2279
|
prominence: "plain",
|
|
2280
2280
|
"data-test": "step-cancel",
|
|
2281
|
-
onClick:
|
|
2281
|
+
onClick: o[1] || (o[1] = (n) => a.$emit("cancel"))
|
|
2282
2282
|
}, {
|
|
2283
|
-
default:
|
|
2283
|
+
default: v(() => [
|
|
2284
2284
|
Y(_(s(e)("core.actions.cancel")), 1)
|
|
2285
2285
|
]),
|
|
2286
2286
|
_: 1
|
|
@@ -2289,9 +2289,9 @@ const Fl = {
|
|
|
2289
2289
|
prominence: "primary",
|
|
2290
2290
|
processing: t.flow.busy.value,
|
|
2291
2291
|
"data-test": "step-next",
|
|
2292
|
-
onClick:
|
|
2292
|
+
onClick: o[2] || (o[2] = (n) => t.flow.next())
|
|
2293
2293
|
}, {
|
|
2294
|
-
default:
|
|
2294
|
+
default: v(() => [
|
|
2295
2295
|
Y(_(t.flow.nextLabel.value), 1)
|
|
2296
2296
|
]),
|
|
2297
2297
|
_: 1
|
|
@@ -2312,62 +2312,62 @@ const Fl = {
|
|
|
2312
2312
|
flow: {},
|
|
2313
2313
|
progress: { default: "bar" }
|
|
2314
2314
|
},
|
|
2315
|
-
setup(
|
|
2316
|
-
const t =
|
|
2317
|
-
return (a,
|
|
2315
|
+
setup(l) {
|
|
2316
|
+
const t = l, { t: e } = oe();
|
|
2317
|
+
return (a, o) => t.progress === "bar" ? (u(), y("ol", {
|
|
2318
2318
|
key: 0,
|
|
2319
2319
|
"aria-label": s(e)("core.steps.label"),
|
|
2320
2320
|
"data-test": "step-bar",
|
|
2321
2321
|
class: "grid min-w-0 gap-2",
|
|
2322
2322
|
style: ct({ gridTemplateColumns: `repeat(${t.flow.count.value}, minmax(0, 1fr))` })
|
|
2323
2323
|
}, [
|
|
2324
|
-
(
|
|
2325
|
-
key:
|
|
2324
|
+
(u(!0), y(ue, null, we(t.flow.steps.value, (n) => (u(), y("li", {
|
|
2325
|
+
key: n.name,
|
|
2326
2326
|
class: "flex min-w-0",
|
|
2327
|
-
"aria-current":
|
|
2327
|
+
"aria-current": n.state === "current" ? "step" : void 0
|
|
2328
2328
|
}, [
|
|
2329
|
-
(
|
|
2330
|
-
type:
|
|
2331
|
-
disabled:
|
|
2332
|
-
"data-test": `step-${
|
|
2333
|
-
"data-state":
|
|
2334
|
-
class: j(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left",
|
|
2335
|
-
onClick: (
|
|
2329
|
+
(u(), O(ft(n.reachable ? "button" : "div"), {
|
|
2330
|
+
type: n.reachable ? "button" : void 0,
|
|
2331
|
+
disabled: n.reachable ? t.flow.busy.value : void 0,
|
|
2332
|
+
"data-test": `step-${n.name}`,
|
|
2333
|
+
"data-state": n.errors > 0 ? "error" : n.state,
|
|
2334
|
+
class: j(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left", n.reachable ? "cursor-pointer rounded-control focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-default" : ""]),
|
|
2335
|
+
onClick: (d) => n.reachable ? t.flow.goTo(n.name) : void 0
|
|
2336
2336
|
}, {
|
|
2337
|
-
default:
|
|
2338
|
-
|
|
2339
|
-
class: j(["h-1 rounded-full transition-colors duration-motion-normal",
|
|
2337
|
+
default: v(() => [
|
|
2338
|
+
b("span", {
|
|
2339
|
+
class: j(["h-1 rounded-full transition-colors duration-motion-normal", n.errors > 0 ? "bg-status-danger-solid" : n.state === "current" ? "bg-tint" : n.state === "done" ? "bg-control-on" : "bg-fill-strong"]),
|
|
2340
2340
|
"aria-hidden": "true"
|
|
2341
2341
|
}, null, 2),
|
|
2342
|
-
|
|
2343
|
-
class: j(["flex min-w-0 items-center gap-1.5 text-footnote",
|
|
2342
|
+
b("span", {
|
|
2343
|
+
class: j(["flex min-w-0 items-center gap-1.5 text-footnote", n.state === "current" ? "font-bold text-content-strong" : n.state === "done" ? "font-medium text-content-link" : "font-medium text-content-muted"])
|
|
2344
2344
|
}, [
|
|
2345
|
-
|
|
2345
|
+
n.state === "done" ? (u(), O(s(te), {
|
|
2346
2346
|
key: 0,
|
|
2347
2347
|
name: "checkCustom",
|
|
2348
2348
|
size: 12,
|
|
2349
2349
|
class: "shrink-0"
|
|
2350
2350
|
})) : T("", !0),
|
|
2351
|
-
|
|
2352
|
-
class: j(["truncate",
|
|
2353
|
-
}, _(
|
|
2354
|
-
|
|
2351
|
+
b("span", {
|
|
2352
|
+
class: j(["truncate", n.reachable ? "group-hover:text-content-link" : ""])
|
|
2353
|
+
}, _(n.position) + ". " + _(n.label), 3),
|
|
2354
|
+
n.errors > 0 ? (u(), y("span", {
|
|
2355
2355
|
key: 1,
|
|
2356
2356
|
"data-test": "step-errors",
|
|
2357
|
-
"aria-label": s(e)("core.form.sections.errors", { count:
|
|
2357
|
+
"aria-label": s(e)("core.form.sections.errors", { count: n.errors }),
|
|
2358
2358
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2359
|
-
}, _(
|
|
2360
|
-
|
|
2359
|
+
}, _(n.errors), 9, zl)) : T("", !0),
|
|
2360
|
+
n.state === "done" ? (u(), y("span", Dl, _(s(e)("core.steps.done")), 1)) : T("", !0)
|
|
2361
2361
|
], 2)
|
|
2362
2362
|
]),
|
|
2363
2363
|
_: 2
|
|
2364
2364
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2365
2365
|
], 8, Tl))), 128))
|
|
2366
|
-
], 12, Ll)) : (
|
|
2367
|
-
(
|
|
2368
|
-
key:
|
|
2369
|
-
class: j(["h-1.5 rounded-full transition-all duration-motion-fast", [
|
|
2370
|
-
"data-state":
|
|
2366
|
+
], 12, Ll)) : (u(), y("div", Vl, [
|
|
2367
|
+
(u(!0), y(ue, null, we(t.flow.steps.value, (n) => (u(), y("span", {
|
|
2368
|
+
key: n.name,
|
|
2369
|
+
class: j(["h-1.5 rounded-full transition-all duration-motion-fast", [n.state === "current" ? "w-4.5" : "w-1.5", n.errors > 0 ? "bg-status-danger-solid" : n.state === "todo" && n.position > t.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2370
|
+
"data-state": n.errors > 0 ? "error" : n.state
|
|
2371
2371
|
}, null, 10, ql))), 128))
|
|
2372
2372
|
]));
|
|
2373
2373
|
}
|
|
@@ -2386,41 +2386,50 @@ const Fl = {
|
|
|
2386
2386
|
navigation: { default: "inline" }
|
|
2387
2387
|
},
|
|
2388
2388
|
emits: ["cancel"],
|
|
2389
|
-
setup(
|
|
2390
|
-
const t =
|
|
2389
|
+
setup(l) {
|
|
2390
|
+
const t = l, { t: e } = oe(), a = H("body"), o = H("root");
|
|
2391
|
+
function n(d) {
|
|
2392
|
+
for (let i = d.parentElement; i; i = i.parentElement) {
|
|
2393
|
+
const m = getComputedStyle(i).overflowY;
|
|
2394
|
+
if ((m === "auto" || m === "scroll") && i.scrollHeight > i.clientHeight) return d.getBoundingClientRect().top < i.getBoundingClientRect().top;
|
|
2395
|
+
}
|
|
2396
|
+
return d.getBoundingClientRect().top < 0;
|
|
2397
|
+
}
|
|
2391
2398
|
return de(() => t.flow.current.value.name, async () => {
|
|
2392
|
-
await he(), a.value?.focus();
|
|
2399
|
+
await he(), o.value && n(o.value) && o.value.scrollIntoView?.({ block: "start" }), a.value?.focus({ preventScroll: !0 });
|
|
2393
2400
|
}), de(() => t.flow.refusals.value, async () => {
|
|
2394
2401
|
await he(), a.value && await De(a.value);
|
|
2395
|
-
}), (
|
|
2402
|
+
}), (d, i) => (u(), y("div", {
|
|
2403
|
+
ref_key: "root",
|
|
2404
|
+
ref: o,
|
|
2396
2405
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2397
2406
|
"data-test": "step-form",
|
|
2398
2407
|
"data-step": t.flow.current.value.name
|
|
2399
2408
|
}, [
|
|
2400
|
-
t.progress !== "none" ? (
|
|
2409
|
+
t.progress !== "none" ? (u(), O(Rl, {
|
|
2401
2410
|
key: 0,
|
|
2402
2411
|
flow: t.flow,
|
|
2403
2412
|
progress: t.progress
|
|
2404
2413
|
}, null, 8, ["flow", "progress"])) : T("", !0),
|
|
2405
|
-
|
|
2406
|
-
t.flow.restored.value ? (
|
|
2407
|
-
|
|
2414
|
+
b("p", Ml, _(t.flow.subtitle.value), 1),
|
|
2415
|
+
t.flow.restored.value ? (u(), y("div", jl, [
|
|
2416
|
+
b("span", null, _(s(e)("core.steps.restored")), 1),
|
|
2408
2417
|
M(ge, {
|
|
2409
2418
|
prominence: "link",
|
|
2410
2419
|
size: "sm",
|
|
2411
|
-
onClick:
|
|
2420
|
+
onClick: i[0] || (i[0] = (m) => t.flow.restart())
|
|
2412
2421
|
}, {
|
|
2413
|
-
default:
|
|
2422
|
+
default: v(() => [
|
|
2414
2423
|
Y(_(s(e)("core.steps.start_over")), 1)
|
|
2415
2424
|
]),
|
|
2416
2425
|
_: 1
|
|
2417
2426
|
})
|
|
2418
2427
|
])) : T("", !0),
|
|
2419
|
-
(
|
|
2428
|
+
(u(), O(Me, {
|
|
2420
2429
|
key: t.flow.current.value.name,
|
|
2421
2430
|
form: t.flow
|
|
2422
2431
|
}, null, 8, ["form"])),
|
|
2423
|
-
(
|
|
2432
|
+
(u(), y("form", {
|
|
2424
2433
|
key: t.flow.current.value.name,
|
|
2425
2434
|
ref_key: "body",
|
|
2426
2435
|
ref: a,
|
|
@@ -2428,28 +2437,28 @@ const Fl = {
|
|
|
2428
2437
|
novalidate: "",
|
|
2429
2438
|
"data-test": "step-body",
|
|
2430
2439
|
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" : ""]),
|
|
2431
|
-
onSubmit:
|
|
2440
|
+
onSubmit: i[1] || (i[1] = be((m) => t.flow.next(), ["prevent"]))
|
|
2432
2441
|
}, [
|
|
2433
|
-
C(
|
|
2434
|
-
|
|
2442
|
+
C(d.$slots, t.flow.current.value.name),
|
|
2443
|
+
i[3] || (i[3] = b("button", {
|
|
2435
2444
|
type: "submit",
|
|
2436
2445
|
class: "sr-only",
|
|
2437
2446
|
tabindex: "-1",
|
|
2438
2447
|
"aria-hidden": "true"
|
|
2439
2448
|
}, null, -1))
|
|
2440
2449
|
], 34)),
|
|
2441
|
-
t.navigation === "inline" ? (
|
|
2450
|
+
t.navigation === "inline" ? (u(), O(Bl, {
|
|
2442
2451
|
key: 2,
|
|
2443
2452
|
flow: t.flow,
|
|
2444
|
-
onCancel:
|
|
2453
|
+
onCancel: i[2] || (i[2] = (m) => d.$emit("cancel"))
|
|
2445
2454
|
}, null, 8, ["flow"])) : T("", !0)
|
|
2446
2455
|
], 8, Ol));
|
|
2447
2456
|
}
|
|
2448
2457
|
});
|
|
2449
2458
|
export {
|
|
2450
2459
|
_t as Calendar,
|
|
2451
|
-
|
|
2452
|
-
|
|
2460
|
+
wo as CardSelectField,
|
|
2461
|
+
xo as CheckboxField,
|
|
2453
2462
|
$o as ChoiceChips,
|
|
2454
2463
|
_o as ComboField,
|
|
2455
2464
|
Yo as CommandDialog,
|
|
@@ -2463,8 +2472,8 @@ export {
|
|
|
2463
2472
|
qt as FormGroup,
|
|
2464
2473
|
Fo as FormGroupButton,
|
|
2465
2474
|
Bo as FormIndent,
|
|
2466
|
-
|
|
2467
|
-
|
|
2475
|
+
vt as FormRow,
|
|
2476
|
+
wn as FormView,
|
|
2468
2477
|
bn as GroupEditAction,
|
|
2469
2478
|
qo as GroupSheet,
|
|
2470
2479
|
Lo as I18nField,
|
|
@@ -2487,11 +2496,11 @@ export {
|
|
|
2487
2496
|
Vn as SwitchField,
|
|
2488
2497
|
rn as TextField,
|
|
2489
2498
|
Rn as TextareaField,
|
|
2490
|
-
|
|
2499
|
+
mn as TimeField,
|
|
2491
2500
|
nt as checkFile,
|
|
2492
2501
|
gn as createFieldGroups,
|
|
2493
2502
|
Xo as createLeaveGuard,
|
|
2494
|
-
|
|
2503
|
+
ve as fieldDefaults,
|
|
2495
2504
|
Wo as fieldKey,
|
|
2496
2505
|
fe as fieldProps,
|
|
2497
2506
|
De as focusFirstError,
|