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