vlite3 0.7.9 → 0.7.11
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.
|
@@ -108,7 +108,7 @@ const be = /* @__PURE__ */ K({
|
|
|
108
108
|
p
|
|
109
109
|
), q = m(() => {
|
|
110
110
|
const e = n.ignoreClickOutside || [], o = E(u.value);
|
|
111
|
-
return [.../* @__PURE__ */ new Set([...e, ...o])];
|
|
111
|
+
return [.../* @__PURE__ */ new Set([...e, ...o, ".tooltip-container"])];
|
|
112
112
|
});
|
|
113
113
|
T(
|
|
114
114
|
() => $.value,
|
|
@@ -25,6 +25,8 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
|
|
|
25
25
|
filterSchema: import('../Form').IForm[];
|
|
26
26
|
filterType: "modal" | "dropdown";
|
|
27
27
|
showRefresh: boolean;
|
|
28
|
+
viewProps: Record<string, any>;
|
|
29
|
+
canSelectRows: boolean;
|
|
28
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, any, any>;
|
|
29
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
32
|
export default _default;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as $e, useSlots as Ie, computed as i, ref as y, provide as z, watch as H, resolveComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as $e, useSlots as Ie, computed as i, ref as y, provide as z, watch as H, resolveComponent as Te, openBlock as a, createElementBlock as s, normalizeClass as A, createElementVNode as x, renderSlot as w, toDisplayString as m, createBlock as c, withCtx as d, createVNode as u, createCommentVNode as f, unref as p, resolveDynamicComponent as K, Fragment as P, mergeProps as v, createTextVNode as B, renderList as Ve } from "vue";
|
|
2
|
+
import Re from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import h from "../Button.vue.js";
|
|
5
5
|
import N from "../Icon.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import Ee from "../Tooltip.vue.js";
|
|
7
7
|
import J from "../Modal.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { usePersistentState as
|
|
16
|
-
import { useVLiteConfig as
|
|
8
|
+
import Oe from "../ConfirmationModal.vue.js";
|
|
9
|
+
import je from "../Pagination/Pagination.vue.js";
|
|
10
|
+
import Ae from "../Empty/Empty.vue.js";
|
|
11
|
+
import Ne from "./ScreenFilter.vue.js";
|
|
12
|
+
import Fe from "../Dropdown/Dropdown.vue.js";
|
|
13
|
+
import Le from "../ExportData/ExportData.vue.js";
|
|
14
|
+
import Me from "../ImportData/ImportData.vue.js";
|
|
15
|
+
import { usePersistentState as Ue } from "../../utils/usePersistentState.js";
|
|
16
|
+
import { useVLiteConfig as qe } from "../../core/config.js";
|
|
17
17
|
import { $t as r } from "../../utils/i18n.js";
|
|
18
|
-
import { SCREEN_CONTEXT_KEY as
|
|
19
|
-
const
|
|
18
|
+
import { SCREEN_CONTEXT_KEY as ze } from "../DataTable/types.js";
|
|
19
|
+
const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex-col shrink-0" }, Je = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "flex items-center! gap-2"
|
|
22
|
-
},
|
|
22
|
+
}, Qe = { class: "text-fs-7.5 font-bold text-foreground" }, Xe = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
|
|
25
|
-
},
|
|
25
|
+
}, Ye = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Ge = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, We = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "flex items-center p-1 rounded-md border border-border shrink-0"
|
|
28
|
-
},
|
|
28
|
+
}, Ze = ["title"], _e = ["title"], et = {
|
|
29
29
|
key: 4,
|
|
30
30
|
class: "w-full md:w-60! max-sm:order-last"
|
|
31
|
-
},
|
|
31
|
+
}, tt = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, lt = ["href", "target"], at = ["href", "target"], nt = {
|
|
32
32
|
key: 4,
|
|
33
33
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
34
|
-
},
|
|
34
|
+
}, ot = {
|
|
35
35
|
key: 2,
|
|
36
36
|
class: "-mt-2"
|
|
37
|
-
},
|
|
37
|
+
}, it = { class: "px-1 py-1 text-sm" }, rt = { class: "font-medium mb-3 text-muted-foreground" }, dt = { class: "space-y-3" }, st = { key: 4 }, It = /* @__PURE__ */ $e({
|
|
38
38
|
__name: "Screen",
|
|
39
39
|
props: {
|
|
40
40
|
name: { default: "" },
|
|
@@ -78,32 +78,34 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
78
78
|
filterType: { default: "modal" },
|
|
79
79
|
showRefresh: { type: Boolean, default: !1 },
|
|
80
80
|
containerClass: {},
|
|
81
|
-
headerClass: {}
|
|
81
|
+
headerClass: {},
|
|
82
|
+
viewProps: { default: () => ({}) },
|
|
83
|
+
canSelectRows: { type: Boolean, default: !0 }
|
|
82
84
|
},
|
|
83
85
|
emits: ["add", "delete"],
|
|
84
86
|
setup(t, { emit: te }) {
|
|
85
|
-
const l = t,
|
|
87
|
+
const l = t, S = qe(), Q = te, V = Ie(), le = i(() => l.name || l.title || "default-screen"), k = Ue(
|
|
86
88
|
`view-mode-${le.value}`,
|
|
87
89
|
l.table || V.table ? "table" : "list"
|
|
88
|
-
),
|
|
89
|
-
z(qe, {
|
|
90
|
+
), $ = y(""), R = y({}), X = y({ field: "", order: "" }), I = y(l.pageInfo?.currentPage || 1), F = y(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), g = y([]), E = y([]), T = y(!1), ae = {
|
|
90
91
|
disableSearch: !0,
|
|
91
|
-
forceSelectable:
|
|
92
|
+
forceSelectable: l.canSelectRows,
|
|
92
93
|
onTableChange: (e) => {
|
|
93
94
|
X.value = { field: e.sort.field, order: e.sort.order }, C();
|
|
94
95
|
}
|
|
95
|
-
}
|
|
96
|
+
};
|
|
97
|
+
z(ze, ae), z("screen-selected-rows", g), z("screen-request-delete", (e) => D(e));
|
|
96
98
|
const D = (e) => {
|
|
97
99
|
E.value = e, T.value = !0;
|
|
98
|
-
},
|
|
99
|
-
Q("delete", E.value), T.value = !1,
|
|
100
|
-
},
|
|
101
|
-
Q("delete", e),
|
|
100
|
+
}, ne = () => {
|
|
101
|
+
Q("delete", E.value), T.value = !1, g.value = [];
|
|
102
|
+
}, oe = (e) => {
|
|
103
|
+
Q("delete", e), g.value = [];
|
|
102
104
|
};
|
|
103
105
|
H(
|
|
104
106
|
() => l.pageInfo?.currentPage,
|
|
105
107
|
(e) => {
|
|
106
|
-
e && (
|
|
108
|
+
e && (I.value = e);
|
|
107
109
|
}
|
|
108
110
|
), H(
|
|
109
111
|
() => l.pageInfo?.itemsPerPage,
|
|
@@ -112,52 +114,52 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
112
114
|
}
|
|
113
115
|
);
|
|
114
116
|
let L = null;
|
|
115
|
-
H(
|
|
117
|
+
H($, () => {
|
|
116
118
|
L && clearTimeout(L), L = setTimeout(() => {
|
|
117
|
-
|
|
119
|
+
I.value = 1, C();
|
|
118
120
|
}, 300);
|
|
119
121
|
});
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
F.value = e,
|
|
122
|
+
const ie = (e) => {
|
|
123
|
+
I.value = e, C();
|
|
124
|
+
}, re = (e) => {
|
|
125
|
+
F.value = e, I.value = 1, C();
|
|
124
126
|
}, C = () => {
|
|
125
127
|
l.refetch && l.refetch({
|
|
126
|
-
pagination: { page:
|
|
127
|
-
search:
|
|
128
|
+
pagination: { page: I.value, limit: F.value },
|
|
129
|
+
search: $.value,
|
|
128
130
|
sort: { ...X.value },
|
|
129
131
|
filter: { ...R.value }
|
|
130
132
|
});
|
|
131
|
-
}, Y = i(() => k.value === "table" ? l.table || !!V.table : l.list || !!V.list || !!V.grid),
|
|
133
|
+
}, Y = i(() => k.value === "table" ? l.table || !!V.table : l.list || !!V.list || !!V.grid), de = i(() => l.data && l.data.length > 0), G = i(() => l.titleI18n ? r(l.titleI18n) : l.title), W = i(
|
|
132
134
|
() => l.descriptionI18n ? r(l.descriptionI18n) : l.description
|
|
133
|
-
),
|
|
135
|
+
), se = i(() => {
|
|
134
136
|
const e = r("vlite.screen.deleteSelected");
|
|
135
137
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
136
|
-
}),
|
|
138
|
+
}), ce = i(() => {
|
|
137
139
|
const e = r("vlite.screen.listView");
|
|
138
140
|
return e !== "vlite.screen.listView" ? e : "List View";
|
|
139
|
-
}),
|
|
141
|
+
}), ue = i(() => {
|
|
140
142
|
const e = r("vlite.screen.tableView");
|
|
141
143
|
return e !== "vlite.screen.tableView" ? e : "Table View";
|
|
142
|
-
}),
|
|
144
|
+
}), fe = i(() => {
|
|
143
145
|
const e = r("vlite.screen.refresh");
|
|
144
146
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
145
|
-
}),
|
|
147
|
+
}), me = i(() => {
|
|
146
148
|
const e = r("vlite.screen.searchPlaceholder");
|
|
147
149
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
148
|
-
}),
|
|
150
|
+
}), ve = i(() => {
|
|
149
151
|
const e = r("vlite.screen.confirmDeleteTitle");
|
|
150
152
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
151
|
-
}),
|
|
153
|
+
}), ge = i(() => {
|
|
152
154
|
const e = r("vlite.screen.confirmDeleteDesc", { count: E.value.length });
|
|
153
155
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${E.value.length > 1 ? "items" : "item"}?`;
|
|
154
|
-
}),
|
|
156
|
+
}), he = i(() => {
|
|
155
157
|
const e = r("vlite.screen.confirmDeleteBtn");
|
|
156
158
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
157
|
-
}),
|
|
159
|
+
}), ye = i(() => {
|
|
158
160
|
const e = r("vlite.screen.cancelBtn");
|
|
159
161
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
160
|
-
}),
|
|
162
|
+
}), xe = i(() => {
|
|
161
163
|
const e = r("vlite.screen.missingView");
|
|
162
164
|
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
|
|
163
165
|
}), b = i(() => {
|
|
@@ -173,23 +175,23 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
173
175
|
}), _ = i(() => {
|
|
174
176
|
const e = r("vlite.screen.importData");
|
|
175
177
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
176
|
-
}),
|
|
178
|
+
}), we = i(() => {
|
|
177
179
|
const e = [];
|
|
178
180
|
return l.exportProps !== !1 && e.push({ value: "export", label: M.value, icon: "lucide:download" }), l.importProps !== !1 && e.push({ value: "import", label: _.value, icon: "lucide:upload" }), e;
|
|
179
|
-
}), U = y(null),
|
|
181
|
+
}), U = y(null), pe = y(null), O = y(!1), q = y(!1), be = (e) => {
|
|
180
182
|
e.value === "export" ? O.value = !0 : e.value === "import" && (q.value = !0);
|
|
181
|
-
},
|
|
183
|
+
}, Be = i(
|
|
182
184
|
() => (l.exportSchema || []).map((e) => ({
|
|
183
185
|
field: e.name || e.field,
|
|
184
186
|
title: e.label || e.title || e.name || e.field
|
|
185
187
|
}))
|
|
186
|
-
),
|
|
188
|
+
), ke = i(
|
|
187
189
|
() => (l.importSchema || []).map((e) => ({
|
|
188
190
|
field: e.name || e.field,
|
|
189
191
|
title: e.label || e.title || e.name || e.field,
|
|
190
192
|
required: e.required || !1
|
|
191
193
|
}))
|
|
192
|
-
),
|
|
194
|
+
), Ce = async (e) => S?.services?.importApi && l.importType ? await S.services.importApi(l.importType, e) : (console.warn(
|
|
193
195
|
"VLite Screen: No importApi configured or no importType provided for generic import."
|
|
194
196
|
), {
|
|
195
197
|
processed: e.data.length,
|
|
@@ -198,29 +200,29 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
198
200
|
skipped: 0,
|
|
199
201
|
failed: 0,
|
|
200
202
|
errors: []
|
|
201
|
-
}),
|
|
202
|
-
() => l.exportMode ||
|
|
203
|
-
),
|
|
204
|
-
|
|
203
|
+
}), De = () => C(), Pe = i(
|
|
204
|
+
() => l.exportMode || S?.exportData?.mode || "frontend"
|
|
205
|
+
), Se = async (e) => {
|
|
206
|
+
S?.services?.exportApi && l.exportType ? await S.services.exportApi(l.exportType, {
|
|
205
207
|
format: e,
|
|
206
|
-
search:
|
|
208
|
+
search: $.value,
|
|
207
209
|
filter: R.value
|
|
208
210
|
}) : console.warn(
|
|
209
211
|
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
210
212
|
);
|
|
211
213
|
};
|
|
212
214
|
return (e, n) => {
|
|
213
|
-
const ee =
|
|
214
|
-
return a(), s("div",
|
|
215
|
+
const ee = Te("router-link");
|
|
216
|
+
return a(), s("div", He, [
|
|
215
217
|
t.customHeader ? w(e.$slots, "custom-header", { key: 1 }) : (a(), s("div", {
|
|
216
218
|
key: 0,
|
|
217
219
|
class: A([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
218
220
|
}, [
|
|
219
|
-
x("div",
|
|
221
|
+
x("div", Ke, [
|
|
220
222
|
w(e.$slots, "title", {}, () => [
|
|
221
|
-
G.value ? (a(), s("div",
|
|
222
|
-
x("h1",
|
|
223
|
-
t.info || t.infoI18n ? (a(), c(
|
|
223
|
+
G.value ? (a(), s("div", Je, [
|
|
224
|
+
x("h1", Qe, m(G.value), 1),
|
|
225
|
+
t.info || t.infoI18n ? (a(), c(Ee, {
|
|
224
226
|
key: 0,
|
|
225
227
|
content: t.info,
|
|
226
228
|
"content-i18n": t.infoI18n,
|
|
@@ -237,44 +239,44 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
237
239
|
])) : f("", !0)
|
|
238
240
|
]),
|
|
239
241
|
w(e.$slots, "description", {}, () => [
|
|
240
|
-
W.value ? (a(), s("p",
|
|
242
|
+
W.value ? (a(), s("p", Xe, m(W.value), 1)) : f("", !0)
|
|
241
243
|
])
|
|
242
244
|
]),
|
|
243
|
-
x("div",
|
|
244
|
-
x("div",
|
|
245
|
-
|
|
245
|
+
x("div", Ye, [
|
|
246
|
+
x("div", Ge, [
|
|
247
|
+
g.value.length > 0 && t.canSelectRows ? (a(), c(h, {
|
|
246
248
|
key: 0,
|
|
247
249
|
variant: "outline",
|
|
248
250
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
249
251
|
icon: "lucide:trash-2",
|
|
250
|
-
title:
|
|
251
|
-
onClick: n[0] || (n[0] = (o) => D(
|
|
252
|
+
title: se.value,
|
|
253
|
+
onClick: n[0] || (n[0] = (o) => D(g.value))
|
|
252
254
|
}, null, 8, ["title"])) : f("", !0),
|
|
253
|
-
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div",
|
|
255
|
+
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div", We, [
|
|
254
256
|
x("button", {
|
|
255
257
|
onClick: n[1] || (n[1] = (o) => k.value = "list"),
|
|
256
258
|
class: A(["p-1.5 rounded", [
|
|
257
259
|
p(k) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
258
260
|
]]),
|
|
259
|
-
title:
|
|
261
|
+
title: ce.value
|
|
260
262
|
}, [
|
|
261
263
|
u(N, {
|
|
262
264
|
icon: "lucide:layout-grid",
|
|
263
265
|
class: "w-4 h-4"
|
|
264
266
|
})
|
|
265
|
-
], 10,
|
|
267
|
+
], 10, Ze),
|
|
266
268
|
x("button", {
|
|
267
269
|
onClick: n[2] || (n[2] = (o) => k.value = "table"),
|
|
268
270
|
class: A(["p-1.5 rounded", [
|
|
269
271
|
p(k) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
270
272
|
]]),
|
|
271
|
-
title:
|
|
273
|
+
title: ue.value
|
|
272
274
|
}, [
|
|
273
275
|
u(N, {
|
|
274
276
|
icon: "lucide:list",
|
|
275
277
|
class: "w-4 h-4"
|
|
276
278
|
})
|
|
277
|
-
], 10,
|
|
279
|
+
], 10, _e)
|
|
278
280
|
])) : f("", !0),
|
|
279
281
|
w(e.$slots, "before-search"),
|
|
280
282
|
t.showRefresh ? (a(), c(h, {
|
|
@@ -283,11 +285,11 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
283
285
|
icon: "lucide:refresh-cw",
|
|
284
286
|
size: "lg",
|
|
285
287
|
class: "shrink-0 h-9! w-9!",
|
|
286
|
-
title:
|
|
288
|
+
title: fe.value,
|
|
287
289
|
disabled: t.loading,
|
|
288
290
|
onClick: C
|
|
289
291
|
}, null, 8, ["title", "disabled"])) : f("", !0),
|
|
290
|
-
t.filterSchema && t.filterSchema.length > 0 ? (a(), c(
|
|
292
|
+
t.filterSchema && t.filterSchema.length > 0 ? (a(), c(Ne, {
|
|
291
293
|
key: 3,
|
|
292
294
|
schema: t.filterSchema,
|
|
293
295
|
type: t.filterType,
|
|
@@ -295,24 +297,24 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
295
297
|
"onUpdate:modelValue": n[3] || (n[3] = (o) => R.value = o),
|
|
296
298
|
onChange: C
|
|
297
299
|
}, null, 8, ["schema", "type", "modelValue"])) : f("", !0),
|
|
298
|
-
t.canSearch ? (a(), s("div",
|
|
299
|
-
u(
|
|
300
|
+
t.canSearch ? (a(), s("div", et, [
|
|
301
|
+
u(Re, {
|
|
300
302
|
lazy: "",
|
|
301
|
-
modelValue:
|
|
302
|
-
"onUpdate:modelValue": n[4] || (n[4] = (o) =>
|
|
303
|
+
modelValue: $.value,
|
|
304
|
+
"onUpdate:modelValue": n[4] || (n[4] = (o) => $.value = o),
|
|
303
305
|
icon: "lucide:search",
|
|
304
|
-
placeholder:
|
|
306
|
+
placeholder: me.value,
|
|
305
307
|
variant: "outline",
|
|
306
308
|
class: "bg-background w-full",
|
|
307
309
|
"show-clear-button": !0
|
|
308
310
|
}, null, 8, ["modelValue", "placeholder"])
|
|
309
311
|
])) : f("", !0)
|
|
310
312
|
]),
|
|
311
|
-
x("div",
|
|
313
|
+
x("div", tt, [
|
|
312
314
|
w(e.$slots, "actions", {}, () => [
|
|
313
315
|
t.addComponent ? (a(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
|
|
314
316
|
t.addBtn ? (a(), s(P, { key: 0 }, [
|
|
315
|
-
t.addBtn.modal ? (a(), c(J,
|
|
317
|
+
t.addBtn.modal ? (a(), c(J, v({
|
|
316
318
|
key: 0,
|
|
317
319
|
body: t.addBtn.modal
|
|
318
320
|
}, t.addBtn.modalProps, {
|
|
@@ -322,7 +324,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
322
324
|
loading: t.loading
|
|
323
325
|
}), {
|
|
324
326
|
trigger: d(() => [
|
|
325
|
-
u(h,
|
|
327
|
+
u(h, v({
|
|
326
328
|
class: "w-full",
|
|
327
329
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
328
330
|
variant: t.addBtn.variant || "primary"
|
|
@@ -340,7 +342,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
340
342
|
class: "inline-flex w-full sm:w-auto"
|
|
341
343
|
}, {
|
|
342
344
|
default: d(() => [
|
|
343
|
-
u(h,
|
|
345
|
+
u(h, v({
|
|
344
346
|
class: "w-full",
|
|
345
347
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
346
348
|
variant: t.addBtn.variant || "primary"
|
|
@@ -358,7 +360,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
358
360
|
target: t.addBtn.target,
|
|
359
361
|
class: "inline-flex w-full sm:w-auto"
|
|
360
362
|
}, [
|
|
361
|
-
u(h,
|
|
363
|
+
u(h, v({
|
|
362
364
|
class: "w-full",
|
|
363
365
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
364
366
|
variant: t.addBtn.variant || "primary"
|
|
@@ -368,7 +370,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
368
370
|
]),
|
|
369
371
|
_: 1
|
|
370
372
|
}, 16, ["icon", "variant"])
|
|
371
|
-
], 8,
|
|
373
|
+
], 8, lt)) : (a(), c(h, v({
|
|
372
374
|
key: 3,
|
|
373
375
|
class: "w-full sm:w-auto",
|
|
374
376
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
@@ -384,12 +386,12 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
384
386
|
], 64)) : f("", !0)
|
|
385
387
|
], 64)) : f("", !0)
|
|
386
388
|
]),
|
|
387
|
-
Z.value ? (a(), c(
|
|
389
|
+
Z.value ? (a(), c(Fe, {
|
|
388
390
|
key: 0,
|
|
389
391
|
closeOnSelect: "",
|
|
390
392
|
position: "bottom-end",
|
|
391
|
-
options:
|
|
392
|
-
onOnSelect:
|
|
393
|
+
options: we.value,
|
|
394
|
+
onOnSelect: be
|
|
393
395
|
}, {
|
|
394
396
|
trigger: d(() => [
|
|
395
397
|
u(h, {
|
|
@@ -409,8 +411,8 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
409
411
|
x("div", {
|
|
410
412
|
class: A(["flex-1 w-full relative", t.containerClass])
|
|
411
413
|
}, [
|
|
412
|
-
!
|
|
413
|
-
u(p(
|
|
414
|
+
!de.value && !t.loading ? w(e.$slots, "empty", { key: 0 }, () => [
|
|
415
|
+
u(p(Ae), {
|
|
414
416
|
title: t.emptyTitle,
|
|
415
417
|
titleI18n: t.emptyTitleI18n,
|
|
416
418
|
description: t.emptyDescription,
|
|
@@ -420,12 +422,12 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
420
422
|
action: d(() => [
|
|
421
423
|
t.addComponent ? (a(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
|
|
422
424
|
t.addBtn ? (a(), s(P, { key: 0 }, [
|
|
423
|
-
t.addBtn.modal ? (a(), c(J,
|
|
425
|
+
t.addBtn.modal ? (a(), c(J, v({
|
|
424
426
|
key: 0,
|
|
425
427
|
body: t.addBtn.modal
|
|
426
428
|
}, t.addBtn.modalProps), {
|
|
427
429
|
trigger: d(() => [
|
|
428
|
-
u(h,
|
|
430
|
+
u(h, v({
|
|
429
431
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
430
432
|
variant: t.addBtn.variant || "primary",
|
|
431
433
|
rounded: "full",
|
|
@@ -444,7 +446,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
444
446
|
class: "inline-flex"
|
|
445
447
|
}, {
|
|
446
448
|
default: d(() => [
|
|
447
|
-
u(h,
|
|
449
|
+
u(h, v({
|
|
448
450
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
449
451
|
variant: t.addBtn.variant || "outline"
|
|
450
452
|
}, t.addBtn.buttonProps), {
|
|
@@ -461,7 +463,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
461
463
|
target: t.addBtn.target,
|
|
462
464
|
class: "inline-flex"
|
|
463
465
|
}, [
|
|
464
|
-
u(h,
|
|
466
|
+
u(h, v({
|
|
465
467
|
icon: t.addBtn.icon || "lucide:plus",
|
|
466
468
|
variant: t.addBtn.variant || "outline"
|
|
467
469
|
}, t.addBtn.buttonProps), {
|
|
@@ -470,7 +472,7 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
470
472
|
]),
|
|
471
473
|
_: 1
|
|
472
474
|
}, 16, ["icon", "variant"])
|
|
473
|
-
], 8,
|
|
475
|
+
], 8, at)) : (a(), c(h, v({
|
|
474
476
|
key: 3,
|
|
475
477
|
icon: t.addBtn.icon || "lucide:plus",
|
|
476
478
|
variant: t.addBtn.variant || "outline"
|
|
@@ -502,54 +504,54 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
502
504
|
key: 0,
|
|
503
505
|
data: t.data,
|
|
504
506
|
loading: t.loading,
|
|
505
|
-
selectedRows:
|
|
507
|
+
selectedRows: g.value,
|
|
506
508
|
delete: D,
|
|
507
|
-
updateSelectedRows: (o) =>
|
|
509
|
+
updateSelectedRows: (o) => g.value = o
|
|
508
510
|
}) : p(k) === "list" && e.$slots.list ? w(e.$slots, "list", {
|
|
509
511
|
key: 1,
|
|
510
512
|
data: t.data,
|
|
511
513
|
loading: t.loading,
|
|
512
|
-
selectedRows:
|
|
514
|
+
selectedRows: g.value,
|
|
513
515
|
delete: D,
|
|
514
|
-
updateSelectedRows: (o) =>
|
|
516
|
+
updateSelectedRows: (o) => g.value = o
|
|
515
517
|
}) : p(k) === "list" && e.$slots.grid ? w(e.$slots, "grid", {
|
|
516
518
|
key: 2,
|
|
517
519
|
data: t.data,
|
|
518
520
|
loading: t.loading,
|
|
519
|
-
selectedRows:
|
|
521
|
+
selectedRows: g.value,
|
|
520
522
|
delete: D,
|
|
521
|
-
updateSelectedRows: (o) =>
|
|
522
|
-
}) : Y.value ? (a(), c(K(Y.value), {
|
|
523
|
+
updateSelectedRows: (o) => g.value = o
|
|
524
|
+
}) : Y.value ? (a(), c(K(Y.value), v({
|
|
523
525
|
key: 3,
|
|
524
526
|
data: t.data,
|
|
525
527
|
loading: t.loading,
|
|
526
528
|
refetch: t.refetch,
|
|
527
|
-
selectedRows:
|
|
528
|
-
"onUpdate:selectedRows": n[8] || (n[8] = (o) =>
|
|
529
|
+
selectedRows: g.value,
|
|
530
|
+
"onUpdate:selectedRows": n[8] || (n[8] = (o) => g.value = o),
|
|
529
531
|
delete: D,
|
|
530
|
-
onDelete:
|
|
531
|
-
}, null,
|
|
532
|
+
onDelete: oe
|
|
533
|
+
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (a(), s("div", nt, m(xe.value), 1))
|
|
532
534
|
], 64))
|
|
533
535
|
], 2),
|
|
534
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div",
|
|
535
|
-
u(p(
|
|
536
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div", ot, [
|
|
537
|
+
u(p(je), v({
|
|
536
538
|
"current-page": t.pageInfo.currentPage,
|
|
537
539
|
"total-pages": t.pageInfo.totalPages,
|
|
538
540
|
"total-items": t.pageInfo.totalItems
|
|
539
541
|
}, t.paginationProps, {
|
|
540
|
-
onChange:
|
|
541
|
-
"onUpdate:itemsPerPage":
|
|
542
|
+
onChange: ie,
|
|
543
|
+
"onUpdate:itemsPerPage": re
|
|
542
544
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
543
545
|
])) : f("", !0),
|
|
544
|
-
u(
|
|
546
|
+
u(Oe, {
|
|
545
547
|
show: T.value,
|
|
546
548
|
"onUpdate:show": n[9] || (n[9] = (o) => T.value = o),
|
|
547
|
-
title:
|
|
548
|
-
description:
|
|
549
|
-
"confirm-text":
|
|
550
|
-
"cancel-text":
|
|
549
|
+
title: ve.value,
|
|
550
|
+
description: ge.value,
|
|
551
|
+
"confirm-text": he.value,
|
|
552
|
+
"cancel-text": ye.value,
|
|
551
553
|
variant: "danger",
|
|
552
|
-
onConfirm:
|
|
554
|
+
onConfirm: ne,
|
|
553
555
|
onCancel: n[10] || (n[10] = (o) => T.value = !1)
|
|
554
556
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
555
557
|
O.value ? (a(), c(J, {
|
|
@@ -560,21 +562,21 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
560
562
|
"max-width": "sm:max-w-[400px]"
|
|
561
563
|
}, {
|
|
562
564
|
default: d(({ close: o }) => [
|
|
563
|
-
u(
|
|
565
|
+
u(Le, v({
|
|
564
566
|
ref_key: "exportDataRef",
|
|
565
567
|
ref: U,
|
|
566
568
|
data: t.data || [],
|
|
567
|
-
fields:
|
|
568
|
-
mode:
|
|
569
|
-
"on-export":
|
|
569
|
+
fields: Be.value,
|
|
570
|
+
mode: Pe.value,
|
|
571
|
+
"on-export": Se
|
|
570
572
|
}, typeof t.exportProps == "object" ? t.exportProps : {}, {
|
|
571
573
|
title: M.value,
|
|
572
574
|
class: "hidden!"
|
|
573
575
|
}), null, 16, ["data", "fields", "mode", "title"]),
|
|
574
|
-
x("div",
|
|
575
|
-
x("h6",
|
|
576
|
-
x("div",
|
|
577
|
-
(a(!0), s(P, null,
|
|
576
|
+
x("div", it, [
|
|
577
|
+
x("h6", rt, m(p(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? p(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
|
|
578
|
+
x("div", dt, [
|
|
579
|
+
(a(!0), s(P, null, Ve(U.value?.availableFormats || [
|
|
578
580
|
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
579
581
|
{ value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
|
|
580
582
|
{ value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
|
|
@@ -598,15 +600,15 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
598
600
|
]),
|
|
599
601
|
_: 1
|
|
600
602
|
}, 8, ["show", "title"])) : f("", !0),
|
|
601
|
-
Z.value ? (a(), s("div",
|
|
602
|
-
u(
|
|
603
|
+
Z.value ? (a(), s("div", st, [
|
|
604
|
+
u(Me, v({
|
|
603
605
|
show: q.value,
|
|
604
606
|
"onUpdate:show": n[12] || (n[12] = (o) => q.value = o),
|
|
605
607
|
ref_key: "importDataRef",
|
|
606
|
-
ref:
|
|
607
|
-
fields:
|
|
608
|
-
processBatch:
|
|
609
|
-
onComplete:
|
|
608
|
+
ref: pe,
|
|
609
|
+
fields: ke.value,
|
|
610
|
+
processBatch: Ce,
|
|
611
|
+
onComplete: De
|
|
610
612
|
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
611
613
|
title: _.value,
|
|
612
614
|
class: "hidden!"
|
|
@@ -617,5 +619,5 @@ const ze = { class: "flex flex-col w-full space-y-8" }, He = { class: "flex flex
|
|
|
617
619
|
}
|
|
618
620
|
});
|
|
619
621
|
export {
|
|
620
|
-
|
|
622
|
+
It as default
|
|
621
623
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as r, computed as c, openBlock as l, createElementBlock as i, renderSlot as n, createBlock as p, unref as d, mergeProps as u, withCtx as a } from "vue";
|
|
2
|
-
import f from "v-tooltip-lite";
|
|
3
2
|
import "v-tooltip-lite/style.css";
|
|
3
|
+
import f from "v-tooltip-lite";
|
|
4
4
|
import { $t as m } from "../utils/i18n.js";
|
|
5
5
|
const y = {
|
|
6
6
|
key: 0,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A Vue 3 UI component library built with Tailwind CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.7.
|
|
6
|
+
"version": "0.7.11",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"module": "index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"scrollreveal": "^4.0.9",
|
|
49
49
|
"tailwindcss": "^4.1.18",
|
|
50
50
|
"v-datepicker-lite": "^0.1.6",
|
|
51
|
-
"v-tooltip-lite": "^0.2.
|
|
51
|
+
"v-tooltip-lite": "^0.2.6",
|
|
52
52
|
"vue-carousel-lite": "^0.2.7",
|
|
53
53
|
"vue-draggable-plus": "^0.5.3",
|
|
54
54
|
"vue3-google-signin": "^2.1.1",
|