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