@soft-stech/bootsman-ui-shadcn 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{BuiDataTable.vue_vue_type_script_setup_true_lang-7Tst_H0P.js → BuiDataTable.vue_vue_type_script_setup_true_lang-R89LBsoI.js} +152 -151
- package/dist/components/ui/table/BuiDataTable.js +1 -1
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +3 -0
- package/dist/components/ui/table/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +19 -18
- package/src/components/stories/BuiDataTable.story.vue +3 -1
- package/src/components/ui/table/BuiDataTable.vue +3 -2
@@ -53,17 +53,17 @@ function m(e, n, t) {
|
|
53
53
|
let i;
|
54
54
|
t.key && t.debug && (i = Date.now());
|
55
55
|
const l = e();
|
56
|
-
if (!(l.length !== o.length || l.some((
|
56
|
+
if (!(l.length !== o.length || l.some((g, a) => o[a] !== g)))
|
57
57
|
return r;
|
58
58
|
o = l;
|
59
59
|
let s;
|
60
60
|
if (t.key && t.debug && (s = Date.now()), r = n(...l), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
61
|
-
const
|
61
|
+
const g = Math.round((Date.now() - i) * 100) / 100, a = Math.round((Date.now() - s) * 100) / 100, d = a / 16, p = (c, f) => {
|
62
62
|
for (c = String(c); c.length < f; )
|
63
63
|
c = " " + c;
|
64
64
|
return c;
|
65
65
|
};
|
66
|
-
console.info(`%c⏱ ${p(
|
66
|
+
console.info(`%c⏱ ${p(a, 5)} /${p(g, 5)} ms`, `
|
67
67
|
font-size: .6rem;
|
68
68
|
font-weight: bold;
|
69
69
|
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t?.key);
|
@@ -77,19 +77,19 @@ function je(e, n, t, o) {
|
|
77
77
|
...e._getDefaultColumnDef(),
|
78
78
|
...n
|
79
79
|
}, s = u.accessorKey;
|
80
|
-
let
|
81
|
-
if (u.accessorFn ?
|
80
|
+
let g = (r = (i = u.id) != null ? i : s ? s.replace(".", "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, a;
|
81
|
+
if (u.accessorFn ? a = u.accessorFn : s && (s.includes(".") ? a = (p) => {
|
82
82
|
let c = p;
|
83
83
|
for (const S of s.split(".")) {
|
84
84
|
var f;
|
85
85
|
c = (f = c) == null ? void 0 : f[S], process.env.NODE_ENV !== "production" && c === void 0 && console.warn(`"${S}" in deeply nested key "${s}" returned undefined.`);
|
86
86
|
}
|
87
87
|
return c;
|
88
|
-
} :
|
88
|
+
} : a = (p) => p[u.accessorKey]), !g)
|
89
89
|
throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
90
90
|
let d = {
|
91
|
-
id: `${String(
|
92
|
-
accessorFn:
|
91
|
+
id: `${String(g)}`,
|
92
|
+
accessorFn: a,
|
93
93
|
parent: o,
|
94
94
|
depth: t,
|
95
95
|
columnDef: u,
|
@@ -156,8 +156,8 @@ const Xe = {
|
|
156
156
|
createTable: (e) => {
|
157
157
|
e.getHeaderGroups = m(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
158
158
|
var i, l;
|
159
|
-
const u = (i = o?.map((d) => t.find((p) => p.id === d)).filter(Boolean)) != null ? i : [], s = (l = r?.map((d) => t.find((p) => p.id === d)).filter(Boolean)) != null ? l : [],
|
160
|
-
return G(n, [...u, ...
|
159
|
+
const u = (i = o?.map((d) => t.find((p) => p.id === d)).filter(Boolean)) != null ? i : [], s = (l = r?.map((d) => t.find((p) => p.id === d)).filter(Boolean)) != null ? l : [], g = t.filter((d) => !(o != null && o.includes(d.id)) && !(r != null && r.includes(d.id)));
|
160
|
+
return G(n, [...u, ...g, ...s], e);
|
161
161
|
}, {
|
162
162
|
key: process.env.NODE_ENV === "development" && "getHeaderGroups",
|
163
163
|
debug: () => {
|
@@ -266,8 +266,8 @@ const Xe = {
|
|
266
266
|
return (n = e.options.debugAll) != null ? n : e.options.debugHeaders;
|
267
267
|
}
|
268
268
|
}), e.getLeafHeaders = m(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
269
|
-
var r, i, l, u, s,
|
270
|
-
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(s = (
|
269
|
+
var r, i, l, u, s, g;
|
270
|
+
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(s = (g = o[0]) == null ? void 0 : g.headers) != null ? s : []].map((a) => a.getLeafHeaders()).flat();
|
271
271
|
}, {
|
272
272
|
key: process.env.NODE_ENV === "development" && "getLeafHeaders",
|
273
273
|
debug: () => {
|
@@ -288,7 +288,7 @@ function G(e, n, t, o) {
|
|
288
288
|
};
|
289
289
|
u(e);
|
290
290
|
let s = [];
|
291
|
-
const
|
291
|
+
const g = (p, c) => {
|
292
292
|
const f = {
|
293
293
|
depth: c,
|
294
294
|
id: [o, `${c}`].filter(Boolean).join("_"),
|
@@ -310,12 +310,12 @@ function G(e, n, t, o) {
|
|
310
310
|
P.subHeaders.push(C), S.push(P);
|
311
311
|
}
|
312
312
|
f.headers.push(C), C.headerGroup = f;
|
313
|
-
}), s.push(f), c > 0 &&
|
314
|
-
},
|
313
|
+
}), s.push(f), c > 0 && g(S, c - 1);
|
314
|
+
}, a = n.map((p, c) => fe(t, p, {
|
315
315
|
depth: l,
|
316
316
|
index: c
|
317
317
|
}));
|
318
|
-
a
|
318
|
+
g(a, l - 1), s.reverse();
|
319
319
|
const d = (p) => p.filter((f) => f.column.getIsVisible()).map((f) => {
|
320
320
|
let S = 0, C = 0, v = [0];
|
321
321
|
f.subHeaders && f.subHeaders.length ? (v = [], d(f.subHeaders).forEach((w) => {
|
@@ -405,24 +405,24 @@ const L = {
|
|
405
405
|
return (i) => {
|
406
406
|
if (!o || !r || (i.persist == null || i.persist(), Y(i) && i.touches && i.touches.length > 1))
|
407
407
|
return;
|
408
|
-
const l = e.getSize(), u = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], s = Y(i) ? Math.round(i.touches[0].clientX) : i.clientX,
|
408
|
+
const l = e.getSize(), u = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], s = Y(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, a = (v, R) => {
|
409
409
|
typeof R == "number" && (n.setColumnSizingInfo((w) => {
|
410
410
|
var F, P;
|
411
|
-
const T = n.options.columnResizeDirection === "rtl" ? -1 : 1,
|
411
|
+
const T = n.options.columnResizeDirection === "rtl" ? -1 : 1, ge = (R - ((F = w?.startOffset) != null ? F : 0)) * T, de = Math.max(ge / ((P = w?.startSize) != null ? P : 0), -0.999999);
|
412
412
|
return w.columnSizingStart.forEach((Me) => {
|
413
413
|
let [Ae, ce] = Me;
|
414
|
-
|
414
|
+
g[Ae] = Math.round(Math.max(ce + ce * de, 0) * 100) / 100;
|
415
415
|
}), {
|
416
416
|
...w,
|
417
|
-
deltaOffset:
|
417
|
+
deltaOffset: ge,
|
418
418
|
deltaPercentage: de
|
419
419
|
};
|
420
420
|
}), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((w) => ({
|
421
421
|
...w,
|
422
|
-
...
|
422
|
+
...g
|
423
423
|
})));
|
424
|
-
}, d = (v) =>
|
425
|
-
|
424
|
+
}, d = (v) => a("move", v), p = (v) => {
|
425
|
+
a("end", v), n.setColumnSizingInfo((R) => ({
|
426
426
|
...R,
|
427
427
|
isResizingColumn: !1,
|
428
428
|
startOffset: null,
|
@@ -698,18 +698,18 @@ const Qe = {
|
|
698
698
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
699
699
|
}, e.setFilterValue = (t) => {
|
700
700
|
n.setColumnFilters((o) => {
|
701
|
-
const r = e.getFilterFn(), i = o?.find((
|
701
|
+
const r = e.getFilterFn(), i = o?.find((a) => a.id === e.id), l = y(t, i ? i.value : void 0);
|
702
702
|
if (me(r, l, e)) {
|
703
703
|
var u;
|
704
|
-
return (u = o?.filter((
|
704
|
+
return (u = o?.filter((a) => a.id !== e.id)) != null ? u : [];
|
705
705
|
}
|
706
706
|
const s = {
|
707
707
|
id: e.id,
|
708
708
|
value: l
|
709
709
|
};
|
710
710
|
if (i) {
|
711
|
-
var
|
712
|
-
return (
|
711
|
+
var g;
|
712
|
+
return (g = o?.map((a) => a.id === e.id ? s : a)) != null ? g : [];
|
713
713
|
}
|
714
714
|
return o != null && o.length ? [...o, s] : [s];
|
715
715
|
});
|
@@ -882,7 +882,7 @@ function st(e, n, t) {
|
|
882
882
|
const o = e.filter((i) => !n.includes(i.id));
|
883
883
|
return t === "remove" ? o : [...n.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...o];
|
884
884
|
}
|
885
|
-
const
|
885
|
+
const at = {
|
886
886
|
getInitialState: (e) => ({
|
887
887
|
columnOrder: [],
|
888
888
|
...e
|
@@ -901,8 +901,8 @@ const gt = {
|
|
901
901
|
else {
|
902
902
|
const l = [...n], u = [...r];
|
903
903
|
for (; u.length && l.length; ) {
|
904
|
-
const s = l.shift(),
|
905
|
-
|
904
|
+
const s = l.shift(), g = u.findIndex((a) => a.id === s);
|
905
|
+
g > -1 && i.push(u.splice(g, 1)[0]);
|
906
906
|
}
|
907
907
|
i = [...i, ...u];
|
908
908
|
}
|
@@ -915,7 +915,7 @@ const gt = {
|
|
915
915
|
}, ne = 0, oe = 10, Q = () => ({
|
916
916
|
pageIndex: ne,
|
917
917
|
pageSize: oe
|
918
|
-
}),
|
918
|
+
}), gt = {
|
919
919
|
getInitialState: (e) => ({
|
920
920
|
...e,
|
921
921
|
pagination: {
|
@@ -1028,10 +1028,10 @@ const gt = {
|
|
1028
1028
|
};
|
1029
1029
|
}
|
1030
1030
|
if (t === "left") {
|
1031
|
-
var
|
1031
|
+
var g, a;
|
1032
1032
|
return {
|
1033
|
-
left: [...((
|
1034
|
-
right: ((
|
1033
|
+
left: [...((g = r?.left) != null ? g : []).filter((d) => !(o != null && o.includes(d))), ...o],
|
1034
|
+
right: ((a = r?.right) != null ? a : []).filter((d) => !(o != null && o.includes(d)))
|
1035
1035
|
};
|
1036
1036
|
}
|
1037
1037
|
return {
|
@@ -1058,17 +1058,17 @@ const gt = {
|
|
1058
1058
|
e.pin = (t, o, r) => {
|
1059
1059
|
const i = o ? e.getLeafRows().map((s) => {
|
1060
1060
|
let {
|
1061
|
-
id:
|
1061
|
+
id: g
|
1062
1062
|
} = s;
|
1063
|
-
return
|
1063
|
+
return g;
|
1064
1064
|
}) : [], l = r ? e.getParentRows().map((s) => {
|
1065
1065
|
let {
|
1066
|
-
id:
|
1066
|
+
id: g
|
1067
1067
|
} = s;
|
1068
|
-
return
|
1068
|
+
return g;
|
1069
1069
|
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
1070
1070
|
n.setRowPinning((s) => {
|
1071
|
-
var
|
1071
|
+
var g, a;
|
1072
1072
|
if (t === "bottom") {
|
1073
1073
|
var d, p;
|
1074
1074
|
return {
|
@@ -1084,8 +1084,8 @@ const gt = {
|
|
1084
1084
|
};
|
1085
1085
|
}
|
1086
1086
|
return {
|
1087
|
-
top: ((
|
1088
|
-
bottom: ((
|
1087
|
+
top: ((g = s?.top) != null ? g : []).filter((S) => !(u != null && u.has(S))),
|
1088
|
+
bottom: ((a = s?.bottom) != null ? a : []).filter((S) => !(u != null && u.has(S)))
|
1089
1089
|
};
|
1090
1090
|
});
|
1091
1091
|
}, e.getCanPin = () => {
|
@@ -1363,12 +1363,12 @@ const gt = {
|
|
1363
1363
|
function ee(e, n) {
|
1364
1364
|
const t = e.getState().rowSelection, o = [], r = {}, i = function(l, u) {
|
1365
1365
|
return l.map((s) => {
|
1366
|
-
var
|
1367
|
-
const
|
1368
|
-
if (
|
1366
|
+
var g;
|
1367
|
+
const a = se(s, t);
|
1368
|
+
if (a && (o.push(s), r[s.id] = s), (g = s.subRows) != null && g.length && (s = {
|
1369
1369
|
...s,
|
1370
1370
|
subRows: i(s.subRows)
|
1371
|
-
}),
|
1371
|
+
}), a)
|
1372
1372
|
return s;
|
1373
1373
|
}).filter(Boolean);
|
1374
1374
|
};
|
@@ -1394,11 +1394,11 @@ function ie(e, n, t) {
|
|
1394
1394
|
}
|
1395
1395
|
}), r ? "all" : i ? "some" : !1;
|
1396
1396
|
}
|
1397
|
-
const le = /([0-9]+)/gm, pt = (e, n, t) => Pe(x(e.getValue(t)).toLowerCase(), x(n.getValue(t)).toLowerCase()), ft = (e, n, t) => Pe(x(e.getValue(t)), x(n.getValue(t))), mt = (e, n, t) =>
|
1397
|
+
const le = /([0-9]+)/gm, pt = (e, n, t) => Pe(x(e.getValue(t)).toLowerCase(), x(n.getValue(t)).toLowerCase()), ft = (e, n, t) => Pe(x(e.getValue(t)), x(n.getValue(t))), mt = (e, n, t) => ae(x(e.getValue(t)).toLowerCase(), x(n.getValue(t)).toLowerCase()), St = (e, n, t) => ae(x(e.getValue(t)), x(n.getValue(t))), vt = (e, n, t) => {
|
1398
1398
|
const o = e.getValue(t), r = n.getValue(t);
|
1399
1399
|
return o > r ? 1 : o < r ? -1 : 0;
|
1400
|
-
}, Ct = (e, n, t) =>
|
1401
|
-
function
|
1400
|
+
}, Ct = (e, n, t) => ae(e.getValue(t), n.getValue(t));
|
1401
|
+
function ae(e, n) {
|
1402
1402
|
return e === n ? 0 : e > n ? 1 : -1;
|
1403
1403
|
}
|
1404
1404
|
function x(e) {
|
@@ -1468,22 +1468,22 @@ const D = {
|
|
1468
1468
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
1469
1469
|
n.setSorting((l) => {
|
1470
1470
|
const u = l?.find((c) => c.id === e.id), s = l?.findIndex((c) => c.id === e.id);
|
1471
|
-
let
|
1472
|
-
if (l != null && l.length && e.getCanMultiSort() && o ? u ?
|
1471
|
+
let g = [], a, d = i ? t : r === "desc";
|
1472
|
+
if (l != null && l.length && e.getCanMultiSort() && o ? u ? a = "toggle" : a = "add" : l != null && l.length && s !== l.length - 1 ? a = "replace" : u ? a = "toggle" : a = "replace", a === "toggle" && (i || r || (a = "remove")), a === "add") {
|
1473
1473
|
var p;
|
1474
|
-
|
1474
|
+
g = [...l, {
|
1475
1475
|
id: e.id,
|
1476
1476
|
desc: d
|
1477
|
-
}],
|
1477
|
+
}], g.splice(0, g.length - ((p = n.options.maxMultiSortColCount) != null ? p : Number.MAX_SAFE_INTEGER));
|
1478
1478
|
} else
|
1479
|
-
|
1479
|
+
a === "toggle" ? g = l.map((c) => c.id === e.id ? {
|
1480
1480
|
...c,
|
1481
1481
|
desc: d
|
1482
|
-
} : c) :
|
1482
|
+
} : c) : a === "remove" ? g = l.filter((c) => c.id !== e.id) : g = [{
|
1483
1483
|
id: e.id,
|
1484
1484
|
desc: d
|
1485
1485
|
}];
|
1486
|
-
return
|
1486
|
+
return g;
|
1487
1487
|
});
|
1488
1488
|
}, e.getFirstSortDir = () => {
|
1489
1489
|
var t, o;
|
@@ -1582,36 +1582,36 @@ const D = {
|
|
1582
1582
|
e.toggleAllColumnsVisible((o = t.target) == null ? void 0 : o.checked);
|
1583
1583
|
};
|
1584
1584
|
}
|
1585
|
-
}, Se = [Xe, wt,
|
1585
|
+
}, Se = [Xe, wt, at, dt, Qe, _t, ut, Je, gt, ct, Ke];
|
1586
1586
|
function Rt(e) {
|
1587
1587
|
var n;
|
1588
1588
|
(e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
1589
1589
|
let t = {
|
1590
1590
|
_features: Se
|
1591
1591
|
};
|
1592
|
-
const o = t._features.reduce((
|
1592
|
+
const o = t._features.reduce((a, d) => Object.assign(a, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(t)), {}), r = (a) => t.options.mergeOptions ? t.options.mergeOptions(o, a) : {
|
1593
1593
|
...o,
|
1594
|
-
...
|
1594
|
+
...a
|
1595
1595
|
};
|
1596
1596
|
let l = {
|
1597
1597
|
...{},
|
1598
1598
|
...(n = e.initialState) != null ? n : {}
|
1599
1599
|
};
|
1600
|
-
t._features.forEach((
|
1600
|
+
t._features.forEach((a) => {
|
1601
1601
|
var d;
|
1602
|
-
l = (d =
|
1602
|
+
l = (d = a.getInitialState == null ? void 0 : a.getInitialState(l)) != null ? d : l;
|
1603
1603
|
});
|
1604
1604
|
const u = [];
|
1605
1605
|
let s = !1;
|
1606
|
-
const
|
1606
|
+
const g = {
|
1607
1607
|
_features: Se,
|
1608
1608
|
options: {
|
1609
1609
|
...o,
|
1610
1610
|
...e
|
1611
1611
|
},
|
1612
1612
|
initialState: l,
|
1613
|
-
_queue: (
|
1614
|
-
u.push(
|
1613
|
+
_queue: (a) => {
|
1614
|
+
u.push(a), s || (s = !0, Promise.resolve().then(() => {
|
1615
1615
|
for (; u.length; )
|
1616
1616
|
u.shift()();
|
1617
1617
|
s = !1;
|
@@ -1622,32 +1622,32 @@ function Rt(e) {
|
|
1622
1622
|
reset: () => {
|
1623
1623
|
t.setState(t.initialState);
|
1624
1624
|
},
|
1625
|
-
setOptions: (
|
1626
|
-
const d = y(
|
1625
|
+
setOptions: (a) => {
|
1626
|
+
const d = y(a, t.options);
|
1627
1627
|
t.options = r(d);
|
1628
1628
|
},
|
1629
1629
|
getState: () => t.options.state,
|
1630
|
-
setState: (
|
1631
|
-
t.options.onStateChange == null || t.options.onStateChange(
|
1630
|
+
setState: (a) => {
|
1631
|
+
t.options.onStateChange == null || t.options.onStateChange(a);
|
1632
1632
|
},
|
1633
|
-
_getRowId: (
|
1633
|
+
_getRowId: (a, d, p) => {
|
1634
1634
|
var c;
|
1635
|
-
return (c = t.options.getRowId == null ? void 0 : t.options.getRowId(
|
1635
|
+
return (c = t.options.getRowId == null ? void 0 : t.options.getRowId(a, d, p)) != null ? c : `${p ? [p.id, d].join(".") : d}`;
|
1636
1636
|
},
|
1637
1637
|
getCoreRowModel: () => (t._getCoreRowModel || (t._getCoreRowModel = t.options.getCoreRowModel(t)), t._getCoreRowModel()),
|
1638
1638
|
// The final calls start at the bottom of the model,
|
1639
1639
|
// expanded rows, which then work their way up
|
1640
1640
|
getRowModel: () => t.getPaginationRowModel(),
|
1641
1641
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
1642
|
-
getRow: (
|
1643
|
-
let p = (d ? t.getPrePaginationRowModel() : t.getRowModel()).rowsById[
|
1644
|
-
if (!p && (p = t.getCoreRowModel().rowsById[
|
1645
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
1642
|
+
getRow: (a, d) => {
|
1643
|
+
let p = (d ? t.getPrePaginationRowModel() : t.getRowModel()).rowsById[a];
|
1644
|
+
if (!p && (p = t.getCoreRowModel().rowsById[a], !p))
|
1645
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${a}`) : new Error();
|
1646
1646
|
return p;
|
1647
1647
|
},
|
1648
|
-
_getDefaultColumnDef: m(() => [t.options.defaultColumn], (
|
1648
|
+
_getDefaultColumnDef: m(() => [t.options.defaultColumn], (a) => {
|
1649
1649
|
var d;
|
1650
|
-
return
|
1650
|
+
return a = (d = a) != null ? d : {}, {
|
1651
1651
|
header: (p) => {
|
1652
1652
|
const c = p.header.column.columnDef;
|
1653
1653
|
return c.accessorKey ? c.accessorKey : c.accessorFn ? c.id : null;
|
@@ -1658,63 +1658,63 @@ function Rt(e) {
|
|
1658
1658
|
return (c = (f = p.renderValue()) == null || f.toString == null ? void 0 : f.toString()) != null ? c : null;
|
1659
1659
|
},
|
1660
1660
|
...t._features.reduce((p, c) => Object.assign(p, c.getDefaultColumnDef == null ? void 0 : c.getDefaultColumnDef()), {}),
|
1661
|
-
...
|
1661
|
+
...a
|
1662
1662
|
};
|
1663
1663
|
}, {
|
1664
1664
|
debug: () => {
|
1665
|
-
var
|
1666
|
-
return (
|
1665
|
+
var a;
|
1666
|
+
return (a = t.options.debugAll) != null ? a : t.options.debugColumns;
|
1667
1667
|
},
|
1668
1668
|
key: process.env.NODE_ENV === "development" && "getDefaultColumnDef"
|
1669
1669
|
}),
|
1670
1670
|
_getColumnDefs: () => t.options.columns,
|
1671
|
-
getAllColumns: m(() => [t._getColumnDefs()], (
|
1671
|
+
getAllColumns: m(() => [t._getColumnDefs()], (a) => {
|
1672
1672
|
const d = function(p, c, f) {
|
1673
1673
|
return f === void 0 && (f = 0), p.map((S) => {
|
1674
1674
|
const C = je(t, S, f, c), v = S;
|
1675
1675
|
return C.columns = v.columns ? d(v.columns, C, f + 1) : [], C;
|
1676
1676
|
});
|
1677
1677
|
};
|
1678
|
-
return d(
|
1678
|
+
return d(a);
|
1679
1679
|
}, {
|
1680
1680
|
key: process.env.NODE_ENV === "development" && "getAllColumns",
|
1681
1681
|
debug: () => {
|
1682
|
-
var
|
1683
|
-
return (
|
1682
|
+
var a;
|
1683
|
+
return (a = t.options.debugAll) != null ? a : t.options.debugColumns;
|
1684
1684
|
}
|
1685
1685
|
}),
|
1686
|
-
getAllFlatColumns: m(() => [t.getAllColumns()], (
|
1686
|
+
getAllFlatColumns: m(() => [t.getAllColumns()], (a) => a.flatMap((d) => d.getFlatColumns()), {
|
1687
1687
|
key: process.env.NODE_ENV === "development" && "getAllFlatColumns",
|
1688
1688
|
debug: () => {
|
1689
|
-
var
|
1690
|
-
return (
|
1689
|
+
var a;
|
1690
|
+
return (a = t.options.debugAll) != null ? a : t.options.debugColumns;
|
1691
1691
|
}
|
1692
1692
|
}),
|
1693
|
-
_getAllFlatColumnsById: m(() => [t.getAllFlatColumns()], (
|
1693
|
+
_getAllFlatColumnsById: m(() => [t.getAllFlatColumns()], (a) => a.reduce((d, p) => (d[p.id] = p, d), {}), {
|
1694
1694
|
key: process.env.NODE_ENV === "development" && "getAllFlatColumnsById",
|
1695
1695
|
debug: () => {
|
1696
|
-
var
|
1697
|
-
return (
|
1696
|
+
var a;
|
1697
|
+
return (a = t.options.debugAll) != null ? a : t.options.debugColumns;
|
1698
1698
|
}
|
1699
1699
|
}),
|
1700
|
-
getAllLeafColumns: m(() => [t.getAllColumns(), t._getOrderColumnsFn()], (
|
1701
|
-
let p =
|
1700
|
+
getAllLeafColumns: m(() => [t.getAllColumns(), t._getOrderColumnsFn()], (a, d) => {
|
1701
|
+
let p = a.flatMap((c) => c.getLeafColumns());
|
1702
1702
|
return d(p);
|
1703
1703
|
}, {
|
1704
1704
|
key: process.env.NODE_ENV === "development" && "getAllLeafColumns",
|
1705
1705
|
debug: () => {
|
1706
|
-
var
|
1707
|
-
return (
|
1706
|
+
var a;
|
1707
|
+
return (a = t.options.debugAll) != null ? a : t.options.debugColumns;
|
1708
1708
|
}
|
1709
1709
|
}),
|
1710
|
-
getColumn: (
|
1711
|
-
const d = t._getAllFlatColumnsById()[
|
1712
|
-
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${
|
1710
|
+
getColumn: (a) => {
|
1711
|
+
const d = t._getAllFlatColumnsById()[a];
|
1712
|
+
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${a}' does not exist.`), d;
|
1713
1713
|
}
|
1714
1714
|
};
|
1715
|
-
Object.assign(t,
|
1716
|
-
for (let
|
1717
|
-
const d = t._features[
|
1715
|
+
Object.assign(t, g);
|
1716
|
+
for (let a = 0; a < t._features.length; a++) {
|
1717
|
+
const d = t._features[a];
|
1718
1718
|
d == null || d.createTable == null || d.createTable(t);
|
1719
1719
|
}
|
1720
1720
|
return t;
|
@@ -1729,13 +1729,13 @@ function ht(e, n, t, o) {
|
|
1729
1729
|
column: t,
|
1730
1730
|
getValue: () => n.getValue(o),
|
1731
1731
|
renderValue: r,
|
1732
|
-
getContext: m(() => [e, t, n, i], (l, u, s,
|
1732
|
+
getContext: m(() => [e, t, n, i], (l, u, s, g) => ({
|
1733
1733
|
table: l,
|
1734
1734
|
column: u,
|
1735
1735
|
row: s,
|
1736
|
-
cell:
|
1737
|
-
getValue:
|
1738
|
-
renderValue:
|
1736
|
+
cell: g,
|
1737
|
+
getValue: g.getValue,
|
1738
|
+
renderValue: g.renderValue
|
1739
1739
|
}), {
|
1740
1740
|
key: process.env.NODE_ENV === "development" && "cell.getContext",
|
1741
1741
|
debug: () => e.options.debugAll
|
@@ -1757,42 +1757,42 @@ const $t = (e, n, t, o, r, i, l) => {
|
|
1757
1757
|
getValue: (s) => {
|
1758
1758
|
if (u._valuesCache.hasOwnProperty(s))
|
1759
1759
|
return u._valuesCache[s];
|
1760
|
-
const
|
1761
|
-
if (
|
1762
|
-
return u._valuesCache[s] =
|
1760
|
+
const g = e.getColumn(s);
|
1761
|
+
if (g != null && g.accessorFn)
|
1762
|
+
return u._valuesCache[s] = g.accessorFn(u.original, o), u._valuesCache[s];
|
1763
1763
|
},
|
1764
1764
|
getUniqueValues: (s) => {
|
1765
1765
|
if (u._uniqueValuesCache.hasOwnProperty(s))
|
1766
1766
|
return u._uniqueValuesCache[s];
|
1767
|
-
const
|
1768
|
-
if (
|
1769
|
-
return
|
1767
|
+
const g = e.getColumn(s);
|
1768
|
+
if (g != null && g.accessorFn)
|
1769
|
+
return g.columnDef.getUniqueValues ? (u._uniqueValuesCache[s] = g.columnDef.getUniqueValues(u.original, o), u._uniqueValuesCache[s]) : (u._uniqueValuesCache[s] = [u.getValue(s)], u._uniqueValuesCache[s]);
|
1770
1770
|
},
|
1771
1771
|
renderValue: (s) => {
|
1772
|
-
var
|
1773
|
-
return (
|
1772
|
+
var g;
|
1773
|
+
return (g = u.getValue(s)) != null ? g : e.options.renderFallbackValue;
|
1774
1774
|
},
|
1775
1775
|
subRows: i ?? [],
|
1776
1776
|
getLeafRows: () => Ue(u.subRows, (s) => s.subRows),
|
1777
1777
|
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
1778
1778
|
getParentRows: () => {
|
1779
|
-
let s = [],
|
1779
|
+
let s = [], g = u;
|
1780
1780
|
for (; ; ) {
|
1781
|
-
const
|
1782
|
-
if (!
|
1781
|
+
const a = g.getParentRow();
|
1782
|
+
if (!a)
|
1783
1783
|
break;
|
1784
|
-
s.push(
|
1784
|
+
s.push(a), g = a;
|
1785
1785
|
}
|
1786
1786
|
return s.reverse();
|
1787
1787
|
},
|
1788
|
-
getAllCells: m(() => [e.getAllLeafColumns()], (s) => s.map((
|
1788
|
+
getAllCells: m(() => [e.getAllLeafColumns()], (s) => s.map((g) => ht(e, u, g, g.id)), {
|
1789
1789
|
key: process.env.NODE_ENV === "development" && "row.getAllCells",
|
1790
1790
|
debug: () => {
|
1791
1791
|
var s;
|
1792
1792
|
return (s = e.options.debugAll) != null ? s : e.options.debugRows;
|
1793
1793
|
}
|
1794
1794
|
}),
|
1795
|
-
_getAllCellsByColumnId: m(() => [u.getAllCells()], (s) => s.reduce((
|
1795
|
+
_getAllCellsByColumnId: m(() => [u.getAllCells()], (s) => s.reduce((g, a) => (g[a.column.id] = a, g), {}), {
|
1796
1796
|
key: process.env.NODE_ENV === "production" && "row.getAllCellsByColumnId",
|
1797
1797
|
debug: () => {
|
1798
1798
|
var s;
|
@@ -1801,8 +1801,8 @@ const $t = (e, n, t, o, r, i, l) => {
|
|
1801
1801
|
})
|
1802
1802
|
};
|
1803
1803
|
for (let s = 0; s < e._features.length; s++) {
|
1804
|
-
const
|
1805
|
-
|
1804
|
+
const g = e._features[s];
|
1805
|
+
g == null || g.createRow == null || g.createRow(u, e);
|
1806
1806
|
}
|
1807
1807
|
return u;
|
1808
1808
|
};
|
@@ -1815,11 +1815,11 @@ function Ft() {
|
|
1815
1815
|
}, o = function(r, i, l) {
|
1816
1816
|
i === void 0 && (i = 0);
|
1817
1817
|
const u = [];
|
1818
|
-
for (let
|
1819
|
-
const
|
1820
|
-
if (t.flatRows.push(
|
1818
|
+
for (let g = 0; g < r.length; g++) {
|
1819
|
+
const a = $t(e, e._getRowId(r[g], g, l), r[g], g, i, void 0, l?.id);
|
1820
|
+
if (t.flatRows.push(a), t.rowsById[a.id] = a, u.push(a), e.options.getSubRows) {
|
1821
1821
|
var s;
|
1822
|
-
|
1822
|
+
a.originalSubRows = e.options.getSubRows(r[g], g), (s = a.originalSubRows) != null && s.length && (a.subRows = o(a.originalSubRows, i + 1, a));
|
1823
1823
|
}
|
1824
1824
|
}
|
1825
1825
|
return u;
|
@@ -1841,38 +1841,38 @@ function Vt() {
|
|
1841
1841
|
if (!t.rows.length || !(n != null && n.length))
|
1842
1842
|
return t;
|
1843
1843
|
const o = e.getState().sorting, r = [], i = o.filter((s) => {
|
1844
|
-
var
|
1845
|
-
return (
|
1844
|
+
var g;
|
1845
|
+
return (g = e.getColumn(s.id)) == null ? void 0 : g.getCanSort();
|
1846
1846
|
}), l = {};
|
1847
1847
|
i.forEach((s) => {
|
1848
|
-
const
|
1849
|
-
|
1850
|
-
sortUndefined:
|
1851
|
-
invertSorting:
|
1852
|
-
sortingFn:
|
1848
|
+
const g = e.getColumn(s.id);
|
1849
|
+
g && (l[s.id] = {
|
1850
|
+
sortUndefined: g.columnDef.sortUndefined,
|
1851
|
+
invertSorting: g.columnDef.invertSorting,
|
1852
|
+
sortingFn: g.getSortingFn()
|
1853
1853
|
});
|
1854
1854
|
});
|
1855
1855
|
const u = (s) => {
|
1856
|
-
const
|
1857
|
-
...
|
1856
|
+
const g = s.map((a) => ({
|
1857
|
+
...a
|
1858
1858
|
}));
|
1859
|
-
return
|
1859
|
+
return g.sort((a, d) => {
|
1860
1860
|
for (let c = 0; c < i.length; c += 1) {
|
1861
1861
|
var p;
|
1862
1862
|
const f = i[c], S = l[f.id], C = (p = f?.desc) != null ? p : !1;
|
1863
1863
|
let v = 0;
|
1864
1864
|
if (S.sortUndefined) {
|
1865
|
-
const R =
|
1865
|
+
const R = a.getValue(f.id), w = d.getValue(f.id), F = R === void 0, P = w === void 0;
|
1866
1866
|
(F || P) && (v = F && P ? 0 : F ? S.sortUndefined : -S.sortUndefined);
|
1867
1867
|
}
|
1868
|
-
if (v === 0 && (v = S.sortingFn(
|
1868
|
+
if (v === 0 && (v = S.sortingFn(a, d, f.id)), v !== 0)
|
1869
1869
|
return C && (v *= -1), S.invertSorting && (v *= -1), v;
|
1870
1870
|
}
|
1871
|
-
return
|
1872
|
-
}),
|
1871
|
+
return a.index - d.index;
|
1872
|
+
}), g.forEach((a) => {
|
1873
1873
|
var d;
|
1874
|
-
r.push(
|
1875
|
-
}),
|
1874
|
+
r.push(a), (d = a.subRows) != null && d.length && (a.subRows = u(a.subRows));
|
1875
|
+
}), g;
|
1876
1876
|
};
|
1877
1877
|
return {
|
1878
1878
|
rows: u(t.rows),
|
@@ -1914,8 +1914,8 @@ function Pt(e) {
|
|
1914
1914
|
flatRows: u,
|
1915
1915
|
rowsById: s
|
1916
1916
|
} = o;
|
1917
|
-
const
|
1918
|
-
l = l.slice(
|
1917
|
+
const g = r * i, a = g + r;
|
1918
|
+
l = l.slice(g, a);
|
1919
1919
|
let d;
|
1920
1920
|
n.options.paginateExpandedRows ? d = {
|
1921
1921
|
rows: l,
|
@@ -2045,7 +2045,8 @@ const Tt = /* @__PURE__ */ Ce({
|
|
2045
2045
|
columns: {},
|
2046
2046
|
data: {},
|
2047
2047
|
pageSize: { default: 10 },
|
2048
|
-
showPagination: { type: Boolean, default: !0 }
|
2048
|
+
showPagination: { type: Boolean, default: !0 },
|
2049
|
+
totalItems: { default: 0 }
|
2049
2050
|
}, {
|
2050
2051
|
sorting: {},
|
2051
2052
|
sortingModifiers: {},
|
@@ -2104,14 +2105,14 @@ const Tt = /* @__PURE__ */ Ce({
|
|
2104
2105
|
key: s.id
|
2105
2106
|
}, {
|
2106
2107
|
default: V(() => [
|
2107
|
-
(h(!0), H(N, null, O(s.headers, (
|
2108
|
-
key:
|
2108
|
+
(h(!0), H(N, null, O(s.headers, (g) => (h(), M(_(Le), {
|
2109
|
+
key: g.id
|
2109
2110
|
}, {
|
2110
2111
|
default: V(() => [
|
2111
|
-
|
2112
|
+
g.isPlaceholder ? U("", !0) : (h(), M(_(ve), {
|
2112
2113
|
key: 0,
|
2113
|
-
render:
|
2114
|
-
props:
|
2114
|
+
render: g.column.columnDef.header,
|
2115
|
+
props: g.getContext()
|
2115
2116
|
}, null, 8, ["render", "props"]))
|
2116
2117
|
]),
|
2117
2118
|
_: 2
|
@@ -2129,13 +2130,13 @@ const Tt = /* @__PURE__ */ Ce({
|
|
2129
2130
|
"data-state": s.getIsSelected() ? "selected" : void 0
|
2130
2131
|
}, {
|
2131
2132
|
default: V(() => [
|
2132
|
-
(h(!0), H(N, null, O(s.getVisibleCells(), (
|
2133
|
-
key:
|
2133
|
+
(h(!0), H(N, null, O(s.getVisibleCells(), (g) => (h(), M(_(pe), {
|
2134
|
+
key: g.id
|
2134
2135
|
}, {
|
2135
2136
|
default: V(() => [
|
2136
2137
|
I(_(ve), {
|
2137
|
-
render:
|
2138
|
-
props:
|
2138
|
+
render: g.column.columnDef.cell,
|
2139
|
+
props: g.getContext()
|
2139
2140
|
}, null, 8, ["render", "props"])
|
2140
2141
|
]),
|
2141
2142
|
_: 2
|
@@ -2164,7 +2165,7 @@ const Tt = /* @__PURE__ */ Ce({
|
|
2164
2165
|
default: V(() => [
|
2165
2166
|
I(_(Te), {
|
2166
2167
|
class: "float-right",
|
2167
|
-
total:
|
2168
|
+
total: l.totalItems,
|
2168
2169
|
pageIndex: _(i).getState().pagination.pageIndex,
|
2169
2170
|
pageSize: _(i).getState().pagination.pageSize,
|
2170
2171
|
setPageIndex: (s) => _(i).setPageIndex(s),
|
@@ -4,6 +4,7 @@ declare const _default: <TData, TValue>(__VLS_props: {
|
|
4
4
|
columns: ColumnDef<TData, TValue>[];
|
5
5
|
pageSize?: number | undefined;
|
6
6
|
showPagination?: boolean | undefined;
|
7
|
+
totalItems?: number | undefined;
|
7
8
|
sorting?: SortingState | undefined;
|
8
9
|
pagination?: PaginationState | undefined;
|
9
10
|
selection?: RowSelectionState | undefined;
|
@@ -21,6 +22,7 @@ declare const _default: <TData, TValue>(__VLS_props: {
|
|
21
22
|
columns: ColumnDef<TData, TValue>[];
|
22
23
|
pageSize?: number | undefined;
|
23
24
|
showPagination?: boolean | undefined;
|
25
|
+
totalItems?: number | undefined;
|
24
26
|
sorting?: SortingState | undefined;
|
25
27
|
pagination?: PaginationState | undefined;
|
26
28
|
selection?: RowSelectionState | undefined;
|
@@ -42,6 +44,7 @@ declare const _default: <TData, TValue>(__VLS_props: {
|
|
42
44
|
columns: ColumnDef<TData, TValue>[];
|
43
45
|
pageSize?: number | undefined;
|
44
46
|
showPagination?: boolean | undefined;
|
47
|
+
totalItems?: number | undefined;
|
45
48
|
sorting?: SortingState | undefined;
|
46
49
|
pagination?: PaginationState | undefined;
|
47
50
|
selection?: RowSelectionState | undefined;
|
@@ -7,7 +7,7 @@ import { _ as s } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang
|
|
7
7
|
import { _ as x } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-OnsFZa8H.js";
|
8
8
|
import { _ } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-4QJziEvg.js";
|
9
9
|
import { _ as y } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-DN__NJQ9.js";
|
10
|
-
import { _ as H } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-
|
10
|
+
import { _ as H } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-R89LBsoI.js";
|
11
11
|
export {
|
12
12
|
H as BuiDataTable,
|
13
13
|
o as BuiTable,
|
package/dist/index.js
CHANGED
@@ -114,7 +114,7 @@ import { _ as wt } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-rLz2b
|
|
114
114
|
import { _ as It } from "./BuiTableCaption.vue_vue_type_script_setup_true_lang-OnsFZa8H.js";
|
115
115
|
import { _ as Ft } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-4QJziEvg.js";
|
116
116
|
import { _ as Lt } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-DN__NJQ9.js";
|
117
|
-
import { _ as Ht } from "./BuiDataTable.vue_vue_type_script_setup_true_lang-
|
117
|
+
import { _ as Ht } from "./BuiDataTable.vue_vue_type_script_setup_true_lang-R89LBsoI.js";
|
118
118
|
import { BuiTabsList as ht, BuiTabsTrigger as kt, tabsListVariants as yt, tabsTriggerVariants as Et } from "./components/ui/tabs/index.js";
|
119
119
|
import { BuiTextarea as Jt, textareaVariants as Nt } from "./components/ui/textarea/index.js";
|
120
120
|
import { BuiToast as Wt, BuiToaster as jt, toastVariants as zt } from "./components/ui/toast/index.js";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@soft-stech/bootsman-ui-shadcn",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.2",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist",
|
@@ -11,6 +11,23 @@
|
|
11
11
|
"sideEffects": [
|
12
12
|
"**/*.css"
|
13
13
|
],
|
14
|
+
"scripts": {
|
15
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
16
|
+
"preview": "vite preview",
|
17
|
+
"test:unit": "vitest",
|
18
|
+
"test:e2e": "playwright test",
|
19
|
+
"build-only": "vite build",
|
20
|
+
"type-check": "vue-tsc --build --force",
|
21
|
+
"type-build": "vue-tsc --declaration --emitDeclarationOnly",
|
22
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
23
|
+
"format": "prettier --write src/",
|
24
|
+
"bumpp": "bumpp package.json",
|
25
|
+
"prepublishOnly": "npm run build",
|
26
|
+
"story:dev": "histoire dev",
|
27
|
+
"story:build": "DOCS=true histoire build",
|
28
|
+
"story:preview": "histoire preview",
|
29
|
+
"coverage": "vitest run --coverage"
|
30
|
+
},
|
14
31
|
"dependencies": {
|
15
32
|
"@tanstack/vue-table": "^8.11.6",
|
16
33
|
"@vee-validate/zod": "^4.12.4",
|
@@ -56,21 +73,5 @@
|
|
56
73
|
"vite-plugin-dts": "^3.7.2",
|
57
74
|
"vitest": "^1.0.4",
|
58
75
|
"vue-tsc": "^1.8.27"
|
59
|
-
},
|
60
|
-
"scripts": {
|
61
|
-
"build": "run-p type-check \"build-only {@}\" --",
|
62
|
-
"preview": "vite preview",
|
63
|
-
"test:unit": "vitest",
|
64
|
-
"test:e2e": "playwright test",
|
65
|
-
"build-only": "vite build",
|
66
|
-
"type-check": "vue-tsc --build --force",
|
67
|
-
"type-build": "vue-tsc --declaration --emitDeclarationOnly",
|
68
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
69
|
-
"format": "prettier --write src/",
|
70
|
-
"bumpp": "bumpp package.json",
|
71
|
-
"story:dev": "histoire dev",
|
72
|
-
"story:build": "DOCS=true histoire build",
|
73
|
-
"story:preview": "histoire preview",
|
74
|
-
"coverage": "vitest run --coverage"
|
75
76
|
}
|
76
|
-
}
|
77
|
+
}
|
@@ -61,9 +61,10 @@ const data = ref<Task[]>(tasks)
|
|
61
61
|
|
62
62
|
const sorting = ref<SortingState>([{ id: 'status', desc: false }])
|
63
63
|
const pagination = ref<PaginationState>({
|
64
|
-
pageIndex:
|
64
|
+
pageIndex: 0,
|
65
65
|
pageSize: 10
|
66
66
|
})
|
67
|
+
const totalItems = tasks.length
|
67
68
|
|
68
69
|
const selection = ref<RowSelectionState>({})
|
69
70
|
function updateSelection(val: RowSelectionState) {
|
@@ -81,6 +82,7 @@ function updateSelection(val: RowSelectionState) {
|
|
81
82
|
v-model:sorting="sorting"
|
82
83
|
v-model:pagination="pagination"
|
83
84
|
@update:selection="updateSelection"
|
85
|
+
:total-items="totalItems"
|
84
86
|
class="caption-top"
|
85
87
|
>
|
86
88
|
<template #caption="{ table }">
|
@@ -32,8 +32,9 @@ const props = withDefaults(
|
|
32
32
|
data: TData[]
|
33
33
|
pageSize?: number
|
34
34
|
showPagination?: boolean
|
35
|
+
totalItems?: number
|
35
36
|
}>(),
|
36
|
-
{ pageSize: 10, showPagination: true }
|
37
|
+
{ pageSize: 10, showPagination: true, totalItems: 0 }
|
37
38
|
)
|
38
39
|
|
39
40
|
const sorting = defineModel<SortingState>('sorting')
|
@@ -111,7 +112,7 @@ const table = useVueTable({
|
|
111
112
|
<BuiTableCell :colspan="columns.length">
|
112
113
|
<BuiPaginationCommon
|
113
114
|
class="float-right"
|
114
|
-
:total="
|
115
|
+
:total="totalItems"
|
115
116
|
:pageIndex="table.getState().pagination.pageIndex"
|
116
117
|
:pageSize="table.getState().pagination.pageSize as PageSize"
|
117
118
|
:setPageIndex="(v: number) => table.setPageIndex(v)"
|