vlite3 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,319 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as ee, ref as g, computed as b, watch as p, onMounted as te, openBlock as n, createElementBlock as i, createVNode as C, createSlots as j, withCtx as T, renderSlot as S, createBlock as D, createCommentVNode as I, createElementVNode as r, normalizeClass as B, Fragment as R, renderList as $, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
|
|
2
|
+
import oe from "../Icon.vue.js";
|
|
3
|
+
import ne from "../CheckBox.vue.js";
|
|
4
|
+
import re from "../Button.vue.js";
|
|
5
|
+
import ie from "../ConfirmationModal.vue.js";
|
|
6
|
+
import de from "../Pagination/Pagination.vue.js";
|
|
7
|
+
import ue from "./DataTableHeader.vue.js";
|
|
8
|
+
import ce from "./DataTableRow.vue.js";
|
|
9
|
+
import me from "./DataTableToolbar.vue.js";
|
|
10
|
+
const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve = { class: "hover:bg-transparent" }, ge = {
|
|
11
|
+
key: 0,
|
|
12
|
+
scope: "col",
|
|
13
|
+
class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
|
|
14
|
+
style: { width: "48px" }
|
|
15
|
+
}, pe = { class: "flex items-center justify-center" }, we = { class: "[&_tr:last-child]:border-0" }, ye = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
18
|
+
style: { width: "48px" }
|
|
19
|
+
}, be = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, xe = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, Ce = { class: "mt-1 text-base font-semibold text-foreground" }, Se = { class: "text-sm max-w-sm mx-auto" }, Ie = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "mt-4"
|
|
22
|
+
}, $e = { key: 0 }, je = /* @__PURE__ */ ee({
|
|
23
|
+
__name: "DataTable",
|
|
24
|
+
props: {
|
|
25
|
+
rows: { default: () => [] },
|
|
26
|
+
selectedRows: { default: () => [] },
|
|
27
|
+
search: { default: "" },
|
|
28
|
+
showSearch: { type: Boolean, default: !0 },
|
|
29
|
+
searchPlaceholder: { default: "Search..." },
|
|
30
|
+
headers: { default: () => [] },
|
|
31
|
+
keyField: { default: "_id" },
|
|
32
|
+
loading: { type: Boolean, default: !1 },
|
|
33
|
+
selectable: { type: Boolean, default: !1 },
|
|
34
|
+
emptyTitle: { default: "No data available" },
|
|
35
|
+
emptyDescription: { default: "No results found. Try adjusting your filters or search terms." },
|
|
36
|
+
emptyIcon: { default: "lucide:inbox" },
|
|
37
|
+
showPagination: { type: Boolean, default: !0 },
|
|
38
|
+
paginationPosition: {},
|
|
39
|
+
pageInfo: {},
|
|
40
|
+
itemsPerPage: { default: 10 },
|
|
41
|
+
itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
|
|
42
|
+
showItemsPerPage: { type: Boolean, default: !0 },
|
|
43
|
+
striped: { type: Boolean, default: !1 },
|
|
44
|
+
hoverable: { type: Boolean, default: !0 },
|
|
45
|
+
bordered: { type: Boolean, default: !0 },
|
|
46
|
+
compact: { type: Boolean, default: !1 },
|
|
47
|
+
tableClass: {},
|
|
48
|
+
class: {},
|
|
49
|
+
sortable: { type: Boolean, default: !1 },
|
|
50
|
+
variant: { default: "default" }
|
|
51
|
+
},
|
|
52
|
+
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
53
|
+
setup(a, { emit: U }) {
|
|
54
|
+
const O = (e, t) => {
|
|
55
|
+
if (!(!e || !t))
|
|
56
|
+
return t.includes(".") ? t.split(".").reduce((s, c) => s?.[c], e) : e[t];
|
|
57
|
+
}, u = (e, t) => O(e, t), l = a, w = U, d = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), P = g(!1), v = g("initial"), L = b(() => l.loading && (v.value === "initial" || v.value === "page"));
|
|
58
|
+
p(
|
|
59
|
+
() => l.loading,
|
|
60
|
+
(e, t) => {
|
|
61
|
+
!e && t && (v.value = "idle");
|
|
62
|
+
}
|
|
63
|
+
), p(
|
|
64
|
+
() => l.search,
|
|
65
|
+
(e) => {
|
|
66
|
+
e !== void 0 && e !== y.value && (y.value = e);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
let F = null;
|
|
70
|
+
p(y, (e) => {
|
|
71
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
72
|
+
h.value = 1, v.value = "search", x();
|
|
73
|
+
}, 300);
|
|
74
|
+
}), p(
|
|
75
|
+
() => l.itemsPerPage,
|
|
76
|
+
(e) => {
|
|
77
|
+
k.value = e;
|
|
78
|
+
}
|
|
79
|
+
), p(
|
|
80
|
+
() => l.pageInfo?.currentPage,
|
|
81
|
+
(e) => {
|
|
82
|
+
e && (h.value = e);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
const E = (e) => u(e, l.keyField), o = g(/* @__PURE__ */ new Set());
|
|
86
|
+
p(
|
|
87
|
+
() => l.selectedRows,
|
|
88
|
+
(e) => {
|
|
89
|
+
const t = new Set((e || []).map((s) => u(s, l.keyField)));
|
|
90
|
+
(t.size !== o.value.size || [...t].some((s) => !o.value.has(s))) && (o.value = t);
|
|
91
|
+
},
|
|
92
|
+
{ immediate: !0, deep: !0 }
|
|
93
|
+
);
|
|
94
|
+
const z = b(() => l.rows.length === 0 ? !1 : l.rows.every((e) => o.value.has(u(e, l.keyField)))), N = b(() => o.value.size > 0 && !z.value), W = b(() => {
|
|
95
|
+
const e = [...l.selectedRows || [], ...l.rows], t = /* @__PURE__ */ new Map();
|
|
96
|
+
return e.forEach((s) => t.set(u(s, l.keyField), s)), Array.from(o.value).map((s) => t.get(s)).filter(Boolean);
|
|
97
|
+
}), q = (e) => {
|
|
98
|
+
e ? l.rows.forEach((t) => o.value.add(u(t, l.keyField))) : o.value.size > 0 && l.rows.forEach((t) => o.value.delete(u(t, l.keyField))), V();
|
|
99
|
+
}, G = (e) => {
|
|
100
|
+
o.value.has(e) ? o.value.delete(e) : o.value.add(e), V();
|
|
101
|
+
}, V = () => {
|
|
102
|
+
const e = l.selectedRows || [], t = /* @__PURE__ */ new Set(), s = [];
|
|
103
|
+
l.rows.forEach((m) => {
|
|
104
|
+
const f = u(m, l.keyField);
|
|
105
|
+
o.value.has(f) && (s.push(m), t.add(f));
|
|
106
|
+
}), e.forEach((m) => {
|
|
107
|
+
const f = u(m, l.keyField);
|
|
108
|
+
!t.has(f) && o.value.has(f) && (s.push(m), t.add(f));
|
|
109
|
+
});
|
|
110
|
+
const c = {
|
|
111
|
+
selected: s,
|
|
112
|
+
all: z.value,
|
|
113
|
+
indeterminate: N.value
|
|
114
|
+
};
|
|
115
|
+
w("select", c), w("update:selectedRows", s);
|
|
116
|
+
}, H = (e) => {
|
|
117
|
+
d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), h.value = 1, v.value = "sort", x();
|
|
118
|
+
}, J = (e) => {
|
|
119
|
+
h.value = e, v.value = "page", x();
|
|
120
|
+
}, K = (e) => {
|
|
121
|
+
k.value = e, h.value = 1, v.value = "limit", w("update:itemsPerPage", e), x();
|
|
122
|
+
}, Q = (e) => {
|
|
123
|
+
w("rowClick", e);
|
|
124
|
+
}, X = () => {
|
|
125
|
+
const e = W.value;
|
|
126
|
+
w("delete", e), P.value = !1;
|
|
127
|
+
}, x = () => {
|
|
128
|
+
w("change", {
|
|
129
|
+
pagination: {
|
|
130
|
+
page: h.value,
|
|
131
|
+
limit: k.value
|
|
132
|
+
},
|
|
133
|
+
sorting: { ...d.value },
|
|
134
|
+
search: y.value
|
|
135
|
+
});
|
|
136
|
+
}, Y = b(() => [
|
|
137
|
+
"w-full flex flex-col",
|
|
138
|
+
l.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
|
|
139
|
+
"overflow-hidden",
|
|
140
|
+
l.bordered ? "border border-border/60" : "",
|
|
141
|
+
l.class
|
|
142
|
+
].join(" ")), Z = b(() => ["w-full caption-bottom text-sm", l.tableClass].join(" ")), _ = (e) => e.width ? e.width : "auto";
|
|
143
|
+
return p(
|
|
144
|
+
() => l.rows,
|
|
145
|
+
() => {
|
|
146
|
+
const e = new Set(l.rows.map((t) => u(t, l.keyField)));
|
|
147
|
+
o.value = new Set([...o.value].filter((t) => e.has(t)));
|
|
148
|
+
}
|
|
149
|
+
), te(() => {
|
|
150
|
+
x();
|
|
151
|
+
}), (e, t) => (n(), i("div", fe, [
|
|
152
|
+
C(me, {
|
|
153
|
+
modelValue: y.value,
|
|
154
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => y.value = s),
|
|
155
|
+
"show-search": a.showSearch,
|
|
156
|
+
placeholder: a.searchPlaceholder
|
|
157
|
+
}, j({ _: 2 }, [
|
|
158
|
+
e.$slots?.["toolbar-left"] ? {
|
|
159
|
+
name: "left",
|
|
160
|
+
fn: T(() => [
|
|
161
|
+
S(e.$slots, "toolbar-left")
|
|
162
|
+
]),
|
|
163
|
+
key: "0"
|
|
164
|
+
} : void 0,
|
|
165
|
+
e.$slots?.["toolbar-right"] || o.value.size > 0 ? {
|
|
166
|
+
name: "right",
|
|
167
|
+
fn: T(() => [
|
|
168
|
+
o.value.size > 0 ? (n(), D(re, {
|
|
169
|
+
key: 0,
|
|
170
|
+
rounded: "full",
|
|
171
|
+
variant: "ghost",
|
|
172
|
+
icon: "lucide:trash-2",
|
|
173
|
+
class: "text-destructive! bg-destructive/10 hover:bg-destructive/15",
|
|
174
|
+
onClick: t[0] || (t[0] = (s) => P.value = !0)
|
|
175
|
+
})) : I("", !0),
|
|
176
|
+
S(e.$slots, "toolbar-right")
|
|
177
|
+
]),
|
|
178
|
+
key: "1"
|
|
179
|
+
} : void 0
|
|
180
|
+
]), 1032, ["modelValue", "show-search", "placeholder"]),
|
|
181
|
+
r("div", {
|
|
182
|
+
class: B(Y.value)
|
|
183
|
+
}, [
|
|
184
|
+
r("div", he, [
|
|
185
|
+
r("table", {
|
|
186
|
+
class: B([Z.value, "data-table"])
|
|
187
|
+
}, [
|
|
188
|
+
r("thead", {
|
|
189
|
+
class: B([
|
|
190
|
+
"[&_tr]:border-b [&_tr]:border-border/70! bg-muted",
|
|
191
|
+
a.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
192
|
+
])
|
|
193
|
+
}, [
|
|
194
|
+
r("tr", ve, [
|
|
195
|
+
a.selectable ? (n(), i("th", ge, [
|
|
196
|
+
r("div", pe, [
|
|
197
|
+
C(ne, {
|
|
198
|
+
"model-value": z.value,
|
|
199
|
+
indeterminate: N.value,
|
|
200
|
+
size: "xs",
|
|
201
|
+
"onUpdate:modelValue": q
|
|
202
|
+
}, null, 8, ["model-value", "indeterminate"])
|
|
203
|
+
])
|
|
204
|
+
])) : I("", !0),
|
|
205
|
+
(n(!0), i(R, null, $(a.headers, (s) => (n(), D(ue, {
|
|
206
|
+
key: s.field,
|
|
207
|
+
header: s,
|
|
208
|
+
"sort-config": d.value,
|
|
209
|
+
compact: a.compact,
|
|
210
|
+
"table-sortable": a.sortable,
|
|
211
|
+
onSort: H,
|
|
212
|
+
class: "last:pr-5!",
|
|
213
|
+
style: A({
|
|
214
|
+
width: _(s)
|
|
215
|
+
})
|
|
216
|
+
}, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
|
|
217
|
+
])
|
|
218
|
+
], 2),
|
|
219
|
+
r("tbody", we, [
|
|
220
|
+
L.value ? (n(!0), i(R, { key: 0 }, $(Math.min(k.value, 15), (s) => (n(), i("tr", {
|
|
221
|
+
key: "skeleton-" + s,
|
|
222
|
+
class: "border-b border-border/50 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
223
|
+
}, [
|
|
224
|
+
a.selectable ? (n(), i("td", ye, [...t[4] || (t[4] = [
|
|
225
|
+
r("div", { class: "flex items-center justify-center" }, [
|
|
226
|
+
r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
227
|
+
], -1)
|
|
228
|
+
])])) : I("", !0),
|
|
229
|
+
(n(!0), i(R, null, $(a.headers, (c) => (n(), i("td", {
|
|
230
|
+
key: c.field,
|
|
231
|
+
class: B(["p-5! align-middle last:pr-6!", [c.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
232
|
+
}, [
|
|
233
|
+
r("div", {
|
|
234
|
+
class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
|
|
235
|
+
style: A({
|
|
236
|
+
width: `${50 + Math.random() * 40}%`
|
|
237
|
+
})
|
|
238
|
+
}, null, 4)
|
|
239
|
+
], 2))), 128))
|
|
240
|
+
]))), 128)) : a.rows.length > 0 ? (n(!0), i(R, { key: 1 }, $(a.rows, (s, c) => (n(), D(ce, {
|
|
241
|
+
key: E(s),
|
|
242
|
+
row: s,
|
|
243
|
+
headers: a.headers,
|
|
244
|
+
index: c,
|
|
245
|
+
"key-field": a.keyField,
|
|
246
|
+
selectable: a.selectable,
|
|
247
|
+
"is-selected": o.value.has(E(s)),
|
|
248
|
+
hoverable: a.hoverable,
|
|
249
|
+
striped: a.striped,
|
|
250
|
+
compact: a.compact,
|
|
251
|
+
onSelect: G,
|
|
252
|
+
onRowClick: Q,
|
|
253
|
+
class: "[&_td:last-child]:pr-3.5!"
|
|
254
|
+
}, j({ _: 2 }, [
|
|
255
|
+
$(a.headers, (m) => ({
|
|
256
|
+
name: m.field,
|
|
257
|
+
fn: T((f) => [
|
|
258
|
+
S(e.$slots, m.field, le({ ref_for: !0 }, f))
|
|
259
|
+
])
|
|
260
|
+
}))
|
|
261
|
+
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", be, [
|
|
262
|
+
r("td", {
|
|
263
|
+
colspan: a.selectable ? a.headers.length + 1 : a.headers.length,
|
|
264
|
+
class: "h-96 text-center align-middle hover:bg-transparent"
|
|
265
|
+
}, [
|
|
266
|
+
r("div", Pe, [
|
|
267
|
+
r("div", xe, [
|
|
268
|
+
C(oe, {
|
|
269
|
+
icon: a.emptyIcon,
|
|
270
|
+
class: "h-6 w-6 text-muted-foreground/80"
|
|
271
|
+
}, null, 8, ["icon"])
|
|
272
|
+
]),
|
|
273
|
+
r("h3", Ce, M(a.emptyTitle), 1),
|
|
274
|
+
r("p", Se, [
|
|
275
|
+
S(e.$slots, "empty-description", {}, () => [
|
|
276
|
+
ae(M(a.emptyDescription), 1)
|
|
277
|
+
])
|
|
278
|
+
]),
|
|
279
|
+
e.$slots["empty-action"] ? (n(), i("div", Ie, [
|
|
280
|
+
S(e.$slots, "empty-action")
|
|
281
|
+
])) : I("", !0)
|
|
282
|
+
])
|
|
283
|
+
], 8, ke)
|
|
284
|
+
]))
|
|
285
|
+
])
|
|
286
|
+
], 2)
|
|
287
|
+
])
|
|
288
|
+
], 2),
|
|
289
|
+
a.showPagination && a.pageInfo && a.pageInfo.totalItems > 0 ? (n(), i("div", $e, [
|
|
290
|
+
C(se(de), {
|
|
291
|
+
"current-page": h.value,
|
|
292
|
+
"total-pages": a.pageInfo.totalPages,
|
|
293
|
+
"show-page-info": !1,
|
|
294
|
+
"show-items-per-page": a.showItemsPerPage,
|
|
295
|
+
"items-per-page": k.value,
|
|
296
|
+
"items-per-page-options": a.itemsPerPageOptions,
|
|
297
|
+
"nav-type": "icon",
|
|
298
|
+
alignment: l.paginationPosition,
|
|
299
|
+
onChange: J,
|
|
300
|
+
"onUpdate:itemsPerPage": K
|
|
301
|
+
}, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options", "alignment"])
|
|
302
|
+
])) : I("", !0),
|
|
303
|
+
C(ie, {
|
|
304
|
+
show: P.value,
|
|
305
|
+
"onUpdate:show": t[2] || (t[2] = (s) => P.value = s),
|
|
306
|
+
title: "Confirm Deletion",
|
|
307
|
+
description: "Are you sure you want to delete the selected items?",
|
|
308
|
+
"confirm-text": "Delete",
|
|
309
|
+
"cancel-text": "Cancel",
|
|
310
|
+
variant: "danger",
|
|
311
|
+
onConfirm: X,
|
|
312
|
+
onCancel: t[3] || (t[3] = (s) => P.value = !1)
|
|
313
|
+
}, null, 8, ["show"])
|
|
314
|
+
]));
|
|
315
|
+
}
|
|
316
|
+
});
|
|
5
317
|
export {
|
|
6
|
-
|
|
318
|
+
je as default
|
|
7
319
|
};
|
|
@@ -1,319 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import oe from "../Icon.vue.js";
|
|
3
|
-
import ne from "../CheckBox.vue.js";
|
|
4
|
-
import re from "../Button.vue.js";
|
|
5
|
-
import ie from "../ConfirmationModal.vue.js";
|
|
6
|
-
import de from "../Pagination/Pagination.vue.js";
|
|
7
|
-
import ue from "./DataTableHeader.vue.js";
|
|
8
|
-
import ce from "./DataTableRow.vue.js";
|
|
9
|
-
import me from "./DataTableToolbar.vue.js";
|
|
10
|
-
const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve = { class: "hover:bg-transparent" }, ge = {
|
|
11
|
-
key: 0,
|
|
12
|
-
scope: "col",
|
|
13
|
-
class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
|
|
14
|
-
style: { width: "48px" }
|
|
15
|
-
}, pe = { class: "flex items-center justify-center" }, we = { class: "[&_tr:last-child]:border-0" }, ye = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
18
|
-
style: { width: "48px" }
|
|
19
|
-
}, be = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, xe = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, Ce = { class: "mt-1 text-base font-semibold text-foreground" }, Se = { class: "text-sm max-w-sm mx-auto" }, Ie = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "mt-4"
|
|
22
|
-
}, $e = { key: 0 }, je = /* @__PURE__ */ ee({
|
|
23
|
-
__name: "DataTable",
|
|
24
|
-
props: {
|
|
25
|
-
rows: { default: () => [] },
|
|
26
|
-
selectedRows: { default: () => [] },
|
|
27
|
-
search: { default: "" },
|
|
28
|
-
showSearch: { type: Boolean, default: !0 },
|
|
29
|
-
searchPlaceholder: { default: "Search..." },
|
|
30
|
-
headers: { default: () => [] },
|
|
31
|
-
keyField: { default: "_id" },
|
|
32
|
-
loading: { type: Boolean, default: !1 },
|
|
33
|
-
selectable: { type: Boolean, default: !1 },
|
|
34
|
-
emptyTitle: { default: "No data available" },
|
|
35
|
-
emptyDescription: { default: "No results found. Try adjusting your filters or search terms." },
|
|
36
|
-
emptyIcon: { default: "lucide:inbox" },
|
|
37
|
-
showPagination: { type: Boolean, default: !0 },
|
|
38
|
-
paginationPosition: {},
|
|
39
|
-
pageInfo: {},
|
|
40
|
-
itemsPerPage: { default: 10 },
|
|
41
|
-
itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
|
|
42
|
-
showItemsPerPage: { type: Boolean, default: !0 },
|
|
43
|
-
striped: { type: Boolean, default: !1 },
|
|
44
|
-
hoverable: { type: Boolean, default: !0 },
|
|
45
|
-
bordered: { type: Boolean, default: !0 },
|
|
46
|
-
compact: { type: Boolean, default: !1 },
|
|
47
|
-
tableClass: {},
|
|
48
|
-
class: {},
|
|
49
|
-
sortable: { type: Boolean, default: !1 },
|
|
50
|
-
variant: { default: "default" }
|
|
51
|
-
},
|
|
52
|
-
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
53
|
-
setup(a, { emit: U }) {
|
|
54
|
-
const O = (e, t) => {
|
|
55
|
-
if (!(!e || !t))
|
|
56
|
-
return t.includes(".") ? t.split(".").reduce((s, c) => s?.[c], e) : e[t];
|
|
57
|
-
}, u = (e, t) => O(e, t), l = a, w = U, d = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), P = g(!1), v = g("initial"), L = b(() => l.loading && (v.value === "initial" || v.value === "page"));
|
|
58
|
-
p(
|
|
59
|
-
() => l.loading,
|
|
60
|
-
(e, t) => {
|
|
61
|
-
!e && t && (v.value = "idle");
|
|
62
|
-
}
|
|
63
|
-
), p(
|
|
64
|
-
() => l.search,
|
|
65
|
-
(e) => {
|
|
66
|
-
e !== void 0 && e !== y.value && (y.value = e);
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
let F = null;
|
|
70
|
-
p(y, (e) => {
|
|
71
|
-
F && clearTimeout(F), F = setTimeout(() => {
|
|
72
|
-
h.value = 1, v.value = "search", x();
|
|
73
|
-
}, 300);
|
|
74
|
-
}), p(
|
|
75
|
-
() => l.itemsPerPage,
|
|
76
|
-
(e) => {
|
|
77
|
-
k.value = e;
|
|
78
|
-
}
|
|
79
|
-
), p(
|
|
80
|
-
() => l.pageInfo?.currentPage,
|
|
81
|
-
(e) => {
|
|
82
|
-
e && (h.value = e);
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
const E = (e) => u(e, l.keyField), o = g(/* @__PURE__ */ new Set());
|
|
86
|
-
p(
|
|
87
|
-
() => l.selectedRows,
|
|
88
|
-
(e) => {
|
|
89
|
-
const t = new Set((e || []).map((s) => u(s, l.keyField)));
|
|
90
|
-
(t.size !== o.value.size || [...t].some((s) => !o.value.has(s))) && (o.value = t);
|
|
91
|
-
},
|
|
92
|
-
{ immediate: !0, deep: !0 }
|
|
93
|
-
);
|
|
94
|
-
const z = b(() => l.rows.length === 0 ? !1 : l.rows.every((e) => o.value.has(u(e, l.keyField)))), N = b(() => o.value.size > 0 && !z.value), W = b(() => {
|
|
95
|
-
const e = [...l.selectedRows || [], ...l.rows], t = /* @__PURE__ */ new Map();
|
|
96
|
-
return e.forEach((s) => t.set(u(s, l.keyField), s)), Array.from(o.value).map((s) => t.get(s)).filter(Boolean);
|
|
97
|
-
}), q = (e) => {
|
|
98
|
-
e ? l.rows.forEach((t) => o.value.add(u(t, l.keyField))) : o.value.size > 0 && l.rows.forEach((t) => o.value.delete(u(t, l.keyField))), V();
|
|
99
|
-
}, G = (e) => {
|
|
100
|
-
o.value.has(e) ? o.value.delete(e) : o.value.add(e), V();
|
|
101
|
-
}, V = () => {
|
|
102
|
-
const e = l.selectedRows || [], t = /* @__PURE__ */ new Set(), s = [];
|
|
103
|
-
l.rows.forEach((m) => {
|
|
104
|
-
const f = u(m, l.keyField);
|
|
105
|
-
o.value.has(f) && (s.push(m), t.add(f));
|
|
106
|
-
}), e.forEach((m) => {
|
|
107
|
-
const f = u(m, l.keyField);
|
|
108
|
-
!t.has(f) && o.value.has(f) && (s.push(m), t.add(f));
|
|
109
|
-
});
|
|
110
|
-
const c = {
|
|
111
|
-
selected: s,
|
|
112
|
-
all: z.value,
|
|
113
|
-
indeterminate: N.value
|
|
114
|
-
};
|
|
115
|
-
w("select", c), w("update:selectedRows", s);
|
|
116
|
-
}, H = (e) => {
|
|
117
|
-
d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), h.value = 1, v.value = "sort", x();
|
|
118
|
-
}, J = (e) => {
|
|
119
|
-
h.value = e, v.value = "page", x();
|
|
120
|
-
}, K = (e) => {
|
|
121
|
-
k.value = e, h.value = 1, v.value = "limit", w("update:itemsPerPage", e), x();
|
|
122
|
-
}, Q = (e) => {
|
|
123
|
-
w("rowClick", e);
|
|
124
|
-
}, X = () => {
|
|
125
|
-
const e = W.value;
|
|
126
|
-
w("delete", e), P.value = !1;
|
|
127
|
-
}, x = () => {
|
|
128
|
-
w("change", {
|
|
129
|
-
pagination: {
|
|
130
|
-
page: h.value,
|
|
131
|
-
limit: k.value
|
|
132
|
-
},
|
|
133
|
-
sorting: { ...d.value },
|
|
134
|
-
search: y.value
|
|
135
|
-
});
|
|
136
|
-
}, Y = b(() => [
|
|
137
|
-
"w-full flex flex-col",
|
|
138
|
-
l.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
|
|
139
|
-
"overflow-hidden",
|
|
140
|
-
l.bordered ? "border border-border/60" : "",
|
|
141
|
-
l.class
|
|
142
|
-
].join(" ")), Z = b(() => ["w-full caption-bottom text-sm", l.tableClass].join(" ")), _ = (e) => e.width ? e.width : "auto";
|
|
143
|
-
return p(
|
|
144
|
-
() => l.rows,
|
|
145
|
-
() => {
|
|
146
|
-
const e = new Set(l.rows.map((t) => u(t, l.keyField)));
|
|
147
|
-
o.value = new Set([...o.value].filter((t) => e.has(t)));
|
|
148
|
-
}
|
|
149
|
-
), te(() => {
|
|
150
|
-
x();
|
|
151
|
-
}), (e, t) => (n(), i("div", fe, [
|
|
152
|
-
C(me, {
|
|
153
|
-
modelValue: y.value,
|
|
154
|
-
"onUpdate:modelValue": t[1] || (t[1] = (s) => y.value = s),
|
|
155
|
-
"show-search": a.showSearch,
|
|
156
|
-
placeholder: a.searchPlaceholder
|
|
157
|
-
}, j({ _: 2 }, [
|
|
158
|
-
e.$slots?.["toolbar-left"] ? {
|
|
159
|
-
name: "left",
|
|
160
|
-
fn: T(() => [
|
|
161
|
-
S(e.$slots, "toolbar-left", {}, void 0, !0)
|
|
162
|
-
]),
|
|
163
|
-
key: "0"
|
|
164
|
-
} : void 0,
|
|
165
|
-
e.$slots?.["toolbar-right"] || o.value.size > 0 ? {
|
|
166
|
-
name: "right",
|
|
167
|
-
fn: T(() => [
|
|
168
|
-
o.value.size > 0 ? (n(), D(re, {
|
|
169
|
-
key: 0,
|
|
170
|
-
rounded: "full",
|
|
171
|
-
variant: "ghost",
|
|
172
|
-
icon: "lucide:trash-2",
|
|
173
|
-
class: "text-destructive! bg-destructive/10 hover:bg-destructive/15",
|
|
174
|
-
onClick: t[0] || (t[0] = (s) => P.value = !0)
|
|
175
|
-
})) : I("", !0),
|
|
176
|
-
S(e.$slots, "toolbar-right", {}, void 0, !0)
|
|
177
|
-
]),
|
|
178
|
-
key: "1"
|
|
179
|
-
} : void 0
|
|
180
|
-
]), 1032, ["modelValue", "show-search", "placeholder"]),
|
|
181
|
-
r("div", {
|
|
182
|
-
class: B(Y.value)
|
|
183
|
-
}, [
|
|
184
|
-
r("div", he, [
|
|
185
|
-
r("table", {
|
|
186
|
-
class: B([Z.value, ""])
|
|
187
|
-
}, [
|
|
188
|
-
r("thead", {
|
|
189
|
-
class: B([
|
|
190
|
-
"[&_tr]:border-b [&_tr]:border-border/70! bg-muted",
|
|
191
|
-
a.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
192
|
-
])
|
|
193
|
-
}, [
|
|
194
|
-
r("tr", ve, [
|
|
195
|
-
a.selectable ? (n(), i("th", ge, [
|
|
196
|
-
r("div", pe, [
|
|
197
|
-
C(ne, {
|
|
198
|
-
"model-value": z.value,
|
|
199
|
-
indeterminate: N.value,
|
|
200
|
-
size: "xs",
|
|
201
|
-
"onUpdate:modelValue": q
|
|
202
|
-
}, null, 8, ["model-value", "indeterminate"])
|
|
203
|
-
])
|
|
204
|
-
])) : I("", !0),
|
|
205
|
-
(n(!0), i(R, null, $(a.headers, (s) => (n(), D(ue, {
|
|
206
|
-
key: s.field,
|
|
207
|
-
header: s,
|
|
208
|
-
"sort-config": d.value,
|
|
209
|
-
compact: a.compact,
|
|
210
|
-
"table-sortable": a.sortable,
|
|
211
|
-
onSort: H,
|
|
212
|
-
class: "last:pr-5!",
|
|
213
|
-
style: A({
|
|
214
|
-
width: _(s)
|
|
215
|
-
})
|
|
216
|
-
}, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
|
|
217
|
-
])
|
|
218
|
-
], 2),
|
|
219
|
-
r("tbody", we, [
|
|
220
|
-
L.value ? (n(!0), i(R, { key: 0 }, $(Math.min(k.value, 15), (s) => (n(), i("tr", {
|
|
221
|
-
key: "skeleton-" + s,
|
|
222
|
-
class: "border-b border-border/50 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
223
|
-
}, [
|
|
224
|
-
a.selectable ? (n(), i("td", ye, [...t[4] || (t[4] = [
|
|
225
|
-
r("div", { class: "flex items-center justify-center" }, [
|
|
226
|
-
r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
227
|
-
], -1)
|
|
228
|
-
])])) : I("", !0),
|
|
229
|
-
(n(!0), i(R, null, $(a.headers, (c) => (n(), i("td", {
|
|
230
|
-
key: c.field,
|
|
231
|
-
class: B(["p-5! align-middle last:pr-6!", [c.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
232
|
-
}, [
|
|
233
|
-
r("div", {
|
|
234
|
-
class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
|
|
235
|
-
style: A({
|
|
236
|
-
width: `${50 + Math.random() * 40}%`
|
|
237
|
-
})
|
|
238
|
-
}, null, 4)
|
|
239
|
-
], 2))), 128))
|
|
240
|
-
]))), 128)) : a.rows.length > 0 ? (n(!0), i(R, { key: 1 }, $(a.rows, (s, c) => (n(), D(ce, {
|
|
241
|
-
key: E(s),
|
|
242
|
-
row: s,
|
|
243
|
-
headers: a.headers,
|
|
244
|
-
index: c,
|
|
245
|
-
"key-field": a.keyField,
|
|
246
|
-
selectable: a.selectable,
|
|
247
|
-
"is-selected": o.value.has(E(s)),
|
|
248
|
-
hoverable: a.hoverable,
|
|
249
|
-
striped: a.striped,
|
|
250
|
-
compact: a.compact,
|
|
251
|
-
onSelect: G,
|
|
252
|
-
onRowClick: Q,
|
|
253
|
-
class: "[&_td:last-child]:pr-3.5!"
|
|
254
|
-
}, j({ _: 2 }, [
|
|
255
|
-
$(a.headers, (m) => ({
|
|
256
|
-
name: m.field,
|
|
257
|
-
fn: T((f) => [
|
|
258
|
-
S(e.$slots, m.field, le({ ref_for: !0 }, f), void 0, !0)
|
|
259
|
-
])
|
|
260
|
-
}))
|
|
261
|
-
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", be, [
|
|
262
|
-
r("td", {
|
|
263
|
-
colspan: a.selectable ? a.headers.length + 1 : a.headers.length,
|
|
264
|
-
class: "h-96 text-center align-middle hover:bg-transparent"
|
|
265
|
-
}, [
|
|
266
|
-
r("div", Pe, [
|
|
267
|
-
r("div", xe, [
|
|
268
|
-
C(oe, {
|
|
269
|
-
icon: a.emptyIcon,
|
|
270
|
-
class: "h-6 w-6 text-muted-foreground/80"
|
|
271
|
-
}, null, 8, ["icon"])
|
|
272
|
-
]),
|
|
273
|
-
r("h3", Ce, M(a.emptyTitle), 1),
|
|
274
|
-
r("p", Se, [
|
|
275
|
-
S(e.$slots, "empty-description", {}, () => [
|
|
276
|
-
ae(M(a.emptyDescription), 1)
|
|
277
|
-
], !0)
|
|
278
|
-
]),
|
|
279
|
-
e.$slots["empty-action"] ? (n(), i("div", Ie, [
|
|
280
|
-
S(e.$slots, "empty-action", {}, void 0, !0)
|
|
281
|
-
])) : I("", !0)
|
|
282
|
-
])
|
|
283
|
-
], 8, ke)
|
|
284
|
-
]))
|
|
285
|
-
])
|
|
286
|
-
], 2)
|
|
287
|
-
])
|
|
288
|
-
], 2),
|
|
289
|
-
a.showPagination && a.pageInfo && a.pageInfo.totalItems > 0 ? (n(), i("div", $e, [
|
|
290
|
-
C(se(de), {
|
|
291
|
-
"current-page": h.value,
|
|
292
|
-
"total-pages": a.pageInfo.totalPages,
|
|
293
|
-
"show-page-info": !1,
|
|
294
|
-
"show-items-per-page": a.showItemsPerPage,
|
|
295
|
-
"items-per-page": k.value,
|
|
296
|
-
"items-per-page-options": a.itemsPerPageOptions,
|
|
297
|
-
"nav-type": "icon",
|
|
298
|
-
alignment: l.paginationPosition,
|
|
299
|
-
onChange: J,
|
|
300
|
-
"onUpdate:itemsPerPage": K
|
|
301
|
-
}, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options", "alignment"])
|
|
302
|
-
])) : I("", !0),
|
|
303
|
-
C(ie, {
|
|
304
|
-
show: P.value,
|
|
305
|
-
"onUpdate:show": t[2] || (t[2] = (s) => P.value = s),
|
|
306
|
-
title: "Confirm Deletion",
|
|
307
|
-
description: "Are you sure you want to delete the selected items?",
|
|
308
|
-
"confirm-text": "Delete",
|
|
309
|
-
"cancel-text": "Cancel",
|
|
310
|
-
variant: "danger",
|
|
311
|
-
onConfirm: X,
|
|
312
|
-
onCancel: t[3] || (t[3] = (s) => P.value = !1)
|
|
313
|
-
}, null, 8, ["show"])
|
|
314
|
-
]));
|
|
315
|
-
}
|
|
316
|
-
});
|
|
1
|
+
import f from "./DataTable.vue.js";
|
|
317
2
|
export {
|
|
318
|
-
|
|
3
|
+
f as default
|
|
319
4
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./KanbanBoard.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-9ac38977"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as B, ref as K, watch as U, onMounted as
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
import { useKanbanBoard as
|
|
5
|
-
const F = { class: "flex items-center justify-between font-semibold text-foreground" }, H = {
|
|
1
|
+
import { defineComponent as B, ref as K, watch as U, onMounted as E, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as n, renderSlot as m, unref as t, toDisplayString as f, Fragment as g, renderList as b, createVNode as h, withCtx as L, createCommentVNode as M } from "vue";
|
|
2
|
+
import { VueDraggable as V } from "vue-draggable-plus";
|
|
3
|
+
import j from "../Spinner/Spinner.vue.js";
|
|
4
|
+
import { useKanbanBoard as z } from "./useKanbanBoard.js";
|
|
5
|
+
const F = { class: "flex items-center justify-between font-semibold text-foreground" }, H = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "flex-1 flex
|
|
8
|
-
},
|
|
7
|
+
class: "flex-1 flex flex-col gap-3 min-h-[50px] py-1"
|
|
8
|
+
}, J = { class: "bg-body p-3 rounded-md shadow-sm border border-border text-sm" }, O = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "py-4 flex justify-center shrink-0"
|
|
11
|
-
},
|
|
11
|
+
}, G = /* @__PURE__ */ B({
|
|
12
12
|
__name: "KanbanBoard",
|
|
13
13
|
props: {
|
|
14
14
|
column: {},
|
|
@@ -24,88 +24,90 @@ const F = { class: "flex items-center justify-between font-semibold text-foregro
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["change", "update:columnData"],
|
|
26
26
|
setup(o, { emit: v }) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
|
|
27
|
+
const l = o, i = v, p = K(null), { items: a, isInitialLoading: y, isLoadingMore: x, pageInfo: C, loadInitial: k, loadMore: D } = z(
|
|
28
|
+
l.column.id,
|
|
29
|
+
l.loadData,
|
|
30
|
+
l.columnData
|
|
31
|
+
), w = (e) => {
|
|
32
|
+
a.value = e, i("update:columnData", e);
|
|
33
33
|
};
|
|
34
34
|
U(
|
|
35
|
-
() =>
|
|
35
|
+
() => l.columnData,
|
|
36
36
|
(e) => {
|
|
37
|
-
e && JSON.stringify(e) !== JSON.stringify(
|
|
37
|
+
e && JSON.stringify(e) !== JSON.stringify(a.value) && (a.value = [...e]);
|
|
38
38
|
},
|
|
39
39
|
{ deep: !0 }
|
|
40
|
-
),
|
|
41
|
-
|
|
40
|
+
), E(() => {
|
|
41
|
+
l.loadData && (!l.columnData || l.columnData.length === 0) && k();
|
|
42
42
|
});
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
43
|
+
const I = (e) => {
|
|
44
|
+
const c = e.target;
|
|
45
|
+
c.scrollTop + c.clientHeight >= c.scrollHeight - 50 && D();
|
|
46
|
+
}, S = (e) => {
|
|
47
|
+
i("change", { type: "add", event: e, columnId: l.column.id });
|
|
46
48
|
}, N = (e) => {
|
|
47
|
-
|
|
49
|
+
i("change", { type: "remove", event: e, columnId: l.column.id });
|
|
48
50
|
}, $ = (e) => {
|
|
49
|
-
|
|
50
|
-
}, w = (e) => {
|
|
51
|
-
c("change", { type: "update", event: e, columnId: t.column.id });
|
|
51
|
+
i("change", { type: "update", event: e, columnId: l.column.id });
|
|
52
52
|
};
|
|
53
|
-
return (e,
|
|
53
|
+
return (e, c) => (r(), d("div", {
|
|
54
54
|
class: u([
|
|
55
|
-
"flex flex-col bg-
|
|
55
|
+
"flex flex-col bg-card rounded-lg overflow-hidden shrink-0 border border-border/60",
|
|
56
56
|
o.boardClass || "w-80"
|
|
57
57
|
])
|
|
58
58
|
}, [
|
|
59
|
-
|
|
60
|
-
class: u(["p-3 border-b border-border/
|
|
59
|
+
n("div", {
|
|
60
|
+
class: u(["p-3 border-b border-border/80 ", o.headerClass])
|
|
61
61
|
}, [
|
|
62
62
|
m(e.$slots, "header", {
|
|
63
63
|
column: o.column,
|
|
64
|
-
pageInfo:
|
|
64
|
+
pageInfo: t(C)
|
|
65
65
|
}, () => [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
r("span", H, g(a(h).totalItems), 1)
|
|
66
|
+
n("div", F, [
|
|
67
|
+
n("span", null, f(o.column.title), 1)
|
|
69
68
|
])
|
|
70
69
|
], !0)
|
|
71
70
|
], 2),
|
|
72
|
-
|
|
71
|
+
n("div", {
|
|
73
72
|
ref_key: "scrollContainer",
|
|
74
|
-
ref:
|
|
75
|
-
class: u(["flex-1 flex flex-col overflow-y-auto p-3
|
|
76
|
-
onScroll:
|
|
73
|
+
ref: p,
|
|
74
|
+
class: u(["flex-1 flex flex-col overflow-y-auto p-3 custom-scrollbar", o.bodyClass]),
|
|
75
|
+
onScroll: I
|
|
77
76
|
}, [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
77
|
+
t(y) && t(a).length === 0 ? (r(), d("div", H, [
|
|
78
|
+
(r(), d(g, null, b(3, (s) => n("div", {
|
|
79
|
+
key: "skeleton-" + s,
|
|
80
|
+
class: "bg-body p-3 rounded-md shadow-sm border border-border animate-pulse flex flex-col gap-3"
|
|
81
|
+
}, [...c[0] || (c[0] = [
|
|
82
|
+
n("div", { class: "h-4 bg-muted/60 rounded w-2/3" }, null, -1),
|
|
83
|
+
n("div", { class: "h-3 bg-muted/60 rounded w-1/3" }, null, -1)
|
|
84
|
+
])])), 64))
|
|
85
|
+
])) : (r(), d(g, { key: 1 }, [
|
|
84
86
|
m(e.$slots, "prepend-item", {
|
|
85
87
|
column: o.column,
|
|
86
|
-
items: a
|
|
88
|
+
items: t(a)
|
|
87
89
|
}, void 0, !0),
|
|
88
|
-
|
|
89
|
-
"model-value": a
|
|
90
|
-
"onUpdate:modelValue":
|
|
90
|
+
h(t(V), {
|
|
91
|
+
"model-value": t(a),
|
|
92
|
+
"onUpdate:modelValue": w,
|
|
91
93
|
group: o.group,
|
|
92
94
|
animation: 150,
|
|
93
95
|
ghostClass: o.ghostClass || "kanban-ghost",
|
|
94
|
-
class: u(["flex-1 flex flex-col
|
|
95
|
-
onAdd:
|
|
96
|
-
onRemove:
|
|
97
|
-
onUpdate:
|
|
96
|
+
class: u(["flex-1 flex flex-col gap-2 min-h-[50px] py-1", o.draggableClass]),
|
|
97
|
+
onAdd: S,
|
|
98
|
+
onRemove: N,
|
|
99
|
+
onUpdate: $
|
|
98
100
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
(
|
|
101
|
-
key:
|
|
101
|
+
default: L(() => [
|
|
102
|
+
(r(!0), d(g, null, b(t(a), (s) => (r(), d("div", {
|
|
103
|
+
key: s[o.itemKey || "id"],
|
|
102
104
|
class: "cursor-grab active:cursor-grabbing"
|
|
103
105
|
}, [
|
|
104
106
|
m(e.$slots, "item", {
|
|
105
|
-
item:
|
|
107
|
+
item: s,
|
|
106
108
|
column: o.column
|
|
107
109
|
}, () => [
|
|
108
|
-
|
|
110
|
+
n("div", J, f(s.title || s.name || s.id), 1)
|
|
109
111
|
], !0)
|
|
110
112
|
]))), 128))
|
|
111
113
|
]),
|
|
@@ -113,20 +115,20 @@ const F = { class: "flex items-center justify-between font-semibold text-foregro
|
|
|
113
115
|
}, 8, ["model-value", "group", "ghostClass", "class"]),
|
|
114
116
|
m(e.$slots, "append-item", {
|
|
115
117
|
column: o.column,
|
|
116
|
-
items: a
|
|
118
|
+
items: t(a)
|
|
117
119
|
}, void 0, !0),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
t(x) ? (r(), d("div", O, [
|
|
121
|
+
h(j, {
|
|
120
122
|
size: "sm",
|
|
121
123
|
variant: "dots",
|
|
122
124
|
color: "primary"
|
|
123
125
|
})
|
|
124
|
-
])) :
|
|
126
|
+
])) : M("", !0)
|
|
125
127
|
], 64))
|
|
126
128
|
], 34)
|
|
127
129
|
], 2));
|
|
128
130
|
}
|
|
129
131
|
});
|
|
130
132
|
export {
|
|
131
|
-
|
|
133
|
+
G as default
|
|
132
134
|
};
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -334,13 +334,6 @@
|
|
|
334
334
|
--color-mixture-2: #ffffff !important;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
.dark .bg-card {
|
|
338
|
-
--color-body: #131313 !important;
|
|
339
|
-
--color-mixture-1: #191818 !important;
|
|
340
|
-
--color-mixture-2: #ffffff !important;
|
|
341
|
-
background-color: var(--color-body) !important;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
337
|
.dark .modal-body .bg-card,
|
|
345
338
|
.dark .sidepanel-body .bg-card,
|
|
346
339
|
.dark .tooltip-container .bg-card {
|
|
@@ -351,14 +344,18 @@
|
|
|
351
344
|
}
|
|
352
345
|
|
|
353
346
|
.dark .bg-card {
|
|
354
|
-
--color-body: #
|
|
347
|
+
--color-body: #0B0B0B !important;
|
|
355
348
|
--color-mixture-1: #111 !important;
|
|
356
349
|
--color-mixture-2: #ffffff !important;
|
|
357
|
-
background-color:
|
|
350
|
+
background-color: #111 !important;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.dark .bg-card .bg-body {
|
|
354
|
+
--color-mixture-1: #0f0f0f !important;
|
|
355
|
+
--color-mixture-2: #ffffff !important;
|
|
358
356
|
}
|
|
359
357
|
|
|
360
358
|
.bg-card {
|
|
361
|
-
--color-body: #FAFAFA !important;
|
|
362
359
|
--color-mixture-1: #FAFAFA !important;
|
|
363
360
|
--color-mixture-2: #000000 !important;
|
|
364
361
|
background-color: #FAFAFA !important;
|
|
@@ -593,6 +590,24 @@ html {
|
|
|
593
590
|
--date-picker-radius: var(--radius) !important;
|
|
594
591
|
}
|
|
595
592
|
|
|
593
|
+
|
|
594
|
+
.data-table tr td:first-child,
|
|
595
|
+
.data-table tr th:first-child {
|
|
596
|
+
padding-left: 16px !important;
|
|
597
|
+
padding-right: 16px !important;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.data-table tr td:last-child,
|
|
601
|
+
.data-table tr th:last-child {
|
|
602
|
+
padding-left: 6px !important;
|
|
603
|
+
padding-right: 16px !important;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.data-table tr td,
|
|
607
|
+
.data-table tr th {
|
|
608
|
+
padding-right: 10px !important;
|
|
609
|
+
}
|
|
610
|
+
|
|
596
611
|
/* --- input.css --- */
|
|
597
612
|
input[type='number']::-webkit-inner-spin-button,
|
|
598
613
|
input[type='number']::-webkit-outer-spin-button {
|
|
@@ -657,5 +672,5 @@ textarea::-webkit-scrollbar-thumb {
|
|
|
657
672
|
}
|
|
658
673
|
|
|
659
674
|
/* --- Vite Generated CSS --- */
|
|
660
|
-
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.attached-group[data-v-8c9add3e]:not(.vertical-group) button{border-radius:0}.attached-group[data-v-8c9add3e] button{position:relative;--radius: .375rem}.attached-group[data-v-8c9add3e] button:focus-visible,.attached-group[data-v-8c9add3e] button:hover{z-index:10}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-8c9add3e] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-8c9add3e] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;width:auto}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{width:100%}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{height:100%}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}
|
|
675
|
+
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.attached-group[data-v-8c9add3e]:not(.vertical-group) button{border-radius:0}.attached-group[data-v-8c9add3e] button{position:relative;--radius: .375rem}.attached-group[data-v-8c9add3e] button:focus-visible,.attached-group[data-v-8c9add3e] button:hover{z-index:10}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-8c9add3e] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-8c9add3e] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;width:auto}.vertical-group[data-v-8c9add3e] button:not(:first-child):not(.border):before{width:100%}.attached-group[data-v-8c9add3e]:not(.vertical-group) button:not(:first-child):not(.border):before{height:100%}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}input[data-v-e7171c4f]::-webkit-outer-spin-button,input[data-v-e7171c4f]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}input[type=number][data-v-e7171c4f]{-moz-appearance:textfield;appearance:textfield}.form-field-item[data-v-47af145c]{display:flex;flex-direction:column}.form-field-item[data-v-47af145c]:has([role=switch]),.form-field-item[data-v-47af145c]:has([role=checkbox]){flex-direction:row;align-items:center}.form-container[data-v-67eb0c47]{width:100%}.custom-fields-table[data-v-79b7dd60] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-79b7dd60] input,.custom-fields-table[data-v-79b7dd60] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-79b7dd60] input,.custom-fields-table[data-v-79b7dd60] textarea,.custom-fields-table[data-v-79b7dd60] select,.custom-fields-table[data-v-79b7dd60] .input-wrapper,.custom-fields-table[data-v-79b7dd60] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-79b7dd60] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-79b7dd60] input:focus,.custom-fields-table[data-v-79b7dd60] textarea:focus,.custom-fields-table[data-v-79b7dd60] select:focus,.custom-fields-table[data-v-79b7dd60] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-79b7dd60] .w-full{width:100%;height:100%}.list-move[data-v-79b7dd60],.list-enter-active[data-v-79b7dd60],.list-leave-active[data-v-79b7dd60]{transition:all .3s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-79b7dd60],.list-leave-to[data-v-79b7dd60]{opacity:0;transform:translateY(-10px)}.list-leave-active[data-v-79b7dd60]{position:absolute;width:100%;z-index:0}.heatmap-container[data-v-00476f00]{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}.heatmap-wrapper[data-v-00476f00]{width:100%;height:100%;overflow:auto;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;position:relative}.heatmap-grid[data-v-00476f00]{width:fit-content;height:fit-content;transition:all .2s ease-in-out}.heatmap-cell[data-v-00476f00]{aspect-ratio:1 / 1;border-radius:2px;transition:all .15s ease-in-out;border:1px solid transparent;box-sizing:border-box}.heatmap-cell-interactive[data-v-00476f00]{cursor:pointer}.heatmap-cell-interactive[data-v-00476f00]:hover{transform:scale(1.1);border-color:var(--border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;z-index:10;position:relative}.heatmap-cell-empty[data-v-00476f00]{opacity:.6}.heatmap-cell-hovered[data-v-00476f00]{outline:2px solid var(--primary);outline-offset:1px}.heatmap-cell-label[data-v-00476f00]{font-size:8px;font-weight:500;color:var(--foreground);opacity:.8;display:flex;align-items:center;justify-content:center;height:100%;width:100%;pointer-events:none}.heatmap-legend[data-v-00476f00]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;font-size:.75rem;color:var(--muted-foreground);flex-shrink:0}.heatmap-legend-label[data-v-00476f00]{font-weight:500}.heatmap-legend-colors[data-v-00476f00]{display:flex;gap:.125rem}.heatmap-legend-item[data-v-00476f00]{width:.75rem;height:.75rem;border-radius:.375rem;border:1px solid var(--border)}@media(max-width:640px){.heatmap-wrapper[data-v-00476f00]{padding:12px}.heatmap-cell[data-v-00476f00]{border-radius:2px}.heatmap-cell-label[data-v-00476f00]{font-size:7px}}@media(min-width:641px)and (max-width:1023px){.heatmap-wrapper[data-v-00476f00]{padding:14px}.heatmap-cell[data-v-00476f00]{border-radius:2px}}@media(min-width:1024px){.heatmap-wrapper[data-v-00476f00]{padding:16px}.heatmap-cell[data-v-00476f00]{border-radius:3px}}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar{width:0px}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar{height:8px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.masonry-item[data-v-c29d0159]{content-visibility:auto;contain-intrinsic-size:1px 200px}.slide-right-enter-active[data-v-016e19f6],.slide-right-leave-active[data-v-016e19f6],.slide-left-enter-active[data-v-016e19f6],.slide-left-leave-active[data-v-016e19f6]{transition:transform .3s ease-in-out}.slide-right-enter-from[data-v-016e19f6],.slide-right-leave-to[data-v-016e19f6]{transform:translate(100%)}.slide-left-enter-from[data-v-016e19f6],.slide-left-leave-to[data-v-016e19f6]{transform:translate(-100%)}.sidebar-manu-item .tooltip-trigger{width:100%!important}.sidebar-menu-tooltip{margin-left:4px!important}[dir=rtl] .sidebar-menu-tooltip{margin-right:4px!important}.first-toast-enter-active[data-v-6b631840]{animation:first-toast-in-6b631840 .45s cubic-bezier(.23,1,.32,1) forwards}.first-toast-leave-active[data-v-6b631840]{transition:all .25s ease-in}.first-toast-leave-to[data-v-6b631840]{opacity:0;transform:scale(.98)}@keyframes first-toast-in-6b631840{0%{opacity:var(--entrance-opacity, .6);transform:translateY(var(--entrance-offset, 25px)) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stack-toast-enter-active[data-v-6b631840],.stack-toast-leave-active[data-v-6b631840]{transition:all .3s cubic-bezier(.16,1,.3,1)}.stack-toast-enter-from[data-v-6b631840]{opacity:0;transform:scale(.95) translateY(10px)}.stack-toast-leave-to[data-v-6b631840]{opacity:0;transform:scale(.95)}.stack-toast-move[data-v-6b631840]{transition:transform .4s cubic-bezier(.16,1,.3,1)}.bg-stripe[data-v-454a1505]{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.animate-progress-stripe[data-v-454a1505]{animation:progress-stripe-454a1505 1s linear infinite}@keyframes progress-stripe-454a1505{0%{background-position:1rem 0}to{background-position:0 0}}.animate-progress-indeterminate[data-v-454a1505]{animation:progress-indeterminate-454a1505 1.5s infinite cubic-bezier(.65,.815,.735,.395)}@keyframes progress-indeterminate-454a1505{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(0) scaleX(.5)}to{transform:translate(100%) scaleX(.2)}}
|
|
661
676
|
|