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