vlite3 0.1.2 → 0.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/Button.vue.js +8 -8
- package/components/DataTable/DataTable.vue.d.ts +4 -1
- package/components/DataTable/DataTable.vue.js +3 -3
- package/components/DataTable/DataTable.vue2.js +177 -170
- package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
- package/components/DataTable/DataTableHeader.vue.js +15 -14
- package/components/DataTable/DataTableRow.vue.js +1 -1
- package/components/DataTable/types.d.ts +4 -1
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +13 -13
- package/components/FilePicker/FilePicker.vue.js +3 -3
- package/components/Form/Form.vue.d.ts +5 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +128 -119
- package/components/Form/FormField.vue.js +21 -30
- package/components/Form/composables/useForm.d.ts +1 -0
- package/components/Form/composables/useForm.js +11 -11
- package/components/Form/types.d.ts +2 -0
- package/components/Input.vue.js +1 -1
- package/components/Modal.vue.js +50 -47
- package/components/Navbar/Navbar.vue.d.ts +1 -0
- package/components/Navbar/Navbar.vue.js +89 -68
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +42 -41
- package/components/Slider.vue.js +64 -56
- package/package.json +1 -1
- package/style.css +11 -8
- package/types/navbar.type.d.ts +1 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { defineComponent as m, computed as o, openBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as m, computed as o, openBlock as a, createElementBlock as n, normalizeClass as r, createElementVNode as l, toDisplayString as p, createVNode as g, createCommentVNode as x } from "vue";
|
|
2
|
+
import b from "../Icon.vue.js";
|
|
3
|
+
const y = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, C = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "w-4 h-4 shrink-0"
|
|
6
|
-
},
|
|
6
|
+
}, S = /* @__PURE__ */ m({
|
|
7
7
|
__name: "DataTableHeader",
|
|
8
8
|
props: {
|
|
9
9
|
header: {},
|
|
10
10
|
sortConfig: {},
|
|
11
|
-
compact: { type: Boolean, default: !1 }
|
|
11
|
+
compact: { type: Boolean, default: !1 },
|
|
12
|
+
tableSortable: { type: Boolean, default: !0 }
|
|
12
13
|
},
|
|
13
14
|
emits: ["sort"],
|
|
14
|
-
setup(t, { emit:
|
|
15
|
-
const e = t,
|
|
16
|
-
e.header.sortable !== !1 &&
|
|
15
|
+
setup(t, { emit: s }) {
|
|
16
|
+
const e = t, i = s, c = o(() => e.sortConfig?.field === e.header.field && e.sortConfig?.order), d = o(() => !e.sortConfig || e.sortConfig.field !== e.header.field ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), f = () => {
|
|
17
|
+
e.tableSortable && e.header.sortable !== !1 && i("sort", e.header.field);
|
|
17
18
|
}, u = o(() => ({
|
|
18
19
|
left: "justify-start text-left",
|
|
19
20
|
center: "justify-center text-center",
|
|
20
21
|
right: "justify-end text-right"
|
|
21
22
|
})[e.header.align || "left"]);
|
|
22
|
-
return (h, v) => (
|
|
23
|
+
return (h, v) => (a(), n("th", {
|
|
23
24
|
scope: "col",
|
|
24
25
|
class: r(["h-10 px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden", [
|
|
25
26
|
t.compact ? "py-2" : "py-3!",
|
|
@@ -28,12 +29,12 @@ const C = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 tr
|
|
|
28
29
|
]]),
|
|
29
30
|
onClick: f
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
+
l("div", {
|
|
32
33
|
class: r(["flex items-center gap-2 space-x-2", u.value])
|
|
33
34
|
}, [
|
|
34
|
-
|
|
35
|
-
t.header.sortable !== !1 ? (
|
|
36
|
-
g(
|
|
35
|
+
l("span", y, p(t.header.title), 1),
|
|
36
|
+
t.tableSortable && t.header.sortable !== !1 ? (a(), n("span", C, [
|
|
37
|
+
g(b, {
|
|
37
38
|
icon: d.value,
|
|
38
39
|
class: r(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
|
|
39
40
|
c.value ? "opacity-100 text-foreground" : "opacity-0 group-hover:opacity-100"
|
|
@@ -45,5 +46,5 @@ const C = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 tr
|
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
S as default
|
|
49
50
|
};
|
|
@@ -61,7 +61,7 @@ const F = ["data-state"], L = { class: "flex items-center justify-center" }, U =
|
|
|
61
61
|
};
|
|
62
62
|
return (e, n) => (c(), a("tr", {
|
|
63
63
|
class: u(["border-b border-border/70 transition-colors data-[state=selected]:bg-muted h-full", [
|
|
64
|
-
t.hoverable ? "hover:bg-muted/
|
|
64
|
+
t.hoverable ? "hover:bg-muted/50" : "",
|
|
65
65
|
t.striped && t.index % 2 === 1 ? "bg-muted/20" : "bg-background",
|
|
66
66
|
t.isSelected ? "bg-muted! hover:bg-muted/30" : "",
|
|
67
67
|
"group"
|
|
@@ -50,7 +50,8 @@ export interface DataTableProps {
|
|
|
50
50
|
keyField?: string;
|
|
51
51
|
loading?: boolean;
|
|
52
52
|
selectable?: boolean;
|
|
53
|
-
|
|
53
|
+
emptyTitle?: string;
|
|
54
|
+
emptyDescription?: string;
|
|
54
55
|
emptyIcon?: string;
|
|
55
56
|
showPagination?: boolean;
|
|
56
57
|
pageInfo?: PageInfo;
|
|
@@ -63,6 +64,8 @@ export interface DataTableProps {
|
|
|
63
64
|
compact?: boolean;
|
|
64
65
|
tableClass?: string;
|
|
65
66
|
class?: string;
|
|
67
|
+
sortable?: boolean;
|
|
68
|
+
variant?: 'default' | 'raised';
|
|
66
69
|
}
|
|
67
70
|
export interface SelectionState {
|
|
68
71
|
selected: any[];
|
|
@@ -26,11 +26,11 @@ declare function __VLS_template(): {
|
|
|
26
26
|
};
|
|
27
27
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
28
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
onChange: (...args: any[]) => void;
|
|
30
29
|
"update:modelValue": (...args: any[]) => void;
|
|
30
|
+
change: (...args: any[]) => void;
|
|
31
31
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
-
onOnChange?: (...args: any[]) => any;
|
|
33
32
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
33
|
+
onChange?: (...args: any[]) => any;
|
|
34
34
|
}>, {
|
|
35
35
|
teleport: boolean;
|
|
36
36
|
minuteInterval: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as v, computed as r, openBlock as h, createBlock as g, unref as u, withCtx as m, createElementVNode as p, createVNode as c, renderSlot as V, mergeProps as w } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import y from "./Button.vue.js";
|
|
3
|
+
import D from "./Dropdown/Dropdown.vue.js";
|
|
4
4
|
import "@iconify/vue";
|
|
5
|
-
import
|
|
5
|
+
import x from "v-datepicker-lite";
|
|
6
6
|
import "v-datepicker-lite/style.css";
|
|
7
7
|
const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
8
8
|
__name: "DatePicker",
|
|
@@ -19,19 +19,19 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
19
19
|
teleport: { type: Boolean, default: !0 },
|
|
20
20
|
minuteInterval: { default: 5 }
|
|
21
21
|
},
|
|
22
|
-
emits: ["update:modelValue", "
|
|
23
|
-
setup(t, { emit:
|
|
24
|
-
const n = t, i =
|
|
22
|
+
emits: ["update:modelValue", "change"],
|
|
23
|
+
setup(t, { emit: s }) {
|
|
24
|
+
const n = t, i = s, a = r({
|
|
25
25
|
get: () => n.modelValue ?? n.value,
|
|
26
26
|
set: (e) => {
|
|
27
|
-
i("update:modelValue", e), i("
|
|
27
|
+
i("update:modelValue", e), i("change", e);
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), d = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, l = r(() => {
|
|
30
30
|
if (!a.value) return "";
|
|
31
31
|
try {
|
|
32
32
|
const e = new Date(a.value);
|
|
33
33
|
if (isNaN(e.getTime())) return String(a.value);
|
|
34
|
-
const o = n.mode === "dateTime" &&
|
|
34
|
+
const o = n.mode === "dateTime" && d(a.value);
|
|
35
35
|
return e.toLocaleDateString("en-US", {
|
|
36
36
|
month: "short",
|
|
37
37
|
day: "numeric",
|
|
@@ -44,7 +44,7 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
44
44
|
}), f = (e) => {
|
|
45
45
|
a.value = e;
|
|
46
46
|
};
|
|
47
|
-
return (e, o) => (h(), g(u(
|
|
47
|
+
return (e, o) => (h(), g(u(D), {
|
|
48
48
|
position: "bottom-start",
|
|
49
49
|
class: "w-full",
|
|
50
50
|
teleport: t.teleport
|
|
@@ -54,17 +54,17 @@ const P = { class: "min-w-[300px] overflow-hidden" }, N = /* @__PURE__ */ v({
|
|
|
54
54
|
value: a.value,
|
|
55
55
|
displayValue: l.value
|
|
56
56
|
}, () => [
|
|
57
|
-
c(
|
|
57
|
+
c(y, w({
|
|
58
58
|
text: l.value || t.placeholder || "Select date",
|
|
59
59
|
variant: t.variant || "outline",
|
|
60
60
|
size: t.size || "md",
|
|
61
61
|
icon: t.icon || "lucide:calendar"
|
|
62
|
-
}, t.btnProps, { class: "w-full" }), null, 16, ["text", "variant", "size", "icon"])
|
|
62
|
+
}, t.btnProps, { class: "w-full justify-start text-left font-normal" }), null, 16, ["text", "variant", "size", "icon"])
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
65
65
|
default: m(() => [
|
|
66
66
|
p("div", P, [
|
|
67
|
-
c(u(
|
|
67
|
+
c(u(x), {
|
|
68
68
|
value: a.value,
|
|
69
69
|
mode: t.mode,
|
|
70
70
|
"min-date": t.minDate,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as K, ref as S, useSlots as O, computed as v, openBlock as a, createElementBlock as u, createElementVNode as s, renderSlot as q, normalizeClass as z, createBlock as y, withModifiers as D, createVNode as b, createTextVNode as H, toDisplayString as F, createCommentVNode as x, Fragment as J, renderList as Q } from "vue";
|
|
2
2
|
import f from "../Icon.vue.js";
|
|
3
3
|
import T from "../Button.vue.js";
|
|
4
|
-
const X = { class: "w-full" }, Y = ["multiple", "accept"], Z = ["value", "placeholder", "disabled"], _ = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 bg-background" }, ee = { class: "p-3 bg-muted rounded-full text-muted-foreground" }, le = { class: "space-y-1" }, te = {
|
|
4
|
+
const X = { class: "w-full" }, Y = ["multiple", "accept"], Z = ["value", "placeholder", "disabled"], _ = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 bg-background" }, ee = { class: "p-3 bg-muted-light rounded-full text-muted-foreground" }, le = { class: "space-y-1" }, te = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-xs text-muted-foreground"
|
|
7
7
|
}, oe = {
|
|
8
8
|
key: 1,
|
|
9
|
-
class: "space-y-
|
|
10
|
-
}, ie = { class: "shrink-0 mr-3" }, re = { class: "p-2 bg-primary
|
|
9
|
+
class: "space-y-2"
|
|
10
|
+
}, ie = { class: "shrink-0 mr-3" }, re = { class: "p-2 bg-primary-light rounded text-primary" }, ae = { class: "flex-1 min-w-0" }, ne = { class: "text-sm font-medium text-foreground truncate" }, se = { class: "text-xs text-muted-foreground" }, de = { class: "flex-shrink-0 ml-3 flex gap-2" }, ue = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "flex gap-2"
|
|
13
13
|
}, ce = {
|
|
@@ -30,6 +30,8 @@ interface Props {
|
|
|
30
30
|
showCancel?: boolean;
|
|
31
31
|
/** Whether this is an update operation */
|
|
32
32
|
isUpdate?: boolean;
|
|
33
|
+
/** Folder ID for file uploads */
|
|
34
|
+
folderId?: string;
|
|
33
35
|
/** Custom class for form element */
|
|
34
36
|
class?: string;
|
|
35
37
|
/** Custom class for the grid layout (overrides columns) */
|
|
@@ -58,11 +60,11 @@ declare function __VLS_template(): {
|
|
|
58
60
|
};
|
|
59
61
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
60
62
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
61
|
-
onSubmit: (payload: IFormSubmitPayload) => any;
|
|
63
|
+
onSubmit: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
62
64
|
onCancel: () => any;
|
|
63
65
|
onStepChange: (step: number) => any;
|
|
64
66
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
65
|
-
onOnSubmit?: (payload: IFormSubmitPayload) => any;
|
|
67
|
+
onOnSubmit?: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
66
68
|
onOnCancel?: () => any;
|
|
67
69
|
onOnStepChange?: (step: number) => any;
|
|
68
70
|
}>, {
|
|
@@ -78,6 +80,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
78
80
|
footerClass: string;
|
|
79
81
|
cancelText: string;
|
|
80
82
|
isUpdate: boolean;
|
|
83
|
+
folderId: string;
|
|
81
84
|
groupsHeadings: string[];
|
|
82
85
|
groupHeadingsDescription: string[];
|
|
83
86
|
submitText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9ccf0187"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Q, inject as W, computed as u, ref as X, watch as Y, openBlock as s, createElementBlock as o, withModifiers as Z, normalizeClass as h, createVNode as x, createCommentVNode as d, unref as t, Fragment as _, renderList as ee, createElementVNode as D, toDisplayString as k, renderSlot as te, createBlock as p, mergeProps as ae } from "vue";
|
|
2
|
+
import { useForm as ie } from "./composables/useForm.js";
|
|
3
|
+
import w from "./FormFields.vue.js";
|
|
4
|
+
import N from "../Button.vue.js";
|
|
5
|
+
import se from "../Timeline.vue.js";
|
|
6
|
+
const le = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "form-timeline mb-18"
|
|
9
|
-
},
|
|
9
|
+
}, ne = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "form-fields-single"
|
|
12
|
-
},
|
|
12
|
+
}, oe = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "form-groups space-y-6"
|
|
15
|
-
},
|
|
15
|
+
}, re = { class: "text-base font-semibold text-foreground" }, ue = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-sm text-muted-foreground mt-1"
|
|
18
|
-
},
|
|
18
|
+
}, de = { class: "form-group-body p-6" }, ce = {
|
|
19
19
|
key: 3,
|
|
20
20
|
class: "form-step"
|
|
21
|
-
},
|
|
21
|
+
}, me = { class: "text-lg font-semibold text-foreground" }, ve = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "text-sm text-muted-foreground mt-1"
|
|
24
|
-
},
|
|
24
|
+
}, xe = /* @__PURE__ */ Q({
|
|
25
25
|
__name: "Form",
|
|
26
26
|
props: {
|
|
27
27
|
schema: {},
|
|
@@ -39,6 +39,7 @@ const te = {
|
|
|
39
39
|
cancelText: { default: "Cancel" },
|
|
40
40
|
showCancel: { type: Boolean, default: !1 },
|
|
41
41
|
isUpdate: { type: Boolean, default: !1 },
|
|
42
|
+
folderId: { default: void 0 },
|
|
42
43
|
class: { default: "" },
|
|
43
44
|
className: { default: "" },
|
|
44
45
|
groupClass: { default: "" },
|
|
@@ -47,192 +48,200 @@ const te = {
|
|
|
47
48
|
timelineTextPosition: { default: "bottom" }
|
|
48
49
|
},
|
|
49
50
|
emits: ["onSubmit", "onCancel", "onStepChange"],
|
|
50
|
-
setup(e, { emit:
|
|
51
|
-
const
|
|
51
|
+
setup(e, { emit: A }) {
|
|
52
|
+
const i = e, m = A, v = W("modal-context", null), G = u(() => i.showCancel || !!v), $ = u(() => !!v), b = u(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), r = u(() => i.tabs && i.tabs.length > 0 && b.value), a = X(0), P = u(() => i.tabs ? i.tabs.map((l, n) => ({
|
|
52
53
|
id: l.id?.toString() || n.toString(),
|
|
53
54
|
title: l.title,
|
|
54
55
|
icon: l.icon,
|
|
55
56
|
description: l.description,
|
|
56
57
|
status: n < a.value ? "completed" : n === a.value ? "current" : "upcoming"
|
|
57
|
-
})) : []), g =
|
|
58
|
-
formValues:
|
|
59
|
-
errors:
|
|
60
|
-
isSubmitting:
|
|
61
|
-
handleFieldChange:
|
|
62
|
-
validateField:
|
|
63
|
-
validateAll:
|
|
64
|
-
isFieldVisible:
|
|
65
|
-
isFieldDisabled:
|
|
66
|
-
isFieldReadonly:
|
|
67
|
-
getFieldValue:
|
|
68
|
-
handleSubmit:
|
|
69
|
-
flatSchema:
|
|
70
|
-
} =
|
|
71
|
-
schema:
|
|
72
|
-
values:
|
|
73
|
-
isUpdate:
|
|
58
|
+
})) : []), g = u(() => b.value ? i.schema : [i.schema]), R = u(() => r.value ? g.value[a.value] || [] : []), {
|
|
59
|
+
formValues: y,
|
|
60
|
+
errors: S,
|
|
61
|
+
isSubmitting: V,
|
|
62
|
+
handleFieldChange: j,
|
|
63
|
+
validateField: E,
|
|
64
|
+
validateAll: fe,
|
|
65
|
+
isFieldVisible: C,
|
|
66
|
+
isFieldDisabled: F,
|
|
67
|
+
isFieldReadonly: z,
|
|
68
|
+
getFieldValue: he,
|
|
69
|
+
handleSubmit: L,
|
|
70
|
+
flatSchema: be
|
|
71
|
+
} = ie({
|
|
72
|
+
schema: i.schema,
|
|
73
|
+
values: i.values,
|
|
74
|
+
isUpdate: i.isUpdate,
|
|
75
|
+
folderId: i.folderId,
|
|
74
76
|
onSubmit: (l) => {
|
|
75
|
-
m("onSubmit", l);
|
|
77
|
+
m("onSubmit", l, v?.close);
|
|
76
78
|
}
|
|
77
79
|
});
|
|
78
|
-
|
|
79
|
-
() =>
|
|
80
|
+
Y(
|
|
81
|
+
() => i.values,
|
|
80
82
|
(l) => {
|
|
81
83
|
},
|
|
82
84
|
{ deep: !0 }
|
|
83
85
|
);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
if (!
|
|
88
|
-
const l =
|
|
86
|
+
const U = (l, n) => {
|
|
87
|
+
j(l, n.value, n.data);
|
|
88
|
+
}, q = () => {
|
|
89
|
+
if (!r.value) return !0;
|
|
90
|
+
const l = R.value;
|
|
89
91
|
let n = !0;
|
|
90
|
-
for (const
|
|
91
|
-
if (!
|
|
92
|
-
|
|
92
|
+
for (const f of l) {
|
|
93
|
+
if (!C(f) || F(f)) continue;
|
|
94
|
+
E(f) && (n = !1);
|
|
93
95
|
}
|
|
94
96
|
return n;
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
},
|
|
97
|
+
}, I = u(() => r.value ? a.value < g.value.length - 1 : !1), B = u(() => r.value ? a.value > 0 : !1), T = u(() => r.value ? a.value === g.value.length - 1 : !0), H = () => {
|
|
98
|
+
I.value && q() && (a.value++, m("onStepChange", a.value));
|
|
99
|
+
}, J = () => {
|
|
100
|
+
B.value && (a.value--, m("onStepChange", a.value));
|
|
101
|
+
}, K = (l, n) => {
|
|
100
102
|
n <= a.value && (a.value = n, m("onStepChange", a.value));
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
|
|
103
|
+
}, M = async () => {
|
|
104
|
+
if (r.value && !T.value) {
|
|
105
|
+
H();
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
try {
|
|
109
|
+
await L();
|
|
110
|
+
} catch {
|
|
111
|
+
}
|
|
112
|
+
}, O = () => {
|
|
113
|
+
m("onCancel"), v && v?.close?.();
|
|
109
114
|
};
|
|
110
|
-
return (l, n) => (
|
|
111
|
-
class:
|
|
112
|
-
onSubmit:
|
|
115
|
+
return (l, n) => (s(), o("form", {
|
|
116
|
+
class: h(["form-container", i.class]),
|
|
117
|
+
onSubmit: Z(M, ["prevent"])
|
|
113
118
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
r.value && P.value.length > 0 ? (s(), o("div", le, [
|
|
120
|
+
x(se, {
|
|
116
121
|
steps: P.value,
|
|
117
122
|
activeStep: a.value,
|
|
118
123
|
direction: "horizontal",
|
|
119
124
|
textPosition: e.timelineTextPosition,
|
|
120
125
|
clickable: !0,
|
|
121
|
-
onStepClick:
|
|
126
|
+
onStepClick: K
|
|
122
127
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
123
|
-
])) :
|
|
124
|
-
|
|
125
|
-
(
|
|
128
|
+
])) : d("", !0),
|
|
129
|
+
b.value ? b.value && !r.value ? (s(), o("div", oe, [
|
|
130
|
+
(s(!0), o(_, null, ee(g.value, (f, c) => (s(), o("div", {
|
|
126
131
|
key: c,
|
|
127
|
-
class:
|
|
132
|
+
class: h(["form-group border rounded-lg overflow-hidden", e.groupClass])
|
|
128
133
|
}, [
|
|
129
|
-
e.groupsHeadings?.[c] ? (
|
|
134
|
+
e.groupsHeadings?.[c] ? (s(), o("div", {
|
|
130
135
|
key: 0,
|
|
131
|
-
class:
|
|
136
|
+
class: h(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
|
|
132
137
|
}, [
|
|
133
|
-
|
|
134
|
-
e.groupHeadingsDescription?.[c] ? (
|
|
135
|
-
], 2)) :
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
schema:
|
|
139
|
-
values: t(
|
|
140
|
-
errors: t(
|
|
138
|
+
D("h3", re, k(e.groupsHeadings[c]), 1),
|
|
139
|
+
e.groupHeadingsDescription?.[c] ? (s(), o("p", ue, k(e.groupHeadingsDescription[c]), 1)) : d("", !0)
|
|
140
|
+
], 2)) : d("", !0),
|
|
141
|
+
D("div", de, [
|
|
142
|
+
x(w, {
|
|
143
|
+
schema: f,
|
|
144
|
+
values: t(y),
|
|
145
|
+
errors: t(S),
|
|
141
146
|
variant: e.variant,
|
|
142
147
|
size: e.size,
|
|
143
148
|
rounded: e.rounded,
|
|
144
149
|
className: e.className,
|
|
145
150
|
isUpdate: e.isUpdate,
|
|
146
|
-
isFieldVisible: t(
|
|
147
|
-
isFieldDisabled: t(
|
|
148
|
-
isFieldReadonly: t(
|
|
149
|
-
onChange:
|
|
151
|
+
isFieldVisible: t(C),
|
|
152
|
+
isFieldDisabled: t(F),
|
|
153
|
+
isFieldReadonly: t(z),
|
|
154
|
+
onChange: U
|
|
150
155
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
151
156
|
])
|
|
152
157
|
], 2))), 128))
|
|
153
|
-
])) :
|
|
154
|
-
e.tabs?.[a.value] ? (
|
|
158
|
+
])) : r.value ? (s(), o("div", ce, [
|
|
159
|
+
e.tabs?.[a.value] ? (s(), o("div", {
|
|
155
160
|
key: 0,
|
|
156
|
-
class:
|
|
161
|
+
class: h(["form-step-header mb-6", e.headerClass])
|
|
157
162
|
}, [
|
|
158
|
-
|
|
159
|
-
e.tabs[a.value].description ? (
|
|
160
|
-
], 2)) :
|
|
161
|
-
|
|
162
|
-
schema:
|
|
163
|
-
values: t(
|
|
164
|
-
errors: t(
|
|
163
|
+
D("h2", me, k(e.tabs[a.value].title), 1),
|
|
164
|
+
e.tabs[a.value].description ? (s(), o("p", ve, k(e.tabs[a.value].description), 1)) : d("", !0)
|
|
165
|
+
], 2)) : d("", !0),
|
|
166
|
+
x(w, {
|
|
167
|
+
schema: R.value,
|
|
168
|
+
values: t(y),
|
|
169
|
+
errors: t(S),
|
|
165
170
|
variant: e.variant,
|
|
166
171
|
size: e.size,
|
|
167
172
|
rounded: e.rounded,
|
|
168
173
|
className: e.className,
|
|
169
174
|
isUpdate: e.isUpdate,
|
|
170
|
-
isFieldVisible: t(
|
|
171
|
-
isFieldDisabled: t(
|
|
172
|
-
isFieldReadonly: t(
|
|
173
|
-
onChange:
|
|
175
|
+
isFieldVisible: t(C),
|
|
176
|
+
isFieldDisabled: t(F),
|
|
177
|
+
isFieldReadonly: t(z),
|
|
178
|
+
onChange: U
|
|
174
179
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
175
|
-
])) :
|
|
176
|
-
|
|
180
|
+
])) : d("", !0) : (s(), o("div", ne, [
|
|
181
|
+
x(w, {
|
|
177
182
|
schema: e.schema,
|
|
178
|
-
values: t(
|
|
179
|
-
errors: t(
|
|
183
|
+
values: t(y),
|
|
184
|
+
errors: t(S),
|
|
180
185
|
variant: e.variant,
|
|
181
186
|
size: e.size,
|
|
182
187
|
rounded: e.rounded,
|
|
183
188
|
className: e.className,
|
|
184
189
|
isUpdate: e.isUpdate,
|
|
185
|
-
isFieldVisible: t(
|
|
186
|
-
isFieldDisabled: t(
|
|
187
|
-
isFieldReadonly: t(
|
|
188
|
-
onChange:
|
|
190
|
+
isFieldVisible: t(C),
|
|
191
|
+
isFieldDisabled: t(F),
|
|
192
|
+
isFieldReadonly: t(z),
|
|
193
|
+
onChange: U
|
|
189
194
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
190
195
|
])),
|
|
191
|
-
|
|
192
|
-
values: t(
|
|
193
|
-
errors: t(
|
|
194
|
-
isSubmitting: t(
|
|
195
|
-
handleSubmit:
|
|
196
|
+
te(l.$slots, "default", {
|
|
197
|
+
values: t(y),
|
|
198
|
+
errors: t(S),
|
|
199
|
+
isSubmitting: t(V),
|
|
200
|
+
handleSubmit: M
|
|
196
201
|
}, void 0, !0),
|
|
197
|
-
e.footer ? (
|
|
202
|
+
e.footer ? (s(), o("div", {
|
|
198
203
|
key: 4,
|
|
199
|
-
class:
|
|
204
|
+
class: h([
|
|
205
|
+
"form-footer flex items-center justify-end gap-3",
|
|
206
|
+
e.footerClass,
|
|
207
|
+
$.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border -mx-4 px-4 mt-4" : "mt-6"
|
|
208
|
+
])
|
|
200
209
|
}, [
|
|
201
|
-
|
|
210
|
+
G.value ? (s(), p(N, {
|
|
202
211
|
key: 0,
|
|
203
212
|
type: "button",
|
|
204
213
|
variant: "outline",
|
|
205
214
|
text: e.cancelText,
|
|
206
|
-
disabled: e.loading || t(
|
|
207
|
-
onClick:
|
|
208
|
-
}, null, 8, ["text", "disabled"])) :
|
|
209
|
-
|
|
215
|
+
disabled: e.loading || t(V),
|
|
216
|
+
onClick: O
|
|
217
|
+
}, null, 8, ["text", "disabled"])) : d("", !0),
|
|
218
|
+
r.value && B.value ? (s(), p(N, {
|
|
210
219
|
key: 1,
|
|
211
220
|
type: "button",
|
|
212
221
|
variant: "outline",
|
|
213
222
|
icon: "lucide:arrow-left",
|
|
214
223
|
text: "Previous",
|
|
215
|
-
onClick:
|
|
216
|
-
})) :
|
|
217
|
-
|
|
224
|
+
onClick: J
|
|
225
|
+
})) : d("", !0),
|
|
226
|
+
r.value && !T.value ? (s(), p(N, {
|
|
218
227
|
key: 2,
|
|
219
228
|
type: "button",
|
|
220
229
|
variant: "primary",
|
|
221
230
|
text: "Next",
|
|
222
231
|
iconRight: "lucide:arrow-right",
|
|
223
|
-
onClick:
|
|
224
|
-
})) : (
|
|
232
|
+
onClick: H
|
|
233
|
+
})) : (s(), p(N, ae({
|
|
225
234
|
key: 3,
|
|
226
235
|
type: "submit",
|
|
227
236
|
variant: "primary",
|
|
228
237
|
text: e.submitText
|
|
229
238
|
}, e.submitProps, {
|
|
230
|
-
loading: e.loading || t(
|
|
239
|
+
loading: e.loading || t(V)
|
|
231
240
|
}), null, 16, ["text", "loading"]))
|
|
232
|
-
], 2)) :
|
|
241
|
+
], 2)) : d("", !0)
|
|
233
242
|
], 34));
|
|
234
243
|
}
|
|
235
244
|
});
|
|
236
245
|
export {
|
|
237
|
-
|
|
246
|
+
xe as default
|
|
238
247
|
};
|