vlite3 0.4.8 → 0.5.2
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/README.md +201 -100
- package/_virtual/Barcode.js +4 -0
- package/_virtual/CODE128.js +4 -0
- package/_virtual/CODE128A.js +4 -0
- package/_virtual/CODE128B.js +4 -0
- package/_virtual/CODE128C.js +4 -0
- package/_virtual/CODE128_AUTO.js +4 -0
- package/_virtual/CODE93.js +4 -0
- package/_virtual/CODE93FullASCII.js +4 -0
- package/_virtual/EAN.js +4 -0
- package/_virtual/EAN13.js +4 -0
- package/_virtual/EAN2.js +4 -0
- package/_virtual/EAN5.js +4 -0
- package/_virtual/EAN8.js +4 -0
- package/_virtual/ErrorHandler.js +4 -0
- package/_virtual/FileSaver.min.js +5 -0
- package/_virtual/FileSaver.min2.js +4 -0
- package/_virtual/ITF.js +4 -0
- package/_virtual/ITF14.js +4 -0
- package/_virtual/JsBarcode.js +7 -0
- package/_virtual/MSI.js +4 -0
- package/_virtual/MSI10.js +4 -0
- package/_virtual/MSI1010.js +4 -0
- package/_virtual/MSI11.js +4 -0
- package/_virtual/MSI1110.js +4 -0
- package/_virtual/UPC.js +4 -0
- package/_virtual/UPCE.js +4 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/alignment-pattern.js +4 -0
- package/_virtual/auto.js +4 -0
- package/_virtual/browser.js +7 -0
- package/_virtual/browser2.js +4 -0
- package/_virtual/canvas.js +4 -0
- package/_virtual/canvas2.js +4 -0
- package/_virtual/checksums.js +4 -0
- package/_virtual/constants.js +4 -0
- package/_virtual/constants2.js +4 -0
- package/_virtual/constants3.js +4 -0
- package/_virtual/constants4.js +4 -0
- package/_virtual/defaults.js +4 -0
- package/_virtual/dijkstra.js +4 -0
- package/_virtual/encoder.js +4 -0
- package/_virtual/error-correction-code.js +4 -0
- package/_virtual/error-correction-level.js +4 -0
- package/_virtual/exceptions.js +4 -0
- package/_virtual/finder-pattern.js +4 -0
- package/_virtual/fixOptions.js +4 -0
- package/_virtual/format-info.js +4 -0
- package/_virtual/galois-field.js +4 -0
- package/_virtual/getOptionsFromElement.js +4 -0
- package/_virtual/getRenderProperties.js +4 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index10.js +4 -0
- package/_virtual/index11.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/index4.js +4 -0
- package/_virtual/index5.js +4 -0
- package/_virtual/index6.js +4 -0
- package/_virtual/index7.js +4 -0
- package/_virtual/index8.js +4 -0
- package/_virtual/index9.js +4 -0
- package/_virtual/linearizeEncodings.js +4 -0
- package/_virtual/mask-pattern.js +4 -0
- package/_virtual/merge.js +4 -0
- package/_virtual/mode.js +4 -0
- package/_virtual/object.js +4 -0
- package/_virtual/optionsFromStrings.js +4 -0
- package/_virtual/papaparse.min.js +7 -0
- package/_virtual/papaparse.min2.js +4 -0
- package/_virtual/polynomial.js +4 -0
- package/_virtual/qrcode.js +4 -0
- package/_virtual/regex.js +4 -0
- package/_virtual/segments.js +4 -0
- package/_virtual/shared.js +4 -0
- package/_virtual/svg-tag.js +4 -0
- package/_virtual/svg.js +4 -0
- package/_virtual/utils.js +4 -0
- package/_virtual/utils2.js +4 -0
- package/_virtual/version-check.js +4 -0
- package/_virtual/version.js +4 -0
- package/components/Accordion/Accordion.vue.d.ts +7 -7
- package/components/Accordion/AccordionItem.vue.d.ts +4 -4
- package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
- package/components/Alert.vue.d.ts +1 -1
- package/components/Avatar.vue.d.ts +2 -2
- package/components/Avatar.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
- package/components/Badge.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.d.ts +22 -0
- package/components/Barcode/Barcode.vue.js +58 -0
- package/components/Barcode/Barcode.vue2.js +4 -0
- package/components/Barcode/index.d.ts +2 -0
- package/components/Barcode/types.d.ts +5 -0
- package/components/Barcode/types.js +15 -0
- package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
- package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
- package/components/Breadcrumb/index.d.ts +3 -0
- package/components/Breadcrumb/types.d.ts +19 -0
- package/components/Button.vue.d.ts +4 -4
- package/components/Button.vue.js +32 -29
- package/components/ButtonGroup.vue.d.ts +1 -1
- package/components/Carousel/Carousel.vue.d.ts +58 -58
- package/components/CheckBox.vue.d.ts +2 -2
- package/components/Chip/Chip.vue.d.ts +3 -3
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPaletteContent.vue.d.ts +15 -0
- package/components/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPaletteContent.vue2.js +287 -0
- package/components/ConfirmationModal.vue.js +12 -10
- package/components/DataList/DataList.vue.d.ts +2 -2
- package/components/DataTable/DataTable.vue.d.ts +6 -6
- package/components/DataTable/DataTableRow.vue.d.ts +3 -3
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +7 -7
- package/components/DateRangePicker.vue.d.ts +29 -0
- package/components/DateRangePicker.vue.js +231 -0
- package/components/DateRangePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +11 -6
- package/components/Dropdown/Dropdown.vue.js +147 -109
- package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
- package/components/Dropdown/DropdownItem.vue.js +11 -10
- package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
- package/components/Dropdown/DropdownMenu.vue.js +114 -111
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +9 -7
- package/components/ExportData/ExportData.vue.d.ts +16 -0
- package/components/ExportData/ExportData.vue.js +135 -0
- package/components/ExportData/ExportData.vue2.js +4 -0
- package/components/ExportData/index.d.ts +2 -0
- package/components/ExportData/types.d.ts +17 -0
- package/components/FilePicker/FilePicker.vue.d.ts +5 -5
- package/components/Form/CustomFields.vue.d.ts +6 -6
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/Form.vue.d.ts +4 -5
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +221 -178
- package/components/Form/FormField.vue.d.ts +4 -3
- package/components/Form/FormField.vue.js +70 -62
- package/components/Form/FormFields.vue.d.ts +3 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +105 -59
- package/components/GoogleLogin.vue.d.ts +2 -2
- package/components/Icon.vue.d.ts +2 -0
- package/components/Icon.vue.js +12 -11
- package/components/ImportData/ImportData.vue.d.ts +31 -0
- package/components/ImportData/ImportData.vue.js +242 -0
- package/components/ImportData/ImportData.vue2.js +4 -0
- package/components/ImportData/ImportStep1.vue.d.ts +23 -0
- package/components/ImportData/ImportStep1.vue.js +162 -0
- package/components/ImportData/ImportStep1.vue2.js +4 -0
- package/components/ImportData/ImportStep2.vue.d.ts +20 -0
- package/components/ImportData/ImportStep2.vue.js +98 -0
- package/components/ImportData/ImportStep2.vue2.js +4 -0
- package/components/ImportData/ImportStep3.vue.d.ts +6 -0
- package/components/ImportData/ImportStep3.vue.js +98 -0
- package/components/ImportData/ImportStep3.vue2.js +4 -0
- package/components/ImportData/ImportStep4.vue.d.ts +6 -0
- package/components/ImportData/ImportStep4.vue.js +139 -0
- package/components/ImportData/ImportStep4.vue2.js +4 -0
- package/components/ImportData/index.d.ts +2 -0
- package/components/ImportData/types.d.ts +51 -0
- package/components/Input.vue.d.ts +9 -9
- package/components/Input.vue.js +137 -120
- package/components/List/List.vue.d.ts +18 -0
- package/components/List/List.vue.js +189 -0
- package/components/List/List.vue2.js +4 -0
- package/components/List/ListFieldRow.vue.d.ts +35 -0
- package/components/List/ListFieldRow.vue.js +119 -0
- package/components/List/ListFieldRow.vue2.js +4 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/types.d.ts +1 -0
- package/components/List/utils.d.ts +9 -0
- package/components/List/utils.js +64 -0
- package/components/Masonry/Masonry.vue.d.ts +2 -2
- package/components/Modal.vue.js +5 -122
- package/components/Modal.vue2.js +133 -2
- package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
- package/components/MultiSelect/MultiSelect.vue.js +101 -64
- package/components/Navbar/Navbar.vue.d.ts +48 -9
- package/components/Navbar/Navbar.vue.js +418 -146
- package/components/Navbar/NavbarItem.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
- package/components/Navbar/NavbarTabs.vue.js +179 -0
- package/components/Navbar/NavbarTabs.vue3.js +5 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/NavbarCommandPalette.vue.d.ts +48 -0
- package/components/NumberInput.vue.d.ts +8 -8
- package/components/OTPInput/OTPInput.vue.d.ts +7 -7
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
- package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
- package/components/PermissionMatrix/index.d.ts +3 -0
- package/components/PermissionMatrix/types.d.ts +59 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
- package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/components/QRCode/QRCode.vue.d.ts +15 -0
- package/components/QRCode/QRCode.vue.js +38 -0
- package/components/QRCode/QRCode.vue2.js +4 -0
- package/components/QRCode/index.d.ts +1 -0
- package/components/Screen/Screen.vue.d.ts +232 -5
- package/components/Screen/Screen.vue.js +423 -271
- package/components/Screen/ScreenFilter.vue.d.ts +2 -2
- package/components/Screen/ScreenFilter.vue.js +9 -9
- package/components/Screen/types.d.ts +12 -0
- package/components/SidePanel.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
- package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
- package/components/SidebarMenu/types.d.ts +32 -5
- package/components/Slider.vue.d.ts +2 -2
- package/components/Spinner/Spinner.vue.d.ts +2 -2
- package/components/Stats/Stats.vue.d.ts +14 -0
- package/components/Stats/Stats.vue.js +307 -0
- package/components/Stats/Stats.vue2.js +4 -0
- package/components/Stats/index.d.ts +2 -0
- package/components/Stats/types.d.ts +32 -0
- package/components/Switch.vue.d.ts +2 -1
- package/components/Switch.vue.js +4 -2
- package/components/Tabes/Tabes.vue.d.ts +3 -3
- package/components/Tabes/Tabes.vue.js +60 -57
- package/components/Tabes/types.d.ts +5 -0
- package/components/Textarea.vue.d.ts +3 -3
- package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
- package/components/Timeline/Timeline.vue.js +92 -0
- package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
- package/components/Timeline/TimelineIndicator.vue.js +68 -0
- package/components/Timeline/TimelineIndicator.vue2.js +4 -0
- package/components/Timeline/TimelineItem.vue.d.ts +56 -0
- package/components/Timeline/TimelineItem.vue.js +173 -0
- package/components/Timeline/TimelineItem.vue2.js +4 -0
- package/components/Timeline/index.d.ts +3 -0
- package/components/Tooltip.vue.d.ts +2 -2
- package/components/Workbook/Sheet.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/components/index.d.ts +62 -0
- package/composables/useBreadcrumb.d.ts +17 -0
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +34 -0
- package/core/config.js +10 -7
- package/core/index.js +15 -8
- package/index.d.ts +55 -44
- package/index.js +243 -200
- package/package.json +12 -2
- package/router.d.ts +2 -0
- package/style.css +7 -5
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +35 -0
- package/types/form.type.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/list.type.d.ts +57 -0
- package/types/navbar.type.d.ts +38 -1
- package/types/timeline.type.d.ts +14 -4
- package/components/Timeline.vue.js +0 -160
- /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, oe = {
|
|
1
|
+
import { defineComponent as se, inject as le, computed as n, ref as oe, watch as $, onUnmounted as ne, openBlock as o, createElementBlock as u, withModifiers as re, normalizeClass as g, createVNode as V, unref as a, createCommentVNode as d, Fragment as ue, renderList as de, createElementVNode as p, toDisplayString as N, renderSlot as ce, createBlock as S, mergeProps as j } from "vue";
|
|
2
|
+
import { useForm as me } from "./composables/useForm.js";
|
|
3
|
+
import H from "./FormFields.vue.js";
|
|
4
|
+
import C from "../Button.vue.js";
|
|
5
|
+
import ve from "../Timeline/Timeline.vue.js";
|
|
6
|
+
import "@iconify/vue";
|
|
7
|
+
import { useVLiteConfig as fe } from "../../core/config.js";
|
|
8
|
+
const ge = {
|
|
10
9
|
key: 1,
|
|
11
10
|
class: "form-fields-single"
|
|
12
|
-
},
|
|
11
|
+
}, he = {
|
|
13
12
|
key: 2,
|
|
14
13
|
class: "form-groups space-y-6"
|
|
15
|
-
},
|
|
14
|
+
}, be = { class: "text-base font-semibold text-foreground" }, ye = {
|
|
16
15
|
key: 0,
|
|
17
16
|
class: "text-sm text-muted-foreground mt-1"
|
|
18
|
-
},
|
|
17
|
+
}, pe = { class: "form-group-body p-6" }, Se = {
|
|
19
18
|
key: 3,
|
|
20
19
|
class: "form-step"
|
|
21
|
-
},
|
|
20
|
+
}, Ce = { class: "text-lg font-semibold text-foreground" }, ke = {
|
|
22
21
|
key: 0,
|
|
23
22
|
class: "text-sm text-muted-foreground mt-1"
|
|
24
|
-
},
|
|
23
|
+
}, Fe = { class: "flex items-center gap-3" }, xe = { class: "flex items-center gap-3 ml-auto" }, qe = /* @__PURE__ */ se({
|
|
25
24
|
__name: "Form",
|
|
26
25
|
props: {
|
|
27
26
|
schema: {},
|
|
28
27
|
values: { default: () => ({}) },
|
|
29
|
-
variant: {
|
|
30
|
-
size: {
|
|
31
|
-
rounded: {
|
|
28
|
+
variant: {},
|
|
29
|
+
size: {},
|
|
30
|
+
rounded: {},
|
|
32
31
|
loading: { type: Boolean, default: !1 },
|
|
33
32
|
footer: { type: Boolean, default: !0 },
|
|
34
33
|
groupsHeadings: { default: () => [] },
|
|
@@ -45,208 +44,252 @@ const ne = {
|
|
|
45
44
|
groupClass: { default: "" },
|
|
46
45
|
headerClass: { default: "" },
|
|
47
46
|
footerClass: { default: "" },
|
|
48
|
-
timelineTextPosition: { default: "
|
|
49
|
-
emitFields: { default: () => ["__typename"] }
|
|
47
|
+
timelineTextPosition: { default: "right" },
|
|
48
|
+
emitFields: { default: () => ["__typename"] },
|
|
49
|
+
showRequiredAsterisk: { type: Boolean }
|
|
50
50
|
},
|
|
51
51
|
emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
|
|
52
|
-
setup(e, { emit:
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
52
|
+
setup(e, { emit: I }) {
|
|
53
|
+
const t = e, m = I, v = le(
|
|
54
|
+
"modal-context",
|
|
55
|
+
null
|
|
56
|
+
), J = fe(), k = n(() => J?.components?.form || {}), U = n(() => t.variant ?? k.value.variant ?? "outline"), z = n(() => t.size ?? k.value.size ?? "md"), P = n(() => t.rounded ?? k.value.rounded ?? "md"), D = n(
|
|
57
|
+
() => t.showRequiredAsterisk ?? k.value.showRequiredAsterisk ?? !0
|
|
58
|
+
), K = n(() => t.showCancel || !!v), O = n(() => !!v), F = n(() => !t.schema || t.schema.length === 0 ? !1 : Array.isArray(t.schema[0])), r = n(() => t.tabs && t.tabs.length > 0 && F.value), s = oe(0), M = n(() => t.tabs ? t.tabs.map((l, i) => ({
|
|
59
|
+
id: l.id?.toString() || i.toString(),
|
|
60
|
+
title: l.title,
|
|
61
|
+
icon: l.icon,
|
|
62
|
+
description: l.description,
|
|
63
|
+
status: i < s.value ? "completed" : i === s.value ? "current" : "upcoming"
|
|
64
|
+
})) : []), h = n(() => F.value ? t.schema : [t.schema]), E = n(() => r.value ? h.value[s.value] || [] : []), {
|
|
65
|
+
formValues: x,
|
|
66
|
+
errors: b,
|
|
67
|
+
isSubmitting: y,
|
|
68
|
+
handleFieldChange: Q,
|
|
69
|
+
validateField: W,
|
|
70
|
+
validateAll: X,
|
|
71
|
+
isFieldVisible: A,
|
|
72
|
+
isFieldDisabled: w,
|
|
73
|
+
isFieldReadonly: q,
|
|
74
|
+
getFieldValue: Ae,
|
|
75
|
+
handleSubmit: Y,
|
|
76
|
+
flatSchema: we
|
|
77
|
+
} = me({
|
|
78
|
+
schema: t.schema,
|
|
79
|
+
values: t.values,
|
|
80
|
+
isUpdate: t.isUpdate,
|
|
81
|
+
folderId: t.folderId,
|
|
82
|
+
emitFields: t.emitFields,
|
|
83
|
+
onSubmit: (l) => {
|
|
84
|
+
m("onSubmit", l, v?.close || (() => {
|
|
85
|
+
}));
|
|
80
86
|
}
|
|
81
87
|
});
|
|
82
|
-
|
|
83
|
-
() =>
|
|
84
|
-
(
|
|
88
|
+
$(
|
|
89
|
+
() => t.loading || y.value,
|
|
90
|
+
(l) => {
|
|
91
|
+
v?.setSubmitting && v.setSubmitting(l);
|
|
92
|
+
},
|
|
93
|
+
{ immediate: !0 }
|
|
94
|
+
), ne(() => {
|
|
95
|
+
v?.setSubmitting && v.setSubmitting(!1);
|
|
96
|
+
}), $(
|
|
97
|
+
() => t.values,
|
|
98
|
+
(l) => {
|
|
85
99
|
},
|
|
86
100
|
{ deep: !0 }
|
|
87
101
|
);
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
},
|
|
102
|
+
const T = (l, i) => {
|
|
103
|
+
Q(l, i.value, i.data);
|
|
104
|
+
}, Z = () => {
|
|
91
105
|
if (!r.value) return !0;
|
|
92
|
-
const
|
|
93
|
-
let
|
|
94
|
-
for (const
|
|
95
|
-
if (!
|
|
96
|
-
|
|
106
|
+
const l = E.value;
|
|
107
|
+
let i = !0;
|
|
108
|
+
for (const c of l) {
|
|
109
|
+
if (!A(c) || w(c)) continue;
|
|
110
|
+
W(c) && (i = !1);
|
|
97
111
|
}
|
|
98
|
-
return
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
if (r.value
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
return i;
|
|
113
|
+
}, _ = n(() => r.value ? s.value < h.value.length - 1 : !1), G = n(() => r.value ? s.value > 0 : !1), R = n(() => r.value ? s.value === h.value.length - 1 : !0), L = () => {
|
|
114
|
+
_.value && Z() && (s.value++, m("onStepChange", s.value));
|
|
115
|
+
}, ee = () => {
|
|
116
|
+
G.value && (s.value--, m("onStepChange", s.value));
|
|
117
|
+
}, te = (l, i) => {
|
|
118
|
+
i <= s.value && (s.value = i, m("onStepChange", s.value));
|
|
119
|
+
}, B = async () => {
|
|
120
|
+
if (r.value) {
|
|
121
|
+
if (!R.value && !t.isUpdate) {
|
|
122
|
+
L();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (!X()) {
|
|
126
|
+
const i = h.value.findIndex(
|
|
127
|
+
(c) => c.some((f) => !!b.value[f.name])
|
|
128
|
+
);
|
|
129
|
+
i !== -1 && i !== s.value && (s.value = i, m("onStepChange", s.value));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
109
132
|
}
|
|
110
133
|
try {
|
|
111
|
-
await
|
|
134
|
+
await Y();
|
|
112
135
|
} catch {
|
|
113
136
|
}
|
|
114
|
-
},
|
|
115
|
-
m("onCancel"),
|
|
137
|
+
}, ie = () => {
|
|
138
|
+
m("onCancel"), v && v?.close?.();
|
|
116
139
|
};
|
|
117
|
-
return (
|
|
118
|
-
class:
|
|
119
|
-
onSubmit:
|
|
140
|
+
return (l, i) => (o(), u("form", {
|
|
141
|
+
class: g(["form-container", t.class]),
|
|
142
|
+
onSubmit: re(B, ["prevent"])
|
|
120
143
|
}, [
|
|
121
|
-
r.value &&
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
144
|
+
r.value && M.value.length > 0 ? (o(), u("div", {
|
|
145
|
+
key: 0,
|
|
146
|
+
class: g(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
|
|
147
|
+
}, [
|
|
148
|
+
V(a(ve), {
|
|
149
|
+
steps: M.value,
|
|
150
|
+
activeStep: s.value,
|
|
125
151
|
direction: "horizontal",
|
|
126
152
|
textPosition: e.timelineTextPosition,
|
|
127
153
|
clickable: !0,
|
|
128
|
-
onStepClick:
|
|
154
|
+
onStepClick: te
|
|
129
155
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
130
|
-
])) :
|
|
131
|
-
|
|
132
|
-
(
|
|
133
|
-
key:
|
|
134
|
-
class:
|
|
156
|
+
], 2)) : d("", !0),
|
|
157
|
+
F.value ? F.value && !r.value ? (o(), u("div", he, [
|
|
158
|
+
(o(!0), u(ue, null, de(h.value, (c, f) => (o(), u("div", {
|
|
159
|
+
key: f,
|
|
160
|
+
class: g(["form-group border rounded-lg overflow-hidden", e.groupClass])
|
|
135
161
|
}, [
|
|
136
|
-
e.groupsHeadings?.[
|
|
162
|
+
e.groupsHeadings?.[f] ? (o(), u("div", {
|
|
137
163
|
key: 0,
|
|
138
|
-
class:
|
|
164
|
+
class: g(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
|
|
139
165
|
}, [
|
|
140
|
-
|
|
141
|
-
e.groupHeadingsDescription?.[
|
|
142
|
-
], 2)) :
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
schema:
|
|
146
|
-
values:
|
|
147
|
-
errors:
|
|
148
|
-
variant:
|
|
149
|
-
size:
|
|
150
|
-
rounded:
|
|
166
|
+
p("h3", be, N(e.groupsHeadings[f]), 1),
|
|
167
|
+
e.groupHeadingsDescription?.[f] ? (o(), u("p", ye, N(e.groupHeadingsDescription[f]), 1)) : d("", !0)
|
|
168
|
+
], 2)) : d("", !0),
|
|
169
|
+
p("div", pe, [
|
|
170
|
+
V(H, {
|
|
171
|
+
schema: c,
|
|
172
|
+
values: a(x),
|
|
173
|
+
errors: a(b),
|
|
174
|
+
variant: U.value,
|
|
175
|
+
size: z.value,
|
|
176
|
+
rounded: P.value,
|
|
151
177
|
className: e.className,
|
|
152
178
|
isUpdate: e.isUpdate,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
179
|
+
showRequiredAsterisk: D.value,
|
|
180
|
+
isFieldVisible: a(A),
|
|
181
|
+
isFieldDisabled: a(w),
|
|
182
|
+
isFieldReadonly: a(q),
|
|
183
|
+
onChange: T,
|
|
184
|
+
onAddonAction: i[1] || (i[1] = (ae) => m("onAddonAction", ae))
|
|
185
|
+
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
159
186
|
])
|
|
160
187
|
], 2))), 128))
|
|
161
|
-
])) : r.value ? (
|
|
162
|
-
e.tabs?.[
|
|
188
|
+
])) : r.value ? (o(), u("div", Se, [
|
|
189
|
+
e.tabs?.[s.value] ? (o(), u("div", {
|
|
163
190
|
key: 0,
|
|
164
|
-
class:
|
|
191
|
+
class: g(["form-step-header mb-6", e.headerClass])
|
|
165
192
|
}, [
|
|
166
|
-
|
|
167
|
-
e.tabs[
|
|
168
|
-
], 2)) :
|
|
169
|
-
|
|
170
|
-
schema:
|
|
171
|
-
values:
|
|
172
|
-
errors:
|
|
173
|
-
variant:
|
|
174
|
-
size:
|
|
175
|
-
rounded:
|
|
193
|
+
p("h2", Ce, N(e.tabs[s.value].title), 1),
|
|
194
|
+
e.tabs[s.value].description ? (o(), u("p", ke, N(e.tabs[s.value].description), 1)) : d("", !0)
|
|
195
|
+
], 2)) : d("", !0),
|
|
196
|
+
V(H, {
|
|
197
|
+
schema: E.value,
|
|
198
|
+
values: a(x),
|
|
199
|
+
errors: a(b),
|
|
200
|
+
variant: U.value,
|
|
201
|
+
size: z.value,
|
|
202
|
+
rounded: P.value,
|
|
176
203
|
className: e.className,
|
|
177
204
|
isUpdate: e.isUpdate,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
205
|
+
showRequiredAsterisk: D.value,
|
|
206
|
+
isFieldVisible: a(A),
|
|
207
|
+
isFieldDisabled: a(w),
|
|
208
|
+
isFieldReadonly: a(q),
|
|
209
|
+
onChange: T,
|
|
210
|
+
onAddonAction: i[2] || (i[2] = (c) => m("onAddonAction", c))
|
|
211
|
+
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
212
|
+
])) : d("", !0) : (o(), u("div", ge, [
|
|
213
|
+
V(H, {
|
|
186
214
|
schema: e.schema,
|
|
187
|
-
values:
|
|
188
|
-
errors:
|
|
189
|
-
variant:
|
|
190
|
-
size:
|
|
191
|
-
rounded:
|
|
215
|
+
values: a(x),
|
|
216
|
+
errors: a(b),
|
|
217
|
+
variant: U.value,
|
|
218
|
+
size: z.value,
|
|
219
|
+
rounded: P.value,
|
|
192
220
|
className: e.className,
|
|
193
221
|
isUpdate: e.isUpdate,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
222
|
+
showRequiredAsterisk: D.value,
|
|
223
|
+
isFieldVisible: a(A),
|
|
224
|
+
isFieldDisabled: a(w),
|
|
225
|
+
isFieldReadonly: a(q),
|
|
226
|
+
onChange: T,
|
|
227
|
+
onAddonAction: i[0] || (i[0] = (c) => m("onAddonAction", c))
|
|
228
|
+
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
200
229
|
])),
|
|
201
|
-
|
|
202
|
-
values:
|
|
203
|
-
errors:
|
|
204
|
-
isSubmitting:
|
|
205
|
-
handleSubmit:
|
|
230
|
+
ce(l.$slots, "default", {
|
|
231
|
+
values: a(x),
|
|
232
|
+
errors: a(b),
|
|
233
|
+
isSubmitting: a(y),
|
|
234
|
+
handleSubmit: B
|
|
206
235
|
}, void 0, !0),
|
|
207
|
-
e.footer ? (
|
|
236
|
+
e.footer ? (o(), u("div", {
|
|
208
237
|
key: 4,
|
|
209
|
-
class:
|
|
210
|
-
"form-footer flex items-center justify-
|
|
238
|
+
class: g([
|
|
239
|
+
"form-footer flex items-center justify-between gap-3",
|
|
211
240
|
e.footerClass,
|
|
212
|
-
|
|
241
|
+
O.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/75 -mx-4 px-4 mt-8" : "mt-6"
|
|
213
242
|
])
|
|
214
243
|
}, [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
p("div", Fe, [
|
|
245
|
+
K.value ? (o(), S(C, {
|
|
246
|
+
key: 0,
|
|
247
|
+
type: "button",
|
|
248
|
+
variant: "outline",
|
|
249
|
+
text: e.cancelText,
|
|
250
|
+
disabled: e.loading || a(y),
|
|
251
|
+
onClick: ie
|
|
252
|
+
}, null, 8, ["text", "disabled"])) : d("", !0),
|
|
253
|
+
r.value && e.isUpdate && !R.value ? (o(), S(C, j({
|
|
254
|
+
key: 1,
|
|
255
|
+
type: "button",
|
|
256
|
+
variant: "primary",
|
|
257
|
+
text: e.submitText
|
|
258
|
+
}, e.submitProps, {
|
|
259
|
+
loading: e.loading || a(y),
|
|
260
|
+
onClick: B
|
|
261
|
+
}), null, 16, ["text", "loading"])) : d("", !0)
|
|
262
|
+
]),
|
|
263
|
+
p("div", xe, [
|
|
264
|
+
r.value && G.value ? (o(), S(C, {
|
|
265
|
+
key: 0,
|
|
266
|
+
type: "button",
|
|
267
|
+
variant: "outline",
|
|
268
|
+
icon: "lucide:arrow-left",
|
|
269
|
+
text: "Previous",
|
|
270
|
+
onClick: ee
|
|
271
|
+
})) : d("", !0),
|
|
272
|
+
r.value && !R.value ? (o(), S(C, {
|
|
273
|
+
key: 1,
|
|
274
|
+
type: "button",
|
|
275
|
+
variant: e.isUpdate ? "outline" : "primary",
|
|
276
|
+
text: "Next",
|
|
277
|
+
iconRight: "lucide:arrow-right",
|
|
278
|
+
onClick: L
|
|
279
|
+
}, null, 8, ["variant"])) : d("", !0),
|
|
280
|
+
!r.value || R.value ? (o(), S(C, j({
|
|
281
|
+
key: 2,
|
|
282
|
+
type: "submit",
|
|
283
|
+
variant: "primary",
|
|
284
|
+
text: e.submitText
|
|
285
|
+
}, e.submitProps, {
|
|
286
|
+
loading: e.loading || a(y)
|
|
287
|
+
}), null, 16, ["text", "loading"])) : d("", !0)
|
|
288
|
+
])
|
|
289
|
+
], 2)) : d("", !0)
|
|
247
290
|
], 34));
|
|
248
291
|
}
|
|
249
292
|
});
|
|
250
293
|
export {
|
|
251
|
-
|
|
294
|
+
qe as default
|
|
252
295
|
};
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
readonly?: boolean;
|
|
12
12
|
error?: string;
|
|
13
13
|
isUpdate?: boolean;
|
|
14
|
+
label?: string;
|
|
14
15
|
}
|
|
15
16
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
17
|
change: (payload: IFormFieldChangePayload) => any;
|
|
@@ -21,12 +22,12 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
21
22
|
onAddonAction?: (action: string) => any;
|
|
22
23
|
onAddonChange?: (name: string, payload: IFormFieldChangePayload) => any;
|
|
23
24
|
}>, {
|
|
24
|
-
|
|
25
|
-
size: InputSize;
|
|
25
|
+
readonly: boolean;
|
|
26
26
|
variant: InputVariant;
|
|
27
|
+
size: InputSize;
|
|
27
28
|
rounded: InputRounded;
|
|
28
29
|
error: string;
|
|
29
|
-
|
|
30
|
+
disabled: boolean;
|
|
30
31
|
isUpdate: boolean;
|
|
31
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
33
|
export default _default;
|