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