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