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,33 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
1
|
+
import { defineComponent as De, computed as o, ref as x, provide as Z, watch as q, resolveComponent as Pe, openBlock as a, createElementBlock as c, normalizeClass as O, createElementVNode as g, renderSlot as B, toDisplayString as f, createBlock as s, withCtx as d, createVNode as u, createCommentVNode as m, unref as w, resolveDynamicComponent as z, Fragment as D, mergeProps as h, createTextVNode as p, renderList as Ie } from "vue";
|
|
2
|
+
import Se from "../Input.vue.js";
|
|
3
|
+
import v from "../Button.vue.js";
|
|
4
|
+
import R from "../Icon.vue.js";
|
|
5
|
+
import $e from "../Tooltip.vue.js";
|
|
6
|
+
import H from "../Modal.vue.js";
|
|
7
|
+
import Te from "../ConfirmationModal.vue.js";
|
|
8
|
+
import Ve from "../Pagination/Pagination.vue.js";
|
|
9
|
+
import je from "../Empty/Empty.vue.js";
|
|
10
|
+
import Ae from "./ScreenFilter.vue.js";
|
|
11
|
+
import Ee from "../Dropdown/Dropdown.vue.js";
|
|
12
|
+
import Oe from "../ExportData/ExportData.vue.js";
|
|
13
|
+
import Re from "../ImportData/ImportData.vue.js";
|
|
14
|
+
import { usePersistentState as Ne } from "../../utils/usePersistentState.js";
|
|
15
|
+
import { useVLiteConfig as Fe } from "../../core/config.js";
|
|
16
|
+
import { $t as r } from "../../utils/i18n.js";
|
|
17
|
+
const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex-col shrink-0" }, Ue = {
|
|
13
18
|
key: 0,
|
|
14
|
-
class: "
|
|
15
|
-
},
|
|
19
|
+
class: "flex items-center! gap-2"
|
|
20
|
+
}, qe = { class: "text-fs-7.5 font-bold text-foreground" }, ze = {
|
|
16
21
|
key: 0,
|
|
17
22
|
class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
|
|
18
|
-
},
|
|
23
|
+
}, He = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Je = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, Ke = {
|
|
19
24
|
key: 1,
|
|
20
25
|
class: "flex items-center p-1 rounded-md border border-border shrink-0"
|
|
21
|
-
},
|
|
26
|
+
}, Qe = ["title"], Ge = ["title"], We = {
|
|
22
27
|
key: 4,
|
|
23
28
|
class: "w-full md:w-60! max-sm:order-last"
|
|
24
|
-
},
|
|
29
|
+
}, Xe = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, Ye = ["href", "target"], Ze = ["href", "target"], _e = {
|
|
25
30
|
key: 1,
|
|
26
31
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
27
|
-
},
|
|
32
|
+
}, et = {
|
|
28
33
|
key: 2,
|
|
29
34
|
class: "-mt-2"
|
|
30
|
-
},
|
|
35
|
+
}, tt = { class: "px-1 py-1 text-sm" }, nt = { class: "font-medium mb-3 text-muted-foreground" }, at = { class: "space-y-3" }, lt = { key: 4 }, Bt = /* @__PURE__ */ De({
|
|
31
36
|
__name: "Screen",
|
|
32
37
|
props: {
|
|
33
38
|
name: { default: "" },
|
|
@@ -35,6 +40,8 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
|
|
|
35
40
|
titleI18n: {},
|
|
36
41
|
description: {},
|
|
37
42
|
descriptionI18n: {},
|
|
43
|
+
info: {},
|
|
44
|
+
infoI18n: {},
|
|
38
45
|
pageInfo: {},
|
|
39
46
|
data: { default: () => [] },
|
|
40
47
|
loading: { type: Boolean, default: !1 },
|
|
@@ -52,6 +59,13 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
|
|
|
52
59
|
emptyIcon: { default: "lucide:inbox" },
|
|
53
60
|
addComponent: {},
|
|
54
61
|
addBtn: {},
|
|
62
|
+
exportSchema: { default: () => [] },
|
|
63
|
+
importSchema: { default: () => [] },
|
|
64
|
+
exportProps: { type: [Object, Boolean], default: !1 },
|
|
65
|
+
importProps: { type: [Object, Boolean], default: !1 },
|
|
66
|
+
exportMode: {},
|
|
67
|
+
importType: { default: "" },
|
|
68
|
+
exportType: {},
|
|
55
69
|
list: {},
|
|
56
70
|
table: {},
|
|
57
71
|
customHeader: { type: Boolean, default: !1 },
|
|
@@ -65,393 +79,531 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
|
|
|
65
79
|
headerClass: {}
|
|
66
80
|
},
|
|
67
81
|
emits: ["add", "delete"],
|
|
68
|
-
setup(
|
|
69
|
-
const
|
|
70
|
-
`view-mode-${
|
|
71
|
-
|
|
72
|
-
),
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
82
|
+
setup(t, { emit: _ }) {
|
|
83
|
+
const n = t, P = Fe(), J = _, ee = o(() => n.name || n.title || "default-screen"), I = Ne(
|
|
84
|
+
`view-mode-${ee.value}`,
|
|
85
|
+
n.table ? "table" : "list"
|
|
86
|
+
), S = x(""), T = x({}), k = x(n.pageInfo?.currentPage || 1), V = x(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10), b = x([]), j = x([]), $ = x(!1);
|
|
87
|
+
Z("screen-selected-rows", b), Z("screen-request-delete", (e) => N(e));
|
|
88
|
+
const N = (e) => {
|
|
89
|
+
j.value = e, $.value = !0;
|
|
90
|
+
}, te = () => {
|
|
91
|
+
J("delete", j.value), $.value = !1, b.value = [];
|
|
92
|
+
}, ne = (e) => {
|
|
93
|
+
J("delete", e), b.value = [];
|
|
80
94
|
};
|
|
81
|
-
|
|
82
|
-
() =>
|
|
83
|
-
(
|
|
84
|
-
|
|
95
|
+
q(
|
|
96
|
+
() => n.pageInfo?.currentPage,
|
|
97
|
+
(e) => {
|
|
98
|
+
e && (k.value = e);
|
|
85
99
|
}
|
|
86
|
-
),
|
|
87
|
-
() =>
|
|
88
|
-
(
|
|
89
|
-
|
|
100
|
+
), q(
|
|
101
|
+
() => n.pageInfo?.itemsPerPage,
|
|
102
|
+
(e) => {
|
|
103
|
+
e && (V.value = e);
|
|
90
104
|
}
|
|
91
105
|
);
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
106
|
+
let F = null;
|
|
107
|
+
q(S, (e) => {
|
|
108
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
109
|
+
k.value = 1, C();
|
|
96
110
|
}, 300);
|
|
97
111
|
});
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
V.value =
|
|
102
|
-
},
|
|
103
|
-
const
|
|
112
|
+
const ae = (e) => {
|
|
113
|
+
k.value = e, C();
|
|
114
|
+
}, le = (e) => {
|
|
115
|
+
V.value = e, k.value = 1, C();
|
|
116
|
+
}, C = () => {
|
|
117
|
+
const e = {
|
|
104
118
|
pageinfo: {
|
|
105
|
-
page:
|
|
119
|
+
page: k.value,
|
|
106
120
|
limit: V.value
|
|
107
121
|
},
|
|
108
122
|
pagination: {
|
|
109
|
-
page:
|
|
123
|
+
page: k.value,
|
|
110
124
|
limit: V.value
|
|
111
125
|
},
|
|
112
|
-
search:
|
|
113
|
-
filter:
|
|
126
|
+
search: S.value,
|
|
127
|
+
filter: T.value
|
|
114
128
|
};
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
129
|
+
n.refetch && n.refetch(e);
|
|
130
|
+
}, K = o(() => I.value === "table" && n.table ? n.table : n.list), oe = o(() => n.data && n.data.length > 0), Q = o(() => n.titleI18n ? r(n.titleI18n) : n.title), G = o(
|
|
131
|
+
() => n.descriptionI18n ? r(n.descriptionI18n) : n.description
|
|
132
|
+
), ie = o(() => {
|
|
133
|
+
const e = r("vlite.screen.deleteSelected");
|
|
134
|
+
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
135
|
+
}), re = o(() => {
|
|
136
|
+
const e = r("vlite.screen.listView");
|
|
137
|
+
return e !== "vlite.screen.listView" ? e : "List View";
|
|
138
|
+
}), de = o(() => {
|
|
139
|
+
const e = r("vlite.screen.tableView");
|
|
140
|
+
return e !== "vlite.screen.tableView" ? e : "Table View";
|
|
141
|
+
}), se = o(() => {
|
|
142
|
+
const e = r("vlite.screen.refresh");
|
|
143
|
+
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
144
|
+
}), ce = o(() => {
|
|
145
|
+
const e = r("vlite.screen.searchPlaceholder");
|
|
146
|
+
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
147
|
+
}), ue = o(() => {
|
|
148
|
+
const e = r("vlite.screen.confirmDeleteTitle");
|
|
149
|
+
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
150
|
+
}), fe = o(() => {
|
|
151
|
+
const e = r("vlite.screen.confirmDeleteDesc", { count: j.value.length });
|
|
152
|
+
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${j.value.length > 1 ? "items" : "item"}?`;
|
|
153
|
+
}), me = o(() => {
|
|
154
|
+
const e = r("vlite.screen.confirmDeleteBtn");
|
|
155
|
+
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
156
|
+
}), ve = o(() => {
|
|
157
|
+
const e = r("vlite.screen.cancelBtn");
|
|
158
|
+
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
159
|
+
}), he = o(() => {
|
|
160
|
+
const e = r("vlite.screen.missingView");
|
|
161
|
+
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component.";
|
|
162
|
+
}), y = o(() => {
|
|
163
|
+
if (n.addBtn?.labelI18n) return r(n.addBtn.labelI18n);
|
|
164
|
+
if (n.addBtn?.label) return n.addBtn.label;
|
|
165
|
+
const e = r("vlite.screen.addNew");
|
|
166
|
+
return e !== "vlite.screen.addNew" ? e : "Add New";
|
|
167
|
+
}), W = o(() => {
|
|
168
|
+
const e = n.exportSchema && n.exportSchema.length > 0 && n.exportProps !== !1, l = n.importSchema && n.importSchema.length > 0 && n.importProps !== !1;
|
|
169
|
+
return e || l;
|
|
170
|
+
}), L = o(() => {
|
|
171
|
+
const e = r("vlite.screen.exportData");
|
|
172
|
+
return e !== "vlite.screen.exportData" ? e : "Export Data";
|
|
173
|
+
}), X = o(() => {
|
|
174
|
+
const e = r("vlite.screen.importData");
|
|
175
|
+
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
176
|
+
}), ge = o(() => {
|
|
177
|
+
const e = [];
|
|
178
|
+
return n.exportProps !== !1 && e.push({ value: "export", label: L.value, icon: "lucide:download" }), n.importProps !== !1 && e.push({ value: "import", label: X.value, icon: "lucide:upload" }), e;
|
|
179
|
+
}), M = x(null), xe = x(null), A = x(!1), U = x(!1), ye = (e) => {
|
|
180
|
+
e.value === "export" ? A.value = !0 : e.value === "import" && (U.value = !0);
|
|
181
|
+
}, pe = o(() => n.exportSchema ? n.exportSchema.map((e) => ({
|
|
182
|
+
field: e.name || e.field,
|
|
183
|
+
title: e.label || e.title || e.name || e.field
|
|
184
|
+
})) : []), we = o(() => n.importSchema ? n.importSchema.map((e) => ({
|
|
185
|
+
field: e.name || e.field,
|
|
186
|
+
title: e.label || e.title || e.name || e.field,
|
|
187
|
+
required: e.required || !1
|
|
188
|
+
})) : []), be = async (e) => P?.services?.importApi && n.importType ? await P.services.importApi(n.importType, e) : (console.warn(
|
|
189
|
+
"VLite Screen: No importApi configured or no importType provided for generic import."
|
|
190
|
+
), {
|
|
191
|
+
processed: e.data.length,
|
|
192
|
+
created: e.data.length,
|
|
193
|
+
updated: 0,
|
|
194
|
+
skipped: 0,
|
|
195
|
+
failed: 0,
|
|
196
|
+
errors: []
|
|
197
|
+
}), Be = () => {
|
|
198
|
+
C();
|
|
199
|
+
}, ke = o(() => n.exportMode || P?.exportData?.mode || "frontend"), Ce = async (e) => {
|
|
200
|
+
if (P?.services?.exportApi && n.exportType) {
|
|
201
|
+
const l = {
|
|
202
|
+
format: e,
|
|
203
|
+
search: S.value,
|
|
204
|
+
filter: T.value
|
|
205
|
+
};
|
|
206
|
+
await P.services.exportApi(n.exportType, l);
|
|
207
|
+
} else
|
|
208
|
+
console.warn(
|
|
209
|
+
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
210
|
+
);
|
|
211
|
+
};
|
|
212
|
+
return (e, l) => {
|
|
213
|
+
const Y = Pe("router-link");
|
|
214
|
+
return a(), c("div", Le, [
|
|
215
|
+
t.customHeader ? B(e.$slots, "custom-header", { key: 1 }) : (a(), c("div", {
|
|
156
216
|
key: 0,
|
|
157
|
-
class:
|
|
217
|
+
class: O([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
158
218
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
219
|
+
g("div", Me, [
|
|
220
|
+
B(e.$slots, "title", {}, () => [
|
|
221
|
+
Q.value ? (a(), c("div", Ue, [
|
|
222
|
+
g("h1", qe, f(Q.value), 1),
|
|
223
|
+
t.info || t.infoI18n ? (a(), s($e, {
|
|
224
|
+
key: 0,
|
|
225
|
+
content: t.info,
|
|
226
|
+
"content-i18n": t.infoI18n
|
|
227
|
+
}, {
|
|
228
|
+
default: d(() => [
|
|
229
|
+
u(R, {
|
|
230
|
+
icon: "lucide:info",
|
|
231
|
+
class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
|
|
232
|
+
})
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, ["content", "content-i18n"])) : m("", !0)
|
|
236
|
+
])) : m("", !0)
|
|
162
237
|
]),
|
|
163
|
-
|
|
164
|
-
|
|
238
|
+
B(e.$slots, "description", {}, () => [
|
|
239
|
+
G.value ? (a(), c("p", ze, f(G.value), 1)) : m("", !0)
|
|
165
240
|
])
|
|
166
241
|
]),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
242
|
+
g("div", He, [
|
|
243
|
+
g("div", Je, [
|
|
244
|
+
b.value.length > 0 ? (a(), s(v, {
|
|
170
245
|
key: 0,
|
|
171
246
|
variant: "outline",
|
|
172
247
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
173
248
|
icon: "lucide:trash-2",
|
|
174
|
-
title:
|
|
175
|
-
onClick: l[0] || (l[0] = (
|
|
176
|
-
}, null, 8, ["title"])) :
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
onClick: l[1] || (l[1] = (
|
|
180
|
-
class:
|
|
181
|
-
|
|
249
|
+
title: ie.value,
|
|
250
|
+
onClick: l[0] || (l[0] = (i) => N(b.value))
|
|
251
|
+
}, null, 8, ["title"])) : m("", !0),
|
|
252
|
+
t.table && t.list ? (a(), c("div", Ke, [
|
|
253
|
+
g("button", {
|
|
254
|
+
onClick: l[1] || (l[1] = (i) => I.value = "list"),
|
|
255
|
+
class: O(["p-1.5 rounded", [
|
|
256
|
+
w(I) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
182
257
|
]]),
|
|
183
|
-
title:
|
|
258
|
+
title: re.value
|
|
184
259
|
}, [
|
|
185
|
-
|
|
260
|
+
u(R, {
|
|
186
261
|
icon: "lucide:layout-grid",
|
|
187
262
|
class: "w-4 h-4"
|
|
188
263
|
})
|
|
189
|
-
], 10,
|
|
190
|
-
|
|
191
|
-
onClick: l[2] || (l[2] = (
|
|
192
|
-
class:
|
|
193
|
-
|
|
264
|
+
], 10, Qe),
|
|
265
|
+
g("button", {
|
|
266
|
+
onClick: l[2] || (l[2] = (i) => I.value = "table"),
|
|
267
|
+
class: O(["p-1.5 rounded", [
|
|
268
|
+
w(I) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
194
269
|
]]),
|
|
195
|
-
title:
|
|
270
|
+
title: de.value
|
|
196
271
|
}, [
|
|
197
|
-
|
|
272
|
+
u(R, {
|
|
198
273
|
icon: "lucide:list",
|
|
199
274
|
class: "w-4 h-4"
|
|
200
275
|
})
|
|
201
|
-
], 10,
|
|
202
|
-
])) :
|
|
203
|
-
|
|
204
|
-
|
|
276
|
+
], 10, Ge)
|
|
277
|
+
])) : m("", !0),
|
|
278
|
+
B(e.$slots, "before-search"),
|
|
279
|
+
t.showRefresh ? (a(), s(v, {
|
|
205
280
|
key: 2,
|
|
206
281
|
variant: "outline",
|
|
207
282
|
icon: "lucide:refresh-cw",
|
|
208
283
|
size: "lg",
|
|
209
284
|
class: "shrink-0 h-9! w-9!",
|
|
210
|
-
title:
|
|
211
|
-
disabled:
|
|
212
|
-
onClick:
|
|
213
|
-
}, null, 8, ["title", "disabled"])) :
|
|
214
|
-
|
|
285
|
+
title: se.value,
|
|
286
|
+
disabled: t.loading,
|
|
287
|
+
onClick: C
|
|
288
|
+
}, null, 8, ["title", "disabled"])) : m("", !0),
|
|
289
|
+
t.filterSchema && t.filterSchema.length > 0 ? (a(), s(Ae, {
|
|
215
290
|
key: 3,
|
|
216
|
-
schema:
|
|
217
|
-
type:
|
|
218
|
-
modelValue:
|
|
219
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
220
|
-
onChange:
|
|
221
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
222
|
-
|
|
223
|
-
|
|
291
|
+
schema: t.filterSchema,
|
|
292
|
+
type: t.filterType,
|
|
293
|
+
modelValue: T.value,
|
|
294
|
+
"onUpdate:modelValue": l[3] || (l[3] = (i) => T.value = i),
|
|
295
|
+
onChange: C
|
|
296
|
+
}, null, 8, ["schema", "type", "modelValue"])) : m("", !0),
|
|
297
|
+
t.canSearch ? (a(), c("div", We, [
|
|
298
|
+
u(Se, {
|
|
224
299
|
lazy: "",
|
|
225
|
-
modelValue:
|
|
226
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
300
|
+
modelValue: S.value,
|
|
301
|
+
"onUpdate:modelValue": l[4] || (l[4] = (i) => S.value = i),
|
|
227
302
|
icon: "lucide:search",
|
|
228
|
-
placeholder:
|
|
303
|
+
placeholder: ce.value,
|
|
229
304
|
variant: "outline",
|
|
230
305
|
class: "bg-background w-full",
|
|
231
306
|
"show-clear-button": !0
|
|
232
307
|
}, null, 8, ["modelValue", "placeholder"])
|
|
233
|
-
])) :
|
|
308
|
+
])) : m("", !0)
|
|
234
309
|
]),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
310
|
+
g("div", Xe, [
|
|
311
|
+
B(e.$slots, "actions", {}, () => [
|
|
312
|
+
t.addComponent ? (a(), s(z(t.addComponent), { key: 0 })) : t.canAdd ? (a(), c(D, { key: 1 }, [
|
|
313
|
+
t.addBtn ? (a(), c(D, { key: 0 }, [
|
|
314
|
+
t.addBtn.modal ? (a(), s(H, h({
|
|
240
315
|
key: 0,
|
|
241
|
-
body:
|
|
242
|
-
},
|
|
243
|
-
refetch:
|
|
244
|
-
data:
|
|
316
|
+
body: t.addBtn.modal
|
|
317
|
+
}, t.addBtn.modalProps, {
|
|
318
|
+
refetch: t.refetch,
|
|
319
|
+
data: t.data,
|
|
245
320
|
triggerClass: "w-full",
|
|
246
|
-
loading:
|
|
321
|
+
loading: t.loading
|
|
247
322
|
}), {
|
|
248
|
-
trigger:
|
|
249
|
-
|
|
323
|
+
trigger: d(() => [
|
|
324
|
+
u(v, h({
|
|
250
325
|
class: "w-full",
|
|
251
|
-
icon:
|
|
252
|
-
variant:
|
|
253
|
-
},
|
|
254
|
-
default:
|
|
255
|
-
|
|
326
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
327
|
+
variant: t.addBtn.variant || "primary"
|
|
328
|
+
}, t.addBtn.buttonProps), {
|
|
329
|
+
default: d(() => [
|
|
330
|
+
p(f(y.value), 1)
|
|
256
331
|
]),
|
|
257
332
|
_: 1
|
|
258
333
|
}, 16, ["icon", "variant"])
|
|
259
334
|
]),
|
|
260
335
|
_: 1
|
|
261
|
-
}, 16, ["body", "refetch", "data", "loading"])) :
|
|
336
|
+
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), s(Y, {
|
|
262
337
|
key: 1,
|
|
263
|
-
to:
|
|
338
|
+
to: t.addBtn.to,
|
|
264
339
|
class: "inline-flex w-full sm:w-auto"
|
|
265
340
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
|
|
341
|
+
default: d(() => [
|
|
342
|
+
u(v, h({
|
|
268
343
|
class: "w-full",
|
|
269
|
-
icon:
|
|
270
|
-
variant:
|
|
271
|
-
},
|
|
272
|
-
default:
|
|
273
|
-
|
|
344
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
345
|
+
variant: t.addBtn.variant || "primary"
|
|
346
|
+
}, t.addBtn.buttonProps), {
|
|
347
|
+
default: d(() => [
|
|
348
|
+
p(f(y.value), 1)
|
|
274
349
|
]),
|
|
275
350
|
_: 1
|
|
276
351
|
}, 16, ["icon", "variant"])
|
|
277
352
|
]),
|
|
278
353
|
_: 1
|
|
279
|
-
}, 8, ["to"])) :
|
|
354
|
+
}, 8, ["to"])) : t.addBtn.href ? (a(), c("a", {
|
|
280
355
|
key: 2,
|
|
281
|
-
href:
|
|
282
|
-
target:
|
|
356
|
+
href: t.addBtn.href,
|
|
357
|
+
target: t.addBtn.target,
|
|
283
358
|
class: "inline-flex w-full sm:w-auto"
|
|
284
359
|
}, [
|
|
285
|
-
|
|
360
|
+
u(v, h({
|
|
286
361
|
class: "w-full",
|
|
287
|
-
icon:
|
|
288
|
-
variant:
|
|
289
|
-
},
|
|
290
|
-
default:
|
|
291
|
-
|
|
362
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
363
|
+
variant: t.addBtn.variant || "primary"
|
|
364
|
+
}, t.addBtn.buttonProps), {
|
|
365
|
+
default: d(() => [
|
|
366
|
+
p(f(y.value), 1)
|
|
292
367
|
]),
|
|
293
368
|
_: 1
|
|
294
369
|
}, 16, ["icon", "variant"])
|
|
295
|
-
], 8,
|
|
370
|
+
], 8, Ye)) : (a(), s(v, h({
|
|
296
371
|
key: 3,
|
|
297
372
|
class: "w-full sm:w-auto",
|
|
298
|
-
icon:
|
|
299
|
-
variant:
|
|
300
|
-
},
|
|
301
|
-
onClick: l[5] || (l[5] = (
|
|
373
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
374
|
+
variant: t.addBtn.variant || "primary"
|
|
375
|
+
}, t.addBtn.buttonProps, {
|
|
376
|
+
onClick: l[5] || (l[5] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
302
377
|
}), {
|
|
303
|
-
default:
|
|
304
|
-
|
|
378
|
+
default: d(() => [
|
|
379
|
+
p(f(y.value), 1)
|
|
305
380
|
]),
|
|
306
381
|
_: 1
|
|
307
382
|
}, 16, ["icon", "variant"]))
|
|
308
|
-
], 64)) : (
|
|
383
|
+
], 64)) : (a(), s(v, {
|
|
309
384
|
key: 1,
|
|
310
385
|
class: "w-full sm:w-auto",
|
|
311
386
|
icon: "fluent:add-16-filled",
|
|
312
387
|
variant: "primary",
|
|
313
|
-
onClick: l[6] || (l[6] = (
|
|
388
|
+
onClick: l[6] || (l[6] = (i) => e.$emit("add"))
|
|
314
389
|
}, {
|
|
315
|
-
default:
|
|
316
|
-
|
|
390
|
+
default: d(() => [
|
|
391
|
+
p(f(y.value), 1)
|
|
317
392
|
]),
|
|
318
393
|
_: 1
|
|
319
394
|
}))
|
|
320
|
-
], 64)) :
|
|
395
|
+
], 64)) : m("", !0)
|
|
321
396
|
]),
|
|
322
|
-
|
|
397
|
+
W.value ? (a(), s(Ee, {
|
|
398
|
+
key: 0,
|
|
399
|
+
closeOnSelect: "",
|
|
400
|
+
position: "bottom-end",
|
|
401
|
+
options: ge.value,
|
|
402
|
+
onOnSelect: ye
|
|
403
|
+
}, {
|
|
404
|
+
trigger: d(() => [
|
|
405
|
+
u(v, {
|
|
406
|
+
variant: "outline",
|
|
407
|
+
icon: "lucide:more-vertical",
|
|
408
|
+
class: "px-2!",
|
|
409
|
+
title: w(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? w(r)("vlite.screen.moreOptions") : "More Options"
|
|
410
|
+
}, null, 8, ["title"])
|
|
411
|
+
]),
|
|
412
|
+
_: 1
|
|
413
|
+
}, 8, ["options"])) : m("", !0),
|
|
414
|
+
B(e.$slots, "after-add")
|
|
323
415
|
])
|
|
324
416
|
])
|
|
325
417
|
], 2)),
|
|
326
|
-
|
|
327
|
-
class:
|
|
418
|
+
g("div", {
|
|
419
|
+
class: O(["flex-1 w-full relative min-h-[300px]", t.containerClass])
|
|
328
420
|
}, [
|
|
329
|
-
!
|
|
330
|
-
|
|
331
|
-
title:
|
|
332
|
-
titleI18n:
|
|
333
|
-
description:
|
|
334
|
-
descriptionI18n:
|
|
335
|
-
icon:
|
|
421
|
+
!oe.value && !t.loading ? B(e.$slots, "empty", { key: 0 }, () => [
|
|
422
|
+
u(w(je), {
|
|
423
|
+
title: t.emptyTitle,
|
|
424
|
+
titleI18n: t.emptyTitleI18n,
|
|
425
|
+
description: t.emptyDescription,
|
|
426
|
+
descriptionI18n: t.emptyDescriptionI18n,
|
|
427
|
+
icon: t.emptyIcon
|
|
336
428
|
}, {
|
|
337
|
-
action:
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
429
|
+
action: d(() => [
|
|
430
|
+
t.addComponent ? (a(), s(z(t.addComponent), { key: 0 })) : t.canAdd ? (a(), c(D, { key: 1 }, [
|
|
431
|
+
t.addBtn ? (a(), c(D, { key: 0 }, [
|
|
432
|
+
t.addBtn.modal ? (a(), s(H, h({
|
|
341
433
|
key: 0,
|
|
342
|
-
body:
|
|
343
|
-
},
|
|
344
|
-
trigger:
|
|
345
|
-
|
|
346
|
-
icon:
|
|
347
|
-
variant:
|
|
434
|
+
body: t.addBtn.modal
|
|
435
|
+
}, t.addBtn.modalProps), {
|
|
436
|
+
trigger: d(() => [
|
|
437
|
+
u(v, h({
|
|
438
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
439
|
+
variant: t.addBtn.variant || "primary",
|
|
348
440
|
rounded: "full",
|
|
349
441
|
class: "px-6!"
|
|
350
|
-
},
|
|
351
|
-
default:
|
|
352
|
-
|
|
442
|
+
}, t.addBtn.buttonProps), {
|
|
443
|
+
default: d(() => [
|
|
444
|
+
p(f(y.value), 1)
|
|
353
445
|
]),
|
|
354
446
|
_: 1
|
|
355
447
|
}, 16, ["icon", "variant"])
|
|
356
448
|
]),
|
|
357
449
|
_: 1
|
|
358
|
-
}, 16, ["body"])) :
|
|
450
|
+
}, 16, ["body"])) : t.addBtn.to ? (a(), s(Y, {
|
|
359
451
|
key: 1,
|
|
360
|
-
to:
|
|
452
|
+
to: t.addBtn.to,
|
|
361
453
|
class: "inline-flex"
|
|
362
454
|
}, {
|
|
363
|
-
default:
|
|
364
|
-
|
|
365
|
-
icon:
|
|
366
|
-
variant:
|
|
367
|
-
},
|
|
368
|
-
default:
|
|
369
|
-
|
|
455
|
+
default: d(() => [
|
|
456
|
+
u(v, h({
|
|
457
|
+
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
458
|
+
variant: t.addBtn.variant || "outline"
|
|
459
|
+
}, t.addBtn.buttonProps), {
|
|
460
|
+
default: d(() => [
|
|
461
|
+
p(f(y.value), 1)
|
|
370
462
|
]),
|
|
371
463
|
_: 1
|
|
372
464
|
}, 16, ["icon", "variant"])
|
|
373
465
|
]),
|
|
374
466
|
_: 1
|
|
375
|
-
}, 8, ["to"])) :
|
|
467
|
+
}, 8, ["to"])) : t.addBtn.href ? (a(), c("a", {
|
|
376
468
|
key: 2,
|
|
377
|
-
href:
|
|
378
|
-
target:
|
|
469
|
+
href: t.addBtn.href,
|
|
470
|
+
target: t.addBtn.target,
|
|
379
471
|
class: "inline-flex"
|
|
380
472
|
}, [
|
|
381
|
-
|
|
382
|
-
icon:
|
|
383
|
-
variant:
|
|
384
|
-
},
|
|
385
|
-
default:
|
|
386
|
-
|
|
473
|
+
u(v, h({
|
|
474
|
+
icon: t.addBtn.icon || "lucide:plus",
|
|
475
|
+
variant: t.addBtn.variant || "outline"
|
|
476
|
+
}, t.addBtn.buttonProps), {
|
|
477
|
+
default: d(() => [
|
|
478
|
+
p(f(y.value), 1)
|
|
387
479
|
]),
|
|
388
480
|
_: 1
|
|
389
481
|
}, 16, ["icon", "variant"])
|
|
390
|
-
], 8,
|
|
482
|
+
], 8, Ze)) : (a(), s(v, h({
|
|
391
483
|
key: 3,
|
|
392
|
-
icon:
|
|
393
|
-
variant:
|
|
394
|
-
},
|
|
395
|
-
onClick: l[7] || (l[7] = (
|
|
484
|
+
icon: t.addBtn.icon || "lucide:plus",
|
|
485
|
+
variant: t.addBtn.variant || "outline"
|
|
486
|
+
}, t.addBtn.buttonProps, {
|
|
487
|
+
onClick: l[7] || (l[7] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
396
488
|
}), {
|
|
397
|
-
default:
|
|
398
|
-
|
|
489
|
+
default: d(() => [
|
|
490
|
+
p(f(y.value), 1)
|
|
399
491
|
]),
|
|
400
492
|
_: 1
|
|
401
493
|
}, 16, ["icon", "variant"]))
|
|
402
|
-
], 64)) : (
|
|
494
|
+
], 64)) : (a(), s(v, {
|
|
403
495
|
key: 1,
|
|
404
496
|
icon: "lucide:plus",
|
|
405
497
|
variant: "outline",
|
|
406
|
-
onClick: l[8] || (l[8] = (
|
|
498
|
+
onClick: l[8] || (l[8] = (i) => e.$emit("add"))
|
|
407
499
|
}, {
|
|
408
|
-
default:
|
|
409
|
-
|
|
500
|
+
default: d(() => [
|
|
501
|
+
p(f(y.value), 1)
|
|
410
502
|
]),
|
|
411
503
|
_: 1
|
|
412
504
|
}))
|
|
413
|
-
], 64)) :
|
|
505
|
+
], 64)) : m("", !0)
|
|
414
506
|
]),
|
|
415
507
|
_: 1
|
|
416
508
|
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
|
|
417
|
-
]) : (
|
|
418
|
-
|
|
509
|
+
]) : (a(), c(D, { key: 1 }, [
|
|
510
|
+
K.value ? (a(), s(z(K.value), {
|
|
419
511
|
key: 0,
|
|
420
|
-
data:
|
|
421
|
-
loading:
|
|
422
|
-
refetch:
|
|
423
|
-
selectedRows:
|
|
424
|
-
"onUpdate:selectedRows": l[9] || (l[9] = (
|
|
425
|
-
delete:
|
|
426
|
-
onDelete:
|
|
427
|
-
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (
|
|
512
|
+
data: t.data,
|
|
513
|
+
loading: t.loading,
|
|
514
|
+
refetch: t.refetch,
|
|
515
|
+
selectedRows: b.value,
|
|
516
|
+
"onUpdate:selectedRows": l[9] || (l[9] = (i) => b.value = i),
|
|
517
|
+
delete: N,
|
|
518
|
+
onDelete: ne
|
|
519
|
+
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), c("div", _e, f(he.value), 1))
|
|
428
520
|
], 64))
|
|
429
521
|
], 2),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
"current-page":
|
|
433
|
-
"total-pages":
|
|
434
|
-
"total-items":
|
|
435
|
-
},
|
|
436
|
-
onChange:
|
|
437
|
-
"onUpdate:itemsPerPage":
|
|
522
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), c("div", et, [
|
|
523
|
+
u(w(Ve), h({
|
|
524
|
+
"current-page": t.pageInfo.currentPage,
|
|
525
|
+
"total-pages": t.pageInfo.totalPages,
|
|
526
|
+
"total-items": t.pageInfo.totalItems
|
|
527
|
+
}, t.paginationProps, {
|
|
528
|
+
onChange: ae,
|
|
529
|
+
"onUpdate:itemsPerPage": le
|
|
438
530
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
439
|
-
])) :
|
|
440
|
-
|
|
441
|
-
show:
|
|
442
|
-
"onUpdate:show": l[10] || (l[10] = (
|
|
443
|
-
title:
|
|
444
|
-
description:
|
|
445
|
-
"confirm-text":
|
|
446
|
-
"cancel-text":
|
|
531
|
+
])) : m("", !0),
|
|
532
|
+
u(Te, {
|
|
533
|
+
show: $.value,
|
|
534
|
+
"onUpdate:show": l[10] || (l[10] = (i) => $.value = i),
|
|
535
|
+
title: ue.value,
|
|
536
|
+
description: fe.value,
|
|
537
|
+
"confirm-text": me.value,
|
|
538
|
+
"cancel-text": ve.value,
|
|
447
539
|
variant: "danger",
|
|
448
|
-
onConfirm:
|
|
449
|
-
onCancel: l[11] || (l[11] = (
|
|
450
|
-
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
|
|
540
|
+
onConfirm: te,
|
|
541
|
+
onCancel: l[11] || (l[11] = (i) => $.value = !1)
|
|
542
|
+
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
543
|
+
A.value ? (a(), s(H, {
|
|
544
|
+
key: 3,
|
|
545
|
+
show: A.value,
|
|
546
|
+
"onUpdate:show": l[12] || (l[12] = (i) => A.value = i),
|
|
547
|
+
title: L.value,
|
|
548
|
+
"max-width": "sm:max-w-[400px]"
|
|
549
|
+
}, {
|
|
550
|
+
default: d(({ close: i }) => [
|
|
551
|
+
u(Oe, h({
|
|
552
|
+
ref_key: "exportDataRef",
|
|
553
|
+
ref: M,
|
|
554
|
+
data: t.data || [],
|
|
555
|
+
fields: pe.value,
|
|
556
|
+
mode: ke.value,
|
|
557
|
+
"on-export": Ce
|
|
558
|
+
}, typeof t.exportProps == "object" ? t.exportProps : {}, {
|
|
559
|
+
title: L.value,
|
|
560
|
+
class: "hidden!"
|
|
561
|
+
}), null, 16, ["data", "fields", "mode", "title"]),
|
|
562
|
+
g("div", tt, [
|
|
563
|
+
g("h6", nt, f(w(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? w(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
|
|
564
|
+
g("div", at, [
|
|
565
|
+
(a(!0), c(D, null, Ie(M.value?.availableFormats || [
|
|
566
|
+
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
567
|
+
{ value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
|
|
568
|
+
{ value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
|
|
569
|
+
], (E) => (a(), s(v, {
|
|
570
|
+
key: E.value,
|
|
571
|
+
variant: "outline",
|
|
572
|
+
class: "w-full flex items-center justify-start gap-3 h-12",
|
|
573
|
+
onClick: (ot) => M.value?.exportData(E.value, i)
|
|
574
|
+
}, {
|
|
575
|
+
default: d(() => [
|
|
576
|
+
u(R, {
|
|
577
|
+
icon: E.icon,
|
|
578
|
+
class: "text-muted-foreground h-5 w-5"
|
|
579
|
+
}, null, 8, ["icon"]),
|
|
580
|
+
g("span", null, f(E.label), 1)
|
|
581
|
+
]),
|
|
582
|
+
_: 2
|
|
583
|
+
}, 1032, ["onClick"]))), 128))
|
|
584
|
+
])
|
|
585
|
+
])
|
|
586
|
+
]),
|
|
587
|
+
_: 1
|
|
588
|
+
}, 8, ["show", "title"])) : m("", !0),
|
|
589
|
+
W.value ? (a(), c("div", lt, [
|
|
590
|
+
u(Re, h({
|
|
591
|
+
show: U.value,
|
|
592
|
+
"onUpdate:show": l[13] || (l[13] = (i) => U.value = i),
|
|
593
|
+
ref_key: "importDataRef",
|
|
594
|
+
ref: xe,
|
|
595
|
+
fields: we.value,
|
|
596
|
+
processBatch: be,
|
|
597
|
+
onComplete: Be
|
|
598
|
+
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
599
|
+
title: X.value,
|
|
600
|
+
class: "hidden!"
|
|
601
|
+
}), null, 16, ["show", "fields", "title"])
|
|
602
|
+
])) : m("", !0)
|
|
451
603
|
]);
|
|
452
604
|
};
|
|
453
605
|
}
|
|
454
606
|
});
|
|
455
607
|
export {
|
|
456
|
-
|
|
608
|
+
Bt as default
|
|
457
609
|
};
|