vlite3 0.3.7 → 0.4.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/Button.vue.js +35 -29
- package/components/ConfirmationModal.vue.js +30 -24
- package/components/DataList/DataList.vue.js +44 -52
- package/components/DataTable/DataTable.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.js +155 -159
- package/components/Empty/Empty.vue.d.ts +27 -0
- package/components/Empty/Empty.vue.js +33 -0
- package/components/Empty/Empty.vue2.js +4 -0
- package/components/Empty/index.d.ts +1 -0
- package/components/Form/composables/useForm.js +107 -93
- package/components/Form/types.d.ts +2 -0
- package/components/Form/utils/form.utils.d.ts +1 -0
- package/components/Form/utils/form.utils.js +17 -15
- package/components/Screen/Screen.vue.js +147 -143
- package/components/Screen/types.d.ts +2 -0
- package/package.json +1 -1
- package/style.css +6 -3
- package/types/button.d.ts +3 -3
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as ae, ref as g, computed as w, watch as h, openBlock as n, createElementBlock as i, createBlock as B, normalizeClass as C, createSlots as N, withCtx as S, renderSlot as I, createCommentVNode as $, createElementVNode as d, createVNode as F, Fragment as T, renderList as x, normalizeStyle as V, mergeProps as j, unref as O } from "vue";
|
|
2
|
+
import le from "../CheckBox.vue.js";
|
|
3
|
+
import oe from "../Button.vue.js";
|
|
4
|
+
import se from "../ConfirmationModal.vue.js";
|
|
5
|
+
import ne from "../Pagination/Pagination.vue.js";
|
|
6
|
+
import re from "../Empty/Empty.vue.js";
|
|
7
|
+
import ie from "./DataTableHeader.vue.js";
|
|
8
|
+
import de from "./DataTableRow.vue.js";
|
|
9
|
+
import ce from "./DataTableToolbar.vue.js";
|
|
10
|
+
const ue = { class: "space-y-6.5" }, fe = { class: "overflow-x-auto w-full" }, me = { class: "hover:bg-transparent" }, he = {
|
|
11
11
|
key: 0,
|
|
12
12
|
scope: "col",
|
|
13
13
|
class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
|
|
14
14
|
style: { width: "48px" }
|
|
15
|
-
},
|
|
15
|
+
}, ve = { class: "flex items-center justify-center" }, ge = { class: "[&_tr:last-child]:border-0" }, be = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
18
18
|
style: { width: "48px" }
|
|
19
|
-
},
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "mt-4"
|
|
22
|
-
}, $e = { key: 1 }, Ae = /* @__PURE__ */ le({
|
|
19
|
+
}, ye = { key: 2 }, we = ["colspan"], pe = { key: 1 }, Fe = /* @__PURE__ */ ae({
|
|
23
20
|
__name: "DataTable",
|
|
24
21
|
props: {
|
|
25
22
|
rows: { default: () => [] },
|
|
@@ -55,20 +52,20 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
|
|
|
55
52
|
variant: { default: "default" }
|
|
56
53
|
},
|
|
57
54
|
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
58
|
-
setup(
|
|
55
|
+
setup(a, { emit: L }) {
|
|
59
56
|
const W = (e, t) => {
|
|
60
57
|
if (!(!e || !t))
|
|
61
|
-
return t.includes(".") ? t.split(".").reduce((
|
|
62
|
-
}, c = (e, t) => W(e, t),
|
|
63
|
-
|
|
64
|
-
), v = g(
|
|
58
|
+
return t.includes(".") ? t.split(".").reduce((o, u) => o?.[u], e) : e[t];
|
|
59
|
+
}, c = (e, t) => W(e, t), l = a, b = L, r = g({ field: "", order: "" }), p = g(
|
|
60
|
+
l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10
|
|
61
|
+
), v = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), k = g(!1), P = g("initial"), q = w(() => l.loading);
|
|
65
62
|
h(
|
|
66
|
-
() =>
|
|
63
|
+
() => l.loading,
|
|
67
64
|
(e, t) => {
|
|
68
|
-
!e && t && (
|
|
65
|
+
!e && t && (P.value = "idle");
|
|
69
66
|
}
|
|
70
67
|
), h(
|
|
71
|
-
() =>
|
|
68
|
+
() => l.search,
|
|
72
69
|
(e) => {
|
|
73
70
|
e !== void 0 && e !== y.value && (y.value = e);
|
|
74
71
|
}
|
|
@@ -76,263 +73,262 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
|
|
|
76
73
|
let z = null;
|
|
77
74
|
h(y, (e) => {
|
|
78
75
|
z && clearTimeout(z), z = setTimeout(() => {
|
|
79
|
-
v.value = 1,
|
|
76
|
+
v.value = 1, P.value = "search", R();
|
|
80
77
|
}, 300);
|
|
81
78
|
}), h(
|
|
82
|
-
() =>
|
|
79
|
+
() => l.pageInfo?.itemsPerPage,
|
|
83
80
|
(e) => {
|
|
84
|
-
e !== void 0 && (
|
|
81
|
+
e !== void 0 && (p.value = e);
|
|
85
82
|
}
|
|
86
83
|
), h(
|
|
87
|
-
() =>
|
|
84
|
+
() => l.paginationProps?.itemsPerPage,
|
|
88
85
|
(e) => {
|
|
89
|
-
e !== void 0 && (
|
|
86
|
+
e !== void 0 && (p.value = e);
|
|
90
87
|
}
|
|
91
88
|
), h(
|
|
92
|
-
() =>
|
|
89
|
+
() => l.pageInfo?.currentPage,
|
|
93
90
|
(e) => {
|
|
94
91
|
e && (v.value = e);
|
|
95
92
|
}
|
|
96
93
|
);
|
|
97
|
-
const
|
|
94
|
+
const A = (e) => c(e, l.keyField), s = g(/* @__PURE__ */ new Set());
|
|
98
95
|
h(
|
|
99
|
-
() =>
|
|
96
|
+
() => l.selectedRows,
|
|
100
97
|
(e) => {
|
|
101
|
-
const t = new Set((e || []).map((
|
|
102
|
-
(t.size !==
|
|
98
|
+
const t = new Set((e || []).map((o) => c(o, l.keyField)));
|
|
99
|
+
(t.size !== s.value.size || [...t].some((o) => !s.value.has(o))) && (s.value = t);
|
|
103
100
|
},
|
|
104
101
|
{ immediate: !0, deep: !0 }
|
|
105
102
|
);
|
|
106
|
-
const D = w(() =>
|
|
107
|
-
const e = [...
|
|
108
|
-
return e.forEach((
|
|
103
|
+
const D = w(() => l.rows.length === 0 ? !1 : l.rows.every((e) => s.value.has(c(e, l.keyField)))), M = w(() => s.value.size > 0 && !D.value), G = w(() => {
|
|
104
|
+
const e = [...l.selectedRows || [], ...l.rows], t = /* @__PURE__ */ new Map();
|
|
105
|
+
return e.forEach((o) => t.set(c(o, l.keyField), o)), Array.from(s.value).map((o) => t.get(o)).filter(Boolean);
|
|
109
106
|
}), H = (e) => {
|
|
110
|
-
e ?
|
|
107
|
+
e ? l.rows.forEach((t) => s.value.add(c(t, l.keyField))) : s.value.size > 0 && l.rows.forEach((t) => s.value.delete(c(t, l.keyField))), U();
|
|
111
108
|
}, J = (e) => {
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
const e =
|
|
115
|
-
|
|
116
|
-
const m = c(f,
|
|
117
|
-
|
|
109
|
+
s.value.has(e) ? s.value.delete(e) : s.value.add(e), U();
|
|
110
|
+
}, U = () => {
|
|
111
|
+
const e = l.selectedRows || [], t = /* @__PURE__ */ new Set(), o = [];
|
|
112
|
+
l.rows.forEach((f) => {
|
|
113
|
+
const m = c(f, l.keyField);
|
|
114
|
+
s.value.has(m) && (o.push(f), t.add(m));
|
|
118
115
|
}), e.forEach((f) => {
|
|
119
|
-
const m = c(f,
|
|
120
|
-
!t.has(m) &&
|
|
116
|
+
const m = c(f, l.keyField);
|
|
117
|
+
!t.has(m) && s.value.has(m) && (o.push(f), t.add(m));
|
|
121
118
|
});
|
|
122
119
|
const u = {
|
|
123
|
-
selected:
|
|
120
|
+
selected: o,
|
|
124
121
|
all: D.value,
|
|
125
|
-
indeterminate:
|
|
122
|
+
indeterminate: M.value
|
|
126
123
|
};
|
|
127
|
-
b("select", u), b("update:selectedRows",
|
|
124
|
+
b("select", u), b("update:selectedRows", o);
|
|
128
125
|
}, K = (e) => {
|
|
129
|
-
|
|
126
|
+
r.value.field === e ? r.value.order === "asc" ? r.value.order = "desc" : r.value.order === "desc" ? (r.value.order = "", r.value.field = "") : r.value.order = "asc" : (r.value.field = e, r.value.order = "asc"), v.value = 1, P.value = "sort", R();
|
|
130
127
|
}, Q = (e) => {
|
|
131
|
-
v.value = e,
|
|
128
|
+
v.value = e, P.value = "page", R();
|
|
132
129
|
}, X = (e) => {
|
|
133
|
-
|
|
130
|
+
p.value = e, v.value = 1, P.value = "limit", b("update:itemsPerPage", e), R();
|
|
134
131
|
}, Y = (e) => {
|
|
135
132
|
b("rowClick", e);
|
|
136
133
|
}, Z = () => {
|
|
137
134
|
const e = G.value;
|
|
138
|
-
b("delete", e),
|
|
135
|
+
b("delete", e), k.value = !1;
|
|
139
136
|
};
|
|
140
137
|
let E = null;
|
|
141
|
-
const
|
|
138
|
+
const R = () => {
|
|
142
139
|
E && clearTimeout(E), E = setTimeout(() => {
|
|
143
140
|
b("change", {
|
|
144
141
|
pagination: {
|
|
145
142
|
page: v.value,
|
|
146
|
-
limit:
|
|
143
|
+
limit: p.value
|
|
147
144
|
},
|
|
148
|
-
sorting: { ...
|
|
145
|
+
sorting: { ...r.value },
|
|
149
146
|
search: y.value
|
|
150
147
|
});
|
|
151
148
|
}, 10);
|
|
152
149
|
}, _ = w(() => [
|
|
153
150
|
"w-full flex flex-col",
|
|
154
|
-
|
|
151
|
+
l.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
|
|
155
152
|
"overflow-hidden",
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
].join(" ")), ee = w(() => ["w-full caption-bottom -text-fs-1",
|
|
153
|
+
l.bordered ? "border border-border" : "",
|
|
154
|
+
l.class
|
|
155
|
+
].join(" ")), ee = w(() => ["w-full caption-bottom -text-fs-1", l.tableClass].join(" ")), te = (e) => e.width ? e.width : "auto";
|
|
159
156
|
return h(
|
|
160
|
-
() =>
|
|
157
|
+
() => l.rows,
|
|
161
158
|
() => {
|
|
162
|
-
const e = new Set(
|
|
163
|
-
|
|
159
|
+
const e = new Set(l.rows.map((t) => c(t, l.keyField)));
|
|
160
|
+
s.value = new Set([...s.value].filter((t) => e.has(t)));
|
|
164
161
|
}
|
|
165
|
-
), (e, t) => (n(), i("div",
|
|
166
|
-
|
|
162
|
+
), (e, t) => (n(), i("div", ue, [
|
|
163
|
+
a.showSearch || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (n(), B(ce, {
|
|
167
164
|
key: 0,
|
|
168
165
|
modelValue: y.value,
|
|
169
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
170
|
-
"show-search":
|
|
171
|
-
placeholder:
|
|
172
|
-
class:
|
|
173
|
-
"search-class":
|
|
174
|
-
},
|
|
166
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => y.value = o),
|
|
167
|
+
"show-search": a.showSearch,
|
|
168
|
+
placeholder: a.searchPlaceholder,
|
|
169
|
+
class: C(a.toolbarClass),
|
|
170
|
+
"search-class": a.toolbarSearchClass
|
|
171
|
+
}, N({ _: 2 }, [
|
|
175
172
|
e.$slots?.["toolbar-left"] ? {
|
|
176
173
|
name: "left",
|
|
177
|
-
fn:
|
|
178
|
-
|
|
174
|
+
fn: S(() => [
|
|
175
|
+
I(e.$slots, "toolbar-left")
|
|
179
176
|
]),
|
|
180
177
|
key: "0"
|
|
181
178
|
} : void 0,
|
|
182
|
-
|
|
179
|
+
s.value.size > 0 ? {
|
|
183
180
|
name: "delete",
|
|
184
|
-
fn:
|
|
185
|
-
|
|
181
|
+
fn: S(() => [
|
|
182
|
+
s.value.size > 0 ? (n(), B(oe, {
|
|
186
183
|
key: 0,
|
|
187
184
|
rounded: "full",
|
|
188
185
|
variant: "outline",
|
|
189
186
|
size: "lg",
|
|
190
187
|
icon: "lucide:trash-2",
|
|
191
|
-
onClick: t[0] || (t[0] = (
|
|
192
|
-
})) :
|
|
188
|
+
onClick: t[0] || (t[0] = (o) => k.value = !0)
|
|
189
|
+
})) : $("", !0)
|
|
193
190
|
]),
|
|
194
191
|
key: "1"
|
|
195
192
|
} : void 0,
|
|
196
193
|
e.$slots?.["toolbar-right"] ? {
|
|
197
194
|
name: "right",
|
|
198
|
-
fn:
|
|
199
|
-
|
|
195
|
+
fn: S(() => [
|
|
196
|
+
I(e.$slots, "toolbar-right")
|
|
200
197
|
]),
|
|
201
198
|
key: "2"
|
|
202
199
|
} : void 0
|
|
203
|
-
]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"])) :
|
|
204
|
-
|
|
205
|
-
class:
|
|
200
|
+
]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"])) : $("", !0),
|
|
201
|
+
d("div", {
|
|
202
|
+
class: C(_.value)
|
|
206
203
|
}, [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
class:
|
|
204
|
+
d("div", fe, [
|
|
205
|
+
d("table", {
|
|
206
|
+
class: C([ee.value, "data-table"])
|
|
210
207
|
}, [
|
|
211
|
-
|
|
212
|
-
class:
|
|
208
|
+
d("thead", {
|
|
209
|
+
class: C([
|
|
213
210
|
"[&_tr]:border-b [&_tr]:border-border bg-muted",
|
|
214
|
-
|
|
211
|
+
a.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
215
212
|
])
|
|
216
213
|
}, [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
F(
|
|
214
|
+
d("tr", me, [
|
|
215
|
+
a.selectable ? (n(), i("th", he, [
|
|
216
|
+
d("div", ve, [
|
|
217
|
+
F(le, {
|
|
221
218
|
"model-value": D.value,
|
|
222
|
-
indeterminate:
|
|
219
|
+
indeterminate: M.value,
|
|
223
220
|
size: "xs",
|
|
224
221
|
"onUpdate:modelValue": H
|
|
225
222
|
}, null, 8, ["model-value", "indeterminate"])
|
|
226
223
|
])
|
|
227
|
-
])) :
|
|
228
|
-
(n(!0), i(T, null,
|
|
229
|
-
key:
|
|
230
|
-
header:
|
|
231
|
-
"sort-config":
|
|
232
|
-
compact:
|
|
233
|
-
"table-sortable":
|
|
224
|
+
])) : $("", !0),
|
|
225
|
+
(n(!0), i(T, null, x(a.headers, (o) => (n(), B(ie, {
|
|
226
|
+
key: o.field,
|
|
227
|
+
header: o,
|
|
228
|
+
"sort-config": r.value,
|
|
229
|
+
compact: a.compact,
|
|
230
|
+
"table-sortable": a.sortable,
|
|
234
231
|
onSort: K,
|
|
235
232
|
class: "last:pr-5!",
|
|
236
|
-
style:
|
|
237
|
-
width: te(
|
|
233
|
+
style: V({
|
|
234
|
+
width: te(o)
|
|
238
235
|
})
|
|
239
236
|
}, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
|
|
240
237
|
])
|
|
241
238
|
], 2),
|
|
242
|
-
|
|
243
|
-
q.value ? (n(!0), i(T, { key: 0 },
|
|
244
|
-
key: "skeleton-" +
|
|
239
|
+
d("tbody", ge, [
|
|
240
|
+
q.value ? (n(!0), i(T, { key: 0 }, x(Math.min(p.value, 15), (o) => (n(), i("tr", {
|
|
241
|
+
key: "skeleton-" + o,
|
|
245
242
|
class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
246
243
|
}, [
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
a.selectable ? (n(), i("td", be, [...t[4] || (t[4] = [
|
|
245
|
+
d("div", { class: "flex items-center justify-center" }, [
|
|
246
|
+
d("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
250
247
|
], -1)
|
|
251
|
-
])])) :
|
|
252
|
-
(n(!0), i(T, null,
|
|
248
|
+
])])) : $("", !0),
|
|
249
|
+
(n(!0), i(T, null, x(a.headers, (u) => (n(), i("td", {
|
|
253
250
|
key: u.field,
|
|
254
|
-
class:
|
|
251
|
+
class: C(["p-5! align-middle last:pr-6!", [u.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
255
252
|
}, [
|
|
256
|
-
|
|
253
|
+
d("div", {
|
|
257
254
|
class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
|
|
258
|
-
style:
|
|
255
|
+
style: V({
|
|
259
256
|
width: `${50 + Math.random() * 40}%`
|
|
260
257
|
})
|
|
261
258
|
}, null, 4)
|
|
262
259
|
], 2))), 128))
|
|
263
|
-
]))), 128)) :
|
|
264
|
-
key:
|
|
265
|
-
row:
|
|
266
|
-
headers:
|
|
260
|
+
]))), 128)) : a.rows.length > 0 ? (n(!0), i(T, { key: 1 }, x(a.rows, (o, u) => (n(), B(de, {
|
|
261
|
+
key: A(o),
|
|
262
|
+
row: o,
|
|
263
|
+
headers: a.headers,
|
|
267
264
|
index: u,
|
|
268
|
-
"key-field":
|
|
269
|
-
selectable:
|
|
270
|
-
"is-selected":
|
|
271
|
-
hoverable:
|
|
272
|
-
striped:
|
|
273
|
-
compact:
|
|
265
|
+
"key-field": a.keyField,
|
|
266
|
+
selectable: a.selectable,
|
|
267
|
+
"is-selected": s.value.has(A(o)),
|
|
268
|
+
hoverable: a.hoverable,
|
|
269
|
+
striped: a.striped,
|
|
270
|
+
compact: a.compact,
|
|
274
271
|
onSelect: J,
|
|
275
272
|
onRowClick: Y,
|
|
276
273
|
class: "[&_td:last-child]:pr-3.5!"
|
|
277
|
-
},
|
|
278
|
-
|
|
274
|
+
}, N({ _: 2 }, [
|
|
275
|
+
x(a.headers, (f) => ({
|
|
279
276
|
name: f.field,
|
|
280
|
-
fn:
|
|
281
|
-
|
|
277
|
+
fn: S((m) => [
|
|
278
|
+
I(e.$slots, f.field, j({ ref_for: !0 }, m))
|
|
282
279
|
])
|
|
283
280
|
}))
|
|
284
|
-
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr",
|
|
285
|
-
|
|
286
|
-
colspan:
|
|
287
|
-
class: "
|
|
281
|
+
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", ye, [
|
|
282
|
+
d("td", {
|
|
283
|
+
colspan: a.selectable ? a.headers.length + 1 : a.headers.length,
|
|
284
|
+
class: "align-middle hover:bg-transparent"
|
|
288
285
|
}, [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
])) : p("", !0)
|
|
286
|
+
I(e.$slots, "empty", {}, () => [
|
|
287
|
+
F(O(re), {
|
|
288
|
+
title: a.emptyTitle,
|
|
289
|
+
description: a.emptyDescription,
|
|
290
|
+
icon: a.emptyIcon,
|
|
291
|
+
class: "border-none! bg-transparent! py-16!"
|
|
292
|
+
}, N({ _: 2 }, [
|
|
293
|
+
e.$slots["empty-action"] ? {
|
|
294
|
+
name: "action",
|
|
295
|
+
fn: S(() => [
|
|
296
|
+
I(e.$slots, "empty-action")
|
|
297
|
+
]),
|
|
298
|
+
key: "0"
|
|
299
|
+
} : void 0
|
|
300
|
+
]), 1032, ["title", "description", "icon"])
|
|
305
301
|
])
|
|
306
|
-
], 8,
|
|
302
|
+
], 8, we)
|
|
307
303
|
]))
|
|
308
304
|
])
|
|
309
305
|
], 2)
|
|
310
306
|
])
|
|
311
307
|
], 2),
|
|
312
|
-
|
|
313
|
-
F(
|
|
308
|
+
a.showPagination && a.pageInfo && a.pageInfo.totalPages > 1 ? (n(), i("div", pe, [
|
|
309
|
+
F(O(ne), j({
|
|
314
310
|
"current-page": v.value,
|
|
315
|
-
"total-pages":
|
|
316
|
-
"total-items":
|
|
317
|
-
},
|
|
311
|
+
"total-pages": a.pageInfo.totalPages,
|
|
312
|
+
"total-items": a.pageInfo.totalItems
|
|
313
|
+
}, a.paginationProps, {
|
|
318
314
|
onChange: Q,
|
|
319
315
|
"onUpdate:itemsPerPage": X
|
|
320
316
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
321
|
-
])) :
|
|
322
|
-
F(
|
|
323
|
-
show:
|
|
324
|
-
"onUpdate:show": t[2] || (t[2] = (
|
|
317
|
+
])) : $("", !0),
|
|
318
|
+
F(se, {
|
|
319
|
+
show: k.value,
|
|
320
|
+
"onUpdate:show": t[2] || (t[2] = (o) => k.value = o),
|
|
325
321
|
title: "Confirm Deletion",
|
|
326
322
|
description: "Are you sure you want to delete the selected items?",
|
|
327
323
|
"confirm-text": "Delete",
|
|
328
324
|
"cancel-text": "Cancel",
|
|
329
325
|
variant: "danger",
|
|
330
326
|
onConfirm: Z,
|
|
331
|
-
onCancel: t[3] || (t[3] = (
|
|
327
|
+
onCancel: t[3] || (t[3] = (o) => k.value = !1)
|
|
332
328
|
}, null, 8, ["show"])
|
|
333
329
|
]));
|
|
334
330
|
}
|
|
335
331
|
});
|
|
336
332
|
export {
|
|
337
|
-
|
|
333
|
+
Fe as default
|
|
338
334
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
action?(_: {}): any;
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as i, createElementBlock as s, createElementVNode as e, createVNode as d, toDisplayString as l, renderSlot as n } from "vue";
|
|
2
|
+
import c from "../Icon.vue.js";
|
|
3
|
+
const a = { class: "flex flex-col items-center justify-center py-28 gap-5 rounded-3xl border border-gray-150 bg-muted/50 w-full mt-4" }, f = { class: "w-17 h-17 rounded-full bg-gray-200/60 border border-gray-250 shadow-inner flex items-center justify-center" }, u = { class: "text-center space-y-1" }, m = { class: "text-fs-5 font-semibold text-foreground tracking-tight" }, h = ["innerHTML"], _ = /* @__PURE__ */ r({
|
|
4
|
+
__name: "Empty",
|
|
5
|
+
props: {
|
|
6
|
+
title: { default: "No data found" },
|
|
7
|
+
description: { default: "There is nothing to display here right now." },
|
|
8
|
+
icon: { default: "lucide:inbox" }
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (o, g) => (i(), s("div", a, [
|
|
12
|
+
e("div", f, [
|
|
13
|
+
d(c, {
|
|
14
|
+
icon: t.icon,
|
|
15
|
+
class: "w-7 h-7 text-muted-foreground",
|
|
16
|
+
"stroke-width": "1.2"
|
|
17
|
+
}, null, 8, ["icon"])
|
|
18
|
+
]),
|
|
19
|
+
e("div", u, [
|
|
20
|
+
e("h3", m, l(t.title), 1),
|
|
21
|
+
e("p", {
|
|
22
|
+
class: "text-sm text-gray-700 font-light leading-relaxed",
|
|
23
|
+
innerHTML: t.description
|
|
24
|
+
}, null, 8, h)
|
|
25
|
+
]),
|
|
26
|
+
n(o.$slots, "action"),
|
|
27
|
+
n(o.$slots, "default")
|
|
28
|
+
]));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
_ as default
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Empty } from './Empty.vue';
|