vlite3 1.4.35 → 1.4.39
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 +5 -5
- package/components/Badge.vue3.js +5 -0
- package/components/CategoryManager/CategoryManager.vue2.js +6 -5
- package/components/Chip/Chip.vue.js +21 -21
- package/components/Chip/Chip.vue3.js +5 -0
- package/components/Comment/CommentItem.vue2.js +3 -2
- package/components/DataTable/DataTable.vue.d.ts +4 -1
- package/components/DataTable/DataTable.vue.js +317 -203
- package/components/DataTable/DataTableRow.vue.d.ts +21 -0
- package/components/DataTable/DataTableRow.vue.js +140 -73
- package/components/DataTable/types.d.ts +30 -0
- package/components/DataTable/useDataTableTree.d.ts +25 -0
- package/components/DataTable/useDataTableTree.js +147 -0
- package/components/FileTree/FileTree.vue.d.ts +3 -1
- package/components/FileTree/FileTree.vue.js +1 -1
- package/components/FileTree/FileTree.vue2.js +148 -105
- package/components/FileTree/FileTreeNode.vue.d.ts +15 -5
- package/components/FileTree/FileTreeNode.vue.js +149 -182
- package/components/Form/{AccordionView.vue.js → AccordionView.vue2.js} +1 -1
- package/components/Form/Form.vue2.js +45 -43
- package/components/Form/index.vue2.js +1 -1
- package/components/ImportData/ImportData.vue.js +4 -2
- package/components/Invoice/InvoiceVariant1.vue.js +3 -2
- package/components/Invoice/InvoiceVariant2.vue.js +3 -2
- package/components/Invoice/InvoiceVariant3.vue.js +3 -2
- package/components/Invoice/InvoiceVariant4.vue.js +3 -2
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/PricingPlan/PricingPlanItem.vue.js +10 -9
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +21 -20
- package/components/StatusChip/StatusChip.vue.js +8 -7
- package/components/StatusChip/StatusChip.vue3.js +5 -0
- package/components/Timeline/TimelineItem.vue.js +3 -2
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +27 -0
- package/components/TreeConnectors/TreeConnectors.vue.js +53 -0
- package/components/TreeConnectors/TreeConnectors.vue2.js +4 -0
- package/components/TreeConnectors/geometry.d.ts +90 -0
- package/components/TreeConnectors/geometry.js +137 -0
- package/components/TreeConnectors/index.d.ts +3 -0
- package/components/index.d.ts +1 -0
- package/index.js +473 -470
- package/package.json +1 -1
- package/style.css +15 -1
- package/components/Badge.vue2.js +0 -4
- package/components/Chip/Chip.vue2.js +0 -4
- package/components/StatusChip/StatusChip.vue2.js +0 -4
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { defineComponent as $e, inject as We, computed as r, toRef as _, ref as W, watch as D, shallowRef as Le, onUnmounted as Ve, openBlock as i, createElementBlock as c, createElementVNode as v, normalizeClass as x, unref as u, createCommentVNode as E, Fragment as R, renderList as P, normalizeStyle as j, createVNode as L, createBlock as ee, isMemoSame as te, createSlots as le, withCtx as ne, renderSlot as K, mergeProps as ae } from "vue";
|
|
2
|
+
import Fe from "../CheckBox.vue.js";
|
|
3
|
+
import Ae from "../ConfirmationModal.vue.js";
|
|
4
|
+
import Me from "../Pagination/Pagination.vue.js";
|
|
5
|
+
import Ne from "../Empty/Empty.vue.js";
|
|
6
|
+
import Ue from "./DataTableHeader.vue.js";
|
|
7
|
+
import je from "./DataTableRow.vue.js";
|
|
8
|
+
import { useDataTableTree as Ke } from "./useDataTableTree.js";
|
|
9
|
+
import { $t as I } from "../../utils/i18n.js";
|
|
10
|
+
import { SCREEN_CONTEXT_KEY as Oe } from "./types.js";
|
|
11
|
+
const Ye = { class: "space-y-6.5" }, Xe = { class: "w-full overflow-x-auto overflow-y-hidden" }, qe = { key: 0 }, Ge = {
|
|
12
|
+
key: 0,
|
|
13
|
+
style: { width: "40px" }
|
|
14
|
+
}, He = { class: "hover:bg-transparent" }, Je = {
|
|
11
15
|
key: 0,
|
|
12
16
|
scope: "col",
|
|
13
17
|
class: "w-[40px] px-0 text-center font-medium text-muted-foreground",
|
|
14
18
|
style: { width: "40px" }
|
|
15
|
-
},
|
|
19
|
+
}, Qe = { class: "flex items-center justify-center" }, Ze = { class: "[&_tr:last-child]:border-0" }, _e = {
|
|
16
20
|
key: 0,
|
|
17
21
|
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
18
22
|
style: { width: "48px" }
|
|
19
|
-
},
|
|
23
|
+
}, et = { key: 2 }, tt = ["colspan"], lt = { key: 0 }, ft = /* @__PURE__ */ $e({
|
|
20
24
|
__name: "DataTable",
|
|
21
25
|
props: {
|
|
22
26
|
rows: { default: () => [] },
|
|
@@ -49,286 +53,396 @@ const xe = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, I
|
|
|
49
53
|
sortable: { type: Boolean, default: !1 },
|
|
50
54
|
variant: { default: "default" },
|
|
51
55
|
headerVariant: { default: "default" },
|
|
52
|
-
size: { default: "md" }
|
|
56
|
+
size: { default: "md" },
|
|
57
|
+
loadChildren: {},
|
|
58
|
+
treeIndent: { default: 20 }
|
|
53
59
|
},
|
|
54
|
-
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
55
|
-
setup(
|
|
56
|
-
const
|
|
60
|
+
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete", "expand"],
|
|
61
|
+
setup(n, { emit: oe }) {
|
|
62
|
+
const se = (e, t) => {
|
|
57
63
|
if (!(!e || !t))
|
|
58
|
-
return t.includes(".") ? t.split(".").reduce((l,
|
|
59
|
-
},
|
|
64
|
+
return t.includes(".") ? t.split(".").reduce((l, o) => l?.[o], e) : e[t];
|
|
65
|
+
}, w = (e, t) => se(e, t), ie = (e, t) => {
|
|
60
66
|
const l = ["id", "_id"];
|
|
61
67
|
if (t && t !== "auto") return t;
|
|
62
68
|
if (e && e.length > 0) {
|
|
63
|
-
for (const
|
|
64
|
-
if (
|
|
69
|
+
for (const o of l)
|
|
70
|
+
if (o in e[0]) return o;
|
|
65
71
|
}
|
|
66
72
|
return "_id";
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
}, re = (e) => e.sortKey || e.field, a = n, b = oe, V = We(Oe, null), S = r(() => a.hideSelectable ? !1 : V ? V.forceSelectable : !0), h = r(() => ie(a.rows, a.keyField)), {
|
|
74
|
+
isTreeMode: g,
|
|
75
|
+
flattenVisibleRows: F,
|
|
76
|
+
allLoadedRows: z,
|
|
77
|
+
findParentId: O,
|
|
78
|
+
isExpandable: Y,
|
|
79
|
+
isExpanded: X,
|
|
80
|
+
isLoading: q,
|
|
81
|
+
collectDescendantIds: G,
|
|
82
|
+
toggleExpand: de,
|
|
83
|
+
pruneStaleTreeState: ce,
|
|
84
|
+
getChildren: H
|
|
85
|
+
} = Ke({
|
|
86
|
+
rows: _(a, "rows"),
|
|
87
|
+
keyField: h,
|
|
88
|
+
loadChildren: _(a, "loadChildren"),
|
|
89
|
+
getRowId: w,
|
|
90
|
+
onExpand: (e) => b("expand", e)
|
|
91
|
+
}), p = W({ field: "", order: "" }), T = W(
|
|
92
|
+
a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
|
|
93
|
+
), C = W(a.pageInfo?.currentPage || 1), $ = W(!1), ue = r(() => a.loading);
|
|
94
|
+
D(
|
|
95
|
+
() => a.pageInfo?.itemsPerPage,
|
|
72
96
|
(e) => {
|
|
73
|
-
e !== void 0 && (
|
|
97
|
+
e !== void 0 && (T.value = e);
|
|
74
98
|
}
|
|
75
|
-
),
|
|
76
|
-
() =>
|
|
99
|
+
), D(
|
|
100
|
+
() => a.paginationProps?.itemsPerPage,
|
|
77
101
|
(e) => {
|
|
78
|
-
e !== void 0 && (
|
|
102
|
+
e !== void 0 && (T.value = e);
|
|
79
103
|
}
|
|
80
|
-
),
|
|
81
|
-
() =>
|
|
104
|
+
), D(
|
|
105
|
+
() => a.pageInfo?.currentPage,
|
|
82
106
|
(e) => {
|
|
83
|
-
e && (
|
|
107
|
+
e && (C.value = e);
|
|
84
108
|
}
|
|
85
109
|
);
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
() =>
|
|
110
|
+
const s = Le(/* @__PURE__ */ new Set());
|
|
111
|
+
D(
|
|
112
|
+
() => a.selectedRows,
|
|
89
113
|
(e) => {
|
|
90
|
-
const t = new Set((e || []).map((l) =>
|
|
91
|
-
(t.size !==
|
|
114
|
+
const t = new Set((e || []).map((l) => w(l, h.value)));
|
|
115
|
+
(t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
|
|
92
116
|
},
|
|
93
|
-
{ immediate: !0
|
|
117
|
+
{ immediate: !0 }
|
|
94
118
|
);
|
|
95
|
-
const
|
|
96
|
-
()
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
119
|
+
const A = r(() => {
|
|
120
|
+
if (!g.value) return a.rows;
|
|
121
|
+
const e = [], t = (l) => {
|
|
122
|
+
for (const o of l) {
|
|
123
|
+
e.push(o);
|
|
124
|
+
for (const m of H(o)) t([m]);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return t(a.rows), e;
|
|
128
|
+
}), M = r(() => {
|
|
129
|
+
const e = A.value;
|
|
130
|
+
return e.length > 0 && e.every((t) => s.value.has(w(t, h.value)));
|
|
131
|
+
}), J = r(() => s.value.size > 0 && !M.value), me = r(() => {
|
|
132
|
+
const e = new Map(z.value);
|
|
133
|
+
return (a.selectedRows || []).forEach((t) => e.set(w(t, h.value), t)), a.rows.forEach((t) => e.set(w(t, h.value), t)), Array.from(s.value).map((t) => e.get(t)).filter(Boolean);
|
|
134
|
+
}), fe = (e) => {
|
|
135
|
+
if (!g.value) return !1;
|
|
136
|
+
const t = G(e);
|
|
137
|
+
if (!t.length) return !1;
|
|
138
|
+
let l = 0;
|
|
139
|
+
for (const o of t)
|
|
140
|
+
s.value.has(o) && l++;
|
|
141
|
+
return l > 0 && l < t.length;
|
|
142
|
+
}, Q = r(() => {
|
|
143
|
+
const e = /* @__PURE__ */ new Set();
|
|
144
|
+
if (!g.value) return e;
|
|
145
|
+
for (const t of F.value)
|
|
146
|
+
fe(t.row) && e.add(t.id);
|
|
147
|
+
return e;
|
|
148
|
+
}), ve = (e, t) => {
|
|
149
|
+
let l = O(e);
|
|
150
|
+
for (; l != null; ) {
|
|
151
|
+
const o = z.value.get(l);
|
|
152
|
+
if (!o) break;
|
|
153
|
+
const m = H(o).map((f) => w(f, h.value));
|
|
154
|
+
m.length > 0 && m.every((f) => t.has(f)) ? t.add(l) : t.delete(l), l = O(l);
|
|
155
|
+
}
|
|
156
|
+
}, he = (e) => {
|
|
157
|
+
const t = new Set(s.value);
|
|
158
|
+
A.value.forEach((l) => {
|
|
159
|
+
const o = w(l, h.value);
|
|
160
|
+
e ? t.add(o) : t.delete(o);
|
|
161
|
+
}), s.value = t, N();
|
|
162
|
+
}, ge = (e) => {
|
|
163
|
+
const t = new Set(s.value), l = !t.has(e);
|
|
164
|
+
if (g.value) {
|
|
165
|
+
const o = z.value.get(e);
|
|
166
|
+
if (o) {
|
|
167
|
+
const m = (d, f) => {
|
|
168
|
+
f ? t.add(d) : t.delete(d);
|
|
169
|
+
};
|
|
170
|
+
m(e, l), G(o).forEach((d) => m(d, l)), ve(e, t), s.value = t, N();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
t.has(e) ? t.delete(e) : t.add(e), s.value = t, N();
|
|
106
175
|
}, N = () => {
|
|
107
|
-
const e = /* @__PURE__ */ new Set(), t = []
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const s = c(l, i.value);
|
|
113
|
-
!e.has(s) && o.value.has(s) && (t.push(l), e.add(s));
|
|
114
|
-
}), g("select", {
|
|
176
|
+
const e = /* @__PURE__ */ new Set(), t = [], l = (o) => {
|
|
177
|
+
const m = w(o, h.value);
|
|
178
|
+
s.value.has(m) && !e.has(m) && (t.push(o), e.add(m));
|
|
179
|
+
};
|
|
180
|
+
A.value.forEach(l), (a.selectedRows || []).forEach(l), b("select", {
|
|
115
181
|
selected: t,
|
|
116
|
-
all:
|
|
117
|
-
indeterminate:
|
|
118
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
const t =
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
182
|
+
all: M.value,
|
|
183
|
+
indeterminate: J.value
|
|
184
|
+
}), b("update:selectedRows", t);
|
|
185
|
+
}, we = (e) => {
|
|
186
|
+
const t = a.headers.find((o) => o.field === e), l = t ? re(t) : e;
|
|
187
|
+
p.value.field === l ? p.value.order = p.value.order === "asc" ? "desc" : "asc" : (p.value.field = l, p.value.order = "asc"), C.value = 1, U();
|
|
188
|
+
}, be = (e) => {
|
|
189
|
+
C.value = e, U();
|
|
190
|
+
}, pe = (e) => {
|
|
191
|
+
T.value = e, C.value = 1, b("update:itemsPerPage", e), U();
|
|
192
|
+
}, ye = (e) => b("rowClick", e), xe = () => {
|
|
193
|
+
b("delete", me.value), $.value = !1;
|
|
128
194
|
};
|
|
129
|
-
let
|
|
130
|
-
const
|
|
131
|
-
|
|
195
|
+
let y = null;
|
|
196
|
+
const U = () => {
|
|
197
|
+
y && clearTimeout(y), y = setTimeout(() => {
|
|
198
|
+
y = null;
|
|
132
199
|
const e = {
|
|
133
|
-
pagination: { page:
|
|
134
|
-
sort: { ...
|
|
200
|
+
pagination: { page: C.value, limit: T.value },
|
|
201
|
+
sort: { ...p.value },
|
|
135
202
|
filter: {}
|
|
136
203
|
};
|
|
137
|
-
|
|
204
|
+
b("change", e), V?.onTableChange?.(e);
|
|
138
205
|
}, 10);
|
|
139
206
|
};
|
|
140
|
-
|
|
141
|
-
()
|
|
207
|
+
Ve(() => {
|
|
208
|
+
y && (clearTimeout(y), y = null);
|
|
209
|
+
}), D(
|
|
210
|
+
() => a.rows,
|
|
142
211
|
() => {
|
|
143
|
-
|
|
144
|
-
|
|
212
|
+
ce();
|
|
213
|
+
const e = new Set(z.value.keys());
|
|
214
|
+
(a.selectedRows || []).forEach((t) => {
|
|
215
|
+
e.add(w(t, h.value));
|
|
216
|
+
}), s.value = new Set([...s.value].filter((t) => e.has(t)));
|
|
145
217
|
}
|
|
146
218
|
);
|
|
147
|
-
const
|
|
219
|
+
const Se = r(() => [
|
|
148
220
|
"w-full flex flex-col",
|
|
149
|
-
|
|
221
|
+
a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
|
|
150
222
|
"overflow-hidden",
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
].join(" ")),
|
|
223
|
+
a.bordered ? "border border-border" : "",
|
|
224
|
+
a.class
|
|
225
|
+
].join(" ")), Ce = r(() => {
|
|
226
|
+
const e = a.cellBordered ? "[&>thead>tr>th:not(:last-child)]:border-r [&>thead>tr>th]:border-border [&>tbody>tr>td:not(:last-child)]:border-r [&>tbody>tr>td]:border-border [&>tbody>tr>th:not(:last-child)]:border-r [&>tbody>tr>th]:border-border" : "";
|
|
227
|
+
return [
|
|
228
|
+
"w-full caption-bottom -text-fs-1",
|
|
229
|
+
g.value ? "table-fixed" : "",
|
|
230
|
+
e,
|
|
231
|
+
a.tableClass
|
|
232
|
+
].join(" ");
|
|
233
|
+
}), ke = (e) => {
|
|
234
|
+
const t = {};
|
|
235
|
+
return e.width && !/(?:^|\s|:)w-/.test(e.width) && (t.width = e.width), e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (g.value && !t.width ? t.width = e.minWidth : t.minWidth = e.minWidth), t;
|
|
236
|
+
}, Pe = (e) => {
|
|
154
237
|
const t = {};
|
|
155
|
-
return e.width && !/(?:^|\s|:)w-/.test(e.width)
|
|
156
|
-
},
|
|
238
|
+
return e.width && !/(?:^|\s|:)w-/.test(e.width) ? t.width = e.width : e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (t.width = e.minWidth), t;
|
|
239
|
+
}, Z = (e) => {
|
|
157
240
|
const t = [];
|
|
158
241
|
return e.width && /(?:^|\s|:)w-/.test(e.width) && t.push(e.width), e.minWidth && /(?:^|\s|:)min-w-/.test(e.minWidth) && t.push(e.minWidth), t.join(" ");
|
|
159
|
-
},
|
|
160
|
-
() =>
|
|
161
|
-
),
|
|
162
|
-
() =>
|
|
163
|
-
),
|
|
164
|
-
const e =
|
|
242
|
+
}, Ie = r(
|
|
243
|
+
() => a.emptyTitleI18n ? I(a.emptyTitleI18n) : a.emptyTitle
|
|
244
|
+
), Te = r(
|
|
245
|
+
() => a.emptyDescriptionI18n ? I(a.emptyDescriptionI18n) : a.emptyDescription
|
|
246
|
+
), Be = r(() => {
|
|
247
|
+
const e = I("vlite.dataTable.confirmDeleteTitle");
|
|
165
248
|
return e !== "vlite.dataTable.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
166
|
-
}),
|
|
167
|
-
const e =
|
|
249
|
+
}), De = r(() => {
|
|
250
|
+
const e = I("vlite.dataTable.confirmDeleteDesc");
|
|
168
251
|
return e !== "vlite.dataTable.confirmDeleteDesc" ? e : "Are you sure you want to delete the selected items?";
|
|
169
|
-
}),
|
|
170
|
-
const e =
|
|
252
|
+
}), Ee = r(() => {
|
|
253
|
+
const e = I("vlite.dataTable.deleteBtn");
|
|
171
254
|
return e !== "vlite.dataTable.deleteBtn" ? e : "Delete";
|
|
172
|
-
}),
|
|
173
|
-
const e =
|
|
255
|
+
}), Re = r(() => {
|
|
256
|
+
const e = I("vlite.dataTable.cancelBtn");
|
|
174
257
|
return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
|
|
175
258
|
});
|
|
176
|
-
return (e, t) => (
|
|
177
|
-
|
|
178
|
-
class:
|
|
259
|
+
return (e, t) => (i(), c("div", Ye, [
|
|
260
|
+
v("div", {
|
|
261
|
+
class: x(Se.value)
|
|
179
262
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
class:
|
|
263
|
+
v("div", Xe, [
|
|
264
|
+
v("table", {
|
|
265
|
+
class: x([Ce.value, "data-table"])
|
|
183
266
|
}, [
|
|
184
|
-
|
|
185
|
-
|
|
267
|
+
u(g) ? (i(), c("colgroup", qe, [
|
|
268
|
+
S.value ? (i(), c("col", Ge)) : E("", !0),
|
|
269
|
+
(i(!0), c(R, null, P(n.headers, (l) => (i(), c("col", {
|
|
270
|
+
key: "col-" + l.field,
|
|
271
|
+
class: x(Z(l)),
|
|
272
|
+
style: j(Pe(l))
|
|
273
|
+
}, null, 6))), 128))
|
|
274
|
+
])) : E("", !0),
|
|
275
|
+
v("thead", {
|
|
276
|
+
class: x([
|
|
186
277
|
"[&_tr]:border-b [&_tr]:border-border",
|
|
187
|
-
|
|
188
|
-
|
|
278
|
+
n.headerVariant === "minimal" ? "bg-transparent" : "bg-accent",
|
|
279
|
+
n.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
189
280
|
])
|
|
190
281
|
}, [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"model-value":
|
|
196
|
-
indeterminate:
|
|
282
|
+
v("tr", He, [
|
|
283
|
+
S.value ? (i(), c("th", Je, [
|
|
284
|
+
v("div", Qe, [
|
|
285
|
+
L(Fe, {
|
|
286
|
+
"model-value": M.value,
|
|
287
|
+
indeterminate: J.value,
|
|
197
288
|
size: "xs",
|
|
198
|
-
"onUpdate:modelValue":
|
|
289
|
+
"onUpdate:modelValue": he
|
|
199
290
|
}, null, 8, ["model-value", "indeterminate"])
|
|
200
291
|
])
|
|
201
|
-
])) :
|
|
202
|
-
(
|
|
292
|
+
])) : E("", !0),
|
|
293
|
+
(i(!0), c(R, null, P(n.headers, (l) => (i(), ee(Ue, {
|
|
203
294
|
key: l.field,
|
|
204
295
|
header: l,
|
|
205
|
-
"sort-config":
|
|
206
|
-
compact:
|
|
207
|
-
size:
|
|
208
|
-
"table-sortable":
|
|
209
|
-
"cell-bordered":
|
|
210
|
-
onSort:
|
|
211
|
-
class:
|
|
212
|
-
|
|
296
|
+
"sort-config": p.value,
|
|
297
|
+
compact: n.compact,
|
|
298
|
+
size: n.size,
|
|
299
|
+
"table-sortable": n.sortable,
|
|
300
|
+
"cell-bordered": n.cellBordered,
|
|
301
|
+
onSort: we,
|
|
302
|
+
class: x([
|
|
303
|
+
n.cellBordered ? "" : "last:pr-5!",
|
|
304
|
+
Z(l),
|
|
305
|
+
u(g) ? "min-w-0! max-w-none!" : ""
|
|
306
|
+
]),
|
|
307
|
+
style: j(ke(l))
|
|
213
308
|
}, null, 8, ["header", "sort-config", "compact", "size", "table-sortable", "cell-bordered", "class", "style"]))), 128))
|
|
214
309
|
])
|
|
215
310
|
], 2),
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
311
|
+
v("tbody", Ze, [
|
|
312
|
+
ue.value ? (i(!0), c(R, { key: 0 }, P(Math.min(T.value, 15), (l, o, m, d) => {
|
|
313
|
+
const f = [];
|
|
314
|
+
if (d && d.key === "skeleton-" + l && te(d, f)) return d;
|
|
315
|
+
const B = (i(), c("tr", {
|
|
221
316
|
key: "skeleton-" + l,
|
|
222
317
|
class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
223
318
|
}, [
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
319
|
+
S.value ? (i(), c("td", _e, [...t[6] || (t[6] = [
|
|
320
|
+
v("div", { class: "flex items-center justify-center" }, [
|
|
321
|
+
v("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
227
322
|
], -1)
|
|
228
|
-
])])) :
|
|
229
|
-
(
|
|
323
|
+
])])) : E("", !0),
|
|
324
|
+
(i(!0), c(R, null, P(n.headers, (k) => (i(), c("td", {
|
|
230
325
|
key: k.field,
|
|
231
|
-
class:
|
|
326
|
+
class: x(["align-middle", [
|
|
232
327
|
k.hideOnMobile ? "hidden md:table-cell" : "",
|
|
233
|
-
|
|
328
|
+
n.cellBordered ? "px-5! py-3!" : "p-5! last:pr-6!"
|
|
234
329
|
]])
|
|
235
330
|
}, [
|
|
236
|
-
|
|
331
|
+
v("div", {
|
|
237
332
|
class: "rounded-md bg-muted/50 animate-pulse h-4",
|
|
238
333
|
style: j({ width: `${50 + Math.random() * 40}%` })
|
|
239
334
|
}, null, 4)
|
|
240
335
|
], 2))), 128))
|
|
241
336
|
]));
|
|
242
|
-
return
|
|
243
|
-
}, t, 0), 128)) :
|
|
244
|
-
const
|
|
245
|
-
l,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
337
|
+
return B.memo = f, B;
|
|
338
|
+
}, t, 0), 128)) : u(F).length > 0 ? (i(!0), c(R, { key: 1 }, P(u(F), (l, o, m, d) => {
|
|
339
|
+
const f = [
|
|
340
|
+
l.row,
|
|
341
|
+
s.value.has(l.id),
|
|
342
|
+
Q.value.has(l.id),
|
|
343
|
+
S.value,
|
|
344
|
+
n.compact,
|
|
345
|
+
n.size,
|
|
346
|
+
n.striped,
|
|
347
|
+
n.hoverable,
|
|
348
|
+
n.cellBordered,
|
|
349
|
+
u(g),
|
|
350
|
+
l.depth,
|
|
351
|
+
l.isLastSibling,
|
|
352
|
+
l.ancestorLastFlags,
|
|
353
|
+
u(X)(l.id),
|
|
354
|
+
u(q)(l.id),
|
|
355
|
+
u(Y)(l.row),
|
|
356
|
+
n.treeIndent
|
|
253
357
|
];
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
256
|
-
key:
|
|
257
|
-
row: l,
|
|
258
|
-
headers:
|
|
259
|
-
index:
|
|
260
|
-
"key-field":
|
|
261
|
-
selectable:
|
|
262
|
-
"is-selected":
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
358
|
+
if (d && d.key === l.id && te(d, f)) return d;
|
|
359
|
+
const B = (i(), ee(je, {
|
|
360
|
+
key: l.id,
|
|
361
|
+
row: l.row,
|
|
362
|
+
headers: n.headers,
|
|
363
|
+
index: l.index,
|
|
364
|
+
"key-field": h.value,
|
|
365
|
+
selectable: S.value,
|
|
366
|
+
"is-selected": s.value.has(l.id),
|
|
367
|
+
"is-indeterminate": Q.value.has(l.id),
|
|
368
|
+
hoverable: n.hoverable,
|
|
369
|
+
striped: n.striped,
|
|
370
|
+
compact: n.compact,
|
|
371
|
+
size: n.size,
|
|
372
|
+
"cell-bordered": n.cellBordered,
|
|
373
|
+
"tree-mode": u(g),
|
|
374
|
+
depth: l.depth,
|
|
375
|
+
"tree-indent": n.treeIndent,
|
|
376
|
+
expandable: u(Y)(l.row),
|
|
377
|
+
expanded: u(X)(l.id),
|
|
378
|
+
"tree-loading": u(q)(l.id),
|
|
379
|
+
"is-last-sibling": l.isLastSibling,
|
|
380
|
+
"ancestor-last-flags": l.ancestorLastFlags,
|
|
381
|
+
onSelect: ge,
|
|
382
|
+
onRowClick: ye,
|
|
383
|
+
onToggleExpand: (k) => u(de)(l.row, l.depth),
|
|
384
|
+
class: x(n.cellBordered ? "" : "[&_td:last-child]:pr-5!")
|
|
385
|
+
}, le({ _: 2 }, [
|
|
386
|
+
P(n.headers, (k) => ({
|
|
273
387
|
name: k.field,
|
|
274
|
-
fn:
|
|
275
|
-
|
|
388
|
+
fn: ne((ze) => [
|
|
389
|
+
K(e.$slots, k.field, ae({ ref_for: !0 }, ze))
|
|
276
390
|
])
|
|
277
391
|
}))
|
|
278
|
-
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact", "size", "cell-bordered", "class"]));
|
|
279
|
-
return
|
|
280
|
-
}, t, 2), 128)) : (
|
|
281
|
-
|
|
282
|
-
colspan:
|
|
392
|
+
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "is-indeterminate", "hoverable", "striped", "compact", "size", "cell-bordered", "tree-mode", "depth", "tree-indent", "expandable", "expanded", "tree-loading", "is-last-sibling", "ancestor-last-flags", "onToggleExpand", "class"]));
|
|
393
|
+
return B.memo = f, B;
|
|
394
|
+
}, t, 2), 128)) : (i(), c("tr", et, [
|
|
395
|
+
v("td", {
|
|
396
|
+
colspan: S.value ? n.headers.length + 1 : n.headers.length,
|
|
283
397
|
class: "align-middle hover:bg-transparent"
|
|
284
398
|
}, [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
title:
|
|
288
|
-
description:
|
|
289
|
-
icon:
|
|
399
|
+
K(e.$slots, "empty", {}, () => [
|
|
400
|
+
L(u(Ne), {
|
|
401
|
+
title: Ie.value,
|
|
402
|
+
description: Te.value,
|
|
403
|
+
icon: n.emptyIcon,
|
|
290
404
|
variant: "variant12",
|
|
291
405
|
class: "bg-transparent! py-8!"
|
|
292
|
-
},
|
|
406
|
+
}, le({ _: 2 }, [
|
|
293
407
|
e.$slots["empty-action"] ? {
|
|
294
408
|
name: "action",
|
|
295
|
-
fn:
|
|
296
|
-
|
|
409
|
+
fn: ne(() => [
|
|
410
|
+
K(e.$slots, "empty-action")
|
|
297
411
|
]),
|
|
298
412
|
key: "0"
|
|
299
413
|
} : void 0
|
|
300
414
|
]), 1032, ["title", "description", "icon"])
|
|
301
415
|
])
|
|
302
|
-
], 8,
|
|
416
|
+
], 8, tt)
|
|
303
417
|
]))
|
|
304
418
|
])
|
|
305
419
|
], 2)
|
|
306
420
|
])
|
|
307
421
|
], 2),
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
"current-page":
|
|
311
|
-
"total-pages":
|
|
312
|
-
"total-items":
|
|
313
|
-
},
|
|
314
|
-
onChange:
|
|
315
|
-
"onUpdate:itemsPerPage":
|
|
422
|
+
n.showPagination && n.pageInfo && n.pageInfo.totalPages > 1 ? (i(), c("div", lt, [
|
|
423
|
+
L(u(Me), ae({
|
|
424
|
+
"current-page": C.value,
|
|
425
|
+
"total-pages": n.pageInfo.totalPages,
|
|
426
|
+
"total-items": n.pageInfo.totalItems
|
|
427
|
+
}, n.paginationProps, {
|
|
428
|
+
onChange: be,
|
|
429
|
+
"onUpdate:itemsPerPage": pe
|
|
316
430
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
317
|
-
])) :
|
|
318
|
-
|
|
319
|
-
show:
|
|
320
|
-
"onUpdate:show": t[4] || (t[4] = (l) =>
|
|
321
|
-
title:
|
|
322
|
-
description:
|
|
323
|
-
"confirm-text":
|
|
324
|
-
"cancel-text":
|
|
431
|
+
])) : E("", !0),
|
|
432
|
+
L(Ae, {
|
|
433
|
+
show: $.value,
|
|
434
|
+
"onUpdate:show": t[4] || (t[4] = (l) => $.value = l),
|
|
435
|
+
title: Be.value,
|
|
436
|
+
description: De.value,
|
|
437
|
+
"confirm-text": Ee.value,
|
|
438
|
+
"cancel-text": Re.value,
|
|
325
439
|
variant: "danger",
|
|
326
|
-
onConfirm:
|
|
327
|
-
onCancel: t[5] || (t[5] = (l) =>
|
|
440
|
+
onConfirm: xe,
|
|
441
|
+
onCancel: t[5] || (t[5] = (l) => $.value = !1)
|
|
328
442
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
|
|
329
443
|
]));
|
|
330
444
|
}
|
|
331
445
|
});
|
|
332
446
|
export {
|
|
333
|
-
|
|
447
|
+
ft as default
|
|
334
448
|
};
|