vlite3 1.2.7 → 1.2.8
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/components/Barcode/Barcode.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager.vue.js +1 -1
- package/components/Chip/Chip.vue.js +10 -9
- package/components/Chip/types.d.ts +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +35 -30
- package/components/Form/Form.vue.d.ts +10 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +146 -132
- package/components/Screen/ScreenFilter.vue.js +26 -26
- package/components/Slider.vue.js +1 -1
- package/components/StatusChip/status-map.js +13 -0
- package/package.json +1 -1
- package/style.css +32 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
1
|
+
import { defineComponent as we, inject as Ae, computed as r, onMounted as ae, onUnmounted as O, ref as E, watch as le, openBlock as s, createElementBlock as d, withKeys as ie, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as T, mergeProps as K, toDisplayString as z, unref as t, renderSlot as se, createCommentVNode as c, createBlock as C, Fragment as Te, renderList as Re } from "vue";
|
|
2
|
+
import { useForm as Pe } from "./composables/useForm.js";
|
|
3
3
|
import Q from "./FormFields.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import Ue from "./FormField.vue.js";
|
|
5
|
+
import Ve from "./FormSkeleton.vue.js";
|
|
6
6
|
import R from "../Button.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import ze from "../BackButton.vue.js";
|
|
8
|
+
import Be from "../Timeline/Timeline.vue.js";
|
|
9
9
|
import "@iconify/vue";
|
|
10
|
-
import { $t as
|
|
11
|
-
import { useVLiteConfig as
|
|
12
|
-
import { resolveFieldType as
|
|
13
|
-
const
|
|
10
|
+
import { $t as Le } from "../../utils/i18n.js";
|
|
11
|
+
import { useVLiteConfig as Ne } from "../../core/config.js";
|
|
12
|
+
import { resolveFieldType as De } from "./utils/form.utils.js";
|
|
13
|
+
const qe = ["onKeydown"], He = { class: "flex items-center gap-3" }, $e = { class: "flex items-center gap-2 shrink-0" }, Ie = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "w-full order-first lg:order-last lg:min-w-100 lg:max-w-[380px] shrink-0"
|
|
16
|
-
},
|
|
16
|
+
}, Ee = { key: 0 }, Ke = { class: "text-base font-semibold text-foreground" }, Me = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "text-sm text-muted-foreground mt-1"
|
|
19
|
-
},
|
|
19
|
+
}, Ge = {
|
|
20
20
|
key: 2,
|
|
21
21
|
class: "form-step"
|
|
22
|
-
},
|
|
22
|
+
}, je = { class: "text-lg font-semibold text-foreground" }, Oe = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "text-sm text-muted-foreground mt-1"
|
|
25
|
-
},
|
|
25
|
+
}, Je = { class: "flex gap-3 items-center" }, nt = /* @__PURE__ */ we({
|
|
26
26
|
__name: "Form",
|
|
27
27
|
props: {
|
|
28
28
|
schema: {},
|
|
@@ -62,126 +62,140 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
62
62
|
backButtonPath: {}
|
|
63
63
|
},
|
|
64
64
|
emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction", "onBack"],
|
|
65
|
-
setup(e, { emit:
|
|
66
|
-
const l = e,
|
|
65
|
+
setup(e, { expose: ne, emit: oe }) {
|
|
66
|
+
const l = e, b = oe, v = Ae("modal-context", null), re = Ne(), B = r(() => re?.components?.form || {}), L = r(() => l.variant ?? B.value.variant ?? "outline"), N = r(() => l.size ?? B.value.size ?? "md"), D = r(() => l.rounded ?? B.value.rounded ?? "md"), M = r(
|
|
67
67
|
() => l.showRequiredAsterisk ?? B.value.showRequiredAsterisk ?? !0
|
|
68
|
-
),
|
|
69
|
-
|
|
68
|
+
), ue = r(() => l.showCancel || !!v), F = r(() => !!v), P = r(() => l.stickyFooter || F.value);
|
|
69
|
+
ae(() => {
|
|
70
70
|
l.footer && F.value && v?.registerFormFooter?.(!0);
|
|
71
71
|
}), O(() => {
|
|
72
72
|
F.value && v?.registerFormFooter?.(!1);
|
|
73
73
|
});
|
|
74
|
-
const
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
const de = E(null), G = E(null), W = E(!1);
|
|
75
|
+
let j = null;
|
|
76
|
+
ae(() => {
|
|
77
|
+
G.value && (j = new IntersectionObserver(
|
|
78
78
|
([a]) => {
|
|
79
79
|
W.value = !a.isIntersecting;
|
|
80
80
|
},
|
|
81
81
|
{ threshold: 0 }
|
|
82
|
-
),
|
|
82
|
+
), j.observe(G.value));
|
|
83
83
|
}), O(() => {
|
|
84
|
-
|
|
84
|
+
j?.disconnect();
|
|
85
85
|
});
|
|
86
|
-
const w = r(() => !l.schema || l.schema.length === 0 ? !1 : Array.isArray(l.schema[0])), u = r(() => l.tabs && l.tabs.length > 0 && w.value), n =
|
|
86
|
+
const w = r(() => !l.schema || l.schema.length === 0 ? !1 : Array.isArray(l.schema[0])), u = r(() => l.tabs && l.tabs.length > 0 && w.value), n = E(0), X = r(() => l.tabs ? l.tabs.map((a, i) => ({
|
|
87
87
|
id: a.id?.toString() || i.toString(),
|
|
88
88
|
title: a.title,
|
|
89
89
|
icon: a.icon,
|
|
90
90
|
description: a.description,
|
|
91
91
|
status: i < n.value ? "completed" : i === n.value ? "current" : "upcoming"
|
|
92
|
-
})) : []),
|
|
93
|
-
values:
|
|
94
|
-
globalValues:
|
|
92
|
+
})) : []), S = r(() => w.value ? l.schema : [l.schema]), Y = r(() => u.value ? S.value[n.value] || [] : []), g = r(() => u.value ? null : (w.value ? l.schema.flat() : l.schema).find((i) => De(i, {
|
|
93
|
+
values: h.value,
|
|
94
|
+
globalValues: h.value,
|
|
95
95
|
isUpdate: l.isUpdate
|
|
96
96
|
}) === "thumbnailSelector") ?? null), A = r(() => !!g.value), {
|
|
97
|
-
formValues:
|
|
98
|
-
errors:
|
|
99
|
-
isSubmitting:
|
|
97
|
+
formValues: h,
|
|
98
|
+
errors: y,
|
|
99
|
+
isSubmitting: x,
|
|
100
100
|
fieldLoading: q,
|
|
101
|
-
handleFieldChange:
|
|
102
|
-
validateField:
|
|
103
|
-
validateAll:
|
|
101
|
+
handleFieldChange: ce,
|
|
102
|
+
validateField: me,
|
|
103
|
+
validateAll: Z,
|
|
104
104
|
isFieldVisible: U,
|
|
105
105
|
isFieldDisabled: V,
|
|
106
106
|
isFieldReadonly: H,
|
|
107
|
-
handleSubmit:
|
|
108
|
-
reinitialize:
|
|
109
|
-
|
|
107
|
+
handleSubmit: ve,
|
|
108
|
+
reinitialize: fe,
|
|
109
|
+
resetForm: ge,
|
|
110
|
+
setFieldError: he,
|
|
111
|
+
clearErrors: be
|
|
112
|
+
} = Pe({
|
|
110
113
|
schema: l.schema,
|
|
111
114
|
values: l.values,
|
|
112
115
|
isUpdate: l.isUpdate,
|
|
113
116
|
folderId: l.folderId,
|
|
114
117
|
emitFields: l.emitFields,
|
|
115
118
|
onSubmit: (a) => {
|
|
116
|
-
|
|
119
|
+
b("onSubmit", a, v?.close || (() => {
|
|
117
120
|
}));
|
|
118
121
|
}
|
|
119
122
|
});
|
|
120
|
-
|
|
121
|
-
() => l.loading ||
|
|
123
|
+
le(
|
|
124
|
+
() => l.loading || x.value,
|
|
122
125
|
(a) => {
|
|
123
126
|
v?.setSubmitting && v.setSubmitting(a);
|
|
124
127
|
},
|
|
125
128
|
{ immediate: !0 }
|
|
126
129
|
), O(() => {
|
|
127
130
|
v?.setSubmitting && v.setSubmitting(!1);
|
|
128
|
-
}),
|
|
131
|
+
}), le(
|
|
129
132
|
[() => l.schema, () => l.values, () => l.schemaLoading],
|
|
130
133
|
([a, i, o]) => {
|
|
131
|
-
o ||
|
|
134
|
+
o || fe(a, i);
|
|
132
135
|
}
|
|
133
136
|
);
|
|
134
137
|
const $ = (a, i) => {
|
|
135
|
-
|
|
136
|
-
},
|
|
138
|
+
ce(a, i.value, i.data);
|
|
139
|
+
}, ye = async () => {
|
|
137
140
|
if (!u.value) return !0;
|
|
138
141
|
const a = Y.value;
|
|
139
142
|
let i = !0;
|
|
140
143
|
for (const o of a) {
|
|
141
144
|
if (!U(o) || V(o)) continue;
|
|
142
|
-
await
|
|
145
|
+
await me(o) && (i = !1);
|
|
143
146
|
}
|
|
144
147
|
return i;
|
|
145
|
-
},
|
|
146
|
-
!
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
i <= n.value && (n.value = i,
|
|
151
|
-
},
|
|
148
|
+
}, xe = r(() => u.value ? n.value < S.value.length - 1 : !1), _ = r(() => u.value ? n.value > 0 : !1), I = r(() => u.value ? n.value === S.value.length - 1 : !0), ee = async () => {
|
|
149
|
+
!xe.value || !await ye() || (n.value++, b("onStepChange", n.value));
|
|
150
|
+
}, ke = () => {
|
|
151
|
+
_.value && (n.value--, b("onStepChange", n.value));
|
|
152
|
+
}, pe = (a, i) => {
|
|
153
|
+
i <= n.value && (n.value = i, b("onStepChange", n.value));
|
|
154
|
+
}, k = async () => {
|
|
152
155
|
if (u.value) {
|
|
153
156
|
if (!I.value && !l.isUpdate) {
|
|
154
|
-
await
|
|
157
|
+
await ee();
|
|
155
158
|
return;
|
|
156
159
|
}
|
|
157
|
-
if (!await
|
|
158
|
-
const i =
|
|
159
|
-
(o) => o.some((
|
|
160
|
+
if (!await Z()) {
|
|
161
|
+
const i = S.value.findIndex(
|
|
162
|
+
(o) => o.some((p) => !!y.value[p.name])
|
|
160
163
|
);
|
|
161
|
-
i !== -1 && i !== n.value && (n.value = i,
|
|
164
|
+
i !== -1 && i !== n.value && (n.value = i, b("onStepChange", n.value));
|
|
162
165
|
return;
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
try {
|
|
166
|
-
await
|
|
169
|
+
await ve();
|
|
167
170
|
} catch {
|
|
168
171
|
}
|
|
169
|
-
},
|
|
172
|
+
}, Se = (a) => {
|
|
170
173
|
if (a.key !== "Enter") return;
|
|
171
174
|
const o = a.target.tagName.toLowerCase();
|
|
172
|
-
o !== "textarea" && o !== "button" && (a.preventDefault(),
|
|
173
|
-
},
|
|
174
|
-
(a.metaKey || a.ctrlKey) && a.key === "s" && (a.preventDefault(),
|
|
175
|
-
}
|
|
176
|
-
|
|
175
|
+
o !== "textarea" && o !== "button" && (a.preventDefault(), k());
|
|
176
|
+
}, te = (a) => {
|
|
177
|
+
(a.metaKey || a.ctrlKey) && a.key === "s" && (a.preventDefault(), k());
|
|
178
|
+
};
|
|
179
|
+
ne({
|
|
180
|
+
formValues: h,
|
|
181
|
+
errors: y,
|
|
182
|
+
isSubmitting: x,
|
|
183
|
+
handleSubmit: k,
|
|
184
|
+
validateAll: Z,
|
|
185
|
+
resetForm: ge,
|
|
186
|
+
setFieldError: he,
|
|
187
|
+
clearErrors: be
|
|
188
|
+
});
|
|
189
|
+
const Ce = () => {
|
|
190
|
+
b("onCancel"), v && v?.close?.();
|
|
177
191
|
};
|
|
178
192
|
return (a, i) => (s(), d("form", {
|
|
179
193
|
class: m(["form-container ", l.class, e.isPage && "pb-10"]),
|
|
180
|
-
onSubmit: J(
|
|
194
|
+
onSubmit: J(k, ["prevent"]),
|
|
181
195
|
onKeydown: [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
196
|
+
Se,
|
|
197
|
+
ie(J(te, ["meta", "prevent"]), ["s"]),
|
|
198
|
+
ie(J(te, ["ctrl", "prevent"]), ["s"])
|
|
185
199
|
]
|
|
186
200
|
}, [
|
|
187
201
|
e.isPage ? (s(), d("div", {
|
|
@@ -191,29 +205,29 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
191
205
|
e.pageHeaderClass
|
|
192
206
|
])
|
|
193
207
|
}, [
|
|
194
|
-
f("div",
|
|
195
|
-
T(
|
|
208
|
+
f("div", He, [
|
|
209
|
+
T(ze, K(e.backButtonProps, {
|
|
196
210
|
fallback: e.backButtonPath,
|
|
197
211
|
class: "max-sm:w-8 max-sm:h-8 max-sm:min-w-8 max-sm:min-h-8 max-sm:px-0 shrink-0"
|
|
198
212
|
}), null, 16, ["fallback"]),
|
|
199
213
|
f("h1", {
|
|
200
214
|
class: m(["text-foreground max-sm:text-lg text-fs-5 truncate", e.pageTitleClass])
|
|
201
|
-
}, z(e.pageTitleI18n ? t(
|
|
215
|
+
}, z(e.pageTitleI18n ? t(Le)(e.pageTitleI18n) : e.pageTitle), 3)
|
|
202
216
|
]),
|
|
203
|
-
f("div",
|
|
204
|
-
|
|
205
|
-
values: t(
|
|
206
|
-
isSubmitting: t(
|
|
207
|
-
handleSubmit:
|
|
217
|
+
f("div", $e, [
|
|
218
|
+
se(a.$slots, "header-actions", {
|
|
219
|
+
values: t(h),
|
|
220
|
+
isSubmitting: t(x),
|
|
221
|
+
handleSubmit: k
|
|
208
222
|
}, void 0, !0),
|
|
209
|
-
T(R,
|
|
223
|
+
T(R, K({
|
|
210
224
|
type: "button",
|
|
211
225
|
variant: e.isUpdate ? "outline" : "primary",
|
|
212
226
|
text: e.submitText
|
|
213
227
|
}, e.submitProps, {
|
|
214
228
|
disabled: e.schemaLoading,
|
|
215
|
-
loading: e.loading || t(
|
|
216
|
-
onClick:
|
|
229
|
+
loading: e.loading || t(x),
|
|
230
|
+
onClick: k,
|
|
217
231
|
class: "max-sm:hidden"
|
|
218
232
|
}), null, 16, ["variant", "text", "disabled", "loading"])
|
|
219
233
|
])
|
|
@@ -222,38 +236,38 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
222
236
|
key: 1,
|
|
223
237
|
class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-2" : "mb-8"])
|
|
224
238
|
}, [
|
|
225
|
-
T(t(
|
|
239
|
+
T(t(Be), {
|
|
226
240
|
steps: X.value,
|
|
227
241
|
activeStep: n.value,
|
|
228
242
|
direction: "horizontal",
|
|
229
243
|
textPosition: e.timelineTextPosition,
|
|
230
244
|
clickable: !0,
|
|
231
|
-
onStepClick:
|
|
245
|
+
onStepClick: pe
|
|
232
246
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
233
247
|
], 2)) : c("", !0),
|
|
234
248
|
f("div", {
|
|
235
249
|
class: m(e.footer && P.value ? "pb-2" : "")
|
|
236
250
|
}, [
|
|
237
|
-
e.schemaLoading ? (s(), C(
|
|
251
|
+
e.schemaLoading ? (s(), C(Ve, {
|
|
238
252
|
key: 0,
|
|
239
253
|
isGrouped: w.value
|
|
240
254
|
}, null, 8, ["isGrouped"])) : (s(), d("div", {
|
|
241
255
|
key: 1,
|
|
242
256
|
class: m(A.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
|
|
243
257
|
}, [
|
|
244
|
-
A.value ? (s(), d("div",
|
|
245
|
-
g.value && t(U)(g.value) ? (s(), C(
|
|
258
|
+
A.value ? (s(), d("div", Ie, [
|
|
259
|
+
g.value && t(U)(g.value) ? (s(), C(Ue, {
|
|
246
260
|
key: 0,
|
|
247
261
|
field: g.value,
|
|
248
|
-
value: t(
|
|
249
|
-
values: t(
|
|
250
|
-
errors: t(
|
|
262
|
+
value: t(h)[g.value.name],
|
|
263
|
+
values: t(h),
|
|
264
|
+
errors: t(y),
|
|
251
265
|
variant: L.value,
|
|
252
266
|
size: N.value,
|
|
253
267
|
rounded: D.value,
|
|
254
268
|
disabled: t(V)(g.value),
|
|
255
269
|
readonly: t(H)(g.value),
|
|
256
|
-
error: t(
|
|
270
|
+
error: t(y)[g.value.name] || "",
|
|
257
271
|
isUpdate: e.isUpdate,
|
|
258
272
|
loading: t(q)[g.value?.name],
|
|
259
273
|
onChange: i[0] || (i[0] = (o) => $(g.value.name, o))
|
|
@@ -266,101 +280,101 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
266
280
|
key: 1,
|
|
267
281
|
class: m(["form-groups space-y-6", e.groupContainerClass])
|
|
268
282
|
}, [
|
|
269
|
-
(s(!0), d(
|
|
270
|
-
key:
|
|
283
|
+
(s(!0), d(Te, null, Re(S.value, (o, p) => (s(), d("div", {
|
|
284
|
+
key: p,
|
|
271
285
|
class: m([
|
|
272
286
|
"form-group overflow-hidden bg-body",
|
|
273
287
|
e.groupClass,
|
|
274
|
-
|
|
288
|
+
S.value?.length > 1 ? "border rounded" : ""
|
|
275
289
|
])
|
|
276
290
|
}, [
|
|
277
|
-
e.groupsHeadings?.[
|
|
291
|
+
e.groupsHeadings?.[p] ? (s(), d("div", {
|
|
278
292
|
key: 0,
|
|
279
293
|
class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
|
|
280
294
|
}, [
|
|
281
|
-
f("h3",
|
|
282
|
-
e.groupHeadingsDescription?.[
|
|
295
|
+
f("h3", Ke, z(e.groupsHeadings[p]), 1),
|
|
296
|
+
e.groupHeadingsDescription?.[p] ? (s(), d("p", Me, z(e.groupHeadingsDescription[p]), 1)) : c("", !0)
|
|
283
297
|
], 2)) : c("", !0),
|
|
284
298
|
f("div", {
|
|
285
|
-
class: m(["form-group-body", [e.groupBodyClass,
|
|
299
|
+
class: m(["form-group-body", [e.groupBodyClass, S.value?.length > 1 ? "p-4.5" : ""]])
|
|
286
300
|
}, [
|
|
287
301
|
T(Q, {
|
|
288
302
|
schema: o,
|
|
289
|
-
values: t(
|
|
290
|
-
errors: t(
|
|
303
|
+
values: t(h),
|
|
304
|
+
errors: t(y),
|
|
291
305
|
fieldLoading: t(q),
|
|
292
306
|
variant: L.value,
|
|
293
307
|
size: N.value,
|
|
294
308
|
rounded: D.value,
|
|
295
309
|
className: e.className,
|
|
296
310
|
isUpdate: e.isUpdate,
|
|
297
|
-
showRequiredAsterisk:
|
|
311
|
+
showRequiredAsterisk: M.value,
|
|
298
312
|
isFieldVisible: t(U),
|
|
299
313
|
isFieldDisabled: t(V),
|
|
300
314
|
isFieldReadonly: t(H),
|
|
301
315
|
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
302
316
|
onChange: $,
|
|
303
|
-
onAddonAction: i[2] || (i[2] = (
|
|
317
|
+
onAddonAction: i[2] || (i[2] = (Fe) => b("onAddonAction", Fe))
|
|
304
318
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
305
319
|
], 2)
|
|
306
320
|
], 2))), 128))
|
|
307
|
-
], 2)) : u.value ? (s(), d("div",
|
|
321
|
+
], 2)) : u.value ? (s(), d("div", Ge, [
|
|
308
322
|
e.tabs?.[n.value] ? (s(), d("div", {
|
|
309
323
|
key: 0,
|
|
310
324
|
class: m(["form-step-header mb-6", e.headerClass])
|
|
311
325
|
}, [
|
|
312
|
-
f("h2",
|
|
313
|
-
e.tabs[n.value].description ? (s(), d("p",
|
|
326
|
+
f("h2", je, z(e.tabs[n.value].title), 1),
|
|
327
|
+
e.tabs[n.value].description ? (s(), d("p", Oe, z(e.tabs[n.value].description), 1)) : c("", !0)
|
|
314
328
|
], 2)) : c("", !0),
|
|
315
329
|
T(Q, {
|
|
316
330
|
schema: Y.value,
|
|
317
|
-
values: t(
|
|
318
|
-
errors: t(
|
|
331
|
+
values: t(h),
|
|
332
|
+
errors: t(y),
|
|
319
333
|
fieldLoading: t(q),
|
|
320
334
|
variant: L.value,
|
|
321
335
|
size: N.value,
|
|
322
336
|
rounded: D.value,
|
|
323
337
|
className: e.className,
|
|
324
338
|
isUpdate: e.isUpdate,
|
|
325
|
-
showRequiredAsterisk:
|
|
339
|
+
showRequiredAsterisk: M.value,
|
|
326
340
|
isFieldVisible: t(U),
|
|
327
341
|
isFieldDisabled: t(V),
|
|
328
342
|
isFieldReadonly: t(H),
|
|
329
343
|
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
330
344
|
onChange: $,
|
|
331
|
-
onAddonAction: i[3] || (i[3] = (o) =>
|
|
345
|
+
onAddonAction: i[3] || (i[3] = (o) => b("onAddonAction", o))
|
|
332
346
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
333
|
-
])) : c("", !0) : (s(), d("div",
|
|
347
|
+
])) : c("", !0) : (s(), d("div", Ee, [
|
|
334
348
|
T(Q, {
|
|
335
349
|
schema: e.schema,
|
|
336
|
-
values: t(
|
|
337
|
-
errors: t(
|
|
350
|
+
values: t(h),
|
|
351
|
+
errors: t(y),
|
|
338
352
|
fieldLoading: t(q),
|
|
339
353
|
variant: L.value,
|
|
340
354
|
size: N.value,
|
|
341
355
|
rounded: D.value,
|
|
342
356
|
className: e.className,
|
|
343
357
|
isUpdate: e.isUpdate,
|
|
344
|
-
showRequiredAsterisk:
|
|
358
|
+
showRequiredAsterisk: M.value,
|
|
345
359
|
isFieldVisible: t(U),
|
|
346
360
|
isFieldDisabled: t(V),
|
|
347
361
|
isFieldReadonly: t(H),
|
|
348
362
|
excludeTypes: A.value ? ["thumbnailSelector"] : [],
|
|
349
363
|
onChange: $,
|
|
350
|
-
onAddonAction: i[1] || (i[1] = (o) =>
|
|
364
|
+
onAddonAction: i[1] || (i[1] = (o) => b("onAddonAction", o))
|
|
351
365
|
}, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
|
|
352
366
|
])),
|
|
353
|
-
|
|
354
|
-
values: t(
|
|
355
|
-
errors: t(
|
|
356
|
-
isSubmitting: t(
|
|
357
|
-
handleSubmit:
|
|
367
|
+
se(a.$slots, "default", {
|
|
368
|
+
values: t(h),
|
|
369
|
+
errors: t(y),
|
|
370
|
+
isSubmitting: t(x),
|
|
371
|
+
handleSubmit: k
|
|
358
372
|
}, void 0, !0)
|
|
359
373
|
], 2)
|
|
360
374
|
], 2)),
|
|
361
375
|
f("div", {
|
|
362
376
|
ref_key: "sentinelRef",
|
|
363
|
-
ref:
|
|
377
|
+
ref: G,
|
|
364
378
|
class: "form-scroll-sentinel h-px w-full",
|
|
365
379
|
"aria-hidden": "true"
|
|
366
380
|
}, null, 512)
|
|
@@ -368,7 +382,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
368
382
|
e.footer && !e.schemaLoading ? (s(), d("div", {
|
|
369
383
|
key: 2,
|
|
370
384
|
ref_key: "footerRef",
|
|
371
|
-
ref:
|
|
385
|
+
ref: de,
|
|
372
386
|
class: m([
|
|
373
387
|
"form-footer items-center gap-3 z-20 rounded-b-md!",
|
|
374
388
|
e.isPage ? "flex sm:hidden" : "flex",
|
|
@@ -388,35 +402,35 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
388
402
|
!P.value && !F.value ? "mt-6" : ""
|
|
389
403
|
])
|
|
390
404
|
}, [
|
|
391
|
-
f("div",
|
|
392
|
-
|
|
405
|
+
f("div", Je, [
|
|
406
|
+
ue.value ? (s(), C(R, {
|
|
393
407
|
key: 0,
|
|
394
408
|
type: "button",
|
|
395
409
|
variant: "outline",
|
|
396
410
|
text: e.cancelText,
|
|
397
|
-
disabled: e.loading || t(
|
|
398
|
-
onClick:
|
|
411
|
+
disabled: e.loading || t(x),
|
|
412
|
+
onClick: Ce
|
|
399
413
|
}, null, 8, ["text", "disabled"])) : c("", !0),
|
|
400
|
-
u.value && e.isUpdate && !I.value ? (s(), C(R,
|
|
414
|
+
u.value && e.isUpdate && !I.value ? (s(), C(R, K({
|
|
401
415
|
key: 1,
|
|
402
416
|
type: "button",
|
|
403
417
|
variant: "primary",
|
|
404
418
|
text: e.submitText
|
|
405
419
|
}, e.submitProps, {
|
|
406
|
-
loading: e.loading || t(
|
|
407
|
-
onClick:
|
|
420
|
+
loading: e.loading || t(x),
|
|
421
|
+
onClick: k
|
|
408
422
|
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
409
423
|
]),
|
|
410
424
|
f("div", {
|
|
411
425
|
class: m(["flex gap-3 items-center", u.value && "ml-auto"])
|
|
412
426
|
}, [
|
|
413
|
-
u.value &&
|
|
427
|
+
u.value && _.value ? (s(), C(R, {
|
|
414
428
|
key: 0,
|
|
415
429
|
type: "button",
|
|
416
430
|
variant: "outline",
|
|
417
431
|
icon: "lucide:arrow-left",
|
|
418
432
|
text: "Previous",
|
|
419
|
-
onClick:
|
|
433
|
+
onClick: ke
|
|
420
434
|
})) : c("", !0),
|
|
421
435
|
u.value && !I.value ? (s(), C(R, {
|
|
422
436
|
key: 1,
|
|
@@ -424,21 +438,21 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
424
438
|
variant: e.isUpdate ? "outline" : "primary",
|
|
425
439
|
text: "Next",
|
|
426
440
|
iconRight: "lucide:arrow-right",
|
|
427
|
-
onClick:
|
|
441
|
+
onClick: ee
|
|
428
442
|
}, null, 8, ["variant"])) : c("", !0),
|
|
429
|
-
!u.value || I.value ? (s(), C(R,
|
|
443
|
+
!u.value || I.value ? (s(), C(R, K({
|
|
430
444
|
key: 2,
|
|
431
445
|
type: "submit",
|
|
432
446
|
variant: "primary",
|
|
433
447
|
text: e.submitText
|
|
434
448
|
}, e.submitProps, {
|
|
435
|
-
loading: e.loading || t(
|
|
449
|
+
loading: e.loading || t(x)
|
|
436
450
|
}), null, 16, ["text", "loading"])) : c("", !0)
|
|
437
451
|
], 2)
|
|
438
452
|
], 2)) : c("", !0)
|
|
439
|
-
], 42,
|
|
453
|
+
], 42, qe));
|
|
440
454
|
}
|
|
441
455
|
});
|
|
442
456
|
export {
|
|
443
|
-
|
|
457
|
+
nt as default
|
|
444
458
|
};
|