@wssto2/vue-core 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/{Activity-DBy2ZG5b.js → Activity-29hsZ28j.js} +3 -3
- package/dist/{Changes-DDicMqpj.js → Changes-Dxjdkd_5.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-5QSqmIFj.js → CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js} +3 -3
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-Ba3vLxt6.js → DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-MP9frI9g.js → DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js} +2 -2
- package/dist/{DeadLetters-qOY8lQQn.js → DeadLetters-Bb5pPlOY.js} +3 -3
- package/dist/{General-VsiXKARg.js → General-BAG7S6wV.js} +3 -3
- package/dist/{IncidentRecord-CoweBFQ8.js → IncidentRecord-D8aOpNHo.js} +2 -2
- package/dist/{IncidentsList-DphbU1FK.js → IncidentsList-C0cFl0Db.js} +5 -5
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js → NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js} +1 -1
- package/dist/{ProfilePage-DrKiof1I.js → ProfilePage-BnohZIEg.js} +4 -4
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CrtVy3Ea.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js} +2 -2
- package/dist/{ServiceAccountRecord-DnunLV1K.js → ServiceAccountRecord-bxX9yQkC.js} +4 -4
- package/dist/{ServiceAccountsList-7OovJ7gR.js → ServiceAccountsList-BXE6htxk.js} +3 -3
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-B04ECmcf.js → SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js} +1 -1
- package/dist/{Sessions-DzyRG4PP.js → Sessions--Gvc0kxw.js} +2 -2
- package/dist/{SettingsPage-CaMER5m8.js → SettingsPage-DzDC7gD-.js} +5 -5
- package/dist/{SignIn-MHbY4kg8.js → SignIn-CTI_699e.js} +2 -2
- package/dist/{SignInPage-3nerqsOt.js → SignInPage-HKC1bm2E.js} +1 -1
- package/dist/{SignIns-B3uCHdLX.js → SignIns-BcqBgWgN.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DsWI9A-z.js → TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js} +2 -2
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js → Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js} +1 -1
- package/dist/{UserRecord-m4c7H9X9.js → UserRecord-CtUPpbCt.js} +3 -3
- package/dist/{UsersList-C-c8J2XS.js → UsersList-BMkIgIg8.js} +5 -5
- package/dist/app/index.js +1 -1
- package/dist/{application-Dqm5sJdZ.js → application-BmXW6iW_.js} +1 -1
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +46 -49
- package/dist/{fieldMessages-DuyspfNV.js → fieldMessages-B6GHgi40.js} +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +611 -593
- package/dist/form/storableText.d.ts +24 -0
- package/dist/format/format.d.ts +16 -4
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/format-D8KUBmbS.js +87 -0
- package/dist/identity/index.js +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-DLq_tp3t.js → index-CdtofdcJ.js} +13 -13
- package/dist/{index-DwgdsKJN.js → index-Dm-sdJJr.js} +3 -3
- package/dist/{index-W80SBKUX.js → index-Dz0LkLM8.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{rowLayout-DQtop4nN.js → rowLayout-CT8vWYgI.js} +3 -3
- package/dist/{status-MUjElKZC.js → status-BRA14qwX.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useTypedEntry-KfhdrVqp.js → useTypedEntry-C_Bk4sI0.js} +1 -1
- package/package.json +1 -1
- package/dist/format-Dn-BOb-o.js +0 -86
package/dist/form/index.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { E as
|
|
1
|
+
import { _ as Ue, c as tt, f as at } from "../FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js";
|
|
2
|
+
import { E as Bo, u as Lo, a as To } from "../FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js";
|
|
3
3
|
import { f as Te } from "../useCommand-Dc8Lgs9h.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
import { ref as
|
|
6
|
-
import { a as
|
|
7
|
-
import { M as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
4
|
+
import { _ as Vo, a as qo, u as Do } from "../useCommand-Dc8Lgs9h.js";
|
|
5
|
+
import { ref as P, computed as h, defineComponent as A, openBlock as u, createBlock as D, mergeProps as W, unref as l, createSlots as J, withCtx as f, createElementVNode as y, normalizeClass as I, createElementBlock as g, Fragment as ie, renderList as xe, createVNode as j, createCommentVNode as L, toDisplayString as _, renderSlot as F, mergeDefaults as ue, useModel as re, useId as De, withKeys as Ce, withModifiers as pe, createTextVNode as H, mergeModels as le, useTemplateRef as U, shallowRef as Ee, watch as ye, normalizeProps as ze, guardReactiveProps as Ve, nextTick as he, provide as lt, inject as Ye, onBeforeUnmount as We, getCurrentScope as ot, onScopeDispose as nt, toValue as st, shallowReactive as Ne, normalizeStyle as rt, resolveDynamicComponent as it } from "vue";
|
|
6
|
+
import { a as Je } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
|
+
import { M as Mo, c as jo, i as Io, l as Oo, u as Eo } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { _ as Ao } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CIwW7y4j.js";
|
|
9
|
+
import { u as Ko } from "../useResourceForm-DJ4Q75pq.js";
|
|
10
10
|
import { _ as Z } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { d as
|
|
11
|
+
import { u as Ze, _ as ge, f as de, b as ce, a as Xe, e as Re, g as ut, j as dt, k as ct } from "../options-QuOkMKVZ.js";
|
|
12
|
+
import { d as Ho, i as Uo, m as Yo } from "../options-QuOkMKVZ.js";
|
|
13
13
|
import { useI18n as oe } from "vue-i18n";
|
|
14
|
-
import { b as
|
|
15
|
-
import { a as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { u as
|
|
18
|
-
import { r as
|
|
19
|
-
import { s as $e, u as
|
|
20
|
-
import { u as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
23
|
-
import { u as
|
|
24
|
-
import { u as
|
|
25
|
-
import { _ as
|
|
26
|
-
import { u as Bt } from "../TimeField.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { _ as
|
|
14
|
+
import { b as ft } from "../controlSurface-t7OEFESJ.js";
|
|
15
|
+
import { a as mt } from "../TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js";
|
|
16
|
+
import { _ as Jo } from "../TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js";
|
|
17
|
+
import { u as vt, l as pt } from "../suggestions-BVQhoXzS.js";
|
|
18
|
+
import { r as Xo } from "../suggestions-BVQhoXzS.js";
|
|
19
|
+
import { s as $e, u as Ae, i as bt, o as _e, e as Se, k as yt, _ as gt, l as ht, c as kt, b as xt, t as Le, g as wt, q as $t } from "../useTypedEntry-C_Bk4sI0.js";
|
|
20
|
+
import { u as _t, a as Ct, s as St } from "../DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js";
|
|
21
|
+
import { _ as en } from "../DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js";
|
|
22
|
+
import { _ as Qe } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
23
|
+
import { u as Ft } from "../format-D8KUBmbS.js";
|
|
24
|
+
import { u as Me } from "../mediaQuery-CygcXmFW.js";
|
|
25
|
+
import { _ as je } from "../Popover.vue_vue_type_script_setup_true_lang-C20Hf3Hl.js";
|
|
26
|
+
import { u as Bt } from "../TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js";
|
|
27
|
+
import { _ as an } from "../TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js";
|
|
28
28
|
import { _ as be } from "../Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
|
|
29
|
-
import { _ as
|
|
30
|
-
import { a as
|
|
31
|
-
import { _ as
|
|
32
|
-
import { i as
|
|
33
|
-
import { a as
|
|
34
|
-
import { _ as
|
|
35
|
-
import { _ as
|
|
36
|
-
import { b as
|
|
37
|
-
import { _ as
|
|
38
|
-
import { _ as
|
|
29
|
+
import { _ as Lt } from "../FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js";
|
|
30
|
+
import { a as on, c as nn, p as sn, r as rn, u as un } from "../FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js";
|
|
31
|
+
import { _ as cn } from "../FormView.vue_vue_type_script_setup_true_lang-aaNnMIOi.js";
|
|
32
|
+
import { i as Tt } from "../intlLocale-CeRU44qJ.js";
|
|
33
|
+
import { a as zt } from "../environment-Dva-SG8D.js";
|
|
34
|
+
import { _ as Vt } from "../NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js";
|
|
35
|
+
import { _ as qt } from "../Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js";
|
|
36
|
+
import { b as Dt, a as Ge } from "../SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js";
|
|
37
|
+
import { _ as mn, u as vn } from "../SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js";
|
|
38
|
+
import { _ as bn, b as yn, a as gn, u as hn } from "../useGroupSheet-DQ6cVG-z.js";
|
|
39
39
|
import { _ as Ke } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-Bqxj_uJ5.js";
|
|
40
|
-
import { _ as
|
|
41
|
-
import { _ as
|
|
42
|
-
import { _ as
|
|
43
|
-
import { a as
|
|
44
|
-
import { _ as
|
|
45
|
-
import { p as
|
|
46
|
-
import { u as
|
|
47
|
-
import { u as
|
|
48
|
-
import { matchedRouteKey as
|
|
49
|
-
function
|
|
50
|
-
const a =
|
|
40
|
+
import { _ as xn } from "../SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js";
|
|
41
|
+
import { _ as $n } from "../SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js";
|
|
42
|
+
import { _ as Cn } from "../TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js";
|
|
43
|
+
import { a as Rt } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-DdJOodn8.js";
|
|
44
|
+
import { _ as Mt, a as jt } from "../SectionList.vue_vue_type_script_setup_true_lang-CtdF1zuv.js";
|
|
45
|
+
import { p as It } from "../sectionIndex-BS0ic5W7.js";
|
|
46
|
+
import { u as Ot } from "../useSaveChrome-7huA3FzR.js";
|
|
47
|
+
import { u as Fn } from "../useRecordDialog-BTsbHY38.js";
|
|
48
|
+
import { matchedRouteKey as Et, onBeforeRouteLeave as Nt } from "vue-router";
|
|
49
|
+
function At(o) {
|
|
50
|
+
const a = P(null);
|
|
51
51
|
return {
|
|
52
|
-
isDirty: h(() => a.value !== null && JSON.stringify(
|
|
53
|
-
markClean: () => a.value = JSON.stringify(
|
|
52
|
+
isDirty: h(() => a.value !== null && JSON.stringify(o()) !== a.value),
|
|
53
|
+
markClean: () => a.value = JSON.stringify(o())
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const a =
|
|
56
|
+
function so(o) {
|
|
57
|
+
const a = P(!1), e = At(o), { confirmDiscard: t } = Je(() => a.value && e.isDirty.value);
|
|
58
58
|
return {
|
|
59
59
|
/** The sheet was just filled: its current values are the baseline. */
|
|
60
60
|
opened: () => {
|
|
@@ -67,14 +67,14 @@ function ao(r) {
|
|
|
67
67
|
beforeDismiss: t
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name", "value", "checked", "disabled", "onChange"], Pt = { class: "min-w-0 flex-1" },
|
|
70
|
+
const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name", "value", "checked", "disabled", "onChange"], Pt = { class: "min-w-0 flex-1" }, Ht = { class: "block text-body font-semibold text-content-strong" }, Ut = {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "mt-0.5 block text-footnote text-content-muted"
|
|
73
|
-
},
|
|
73
|
+
}, Yt = {
|
|
74
74
|
key: 1,
|
|
75
75
|
class: "flex size-5 shrink-0 items-center justify-center rounded-full bg-control-on text-white",
|
|
76
76
|
"aria-hidden": "true"
|
|
77
|
-
},
|
|
77
|
+
}, ro = /* @__PURE__ */ A({
|
|
78
78
|
__name: "CardSelectField",
|
|
79
79
|
props: /* @__PURE__ */ ue({
|
|
80
80
|
label: {},
|
|
@@ -92,8 +92,8 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
92
92
|
columns: {}
|
|
93
93
|
}, { ...ce, modelValue: null, columns: 2 }),
|
|
94
94
|
emits: ["update:modelValue"],
|
|
95
|
-
setup(
|
|
96
|
-
const e =
|
|
95
|
+
setup(o, { emit: a }) {
|
|
96
|
+
const e = o, t = a, { editable: s } = Ze(e), n = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, c = h(() => n[e.columns]);
|
|
97
97
|
return (i, p) => (u(), D(ge, W(l(de)(e), {
|
|
98
98
|
value: e.options.find((k) => k.value === e.modelValue)?.label ?? null,
|
|
99
99
|
"row-layout": "stacked"
|
|
@@ -108,33 +108,33 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
108
108
|
class: I(["grid w-full gap-2.5", c.value]),
|
|
109
109
|
"data-test": "card-select"
|
|
110
110
|
}, [
|
|
111
|
-
(u(!0), g(ie, null, xe(e.options, (
|
|
112
|
-
key:
|
|
113
|
-
class: I(["relative flex items-center gap-3 rounded-group bg-fill p-3.5 transition-colors duration-motion-fast focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus", [
|
|
111
|
+
(u(!0), g(ie, null, xe(e.options, (r) => (u(), g("label", {
|
|
112
|
+
key: r.value,
|
|
113
|
+
class: I(["relative flex items-center gap-3 rounded-group bg-fill p-3.5 transition-colors duration-motion-fast focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus", [r.value === e.modelValue ? "bg-tint-soft ring-[1.5px] ring-inset ring-border-selected" : "hover:bg-fill-strong", e.disabled || !l(s) || r.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
114
114
|
}, [
|
|
115
115
|
y("input", {
|
|
116
116
|
type: "radio",
|
|
117
117
|
class: "sr-only",
|
|
118
118
|
name: e.name ?? k,
|
|
119
|
-
value:
|
|
120
|
-
checked:
|
|
121
|
-
disabled: e.disabled || !l(
|
|
122
|
-
onChange: (m) => t("update:modelValue",
|
|
119
|
+
value: r.value,
|
|
120
|
+
checked: r.value === e.modelValue,
|
|
121
|
+
disabled: e.disabled || !l(s) || r.disabled,
|
|
122
|
+
onChange: (m) => t("update:modelValue", r.value)
|
|
123
123
|
}, null, 40, Kt),
|
|
124
|
-
|
|
124
|
+
r.icon ? (u(), g("span", {
|
|
125
125
|
key: 0,
|
|
126
|
-
class: I(["flex size-9 shrink-0 items-center justify-center rounded-control",
|
|
126
|
+
class: I(["flex size-9 shrink-0 items-center justify-center rounded-control", r.value === e.modelValue ? "bg-control-on text-white" : "bg-fill-strong text-content-muted"])
|
|
127
127
|
}, [
|
|
128
128
|
j(l(Z), {
|
|
129
|
-
name:
|
|
129
|
+
name: r.icon,
|
|
130
130
|
size: 18
|
|
131
131
|
}, null, 8, ["name"])
|
|
132
132
|
], 2)) : L("", !0),
|
|
133
133
|
y("span", Pt, [
|
|
134
|
-
y("span",
|
|
135
|
-
|
|
134
|
+
y("span", Ht, _(r.label), 1),
|
|
135
|
+
r.description ? (u(), g("span", Ut, _(r.description), 1)) : L("", !0)
|
|
136
136
|
]),
|
|
137
|
-
|
|
137
|
+
r.value === e.modelValue ? (u(), g("span", Yt, [
|
|
138
138
|
j(l(Z), {
|
|
139
139
|
name: "checkCustom",
|
|
140
140
|
size: 12
|
|
@@ -148,30 +148,30 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
148
148
|
i.$slots.trailing ? {
|
|
149
149
|
name: "trailing",
|
|
150
150
|
fn: f(() => [
|
|
151
|
-
|
|
151
|
+
F(i.$slots, "trailing")
|
|
152
152
|
]),
|
|
153
153
|
key: "0"
|
|
154
154
|
} : void 0,
|
|
155
155
|
i.$slots.labelTrailing ? {
|
|
156
156
|
name: "labelTrailing",
|
|
157
157
|
fn: f(() => [
|
|
158
|
-
|
|
158
|
+
F(i.$slots, "labelTrailing")
|
|
159
159
|
]),
|
|
160
160
|
key: "1"
|
|
161
161
|
} : void 0,
|
|
162
162
|
i.$slots.readonly ? {
|
|
163
163
|
name: "readonly",
|
|
164
164
|
fn: f(() => [
|
|
165
|
-
|
|
165
|
+
F(i.$slots, "readonly")
|
|
166
166
|
]),
|
|
167
167
|
key: "2"
|
|
168
168
|
} : void 0
|
|
169
169
|
]), 1040, ["value"]));
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
171
|
+
}), Wt = ["data-field-error"], Jt = ["aria-checked", "aria-disabled", "aria-describedby", "aria-invalid", "tabindex", "onKeydown"], Zt = { class: "flex min-w-0 flex-1 flex-col items-start" }, Xt = {
|
|
172
172
|
key: 0,
|
|
173
173
|
class: "flex shrink-0 items-center gap-2.5"
|
|
174
|
-
},
|
|
174
|
+
}, Qt = ["id"], io = /* @__PURE__ */ A({
|
|
175
175
|
__name: "CheckboxField",
|
|
176
176
|
props: /* @__PURE__ */ le({
|
|
177
177
|
label: {},
|
|
@@ -184,8 +184,8 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
184
184
|
modelModifiers: {}
|
|
185
185
|
}),
|
|
186
186
|
emits: ["update:modelValue"],
|
|
187
|
-
setup(
|
|
188
|
-
const a =
|
|
187
|
+
setup(o) {
|
|
188
|
+
const a = o, e = re(o, "modelValue"), t = !!Xe(), s = De(), n = () => {
|
|
189
189
|
a.disabled || (e.value = !e.value);
|
|
190
190
|
};
|
|
191
191
|
return (c, i) => (u(), g("div", {
|
|
@@ -195,15 +195,15 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
195
195
|
role: "checkbox",
|
|
196
196
|
"aria-checked": e.value,
|
|
197
197
|
"aria-disabled": a.disabled || void 0,
|
|
198
|
-
"aria-describedby": a.error ? `${l(
|
|
198
|
+
"aria-describedby": a.error ? `${l(s)}-error` : void 0,
|
|
199
199
|
"aria-invalid": a.error ? !0 : void 0,
|
|
200
200
|
tabindex: a.disabled ? -1 : 0,
|
|
201
201
|
"data-test": "checkbox",
|
|
202
202
|
class: I(["group/check flex items-center transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", [a.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", t && a.variant === "row" ? "first:rounded-t-group last:rounded-b-group" : "", a.disabled ? "cursor-not-allowed" : a.variant === "row" ? "cursor-pointer hover:bg-fill/60 active:bg-fill" : "cursor-pointer hover:bg-fill"]]),
|
|
203
|
-
onClick:
|
|
203
|
+
onClick: n,
|
|
204
204
|
onKeydown: [
|
|
205
|
-
Ce(pe(
|
|
206
|
-
Ce(pe(
|
|
205
|
+
Ce(pe(n, ["prevent"]), ["space"]),
|
|
206
|
+
Ce(pe(n, ["prevent"]), ["enter"])
|
|
207
207
|
]
|
|
208
208
|
}, [
|
|
209
209
|
y("span", {
|
|
@@ -219,7 +219,7 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
219
219
|
y("div", {
|
|
220
220
|
class: I(["flex min-w-0 flex-1 items-center gap-3", a.variant === "row" ? "min-h-row border-t border-border-separator py-2 pr-row-inset group-first/check:border-t-0" : ""])
|
|
221
221
|
}, [
|
|
222
|
-
y("div",
|
|
222
|
+
y("div", Zt, [
|
|
223
223
|
y("p", {
|
|
224
224
|
class: I(["w-full text-body", [a.variant === "row" ? "break-words" : "truncate", a.disabled ? "text-content-muted" : e.value ? "text-content-strong" : "text-content"]])
|
|
225
225
|
}, _(a.label), 3),
|
|
@@ -227,16 +227,16 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
227
227
|
key: 0,
|
|
228
228
|
class: I(["tabular-nums text-content-muted", a.variant === "row" ? "text-footnote" : "text-xs"])
|
|
229
229
|
}, _(a.description), 3)) : L("", !0),
|
|
230
|
-
|
|
230
|
+
F(c.$slots, "default")
|
|
231
231
|
]),
|
|
232
|
-
c.$slots.trailing ? (u(), g("div",
|
|
233
|
-
|
|
232
|
+
c.$slots.trailing ? (u(), g("div", Xt, [
|
|
233
|
+
F(c.$slots, "trailing")
|
|
234
234
|
])) : L("", !0)
|
|
235
235
|
], 2)
|
|
236
|
-
], 42,
|
|
236
|
+
], 42, Jt),
|
|
237
237
|
a.error ? (u(), g("p", {
|
|
238
238
|
key: 0,
|
|
239
|
-
id: `${l(
|
|
239
|
+
id: `${l(s)}-error`,
|
|
240
240
|
role: "alert",
|
|
241
241
|
class: "flex items-start gap-1.5 px-2 pt-1 text-footnote text-content-destructive"
|
|
242
242
|
}, [
|
|
@@ -246,13 +246,13 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
246
246
|
class: "mt-px shrink-0"
|
|
247
247
|
}),
|
|
248
248
|
H(" " + _(a.error), 1)
|
|
249
|
-
], 8,
|
|
250
|
-
], 8,
|
|
249
|
+
], 8, Qt)) : L("", !0)
|
|
250
|
+
], 8, Wt));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), ea = {
|
|
253
253
|
key: 0,
|
|
254
254
|
class: "text-body text-content-muted"
|
|
255
|
-
},
|
|
255
|
+
}, ta = ["id", "aria-label", "aria-describedby", "aria-invalid"], aa = ["aria-pressed", "disabled", "onClick"], uo = /* @__PURE__ */ A({
|
|
256
256
|
__name: "ChoiceChips",
|
|
257
257
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
258
258
|
label: {},
|
|
@@ -271,14 +271,14 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
271
271
|
modelModifiers: {}
|
|
272
272
|
}),
|
|
273
273
|
emits: ["update:modelValue"],
|
|
274
|
-
setup(
|
|
275
|
-
const a =
|
|
276
|
-
return (
|
|
274
|
+
setup(o) {
|
|
275
|
+
const a = o, e = re(o, "modelValue"), t = (s) => e.value = e.value.includes(s) ? e.value.filter((n) => n !== s) : [...e.value, s];
|
|
276
|
+
return (s, n) => (u(), D(ge, W(l(de)(a), {
|
|
277
277
|
value: a.options.filter((c) => e.value.includes(c.value)).map((c) => c.label).join(", ") || null,
|
|
278
278
|
"row-layout": "stacked"
|
|
279
279
|
}), J({
|
|
280
280
|
default: f(({ id: c, describedby: i, invalid: p }) => [
|
|
281
|
-
a.options.length === 0 ? (u(), g("span",
|
|
281
|
+
a.options.length === 0 ? (u(), g("span", ea, "—")) : (u(), g("div", {
|
|
282
282
|
key: 1,
|
|
283
283
|
id: c,
|
|
284
284
|
role: "group",
|
|
@@ -302,39 +302,39 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
302
302
|
size: 12
|
|
303
303
|
})) : L("", !0),
|
|
304
304
|
H(" " + _(k.label), 1)
|
|
305
|
-
], 10,
|
|
306
|
-
], 8,
|
|
305
|
+
], 10, aa))), 128))
|
|
306
|
+
], 8, ta))
|
|
307
307
|
]),
|
|
308
308
|
_: 2
|
|
309
309
|
}, [
|
|
310
|
-
|
|
310
|
+
s.$slots.trailing ? {
|
|
311
311
|
name: "trailing",
|
|
312
312
|
fn: f(() => [
|
|
313
|
-
|
|
313
|
+
F(s.$slots, "trailing")
|
|
314
314
|
]),
|
|
315
315
|
key: "0"
|
|
316
316
|
} : void 0,
|
|
317
|
-
|
|
317
|
+
s.$slots.labelTrailing ? {
|
|
318
318
|
name: "labelTrailing",
|
|
319
319
|
fn: f(() => [
|
|
320
|
-
|
|
320
|
+
F(s.$slots, "labelTrailing")
|
|
321
321
|
]),
|
|
322
322
|
key: "1"
|
|
323
323
|
} : void 0,
|
|
324
|
-
|
|
324
|
+
s.$slots.readonly ? {
|
|
325
325
|
name: "readonly",
|
|
326
326
|
fn: f(() => [
|
|
327
|
-
|
|
327
|
+
F(s.$slots, "readonly")
|
|
328
328
|
]),
|
|
329
329
|
key: "2"
|
|
330
330
|
} : void 0
|
|
331
331
|
]), 1040, ["value"]));
|
|
332
332
|
}
|
|
333
|
-
}),
|
|
333
|
+
}), la = {
|
|
334
334
|
key: 0,
|
|
335
335
|
class: "flex shrink-0 items-center",
|
|
336
336
|
"data-test": "field-value"
|
|
337
|
-
},
|
|
337
|
+
}, oa = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], na = { class: "block break-words text-body text-content-strong" }, co = /* @__PURE__ */ A({
|
|
338
338
|
__name: "ComboField",
|
|
339
339
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
340
340
|
label: {},
|
|
@@ -362,8 +362,8 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
362
362
|
modelModifiers: {}
|
|
363
363
|
}),
|
|
364
364
|
emits: /* @__PURE__ */ le(["picked", "focus", "blur"], ["update:modelValue"]),
|
|
365
|
-
setup(
|
|
366
|
-
const t =
|
|
365
|
+
setup(o, { expose: a, emit: e }) {
|
|
366
|
+
const t = o, s = re(o, "modelValue"), n = e, { t: c } = oe(), i = !!Xe(), p = Re("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), k = h(() => t.rowLayout === "stacked"), w = h(() => i && !k.value ? ft(t.width) : "w-full"), $ = U("input"), r = U("anchor"), m = Ee(null), b = Ee(""), C = vt({
|
|
367
367
|
source: () => t.search ?? t.options,
|
|
368
368
|
minLength: () => t.minLength,
|
|
369
369
|
debounce: () => t.debounce,
|
|
@@ -371,37 +371,37 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
371
371
|
listAllWhenEmpty: !0,
|
|
372
372
|
recents: () => t.recents
|
|
373
373
|
}), { items: q, open: x, status: O, highlighted: R, showingRecent: X } = C, M = h(() => {
|
|
374
|
-
const T =
|
|
375
|
-
return T === null ? null : [m.value, t.selected, ...t.options ?? []].find((
|
|
374
|
+
const T = s.value;
|
|
375
|
+
return T === null ? null : [m.value, t.selected, ...t.options ?? []].find((G) => G?.value === T) ?? null;
|
|
376
376
|
});
|
|
377
377
|
ye(M, (T) => {
|
|
378
378
|
x.value || (b.value = T?.label ?? "");
|
|
379
379
|
}, { immediate: !0 });
|
|
380
380
|
function ne(T) {
|
|
381
|
-
b.value = T.target.value, C.ask(b.value), b.value === "" && (
|
|
381
|
+
b.value = T.target.value, C.ask(b.value), b.value === "" && (s.value = null, m.value = null);
|
|
382
382
|
}
|
|
383
383
|
function Q(T) {
|
|
384
|
-
|
|
384
|
+
n("focus", T), t.disabled || C.show("");
|
|
385
385
|
}
|
|
386
386
|
function te(T) {
|
|
387
|
-
C.close(), C.remember(T), m.value = T,
|
|
387
|
+
C.close(), C.remember(T), m.value = T, s.value = T.value, b.value = T.label, n("picked", T);
|
|
388
388
|
}
|
|
389
389
|
function fe(T) {
|
|
390
|
-
C.close(), b.value = M.value?.label ?? "",
|
|
390
|
+
C.close(), b.value = M.value?.label ?? "", n("blur", T);
|
|
391
391
|
}
|
|
392
|
-
const me = h(() =>
|
|
393
|
-
return a({ focus: () => $.value?.focus() }), (T,
|
|
392
|
+
const me = h(() => pt(x.value, q.value.length, O.value, !0));
|
|
393
|
+
return a({ focus: () => $.value?.focus() }), (T, G) => (u(), D(ge, W(l(de)(t), {
|
|
394
394
|
value: M.value?.label ?? null,
|
|
395
395
|
"row-layout": t.rowLayout
|
|
396
396
|
}), J({
|
|
397
397
|
default: f(({ id: E, describedby: ae, invalid: se }) => [
|
|
398
398
|
y("div", {
|
|
399
399
|
ref_key: "anchor",
|
|
400
|
-
ref:
|
|
400
|
+
ref: r,
|
|
401
401
|
class: I(["flex items-center gap-1.5", [l(p), w.value]])
|
|
402
402
|
}, [
|
|
403
|
-
T.$slots.value && M.value ? (u(), g("span",
|
|
404
|
-
|
|
403
|
+
T.$slots.value && M.value ? (u(), g("span", la, [
|
|
404
|
+
F(T.$slots, "value", {
|
|
405
405
|
option: M.value
|
|
406
406
|
})
|
|
407
407
|
])) : L("", !0),
|
|
@@ -428,17 +428,17 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
428
428
|
onInput: ne,
|
|
429
429
|
onFocus: Q,
|
|
430
430
|
onBlur: fe,
|
|
431
|
-
onKeydown:
|
|
432
|
-
}, null, 42,
|
|
431
|
+
onKeydown: G[0] || (G[0] = (ee) => l(C).keydown(ee, { pick: te, enterNeedsMove: !1 }))
|
|
432
|
+
}, null, 42, oa),
|
|
433
433
|
j(l(Z), {
|
|
434
434
|
name: "search",
|
|
435
435
|
size: 14,
|
|
436
436
|
class: "shrink-0 text-content-muted"
|
|
437
437
|
})
|
|
438
438
|
], 2),
|
|
439
|
-
j(
|
|
439
|
+
j(mt, {
|
|
440
440
|
id: E,
|
|
441
|
-
anchor:
|
|
441
|
+
anchor: r.value,
|
|
442
442
|
open: l(x),
|
|
443
443
|
items: l(q),
|
|
444
444
|
highlighted: l(R),
|
|
@@ -446,15 +446,15 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
446
446
|
status: l(O),
|
|
447
447
|
recent: l(X),
|
|
448
448
|
"empty-message": !0,
|
|
449
|
-
selected:
|
|
449
|
+
selected: s.value,
|
|
450
450
|
hint: l(c)("core.form.suggestions.keys_pick"),
|
|
451
451
|
onPick: te,
|
|
452
|
-
onHover:
|
|
452
|
+
onHover: G[1] || (G[1] = (ee) => l(C).highlight(ee))
|
|
453
453
|
}, J({ _: 2 }, [
|
|
454
454
|
T.$slots.option ? {
|
|
455
455
|
name: "option",
|
|
456
456
|
fn: f((ee) => [
|
|
457
|
-
|
|
457
|
+
F(T.$slots, "option", ze(Ve(ee)))
|
|
458
458
|
]),
|
|
459
459
|
key: "0"
|
|
460
460
|
} : void 0
|
|
@@ -465,28 +465,28 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
465
465
|
T.$slots.trailing ? {
|
|
466
466
|
name: "trailing",
|
|
467
467
|
fn: f(() => [
|
|
468
|
-
|
|
468
|
+
F(T.$slots, "trailing")
|
|
469
469
|
]),
|
|
470
470
|
key: "0"
|
|
471
471
|
} : void 0,
|
|
472
472
|
T.$slots.labelTrailing ? {
|
|
473
473
|
name: "labelTrailing",
|
|
474
474
|
fn: f(() => [
|
|
475
|
-
|
|
475
|
+
F(T.$slots, "labelTrailing")
|
|
476
476
|
]),
|
|
477
477
|
key: "1"
|
|
478
478
|
} : void 0,
|
|
479
479
|
T.$slots.readonly ? {
|
|
480
480
|
name: "readonly",
|
|
481
481
|
fn: f(() => [
|
|
482
|
-
|
|
482
|
+
F(T.$slots, "readonly")
|
|
483
483
|
]),
|
|
484
484
|
key: "2"
|
|
485
485
|
} : T.$slots.value && M.value ? {
|
|
486
486
|
name: "readonly",
|
|
487
487
|
fn: f(() => [
|
|
488
|
-
y("span",
|
|
489
|
-
|
|
488
|
+
y("span", na, [
|
|
489
|
+
F(T.$slots, "value", {
|
|
490
490
|
option: M.value
|
|
491
491
|
})
|
|
492
492
|
])
|
|
@@ -495,16 +495,16 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
495
495
|
} : void 0
|
|
496
496
|
]), 1040, ["value", "row-layout"]));
|
|
497
497
|
}
|
|
498
|
-
}),
|
|
498
|
+
}), sa = {
|
|
499
499
|
key: 0,
|
|
500
500
|
class: "whitespace-normal"
|
|
501
|
-
},
|
|
501
|
+
}, ra = { class: "whitespace-nowrap" }, ia = { class: "whitespace-nowrap" }, ua = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], da = ["aria-label", "onClick"], ca = {
|
|
502
502
|
class: "-m-3 flex",
|
|
503
503
|
"data-test": "date-time-popover"
|
|
504
|
-
},
|
|
504
|
+
}, fa = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, ma = {
|
|
505
505
|
key: 0,
|
|
506
506
|
class: "border-t border-border-separator pt-2.5"
|
|
507
|
-
},
|
|
507
|
+
}, va = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, pa = ["for"], ba = ["id", "value", "placeholder", "aria-invalid"], ya = ["onClick"], fo = /* @__PURE__ */ A({
|
|
508
508
|
__name: "DateTimeField",
|
|
509
509
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
510
510
|
label: {},
|
|
@@ -528,10 +528,10 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
528
528
|
modelModifiers: {}
|
|
529
529
|
}),
|
|
530
530
|
emits: /* @__PURE__ */ le(["focus", "blur"], ["update:modelValue"]),
|
|
531
|
-
setup(
|
|
532
|
-
const t =
|
|
533
|
-
function X(
|
|
534
|
-
const { date: d, time: z } =
|
|
531
|
+
setup(o, { expose: a, emit: e }) {
|
|
532
|
+
const t = o, s = re(o, "modelValue"), n = e, { t: c } = oe(), i = Ft(), p = Me(), k = U("input"), w = U("popover"), $ = U("calendar"), r = U("sheet"), m = h(() => ({ min: t.min?.slice(0, 10), max: t.max?.slice(0, 10), disabled: t.disabledDates })), b = h(() => t.min && t.min.length === 10 ? `${t.min}T00:00` : t.min), C = h(() => t.max && t.max.length === 10 ? `${t.max}T23:59` : t.max), q = (B, d) => !wt(d, { disabled: t.disabledDates }) && (!b.value || B >= b.value) && (!C.value || B <= C.value), x = _t(() => m.value), O = Bt(() => t.minuteStep), R = h(() => $e(s.value));
|
|
533
|
+
function X(B) {
|
|
534
|
+
const { date: d, time: z } = St(B), v = d === null ? R.value.day ?? Se() : x.parse(d);
|
|
535
535
|
if (!v) return { error: x.invalidMessage() };
|
|
536
536
|
let V = R.value.time ?? Le(t.minuteStep);
|
|
537
537
|
if (z !== null) {
|
|
@@ -542,58 +542,58 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
542
542
|
const S = _e(v, V);
|
|
543
543
|
return q(S, v) ? { value: S } : { error: x.unavailableMessage() };
|
|
544
544
|
}
|
|
545
|
-
const M =
|
|
545
|
+
const M = Ae({ model: s, display: (B) => `${i.date($e(B).day)} ${$e(B).time ?? ""}`.trim(), parse: X }), ne = h({
|
|
546
546
|
get: () => R.value.time,
|
|
547
|
-
set: (
|
|
548
|
-
|
|
547
|
+
set: (B) => {
|
|
548
|
+
B && bt(B) && (s.value = _e(R.value.day ?? Se(), B));
|
|
549
549
|
}
|
|
550
|
-
}), Q =
|
|
551
|
-
const
|
|
552
|
-
return
|
|
553
|
-
}), E = h(() =>
|
|
554
|
-
function se(
|
|
555
|
-
|
|
550
|
+
}), Q = Ae({ model: ne, display: (B) => B, parse: O.parse }), te = Ct(() => t.quickPicks ?? (p.value ? void 0 : []), () => p.value, () => m.value), fe = h(() => t.error || M.message.value || Q.message.value), me = h(() => s.value ? i.dateTime(s.value) : null), T = Re("date", () => fe.value ? "error" : t.disabled ? "locked" : "rest"), G = h(() => {
|
|
551
|
+
const B = M.typed.value;
|
|
552
|
+
return B ? $e(B).day ?? null : null;
|
|
553
|
+
}), E = h(() => G.value ?? (yt(R.value.day) ? R.value.day : null)), ae = h(() => M.typed.value ? $e(M.typed.value).time : R.value.time);
|
|
554
|
+
function se(B) {
|
|
555
|
+
B && M.set(_e(B, R.value.time ?? Le(t.minuteStep)));
|
|
556
556
|
}
|
|
557
|
-
function ee(
|
|
558
|
-
|
|
557
|
+
function ee(B) {
|
|
558
|
+
B && M.set(_e(R.value.day ?? Se(), B));
|
|
559
559
|
}
|
|
560
|
-
function ke(
|
|
561
|
-
M.set(_e(Se(), Le(t.minuteStep))),
|
|
560
|
+
function ke(B) {
|
|
561
|
+
M.set(_e(Se(), Le(t.minuteStep))), B();
|
|
562
562
|
}
|
|
563
|
-
const we =
|
|
564
|
-
async function Y(
|
|
565
|
-
t.disabled || (w.value?.present(),
|
|
563
|
+
const we = De();
|
|
564
|
+
async function Y(B) {
|
|
565
|
+
t.disabled || (w.value?.present(), B && (await he(), await he(), $.value?.focus()));
|
|
566
566
|
}
|
|
567
|
-
function ve(
|
|
568
|
-
|
|
567
|
+
function ve(B) {
|
|
568
|
+
B.key === "Enter" ? (M.commit(), w.value?.dismiss()) : B.key === "ArrowDown" && (B.preventDefault(), Y(!0));
|
|
569
569
|
}
|
|
570
|
-
return a({ focus: () => k.value?.focus() }), (
|
|
570
|
+
return a({ focus: () => k.value?.focus() }), (B, d) => (u(), D(ge, W({ ...l(de)(t), error: fe.value }, {
|
|
571
571
|
value: me.value,
|
|
572
572
|
"value-style": "numeric"
|
|
573
573
|
}), J({
|
|
574
574
|
default: f(({ id: z, describedby: v, invalid: V }) => [
|
|
575
575
|
l(p) ? (u(), g(ie, { key: 0 }, [
|
|
576
|
-
j(
|
|
576
|
+
j(Qe, W({ id: z, "aria-describedby": v }, {
|
|
577
577
|
disabled: t.disabled,
|
|
578
578
|
invalid: V,
|
|
579
579
|
placeholder: l(c)("core.form.select.choose"),
|
|
580
|
-
onClick: d[0] || (d[0] = (S) =>
|
|
580
|
+
onClick: d[0] || (d[0] = (S) => r.value?.present())
|
|
581
581
|
}), {
|
|
582
582
|
default: f(() => [
|
|
583
|
-
|
|
584
|
-
y("span",
|
|
583
|
+
s.value ? (u(), g("span", sa, [
|
|
584
|
+
y("span", ra, _(l(i).date(R.value.day)), 1),
|
|
585
585
|
d[8] || (d[8] = H(_(" "), -1)),
|
|
586
|
-
y("span",
|
|
586
|
+
y("span", ia, _(R.value.time), 1)
|
|
587
587
|
])) : L("", !0)
|
|
588
588
|
]),
|
|
589
589
|
_: 1
|
|
590
590
|
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
591
|
-
j(
|
|
591
|
+
j(gt, {
|
|
592
592
|
ref_key: "sheet",
|
|
593
|
-
ref:
|
|
593
|
+
ref: r,
|
|
594
594
|
title: t.label ?? l(c)("core.form.date.calendar"),
|
|
595
595
|
mode: "datetime",
|
|
596
|
-
"model-value":
|
|
596
|
+
"model-value": s.value,
|
|
597
597
|
min: m.value.min,
|
|
598
598
|
max: m.value.max,
|
|
599
599
|
"disabled-dates": t.disabledDates,
|
|
@@ -603,7 +603,7 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
603
603
|
clearable: !t.required,
|
|
604
604
|
"onUpdate:modelValue": l(M).set
|
|
605
605
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
606
|
-
], 64)) : (u(), D(
|
|
606
|
+
], 64)) : (u(), D(je, {
|
|
607
607
|
key: 1,
|
|
608
608
|
ref_key: "popover",
|
|
609
609
|
ref: w,
|
|
@@ -635,33 +635,33 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
635
635
|
"aria-invalid": V || void 0,
|
|
636
636
|
"aria-describedby": v,
|
|
637
637
|
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
638
|
-
onInput: d[1] || (d[1] = (
|
|
639
|
-
onFocus: d[2] || (d[2] = (
|
|
640
|
-
onBlur: d[3] || (d[3] = (
|
|
641
|
-
l(M).commit(),
|
|
638
|
+
onInput: d[1] || (d[1] = (K) => l(M).input(K.target.value)),
|
|
639
|
+
onFocus: d[2] || (d[2] = (K) => n("focus", K)),
|
|
640
|
+
onBlur: d[3] || (d[3] = (K) => {
|
|
641
|
+
l(M).commit(), n("blur", K);
|
|
642
642
|
}),
|
|
643
643
|
onKeydown: ve,
|
|
644
|
-
onClick: d[4] || (d[4] = (
|
|
645
|
-
}), null, 16,
|
|
644
|
+
onClick: d[4] || (d[4] = (K) => Y(!1))
|
|
645
|
+
}), null, 16, ua),
|
|
646
646
|
t.disabled ? L("", !0) : (u(), g("button", {
|
|
647
647
|
key: 0,
|
|
648
648
|
type: "button",
|
|
649
649
|
tabindex: "-1",
|
|
650
650
|
"aria-label": l(c)("core.form.date.open"),
|
|
651
651
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
652
|
-
onClick: (
|
|
652
|
+
onClick: (K) => N ? w.value?.dismiss() : Y(!0)
|
|
653
653
|
}, [
|
|
654
654
|
j(l(Z), {
|
|
655
655
|
name: "calendarLine",
|
|
656
656
|
size: 18
|
|
657
657
|
})
|
|
658
|
-
], 8,
|
|
658
|
+
], 8, da))
|
|
659
659
|
], 2)
|
|
660
660
|
]),
|
|
661
661
|
default: f(({ dismiss: S }) => [
|
|
662
|
-
y("div",
|
|
663
|
-
y("div",
|
|
664
|
-
j(
|
|
662
|
+
y("div", ca, [
|
|
663
|
+
y("div", fa, [
|
|
664
|
+
j(ht, {
|
|
665
665
|
ref_key: "calendar",
|
|
666
666
|
ref: $,
|
|
667
667
|
"model-value": E.value,
|
|
@@ -671,19 +671,19 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
671
671
|
"open-on": t.openOn,
|
|
672
672
|
"onUpdate:modelValue": se
|
|
673
673
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
674
|
-
l(te).length > 0 ? (u(), g("div",
|
|
675
|
-
j(
|
|
674
|
+
l(te).length > 0 ? (u(), g("div", ma, [
|
|
675
|
+
j(kt, {
|
|
676
676
|
items: l(te),
|
|
677
677
|
selected: E.value,
|
|
678
678
|
onPick: se
|
|
679
679
|
}, null, 8, ["items", "selected"])
|
|
680
680
|
])) : L("", !0)
|
|
681
681
|
]),
|
|
682
|
-
y("div",
|
|
682
|
+
y("div", va, [
|
|
683
683
|
y("label", {
|
|
684
684
|
for: l(we),
|
|
685
685
|
class: "text-footnote font-semibold text-content-muted"
|
|
686
|
-
}, _(l(c)("core.form.time.label")), 9,
|
|
686
|
+
}, _(l(c)("core.form.time.label")), 9, pa),
|
|
687
687
|
y("input", {
|
|
688
688
|
id: l(we),
|
|
689
689
|
type: "text",
|
|
@@ -696,8 +696,8 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
696
696
|
onInput: d[5] || (d[5] = (N) => l(Q).input(N.target.value)),
|
|
697
697
|
onBlur: d[6] || (d[6] = (N) => l(Q).commit()),
|
|
698
698
|
onKeydown: d[7] || (d[7] = Ce(pe((N) => l(Q).commit(), ["prevent"]), ["enter"]))
|
|
699
|
-
}, null, 40,
|
|
700
|
-
j(
|
|
699
|
+
}, null, 40, ba),
|
|
700
|
+
j(xt, {
|
|
701
701
|
"model-value": ae.value,
|
|
702
702
|
step: t.minuteStep,
|
|
703
703
|
"onUpdate:modelValue": ee
|
|
@@ -706,7 +706,7 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
706
706
|
type: "button",
|
|
707
707
|
class: "cursor-pointer self-start rounded-full bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
708
708
|
onClick: (N) => ke(S)
|
|
709
|
-
}, _(l(c)("core.form.time.now")), 9,
|
|
709
|
+
}, _(l(c)("core.form.time.now")), 9, ya)
|
|
710
710
|
])
|
|
711
711
|
])
|
|
712
712
|
]),
|
|
@@ -715,49 +715,49 @@ const Gt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Kt = ["name
|
|
|
715
715
|
]),
|
|
716
716
|
_: 2
|
|
717
717
|
}, [
|
|
718
|
-
|
|
718
|
+
B.$slots.trailing ? {
|
|
719
719
|
name: "trailing",
|
|
720
720
|
fn: f(() => [
|
|
721
|
-
B
|
|
721
|
+
F(B.$slots, "trailing")
|
|
722
722
|
]),
|
|
723
723
|
key: "0"
|
|
724
724
|
} : void 0,
|
|
725
|
-
|
|
725
|
+
B.$slots.labelTrailing ? {
|
|
726
726
|
name: "labelTrailing",
|
|
727
727
|
fn: f(() => [
|
|
728
|
-
B
|
|
728
|
+
F(B.$slots, "labelTrailing")
|
|
729
729
|
]),
|
|
730
730
|
key: "1"
|
|
731
731
|
} : void 0,
|
|
732
|
-
|
|
732
|
+
B.$slots.readonly ? {
|
|
733
733
|
name: "readonly",
|
|
734
734
|
fn: f(() => [
|
|
735
|
-
B
|
|
735
|
+
F(B.$slots, "readonly")
|
|
736
736
|
]),
|
|
737
737
|
key: "2"
|
|
738
738
|
} : void 0
|
|
739
739
|
]), 1040, ["value"]));
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
|
-
function
|
|
742
|
+
function et(o, a = {}) {
|
|
743
743
|
const e = a.accept ?? [];
|
|
744
744
|
if (e.length > 0) {
|
|
745
|
-
const t =
|
|
745
|
+
const t = o.name.lastIndexOf("."), s = t === -1 ? "" : o.name.slice(t).toLowerCase(), n = o.type.toLowerCase();
|
|
746
746
|
if (!e.some((i) => {
|
|
747
747
|
const p = i.trim().toLowerCase();
|
|
748
|
-
return p.startsWith(".") ? p ===
|
|
748
|
+
return p.startsWith(".") ? p === s : p.endsWith("/*") ? n.startsWith(p.slice(0, -1)) : p === n;
|
|
749
749
|
})) return "invalid_type";
|
|
750
750
|
}
|
|
751
|
-
return (a.maxSize ?? 0) > 0 &&
|
|
751
|
+
return (a.maxSize ?? 0) > 0 && o.size > (a.maxSize ?? 0) ? "too_large" : null;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
754
|
-
return
|
|
753
|
+
function Fe(o) {
|
|
754
|
+
return o < 1024 ? `${o} B` : o < 1024 * 1024 ? `${Math.round(o / 1024)} KB` : `${(o / (1024 * 1024)).toFixed(o % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
755
755
|
}
|
|
756
|
-
const
|
|
756
|
+
const ga = { class: "w-full" }, ha = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], ka = {
|
|
757
757
|
key: 0,
|
|
758
758
|
class: "flex items-center gap-3 rounded-group bg-fill p-3",
|
|
759
759
|
"data-test": "file-selected"
|
|
760
|
-
},
|
|
760
|
+
}, xa = { class: "min-w-0 flex-1" }, wa = { class: "truncate text-body font-medium text-content-strong" }, $a = { class: "text-footnote text-content-muted" }, _a = ["disabled", "aria-label", "title"], Ca = ["aria-disabled"], Sa = { class: "font-semibold text-content-link" }, Fa = { class: "text-content-muted" }, mo = /* @__PURE__ */ A({
|
|
761
761
|
__name: "FileField",
|
|
762
762
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
763
763
|
label: {},
|
|
@@ -778,32 +778,32 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
778
778
|
modelModifiers: {}
|
|
779
779
|
}),
|
|
780
780
|
emits: ["update:modelValue"],
|
|
781
|
-
setup(
|
|
782
|
-
const e =
|
|
781
|
+
setup(o, { expose: a }) {
|
|
782
|
+
const e = o, t = re(o, "modelValue"), { t: s } = oe(), n = U("chooser"), c = P(!1), i = P(null), p = h(() => {
|
|
783
783
|
if (e.hint) return e.hint;
|
|
784
784
|
const $ = [];
|
|
785
|
-
return e.accept.length && $.push(
|
|
785
|
+
return e.accept.length && $.push(s("core.form.file.allowed", { formats: e.accept.map((r) => r.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && $.push(s("core.form.file.max_size", { size: Fe(e.maxSize) })), $.join(" · ") || void 0;
|
|
786
786
|
});
|
|
787
787
|
function k($) {
|
|
788
788
|
if (!$) return;
|
|
789
|
-
const
|
|
790
|
-
|
|
789
|
+
const r = et($, { accept: e.accept, maxSize: e.maxSize });
|
|
790
|
+
r ? (i.value = r === "invalid_type" ? s("core.form.file.invalid_type") : s("core.form.file.too_large", { size: Fe(e.maxSize) }), t.value = null) : (i.value = null, t.value = $);
|
|
791
791
|
}
|
|
792
792
|
function w() {
|
|
793
793
|
t.value = null, i.value = null;
|
|
794
794
|
}
|
|
795
795
|
return ye(t, ($) => {
|
|
796
|
-
!$ &&
|
|
797
|
-
}), a({ clear: w }), ($,
|
|
796
|
+
!$ && n.value && (n.value.value = "");
|
|
797
|
+
}), a({ clear: w }), ($, r) => (u(), D(ge, W({ ...l(de)(e), hint: p.value, error: i.value ?? e.error }, {
|
|
798
798
|
value: t.value?.name ?? null,
|
|
799
799
|
"row-layout": "stacked"
|
|
800
800
|
}), J({
|
|
801
801
|
default: f(({ id: m, describedby: b, invalid: C }) => [
|
|
802
|
-
y("div",
|
|
802
|
+
y("div", ga, [
|
|
803
803
|
y("input", {
|
|
804
804
|
id: m,
|
|
805
805
|
ref_key: "chooser",
|
|
806
|
-
ref:
|
|
806
|
+
ref: n,
|
|
807
807
|
type: "file",
|
|
808
808
|
class: "sr-only",
|
|
809
809
|
tabindex: "-1",
|
|
@@ -811,18 +811,18 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
811
811
|
disabled: e.disabled,
|
|
812
812
|
"aria-describedby": b,
|
|
813
813
|
"aria-invalid": C || void 0,
|
|
814
|
-
onChange:
|
|
815
|
-
}, null, 40,
|
|
816
|
-
t.value ? (u(), g("div",
|
|
817
|
-
y("div",
|
|
818
|
-
y("p",
|
|
819
|
-
y("p",
|
|
814
|
+
onChange: r[0] || (r[0] = (q) => k(q.target.files?.[0]))
|
|
815
|
+
}, null, 40, ha),
|
|
816
|
+
t.value ? (u(), g("div", ka, [
|
|
817
|
+
y("div", xa, [
|
|
818
|
+
y("p", wa, _(t.value.name), 1),
|
|
819
|
+
y("p", $a, _(l(Fe)(t.value.size)), 1)
|
|
820
820
|
]),
|
|
821
821
|
y("button", {
|
|
822
822
|
type: "button",
|
|
823
823
|
disabled: e.disabled,
|
|
824
|
-
"aria-label": l(
|
|
825
|
-
title: l(
|
|
824
|
+
"aria-label": l(s)("core.form.file.remove"),
|
|
825
|
+
title: l(s)("core.form.file.remove"),
|
|
826
826
|
class: "flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed",
|
|
827
827
|
onClick: w
|
|
828
828
|
}, [
|
|
@@ -830,7 +830,7 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
830
830
|
name: "close",
|
|
831
831
|
size: 14
|
|
832
832
|
})
|
|
833
|
-
], 8,
|
|
833
|
+
], 8, _a)
|
|
834
834
|
])) : e.variant === "dropzone" ? (u(), g("div", {
|
|
835
835
|
key: 1,
|
|
836
836
|
role: "button",
|
|
@@ -838,26 +838,26 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
838
838
|
"data-test": "file-dropzone",
|
|
839
839
|
"aria-disabled": e.disabled || void 0,
|
|
840
840
|
class: I(["cursor-pointer rounded-group border-2 border-dashed p-6 text-center text-body transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", c.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
841
|
-
onClick:
|
|
841
|
+
onClick: r[1] || (r[1] = (q) => !e.disabled && n.value?.click()),
|
|
842
842
|
onKeydown: [
|
|
843
|
-
|
|
844
|
-
|
|
843
|
+
r[2] || (r[2] = Ce(pe((q) => !e.disabled && n.value?.click(), ["prevent"]), ["enter"])),
|
|
844
|
+
r[3] || (r[3] = Ce(pe((q) => !e.disabled && n.value?.click(), ["prevent"]), ["space"]))
|
|
845
845
|
],
|
|
846
|
-
onDragover:
|
|
847
|
-
onDragleave:
|
|
848
|
-
onDrop:
|
|
846
|
+
onDragover: r[4] || (r[4] = pe((q) => c.value = !0, ["prevent"])),
|
|
847
|
+
onDragleave: r[5] || (r[5] = pe((q) => c.value = !1, ["prevent"])),
|
|
848
|
+
onDrop: r[6] || (r[6] = pe((q) => {
|
|
849
849
|
c.value = !1, e.disabled || k(q.dataTransfer?.files?.[0]);
|
|
850
850
|
}, ["prevent"]))
|
|
851
851
|
}, [
|
|
852
|
-
y("span",
|
|
853
|
-
y("span",
|
|
854
|
-
], 42,
|
|
852
|
+
y("span", Sa, _(l(s)("core.form.file.choose")), 1),
|
|
853
|
+
y("span", Fa, _(" " + l(s)("core.form.file.drop")), 1)
|
|
854
|
+
], 42, Ca)) : (u(), D(be, {
|
|
855
855
|
key: 2,
|
|
856
856
|
disabled: e.disabled,
|
|
857
|
-
onClick:
|
|
857
|
+
onClick: r[7] || (r[7] = (q) => n.value?.click())
|
|
858
858
|
}, {
|
|
859
859
|
default: f(() => [
|
|
860
|
-
H(_(l(
|
|
860
|
+
H(_(l(s)("core.form.file.choose")), 1)
|
|
861
861
|
]),
|
|
862
862
|
_: 1
|
|
863
863
|
}, 8, ["disabled"]))
|
|
@@ -868,27 +868,27 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
868
868
|
$.$slots.trailing ? {
|
|
869
869
|
name: "trailing",
|
|
870
870
|
fn: f(() => [
|
|
871
|
-
|
|
871
|
+
F($.$slots, "trailing")
|
|
872
872
|
]),
|
|
873
873
|
key: "0"
|
|
874
874
|
} : void 0,
|
|
875
875
|
$.$slots.labelTrailing ? {
|
|
876
876
|
name: "labelTrailing",
|
|
877
877
|
fn: f(() => [
|
|
878
|
-
|
|
878
|
+
F($.$slots, "labelTrailing")
|
|
879
879
|
]),
|
|
880
880
|
key: "1"
|
|
881
881
|
} : void 0,
|
|
882
882
|
$.$slots.readonly ? {
|
|
883
883
|
name: "readonly",
|
|
884
884
|
fn: f(() => [
|
|
885
|
-
|
|
885
|
+
F($.$slots, "readonly")
|
|
886
886
|
]),
|
|
887
887
|
key: "2"
|
|
888
888
|
} : void 0
|
|
889
889
|
]), 1040, ["value"]));
|
|
890
890
|
}
|
|
891
|
-
}), Ba = ["disabled"],
|
|
891
|
+
}), Ba = ["disabled"], vo = /* @__PURE__ */ A({
|
|
892
892
|
__name: "FormGroupButton",
|
|
893
893
|
props: {
|
|
894
894
|
label: {},
|
|
@@ -896,17 +896,17 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
896
896
|
disabled: { type: Boolean, default: !1 }
|
|
897
897
|
},
|
|
898
898
|
emits: ["click"],
|
|
899
|
-
setup(
|
|
900
|
-
const e =
|
|
901
|
-
return (
|
|
899
|
+
setup(o, { emit: a }) {
|
|
900
|
+
const e = o, t = a;
|
|
901
|
+
return (s, n) => (u(), D(Lt, null, {
|
|
902
902
|
default: f(() => [
|
|
903
|
-
j(
|
|
903
|
+
j(ut, { layout: "stacked" }, {
|
|
904
904
|
default: f(() => [
|
|
905
905
|
y("button", {
|
|
906
906
|
type: "button",
|
|
907
907
|
disabled: e.disabled,
|
|
908
908
|
class: I(["w-full py-1 text-center text-body focus-visible:outline-2 focus-visible:outline-border-focus disabled:text-content-disabled", e.tone === "critical" ? "text-content-destructive" : "text-content-link"]),
|
|
909
|
-
onClick:
|
|
909
|
+
onClick: n[0] || (n[0] = (c) => t("click"))
|
|
910
910
|
}, _(e.label), 11, Ba)
|
|
911
911
|
]),
|
|
912
912
|
_: 1
|
|
@@ -915,29 +915,29 @@ const ya = { class: "w-full" }, ga = ["id", "accept", "disabled", "aria-describe
|
|
|
915
915
|
_: 1
|
|
916
916
|
}));
|
|
917
917
|
}
|
|
918
|
-
}),
|
|
918
|
+
}), po = /* @__PURE__ */ A({
|
|
919
919
|
__name: "FormIndent",
|
|
920
|
-
setup(
|
|
921
|
-
return
|
|
920
|
+
setup(o) {
|
|
921
|
+
return lt(dt, ct() + 1), (a, e) => F(a.$slots, "default");
|
|
922
922
|
}
|
|
923
923
|
});
|
|
924
|
-
function
|
|
925
|
-
return a.filter((e) => (
|
|
924
|
+
function La(o, a) {
|
|
925
|
+
return a.filter((e) => (o?.[e] ?? "").trim() === "");
|
|
926
926
|
}
|
|
927
|
-
const
|
|
927
|
+
const Ta = ["id", "aria-labelledby"], za = ["id", "value", "lang", "name", "rows", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Va = ["id", "value", "lang", "name", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], qa = {
|
|
928
928
|
key: 0,
|
|
929
929
|
class: "mt-1.5 flex items-center gap-2"
|
|
930
|
-
},
|
|
930
|
+
}, Da = {
|
|
931
931
|
key: 0,
|
|
932
932
|
class: "flex-1 text-footnote text-status-warning-content",
|
|
933
933
|
"data-test": "i18n-missing"
|
|
934
|
-
},
|
|
934
|
+
}, Ra = {
|
|
935
935
|
key: 1,
|
|
936
936
|
class: "flex-1"
|
|
937
|
-
},
|
|
937
|
+
}, Ma = ["aria-label"], ja = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"], Ia = ["data-state"], Oa = { class: "w-full" }, Ea = { class: "whitespace-pre-line break-words text-body text-content-strong" }, Na = ["aria-expanded"], Aa = { class: "flex-1" }, Ga = {
|
|
938
938
|
key: 0,
|
|
939
939
|
class: "mt-1 flex flex-col gap-1.5"
|
|
940
|
-
}, Ka = ["title"],
|
|
940
|
+
}, Ka = ["title"], bo = /* @__PURE__ */ A({
|
|
941
941
|
__name: "I18nField",
|
|
942
942
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
943
943
|
label: {},
|
|
@@ -962,11 +962,11 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
962
962
|
modelModifiers: {}
|
|
963
963
|
}),
|
|
964
964
|
emits: ["update:modelValue"],
|
|
965
|
-
setup(
|
|
966
|
-
const e =
|
|
965
|
+
setup(o, { expose: a }) {
|
|
966
|
+
const e = o, t = re(o, "modelValue"), { t: s, locale: n, availableLocales: c } = oe(), i = Ye(zt, null), p = De(), k = U("field"), w = U("root"), { editable: $ } = Ze(e), r = Re(e.multiline ? "area" : "text", () => e.error || ae.value ? "error" : e.disabled ? "locked" : "rest"), m = h(() => e.locales ?? i?.locales ?? c), b = h(() => e.defaultLocale ?? m.value[0] ?? ""), C = h(() => m.value.includes(b.value) ? [b.value, ...m.value.filter((v) => v !== b.value)] : m.value), q = P(null), x = h(() => q.value !== null && C.value.includes(q.value) ? q.value : C.value.includes(n.value) ? n.value : b.value), O = (v) => t.value[v] ?? "", R = (v) => O(v).trim() !== "", X = (v) => v.toUpperCase();
|
|
967
967
|
function M(v) {
|
|
968
968
|
try {
|
|
969
|
-
return new Intl.DisplayNames([
|
|
969
|
+
return new Intl.DisplayNames([Tt(n.value)], { type: "language" }).of(v) ?? X(v);
|
|
970
970
|
} catch {
|
|
971
971
|
return X(v);
|
|
972
972
|
}
|
|
@@ -983,29 +983,29 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
983
983
|
const S = C.value.length - 1, N = { ArrowRight: V + 1, ArrowLeft: V - 1, Home: 0, End: S }[v.key];
|
|
984
984
|
if (N === void 0) return;
|
|
985
985
|
v.preventDefault();
|
|
986
|
-
const
|
|
987
|
-
|
|
986
|
+
const K = C.value[(N + C.value.length) % C.value.length];
|
|
987
|
+
K !== void 0 && (fe(K, !1), he(() => document.getElementById(te(K))?.focus()));
|
|
988
988
|
}
|
|
989
|
-
const T =
|
|
990
|
-
function
|
|
989
|
+
const T = P(!1);
|
|
990
|
+
function G(v) {
|
|
991
991
|
w.value?.contains(v.relatedTarget) || (T.value = !0);
|
|
992
992
|
}
|
|
993
|
-
const E = h(() =>
|
|
993
|
+
const E = h(() => La(t.value, e.requiredLocales)), ae = h(() => T.value && E.value.length > 0 ? s("core.form.i18n.required", { languages: ne(E.value) }) : void 0), se = h(() => e.requiredLocales.length > 0 ? E.value.length === 0 : C.value.some(R)), ee = h(() => C.value.filter((v) => !R(v) && !(ae.value && E.value.includes(v)))), ke = h(() => R(b.value) && C.value.some((v) => v !== b.value && !R(v)));
|
|
994
994
|
function we() {
|
|
995
995
|
const v = O(b.value);
|
|
996
996
|
t.value = { ...t.value, ...Object.fromEntries(C.value.filter((V) => !R(V)).map((V) => [V, v])) };
|
|
997
997
|
}
|
|
998
|
-
const Y = h(() => [
|
|
998
|
+
const Y = h(() => [n.value, b.value, ...C.value].find((v) => C.value.includes(v) && R(v))), ve = h(() => C.value.filter((v) => v !== Y.value)), B = h(() => ve.value.filter(R).length), d = P(!1), z = h(() => e.label && !$.value && Y.value ? `${e.label} · ${X(Y.value)}` : e.label);
|
|
999
999
|
return a({ focus: () => k.value?.focus() }), (v, V) => (u(), D(ge, W({ ...l(de)(e), label: z.value, error: e.error ?? ae.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
1000
1000
|
value: l($) ? se.value ? "written" : null : Y.value ? O(Y.value) : null,
|
|
1001
1001
|
"row-layout": "stacked"
|
|
1002
1002
|
}), J({
|
|
1003
|
-
default: f(({ id: S, describedby: N, invalid:
|
|
1003
|
+
default: f(({ id: S, describedby: N, invalid: K }) => [
|
|
1004
1004
|
y("div", {
|
|
1005
1005
|
ref_key: "root",
|
|
1006
1006
|
ref: w,
|
|
1007
1007
|
class: "w-full",
|
|
1008
|
-
onFocusout:
|
|
1008
|
+
onFocusout: G
|
|
1009
1009
|
}, [
|
|
1010
1010
|
y("div", {
|
|
1011
1011
|
id: `${l(p)}-panel`,
|
|
@@ -1013,7 +1013,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1013
1013
|
"aria-labelledby": te(x.value)
|
|
1014
1014
|
}, [
|
|
1015
1015
|
y("div", {
|
|
1016
|
-
class: I(["w-full", l(
|
|
1016
|
+
class: I(["w-full", l(r)])
|
|
1017
1017
|
}, [
|
|
1018
1018
|
e.multiline ? (u(), g("textarea", {
|
|
1019
1019
|
key: 0,
|
|
@@ -1028,12 +1028,12 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1028
1028
|
maxlength: e.maxLength,
|
|
1029
1029
|
disabled: e.disabled,
|
|
1030
1030
|
"aria-required": e.required || void 0,
|
|
1031
|
-
"aria-invalid":
|
|
1031
|
+
"aria-invalid": K || void 0,
|
|
1032
1032
|
"aria-describedby": N,
|
|
1033
1033
|
"data-test": "i18n-input",
|
|
1034
1034
|
class: "block w-full resize-y border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
1035
|
-
onInput: V[0] || (V[0] = (
|
|
1036
|
-
}, null, 40,
|
|
1035
|
+
onInput: V[0] || (V[0] = (Be) => Q(x.value, Be.target.value))
|
|
1036
|
+
}, null, 40, za)) : (u(), g("input", {
|
|
1037
1037
|
key: 1,
|
|
1038
1038
|
id: S,
|
|
1039
1039
|
ref_key: "field",
|
|
@@ -1046,30 +1046,30 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1046
1046
|
maxlength: e.maxLength,
|
|
1047
1047
|
disabled: e.disabled,
|
|
1048
1048
|
"aria-required": e.required || void 0,
|
|
1049
|
-
"aria-invalid":
|
|
1049
|
+
"aria-invalid": K || void 0,
|
|
1050
1050
|
"aria-describedby": N,
|
|
1051
1051
|
"data-test": "i18n-input",
|
|
1052
1052
|
class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
1053
|
-
onInput: V[1] || (V[1] = (
|
|
1054
|
-
}, null, 40,
|
|
1053
|
+
onInput: V[1] || (V[1] = (Be) => Q(x.value, Be.target.value))
|
|
1054
|
+
}, null, 40, Va))
|
|
1055
1055
|
], 2)
|
|
1056
|
-
], 8,
|
|
1057
|
-
ee.value.length > 0 || ke.value ? (u(), g("div",
|
|
1058
|
-
ee.value.length > 0 ? (u(), g("p",
|
|
1056
|
+
], 8, Ta),
|
|
1057
|
+
ee.value.length > 0 || ke.value ? (u(), g("div", qa, [
|
|
1058
|
+
ee.value.length > 0 ? (u(), g("p", Da, _(l(s)("core.form.i18n.missing", { languages: ne(ee.value) })), 1)) : (u(), g("span", Ra)),
|
|
1059
1059
|
ke.value && !e.disabled ? (u(), g("button", {
|
|
1060
1060
|
key: 2,
|
|
1061
1061
|
type: "button",
|
|
1062
1062
|
"data-test": "i18n-copy",
|
|
1063
1063
|
class: "shrink-0 cursor-pointer rounded-control bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1064
1064
|
onClick: we
|
|
1065
|
-
}, _(l(
|
|
1065
|
+
}, _(l(s)("core.form.i18n.copy", { language: X(b.value) })), 1)) : L("", !0)
|
|
1066
1066
|
])) : L("", !0)
|
|
1067
1067
|
], 544)
|
|
1068
1068
|
]),
|
|
1069
1069
|
labelTrailing: f(() => [
|
|
1070
1070
|
y("div", {
|
|
1071
1071
|
role: "tablist",
|
|
1072
|
-
"aria-label": l(
|
|
1072
|
+
"aria-label": l(s)("core.form.i18n.languages"),
|
|
1073
1073
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
1074
1074
|
"data-test": "i18n-tabs"
|
|
1075
1075
|
}, [
|
|
@@ -1081,11 +1081,11 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1081
1081
|
"aria-selected": S === x.value,
|
|
1082
1082
|
tabindex: S === x.value ? 0 : -1,
|
|
1083
1083
|
"aria-controls": `${l(p)}-panel`,
|
|
1084
|
-
"aria-label": l(
|
|
1084
|
+
"aria-label": l(s)(R(S) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: M(S) }),
|
|
1085
1085
|
title: M(S),
|
|
1086
1086
|
class: I(["flex min-h-7 cursor-pointer items-center gap-1.5 rounded-control px-2.5 py-1 text-footnote font-semibold transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", S === x.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
1087
|
-
onClick: (
|
|
1088
|
-
onKeydown: (
|
|
1087
|
+
onClick: (K) => fe(S, !0),
|
|
1088
|
+
onKeydown: (K) => me(K, N)
|
|
1089
1089
|
}, [
|
|
1090
1090
|
H(_(X(S)) + " ", 1),
|
|
1091
1091
|
y("span", {
|
|
@@ -1093,17 +1093,17 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1093
1093
|
class: I(["size-1.5 rounded-full", R(S) ? "bg-status-success-solid" : ae.value && E.value.includes(S) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
1094
1094
|
"data-test": "i18n-dot",
|
|
1095
1095
|
"data-state": R(S) ? "written" : ae.value && E.value.includes(S) ? "required" : "empty"
|
|
1096
|
-
}, null, 10,
|
|
1097
|
-
], 42,
|
|
1098
|
-
], 8,
|
|
1096
|
+
}, null, 10, Ia)
|
|
1097
|
+
], 42, ja))), 128))
|
|
1098
|
+
], 8, Ma)
|
|
1099
1099
|
]),
|
|
1100
1100
|
_: 2
|
|
1101
1101
|
}, [
|
|
1102
1102
|
Y.value ? {
|
|
1103
1103
|
name: "readonly",
|
|
1104
1104
|
fn: f(() => [
|
|
1105
|
-
y("div",
|
|
1106
|
-
y("p",
|
|
1105
|
+
y("div", Oa, [
|
|
1106
|
+
y("p", Ea, _(O(Y.value)), 1),
|
|
1107
1107
|
ve.value.length > 0 ? (u(), g(ie, { key: 0 }, [
|
|
1108
1108
|
y("button", {
|
|
1109
1109
|
type: "button",
|
|
@@ -1111,13 +1111,13 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1111
1111
|
class: "mt-1.5 flex w-full cursor-pointer items-center gap-2 text-left text-footnote text-content-muted focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1112
1112
|
onClick: V[2] || (V[2] = (S) => d.value = !d.value)
|
|
1113
1113
|
}, [
|
|
1114
|
-
y("span",
|
|
1114
|
+
y("span", Aa, _(l(s)("core.form.i18n.more", { count: ve.value.length, filled: B.value })), 1),
|
|
1115
1115
|
j(l(Z), {
|
|
1116
1116
|
name: "arrowRightSLine",
|
|
1117
1117
|
size: 16,
|
|
1118
1118
|
class: I(["shrink-0 transition-transform duration-motion-fast", d.value ? "rotate-90" : ""])
|
|
1119
1119
|
}, null, 8, ["class"])
|
|
1120
|
-
], 8,
|
|
1120
|
+
], 8, Na),
|
|
1121
1121
|
d.value ? (u(), g("dl", Ga, [
|
|
1122
1122
|
(u(!0), g(ie, null, xe(ve.value, (S) => (u(), g("div", {
|
|
1123
1123
|
key: S,
|
|
@@ -1129,7 +1129,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1129
1129
|
}, _(X(S)), 9, Ka),
|
|
1130
1130
|
y("dd", {
|
|
1131
1131
|
class: I(["min-w-0 flex-1 whitespace-pre-line break-words", R(S) ? "text-content-strong" : "text-content-disabled"])
|
|
1132
|
-
}, _(R(S) ? O(S) : l(
|
|
1132
|
+
}, _(R(S) ? O(S) : l(s)("core.state.no_value")), 3)
|
|
1133
1133
|
]))), 128))
|
|
1134
1134
|
])) : L("", !0)
|
|
1135
1135
|
], 64)) : L("", !0)
|
|
@@ -1140,13 +1140,28 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1140
1140
|
v.$slots.trailing ? {
|
|
1141
1141
|
name: "trailing",
|
|
1142
1142
|
fn: f(() => [
|
|
1143
|
-
|
|
1143
|
+
F(v.$slots, "trailing")
|
|
1144
1144
|
]),
|
|
1145
1145
|
key: "1"
|
|
1146
1146
|
} : void 0
|
|
1147
1147
|
]), 1040, ["value"]));
|
|
1148
1148
|
}
|
|
1149
|
-
}),
|
|
1149
|
+
}), Pa = "unsupported_characters", Ha = /[\u{10000}-\u{10FFFF}]/u;
|
|
1150
|
+
function Ua(o) {
|
|
1151
|
+
return Ha.test(o);
|
|
1152
|
+
}
|
|
1153
|
+
function qe(o, a, e) {
|
|
1154
|
+
if (typeof o == "string")
|
|
1155
|
+
Ua(o) && e.addIssue({ code: "custom", path: a, params: { code: Pa } });
|
|
1156
|
+
else if (Array.isArray(o))
|
|
1157
|
+
o.forEach((t, s) => qe(t, [...a, s], e));
|
|
1158
|
+
else if (o && typeof o == "object")
|
|
1159
|
+
for (const [t, s] of Object.entries(o)) qe(s, [...a, t], e);
|
|
1160
|
+
}
|
|
1161
|
+
function yo(o, a) {
|
|
1162
|
+
qe(o, [], a);
|
|
1163
|
+
}
|
|
1164
|
+
const go = /* @__PURE__ */ A({
|
|
1150
1165
|
__name: "MoneyField",
|
|
1151
1166
|
props: /* @__PURE__ */ ue({
|
|
1152
1167
|
label: {},
|
|
@@ -1167,46 +1182,46 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1167
1182
|
width: {}
|
|
1168
1183
|
}, { ...ce, modelValue: void 0, decimals: 2, blankZero: !1, negative: !1, width: "sm" }),
|
|
1169
1184
|
emits: ["update:modelValue", "focus", "blur"],
|
|
1170
|
-
setup(
|
|
1171
|
-
const t =
|
|
1172
|
-
return a({ focus: () =>
|
|
1185
|
+
setup(o, { expose: a, emit: e }) {
|
|
1186
|
+
const t = o, s = e, n = U("field");
|
|
1187
|
+
return a({ focus: () => n.value?.focus() }), (c, i) => (u(), D(Vt, W({
|
|
1173
1188
|
ref_key: "field",
|
|
1174
|
-
ref:
|
|
1189
|
+
ref: n,
|
|
1175
1190
|
"model-value": t.modelValue,
|
|
1176
|
-
"onUpdate:modelValue": i[0] || (i[0] = (p) =>
|
|
1191
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => s("update:modelValue", p))
|
|
1177
1192
|
}, l(de)(t), {
|
|
1178
1193
|
decimals: t.decimals,
|
|
1179
1194
|
negative: t.negative,
|
|
1180
1195
|
"blank-zero": t.blankZero,
|
|
1181
1196
|
suffix: t.currency,
|
|
1182
1197
|
width: t.width,
|
|
1183
|
-
onFocus: i[1] || (i[1] = (p) =>
|
|
1184
|
-
onBlur: i[2] || (i[2] = (p) =>
|
|
1198
|
+
onFocus: i[1] || (i[1] = (p) => s("focus", p)),
|
|
1199
|
+
onBlur: i[2] || (i[2] = (p) => s("blur", p))
|
|
1185
1200
|
}), J({ _: 2 }, [
|
|
1186
1201
|
c.$slots.trailing ? {
|
|
1187
1202
|
name: "trailing",
|
|
1188
1203
|
fn: f(() => [
|
|
1189
|
-
|
|
1204
|
+
F(c.$slots, "trailing")
|
|
1190
1205
|
]),
|
|
1191
1206
|
key: "0"
|
|
1192
1207
|
} : void 0,
|
|
1193
1208
|
c.$slots.labelTrailing ? {
|
|
1194
1209
|
name: "labelTrailing",
|
|
1195
1210
|
fn: f(() => [
|
|
1196
|
-
|
|
1211
|
+
F(c.$slots, "labelTrailing")
|
|
1197
1212
|
]),
|
|
1198
1213
|
key: "1"
|
|
1199
1214
|
} : void 0,
|
|
1200
1215
|
c.$slots.readonly ? {
|
|
1201
1216
|
name: "readonly",
|
|
1202
1217
|
fn: f(() => [
|
|
1203
|
-
|
|
1218
|
+
F(c.$slots, "readonly")
|
|
1204
1219
|
]),
|
|
1205
1220
|
key: "2"
|
|
1206
1221
|
} : void 0
|
|
1207
1222
|
]), 1040, ["model-value", "decimals", "negative", "blank-zero", "suffix", "width"]));
|
|
1208
1223
|
}
|
|
1209
|
-
}),
|
|
1224
|
+
}), Ya = { class: "flex flex-col gap-2" }, Wa = ["onClick"], ho = /* @__PURE__ */ A({
|
|
1210
1225
|
__name: "MonthYearField",
|
|
1211
1226
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1212
1227
|
label: {},
|
|
@@ -1229,8 +1244,8 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1229
1244
|
yearModifiers: {}
|
|
1230
1245
|
}),
|
|
1231
1246
|
emits: ["update:month", "update:year"],
|
|
1232
|
-
setup(
|
|
1233
|
-
const a =
|
|
1247
|
+
setup(o) {
|
|
1248
|
+
const a = o, e = re(o, "month"), t = re(o, "year"), { t: s } = oe(), n = h(() => e.value !== null && e.value >= 1 && e.value <= 12), c = (w, $) => s(`core.form.months.${$}.${w}`), i = h(() => n.value && t.value !== null ? s("core.form.months.with_year", { month: c(e.value, "long"), year: t.value }) : t.value !== null ? String(t.value) : n.value ? c(e.value, "long") : "");
|
|
1234
1249
|
function p(w, $) {
|
|
1235
1250
|
e.value = w.month, t.value = w.year, $();
|
|
1236
1251
|
}
|
|
@@ -1240,19 +1255,19 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1240
1255
|
return (w, $) => (u(), D(ge, W(l(de)(a), {
|
|
1241
1256
|
value: i.value || null
|
|
1242
1257
|
}), J({
|
|
1243
|
-
default: f(({ id:
|
|
1244
|
-
j(
|
|
1258
|
+
default: f(({ id: r, describedby: m, invalid: b }) => [
|
|
1259
|
+
j(je, {
|
|
1245
1260
|
label: a.label ?? i.value,
|
|
1246
1261
|
width: "sm",
|
|
1247
1262
|
placement: "bottom-start",
|
|
1248
1263
|
arrow: !1
|
|
1249
1264
|
}, {
|
|
1250
1265
|
trigger: f(({ toggle: C, presented: q }) => [
|
|
1251
|
-
j(
|
|
1266
|
+
j(Qe, W({ id: r, "aria-describedby": m }, {
|
|
1252
1267
|
expanded: q,
|
|
1253
1268
|
disabled: a.disabled,
|
|
1254
1269
|
invalid: b,
|
|
1255
|
-
placeholder: a.placeholder ?? l(
|
|
1270
|
+
placeholder: a.placeholder ?? l(s)("core.form.select.choose"),
|
|
1256
1271
|
onClick: C
|
|
1257
1272
|
}), {
|
|
1258
1273
|
default: f(() => [
|
|
@@ -1269,20 +1284,20 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1269
1284
|
}, 16, ["expanded", "disabled", "invalid", "placeholder", "onClick"])
|
|
1270
1285
|
]),
|
|
1271
1286
|
default: f(({ dismiss: C }) => [
|
|
1272
|
-
y("div",
|
|
1273
|
-
j(
|
|
1287
|
+
y("div", Ya, [
|
|
1288
|
+
j($t, {
|
|
1274
1289
|
month: e.value,
|
|
1275
1290
|
year: t.value,
|
|
1276
1291
|
"min-year": a.minYear,
|
|
1277
1292
|
"max-year": a.maxYear,
|
|
1278
1293
|
onPick: (q) => p(q, C)
|
|
1279
1294
|
}, null, 8, ["month", "year", "min-year", "max-year", "onPick"]),
|
|
1280
|
-
|
|
1295
|
+
n.value || t.value !== null ? (u(), g("button", {
|
|
1281
1296
|
key: 0,
|
|
1282
1297
|
type: "button",
|
|
1283
1298
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1284
1299
|
onClick: (q) => k(C)
|
|
1285
|
-
}, _(l(
|
|
1300
|
+
}, _(l(s)("core.form.select.clear")), 9, Wa)) : L("", !0)
|
|
1286
1301
|
])
|
|
1287
1302
|
]),
|
|
1288
1303
|
_: 2
|
|
@@ -1293,27 +1308,27 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1293
1308
|
w.$slots.trailing ? {
|
|
1294
1309
|
name: "trailing",
|
|
1295
1310
|
fn: f(() => [
|
|
1296
|
-
|
|
1311
|
+
F(w.$slots, "trailing")
|
|
1297
1312
|
]),
|
|
1298
1313
|
key: "0"
|
|
1299
1314
|
} : void 0,
|
|
1300
1315
|
w.$slots.labelTrailing ? {
|
|
1301
1316
|
name: "labelTrailing",
|
|
1302
1317
|
fn: f(() => [
|
|
1303
|
-
|
|
1318
|
+
F(w.$slots, "labelTrailing")
|
|
1304
1319
|
]),
|
|
1305
1320
|
key: "1"
|
|
1306
1321
|
} : void 0,
|
|
1307
1322
|
w.$slots.readonly ? {
|
|
1308
1323
|
name: "readonly",
|
|
1309
1324
|
fn: f(() => [
|
|
1310
|
-
|
|
1325
|
+
F(w.$slots, "readonly")
|
|
1311
1326
|
]),
|
|
1312
1327
|
key: "2"
|
|
1313
1328
|
} : void 0
|
|
1314
1329
|
]), 1040, ["value"]));
|
|
1315
1330
|
}
|
|
1316
|
-
}),
|
|
1331
|
+
}), Ja = { class: "flex min-w-0 flex-wrap items-center gap-1.5 py-0.5" }, Za = { class: "truncate" }, Xa = ["disabled", "aria-label", "onClick"], Qa = ["id", "disabled", "aria-expanded", "aria-invalid", "aria-describedby", "aria-busy"], el = ["id", "disabled", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], tl = { class: "max-h-72 overflow-y-auto" }, al = { class: "flex items-center justify-between gap-2" }, Pe = "inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-control bg-fill px-2.5 py-1 text-body text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", ko = /* @__PURE__ */ A({
|
|
1317
1332
|
__name: "MultiSelectField",
|
|
1318
1333
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1319
1334
|
label: {},
|
|
@@ -1335,30 +1350,30 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1335
1350
|
modelModifiers: {}
|
|
1336
1351
|
}),
|
|
1337
1352
|
emits: ["update:modelValue"],
|
|
1338
|
-
setup(
|
|
1339
|
-
const a =
|
|
1340
|
-
const m = e.value.filter((b) =>
|
|
1353
|
+
setup(o) {
|
|
1354
|
+
const a = o, e = re(o, "modelValue"), { t } = oe(), s = Me(), n = U("sheet"), c = P(!1), i = Dt(() => a.options, (r) => {
|
|
1355
|
+
const m = e.value.filter((b) => r.some((C) => C.value === b));
|
|
1341
1356
|
m.length !== e.value.length && (e.value = m);
|
|
1342
|
-
}), p = h(() => e.value.flatMap((
|
|
1343
|
-
const m = i.known.value.find((b) => b.value ===
|
|
1357
|
+
}), p = h(() => e.value.flatMap((r) => {
|
|
1358
|
+
const m = i.known.value.find((b) => b.value === r) ?? a.selected.find((b) => b.value === r);
|
|
1344
1359
|
return m ? [m] : [];
|
|
1345
1360
|
})), k = h(() => a.placeholder ?? t("core.form.select.choose"));
|
|
1346
|
-
function w(
|
|
1347
|
-
|
|
1361
|
+
function w(r) {
|
|
1362
|
+
r !== null && (e.value = e.value.includes(r) ? e.value.filter((m) => m !== r) : [...e.value, r]);
|
|
1348
1363
|
}
|
|
1349
|
-
const $ = (
|
|
1350
|
-
return (
|
|
1364
|
+
const $ = (r) => e.value = e.value.filter((m) => m !== r);
|
|
1365
|
+
return (r, m) => (u(), D(ge, W(l(de)(a), {
|
|
1351
1366
|
value: p.value.length ? p.value.map((b) => b.label).join(", ") : null,
|
|
1352
1367
|
"row-layout": "stacked"
|
|
1353
1368
|
}), J({
|
|
1354
1369
|
default: f(({ id: b, describedby: C, invalid: q }) => [
|
|
1355
|
-
y("div",
|
|
1370
|
+
y("div", Ja, [
|
|
1356
1371
|
(u(!0), g(ie, null, xe(p.value, (x) => (u(), g("span", {
|
|
1357
1372
|
key: String(x.value),
|
|
1358
1373
|
"data-test": "chip",
|
|
1359
1374
|
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"
|
|
1360
1375
|
}, [
|
|
1361
|
-
y("span",
|
|
1376
|
+
y("span", Za, _(x.label), 1),
|
|
1362
1377
|
y("button", {
|
|
1363
1378
|
type: "button",
|
|
1364
1379
|
disabled: a.disabled,
|
|
@@ -1370,9 +1385,9 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1370
1385
|
name: "close",
|
|
1371
1386
|
size: 12
|
|
1372
1387
|
})
|
|
1373
|
-
], 8,
|
|
1388
|
+
], 8, Xa)
|
|
1374
1389
|
]))), 128)),
|
|
1375
|
-
l(
|
|
1390
|
+
l(s) ? (u(), g("button", {
|
|
1376
1391
|
key: 0,
|
|
1377
1392
|
id: b,
|
|
1378
1393
|
type: "button",
|
|
@@ -1383,7 +1398,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1383
1398
|
"aria-describedby": C,
|
|
1384
1399
|
"aria-busy": l(i).loading.value || void 0,
|
|
1385
1400
|
class: I(Pe),
|
|
1386
|
-
onClick: m[0] || (m[0] = (x) =>
|
|
1401
|
+
onClick: m[0] || (m[0] = (x) => n.value?.present())
|
|
1387
1402
|
}, [
|
|
1388
1403
|
l(i).loading.value ? (u(), D(l(Z), {
|
|
1389
1404
|
key: 0,
|
|
@@ -1392,7 +1407,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1392
1407
|
class: "shrink-0 animate-spin"
|
|
1393
1408
|
})) : L("", !0),
|
|
1394
1409
|
H(" " + _(p.value.length ? l(t)("core.actions.edit") : k.value), 1)
|
|
1395
|
-
], 8,
|
|
1410
|
+
], 8, Qa)) : (u(), D(je, {
|
|
1396
1411
|
key: 1,
|
|
1397
1412
|
label: a.label ?? k.value,
|
|
1398
1413
|
width: "lg",
|
|
@@ -1420,10 +1435,10 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1420
1435
|
class: "shrink-0 animate-spin"
|
|
1421
1436
|
})) : L("", !0),
|
|
1422
1437
|
H(" " + _(p.value.length ? l(t)("core.actions.edit") : k.value), 1)
|
|
1423
|
-
], 16,
|
|
1438
|
+
], 16, el)
|
|
1424
1439
|
]),
|
|
1425
1440
|
default: f(() => [
|
|
1426
|
-
y("div",
|
|
1441
|
+
y("div", tl, [
|
|
1427
1442
|
j(Ge, {
|
|
1428
1443
|
options: l(i).rows.value,
|
|
1429
1444
|
status: l(i).status.value,
|
|
@@ -1434,10 +1449,10 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1434
1449
|
onSelect: w,
|
|
1435
1450
|
onRetry: m[1] || (m[1] = (x) => l(i).reload())
|
|
1436
1451
|
}, J({ _: 2 }, [
|
|
1437
|
-
|
|
1452
|
+
r.$slots.option ? {
|
|
1438
1453
|
name: "option",
|
|
1439
1454
|
fn: f((x) => [
|
|
1440
|
-
|
|
1455
|
+
F(r.$slots, "option", ze(Ve(x)))
|
|
1441
1456
|
]),
|
|
1442
1457
|
key: "0"
|
|
1443
1458
|
} : void 0
|
|
@@ -1447,17 +1462,17 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1447
1462
|
_: 2
|
|
1448
1463
|
}, 1032, ["label"]))
|
|
1449
1464
|
]),
|
|
1450
|
-
l(
|
|
1465
|
+
l(s) ? (u(), D(qt, {
|
|
1451
1466
|
key: 0,
|
|
1452
1467
|
ref_key: "sheet",
|
|
1453
|
-
ref:
|
|
1468
|
+
ref: n,
|
|
1454
1469
|
title: a.label ?? k.value,
|
|
1455
1470
|
grouped: "",
|
|
1456
1471
|
onPresented: m[5] || (m[5] = (x) => c.value = !0),
|
|
1457
1472
|
onDismissed: m[6] || (m[6] = (x) => c.value = !1)
|
|
1458
1473
|
}, {
|
|
1459
1474
|
footer: f(() => [
|
|
1460
|
-
y("div",
|
|
1475
|
+
y("div", al, [
|
|
1461
1476
|
j(be, {
|
|
1462
1477
|
prominence: "plain",
|
|
1463
1478
|
disabled: e.value.length === 0,
|
|
@@ -1470,7 +1485,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1470
1485
|
}, 8, ["disabled"]),
|
|
1471
1486
|
j(be, {
|
|
1472
1487
|
prominence: "primary",
|
|
1473
|
-
onClick: m[4] || (m[4] = (x) =>
|
|
1488
|
+
onClick: m[4] || (m[4] = (x) => n.value?.dismiss())
|
|
1474
1489
|
}, {
|
|
1475
1490
|
default: f(() => [
|
|
1476
1491
|
H(_(l(t)("core.form.select.done")), 1)
|
|
@@ -1489,10 +1504,10 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1489
1504
|
onSelect: w,
|
|
1490
1505
|
onRetry: m[2] || (m[2] = (x) => l(i).reload())
|
|
1491
1506
|
}, J({ _: 2 }, [
|
|
1492
|
-
|
|
1507
|
+
r.$slots.option ? {
|
|
1493
1508
|
name: "option",
|
|
1494
1509
|
fn: f((x) => [
|
|
1495
|
-
|
|
1510
|
+
F(r.$slots, "option", ze(Ve(x)))
|
|
1496
1511
|
]),
|
|
1497
1512
|
key: "0"
|
|
1498
1513
|
} : void 0
|
|
@@ -1503,30 +1518,30 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1503
1518
|
]),
|
|
1504
1519
|
_: 2
|
|
1505
1520
|
}, [
|
|
1506
|
-
|
|
1521
|
+
r.$slots.trailing ? {
|
|
1507
1522
|
name: "trailing",
|
|
1508
1523
|
fn: f(() => [
|
|
1509
|
-
|
|
1524
|
+
F(r.$slots, "trailing")
|
|
1510
1525
|
]),
|
|
1511
1526
|
key: "0"
|
|
1512
1527
|
} : void 0,
|
|
1513
|
-
|
|
1528
|
+
r.$slots.labelTrailing ? {
|
|
1514
1529
|
name: "labelTrailing",
|
|
1515
1530
|
fn: f(() => [
|
|
1516
|
-
|
|
1531
|
+
F(r.$slots, "labelTrailing")
|
|
1517
1532
|
]),
|
|
1518
1533
|
key: "1"
|
|
1519
1534
|
} : void 0,
|
|
1520
|
-
|
|
1535
|
+
r.$slots.readonly ? {
|
|
1521
1536
|
name: "readonly",
|
|
1522
1537
|
fn: f(() => [
|
|
1523
|
-
|
|
1538
|
+
F(r.$slots, "readonly")
|
|
1524
1539
|
]),
|
|
1525
1540
|
key: "2"
|
|
1526
1541
|
} : void 0
|
|
1527
1542
|
]), 1040, ["value"]));
|
|
1528
1543
|
}
|
|
1529
|
-
}),
|
|
1544
|
+
}), ll = ["aria-label"], ol = ["src"], nl = { class: "flex flex-wrap items-center gap-3" }, sl = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], rl = ["aria-label"], il = ["src"], xo = /* @__PURE__ */ A({
|
|
1530
1545
|
__name: "PhotoField",
|
|
1531
1546
|
props: /* @__PURE__ */ le(/* @__PURE__ */ ue({
|
|
1532
1547
|
label: {},
|
|
@@ -1546,25 +1561,25 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1546
1561
|
modelModifiers: {}
|
|
1547
1562
|
}),
|
|
1548
1563
|
emits: ["update:modelValue"],
|
|
1549
|
-
setup(
|
|
1550
|
-
const a =
|
|
1564
|
+
setup(o) {
|
|
1565
|
+
const a = o, e = re(o, "modelValue"), { t } = oe(), s = U("chooser"), n = P(null), c = P(null);
|
|
1551
1566
|
function i() {
|
|
1552
1567
|
c.value && URL.revokeObjectURL(c.value), c.value = null;
|
|
1553
1568
|
}
|
|
1554
1569
|
ye(
|
|
1555
1570
|
e,
|
|
1556
|
-
(
|
|
1557
|
-
i(),
|
|
1571
|
+
(r) => {
|
|
1572
|
+
i(), r instanceof File && (c.value = URL.createObjectURL(r)), r === null && s.value && (s.value.value = "");
|
|
1558
1573
|
},
|
|
1559
1574
|
{ immediate: !0 }
|
|
1560
|
-
),
|
|
1575
|
+
), We(i);
|
|
1561
1576
|
const p = h(() => e.value instanceof File ? c.value : e.value), k = U("viewer"), w = h(() => p.value ? [{ src: p.value, alt: a.label ?? t("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1562
|
-
function $(
|
|
1563
|
-
if (!
|
|
1564
|
-
const m =
|
|
1565
|
-
m ?
|
|
1577
|
+
function $(r) {
|
|
1578
|
+
if (!r) return;
|
|
1579
|
+
const m = et(r, { accept: a.accept, maxSize: a.maxSize });
|
|
1580
|
+
m ? n.value = m === "invalid_type" ? t("core.form.file.invalid_type") : t("core.form.file.too_large", { size: Fe(a.maxSize) }) : (n.value = null, e.value = r);
|
|
1566
1581
|
}
|
|
1567
|
-
return (
|
|
1582
|
+
return (r, m) => (u(), D(ge, W({ ...l(de)(a), error: n.value ?? a.error }, {
|
|
1568
1583
|
value: p.value ? l(t)("core.form.file.choose") : null,
|
|
1569
1584
|
"row-layout": "stacked"
|
|
1570
1585
|
}), J({
|
|
@@ -1581,8 +1596,8 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1581
1596
|
src: p.value,
|
|
1582
1597
|
alt: "",
|
|
1583
1598
|
class: "size-40 rounded-group object-cover"
|
|
1584
|
-
}, null, 8,
|
|
1585
|
-
], 8,
|
|
1599
|
+
}, null, 8, ol)
|
|
1600
|
+
], 8, ll)) : L("", !0),
|
|
1586
1601
|
p.value ? (u(), D(Ke, {
|
|
1587
1602
|
key: 1,
|
|
1588
1603
|
ref_key: "viewer",
|
|
@@ -1591,11 +1606,11 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1591
1606
|
}, null, 8, ["items"])) : L("", !0)
|
|
1592
1607
|
]),
|
|
1593
1608
|
default: f(({ id: b, describedby: C, invalid: q }) => [
|
|
1594
|
-
y("div",
|
|
1609
|
+
y("div", nl, [
|
|
1595
1610
|
y("input", {
|
|
1596
1611
|
id: b,
|
|
1597
1612
|
ref_key: "chooser",
|
|
1598
|
-
ref:
|
|
1613
|
+
ref: s,
|
|
1599
1614
|
type: "file",
|
|
1600
1615
|
class: "sr-only",
|
|
1601
1616
|
tabindex: "-1",
|
|
@@ -1604,7 +1619,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1604
1619
|
"aria-describedby": C,
|
|
1605
1620
|
"aria-invalid": q || void 0,
|
|
1606
1621
|
onChange: m[1] || (m[1] = (x) => $(x.target.files?.[0]))
|
|
1607
|
-
}, null, 40,
|
|
1622
|
+
}, null, 40, sl),
|
|
1608
1623
|
p.value ? (u(), g("button", {
|
|
1609
1624
|
key: 0,
|
|
1610
1625
|
type: "button",
|
|
@@ -1618,11 +1633,11 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1618
1633
|
alt: "",
|
|
1619
1634
|
"data-test": "photo-preview",
|
|
1620
1635
|
class: "size-28 rounded-group object-cover"
|
|
1621
|
-
}, null, 8,
|
|
1622
|
-
], 8,
|
|
1636
|
+
}, null, 8, il)
|
|
1637
|
+
], 8, rl)) : L("", !0),
|
|
1623
1638
|
j(be, {
|
|
1624
1639
|
disabled: a.disabled,
|
|
1625
|
-
onClick: m[3] || (m[3] = (x) =>
|
|
1640
|
+
onClick: m[3] || (m[3] = (x) => s.value?.click())
|
|
1626
1641
|
}, {
|
|
1627
1642
|
default: f(() => [
|
|
1628
1643
|
H(_(l(t)("core.form.file.choose")), 1)
|
|
@@ -1635,7 +1650,7 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1635
1650
|
tone: "critical",
|
|
1636
1651
|
disabled: a.disabled,
|
|
1637
1652
|
onClick: m[4] || (m[4] = (x) => {
|
|
1638
|
-
e.value = null,
|
|
1653
|
+
e.value = null, n.value = null;
|
|
1639
1654
|
})
|
|
1640
1655
|
}, {
|
|
1641
1656
|
default: f(() => [
|
|
@@ -1653,69 +1668,69 @@ const La = ["id", "aria-labelledby"], Ta = ["id", "value", "lang", "name", "rows
|
|
|
1653
1668
|
]),
|
|
1654
1669
|
_: 2
|
|
1655
1670
|
}, [
|
|
1656
|
-
|
|
1671
|
+
r.$slots.trailing ? {
|
|
1657
1672
|
name: "trailing",
|
|
1658
1673
|
fn: f(() => [
|
|
1659
|
-
|
|
1674
|
+
F(r.$slots, "trailing")
|
|
1660
1675
|
]),
|
|
1661
1676
|
key: "0"
|
|
1662
1677
|
} : void 0,
|
|
1663
|
-
|
|
1678
|
+
r.$slots.labelTrailing ? {
|
|
1664
1679
|
name: "labelTrailing",
|
|
1665
1680
|
fn: f(() => [
|
|
1666
|
-
|
|
1681
|
+
F(r.$slots, "labelTrailing")
|
|
1667
1682
|
]),
|
|
1668
1683
|
key: "1"
|
|
1669
1684
|
} : void 0
|
|
1670
1685
|
]), 1040, ["value"]));
|
|
1671
1686
|
}
|
|
1672
|
-
}),
|
|
1687
|
+
}), ul = { hidden: "" }, dl = /* @__PURE__ */ A({
|
|
1673
1688
|
__name: "EditorChrome",
|
|
1674
1689
|
props: {
|
|
1675
1690
|
options: {}
|
|
1676
1691
|
},
|
|
1677
|
-
setup(
|
|
1678
|
-
return
|
|
1692
|
+
setup(o) {
|
|
1693
|
+
return Ot(o.options), (e, t) => (u(), g("span", ul));
|
|
1679
1694
|
}
|
|
1680
1695
|
});
|
|
1681
|
-
function
|
|
1682
|
-
const a =
|
|
1696
|
+
function cl(o) {
|
|
1697
|
+
const a = P(0);
|
|
1683
1698
|
let e = 0;
|
|
1684
1699
|
const t = () => {
|
|
1685
1700
|
e || (e = requestAnimationFrame(() => {
|
|
1686
1701
|
e = 0, a.value++;
|
|
1687
1702
|
}));
|
|
1688
|
-
},
|
|
1703
|
+
}, s = typeof MutationObserver > "u" ? null : new MutationObserver(t);
|
|
1689
1704
|
ye(
|
|
1690
|
-
() =>
|
|
1705
|
+
() => o.sections.value,
|
|
1691
1706
|
(i) => {
|
|
1692
|
-
|
|
1707
|
+
s?.disconnect();
|
|
1693
1708
|
for (const p of i)
|
|
1694
|
-
|
|
1709
|
+
s?.observe(p.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1695
1710
|
t();
|
|
1696
1711
|
},
|
|
1697
1712
|
{ immediate: !0 }
|
|
1698
|
-
),
|
|
1699
|
-
|
|
1713
|
+
), ot() && nt(() => {
|
|
1714
|
+
s?.disconnect(), e && cancelAnimationFrame(e);
|
|
1700
1715
|
});
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1716
|
+
const n = h(() => (a.value, Object.fromEntries(
|
|
1717
|
+
o.sections.value.map((i) => [
|
|
1703
1718
|
i.id,
|
|
1704
1719
|
{
|
|
1705
1720
|
errors: i.element.querySelectorAll("[data-field-error]").length,
|
|
1706
1721
|
required: { total: i.element.querySelectorAll("[data-field-required]").length, filled: i.element.querySelectorAll("[data-field-required][data-field-filled]").length }
|
|
1707
1722
|
}
|
|
1708
1723
|
])
|
|
1709
|
-
))), c = h(() => Object.values(
|
|
1710
|
-
return { states:
|
|
1724
|
+
))), c = h(() => Object.values(n.value).reduce((i, p) => ({ filled: i.filled + p.required.filled, total: i.total + p.required.total }), { filled: 0, total: 0 }));
|
|
1725
|
+
return { states: n, totals: c };
|
|
1711
1726
|
}
|
|
1712
|
-
const
|
|
1727
|
+
const fl = {
|
|
1713
1728
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1714
1729
|
"data-test": "editor-page"
|
|
1715
|
-
},
|
|
1730
|
+
}, ml = {
|
|
1716
1731
|
key: 0,
|
|
1717
1732
|
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"
|
|
1718
|
-
},
|
|
1733
|
+
}, wo = /* @__PURE__ */ A({
|
|
1719
1734
|
__name: "EditorPage",
|
|
1720
1735
|
props: {
|
|
1721
1736
|
title: {},
|
|
@@ -1727,11 +1742,11 @@ const il = {
|
|
|
1727
1742
|
disabledWhileClean: { type: Boolean, default: !1 }
|
|
1728
1743
|
},
|
|
1729
1744
|
emits: ["save", "cancel"],
|
|
1730
|
-
setup(
|
|
1731
|
-
const e =
|
|
1745
|
+
setup(o, { emit: a }) {
|
|
1746
|
+
const e = o, t = a, { t: s } = oe(), n = Me(), c = It(), { states: i, totals: p } = cl(c), k = U("content"), w = h(
|
|
1732
1747
|
() => e.form ? {
|
|
1733
1748
|
form: e.form,
|
|
1734
|
-
label: () => e.saveLabel ??
|
|
1749
|
+
label: () => e.saveLabel ?? s("core.actions.save"),
|
|
1735
1750
|
allowed: () => e.canSave,
|
|
1736
1751
|
disabledWhileClean: () => e.disabledWhileClean,
|
|
1737
1752
|
save: () => {
|
|
@@ -1744,86 +1759,86 @@ const il = {
|
|
|
1744
1759
|
);
|
|
1745
1760
|
ye(
|
|
1746
1761
|
() => e.form?.failure.value,
|
|
1747
|
-
async (
|
|
1748
|
-
|
|
1762
|
+
async (r) => {
|
|
1763
|
+
r?.kind === "invalid" && (await he(), await Te(k.value ?? document, c));
|
|
1749
1764
|
}
|
|
1750
1765
|
);
|
|
1751
|
-
function $(
|
|
1752
|
-
const m = c.sections.value.find((b) => b.id ===
|
|
1766
|
+
function $(r) {
|
|
1767
|
+
const m = c.sections.value.find((b) => b.id === r)?.element;
|
|
1753
1768
|
m && he(() => Te(m));
|
|
1754
1769
|
}
|
|
1755
|
-
return (
|
|
1770
|
+
return (r, m) => (u(), D(Rt, {
|
|
1756
1771
|
title: e.title,
|
|
1757
1772
|
back: e.back,
|
|
1758
1773
|
width: "content"
|
|
1759
1774
|
}, J({
|
|
1760
1775
|
default: f(() => [
|
|
1761
|
-
w.value ? (u(), D(
|
|
1776
|
+
w.value ? (u(), D(dl, {
|
|
1762
1777
|
key: 0,
|
|
1763
1778
|
options: w.value
|
|
1764
1779
|
}, null, 8, ["options"])) : L("", !0),
|
|
1765
|
-
y("div",
|
|
1766
|
-
l(
|
|
1767
|
-
j(
|
|
1780
|
+
y("div", fl, [
|
|
1781
|
+
l(n) ? L("", !0) : (u(), g("aside", ml, [
|
|
1782
|
+
j(Mt, {
|
|
1768
1783
|
standalone: "",
|
|
1769
1784
|
states: l(i),
|
|
1770
1785
|
progress: l(p),
|
|
1771
1786
|
onSelect: $
|
|
1772
1787
|
}, null, 8, ["states", "progress"]),
|
|
1773
|
-
|
|
1788
|
+
F(r.$slots, "aside")
|
|
1774
1789
|
])),
|
|
1775
1790
|
y("div", {
|
|
1776
1791
|
ref_key: "content",
|
|
1777
1792
|
ref: k,
|
|
1778
1793
|
class: "flex min-w-0 flex-col gap-section-gap"
|
|
1779
1794
|
}, [
|
|
1780
|
-
e.form ? (u(), D(
|
|
1795
|
+
e.form ? (u(), D(Ue, {
|
|
1781
1796
|
key: 0,
|
|
1782
1797
|
form: e.form,
|
|
1783
1798
|
label: e.fieldLabel,
|
|
1784
1799
|
scope: k.value
|
|
1785
1800
|
}, null, 8, ["form", "label", "scope"])) : L("", !0),
|
|
1786
|
-
|
|
1801
|
+
F(r.$slots, "default")
|
|
1787
1802
|
], 512)
|
|
1788
1803
|
]),
|
|
1789
|
-
l(
|
|
1804
|
+
l(n) ? (u(), D(jt, {
|
|
1790
1805
|
key: 1,
|
|
1791
1806
|
states: l(i)
|
|
1792
1807
|
}, null, 8, ["states"])) : L("", !0)
|
|
1793
1808
|
]),
|
|
1794
1809
|
_: 2
|
|
1795
1810
|
}, [
|
|
1796
|
-
|
|
1811
|
+
r.$slots.header ? {
|
|
1797
1812
|
name: "header",
|
|
1798
1813
|
fn: f(() => [
|
|
1799
|
-
|
|
1814
|
+
F(r.$slots, "header")
|
|
1800
1815
|
]),
|
|
1801
1816
|
key: "0"
|
|
1802
1817
|
} : void 0,
|
|
1803
|
-
|
|
1818
|
+
r.$slots.pager ? {
|
|
1804
1819
|
name: "pager",
|
|
1805
1820
|
fn: f(() => [
|
|
1806
|
-
|
|
1821
|
+
F(r.$slots, "pager")
|
|
1807
1822
|
]),
|
|
1808
1823
|
key: "1"
|
|
1809
1824
|
} : void 0,
|
|
1810
|
-
|
|
1825
|
+
r.$slots.notices ? {
|
|
1811
1826
|
name: "notices",
|
|
1812
1827
|
fn: f(() => [
|
|
1813
|
-
|
|
1828
|
+
F(r.$slots, "notices")
|
|
1814
1829
|
]),
|
|
1815
1830
|
key: "2"
|
|
1816
1831
|
} : void 0,
|
|
1817
|
-
|
|
1832
|
+
r.$slots.bottom ? {
|
|
1818
1833
|
name: "bottom",
|
|
1819
1834
|
fn: f(() => [
|
|
1820
|
-
|
|
1835
|
+
F(r.$slots, "bottom")
|
|
1821
1836
|
]),
|
|
1822
1837
|
key: "3"
|
|
1823
1838
|
} : void 0
|
|
1824
1839
|
]), 1032, ["title", "back"]));
|
|
1825
1840
|
}
|
|
1826
|
-
}),
|
|
1841
|
+
}), vl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], $o = /* @__PURE__ */ A({
|
|
1827
1842
|
__name: "NumberCell",
|
|
1828
1843
|
props: /* @__PURE__ */ le({
|
|
1829
1844
|
label: {},
|
|
@@ -1838,14 +1853,14 @@ const il = {
|
|
|
1838
1853
|
modelModifiers: {}
|
|
1839
1854
|
}),
|
|
1840
1855
|
emits: ["update:modelValue"],
|
|
1841
|
-
setup(
|
|
1842
|
-
const a =
|
|
1843
|
-
function t(
|
|
1844
|
-
const c =
|
|
1856
|
+
setup(o) {
|
|
1857
|
+
const a = o, e = re(o, "modelValue");
|
|
1858
|
+
function t(n) {
|
|
1859
|
+
const c = n.target.value.replace(/\D/g, "");
|
|
1845
1860
|
e.value = c === "" ? null : Math.min(a.max, Math.max(a.min, Number(c)));
|
|
1846
1861
|
}
|
|
1847
|
-
const
|
|
1848
|
-
return (
|
|
1862
|
+
const s = (n) => n.target.value = e.value === null ? "" : String(e.value);
|
|
1863
|
+
return (n, c) => (u(), g("input", {
|
|
1849
1864
|
value: e.value ?? "",
|
|
1850
1865
|
type: "text",
|
|
1851
1866
|
inputmode: "numeric",
|
|
@@ -1856,87 +1871,87 @@ const il = {
|
|
|
1856
1871
|
placeholder: a.placeholder,
|
|
1857
1872
|
class: I(["rounded-control bg-fill px-2 py-1 text-right text-body tabular-nums text-content-strong transition-[background-color,box-shadow] duration-motion-fast ease-motion-standard placeholder:text-content-disabled focus:bg-surface-cell focus:outline-none focus:ring-[1.5px] focus:ring-inset focus:ring-border-focus disabled:opacity-45", [a.wide ? "w-28" : "w-16", a.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : ""]]),
|
|
1858
1873
|
onInput: t,
|
|
1859
|
-
onBlur:
|
|
1860
|
-
}, null, 42,
|
|
1874
|
+
onBlur: s
|
|
1875
|
+
}, null, 42, vl));
|
|
1861
1876
|
}
|
|
1862
|
-
}),
|
|
1863
|
-
function
|
|
1877
|
+
}), Ie = "vue-core:step-draft:";
|
|
1878
|
+
function Oe(o) {
|
|
1864
1879
|
try {
|
|
1865
|
-
return (
|
|
1880
|
+
return (o.storage === "local" ? window.localStorage : window.sessionStorage) ?? null;
|
|
1866
1881
|
} catch {
|
|
1867
1882
|
return null;
|
|
1868
1883
|
}
|
|
1869
1884
|
}
|
|
1870
|
-
function
|
|
1885
|
+
function pl(o) {
|
|
1871
1886
|
try {
|
|
1872
|
-
const a =
|
|
1887
|
+
const a = Oe(o)?.getItem(Ie + o.key);
|
|
1873
1888
|
if (!a) return null;
|
|
1874
1889
|
const e = JSON.parse(a);
|
|
1875
|
-
return !e || e.version !== (
|
|
1890
|
+
return !e || e.version !== (o.version ?? 1) || typeof e.values != "object" || e.values === null || typeof e.step != "string" || !Array.isArray(e.passed) ? null : e;
|
|
1876
1891
|
} catch {
|
|
1877
1892
|
return null;
|
|
1878
1893
|
}
|
|
1879
1894
|
}
|
|
1880
|
-
function
|
|
1895
|
+
function bl(o, a) {
|
|
1881
1896
|
try {
|
|
1882
|
-
const e =
|
|
1897
|
+
const e = Oe(o);
|
|
1883
1898
|
if (!e) return !1;
|
|
1884
|
-
const t = (
|
|
1885
|
-
return e.setItem(
|
|
1899
|
+
const t = (s, n) => typeof Blob < "u" && n instanceof Blob ? null : n;
|
|
1900
|
+
return e.setItem(Ie + o.key, JSON.stringify({ version: o.version ?? 1, ...a }, t)), !0;
|
|
1886
1901
|
} catch {
|
|
1887
1902
|
return !1;
|
|
1888
1903
|
}
|
|
1889
1904
|
}
|
|
1890
|
-
function
|
|
1905
|
+
function He(o) {
|
|
1891
1906
|
try {
|
|
1892
|
-
|
|
1907
|
+
Oe(o)?.removeItem(Ie + o.key);
|
|
1893
1908
|
} catch {
|
|
1894
1909
|
}
|
|
1895
1910
|
}
|
|
1896
|
-
function
|
|
1897
|
-
for (const [e, t] of Object.entries(
|
|
1911
|
+
function yl(o, a) {
|
|
1912
|
+
for (const [e, t] of Object.entries(o)) {
|
|
1898
1913
|
if (!(e in a)) continue;
|
|
1899
|
-
const
|
|
1900
|
-
(
|
|
1914
|
+
const s = a[e];
|
|
1915
|
+
(s === null || t === null || t === void 0 || typeof s == typeof t && Array.isArray(s) === Array.isArray(t)) && (o[e] = s);
|
|
1901
1916
|
}
|
|
1902
1917
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const { t: e } = oe(), t = h(() =>
|
|
1918
|
+
function _o(o, a) {
|
|
1919
|
+
const { t: e } = oe(), t = h(() => st(a.steps));
|
|
1905
1920
|
if (t.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
1906
|
-
const
|
|
1907
|
-
let
|
|
1908
|
-
const b = h(() => Math.max(0, t.value.findIndex((d) => d.name ===
|
|
1921
|
+
const s = P(t.value[0].name), n = Ne(/* @__PURE__ */ new Set()), c = Ne(/* @__PURE__ */ new Set([t.value[0].name])), i = P(null), p = P(!1), k = P(0), w = P(!1), $ = P(!1);
|
|
1922
|
+
let r = !1, m = 0;
|
|
1923
|
+
const b = h(() => Math.max(0, t.value.findIndex((d) => d.name === s.value))), C = (d) => d.fields?.filter((z) => o.errors.has(z)).length ?? 0, q = h(
|
|
1909
1924
|
() => t.value.map((d, z) => {
|
|
1910
1925
|
const v = C(d), V = z === b.value;
|
|
1911
1926
|
return {
|
|
1912
1927
|
name: d.name,
|
|
1913
1928
|
label: d.label,
|
|
1914
1929
|
position: z + 1,
|
|
1915
|
-
state: V ? "current" :
|
|
1930
|
+
state: V ? "current" : n.has(d.name) && v === 0 ? "done" : "todo",
|
|
1916
1931
|
errors: v,
|
|
1917
1932
|
reachable: !V && (c.has(d.name) || z < b.value)
|
|
1918
1933
|
};
|
|
1919
1934
|
})
|
|
1920
|
-
), x = h(() => q.value[b.value]), O = h(() => q.value.length), R = h(() => b.value === 0), X = h(() => b.value === O.value - 1), M = h(() => p.value ||
|
|
1935
|
+
), x = h(() => q.value[b.value]), O = h(() => q.value.length), R = h(() => b.value === 0), X = h(() => b.value === O.value - 1), M = h(() => p.value || o.submitting.value);
|
|
1921
1936
|
function ne(d) {
|
|
1922
1937
|
const z = t.value[d];
|
|
1923
|
-
z && (i.value = d > b.value ? "forward" : "back",
|
|
1938
|
+
z && (i.value = d > b.value ? "forward" : "back", s.value = z.name, c.add(z.name), m = d, w.value = !1);
|
|
1924
1939
|
}
|
|
1925
1940
|
ye(
|
|
1926
1941
|
() => t.value.map((d) => d.name).join("\0"),
|
|
1927
1942
|
() => {
|
|
1928
|
-
const d = t.value, z = d.findIndex((V) => V.name ===
|
|
1929
|
-
|
|
1930
|
-
S > v && (
|
|
1931
|
-
}), c.add(
|
|
1932
|
-
for (const V of [
|
|
1943
|
+
const d = t.value, z = d.findIndex((V) => V.name === s.value), v = z === -1 ? Math.min(m, d.length - 1) : z;
|
|
1944
|
+
s.value = d[v].name, m = v, d.forEach((V, S) => {
|
|
1945
|
+
S > v && (n.delete(V.name), c.delete(V.name));
|
|
1946
|
+
}), c.add(s.value);
|
|
1947
|
+
for (const V of [n, c]) for (const S of [...V]) d.some((N) => N.name === S) || V.delete(S);
|
|
1933
1948
|
}
|
|
1934
1949
|
);
|
|
1935
1950
|
function Q(d) {
|
|
1936
1951
|
const z = d.fields;
|
|
1937
1952
|
if (!z?.length) return !0;
|
|
1938
|
-
const v = Object.entries(
|
|
1939
|
-
return v.length > 0 &&
|
|
1953
|
+
const v = Object.entries(o.errors.all()).filter(([S]) => !z.includes(at(S))), V = o.check(d.fields);
|
|
1954
|
+
return v.length > 0 && o.errors.set({ ...Object.fromEntries(v), ...o.errors.all() }), V;
|
|
1940
1955
|
}
|
|
1941
1956
|
async function te(d) {
|
|
1942
1957
|
if (!Q(d))
|
|
@@ -1951,9 +1966,9 @@ function ho(r, a) {
|
|
|
1951
1966
|
return k.value++, !1;
|
|
1952
1967
|
}
|
|
1953
1968
|
async function fe() {
|
|
1954
|
-
const d = await
|
|
1969
|
+
const d = await o.submit(a.submit, a.submitOptions);
|
|
1955
1970
|
if (d.status === "saved" || d.status === "saved-refresh-failed")
|
|
1956
|
-
return
|
|
1971
|
+
return r = !0, se(), a.onSaved?.(d.value), !0;
|
|
1957
1972
|
if (d.status === "failed" && (k.value++, x.value.errors === 0)) {
|
|
1958
1973
|
const z = q.value.findIndex((v) => v.errors > 0);
|
|
1959
1974
|
z !== -1 && ne(z);
|
|
@@ -1963,7 +1978,7 @@ function ho(r, a) {
|
|
|
1963
1978
|
async function me() {
|
|
1964
1979
|
if (M.value) return !1;
|
|
1965
1980
|
const d = t.value[b.value];
|
|
1966
|
-
return await te(d) ? (
|
|
1981
|
+
return await te(d) ? (n.add(d.name), b.value < O.value - 1 ? (ne(b.value + 1), !0) : fe()) : !1;
|
|
1967
1982
|
}
|
|
1968
1983
|
async function T(d) {
|
|
1969
1984
|
if (M.value) return !1;
|
|
@@ -1975,48 +1990,48 @@ function ho(r, a) {
|
|
|
1975
1990
|
for (; b.value < z; ) if (!await me()) return !1;
|
|
1976
1991
|
return b.value === z;
|
|
1977
1992
|
}
|
|
1978
|
-
const
|
|
1993
|
+
const G = a.draft;
|
|
1979
1994
|
let E;
|
|
1980
1995
|
function ae() {
|
|
1981
|
-
if (E = void 0, !(!
|
|
1982
|
-
if (!
|
|
1983
|
-
|
|
1996
|
+
if (E = void 0, !(!G || r)) {
|
|
1997
|
+
if (!o.dirty.value) {
|
|
1998
|
+
He(G), $.value = !1;
|
|
1984
1999
|
return;
|
|
1985
2000
|
}
|
|
1986
|
-
$.value =
|
|
2001
|
+
$.value = bl(G, { values: tt(o.values), step: s.value, passed: [...n] });
|
|
1987
2002
|
}
|
|
1988
2003
|
}
|
|
1989
2004
|
function se() {
|
|
1990
|
-
|
|
2005
|
+
r = !0, clearTimeout(E), E = void 0, $.value = !1, G && He(G);
|
|
1991
2006
|
}
|
|
1992
|
-
if (
|
|
1993
|
-
const d =
|
|
2007
|
+
if (G) {
|
|
2008
|
+
const d = pl(G);
|
|
1994
2009
|
if (d) {
|
|
1995
|
-
|
|
2010
|
+
yl(o.values, d.values);
|
|
1996
2011
|
const z = t.value.map((v) => v.name);
|
|
1997
|
-
z.includes(d.step) && (
|
|
1998
|
-
for (const v of d.passed) z.includes(v) &&
|
|
1999
|
-
for (const v of [...
|
|
2000
|
-
m = b.value, w.value =
|
|
2012
|
+
z.includes(d.step) && (s.value = d.step);
|
|
2013
|
+
for (const v of d.passed) z.includes(v) && n.add(v);
|
|
2014
|
+
for (const v of [...n, s.value]) c.add(v);
|
|
2015
|
+
m = b.value, w.value = o.dirty.value, $.value = w.value;
|
|
2001
2016
|
}
|
|
2002
2017
|
ye(
|
|
2003
|
-
[() =>
|
|
2018
|
+
[() => o.values, s, () => [...n].join("\0")],
|
|
2004
2019
|
() => {
|
|
2005
|
-
|
|
2020
|
+
r || (clearTimeout(E), E = setTimeout(ae, 400));
|
|
2006
2021
|
},
|
|
2007
2022
|
{ deep: !0 }
|
|
2008
|
-
),
|
|
2023
|
+
), We(() => {
|
|
2009
2024
|
E !== void 0 && (clearTimeout(E), ae());
|
|
2010
2025
|
});
|
|
2011
2026
|
}
|
|
2012
|
-
const { confirmDiscard: ee } =
|
|
2013
|
-
|
|
2027
|
+
const { confirmDiscard: ee } = Je(() => !r && o.dirty.value);
|
|
2028
|
+
Ye(Et, null) && Nt(() => (r || se(), !0));
|
|
2014
2029
|
async function ke() {
|
|
2015
2030
|
const d = await ee();
|
|
2016
2031
|
return d && se(), d;
|
|
2017
2032
|
}
|
|
2018
2033
|
function we() {
|
|
2019
|
-
|
|
2034
|
+
o.reset(), n.clear(), c.clear(), i.value = null, s.value = t.value[0].name, c.add(s.value), m = 0, w.value = !1, se(), r = !1;
|
|
2020
2035
|
}
|
|
2021
2036
|
const Y = h(() => {
|
|
2022
2037
|
const d = [e("core.steps.position", { current: b.value + 1, total: O.value }), x.value.label];
|
|
@@ -2024,7 +2039,7 @@ function ho(r, a) {
|
|
|
2024
2039
|
}), ve = h(() => {
|
|
2025
2040
|
const d = t.value[b.value];
|
|
2026
2041
|
return d.nextLabel ? d.nextLabel : X.value ? a.submitLabel ?? e("core.actions.save") : e("core.steps.next_named", { step: t.value[b.value + 1].label });
|
|
2027
|
-
}),
|
|
2042
|
+
}), B = h(() => R.value ? null : t.value[b.value - 1].label);
|
|
2028
2043
|
return {
|
|
2029
2044
|
steps: q,
|
|
2030
2045
|
current: x,
|
|
@@ -2036,11 +2051,11 @@ function ho(r, a) {
|
|
|
2036
2051
|
direction: i,
|
|
2037
2052
|
subtitle: Y,
|
|
2038
2053
|
nextLabel: ve,
|
|
2039
|
-
backLabel:
|
|
2054
|
+
backLabel: B,
|
|
2040
2055
|
restored: w,
|
|
2041
2056
|
refusals: k,
|
|
2042
|
-
errors:
|
|
2043
|
-
failure:
|
|
2057
|
+
errors: o.errors,
|
|
2058
|
+
failure: o.failure,
|
|
2044
2059
|
next: me,
|
|
2045
2060
|
back: () => ne(b.value - 1),
|
|
2046
2061
|
goTo: T,
|
|
@@ -2049,36 +2064,36 @@ function ho(r, a) {
|
|
|
2049
2064
|
bindDialog: () => ({ subtitle: Y.value, primaryLabel: ve.value, status: M.value ? "processing" : "idle", beforeDismiss: ke })
|
|
2050
2065
|
};
|
|
2051
2066
|
}
|
|
2052
|
-
const
|
|
2067
|
+
const gl = {
|
|
2053
2068
|
class: "flex flex-wrap items-center gap-2.5 border-t border-border-separator pt-3.5",
|
|
2054
2069
|
"data-test": "step-navigation"
|
|
2055
|
-
},
|
|
2070
|
+
}, hl = /* @__PURE__ */ A({
|
|
2056
2071
|
__name: "StepNavigation",
|
|
2057
2072
|
props: {
|
|
2058
2073
|
flow: {}
|
|
2059
2074
|
},
|
|
2060
2075
|
emits: ["cancel"],
|
|
2061
|
-
setup(
|
|
2062
|
-
const a =
|
|
2063
|
-
return (t,
|
|
2076
|
+
setup(o) {
|
|
2077
|
+
const a = o, { t: e } = oe();
|
|
2078
|
+
return (t, s) => (u(), g("div", gl, [
|
|
2064
2079
|
a.flow.backLabel.value ? (u(), D(be, {
|
|
2065
2080
|
key: 0,
|
|
2066
2081
|
prominence: "plain",
|
|
2067
2082
|
icon: "arrowLeftSLine",
|
|
2068
2083
|
disabled: a.flow.busy.value,
|
|
2069
2084
|
"data-test": "step-back",
|
|
2070
|
-
onClick:
|
|
2085
|
+
onClick: s[0] || (s[0] = (n) => a.flow.back())
|
|
2071
2086
|
}, {
|
|
2072
2087
|
default: f(() => [
|
|
2073
2088
|
H(_(a.flow.backLabel.value), 1)
|
|
2074
2089
|
]),
|
|
2075
2090
|
_: 1
|
|
2076
2091
|
}, 8, ["disabled"])) : L("", !0),
|
|
2077
|
-
|
|
2092
|
+
s[3] || (s[3] = y("div", { class: "grow" }, null, -1)),
|
|
2078
2093
|
j(be, {
|
|
2079
2094
|
prominence: "plain",
|
|
2080
2095
|
"data-test": "step-cancel",
|
|
2081
|
-
onClick:
|
|
2096
|
+
onClick: s[1] || (s[1] = (n) => t.$emit("cancel"))
|
|
2082
2097
|
}, {
|
|
2083
2098
|
default: f(() => [
|
|
2084
2099
|
H(_(l(e)("core.actions.cancel")), 1)
|
|
@@ -2089,7 +2104,7 @@ const vl = {
|
|
|
2089
2104
|
prominence: "primary",
|
|
2090
2105
|
processing: a.flow.busy.value,
|
|
2091
2106
|
"data-test": "step-next",
|
|
2092
|
-
onClick:
|
|
2107
|
+
onClick: s[2] || (s[2] = (n) => a.flow.next())
|
|
2093
2108
|
}, {
|
|
2094
2109
|
default: f(() => [
|
|
2095
2110
|
H(_(a.flow.nextLabel.value), 1)
|
|
@@ -2098,87 +2113,87 @@ const vl = {
|
|
|
2098
2113
|
}, 8, ["processing"])
|
|
2099
2114
|
]));
|
|
2100
2115
|
}
|
|
2101
|
-
}),
|
|
2116
|
+
}), kl = ["aria-label"], xl = ["aria-current"], wl = ["aria-label"], $l = {
|
|
2102
2117
|
key: 2,
|
|
2103
2118
|
class: "sr-only"
|
|
2104
|
-
},
|
|
2119
|
+
}, _l = {
|
|
2105
2120
|
key: 1,
|
|
2106
2121
|
"data-test": "step-dots",
|
|
2107
2122
|
class: "flex justify-center gap-1.5",
|
|
2108
2123
|
"aria-hidden": "true"
|
|
2109
|
-
},
|
|
2124
|
+
}, Cl = ["data-state"], Sl = /* @__PURE__ */ A({
|
|
2110
2125
|
__name: "StepProgress",
|
|
2111
2126
|
props: {
|
|
2112
2127
|
flow: {},
|
|
2113
2128
|
progress: { default: "bar" }
|
|
2114
2129
|
},
|
|
2115
|
-
setup(
|
|
2116
|
-
const a =
|
|
2117
|
-
return (t,
|
|
2130
|
+
setup(o) {
|
|
2131
|
+
const a = o, { t: e } = oe();
|
|
2132
|
+
return (t, s) => a.progress === "bar" ? (u(), g("ol", {
|
|
2118
2133
|
key: 0,
|
|
2119
2134
|
"aria-label": l(e)("core.steps.label"),
|
|
2120
2135
|
"data-test": "step-bar",
|
|
2121
2136
|
class: "grid min-w-0 gap-2",
|
|
2122
|
-
style:
|
|
2137
|
+
style: rt({ gridTemplateColumns: `repeat(${a.flow.count.value}, minmax(0, 1fr))` })
|
|
2123
2138
|
}, [
|
|
2124
|
-
(u(!0), g(ie, null, xe(a.flow.steps.value, (
|
|
2125
|
-
key:
|
|
2139
|
+
(u(!0), g(ie, null, xe(a.flow.steps.value, (n) => (u(), g("li", {
|
|
2140
|
+
key: n.name,
|
|
2126
2141
|
class: "flex min-w-0",
|
|
2127
|
-
"aria-current":
|
|
2142
|
+
"aria-current": n.state === "current" ? "step" : void 0
|
|
2128
2143
|
}, [
|
|
2129
|
-
(u(), D(
|
|
2130
|
-
type:
|
|
2131
|
-
disabled:
|
|
2132
|
-
"data-test": `step-${
|
|
2133
|
-
"data-state":
|
|
2134
|
-
class: I(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left",
|
|
2135
|
-
onClick: (c) =>
|
|
2144
|
+
(u(), D(it(n.reachable ? "button" : "div"), {
|
|
2145
|
+
type: n.reachable ? "button" : void 0,
|
|
2146
|
+
disabled: n.reachable ? a.flow.busy.value : void 0,
|
|
2147
|
+
"data-test": `step-${n.name}`,
|
|
2148
|
+
"data-state": n.errors > 0 ? "error" : n.state,
|
|
2149
|
+
class: I(["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" : ""]),
|
|
2150
|
+
onClick: (c) => n.reachable ? a.flow.goTo(n.name) : void 0
|
|
2136
2151
|
}, {
|
|
2137
2152
|
default: f(() => [
|
|
2138
2153
|
y("span", {
|
|
2139
|
-
class: I(["h-1 rounded-full transition-colors duration-motion-normal",
|
|
2154
|
+
class: I(["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"]),
|
|
2140
2155
|
"aria-hidden": "true"
|
|
2141
2156
|
}, null, 2),
|
|
2142
2157
|
y("span", {
|
|
2143
|
-
class: I(["flex min-w-0 items-center gap-1.5 text-footnote",
|
|
2158
|
+
class: I(["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"])
|
|
2144
2159
|
}, [
|
|
2145
|
-
|
|
2160
|
+
n.state === "done" ? (u(), D(l(Z), {
|
|
2146
2161
|
key: 0,
|
|
2147
2162
|
name: "checkCustom",
|
|
2148
2163
|
size: 12,
|
|
2149
2164
|
class: "shrink-0"
|
|
2150
2165
|
})) : L("", !0),
|
|
2151
2166
|
y("span", {
|
|
2152
|
-
class: I(["truncate",
|
|
2153
|
-
}, _(
|
|
2154
|
-
|
|
2167
|
+
class: I(["truncate", n.reachable ? "group-hover:text-content-link" : ""])
|
|
2168
|
+
}, _(n.position) + ". " + _(n.label), 3),
|
|
2169
|
+
n.errors > 0 ? (u(), g("span", {
|
|
2155
2170
|
key: 1,
|
|
2156
2171
|
"data-test": "step-errors",
|
|
2157
|
-
"aria-label": l(e)("core.form.sections.errors", { count:
|
|
2172
|
+
"aria-label": l(e)("core.form.sections.errors", { count: n.errors }),
|
|
2158
2173
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2159
|
-
}, _(
|
|
2160
|
-
|
|
2174
|
+
}, _(n.errors), 9, wl)) : L("", !0),
|
|
2175
|
+
n.state === "done" ? (u(), g("span", $l, _(l(e)("core.steps.done")), 1)) : L("", !0)
|
|
2161
2176
|
], 2)
|
|
2162
2177
|
]),
|
|
2163
2178
|
_: 2
|
|
2164
2179
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2165
|
-
], 8,
|
|
2166
|
-
], 12,
|
|
2167
|
-
(u(!0), g(ie, null, xe(a.flow.steps.value, (
|
|
2168
|
-
key:
|
|
2169
|
-
class: I(["h-1.5 rounded-full transition-all duration-motion-fast", [
|
|
2170
|
-
"data-state":
|
|
2171
|
-
}, null, 10,
|
|
2180
|
+
], 8, xl))), 128))
|
|
2181
|
+
], 12, kl)) : (u(), g("div", _l, [
|
|
2182
|
+
(u(!0), g(ie, null, xe(a.flow.steps.value, (n) => (u(), g("span", {
|
|
2183
|
+
key: n.name,
|
|
2184
|
+
class: I(["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 > a.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2185
|
+
"data-state": n.errors > 0 ? "error" : n.state
|
|
2186
|
+
}, null, 10, Cl))), 128))
|
|
2172
2187
|
]));
|
|
2173
2188
|
}
|
|
2174
|
-
}),
|
|
2189
|
+
}), Fl = ["data-step"], Bl = {
|
|
2175
2190
|
class: "sr-only",
|
|
2176
2191
|
"aria-live": "polite"
|
|
2177
|
-
},
|
|
2192
|
+
}, Ll = {
|
|
2178
2193
|
key: 1,
|
|
2179
2194
|
"data-test": "step-restored",
|
|
2180
2195
|
class: "flex items-center gap-2 text-footnote text-content-muted"
|
|
2181
|
-
},
|
|
2196
|
+
}, Co = /* @__PURE__ */ A({
|
|
2182
2197
|
__name: "StepForm",
|
|
2183
2198
|
props: {
|
|
2184
2199
|
flow: {},
|
|
@@ -2186,9 +2201,9 @@ const vl = {
|
|
|
2186
2201
|
navigation: { default: "inline" }
|
|
2187
2202
|
},
|
|
2188
2203
|
emits: ["cancel"],
|
|
2189
|
-
setup(
|
|
2190
|
-
const a =
|
|
2191
|
-
function
|
|
2204
|
+
setup(o) {
|
|
2205
|
+
const a = o, { t: e } = oe(), t = U("body"), s = U("root");
|
|
2206
|
+
function n(c) {
|
|
2192
2207
|
for (let i = c.parentElement; i; i = i.parentElement) {
|
|
2193
2208
|
const p = getComputedStyle(i).overflowY;
|
|
2194
2209
|
if ((p === "auto" || p === "scroll") && i.scrollHeight > i.clientHeight) return c.getBoundingClientRect().top < i.getBoundingClientRect().top;
|
|
@@ -2196,23 +2211,23 @@ const vl = {
|
|
|
2196
2211
|
return c.getBoundingClientRect().top < 0;
|
|
2197
2212
|
}
|
|
2198
2213
|
return ye(() => a.flow.current.value.name, async () => {
|
|
2199
|
-
await he(),
|
|
2214
|
+
await he(), s.value && n(s.value) && s.value.scrollIntoView?.({ block: "start" }), t.value?.focus({ preventScroll: !0 });
|
|
2200
2215
|
}), ye(() => a.flow.refusals.value, async () => {
|
|
2201
2216
|
await he(), t.value && await Te(t.value);
|
|
2202
2217
|
}), (c, i) => (u(), g("div", {
|
|
2203
2218
|
ref_key: "root",
|
|
2204
|
-
ref:
|
|
2219
|
+
ref: s,
|
|
2205
2220
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2206
2221
|
"data-test": "step-form",
|
|
2207
2222
|
"data-step": a.flow.current.value.name
|
|
2208
2223
|
}, [
|
|
2209
|
-
a.progress !== "none" ? (u(), D(
|
|
2224
|
+
a.progress !== "none" ? (u(), D(Sl, {
|
|
2210
2225
|
key: 0,
|
|
2211
2226
|
flow: a.flow,
|
|
2212
2227
|
progress: a.progress
|
|
2213
2228
|
}, null, 8, ["flow", "progress"])) : L("", !0),
|
|
2214
|
-
y("p",
|
|
2215
|
-
a.flow.restored.value ? (u(), g("div",
|
|
2229
|
+
y("p", Bl, _(a.flow.subtitle.value), 1),
|
|
2230
|
+
a.flow.restored.value ? (u(), g("div", Ll, [
|
|
2216
2231
|
y("span", null, _(l(e)("core.steps.restored")), 1),
|
|
2217
2232
|
j(be, {
|
|
2218
2233
|
prominence: "link",
|
|
@@ -2225,7 +2240,7 @@ const vl = {
|
|
|
2225
2240
|
_: 1
|
|
2226
2241
|
})
|
|
2227
2242
|
])) : L("", !0),
|
|
2228
|
-
(u(), D(
|
|
2243
|
+
(u(), D(Ue, {
|
|
2229
2244
|
key: a.flow.current.value.name,
|
|
2230
2245
|
form: a.flow
|
|
2231
2246
|
}, null, 8, ["form"])),
|
|
@@ -2239,7 +2254,7 @@ const vl = {
|
|
|
2239
2254
|
class: I(["flex min-w-0 flex-col gap-group-gap outline-none", a.flow.direction.value === "back" ? "animate-step-back" : a.flow.direction.value === "forward" ? "animate-step-in" : ""]),
|
|
2240
2255
|
onSubmit: i[1] || (i[1] = pe((p) => a.flow.next(), ["prevent"]))
|
|
2241
2256
|
}, [
|
|
2242
|
-
|
|
2257
|
+
F(c.$slots, a.flow.current.value.name),
|
|
2243
2258
|
i[3] || (i[3] = y("button", {
|
|
2244
2259
|
type: "submit",
|
|
2245
2260
|
class: "sr-only",
|
|
@@ -2247,87 +2262,90 @@ const vl = {
|
|
|
2247
2262
|
"aria-hidden": "true"
|
|
2248
2263
|
}, null, -1))
|
|
2249
2264
|
], 34)),
|
|
2250
|
-
a.navigation === "inline" ? (u(), D(
|
|
2265
|
+
a.navigation === "inline" ? (u(), D(hl, {
|
|
2251
2266
|
key: 2,
|
|
2252
2267
|
flow: a.flow,
|
|
2253
2268
|
onCancel: i[2] || (i[2] = (p) => c.$emit("cancel"))
|
|
2254
2269
|
}, null, 8, ["flow"])) : L("", !0)
|
|
2255
|
-
], 8,
|
|
2270
|
+
], 8, Fl));
|
|
2256
2271
|
}
|
|
2257
2272
|
});
|
|
2258
2273
|
export {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2274
|
+
ht as Calendar,
|
|
2275
|
+
ro as CardSelectField,
|
|
2276
|
+
io as CheckboxField,
|
|
2277
|
+
uo as ChoiceChips,
|
|
2278
|
+
co as ComboField,
|
|
2279
|
+
Vo as CommandDialog,
|
|
2280
|
+
en as DateField,
|
|
2281
|
+
fo as DateTimeField,
|
|
2282
|
+
wo as EditorPage,
|
|
2283
|
+
Bo as ErrorBag,
|
|
2269
2284
|
ge as Field,
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2285
|
+
mo as FileField,
|
|
2286
|
+
Ue as FormErrors,
|
|
2287
|
+
Lt as FormGroup,
|
|
2288
|
+
vo as FormGroupButton,
|
|
2289
|
+
po as FormIndent,
|
|
2290
|
+
ut as FormRow,
|
|
2291
|
+
cn as FormView,
|
|
2292
|
+
on as GroupEditAction,
|
|
2293
|
+
bn as GroupSheet,
|
|
2294
|
+
bo as I18nField,
|
|
2295
|
+
Ao as LeaveGuardRoot,
|
|
2296
|
+
Mo as MissingLeaveGuardRootError,
|
|
2297
|
+
go as MoneyField,
|
|
2298
|
+
ho as MonthYearField,
|
|
2299
|
+
ko as MultiSelectField,
|
|
2300
|
+
$o as NumberCell,
|
|
2301
|
+
Vt as NumberField,
|
|
2287
2302
|
Ge as OptionList,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
+
yn as OtpInput,
|
|
2304
|
+
xo as PhotoField,
|
|
2305
|
+
gn as RecordGroupScope,
|
|
2306
|
+
xn as SegmentedField,
|
|
2307
|
+
mn as SelectField,
|
|
2308
|
+
Co as StepForm,
|
|
2309
|
+
hl as StepNavigation,
|
|
2310
|
+
Sl as StepProgress,
|
|
2311
|
+
$n as SwitchField,
|
|
2312
|
+
Jo as TextField,
|
|
2313
|
+
Cn as TextareaField,
|
|
2314
|
+
an as TimeField,
|
|
2315
|
+
et as checkFile,
|
|
2316
|
+
nn as createFieldGroups,
|
|
2317
|
+
jo as createLeaveGuard,
|
|
2303
2318
|
ce as fieldDefaults,
|
|
2304
|
-
|
|
2319
|
+
qo as fieldKey,
|
|
2305
2320
|
de as fieldProps,
|
|
2306
2321
|
Te as focusFirstError,
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2322
|
+
Ho as formEditableKey,
|
|
2323
|
+
Fe as formatBytes,
|
|
2324
|
+
Uo as groupOptions,
|
|
2325
|
+
Ua as hasUnsupportedCharacters,
|
|
2326
|
+
Io as installLeaveGuard,
|
|
2327
|
+
Oo as leaveGuardKey,
|
|
2328
|
+
Yo as matchOptions,
|
|
2329
|
+
La as missingLocales,
|
|
2330
|
+
sn as provideRecordGroups,
|
|
2331
|
+
Xo as recentChoicesKey,
|
|
2332
|
+
rn as recordGroupsKey,
|
|
2333
|
+
yo as refineStorableText,
|
|
2334
|
+
Pa as unsupportedCharactersCode,
|
|
2335
|
+
Do as useCommand,
|
|
2336
|
+
At as useDirtySnapshot,
|
|
2337
|
+
Ze as useFieldMode,
|
|
2338
|
+
Lo as useForm,
|
|
2339
|
+
hn as useGroupSheet,
|
|
2340
|
+
To as useHiddenFieldErrors,
|
|
2341
|
+
Je as useLeaveGuard,
|
|
2342
|
+
Eo as useLeaveGuardContext,
|
|
2343
|
+
vn as useOptions,
|
|
2344
|
+
Fn as useRecordDialog,
|
|
2345
|
+
un as useRecordGroups,
|
|
2346
|
+
Ko as useResourceForm,
|
|
2347
|
+
Ot as useSaveChrome,
|
|
2348
|
+
cl as useSectionStates,
|
|
2349
|
+
so as useSheetDiscardGuard,
|
|
2350
|
+
_o as useStepForm
|
|
2333
2351
|
};
|