@prefabs.tech/vue3-tanstack-table 0.29.1 → 0.31.0
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/dist/PrefabsTechVue3TanstackTable.es.js +534 -538
- package/dist/PrefabsTechVue3TanstackTable.umd.js +2 -20
- package/dist/src/components/FilesPresentation/Index.vue.d.ts.map +1 -1
- package/dist/src/components/FilesTable/Index.vue.d.ts.map +1 -1
- package/dist/src/components/Table.vue.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +7 -7
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/{utils.d.ts → utilities.d.ts} +1 -1
- package/dist/src/utilities.d.ts.map +1 -0
- package/package.json +19 -28
- package/dist/src/utils.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Q, h as Y, isRef as Jt, shallowRef as Zt, watch as
|
|
2
|
-
import { DebouncedInput as Ft, ButtonElement as Z, formatDateTime as nn, formatDate as on, Tooltip as rn, Dropdown as ln, ConfirmationModal as sn, Popup as an, SortableList as un, getStorage as
|
|
1
|
+
import { defineComponent as Q, h as Y, isRef as Jt, shallowRef as Zt, watch as Ct, ref as K, watchEffect as en, unref as y, computed as B, openBlock as S, createElementBlock as C, createElementVNode as A, toDisplayString as N, Fragment as H, renderList as z, createCommentVNode as D, createVNode as E, createBlock as _, withCtx as G, normalizeClass as ge, normalizeStyle as oe, mergeProps as te, resolveDynamicComponent as ue, createTextVNode as tn, renderSlot as J, createSlots as Rt } from "vue";
|
|
2
|
+
import { DebouncedInput as Ft, ButtonElement as Z, formatDateTime as nn, formatDate as on, Tooltip as rn, Dropdown as ln, ConfirmationModal as sn, Popup as an, SortableList as un, getStorage as cn, LoadingIcon as dn, FilesList as gn } from "@prefabs.tech/vue3-ui";
|
|
3
3
|
import { SelectInput as fn, DatePicker as pn, NumberInput as tt, Checkbox as Te } from "@prefabs.tech/vue3-form";
|
|
4
4
|
const bt = /^[a-z0-9]+(-[a-z0-9]+)*$/, be = (e, o, t, n = "") => {
|
|
5
5
|
const i = e.split(":");
|
|
@@ -17,7 +17,7 @@ const bt = /^[a-z0-9]+(-[a-z0-9]+)*$/, be = (e, o, t, n = "") => {
|
|
|
17
17
|
prefix: a,
|
|
18
18
|
name: s
|
|
19
19
|
};
|
|
20
|
-
return o && !
|
|
20
|
+
return o && !ye(u) ? null : u;
|
|
21
21
|
}
|
|
22
22
|
const r = i[0], l = r.split("-");
|
|
23
23
|
if (l.length > 1) {
|
|
@@ -26,7 +26,7 @@ const bt = /^[a-z0-9]+(-[a-z0-9]+)*$/, be = (e, o, t, n = "") => {
|
|
|
26
26
|
prefix: l.shift(),
|
|
27
27
|
name: l.join("-")
|
|
28
28
|
};
|
|
29
|
-
return o && !
|
|
29
|
+
return o && !ye(s) ? null : s;
|
|
30
30
|
}
|
|
31
31
|
if (t && n === "") {
|
|
32
32
|
const s = {
|
|
@@ -34,10 +34,10 @@ const bt = /^[a-z0-9]+(-[a-z0-9]+)*$/, be = (e, o, t, n = "") => {
|
|
|
34
34
|
prefix: "",
|
|
35
35
|
name: r
|
|
36
36
|
};
|
|
37
|
-
return o && !
|
|
37
|
+
return o && !ye(s, t) ? null : s;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
|
-
},
|
|
40
|
+
}, ye = (e, o) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
|
41
41
|
// Check name: cannot be empty
|
|
42
42
|
((o && e.prefix === "" || e.prefix) && e.name) : !1, Pt = Object.freeze(
|
|
43
43
|
{
|
|
@@ -175,7 +175,7 @@ function xt(e, o) {
|
|
|
175
175
|
n ? e.icons[t] = n : e.missing.add(t);
|
|
176
176
|
}) : [];
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function yn(e, o, t) {
|
|
179
179
|
try {
|
|
180
180
|
if (typeof t.body == "string")
|
|
181
181
|
return e.icons[o] = { ...t }, !0;
|
|
@@ -187,7 +187,7 @@ let fe = !1;
|
|
|
187
187
|
function At(e) {
|
|
188
188
|
return typeof e == "boolean" && (fe = e), fe;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Cn(e) {
|
|
191
191
|
const o = typeof e == "string" ? be(e, !0, fe) : e;
|
|
192
192
|
if (o) {
|
|
193
193
|
const t = ie(o.provider, o.prefix), n = o.name;
|
|
@@ -199,7 +199,7 @@ function Rn(e, o) {
|
|
|
199
199
|
if (!t)
|
|
200
200
|
return !1;
|
|
201
201
|
const n = ie(t.provider, t.prefix);
|
|
202
|
-
return o ?
|
|
202
|
+
return o ? yn(n, t.name, o) : (n.missing.add(t.name), !0);
|
|
203
203
|
}
|
|
204
204
|
function Fn(e, o) {
|
|
205
205
|
if (typeof e != "object")
|
|
@@ -211,7 +211,7 @@ function Fn(e, o) {
|
|
|
211
211
|
})), i;
|
|
212
212
|
}
|
|
213
213
|
const t = e.prefix;
|
|
214
|
-
if (!
|
|
214
|
+
if (!ye({
|
|
215
215
|
prefix: t,
|
|
216
216
|
name: "a"
|
|
217
217
|
}))
|
|
@@ -323,12 +323,12 @@ function Dn(e, o) {
|
|
|
323
323
|
));
|
|
324
324
|
});
|
|
325
325
|
const l = n.width, s = n.height, a = i.width, u = i.height;
|
|
326
|
-
let
|
|
327
|
-
l === null ? (f = s === null ? "1em" : s === "auto" ? u : s,
|
|
328
|
-
const g = {},
|
|
326
|
+
let d, f;
|
|
327
|
+
l === null ? (f = s === null ? "1em" : s === "auto" ? u : s, d = it(f, a / u)) : (d = l === "auto" ? a : l, f = s === null ? it(d, u / a) : s === "auto" ? u : s);
|
|
328
|
+
const g = {}, c = (p, h) => {
|
|
329
329
|
An(h) || (g[p] = h.toString());
|
|
330
330
|
};
|
|
331
|
-
|
|
331
|
+
c("width", d), c("height", f);
|
|
332
332
|
const m = [i.left, i.top, a, u];
|
|
333
333
|
return g.viewBox = m.join(" "), {
|
|
334
334
|
attributes: g,
|
|
@@ -391,11 +391,11 @@ function We(e) {
|
|
|
391
391
|
const Qe = /* @__PURE__ */ Object.create(null), re = [
|
|
392
392
|
"https://api.simplesvg.com",
|
|
393
393
|
"https://api.unisvg.com"
|
|
394
|
-
],
|
|
394
|
+
], Ce = [];
|
|
395
395
|
for (; re.length > 0; )
|
|
396
|
-
re.length === 1 || Math.random() > 0.5 ?
|
|
396
|
+
re.length === 1 || Math.random() > 0.5 ? Ce.push(re.shift()) : Ce.push(re.pop());
|
|
397
397
|
Qe[""] = We({
|
|
398
|
-
resources: ["https://api.iconify.design"].concat(
|
|
398
|
+
resources: ["https://api.iconify.design"].concat(Ce)
|
|
399
399
|
});
|
|
400
400
|
function Ln(e, o) {
|
|
401
401
|
const t = We(o);
|
|
@@ -525,14 +525,14 @@ function jn(e) {
|
|
|
525
525
|
return;
|
|
526
526
|
n = i;
|
|
527
527
|
const r = i.provider, l = i.prefix, s = i.name, a = t[r] || (t[r] = /* @__PURE__ */ Object.create(null)), u = a[l] || (a[l] = ie(r, l));
|
|
528
|
-
let
|
|
529
|
-
s in u.icons ?
|
|
528
|
+
let d;
|
|
529
|
+
s in u.icons ? d = o.loaded : l === "" || u.missing.has(s) ? d = o.missing : d = o.pending;
|
|
530
530
|
const f = {
|
|
531
531
|
provider: r,
|
|
532
532
|
prefix: l,
|
|
533
533
|
name: s
|
|
534
534
|
};
|
|
535
|
-
|
|
535
|
+
d.push(f);
|
|
536
536
|
}), o;
|
|
537
537
|
}
|
|
538
538
|
function _t(e, o) {
|
|
@@ -622,8 +622,8 @@ function Xn(e, o, t, n) {
|
|
|
622
622
|
} else
|
|
623
623
|
l = e.resources.slice(r).concat(e.resources.slice(0, r));
|
|
624
624
|
const s = Date.now();
|
|
625
|
-
let a = "pending", u = 0,
|
|
626
|
-
typeof n == "function" &&
|
|
625
|
+
let a = "pending", u = 0, d, f = null, g = [], c = [];
|
|
626
|
+
typeof n == "function" && c.push(n);
|
|
627
627
|
function m() {
|
|
628
628
|
f && (clearTimeout(f), f = null);
|
|
629
629
|
}
|
|
@@ -633,7 +633,7 @@ function Xn(e, o, t, n) {
|
|
|
633
633
|
}), g = [];
|
|
634
634
|
}
|
|
635
635
|
function h(w, I) {
|
|
636
|
-
I && (
|
|
636
|
+
I && (c = []), typeof w == "function" && c.push(w);
|
|
637
637
|
}
|
|
638
638
|
function R() {
|
|
639
639
|
return {
|
|
@@ -647,8 +647,8 @@ function Xn(e, o, t, n) {
|
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
function $() {
|
|
650
|
-
a = "failed",
|
|
651
|
-
w(void 0,
|
|
650
|
+
a = "failed", c.forEach((w) => {
|
|
651
|
+
w(void 0, d);
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
654
|
function P() {
|
|
@@ -669,18 +669,18 @@ function Xn(e, o, t, n) {
|
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
671
671
|
if (I === "abort") {
|
|
672
|
-
|
|
672
|
+
d = V, $();
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
if (k) {
|
|
676
|
-
|
|
676
|
+
d = V, g.length || (l.length ? v() : $());
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
679
|
if (m(), P(), !e.random) {
|
|
680
680
|
const L = e.resources.indexOf(w.resource);
|
|
681
681
|
L !== -1 && L !== e.index && (e.index = L);
|
|
682
682
|
}
|
|
683
|
-
a = "completed",
|
|
683
|
+
a = "completed", c.forEach((L) => {
|
|
684
684
|
L(V);
|
|
685
685
|
});
|
|
686
686
|
}
|
|
@@ -720,7 +720,7 @@ function Mt(e) {
|
|
|
720
720
|
t = t.filter((s) => s().status === "pending");
|
|
721
721
|
}
|
|
722
722
|
function i(s, a, u) {
|
|
723
|
-
const
|
|
723
|
+
const d = Xn(
|
|
724
724
|
o,
|
|
725
725
|
s,
|
|
726
726
|
a,
|
|
@@ -728,7 +728,7 @@ function Mt(e) {
|
|
|
728
728
|
n(), u && u(f, g);
|
|
729
729
|
}
|
|
730
730
|
);
|
|
731
|
-
return t.push(
|
|
731
|
+
return t.push(d), d;
|
|
732
732
|
}
|
|
733
733
|
function r(s) {
|
|
734
734
|
return t.find((a) => s(a)) || null;
|
|
@@ -829,23 +829,23 @@ function to(e, o) {
|
|
|
829
829
|
if (e.loadIcons && (i.length > 1 || !r)) {
|
|
830
830
|
at(
|
|
831
831
|
e.loadIcons(i, n, t),
|
|
832
|
-
(
|
|
833
|
-
le(e, i,
|
|
832
|
+
(d) => {
|
|
833
|
+
le(e, i, d);
|
|
834
834
|
}
|
|
835
835
|
);
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
838
|
if (r) {
|
|
839
|
-
i.forEach((
|
|
840
|
-
const f = r(
|
|
839
|
+
i.forEach((d) => {
|
|
840
|
+
const f = r(d, n, t);
|
|
841
841
|
at(f, (g) => {
|
|
842
|
-
const
|
|
842
|
+
const c = g ? {
|
|
843
843
|
prefix: n,
|
|
844
844
|
icons: {
|
|
845
|
-
[
|
|
845
|
+
[d]: g
|
|
846
846
|
}
|
|
847
847
|
} : null;
|
|
848
|
-
le(e, [
|
|
848
|
+
le(e, [d], c);
|
|
849
849
|
});
|
|
850
850
|
});
|
|
851
851
|
return;
|
|
@@ -858,9 +858,9 @@ function to(e, o) {
|
|
|
858
858
|
le(e, l, null);
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
861
|
-
a.prepare(t, n, l).forEach((
|
|
862
|
-
Jn(t,
|
|
863
|
-
le(e,
|
|
861
|
+
a.prepare(t, n, l).forEach((d) => {
|
|
862
|
+
Jn(t, d, (f) => {
|
|
863
|
+
le(e, d.icons, f);
|
|
864
864
|
});
|
|
865
865
|
});
|
|
866
866
|
}));
|
|
@@ -883,15 +883,15 @@ const no = (e, o) => {
|
|
|
883
883
|
const i = /* @__PURE__ */ Object.create(null), r = [];
|
|
884
884
|
let l, s;
|
|
885
885
|
return n.pending.forEach((a) => {
|
|
886
|
-
const { provider: u, prefix:
|
|
887
|
-
if (
|
|
886
|
+
const { provider: u, prefix: d } = a;
|
|
887
|
+
if (d === s && u === l)
|
|
888
888
|
return;
|
|
889
|
-
l = u, s =
|
|
889
|
+
l = u, s = d, r.push(ie(u, d));
|
|
890
890
|
const f = i[u] || (i[u] = /* @__PURE__ */ Object.create(null));
|
|
891
|
-
f[
|
|
891
|
+
f[d] || (f[d] = []);
|
|
892
892
|
}), n.pending.forEach((a) => {
|
|
893
|
-
const { provider: u, prefix:
|
|
894
|
-
|
|
893
|
+
const { provider: u, prefix: d, name: f } = a, g = ie(u, d), c = g.pendingIcons || (g.pendingIcons = /* @__PURE__ */ new Set());
|
|
894
|
+
c.has(f) || (c.add(f), i[u][d].push(f));
|
|
895
895
|
}), r.forEach((a) => {
|
|
896
896
|
const u = i[a.provider][a.prefix];
|
|
897
897
|
u.length && to(a, u);
|
|
@@ -975,19 +975,19 @@ const ut = {
|
|
|
975
975
|
backgroundColor: "currentColor"
|
|
976
976
|
}, Et = {
|
|
977
977
|
backgroundColor: "transparent"
|
|
978
|
-
},
|
|
978
|
+
}, ct = {
|
|
979
979
|
Image: "var(--svg)",
|
|
980
980
|
Repeat: "no-repeat",
|
|
981
981
|
Size: "100% 100%"
|
|
982
|
-
},
|
|
982
|
+
}, dt = {
|
|
983
983
|
webkitMask: Ge,
|
|
984
984
|
mask: Ge,
|
|
985
985
|
background: Et
|
|
986
986
|
};
|
|
987
|
-
for (const e in
|
|
988
|
-
const o =
|
|
989
|
-
for (const t in
|
|
990
|
-
o[e + t] =
|
|
987
|
+
for (const e in dt) {
|
|
988
|
+
const o = dt[e];
|
|
989
|
+
for (const t in ct)
|
|
990
|
+
o[e + t] = ct[t];
|
|
991
991
|
}
|
|
992
992
|
const Re = {};
|
|
993
993
|
["horizontal", "vertical"].forEach((e) => {
|
|
@@ -1048,7 +1048,7 @@ const ft = (e, o) => {
|
|
|
1048
1048
|
let p = 0, h = o.id;
|
|
1049
1049
|
return typeof h == "string" && (h = h.replace(/-/g, "_")), n.innerHTML = En(a.body, h ? () => h + "ID" + p++ : "iconifyVue"), Y("svg", n);
|
|
1050
1050
|
}
|
|
1051
|
-
const { body:
|
|
1051
|
+
const { body: d, width: f, height: g } = e, c = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), m = so(d, {
|
|
1052
1052
|
...u,
|
|
1053
1053
|
width: f + "",
|
|
1054
1054
|
height: g + ""
|
|
@@ -1059,7 +1059,7 @@ const ft = (e, o) => {
|
|
|
1059
1059
|
width: gt(u.width),
|
|
1060
1060
|
height: gt(u.height),
|
|
1061
1061
|
...fo,
|
|
1062
|
-
...
|
|
1062
|
+
...c ? Ge : Et,
|
|
1063
1063
|
...s
|
|
1064
1064
|
}, Y("span", n);
|
|
1065
1065
|
};
|
|
@@ -1134,7 +1134,7 @@ const po = {
|
|
|
1134
1134
|
let n;
|
|
1135
1135
|
if (typeof e != "string" || (n = be(e, !1, !0)) === null)
|
|
1136
1136
|
return this.abortLoading(), null;
|
|
1137
|
-
let i =
|
|
1137
|
+
let i = Cn(n);
|
|
1138
1138
|
if (!i)
|
|
1139
1139
|
return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", i !== null && (this._loadingIcon = {
|
|
1140
1140
|
name: e,
|
|
@@ -1167,16 +1167,6 @@ const po = {
|
|
|
1167
1167
|
}, t);
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
|
-
/**
|
|
1171
|
-
* table-core
|
|
1172
|
-
*
|
|
1173
|
-
* Copyright (c) TanStack
|
|
1174
|
-
*
|
|
1175
|
-
* This source code is licensed under the MIT license found in the
|
|
1176
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
1177
|
-
*
|
|
1178
|
-
* @license MIT
|
|
1179
|
-
*/
|
|
1180
1170
|
function mo() {
|
|
1181
1171
|
return {
|
|
1182
1172
|
accessor: (e, o) => typeof e == "function" ? {
|
|
@@ -1223,17 +1213,17 @@ function F(e, o, t) {
|
|
|
1223
1213
|
let l;
|
|
1224
1214
|
t.key && t.debug && (l = Date.now());
|
|
1225
1215
|
const s = e(r);
|
|
1226
|
-
if (!(s.length !== n.length || s.some((
|
|
1216
|
+
if (!(s.length !== n.length || s.some((d, f) => n[f] !== d)))
|
|
1227
1217
|
return i;
|
|
1228
1218
|
n = s;
|
|
1229
1219
|
let u;
|
|
1230
1220
|
if (t.key && t.debug && (u = Date.now()), i = o(...s), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
|
|
1231
|
-
const
|
|
1221
|
+
const d = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - u) * 100) / 100, g = f / 16, c = (m, p) => {
|
|
1232
1222
|
for (m = String(m); m.length < p; )
|
|
1233
1223
|
m = " " + m;
|
|
1234
1224
|
return m;
|
|
1235
1225
|
};
|
|
1236
|
-
console.info(`%c⏱ ${
|
|
1226
|
+
console.info(`%c⏱ ${c(f, 5)} /${c(d, 5)} ms`, `
|
|
1237
1227
|
font-size: .6rem;
|
|
1238
1228
|
font-weight: bold;
|
|
1239
1229
|
color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t?.key);
|
|
@@ -1280,30 +1270,30 @@ function wo(e, o, t, n) {
|
|
|
1280
1270
|
...e._getDefaultColumnDef(),
|
|
1281
1271
|
...o
|
|
1282
1272
|
}, a = s.accessorKey;
|
|
1283
|
-
let u = (i = (r = s.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof s.header == "string" ? s.header : void 0,
|
|
1284
|
-
if (s.accessorFn ?
|
|
1285
|
-
let
|
|
1273
|
+
let u = (i = (r = s.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof s.header == "string" ? s.header : void 0, d;
|
|
1274
|
+
if (s.accessorFn ? d = s.accessorFn : a && (a.includes(".") ? d = (g) => {
|
|
1275
|
+
let c = g;
|
|
1286
1276
|
for (const p of a.split(".")) {
|
|
1287
1277
|
var m;
|
|
1288
|
-
|
|
1278
|
+
c = (m = c) == null ? void 0 : m[p], process.env.NODE_ENV !== "production" && c === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
|
|
1289
1279
|
}
|
|
1290
|
-
return
|
|
1291
|
-
} :
|
|
1280
|
+
return c;
|
|
1281
|
+
} : d = (g) => g[s.accessorKey]), !u)
|
|
1292
1282
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
1293
1283
|
let f = {
|
|
1294
1284
|
id: `${String(u)}`,
|
|
1295
|
-
accessorFn:
|
|
1285
|
+
accessorFn: d,
|
|
1296
1286
|
parent: n,
|
|
1297
1287
|
depth: t,
|
|
1298
1288
|
columnDef: s,
|
|
1299
1289
|
columns: [],
|
|
1300
1290
|
getFlatColumns: F(() => [!0], () => {
|
|
1301
1291
|
var g;
|
|
1302
|
-
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((
|
|
1292
|
+
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((c) => c.getFlatColumns())];
|
|
1303
1293
|
}, b(e.options, "debugColumns", "column.getFlatColumns")),
|
|
1304
1294
|
getLeafColumns: F(() => [e._getOrderColumnsFn()], (g) => {
|
|
1305
|
-
var
|
|
1306
|
-
if ((
|
|
1295
|
+
var c;
|
|
1296
|
+
if ((c = f.columns) != null && c.length) {
|
|
1307
1297
|
let m = f.columns.flatMap((p) => p.getLeafColumns());
|
|
1308
1298
|
return g(m);
|
|
1309
1299
|
}
|
|
@@ -1344,7 +1334,7 @@ function pt(e, o, t) {
|
|
|
1344
1334
|
l.createHeader == null || l.createHeader(r, e);
|
|
1345
1335
|
}), r;
|
|
1346
1336
|
}
|
|
1347
|
-
const
|
|
1337
|
+
const yo = {
|
|
1348
1338
|
createTable: (e) => {
|
|
1349
1339
|
e.getHeaderGroups = F(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => {
|
|
1350
1340
|
var r, l;
|
|
@@ -1369,25 +1359,25 @@ const Co = {
|
|
|
1369
1359
|
return !((n = t.subHeaders) != null && n.length);
|
|
1370
1360
|
}), b(e.options, O, "getRightLeafHeaders")), e.getLeafHeaders = F(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
1371
1361
|
var i, r, l, s, a, u;
|
|
1372
|
-
return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(a = (u = n[0]) == null ? void 0 : u.headers) != null ? a : []].map((
|
|
1362
|
+
return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(a = (u = n[0]) == null ? void 0 : u.headers) != null ? a : []].map((d) => d.getLeafHeaders()).flat();
|
|
1373
1363
|
}, b(e.options, O, "getLeafHeaders"));
|
|
1374
1364
|
}
|
|
1375
1365
|
};
|
|
1376
1366
|
function me(e, o, t, n) {
|
|
1377
1367
|
var i, r;
|
|
1378
1368
|
let l = 0;
|
|
1379
|
-
const s = function(g,
|
|
1380
|
-
|
|
1369
|
+
const s = function(g, c) {
|
|
1370
|
+
c === void 0 && (c = 1), l = Math.max(l, c), g.filter((m) => m.getIsVisible()).forEach((m) => {
|
|
1381
1371
|
var p;
|
|
1382
|
-
(p = m.columns) != null && p.length && s(m.columns,
|
|
1372
|
+
(p = m.columns) != null && p.length && s(m.columns, c + 1);
|
|
1383
1373
|
}, 0);
|
|
1384
1374
|
};
|
|
1385
1375
|
s(e);
|
|
1386
1376
|
let a = [];
|
|
1387
|
-
const u = (g,
|
|
1377
|
+
const u = (g, c) => {
|
|
1388
1378
|
const m = {
|
|
1389
|
-
depth:
|
|
1390
|
-
id: [n, `${
|
|
1379
|
+
depth: c,
|
|
1380
|
+
id: [n, `${c}`].filter(Boolean).join("_"),
|
|
1391
1381
|
headers: []
|
|
1392
1382
|
}, p = [];
|
|
1393
1383
|
g.forEach((h) => {
|
|
@@ -1397,21 +1387,21 @@ function me(e, o, t, n) {
|
|
|
1397
1387
|
R.subHeaders.push(h);
|
|
1398
1388
|
else {
|
|
1399
1389
|
const v = pt(t, P, {
|
|
1400
|
-
id: [n,
|
|
1390
|
+
id: [n, c, P.id, h?.id].filter(Boolean).join("_"),
|
|
1401
1391
|
isPlaceholder: M,
|
|
1402
1392
|
placeholderId: M ? `${p.filter((w) => w.column === P).length}` : void 0,
|
|
1403
|
-
depth:
|
|
1393
|
+
depth: c,
|
|
1404
1394
|
index: p.length
|
|
1405
1395
|
});
|
|
1406
1396
|
v.subHeaders.push(h), p.push(v);
|
|
1407
1397
|
}
|
|
1408
1398
|
m.headers.push(h), h.headerGroup = m;
|
|
1409
|
-
}), a.push(m),
|
|
1410
|
-
},
|
|
1399
|
+
}), a.push(m), c > 0 && u(p, c - 1);
|
|
1400
|
+
}, d = o.map((g, c) => pt(t, g, {
|
|
1411
1401
|
depth: l,
|
|
1412
|
-
index:
|
|
1402
|
+
index: c
|
|
1413
1403
|
}));
|
|
1414
|
-
u(
|
|
1404
|
+
u(d, l - 1), a.reverse();
|
|
1415
1405
|
const f = (g) => g.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
1416
1406
|
let p = 0, h = 0, R = [0];
|
|
1417
1407
|
m.subHeaders && m.subHeaders.length ? (R = [], f(m.subHeaders).forEach((P) => {
|
|
@@ -1462,21 +1452,21 @@ const Ye = (e, o, t, n, i, r, l) => {
|
|
|
1462
1452
|
getParentRows: () => {
|
|
1463
1453
|
let a = [], u = s;
|
|
1464
1454
|
for (; ; ) {
|
|
1465
|
-
const
|
|
1466
|
-
if (!
|
|
1467
|
-
a.push(
|
|
1455
|
+
const d = u.getParentRow();
|
|
1456
|
+
if (!d) break;
|
|
1457
|
+
a.push(d), u = d;
|
|
1468
1458
|
}
|
|
1469
1459
|
return a.reverse();
|
|
1470
1460
|
},
|
|
1471
1461
|
getAllCells: F(() => [e.getAllLeafColumns()], (a) => a.map((u) => So(e, s, u, u.id)), b(e.options, "debugRows", "getAllCells")),
|
|
1472
|
-
_getAllCellsByColumnId: F(() => [s.getAllCells()], (a) => a.reduce((u,
|
|
1462
|
+
_getAllCellsByColumnId: F(() => [s.getAllCells()], (a) => a.reduce((u, d) => (u[d.column.id] = d, u), {}), b(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
1473
1463
|
};
|
|
1474
1464
|
for (let a = 0; a < e._features.length; a++) {
|
|
1475
1465
|
const u = e._features[a];
|
|
1476
1466
|
u == null || u.createRow == null || u.createRow(s, e);
|
|
1477
1467
|
}
|
|
1478
1468
|
return s;
|
|
1479
|
-
},
|
|
1469
|
+
}, Co = {
|
|
1480
1470
|
createColumn: (e, o) => {
|
|
1481
1471
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
1482
1472
|
if (e._getFacetedMinMaxValues)
|
|
@@ -1580,10 +1570,10 @@ const Ro = {
|
|
|
1580
1570
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
1581
1571
|
}, e.setFilterValue = (t) => {
|
|
1582
1572
|
o.setColumnFilters((n) => {
|
|
1583
|
-
const i = e.getFilterFn(), r = n?.find((
|
|
1573
|
+
const i = e.getFilterFn(), r = n?.find((d) => d.id === e.id), l = ee(t, r ? r.value : void 0);
|
|
1584
1574
|
if (mt(i, l, e)) {
|
|
1585
1575
|
var s;
|
|
1586
|
-
return (s = n?.filter((
|
|
1576
|
+
return (s = n?.filter((d) => d.id !== e.id)) != null ? s : [];
|
|
1587
1577
|
}
|
|
1588
1578
|
const a = {
|
|
1589
1579
|
id: e.id,
|
|
@@ -1591,7 +1581,7 @@ const Ro = {
|
|
|
1591
1581
|
};
|
|
1592
1582
|
if (r) {
|
|
1593
1583
|
var u;
|
|
1594
|
-
return (u = n?.map((
|
|
1584
|
+
return (u = n?.map((d) => d.id === e.id ? a : d)) != null ? u : [];
|
|
1595
1585
|
}
|
|
1596
1586
|
return n != null && n.length ? [...n, a] : [a];
|
|
1597
1587
|
});
|
|
@@ -1753,12 +1743,12 @@ const Eo = {
|
|
|
1753
1743
|
onColumnOrderChange: q("columnOrder", e)
|
|
1754
1744
|
}),
|
|
1755
1745
|
createColumn: (e, o) => {
|
|
1756
|
-
e.getIndex = F((t) => [
|
|
1746
|
+
e.getIndex = F((t) => [ce(o, t)], (t) => t.findIndex((n) => n.id === e.id), b(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
1757
1747
|
var n;
|
|
1758
|
-
return ((n =
|
|
1748
|
+
return ((n = ce(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
1759
1749
|
}, e.getIsLastColumn = (t) => {
|
|
1760
1750
|
var n;
|
|
1761
|
-
const i =
|
|
1751
|
+
const i = ce(o, t);
|
|
1762
1752
|
return ((n = i[i.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
1763
1753
|
};
|
|
1764
1754
|
},
|
|
@@ -1773,7 +1763,7 @@ const Eo = {
|
|
|
1773
1763
|
else {
|
|
1774
1764
|
const l = [...o], s = [...i];
|
|
1775
1765
|
for (; s.length && l.length; ) {
|
|
1776
|
-
const a = l.shift(), u = s.findIndex((
|
|
1766
|
+
const a = l.shift(), u = s.findIndex((d) => d.id === a);
|
|
1777
1767
|
u > -1 && r.push(s.splice(u, 1)[0]);
|
|
1778
1768
|
}
|
|
1779
1769
|
r = [...r, ...s];
|
|
@@ -1805,10 +1795,10 @@ const Eo = {
|
|
|
1805
1795
|
};
|
|
1806
1796
|
}
|
|
1807
1797
|
if (t === "left") {
|
|
1808
|
-
var u,
|
|
1798
|
+
var u, d;
|
|
1809
1799
|
return {
|
|
1810
1800
|
left: [...((u = i?.left) != null ? u : []).filter((f) => !(n != null && n.includes(f))), ...n],
|
|
1811
|
-
right: ((
|
|
1801
|
+
right: ((d = i?.right) != null ? d : []).filter((f) => !(n != null && n.includes(f)))
|
|
1812
1802
|
};
|
|
1813
1803
|
}
|
|
1814
1804
|
return {
|
|
@@ -1860,7 +1850,11 @@ const Eo = {
|
|
|
1860
1850
|
return o.filter((r) => !i.includes(r.id));
|
|
1861
1851
|
}, b(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1862
1852
|
}
|
|
1863
|
-
}
|
|
1853
|
+
};
|
|
1854
|
+
function Lo(e) {
|
|
1855
|
+
return e || (typeof document < "u" ? document : null);
|
|
1856
|
+
}
|
|
1857
|
+
const he = {
|
|
1864
1858
|
size: 150,
|
|
1865
1859
|
minSize: 20,
|
|
1866
1860
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
@@ -1871,7 +1865,7 @@ const Eo = {
|
|
|
1871
1865
|
deltaPercentage: null,
|
|
1872
1866
|
isResizingColumn: !1,
|
|
1873
1867
|
columnSizingStart: []
|
|
1874
|
-
}),
|
|
1868
|
+
}), To = {
|
|
1875
1869
|
getDefaultColumnDef: () => he,
|
|
1876
1870
|
getInitialState: (e) => ({
|
|
1877
1871
|
columnSizing: {},
|
|
@@ -1889,7 +1883,7 @@ const Eo = {
|
|
|
1889
1883
|
var t, n, i;
|
|
1890
1884
|
const r = o.getState().columnSizing[e.id];
|
|
1891
1885
|
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : he.minSize, (n = r ?? e.columnDef.size) != null ? n : he.size), (i = e.columnDef.maxSize) != null ? i : he.maxSize);
|
|
1892
|
-
}, e.getStart = F((t) => [t,
|
|
1886
|
+
}, e.getStart = F((t) => [t, ce(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((i, r) => i + r.getSize(), 0), b(o.options, "debugColumns", "getStart")), e.getAfter = F((t) => [t, ce(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((i, r) => i + r.getSize(), 0), b(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
1893
1887
|
o.setColumnSizing((t) => {
|
|
1894
1888
|
let {
|
|
1895
1889
|
[e.id]: n,
|
|
@@ -1925,7 +1919,7 @@ const Eo = {
|
|
|
1925
1919
|
return (r) => {
|
|
1926
1920
|
if (!n || !i || (r.persist == null || r.persist(), _e(r) && r.touches && r.touches.length > 1))
|
|
1927
1921
|
return;
|
|
1928
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], a = _e(r) ? Math.round(r.touches[0].clientX) : r.clientX, u = {},
|
|
1922
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], a = _e(r) ? Math.round(r.touches[0].clientX) : r.clientX, u = {}, d = (R, $) => {
|
|
1929
1923
|
typeof $ == "number" && (o.setColumnSizingInfo((P) => {
|
|
1930
1924
|
var M, v;
|
|
1931
1925
|
const w = o.options.columnResizeDirection === "rtl" ? -1 : 1, I = ($ - ((M = P?.startOffset) != null ? M : 0)) * w, V = Math.max(I / ((v = P?.startSize) != null ? v : 0), -0.999999);
|
|
@@ -1941,8 +1935,8 @@ const Eo = {
|
|
|
1941
1935
|
...P,
|
|
1942
1936
|
...u
|
|
1943
1937
|
})));
|
|
1944
|
-
}, f = (R) =>
|
|
1945
|
-
|
|
1938
|
+
}, f = (R) => d("move", R), g = (R) => {
|
|
1939
|
+
d("end", R), o.setColumnSizingInfo(($) => ({
|
|
1946
1940
|
...$,
|
|
1947
1941
|
isResizingColumn: !1,
|
|
1948
1942
|
startOffset: null,
|
|
@@ -1951,21 +1945,21 @@ const Eo = {
|
|
|
1951
1945
|
deltaPercentage: null,
|
|
1952
1946
|
columnSizingStart: []
|
|
1953
1947
|
}));
|
|
1954
|
-
},
|
|
1948
|
+
}, c = Lo(t), m = {
|
|
1955
1949
|
moveHandler: (R) => f(R.clientX),
|
|
1956
1950
|
upHandler: (R) => {
|
|
1957
|
-
|
|
1951
|
+
c?.removeEventListener("mousemove", m.moveHandler), c?.removeEventListener("mouseup", m.upHandler), g(R.clientX);
|
|
1958
1952
|
}
|
|
1959
1953
|
}, p = {
|
|
1960
1954
|
moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), f(R.touches[0].clientX), !1),
|
|
1961
1955
|
upHandler: (R) => {
|
|
1962
1956
|
var $;
|
|
1963
|
-
|
|
1957
|
+
c?.removeEventListener("touchmove", p.moveHandler), c?.removeEventListener("touchend", p.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), g(($ = R.touches[0]) == null ? void 0 : $.clientX);
|
|
1964
1958
|
}
|
|
1965
|
-
}, h =
|
|
1959
|
+
}, h = Ho() ? {
|
|
1966
1960
|
passive: !1
|
|
1967
1961
|
} : !1;
|
|
1968
|
-
_e(r) ? (
|
|
1962
|
+
_e(r) ? (c?.addEventListener("touchmove", p.moveHandler, h), c?.addEventListener("touchend", p.upHandler, h)) : (c?.addEventListener("mousemove", m.moveHandler, h), c?.addEventListener("mouseup", m.upHandler, h)), o.setColumnSizingInfo((R) => ({
|
|
1969
1963
|
...R,
|
|
1970
1964
|
startOffset: a,
|
|
1971
1965
|
startSize: l,
|
|
@@ -2000,7 +1994,7 @@ const Eo = {
|
|
|
2000
1994
|
}
|
|
2001
1995
|
};
|
|
2002
1996
|
let ve = null;
|
|
2003
|
-
function
|
|
1997
|
+
function Ho() {
|
|
2004
1998
|
if (typeof ve == "boolean") return ve;
|
|
2005
1999
|
let e = !1;
|
|
2006
2000
|
try {
|
|
@@ -2019,7 +2013,7 @@ function To() {
|
|
|
2019
2013
|
function _e(e) {
|
|
2020
2014
|
return e.type === "touchstart";
|
|
2021
2015
|
}
|
|
2022
|
-
const
|
|
2016
|
+
const Bo = {
|
|
2023
2017
|
getInitialState: (e) => ({
|
|
2024
2018
|
columnVisibility: {},
|
|
2025
2019
|
...e
|
|
@@ -2064,17 +2058,17 @@ const Ho = {
|
|
|
2064
2058
|
};
|
|
2065
2059
|
}
|
|
2066
2060
|
};
|
|
2067
|
-
function
|
|
2061
|
+
function ce(e, o) {
|
|
2068
2062
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
2069
2063
|
}
|
|
2070
|
-
const
|
|
2064
|
+
const Oo = {
|
|
2071
2065
|
createTable: (e) => {
|
|
2072
2066
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
2073
2067
|
if (e._getGlobalFacetedMinMaxValues)
|
|
2074
2068
|
return e._getGlobalFacetedMinMaxValues();
|
|
2075
2069
|
};
|
|
2076
2070
|
}
|
|
2077
|
-
},
|
|
2071
|
+
}, Go = {
|
|
2078
2072
|
getInitialState: (e) => ({
|
|
2079
2073
|
globalFilter: void 0,
|
|
2080
2074
|
...e
|
|
@@ -2107,7 +2101,7 @@ const Bo = {
|
|
|
2107
2101
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
2108
2102
|
};
|
|
2109
2103
|
}
|
|
2110
|
-
},
|
|
2104
|
+
}, zo = {
|
|
2111
2105
|
getInitialState: (e) => ({
|
|
2112
2106
|
expanded: {},
|
|
2113
2107
|
...e
|
|
@@ -2197,7 +2191,7 @@ const Bo = {
|
|
|
2197
2191
|
}, ze = 0, Ne = 10, Me = () => ({
|
|
2198
2192
|
pageIndex: ze,
|
|
2199
2193
|
pageSize: Ne
|
|
2200
|
-
}),
|
|
2194
|
+
}), No = {
|
|
2201
2195
|
getInitialState: (e) => ({
|
|
2202
2196
|
...e,
|
|
2203
2197
|
pagination: {
|
|
@@ -2280,7 +2274,7 @@ const Bo = {
|
|
|
2280
2274
|
}, Ee = () => ({
|
|
2281
2275
|
top: [],
|
|
2282
2276
|
bottom: []
|
|
2283
|
-
}),
|
|
2277
|
+
}), jo = {
|
|
2284
2278
|
getInitialState: (e) => ({
|
|
2285
2279
|
rowPinning: Ee(),
|
|
2286
2280
|
...e
|
|
@@ -2302,7 +2296,7 @@ const Bo = {
|
|
|
2302
2296
|
return u;
|
|
2303
2297
|
}) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...r]);
|
|
2304
2298
|
o.setRowPinning((a) => {
|
|
2305
|
-
var u,
|
|
2299
|
+
var u, d;
|
|
2306
2300
|
if (t === "bottom") {
|
|
2307
2301
|
var f, g;
|
|
2308
2302
|
return {
|
|
@@ -2311,15 +2305,15 @@ const Bo = {
|
|
|
2311
2305
|
};
|
|
2312
2306
|
}
|
|
2313
2307
|
if (t === "top") {
|
|
2314
|
-
var
|
|
2308
|
+
var c, m;
|
|
2315
2309
|
return {
|
|
2316
|
-
top: [...((
|
|
2310
|
+
top: [...((c = a?.top) != null ? c : []).filter((p) => !(s != null && s.has(p))), ...Array.from(s)],
|
|
2317
2311
|
bottom: ((m = a?.bottom) != null ? m : []).filter((p) => !(s != null && s.has(p)))
|
|
2318
2312
|
};
|
|
2319
2313
|
}
|
|
2320
2314
|
return {
|
|
2321
2315
|
top: ((u = a?.top) != null ? u : []).filter((p) => !(s != null && s.has(p))),
|
|
2322
|
-
bottom: ((
|
|
2316
|
+
bottom: ((d = a?.bottom) != null ? d : []).filter((p) => !(s != null && s.has(p)))
|
|
2323
2317
|
};
|
|
2324
2318
|
});
|
|
2325
2319
|
}, e.getCanPin = () => {
|
|
@@ -2381,7 +2375,7 @@ const Bo = {
|
|
|
2381
2375
|
return o.filter((r) => !i.has(r.id));
|
|
2382
2376
|
}, b(e.options, "debugRows", "getCenterRows"));
|
|
2383
2377
|
}
|
|
2384
|
-
},
|
|
2378
|
+
}, qo = {
|
|
2385
2379
|
getInitialState: (e) => ({
|
|
2386
2380
|
rowSelection: {},
|
|
2387
2381
|
...e
|
|
@@ -2508,11 +2502,11 @@ function ke(e, o) {
|
|
|
2508
2502
|
const t = e.getState().rowSelection, n = [], i = {}, r = function(l, s) {
|
|
2509
2503
|
return l.map((a) => {
|
|
2510
2504
|
var u;
|
|
2511
|
-
const
|
|
2512
|
-
if (
|
|
2505
|
+
const d = Ze(a, t);
|
|
2506
|
+
if (d && (n.push(a), i[a.id] = a), (u = a.subRows) != null && u.length && (a = {
|
|
2513
2507
|
...a,
|
|
2514
2508
|
subRows: r(a.subRows)
|
|
2515
|
-
}),
|
|
2509
|
+
}), d)
|
|
2516
2510
|
return a;
|
|
2517
2511
|
}).filter(Boolean);
|
|
2518
2512
|
};
|
|
@@ -2537,10 +2531,10 @@ function qe(e, o, t) {
|
|
|
2537
2531
|
}
|
|
2538
2532
|
}), i ? "all" : r ? "some" : !1;
|
|
2539
2533
|
}
|
|
2540
|
-
const Ke = /([0-9]+)/gm,
|
|
2534
|
+
const Ke = /([0-9]+)/gm, Ko = (e, o, t) => Nt(ne(e.getValue(t)).toLowerCase(), ne(o.getValue(t)).toLowerCase()), Uo = (e, o, t) => Nt(ne(e.getValue(t)), ne(o.getValue(t))), Wo = (e, o, t) => et(ne(e.getValue(t)).toLowerCase(), ne(o.getValue(t)).toLowerCase()), Qo = (e, o, t) => et(ne(e.getValue(t)), ne(o.getValue(t))), Xo = (e, o, t) => {
|
|
2541
2535
|
const n = e.getValue(t), i = o.getValue(t);
|
|
2542
2536
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
2543
|
-
},
|
|
2537
|
+
}, Yo = (e, o, t) => et(e.getValue(t), o.getValue(t));
|
|
2544
2538
|
function et(e, o) {
|
|
2545
2539
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
2546
2540
|
}
|
|
@@ -2568,13 +2562,13 @@ function Nt(e, o) {
|
|
|
2568
2562
|
return t.length - n.length;
|
|
2569
2563
|
}
|
|
2570
2564
|
const se = {
|
|
2571
|
-
alphanumeric:
|
|
2572
|
-
alphanumericCaseSensitive:
|
|
2573
|
-
text:
|
|
2574
|
-
textCaseSensitive:
|
|
2575
|
-
datetime:
|
|
2576
|
-
basic:
|
|
2577
|
-
},
|
|
2565
|
+
alphanumeric: Ko,
|
|
2566
|
+
alphanumericCaseSensitive: Uo,
|
|
2567
|
+
text: Wo,
|
|
2568
|
+
textCaseSensitive: Qo,
|
|
2569
|
+
datetime: Xo,
|
|
2570
|
+
basic: Yo
|
|
2571
|
+
}, Jo = {
|
|
2578
2572
|
getInitialState: (e) => ({
|
|
2579
2573
|
sorting: [],
|
|
2580
2574
|
...e
|
|
@@ -2610,18 +2604,18 @@ const se = {
|
|
|
2610
2604
|
}, e.toggleSorting = (t, n) => {
|
|
2611
2605
|
const i = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
|
|
2612
2606
|
o.setSorting((l) => {
|
|
2613
|
-
const s = l?.find((
|
|
2614
|
-
let u = [],
|
|
2615
|
-
if (l != null && l.length && e.getCanMultiSort() && n ? s ?
|
|
2607
|
+
const s = l?.find((c) => c.id === e.id), a = l?.findIndex((c) => c.id === e.id);
|
|
2608
|
+
let u = [], d, f = r ? t : i === "desc";
|
|
2609
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? s ? d = "toggle" : d = "add" : l != null && l.length && a !== l.length - 1 ? d = "replace" : s ? d = "toggle" : d = "replace", d === "toggle" && (r || i || (d = "remove")), d === "add") {
|
|
2616
2610
|
var g;
|
|
2617
2611
|
u = [...l, {
|
|
2618
2612
|
id: e.id,
|
|
2619
2613
|
desc: f
|
|
2620
2614
|
}], u.splice(0, u.length - ((g = o.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
|
|
2621
|
-
} else
|
|
2622
|
-
...
|
|
2615
|
+
} else d === "toggle" ? u = l.map((c) => c.id === e.id ? {
|
|
2616
|
+
...c,
|
|
2623
2617
|
desc: f
|
|
2624
|
-
} :
|
|
2618
|
+
} : c) : d === "remove" ? u = l.filter((c) => c.id !== e.id) : u = [{
|
|
2625
2619
|
id: e.id,
|
|
2626
2620
|
desc: f
|
|
2627
2621
|
}];
|
|
@@ -2663,34 +2657,34 @@ const se = {
|
|
|
2663
2657
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
2664
2658
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
2665
2659
|
}
|
|
2666
|
-
},
|
|
2667
|
-
|
|
2668
|
-
|
|
2660
|
+
}, Zo = [
|
|
2661
|
+
yo,
|
|
2662
|
+
Bo,
|
|
2669
2663
|
Eo,
|
|
2670
2664
|
ko,
|
|
2671
|
-
|
|
2665
|
+
Co,
|
|
2672
2666
|
Ro,
|
|
2673
|
-
Bo,
|
|
2674
|
-
//depends on ColumnFaceting
|
|
2675
2667
|
Oo,
|
|
2668
|
+
//depends on ColumnFaceting
|
|
2669
|
+
Go,
|
|
2676
2670
|
//depends on ColumnFiltering
|
|
2677
|
-
|
|
2671
|
+
Jo,
|
|
2678
2672
|
_o,
|
|
2679
2673
|
//depends on RowSorting
|
|
2680
|
-
Go,
|
|
2681
2674
|
zo,
|
|
2682
2675
|
No,
|
|
2683
2676
|
jo,
|
|
2684
|
-
|
|
2677
|
+
qo,
|
|
2678
|
+
To
|
|
2685
2679
|
];
|
|
2686
|
-
function
|
|
2680
|
+
function ei(e) {
|
|
2687
2681
|
var o, t;
|
|
2688
2682
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
2689
|
-
const n = [...
|
|
2683
|
+
const n = [...Zo, ...(o = e._features) != null ? o : []];
|
|
2690
2684
|
let i = {
|
|
2691
2685
|
_features: n
|
|
2692
2686
|
};
|
|
2693
|
-
const r = i._features.reduce((g,
|
|
2687
|
+
const r = i._features.reduce((g, c) => Object.assign(g, c.getDefaultOptions == null ? void 0 : c.getDefaultOptions(i)), {}), l = (g) => i.options.mergeOptions ? i.options.mergeOptions(r, g) : {
|
|
2694
2688
|
...r,
|
|
2695
2689
|
...g
|
|
2696
2690
|
};
|
|
@@ -2699,11 +2693,11 @@ function Zo(e) {
|
|
|
2699
2693
|
...(t = e.initialState) != null ? t : {}
|
|
2700
2694
|
};
|
|
2701
2695
|
i._features.forEach((g) => {
|
|
2702
|
-
var
|
|
2703
|
-
a = (
|
|
2696
|
+
var c;
|
|
2697
|
+
a = (c = g.getInitialState == null ? void 0 : g.getInitialState(a)) != null ? c : a;
|
|
2704
2698
|
});
|
|
2705
2699
|
const u = [];
|
|
2706
|
-
let
|
|
2700
|
+
let d = !1;
|
|
2707
2701
|
const f = {
|
|
2708
2702
|
_features: n,
|
|
2709
2703
|
options: {
|
|
@@ -2712,43 +2706,43 @@ function Zo(e) {
|
|
|
2712
2706
|
},
|
|
2713
2707
|
initialState: a,
|
|
2714
2708
|
_queue: (g) => {
|
|
2715
|
-
u.push(g),
|
|
2709
|
+
u.push(g), d || (d = !0, Promise.resolve().then(() => {
|
|
2716
2710
|
for (; u.length; )
|
|
2717
2711
|
u.shift()();
|
|
2718
|
-
|
|
2719
|
-
}).catch((
|
|
2720
|
-
throw
|
|
2712
|
+
d = !1;
|
|
2713
|
+
}).catch((c) => setTimeout(() => {
|
|
2714
|
+
throw c;
|
|
2721
2715
|
})));
|
|
2722
2716
|
},
|
|
2723
2717
|
reset: () => {
|
|
2724
2718
|
i.setState(i.initialState);
|
|
2725
2719
|
},
|
|
2726
2720
|
setOptions: (g) => {
|
|
2727
|
-
const
|
|
2728
|
-
i.options = l(
|
|
2721
|
+
const c = ee(g, i.options);
|
|
2722
|
+
i.options = l(c);
|
|
2729
2723
|
},
|
|
2730
2724
|
getState: () => i.options.state,
|
|
2731
2725
|
setState: (g) => {
|
|
2732
2726
|
i.options.onStateChange == null || i.options.onStateChange(g);
|
|
2733
2727
|
},
|
|
2734
|
-
_getRowId: (g,
|
|
2728
|
+
_getRowId: (g, c, m) => {
|
|
2735
2729
|
var p;
|
|
2736
|
-
return (p = i.options.getRowId == null ? void 0 : i.options.getRowId(g,
|
|
2730
|
+
return (p = i.options.getRowId == null ? void 0 : i.options.getRowId(g, c, m)) != null ? p : `${m ? [m.id, c].join(".") : c}`;
|
|
2737
2731
|
},
|
|
2738
2732
|
getCoreRowModel: () => (i._getCoreRowModel || (i._getCoreRowModel = i.options.getCoreRowModel(i)), i._getCoreRowModel()),
|
|
2739
2733
|
// The final calls start at the bottom of the model,
|
|
2740
2734
|
// expanded rows, which then work their way up
|
|
2741
2735
|
getRowModel: () => i.getPaginationRowModel(),
|
|
2742
2736
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
2743
|
-
getRow: (g,
|
|
2744
|
-
let m = (
|
|
2737
|
+
getRow: (g, c) => {
|
|
2738
|
+
let m = (c ? i.getPrePaginationRowModel() : i.getRowModel()).rowsById[g];
|
|
2745
2739
|
if (!m && (m = i.getCoreRowModel().rowsById[g], !m))
|
|
2746
2740
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
|
|
2747
2741
|
return m;
|
|
2748
2742
|
},
|
|
2749
2743
|
_getDefaultColumnDef: F(() => [i.options.defaultColumn], (g) => {
|
|
2750
|
-
var
|
|
2751
|
-
return g = (
|
|
2744
|
+
var c;
|
|
2745
|
+
return g = (c = g) != null ? c : {}, {
|
|
2752
2746
|
header: (m) => {
|
|
2753
2747
|
const p = m.header.column.columnDef;
|
|
2754
2748
|
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
|
@@ -2764,29 +2758,29 @@ function Zo(e) {
|
|
|
2764
2758
|
}, b(e, "debugColumns", "_getDefaultColumnDef")),
|
|
2765
2759
|
_getColumnDefs: () => i.options.columns,
|
|
2766
2760
|
getAllColumns: F(() => [i._getColumnDefs()], (g) => {
|
|
2767
|
-
const
|
|
2761
|
+
const c = function(m, p, h) {
|
|
2768
2762
|
return h === void 0 && (h = 0), m.map((R) => {
|
|
2769
2763
|
const $ = wo(i, R, h, p), P = R;
|
|
2770
|
-
return $.columns = P.columns ?
|
|
2764
|
+
return $.columns = P.columns ? c(P.columns, $, h + 1) : [], $;
|
|
2771
2765
|
});
|
|
2772
2766
|
};
|
|
2773
|
-
return
|
|
2767
|
+
return c(g);
|
|
2774
2768
|
}, b(e, "debugColumns", "getAllColumns")),
|
|
2775
|
-
getAllFlatColumns: F(() => [i.getAllColumns()], (g) => g.flatMap((
|
|
2776
|
-
_getAllFlatColumnsById: F(() => [i.getAllFlatColumns()], (g) => g.reduce((
|
|
2777
|
-
getAllLeafColumns: F(() => [i.getAllColumns(), i._getOrderColumnsFn()], (g,
|
|
2769
|
+
getAllFlatColumns: F(() => [i.getAllColumns()], (g) => g.flatMap((c) => c.getFlatColumns()), b(e, "debugColumns", "getAllFlatColumns")),
|
|
2770
|
+
_getAllFlatColumnsById: F(() => [i.getAllFlatColumns()], (g) => g.reduce((c, m) => (c[m.id] = m, c), {}), b(e, "debugColumns", "getAllFlatColumnsById")),
|
|
2771
|
+
getAllLeafColumns: F(() => [i.getAllColumns(), i._getOrderColumnsFn()], (g, c) => {
|
|
2778
2772
|
let m = g.flatMap((p) => p.getLeafColumns());
|
|
2779
|
-
return
|
|
2773
|
+
return c(m);
|
|
2780
2774
|
}, b(e, "debugColumns", "getAllLeafColumns")),
|
|
2781
2775
|
getColumn: (g) => {
|
|
2782
|
-
const
|
|
2783
|
-
return process.env.NODE_ENV !== "production" && !
|
|
2776
|
+
const c = i._getAllFlatColumnsById()[g];
|
|
2777
|
+
return process.env.NODE_ENV !== "production" && !c && console.error(`[Table] Column with id '${g}' does not exist.`), c;
|
|
2784
2778
|
}
|
|
2785
2779
|
};
|
|
2786
2780
|
Object.assign(i, f);
|
|
2787
2781
|
for (let g = 0; g < i._features.length; g++) {
|
|
2788
|
-
const
|
|
2789
|
-
|
|
2782
|
+
const c = i._features[g];
|
|
2783
|
+
c == null || c.createTable == null || c.createTable(i);
|
|
2790
2784
|
}
|
|
2791
2785
|
return i;
|
|
2792
2786
|
}
|
|
@@ -2800,10 +2794,10 @@ function jt() {
|
|
|
2800
2794
|
r === void 0 && (r = 0);
|
|
2801
2795
|
const s = [];
|
|
2802
2796
|
for (let u = 0; u < i.length; u++) {
|
|
2803
|
-
const
|
|
2804
|
-
if (t.flatRows.push(
|
|
2797
|
+
const d = Ye(e, e._getRowId(i[u], u, l), i[u], u, r, void 0, l?.id);
|
|
2798
|
+
if (t.flatRows.push(d), t.rowsById[d.id] = d, s.push(d), e.options.getSubRows) {
|
|
2805
2799
|
var a;
|
|
2806
|
-
|
|
2800
|
+
d.originalSubRows = e.options.getSubRows(i[u], u), (a = d.originalSubRows) != null && a.length && (d.subRows = n(d.originalSubRows, r + 1, d));
|
|
2807
2801
|
}
|
|
2808
2802
|
}
|
|
2809
2803
|
return s;
|
|
@@ -2811,7 +2805,7 @@ function jt() {
|
|
|
2811
2805
|
return t.rows = n(o), t;
|
|
2812
2806
|
}, b(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2813
2807
|
}
|
|
2814
|
-
function
|
|
2808
|
+
function ti(e) {
|
|
2815
2809
|
const o = [], t = (n) => {
|
|
2816
2810
|
var i;
|
|
2817
2811
|
o.push(n), (i = n.subRows) != null && i.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2822,31 +2816,31 @@ function ei(e) {
|
|
|
2822
2816
|
rowsById: e.rowsById
|
|
2823
2817
|
};
|
|
2824
2818
|
}
|
|
2825
|
-
function ti(e, o, t) {
|
|
2826
|
-
return t.options.filterFromLeafRows ? ni(e, o, t) : oi(e, o, t);
|
|
2827
|
-
}
|
|
2828
2819
|
function ni(e, o, t) {
|
|
2820
|
+
return t.options.filterFromLeafRows ? oi(e, o, t) : ii(e, o, t);
|
|
2821
|
+
}
|
|
2822
|
+
function oi(e, o, t) {
|
|
2829
2823
|
var n;
|
|
2830
2824
|
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, u) {
|
|
2831
2825
|
u === void 0 && (u = 0);
|
|
2832
|
-
const
|
|
2826
|
+
const d = [];
|
|
2833
2827
|
for (let g = 0; g < a.length; g++) {
|
|
2834
2828
|
var f;
|
|
2835
|
-
let
|
|
2836
|
-
const m = Ye(t,
|
|
2837
|
-
if (m.columnFilters =
|
|
2838
|
-
if (m.subRows = s(
|
|
2839
|
-
|
|
2829
|
+
let c = a[g];
|
|
2830
|
+
const m = Ye(t, c.id, c.original, c.index, c.depth, void 0, c.parentId);
|
|
2831
|
+
if (m.columnFilters = c.columnFilters, (f = c.subRows) != null && f.length && u < l) {
|
|
2832
|
+
if (m.subRows = s(c.subRows, u + 1), c = m, o(c) && !m.subRows.length) {
|
|
2833
|
+
d.push(c), r[c.id] = c, i.push(c);
|
|
2840
2834
|
continue;
|
|
2841
2835
|
}
|
|
2842
|
-
if (o(
|
|
2843
|
-
|
|
2836
|
+
if (o(c) || m.subRows.length) {
|
|
2837
|
+
d.push(c), r[c.id] = c, i.push(c);
|
|
2844
2838
|
continue;
|
|
2845
2839
|
}
|
|
2846
2840
|
} else
|
|
2847
|
-
|
|
2841
|
+
c = m, o(c) && (d.push(c), r[c.id] = c, i.push(c));
|
|
2848
2842
|
}
|
|
2849
|
-
return
|
|
2843
|
+
return d;
|
|
2850
2844
|
};
|
|
2851
2845
|
return {
|
|
2852
2846
|
rows: s(e),
|
|
@@ -2854,23 +2848,23 @@ function ni(e, o, t) {
|
|
|
2854
2848
|
rowsById: r
|
|
2855
2849
|
};
|
|
2856
2850
|
}
|
|
2857
|
-
function
|
|
2851
|
+
function ii(e, o, t) {
|
|
2858
2852
|
var n;
|
|
2859
2853
|
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, u) {
|
|
2860
2854
|
u === void 0 && (u = 0);
|
|
2861
|
-
const
|
|
2855
|
+
const d = [];
|
|
2862
2856
|
for (let g = 0; g < a.length; g++) {
|
|
2863
|
-
let
|
|
2864
|
-
if (o(
|
|
2857
|
+
let c = a[g];
|
|
2858
|
+
if (o(c)) {
|
|
2865
2859
|
var f;
|
|
2866
|
-
if ((f =
|
|
2867
|
-
const p = Ye(t,
|
|
2868
|
-
p.subRows = s(
|
|
2860
|
+
if ((f = c.subRows) != null && f.length && u < l) {
|
|
2861
|
+
const p = Ye(t, c.id, c.original, c.index, c.depth, void 0, c.parentId);
|
|
2862
|
+
p.subRows = s(c.subRows, u + 1), c = p;
|
|
2869
2863
|
}
|
|
2870
|
-
|
|
2864
|
+
d.push(c), i.push(c), r[c.id] = c;
|
|
2871
2865
|
}
|
|
2872
2866
|
}
|
|
2873
|
-
return
|
|
2867
|
+
return d;
|
|
2874
2868
|
};
|
|
2875
2869
|
return {
|
|
2876
2870
|
rows: s(e),
|
|
@@ -2887,7 +2881,7 @@ function qt() {
|
|
|
2887
2881
|
}
|
|
2888
2882
|
const i = [], r = [];
|
|
2889
2883
|
(t ?? []).forEach((g) => {
|
|
2890
|
-
var
|
|
2884
|
+
var c;
|
|
2891
2885
|
const m = e.getColumn(g.id);
|
|
2892
2886
|
if (!m)
|
|
2893
2887
|
return;
|
|
@@ -2899,50 +2893,50 @@ function qt() {
|
|
|
2899
2893
|
i.push({
|
|
2900
2894
|
id: g.id,
|
|
2901
2895
|
filterFn: p,
|
|
2902
|
-
resolvedValue: (
|
|
2896
|
+
resolvedValue: (c = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(g.value)) != null ? c : g.value
|
|
2903
2897
|
});
|
|
2904
2898
|
});
|
|
2905
2899
|
const l = (t ?? []).map((g) => g.id), s = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((g) => g.getCanGlobalFilter());
|
|
2906
2900
|
n && s && a.length && (l.push("__global__"), a.forEach((g) => {
|
|
2907
|
-
var
|
|
2901
|
+
var c;
|
|
2908
2902
|
r.push({
|
|
2909
2903
|
id: g.id,
|
|
2910
2904
|
filterFn: s,
|
|
2911
|
-
resolvedValue: (
|
|
2905
|
+
resolvedValue: (c = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? c : n
|
|
2912
2906
|
});
|
|
2913
2907
|
}));
|
|
2914
|
-
let u,
|
|
2908
|
+
let u, d;
|
|
2915
2909
|
for (let g = 0; g < o.flatRows.length; g++) {
|
|
2916
|
-
const
|
|
2917
|
-
if (
|
|
2910
|
+
const c = o.flatRows[g];
|
|
2911
|
+
if (c.columnFilters = {}, i.length)
|
|
2918
2912
|
for (let m = 0; m < i.length; m++) {
|
|
2919
2913
|
u = i[m];
|
|
2920
2914
|
const p = u.id;
|
|
2921
|
-
|
|
2922
|
-
|
|
2915
|
+
c.columnFilters[p] = u.filterFn(c, p, u.resolvedValue, (h) => {
|
|
2916
|
+
c.columnFiltersMeta[p] = h;
|
|
2923
2917
|
});
|
|
2924
2918
|
}
|
|
2925
2919
|
if (r.length) {
|
|
2926
2920
|
for (let m = 0; m < r.length; m++) {
|
|
2927
|
-
|
|
2928
|
-
const p =
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2921
|
+
d = r[m];
|
|
2922
|
+
const p = d.id;
|
|
2923
|
+
if (d.filterFn(c, p, d.resolvedValue, (h) => {
|
|
2924
|
+
c.columnFiltersMeta[p] = h;
|
|
2931
2925
|
})) {
|
|
2932
|
-
|
|
2926
|
+
c.columnFilters.__global__ = !0;
|
|
2933
2927
|
break;
|
|
2934
2928
|
}
|
|
2935
2929
|
}
|
|
2936
|
-
|
|
2930
|
+
c.columnFilters.__global__ !== !0 && (c.columnFilters.__global__ = !1);
|
|
2937
2931
|
}
|
|
2938
2932
|
}
|
|
2939
2933
|
const f = (g) => {
|
|
2940
|
-
for (let
|
|
2941
|
-
if (g.columnFilters[l[
|
|
2934
|
+
for (let c = 0; c < l.length; c++)
|
|
2935
|
+
if (g.columnFilters[l[c]] === !1)
|
|
2942
2936
|
return !1;
|
|
2943
2937
|
return !0;
|
|
2944
2938
|
};
|
|
2945
|
-
return
|
|
2939
|
+
return ni(o.rows, f, e);
|
|
2946
2940
|
}, b(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2947
2941
|
}
|
|
2948
2942
|
function Kt(e) {
|
|
@@ -2958,20 +2952,20 @@ function Kt(e) {
|
|
|
2958
2952
|
flatRows: s,
|
|
2959
2953
|
rowsById: a
|
|
2960
2954
|
} = n;
|
|
2961
|
-
const u = i * r,
|
|
2962
|
-
l = l.slice(u,
|
|
2955
|
+
const u = i * r, d = u + i;
|
|
2956
|
+
l = l.slice(u, d);
|
|
2963
2957
|
let f;
|
|
2964
2958
|
o.options.paginateExpandedRows ? f = {
|
|
2965
2959
|
rows: l,
|
|
2966
2960
|
flatRows: s,
|
|
2967
2961
|
rowsById: a
|
|
2968
|
-
} : f =
|
|
2962
|
+
} : f = ti({
|
|
2969
2963
|
rows: l,
|
|
2970
2964
|
flatRows: s,
|
|
2971
2965
|
rowsById: a
|
|
2972
2966
|
}), f.flatRows = [];
|
|
2973
|
-
const g = (
|
|
2974
|
-
f.flatRows.push(
|
|
2967
|
+
const g = (c) => {
|
|
2968
|
+
f.flatRows.push(c), c.subRows.length && c.subRows.forEach(g);
|
|
2975
2969
|
};
|
|
2976
2970
|
return f.rows.forEach(g), f;
|
|
2977
2971
|
}, b(o.options, "debugTable", "getPaginationRowModel"));
|
|
@@ -2993,29 +2987,29 @@ function Ut() {
|
|
|
2993
2987
|
});
|
|
2994
2988
|
});
|
|
2995
2989
|
const s = (a) => {
|
|
2996
|
-
const u = a.map((
|
|
2997
|
-
...
|
|
2990
|
+
const u = a.map((d) => ({
|
|
2991
|
+
...d
|
|
2998
2992
|
}));
|
|
2999
|
-
return u.sort((
|
|
3000
|
-
for (let
|
|
2993
|
+
return u.sort((d, f) => {
|
|
2994
|
+
for (let c = 0; c < r.length; c += 1) {
|
|
3001
2995
|
var g;
|
|
3002
|
-
const m = r[
|
|
2996
|
+
const m = r[c], p = l[m.id], h = p.sortUndefined, R = (g = m?.desc) != null ? g : !1;
|
|
3003
2997
|
let $ = 0;
|
|
3004
2998
|
if (h) {
|
|
3005
|
-
const P =
|
|
2999
|
+
const P = d.getValue(m.id), M = f.getValue(m.id), v = P === void 0, w = M === void 0;
|
|
3006
3000
|
if (v || w) {
|
|
3007
3001
|
if (h === "first") return v ? -1 : 1;
|
|
3008
3002
|
if (h === "last") return v ? 1 : -1;
|
|
3009
3003
|
$ = v && w ? 0 : v ? h : -h;
|
|
3010
3004
|
}
|
|
3011
3005
|
}
|
|
3012
|
-
if ($ === 0 && ($ = p.sortingFn(
|
|
3006
|
+
if ($ === 0 && ($ = p.sortingFn(d, f, m.id)), $ !== 0)
|
|
3013
3007
|
return R && ($ *= -1), p.invertSorting && ($ *= -1), $;
|
|
3014
3008
|
}
|
|
3015
|
-
return
|
|
3016
|
-
}), u.forEach((
|
|
3009
|
+
return d.index - f.index;
|
|
3010
|
+
}), u.forEach((d) => {
|
|
3017
3011
|
var f;
|
|
3018
|
-
i.push(
|
|
3012
|
+
i.push(d), (f = d.subRows) != null && f.length && (d.subRows = s(d.subRows));
|
|
3019
3013
|
}), u;
|
|
3020
3014
|
};
|
|
3021
3015
|
return {
|
|
@@ -3025,22 +3019,12 @@ function Ut() {
|
|
|
3025
3019
|
};
|
|
3026
3020
|
}, b(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
3027
3021
|
}
|
|
3028
|
-
/**
|
|
3029
|
-
* vue-table
|
|
3030
|
-
*
|
|
3031
|
-
* Copyright (c) TanStack
|
|
3032
|
-
*
|
|
3033
|
-
* This source code is licensed under the MIT license found in the
|
|
3034
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
3035
|
-
*
|
|
3036
|
-
* @license MIT
|
|
3037
|
-
*/
|
|
3038
3022
|
function Se() {
|
|
3039
3023
|
return !0;
|
|
3040
3024
|
}
|
|
3041
|
-
const
|
|
3025
|
+
const ri = /* @__PURE__ */ Symbol("merge-proxy"), li = {
|
|
3042
3026
|
get(e, o, t) {
|
|
3043
|
-
return o ===
|
|
3027
|
+
return o === ri ? t : e.get(o);
|
|
3044
3028
|
},
|
|
3045
3029
|
has(e, o) {
|
|
3046
3030
|
return e.has(o);
|
|
@@ -3085,7 +3069,7 @@ function ae() {
|
|
|
3085
3069
|
for (let i = 0; i < o.length; i++) n.push(...Object.keys(Le(o[i])));
|
|
3086
3070
|
return [...Array.from(new Set(n))];
|
|
3087
3071
|
}
|
|
3088
|
-
},
|
|
3072
|
+
}, li);
|
|
3089
3073
|
}
|
|
3090
3074
|
const pe = Q({
|
|
3091
3075
|
props: ["render", "props"],
|
|
@@ -3093,7 +3077,7 @@ const pe = Q({
|
|
|
3093
3077
|
});
|
|
3094
3078
|
function ht(e) {
|
|
3095
3079
|
return ae(e, {
|
|
3096
|
-
data:
|
|
3080
|
+
data: y(e.data)
|
|
3097
3081
|
});
|
|
3098
3082
|
}
|
|
3099
3083
|
function Wt(e) {
|
|
@@ -3110,10 +3094,10 @@ function Wt(e) {
|
|
|
3110
3094
|
...l
|
|
3111
3095
|
} : ae(r, l);
|
|
3112
3096
|
}
|
|
3113
|
-
}, o ? ht(e) : e), n =
|
|
3097
|
+
}, o ? ht(e) : e), n = ei(t);
|
|
3114
3098
|
if (o) {
|
|
3115
3099
|
const r = Zt(e.data);
|
|
3116
|
-
|
|
3100
|
+
Ct(r, () => {
|
|
3117
3101
|
n.setState((l) => ({
|
|
3118
3102
|
...l,
|
|
3119
3103
|
data: r.value
|
|
@@ -3144,19 +3128,19 @@ function Wt(e) {
|
|
|
3144
3128
|
}), n;
|
|
3145
3129
|
}
|
|
3146
3130
|
var x = /* @__PURE__ */ ((e) => (e.BETWEEN = "between", e.CONTAINS = "contains", e.ENDS_WITH = "endsWith", e.EQUALS = "equals", e.GREATER_THAN = "greaterThan", e.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", e.IN = "in", e.IS_EMPTY = "isEmpty", e.IS_NOT_EMPTY = "isNotEmpty", e.IS_NOT_NULL = "isNotNull", e.IS_NULL = "isNull", e.LESS_THAN = "lessThan", e.LESS_THAN_OR_EQUAL = "lessThanOrEqual", e.LIKE = "like", e.NOT_BETWEEN = "notBetween", e.NOT_EQUAL = "notEqual", e.NOT_IN = "notIn", e.NOT_LIKE = "notLike", e.STARTS_WITH = "startsWith", e))(x || {}), T = /* @__PURE__ */ ((e) => (e.BETWEEN = "bt", e.CONTAINS = "ct", e.EMPTY = "empty", e.ENDS_WITH = "ew", e.EQUALS = "eq", e.GREATER_THAN = "gt", e.GREATER_THAN_OR_EQUAL = "gte", e.IN = "in", e.LESS_THAN = "lt", e.LESS_THAN_OR_EQUAL = "lte", e.LIKE = "like", e.NULL = "null", e.STARTS_WITH = "sw", e))(T || {});
|
|
3147
|
-
const
|
|
3131
|
+
const si = { class: "pagination" }, ai = {
|
|
3148
3132
|
key: 0,
|
|
3149
3133
|
class: "items-per-page-control"
|
|
3150
|
-
},
|
|
3134
|
+
}, ui = ["value"], ci = ["value"], di = {
|
|
3151
3135
|
key: 1,
|
|
3152
3136
|
class: "page-input-control"
|
|
3153
|
-
},
|
|
3137
|
+
}, gi = {
|
|
3154
3138
|
key: 2,
|
|
3155
3139
|
class: "pagination-buttons-wrapper"
|
|
3156
|
-
},
|
|
3140
|
+
}, fi = { key: 0 }, pi = { key: 1 }, mi = { key: 1 }, hi = { key: 3 }, vi = {
|
|
3157
3141
|
name: "TablePagination"
|
|
3158
|
-
},
|
|
3159
|
-
...
|
|
3142
|
+
}, Si = /* @__PURE__ */ Q({
|
|
3143
|
+
...vi,
|
|
3160
3144
|
props: {
|
|
3161
3145
|
currentPage: {
|
|
3162
3146
|
required: !0,
|
|
@@ -3214,104 +3198,104 @@ const li = { class: "pagination" }, si = {
|
|
|
3214
3198
|
), r = B(
|
|
3215
3199
|
() => Math.ceil(t.totalItems / i.value)
|
|
3216
3200
|
), l = B(
|
|
3217
|
-
() => Array.from({ length: r.value }, (u,
|
|
3201
|
+
() => Array.from({ length: r.value }, (u, d) => d + 1)
|
|
3218
3202
|
), s = (u) => {
|
|
3219
|
-
const
|
|
3203
|
+
const d = Number.parseInt(
|
|
3220
3204
|
u.target.value,
|
|
3221
3205
|
10
|
|
3222
3206
|
);
|
|
3223
|
-
i.value =
|
|
3207
|
+
i.value = d, n("update:itemsPerPage", i.value);
|
|
3224
3208
|
}, a = (u) => {
|
|
3225
|
-
const
|
|
3226
|
-
!isNaN(
|
|
3209
|
+
const d = Number.parseInt(u.toString(), 10) - 1;
|
|
3210
|
+
!Number.isNaN(d) && d >= 0 && d < r.value && n("update:currentPage", d);
|
|
3227
3211
|
};
|
|
3228
|
-
return (u,
|
|
3229
|
-
e.showItemsPerPageControl ? (S(),
|
|
3212
|
+
return (u, d) => (S(), C("div", si, [
|
|
3213
|
+
e.showItemsPerPageControl ? (S(), C("div", ai, [
|
|
3230
3214
|
A("span", null, N(e.itemsPerPageControlLabel), 1),
|
|
3231
3215
|
A("select", {
|
|
3232
3216
|
value: i.value,
|
|
3233
3217
|
onChange: s
|
|
3234
3218
|
}, [
|
|
3235
|
-
(S(!0),
|
|
3219
|
+
(S(!0), C(H, null, z(e.itemsPerPageOptions, (f) => (S(), C("option", {
|
|
3236
3220
|
key: `items-per-page-option-${f}`,
|
|
3237
3221
|
value: f
|
|
3238
|
-
}, N(f), 9,
|
|
3239
|
-
], 40,
|
|
3222
|
+
}, N(f), 9, ci))), 128))
|
|
3223
|
+
], 40, ui)
|
|
3240
3224
|
])) : D("", !0),
|
|
3241
|
-
r.value > 1 && e.showPageInput ? (S(),
|
|
3225
|
+
r.value > 1 && e.showPageInput ? (S(), C("div", di, [
|
|
3242
3226
|
A("span", null, N(e.pageInputLabel), 1),
|
|
3243
|
-
E(
|
|
3227
|
+
E(y(Ft), {
|
|
3244
3228
|
type: "number",
|
|
3245
3229
|
"debounce-time": e.inputDebounceTime,
|
|
3246
3230
|
"onUpdate:modelValue": a
|
|
3247
3231
|
}, null, 8, ["debounce-time"])
|
|
3248
3232
|
])) : D("", !0),
|
|
3249
|
-
r.value > 1 ? (S(),
|
|
3250
|
-
e.showFirstLastButtons || e.showPreviousNextButtons ? (S(),
|
|
3251
|
-
e.showFirstLastButtons ? (S(), _(
|
|
3233
|
+
r.value > 1 ? (S(), C("div", gi, [
|
|
3234
|
+
e.showFirstLastButtons || e.showPreviousNextButtons ? (S(), C("div", fi, [
|
|
3235
|
+
e.showFirstLastButtons ? (S(), _(y(Z), {
|
|
3252
3236
|
key: 0,
|
|
3253
3237
|
disabled: !(e.currentPage > 0),
|
|
3254
3238
|
class: "first-page",
|
|
3255
3239
|
size: "small",
|
|
3256
|
-
onClick:
|
|
3240
|
+
onClick: d[0] || (d[0] = (f) => u.$emit("update:currentPage", 0))
|
|
3257
3241
|
}, {
|
|
3258
3242
|
iconLeft: G(() => [
|
|
3259
|
-
E(
|
|
3243
|
+
E(y(j), { icon: "prime:angle-double-left" })
|
|
3260
3244
|
]),
|
|
3261
3245
|
_: 1
|
|
3262
3246
|
}, 8, ["disabled"])) : D("", !0),
|
|
3263
|
-
e.showPreviousNextButtons ? (S(), _(
|
|
3247
|
+
e.showPreviousNextButtons ? (S(), _(y(Z), {
|
|
3264
3248
|
key: 1,
|
|
3265
3249
|
disabled: !(e.currentPage > 0),
|
|
3266
3250
|
class: "previous-page",
|
|
3267
3251
|
size: "small",
|
|
3268
|
-
onClick:
|
|
3252
|
+
onClick: d[1] || (d[1] = (f) => u.$emit("update:currentPage", e.currentPage - 1))
|
|
3269
3253
|
}, {
|
|
3270
3254
|
iconLeft: G(() => [
|
|
3271
|
-
E(
|
|
3255
|
+
E(y(j), { icon: "prime:angle-left" })
|
|
3272
3256
|
]),
|
|
3273
3257
|
_: 1
|
|
3274
3258
|
}, 8, ["disabled"])) : D("", !0)
|
|
3275
3259
|
])) : D("", !0),
|
|
3276
3260
|
A("div", null, [
|
|
3277
|
-
e.showPageButtons ? (S(!0),
|
|
3261
|
+
e.showPageButtons ? (S(!0), C(H, { key: 0 }, z(l.value, (f) => (S(), _(y(Z), {
|
|
3278
3262
|
key: `page-button-${f}`,
|
|
3279
3263
|
class: ge(`page-button ${f === e.currentPage + 1 ? "active" : ""}`),
|
|
3280
3264
|
label: `${f}`,
|
|
3281
3265
|
size: "small",
|
|
3282
3266
|
onClick: (g) => u.$emit("update:currentPage", f - 1)
|
|
3283
|
-
}, null, 8, ["class", "label", "onClick"]))), 128)) : (S(),
|
|
3267
|
+
}, null, 8, ["class", "label", "onClick"]))), 128)) : (S(), C("span", pi, N(`${e.currentPage + 1} / ${r.value}`), 1))
|
|
3284
3268
|
]),
|
|
3285
|
-
e.showFirstLastButtons || e.showPreviousNextButtons ? (S(),
|
|
3286
|
-
e.showPreviousNextButtons ? (S(), _(
|
|
3269
|
+
e.showFirstLastButtons || e.showPreviousNextButtons ? (S(), C("div", mi, [
|
|
3270
|
+
e.showPreviousNextButtons ? (S(), _(y(Z), {
|
|
3287
3271
|
key: 0,
|
|
3288
3272
|
disabled: !(e.currentPage < r.value - 1),
|
|
3289
3273
|
class: "next-page",
|
|
3290
3274
|
size: "small",
|
|
3291
|
-
onClick:
|
|
3275
|
+
onClick: d[2] || (d[2] = (f) => u.$emit("update:currentPage", e.currentPage + 1))
|
|
3292
3276
|
}, {
|
|
3293
3277
|
iconLeft: G(() => [
|
|
3294
|
-
E(
|
|
3278
|
+
E(y(j), { icon: "prime:angle-right" })
|
|
3295
3279
|
]),
|
|
3296
3280
|
_: 1
|
|
3297
3281
|
}, 8, ["disabled"])) : D("", !0),
|
|
3298
|
-
e.showFirstLastButtons ? (S(), _(
|
|
3282
|
+
e.showFirstLastButtons ? (S(), _(y(Z), {
|
|
3299
3283
|
key: 1,
|
|
3300
3284
|
disabled: !(e.currentPage < r.value - 1),
|
|
3301
3285
|
class: "last-page",
|
|
3302
3286
|
size: "small",
|
|
3303
|
-
onClick:
|
|
3287
|
+
onClick: d[3] || (d[3] = (f) => u.$emit("update:currentPage", r.value - 1))
|
|
3304
3288
|
}, {
|
|
3305
3289
|
iconLeft: G(() => [
|
|
3306
|
-
E(
|
|
3290
|
+
E(y(j), { icon: "prime:angle-double-right" })
|
|
3307
3291
|
]),
|
|
3308
3292
|
_: 1
|
|
3309
3293
|
}, 8, ["disabled"])) : D("", !0)
|
|
3310
3294
|
])) : D("", !0)
|
|
3311
|
-
])) : (S(),
|
|
3295
|
+
])) : (S(), C("span", hi, N(`${e.currentPage + 1} / ${r.value}`), 1))
|
|
3312
3296
|
]));
|
|
3313
3297
|
}
|
|
3314
|
-
}), we = 0,
|
|
3298
|
+
}), we = 0, wi = [10, 20, 30], yi = 10, Qt = "table", Xt = {
|
|
3315
3299
|
day: "2-digit",
|
|
3316
3300
|
month: "2-digit",
|
|
3317
3301
|
year: "numeric"
|
|
@@ -3324,7 +3308,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3324
3308
|
value: e,
|
|
3325
3309
|
locale: o = "en-GB",
|
|
3326
3310
|
formatOptions: t
|
|
3327
|
-
}) => typeof e != "number" || isNaN(e) ? e : new Intl.NumberFormat(o, t).format(e),
|
|
3311
|
+
}) => typeof e != "number" || Number.isNaN(e) ? e : new Intl.NumberFormat(o, t).format(e), Ri = (e, o, t) => on(e, o, t ?? Xt), Fi = (e, o, t) => nn(e, o, t ?? Ci), de = (e) => {
|
|
3328
3312
|
switch (e) {
|
|
3329
3313
|
case x.CONTAINS:
|
|
3330
3314
|
return { operator: T.CONTAINS };
|
|
@@ -3383,31 +3367,35 @@ const li = { class: "pagination" }, si = {
|
|
|
3383
3367
|
const o = e.value.filter(
|
|
3384
3368
|
(t) => Yt(t)
|
|
3385
3369
|
);
|
|
3386
|
-
return o.length
|
|
3370
|
+
return o.length === 0 ? null : e.filterFn === x.BETWEEN ? o.length > 1 ? {
|
|
3387
3371
|
key: e.id,
|
|
3388
|
-
...
|
|
3372
|
+
...de(e.filterFn),
|
|
3389
3373
|
value: o.slice(0, 2).join(",")
|
|
3390
|
-
} : null : e.filterFn &&
|
|
3374
|
+
} : null : e.filterFn && !$i(e.filterFn) ? {
|
|
3391
3375
|
key: e.id,
|
|
3392
|
-
...
|
|
3376
|
+
...de(e.filterFn),
|
|
3393
3377
|
value: o[0]
|
|
3394
3378
|
} : {
|
|
3395
3379
|
key: e.id,
|
|
3396
|
-
...
|
|
3380
|
+
...de(e.filterFn || x.IN),
|
|
3397
3381
|
value: o.join(",")
|
|
3398
3382
|
};
|
|
3399
|
-
},
|
|
3383
|
+
}, bi = (e, o, t) => {
|
|
3400
3384
|
const n = () => {
|
|
3401
3385
|
if (!o || o.length === 0) return null;
|
|
3402
|
-
const s = o.filter((a) => Array.isArray(a.value) ? a.value.filter((
|
|
3386
|
+
const s = o.filter((a) => Array.isArray(a.value) ? a.value.filter((d) => Yt(d)).length > 0 : typeof a.value == "string" ? a.value.trim() !== "" : a.value != null);
|
|
3403
3387
|
return s.length === 0 ? null : s.length === 1 ? Array.isArray(s[0].value) ? wt(s[0]) : {
|
|
3404
3388
|
key: s[0].id,
|
|
3405
|
-
...
|
|
3389
|
+
...de(
|
|
3390
|
+
s[0].filterFn || x.CONTAINS
|
|
3391
|
+
),
|
|
3406
3392
|
value: String(s[0].value)
|
|
3407
3393
|
} : {
|
|
3408
3394
|
AND: s.map((a) => Array.isArray(a.value) ? wt(a) : {
|
|
3409
3395
|
key: a.id,
|
|
3410
|
-
...
|
|
3396
|
+
...de(
|
|
3397
|
+
a.filterFn || x.CONTAINS
|
|
3398
|
+
),
|
|
3411
3399
|
value: String(a.value)
|
|
3412
3400
|
})
|
|
3413
3401
|
};
|
|
@@ -3426,7 +3414,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3426
3414
|
sort: l(),
|
|
3427
3415
|
offset: r()
|
|
3428
3416
|
};
|
|
3429
|
-
},
|
|
3417
|
+
}, Pi = (e, o) => {
|
|
3430
3418
|
try {
|
|
3431
3419
|
const t = o.getItem(`${Qt}-${e}`);
|
|
3432
3420
|
return t && JSON.parse(t);
|
|
@@ -3434,21 +3422,21 @@ const li = { class: "pagination" }, si = {
|
|
|
3434
3422
|
console.log("[Dz table] Could not restore table state", t);
|
|
3435
3423
|
}
|
|
3436
3424
|
return null;
|
|
3437
|
-
},
|
|
3425
|
+
}, yt = (e, o, t) => {
|
|
3438
3426
|
try {
|
|
3439
3427
|
t.setItem(`${Qt}-${e}`, JSON.stringify(o));
|
|
3440
3428
|
} catch (n) {
|
|
3441
3429
|
console.log("[Dz table] Could not store table state", n);
|
|
3442
3430
|
}
|
|
3443
|
-
},
|
|
3431
|
+
}, $i = (e) => [
|
|
3444
3432
|
x.IN,
|
|
3445
3433
|
x.NOT_IN,
|
|
3446
3434
|
x.BETWEEN,
|
|
3447
3435
|
x.NOT_BETWEEN
|
|
3448
|
-
].includes(e), Yt = (e) => e != null,
|
|
3436
|
+
].includes(e), Yt = (e) => e != null, Ii = ["data-id", "data-selected"], xi = ["data-label", "data-align"], Ai = { key: 1 }, Di = ["colspan"], Vi = {
|
|
3449
3437
|
name: "TableBody"
|
|
3450
|
-
},
|
|
3451
|
-
...
|
|
3438
|
+
}, _i = /* @__PURE__ */ Q({
|
|
3439
|
+
...Vi,
|
|
3452
3440
|
props: {
|
|
3453
3441
|
customFormatters: {
|
|
3454
3442
|
default: () => ({}),
|
|
@@ -3474,7 +3462,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3474
3462
|
return {
|
|
3475
3463
|
props: r,
|
|
3476
3464
|
render: (() => {
|
|
3477
|
-
const
|
|
3465
|
+
const d = {
|
|
3478
3466
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3479
3467
|
number: (g) => vt({
|
|
3480
3468
|
value: Number(g),
|
|
@@ -3482,13 +3470,13 @@ const li = { class: "pagination" }, si = {
|
|
|
3482
3470
|
formatOptions: s?.formatOptions
|
|
3483
3471
|
}),
|
|
3484
3472
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3485
|
-
date: (g) =>
|
|
3473
|
+
date: (g) => Ri(
|
|
3486
3474
|
g,
|
|
3487
3475
|
l?.locale ?? o.locale,
|
|
3488
3476
|
l?.formatOptions
|
|
3489
3477
|
),
|
|
3490
3478
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3491
|
-
datetime: (g) =>
|
|
3479
|
+
datetime: (g) => Fi(
|
|
3492
3480
|
g,
|
|
3493
3481
|
l?.locale ?? o.locale,
|
|
3494
3482
|
l?.formatOptions
|
|
@@ -3505,24 +3493,24 @@ const li = { class: "pagination" }, si = {
|
|
|
3505
3493
|
}),
|
|
3506
3494
|
...o.customFormatters
|
|
3507
3495
|
}, f = i.column.columnDef.dataType || "text";
|
|
3508
|
-
return
|
|
3496
|
+
return d?.[f]?.(r.getValue()) || a;
|
|
3509
3497
|
})()
|
|
3510
3498
|
};
|
|
3511
3499
|
}, n = (i) => {
|
|
3512
3500
|
const r = i.column.columnDef.tooltip;
|
|
3513
3501
|
return typeof r == "string" ? r : typeof r == "function" ? r(i) : i.getValue();
|
|
3514
3502
|
};
|
|
3515
|
-
return (i, r) => (S(),
|
|
3516
|
-
e.table.getRowModel().rows?.length ? (S(!0),
|
|
3503
|
+
return (i, r) => (S(), C("tbody", null, [
|
|
3504
|
+
e.table.getRowModel().rows?.length ? (S(!0), C(H, { key: 0 }, z(e.table.getRowModel().rows, (l) => (S(), C("tr", {
|
|
3517
3505
|
key: `table-row-${l.id}`,
|
|
3518
3506
|
"data-id": l.id,
|
|
3519
3507
|
"data-selected": e.enableRowSelection ? l.getIsSelected() : void 0
|
|
3520
3508
|
}, [
|
|
3521
|
-
(S(!0),
|
|
3509
|
+
(S(!0), C(H, null, z(l.getVisibleCells(), (s) => (S(), C("td", {
|
|
3522
3510
|
key: `table-data-${l.id}-${s.id}`,
|
|
3523
3511
|
class: ge([s.column.id ? `cell-${s.column.id}` : ""]),
|
|
3524
3512
|
"data-label": s.column.id,
|
|
3525
|
-
"data-align":
|
|
3513
|
+
"data-align": y(Ue)({
|
|
3526
3514
|
align: s.column.columnDef.align,
|
|
3527
3515
|
dataType: s.column.columnDef.dataType
|
|
3528
3516
|
}),
|
|
@@ -3532,42 +3520,42 @@ const li = { class: "pagination" }, si = {
|
|
|
3532
3520
|
minWidth: s.column.columnDef.minWidth
|
|
3533
3521
|
})
|
|
3534
3522
|
}, [
|
|
3535
|
-
s.column.columnDef.tooltip ? (S(), _(
|
|
3523
|
+
s.column.columnDef.tooltip ? (S(), _(y(rn), te({
|
|
3536
3524
|
key: 0,
|
|
3537
3525
|
ref_for: !0
|
|
3538
3526
|
}, s.column.columnDef.tooltipOptions), {
|
|
3539
3527
|
content: G(() => [
|
|
3540
|
-
typeof s.column.columnDef.tooltip == "function" && typeof n(s) != "string" ? (S(), _(ue(n(s)), { key: 0 })) : (S(),
|
|
3528
|
+
typeof s.column.columnDef.tooltip == "function" && typeof n(s) != "string" ? (S(), _(ue(n(s)), { key: 0 })) : (S(), C(H, { key: 1 }, [
|
|
3541
3529
|
tn(N(n(s)), 1)
|
|
3542
3530
|
], 64))
|
|
3543
3531
|
]),
|
|
3544
3532
|
default: G(() => [
|
|
3545
|
-
E(
|
|
3533
|
+
E(y(pe), te({ ref_for: !0 }, t(s)), null, 16)
|
|
3546
3534
|
]),
|
|
3547
3535
|
_: 2
|
|
3548
|
-
}, 1040)) : (S(), _(
|
|
3536
|
+
}, 1040)) : (S(), _(y(pe), te({
|
|
3549
3537
|
key: 1,
|
|
3550
3538
|
ref_for: !0
|
|
3551
3539
|
}, t(s)), null, 16))
|
|
3552
|
-
], 14,
|
|
3553
|
-
], 8,
|
|
3540
|
+
], 14, xi))), 128))
|
|
3541
|
+
], 8, Ii))), 128)) : (S(), C("tr", Ai, [
|
|
3554
3542
|
A("td", {
|
|
3555
3543
|
colspan: e.table.getAllColumns()?.length,
|
|
3556
3544
|
class: "empty-table"
|
|
3557
|
-
}, N(e.emptyTableMessage), 9,
|
|
3545
|
+
}, N(e.emptyTableMessage), 9, Di)
|
|
3558
3546
|
]))
|
|
3559
3547
|
]));
|
|
3560
3548
|
}
|
|
3561
|
-
}),
|
|
3549
|
+
}), Mi = {
|
|
3562
3550
|
key: 0,
|
|
3563
3551
|
class: "data-actions"
|
|
3564
|
-
},
|
|
3552
|
+
}, Ei = {
|
|
3565
3553
|
key: 0,
|
|
3566
3554
|
class: "title"
|
|
3567
|
-
},
|
|
3555
|
+
}, ki = { key: 0 }, Li = { key: 0 }, Ti = {
|
|
3568
3556
|
name: "TableDataActions"
|
|
3569
|
-
},
|
|
3570
|
-
...
|
|
3557
|
+
}, Hi = /* @__PURE__ */ Q({
|
|
3558
|
+
...Ti,
|
|
3571
3559
|
props: {
|
|
3572
3560
|
actions: {
|
|
3573
3561
|
type: Array,
|
|
@@ -3594,28 +3582,28 @@ const li = { class: "pagination" }, si = {
|
|
|
3594
3582
|
emits: ["action:select"],
|
|
3595
3583
|
setup(e, { emit: o }) {
|
|
3596
3584
|
const t = e, n = o, i = K(!1), r = K(), l = B(
|
|
3597
|
-
() => t.actions.map((
|
|
3598
|
-
...
|
|
3599
|
-
display: typeof
|
|
3600
|
-
disabled: typeof
|
|
3601
|
-
})).filter((
|
|
3585
|
+
() => t.actions.map((c) => ({
|
|
3586
|
+
...c,
|
|
3587
|
+
display: typeof c.display == "function" ? c.display(t.data) : c.display ?? !0,
|
|
3588
|
+
disabled: typeof c.disabled == "function" ? c.disabled(t.data) : c.disabled
|
|
3589
|
+
})).filter((c) => c.display)
|
|
3602
3590
|
), s = B(() => {
|
|
3603
|
-
const
|
|
3604
|
-
if (
|
|
3605
|
-
return typeof
|
|
3591
|
+
const c = r.value?.confirmationOptions;
|
|
3592
|
+
if (c)
|
|
3593
|
+
return typeof c == "function" ? c(t.data) : c;
|
|
3606
3594
|
}), a = B(
|
|
3607
3595
|
() => (typeof t.displayActions == "function" ? t.displayActions(t.data) : t.displayActions) && l.value?.length
|
|
3608
3596
|
), u = B(
|
|
3609
3597
|
() => l.value?.length && t.mode === "buttons" || t.mode === "auto" && l.value?.length <= t.autoModeCount
|
|
3610
|
-
),
|
|
3598
|
+
), d = B(
|
|
3611
3599
|
() => l.value?.length && t.mode === "dropdown" || t.mode === "auto" && l.value?.length > t.autoModeCount
|
|
3612
3600
|
), f = () => {
|
|
3613
3601
|
i.value = !1, n("action:select", r.value);
|
|
3614
|
-
}, g = (
|
|
3615
|
-
r.value =
|
|
3602
|
+
}, g = (c) => {
|
|
3603
|
+
r.value = c, c?.requireConfirmationModal ? i.value = !0 : n("action:select", r.value);
|
|
3616
3604
|
};
|
|
3617
|
-
return (
|
|
3618
|
-
u.value ? (S(!0),
|
|
3605
|
+
return (c, m) => a.value ? (S(), C("div", Mi, [
|
|
3606
|
+
u.value ? (S(!0), C(H, { key: 0 }, z(l.value, (p, h) => (S(), _(y(Z), te({ ref_for: !0 }, p, {
|
|
3619
3607
|
key: `mode-button-${h}`,
|
|
3620
3608
|
class: p.class,
|
|
3621
3609
|
disabled: p.disabled,
|
|
@@ -3625,14 +3613,14 @@ const li = { class: "pagination" }, si = {
|
|
|
3625
3613
|
rounded: "",
|
|
3626
3614
|
variant: "textOnly",
|
|
3627
3615
|
onClick: (R) => g(p)
|
|
3628
|
-
}), null, 16, ["class", "disabled", "icon-left", "label", "title", "onClick"]))), 128)) :
|
|
3616
|
+
}), null, 16, ["class", "disabled", "icon-left", "label", "title", "onClick"]))), 128)) : d.value ? (S(), _(y(ln), {
|
|
3629
3617
|
key: 1,
|
|
3630
3618
|
menu: l.value,
|
|
3631
3619
|
onSelect: g
|
|
3632
3620
|
}, {
|
|
3633
3621
|
default: G(() => [
|
|
3634
|
-
J(
|
|
3635
|
-
E(
|
|
3622
|
+
J(c.$slots, "trigger", {}, () => [
|
|
3623
|
+
E(y(j), {
|
|
3636
3624
|
icon: "prime:cog",
|
|
3637
3625
|
width: "22"
|
|
3638
3626
|
})
|
|
@@ -3640,8 +3628,8 @@ const li = { class: "pagination" }, si = {
|
|
|
3640
3628
|
]),
|
|
3641
3629
|
_: 3
|
|
3642
3630
|
}, 8, ["menu"])) : D("", !0),
|
|
3643
|
-
J(
|
|
3644
|
-
i.value ? (S(), _(
|
|
3631
|
+
J(c.$slots, "confirmationModal", {}, () => [
|
|
3632
|
+
i.value ? (S(), _(y(sn), {
|
|
3645
3633
|
key: 0,
|
|
3646
3634
|
"onOn:close": m[0] || (m[0] = (p) => i.value = !1),
|
|
3647
3635
|
"onOn:confirm": f
|
|
@@ -3649,21 +3637,21 @@ const li = { class: "pagination" }, si = {
|
|
|
3649
3637
|
s.value?.header ? {
|
|
3650
3638
|
name: "header",
|
|
3651
3639
|
fn: G(() => [
|
|
3652
|
-
typeof s.value?.header == "string" ? (S(),
|
|
3640
|
+
typeof s.value?.header == "string" ? (S(), C("p", Ei, N(s.value?.header), 1)) : (S(), _(ue(s.value?.header), { key: 1 }))
|
|
3653
3641
|
]),
|
|
3654
3642
|
key: "0"
|
|
3655
3643
|
} : void 0,
|
|
3656
3644
|
s.value?.body ? {
|
|
3657
3645
|
name: "message",
|
|
3658
3646
|
fn: G(() => [
|
|
3659
|
-
typeof s.value?.body == "string" ? (S(),
|
|
3647
|
+
typeof s.value?.body == "string" ? (S(), C("p", ki, N(s.value?.body), 1)) : (S(), _(ue(s.value?.body), { key: 1 }))
|
|
3660
3648
|
]),
|
|
3661
3649
|
key: "1"
|
|
3662
3650
|
} : void 0,
|
|
3663
3651
|
s.value?.footer ? {
|
|
3664
3652
|
name: "footer",
|
|
3665
3653
|
fn: G(() => [
|
|
3666
|
-
typeof s.value?.footer == "string" ? (S(),
|
|
3654
|
+
typeof s.value?.footer == "string" ? (S(), C("p", Li, N(s.value?.footer), 1)) : (S(), _(ue(s.value?.footer), { key: 1 }))
|
|
3667
3655
|
]),
|
|
3668
3656
|
key: "2"
|
|
3669
3657
|
} : void 0
|
|
@@ -3671,40 +3659,40 @@ const li = { class: "pagination" }, si = {
|
|
|
3671
3659
|
])
|
|
3672
3660
|
])) : D("", !0);
|
|
3673
3661
|
}
|
|
3674
|
-
}),
|
|
3662
|
+
}), Bi = ["colSpan", "data-align", "onClick"], Oi = {
|
|
3675
3663
|
key: 0,
|
|
3676
3664
|
class: "sort-state"
|
|
3677
|
-
},
|
|
3665
|
+
}, Gi = {
|
|
3678
3666
|
key: 0,
|
|
3679
3667
|
class: "sort-icon",
|
|
3680
3668
|
height: "16",
|
|
3681
3669
|
viewBox: "0 0 24 24",
|
|
3682
3670
|
width: "16",
|
|
3683
3671
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3684
|
-
},
|
|
3672
|
+
}, zi = {
|
|
3685
3673
|
key: 0,
|
|
3686
3674
|
class: "sort-icon",
|
|
3687
3675
|
height: "16",
|
|
3688
3676
|
viewBox: "0 0 24 24",
|
|
3689
3677
|
width: "16",
|
|
3690
3678
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3691
|
-
},
|
|
3679
|
+
}, Ni = {
|
|
3692
3680
|
key: 1,
|
|
3693
3681
|
class: "sort-icon",
|
|
3694
3682
|
height: "16",
|
|
3695
3683
|
viewBox: "0 0 24 24",
|
|
3696
3684
|
width: "16",
|
|
3697
3685
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3698
|
-
},
|
|
3686
|
+
}, ji = {
|
|
3699
3687
|
key: 0,
|
|
3700
3688
|
class: "header-row filters"
|
|
3701
|
-
},
|
|
3689
|
+
}, qi = ["data-align"], Ki = {
|
|
3702
3690
|
key: 3,
|
|
3703
3691
|
class: "number-range-filter"
|
|
3704
|
-
},
|
|
3692
|
+
}, Ui = {
|
|
3705
3693
|
name: "TableHeader"
|
|
3706
|
-
},
|
|
3707
|
-
...
|
|
3694
|
+
}, Wi = /* @__PURE__ */ Q({
|
|
3695
|
+
...Ui,
|
|
3708
3696
|
props: {
|
|
3709
3697
|
highlightActiveColumn: Boolean,
|
|
3710
3698
|
inputDebounceTime: {
|
|
@@ -3722,22 +3710,22 @@ const li = { class: "pagination" }, si = {
|
|
|
3722
3710
|
},
|
|
3723
3711
|
setup(e) {
|
|
3724
3712
|
const o = e, t = (l) => o.highlightActiveColumn && (l.getIsSorted() === "asc" || l.getIsSorted() === "desc" || l.getIsFiltered()) ? "highlight" : "", n = (l) => l.getFilterValue(), i = (l) => l?.length ? l.map((s, a) => {
|
|
3725
|
-
const u = String(s.getDate()).padStart(2, "0"),
|
|
3726
|
-
return `${s.getFullYear()}-${
|
|
3713
|
+
const u = String(s.getDate()).padStart(2, "0"), d = String(s.getMonth() + 1).padStart(2, "0"), f = a === 0 ? "00:00:00" : "23:59:59";
|
|
3714
|
+
return `${s.getFullYear()}-${d}-${u} ${f}`;
|
|
3727
3715
|
}).filter((s) => s !== null) : null, r = (l, s, a) => {
|
|
3728
|
-
const u = l.getFilterValue(),
|
|
3729
|
-
|
|
3730
|
-
const f =
|
|
3716
|
+
const u = l.getFilterValue(), d = Array.isArray(u) ? [...u] : [void 0, void 0];
|
|
3717
|
+
d[s] = a !== void 0 ? Number(a) : void 0;
|
|
3718
|
+
const f = d.some(
|
|
3731
3719
|
(g) => g !== void 0
|
|
3732
3720
|
);
|
|
3733
|
-
l.setFilterValue(f ?
|
|
3721
|
+
l.setFilterValue(f ? d : []);
|
|
3734
3722
|
};
|
|
3735
|
-
return (l, s) => (S(),
|
|
3736
|
-
(S(!0),
|
|
3723
|
+
return (l, s) => (S(), C("thead", null, [
|
|
3724
|
+
(S(!0), C(H, null, z(e.table.getHeaderGroups(), (a) => (S(), C("tr", {
|
|
3737
3725
|
key: a.id,
|
|
3738
3726
|
class: "header-row"
|
|
3739
3727
|
}, [
|
|
3740
|
-
(S(!0),
|
|
3728
|
+
(S(!0), C(H, null, z(a.headers, (u) => (S(), C("th", {
|
|
3741
3729
|
key: `table-header-${u.id}`,
|
|
3742
3730
|
class: ge([
|
|
3743
3731
|
t(u.column),
|
|
@@ -3745,7 +3733,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3745
3733
|
u.column.columnDef.enableSorting ? "sortable" : ""
|
|
3746
3734
|
]),
|
|
3747
3735
|
colSpan: u.colSpan,
|
|
3748
|
-
"data-align":
|
|
3736
|
+
"data-align": y(Ue)({
|
|
3749
3737
|
align: u.column.columnDef.align,
|
|
3750
3738
|
dataType: u.column.columnDef.dataType
|
|
3751
3739
|
}),
|
|
@@ -3754,39 +3742,39 @@ const li = { class: "pagination" }, si = {
|
|
|
3754
3742
|
maxWidth: u.column.columnDef.maxWidth,
|
|
3755
3743
|
minWidth: u.column.columnDef.minWidth
|
|
3756
3744
|
}),
|
|
3757
|
-
onClick: (
|
|
3745
|
+
onClick: (d) => u.column.getCanSort() ? u.column.getToggleSortingHandler()?.(d) : null
|
|
3758
3746
|
}, [
|
|
3759
|
-
u.isPlaceholder ? D("", !0) : (S(),
|
|
3760
|
-
E(
|
|
3747
|
+
u.isPlaceholder ? D("", !0) : (S(), C(H, { key: 0 }, [
|
|
3748
|
+
E(y(pe), {
|
|
3761
3749
|
props: u.getContext(),
|
|
3762
3750
|
render: u.column.columnDef.header
|
|
3763
3751
|
}, null, 8, ["props", "render"]),
|
|
3764
|
-
u.column.columnDef.enableSorting ? (S(),
|
|
3765
|
-
!u.column.getIsSorted() && u.column.getCanSort() ? (S(),
|
|
3752
|
+
u.column.columnDef.enableSorting ? (S(), C("span", Oi, [
|
|
3753
|
+
!u.column.getIsSorted() && u.column.getCanSort() ? (S(), C("svg", Gi, [...s[0] || (s[0] = [
|
|
3766
3754
|
A("path", {
|
|
3767
3755
|
d: "M18 10.75H6a.74.74 0 0 1-.69-.46a.75.75 0 0 1 .16-.82l6-6a.75.75 0 0 1 1.06 0l6 6a.75.75 0 0 1 .16.82a.74.74 0 0 1-.69.46M7.81 9.25h8.38L12 5.06ZM12 20.75a.74.74 0 0 1-.53-.22l-6-6a.75.75 0 0 1-.16-.82a.74.74 0 0 1 .69-.46h12a.74.74 0 0 1 .69.46a.75.75 0 0 1-.16.82l-6 6a.74.74 0 0 1-.53.22m-4.19-6L12 18.94l4.19-4.19Z",
|
|
3768
3756
|
fill: "currentColor"
|
|
3769
3757
|
}, null, -1)
|
|
3770
|
-
]))) : D("", !0),
|
|
3771
|
-
u.column.getIsSorted() && u.column.getCanSort() ? (S(),
|
|
3772
|
-
u.column.getIsSorted() === "asc" ? (S(),
|
|
3758
|
+
])])) : D("", !0),
|
|
3759
|
+
u.column.getIsSorted() && u.column.getCanSort() ? (S(), C(H, { key: 1 }, [
|
|
3760
|
+
u.column.getIsSorted() === "asc" ? (S(), C("svg", zi, [...s[1] || (s[1] = [
|
|
3773
3761
|
A("path", {
|
|
3774
3762
|
d: "M12.53 7.97a.75.75 0 0 0-1.06 0l-7 7A.75.75 0 0 0 5 16.25h14a.75.75 0 0 0 .53-1.28z",
|
|
3775
3763
|
fill: "currentColor"
|
|
3776
3764
|
}, null, -1)
|
|
3777
|
-
]))) : (S(),
|
|
3765
|
+
])])) : (S(), C("svg", Ni, [...s[2] || (s[2] = [
|
|
3778
3766
|
A("path", {
|
|
3779
3767
|
d: "M5 7.75a.75.75 0 0 0-.53 1.28l7 7a.75.75 0 0 0 1.06 0l7-7A.75.75 0 0 0 19 7.75z",
|
|
3780
3768
|
fill: "currentColor"
|
|
3781
3769
|
}, null, -1)
|
|
3782
|
-
])))
|
|
3770
|
+
])]))
|
|
3783
3771
|
], 64)) : D("", !0)
|
|
3784
3772
|
])) : D("", !0)
|
|
3785
3773
|
], 64))
|
|
3786
|
-
], 14,
|
|
3774
|
+
], 14, Bi))), 128))
|
|
3787
3775
|
]))), 128)),
|
|
3788
|
-
e.isFilterRowVisible ? (S(),
|
|
3789
|
-
(S(!0),
|
|
3776
|
+
e.isFilterRowVisible ? (S(), C("tr", ji, [
|
|
3777
|
+
(S(!0), C(H, null, z(e.table.getVisibleLeafColumns(), (a) => (S(), C("th", {
|
|
3790
3778
|
key: `table-filter-${a.id}`,
|
|
3791
3779
|
class: ge([
|
|
3792
3780
|
t(a),
|
|
@@ -3794,7 +3782,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3794
3782
|
a.columnDef.className || "",
|
|
3795
3783
|
a.getCanFilter() ? `filter ${a.columnDef.meta?.filterVariant}` : ""
|
|
3796
3784
|
]),
|
|
3797
|
-
"data-align":
|
|
3785
|
+
"data-align": y(Ue)({
|
|
3798
3786
|
align: a.columnDef.align,
|
|
3799
3787
|
dataType: a.columnDef.dataType
|
|
3800
3788
|
}),
|
|
@@ -3804,8 +3792,8 @@ const li = { class: "pagination" }, si = {
|
|
|
3804
3792
|
minWidth: a.columnDef.minWidth
|
|
3805
3793
|
})
|
|
3806
3794
|
}, [
|
|
3807
|
-
a.getCanFilter() ? (S(),
|
|
3808
|
-
a.columnDef.customFilterComponent ? (S(), _(ue(a.columnDef.customFilterComponent(a)), { key: 0 })) : a.columnDef.meta?.filterVariant === "multiselect" || a.columnDef.meta?.filterVariant === "select" ? (S(), _(
|
|
3795
|
+
a.getCanFilter() ? (S(), C(H, { key: 0 }, [
|
|
3796
|
+
a.columnDef.customFilterComponent ? (S(), _(ue(a.columnDef.customFilterComponent(a)), { key: 0 })) : a.columnDef.meta?.filterVariant === "multiselect" || a.columnDef.meta?.filterVariant === "select" ? (S(), _(y(fn), {
|
|
3809
3797
|
key: 1,
|
|
3810
3798
|
"model-value": n(a),
|
|
3811
3799
|
options: a.columnDef.meta?.filterOptions || [],
|
|
@@ -3814,7 +3802,7 @@ const li = { class: "pagination" }, si = {
|
|
|
3814
3802
|
multiple: a.columnDef.meta?.filterVariant === "multiselect",
|
|
3815
3803
|
"enable-tooltip": "",
|
|
3816
3804
|
"onUpdate:modelValue": (u) => a.setFilterValue(u)
|
|
3817
|
-
}, null, 8, ["model-value", "options", "placeholder", "name", "multiple", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "dateRange" ? (S(), _(
|
|
3805
|
+
}, null, 8, ["model-value", "options", "placeholder", "name", "multiple", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "dateRange" ? (S(), _(y(pn), {
|
|
3818
3806
|
key: 2,
|
|
3819
3807
|
"model-value": n(a),
|
|
3820
3808
|
placeholder: a.columnDef.filterPlaceholder,
|
|
@@ -3822,20 +3810,20 @@ const li = { class: "pagination" }, si = {
|
|
|
3822
3810
|
range: "",
|
|
3823
3811
|
teleport: "",
|
|
3824
3812
|
"onUpdate:modelValue": (u) => a.setFilterValue(i(u))
|
|
3825
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "range" ? (S(),
|
|
3826
|
-
E(
|
|
3813
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "range" ? (S(), C("div", Ki, [
|
|
3814
|
+
E(y(tt), {
|
|
3827
3815
|
"model-value": Array.isArray(n(a)) && n(a)[0] !== null ? Number(n(a)[0]) : void 0,
|
|
3828
3816
|
placeholder: a.columnDef.filterPlaceholder?.split(",")[0],
|
|
3829
3817
|
name: "`range-${column.columnDef.accessorKey}-start`",
|
|
3830
3818
|
"onUpdate:modelValue": (u) => r(a, 0, u)
|
|
3831
3819
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
3832
|
-
E(
|
|
3820
|
+
E(y(tt), {
|
|
3833
3821
|
"model-value": Array.isArray(n(a)) && n(a)[1] !== null ? Number(n(a)[1]) : void 0,
|
|
3834
3822
|
placeholder: a.columnDef.filterPlaceholder?.split(",")[1] ?? a.columnDef.filterPlaceholder,
|
|
3835
3823
|
name: "`range-${column.columnDef.accessorKey}-end`",
|
|
3836
3824
|
"onUpdate:modelValue": (u) => r(a, 1, u)
|
|
3837
3825
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
3838
|
-
])) : (S(), _(
|
|
3826
|
+
])) : (S(), _(y(Ft), {
|
|
3839
3827
|
key: 4,
|
|
3840
3828
|
id: `input-filter-${a.id}`,
|
|
3841
3829
|
"debounce-time": e.inputDebounceTime,
|
|
@@ -3844,14 +3832,14 @@ const li = { class: "pagination" }, si = {
|
|
|
3844
3832
|
"onUpdate:modelValue": (u) => a.setFilterValue(u)
|
|
3845
3833
|
}, null, 8, ["id", "debounce-time", "model-value", "placeholder", "onUpdate:modelValue"]))
|
|
3846
3834
|
], 64)) : D("", !0)
|
|
3847
|
-
], 14,
|
|
3835
|
+
], 14, qi))), 128))
|
|
3848
3836
|
])) : D("", !0)
|
|
3849
3837
|
]));
|
|
3850
3838
|
}
|
|
3851
|
-
}),
|
|
3839
|
+
}), Qi = { class: "toolbar" }, Xi = {
|
|
3852
3840
|
name: "TableToolbar"
|
|
3853
|
-
},
|
|
3854
|
-
...
|
|
3841
|
+
}, Yi = /* @__PURE__ */ Q({
|
|
3842
|
+
...Xi,
|
|
3855
3843
|
props: {
|
|
3856
3844
|
columnActionButtonLabel: {
|
|
3857
3845
|
default: "Columns",
|
|
@@ -3895,26 +3883,26 @@ const li = { class: "pagination" }, si = {
|
|
|
3895
3883
|
];
|
|
3896
3884
|
n("on:drag", s);
|
|
3897
3885
|
};
|
|
3898
|
-
return (l, s) => (S(),
|
|
3899
|
-
e.showResetButton ? (S(), _(
|
|
3886
|
+
return (l, s) => (S(), C("div", Qi, [
|
|
3887
|
+
e.showResetButton ? (S(), _(y(Z), {
|
|
3900
3888
|
key: 0,
|
|
3901
3889
|
label: e.resetButtonLabel,
|
|
3902
3890
|
variant: "outlined",
|
|
3903
3891
|
severity: "secondary",
|
|
3904
3892
|
onClick: s[0] || (s[0] = (a) => l.$emit("on:reset"))
|
|
3905
3893
|
}, null, 8, ["label"])) : D("", !0),
|
|
3906
|
-
e.showColumnAction ? (S(), _(
|
|
3894
|
+
e.showColumnAction ? (S(), _(y(an), {
|
|
3907
3895
|
key: 1,
|
|
3908
3896
|
position: "bottom"
|
|
3909
3897
|
}, {
|
|
3910
3898
|
content: G(() => [
|
|
3911
|
-
E(
|
|
3899
|
+
E(y(un), {
|
|
3912
3900
|
list: i.value,
|
|
3913
3901
|
onOnDrag: r
|
|
3914
3902
|
}, null, 8, ["list"])
|
|
3915
3903
|
]),
|
|
3916
3904
|
default: G(() => [
|
|
3917
|
-
E(
|
|
3905
|
+
E(y(Z), {
|
|
3918
3906
|
label: e.columnActionButtonLabel,
|
|
3919
3907
|
variant: "outlined",
|
|
3920
3908
|
severity: "secondary"
|
|
@@ -3925,13 +3913,13 @@ const li = { class: "pagination" }, si = {
|
|
|
3925
3913
|
J(l.$slots, "default")
|
|
3926
3914
|
]));
|
|
3927
3915
|
}
|
|
3928
|
-
}),
|
|
3916
|
+
}), Ji = ["id"], Zi = {
|
|
3929
3917
|
key: 0,
|
|
3930
3918
|
class: "loading-overlay"
|
|
3931
|
-
},
|
|
3919
|
+
}, er = ["data-align"], tr = { class: "table-wrapper" }, nr = { key: 0 }, or = {
|
|
3932
3920
|
name: "DataTable"
|
|
3933
|
-
},
|
|
3934
|
-
...
|
|
3921
|
+
}, ir = /* @__PURE__ */ Q({
|
|
3922
|
+
...or,
|
|
3935
3923
|
props: {
|
|
3936
3924
|
actionsMode: {
|
|
3937
3925
|
default: "auto",
|
|
@@ -4024,11 +4012,11 @@ const li = { class: "pagination" }, si = {
|
|
|
4024
4012
|
type: String
|
|
4025
4013
|
},
|
|
4026
4014
|
rowPerPage: {
|
|
4027
|
-
default:
|
|
4015
|
+
default: yi,
|
|
4028
4016
|
type: Number
|
|
4029
4017
|
},
|
|
4030
4018
|
rowPerPageOptions: {
|
|
4031
|
-
default: () =>
|
|
4019
|
+
default: () => wi,
|
|
4032
4020
|
type: Array
|
|
4033
4021
|
},
|
|
4034
4022
|
showColumnAction: Boolean,
|
|
@@ -4059,14 +4047,14 @@ const li = { class: "pagination" }, si = {
|
|
|
4059
4047
|
const t = e, n = o, i = [], r = K(t.initialFilters), l = K([]), s = K({}), a = K({
|
|
4060
4048
|
pageIndex: we,
|
|
4061
4049
|
pageSize: t.paginated ? t.rowPerPage : t.data.length
|
|
4062
|
-
}), u = K({}),
|
|
4050
|
+
}), u = K({}), d = K(t.initialSorting), f = B(() => t.columnsData.some((v) => v.enableColumnFilter)), g = B(() => ({
|
|
4063
4051
|
columnFilters: r.value,
|
|
4064
4052
|
columnOrder: l.value,
|
|
4065
4053
|
columnVisibility: s.value,
|
|
4066
4054
|
pagination: a.value,
|
|
4067
|
-
sorting:
|
|
4068
|
-
})),
|
|
4069
|
-
() =>
|
|
4055
|
+
sorting: d.value
|
|
4056
|
+
})), c = B(
|
|
4057
|
+
() => cn(t.persistStateStorage)
|
|
4070
4058
|
), m = B(
|
|
4071
4059
|
() => t.isServerTable ? t.totalRecords : h.value.getFilteredRowModel().rows?.length
|
|
4072
4060
|
), p = B(
|
|
@@ -4081,14 +4069,14 @@ const li = { class: "pagination" }, si = {
|
|
|
4081
4069
|
pagination: a.value,
|
|
4082
4070
|
rowSelection: u.value,
|
|
4083
4071
|
get sorting() {
|
|
4084
|
-
return
|
|
4072
|
+
return d.value;
|
|
4085
4073
|
}
|
|
4086
4074
|
},
|
|
4087
4075
|
onColumnFiltersChange: (v) => {
|
|
4088
4076
|
r.value = typeof v == "function" ? v(r.value) : v, Array.isArray(r.value) || (r.value = []), a.value.pageIndex = we, t.isServerTable && (r.value = t.columnsData.filter(
|
|
4089
4077
|
(w) => w.enableColumnFilter && (t.visibleColumns.includes(
|
|
4090
4078
|
String(w.accessorKey ?? w.id)
|
|
4091
|
-
) ||
|
|
4079
|
+
) || t.visibleColumns.length === 0)
|
|
4092
4080
|
).map((w) => {
|
|
4093
4081
|
if (w.meta?.filterVariant === "range") {
|
|
4094
4082
|
const I = r.value.find(
|
|
@@ -4119,7 +4107,7 @@ const li = { class: "pagination" }, si = {
|
|
|
4119
4107
|
u.value = typeof v == "function" ? v(u.value) : v, n("change:rowSelection", p.value);
|
|
4120
4108
|
},
|
|
4121
4109
|
onSortingChange: (v) => {
|
|
4122
|
-
|
|
4110
|
+
d.value = typeof v == "function" ? v(d.value) : v, a.value.pageIndex = we, t.isServerTable && R();
|
|
4123
4111
|
},
|
|
4124
4112
|
columnResizeMode: "onChange",
|
|
4125
4113
|
data: t.data,
|
|
@@ -4134,15 +4122,15 @@ const li = { class: "pagination" }, si = {
|
|
|
4134
4122
|
...t.tableOptions
|
|
4135
4123
|
})
|
|
4136
4124
|
);
|
|
4137
|
-
|
|
4138
|
-
[r, l, s, a,
|
|
4125
|
+
Ct(
|
|
4126
|
+
[r, l, s, a, d],
|
|
4139
4127
|
() => {
|
|
4140
|
-
t.persistState && t.id &&
|
|
4128
|
+
t.persistState && t.id && yt(t.id, g.value, c.value);
|
|
4141
4129
|
}
|
|
4142
4130
|
);
|
|
4143
4131
|
const R = () => {
|
|
4144
|
-
const v =
|
|
4145
|
-
|
|
4132
|
+
const v = bi(
|
|
4133
|
+
d.value,
|
|
4146
4134
|
r.value,
|
|
4147
4135
|
a.value
|
|
4148
4136
|
);
|
|
@@ -4151,9 +4139,9 @@ const li = { class: "pagination" }, si = {
|
|
|
4151
4139
|
r.value = t.initialFilters, l.value = [], s.value = {}, a.value = {
|
|
4152
4140
|
pageIndex: we,
|
|
4153
4141
|
pageSize: t.paginated ? t.rowPerPage : t.data.length
|
|
4154
|
-
},
|
|
4142
|
+
}, d.value = t.initialSorting;
|
|
4155
4143
|
}, P = () => {
|
|
4156
|
-
|
|
4144
|
+
t.enableRowSelection && i.push({
|
|
4157
4145
|
accessorKey: "select",
|
|
4158
4146
|
header: ({ table: v }) => Y(Te, {
|
|
4159
4147
|
"aria-label": "Select all",
|
|
@@ -4168,8 +4156,9 @@ const li = { class: "pagination" }, si = {
|
|
|
4168
4156
|
align: "center",
|
|
4169
4157
|
enableColumnFilter: !1,
|
|
4170
4158
|
enableSorting: !1
|
|
4171
|
-
})
|
|
4172
|
-
|
|
4159
|
+
});
|
|
4160
|
+
for (const v of t.columnsData)
|
|
4161
|
+
t.visibleColumns.length > 0 && !t.visibleColumns.includes(String(v.accessorKey ?? v.id)) || (v.meta?.filterVariant === "multiselect" && !v.filterFn ? v.filterFn = (w, I, V) => !V || V.length === 0 ? w : V.some((k) => w.getValue(I) == k) : v.meta?.filterVariant === "select" && !v.filterFn ? v.filterFn = (w, I, V) => V === void 0 || V.length === 0 ? !0 : String(V) === String(w.getValue(I)) : v.meta?.filterVariant === "dateRange" && !v.filterFn ? v.filterFn = (w, I, V) => {
|
|
4173
4162
|
if (V?.length) {
|
|
4174
4163
|
const k = new Date(V[1]).setHours(23, 59, 59, 999), L = new Date(w.getValue(I)), U = new Date(V[0]).setHours(0, 0, 0, 0);
|
|
4175
4164
|
return L.getTime() >= U && L.getTime() <= k;
|
|
@@ -4185,7 +4174,7 @@ const li = { class: "pagination" }, si = {
|
|
|
4185
4174
|
enableColumnFilter: v.enableColumnFilter ?? !1,
|
|
4186
4175
|
enableSorting: v.enableSorting ?? !1
|
|
4187
4176
|
}));
|
|
4188
|
-
|
|
4177
|
+
if (t.dataActionMenu?.length && i.push({
|
|
4189
4178
|
accessorKey: "actions",
|
|
4190
4179
|
align: "center",
|
|
4191
4180
|
enableColumnFilter: !1,
|
|
@@ -4194,7 +4183,7 @@ const li = { class: "pagination" }, si = {
|
|
|
4194
4183
|
icon: "prime:cog",
|
|
4195
4184
|
width: "24"
|
|
4196
4185
|
}),
|
|
4197
|
-
cell: ({ row: v }) => Y(
|
|
4186
|
+
cell: ({ row: v }) => Y(Hi, {
|
|
4198
4187
|
actions: t.dataActionMenu,
|
|
4199
4188
|
autoModeCount: t.autoModeCount,
|
|
4200
4189
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4212,24 +4201,24 @@ const li = { class: "pagination" }, si = {
|
|
|
4212
4201
|
}, M = () => {
|
|
4213
4202
|
if (!t.persistState || !t.id)
|
|
4214
4203
|
return;
|
|
4215
|
-
const v =
|
|
4216
|
-
v && (r.value = v.columnFilters, l.value = v.columnOrder, s.value = v.columnVisibility,
|
|
4204
|
+
const v = Pi(t.id, c.value);
|
|
4205
|
+
v && (r.value = v.columnFilters, l.value = v.columnOrder, s.value = v.columnVisibility, d.value = v.sorting, t.rowPerPageOptions.includes(v.pagination.pageSize) && (a.value = v.pagination)), yt(t.id, g.value, c.value);
|
|
4217
4206
|
};
|
|
4218
|
-
return P(), (v, w) => (S(),
|
|
4207
|
+
return P(), (v, w) => (S(), C("div", {
|
|
4219
4208
|
id: e.id,
|
|
4220
4209
|
class: "table-container"
|
|
4221
4210
|
}, [
|
|
4222
|
-
e.isLoading ? (S(),
|
|
4223
|
-
E(
|
|
4211
|
+
e.isLoading ? (S(), C("div", Zi, [
|
|
4212
|
+
E(y(dn), { class: "loading-icon" })
|
|
4224
4213
|
])) : D("", !0),
|
|
4225
|
-
e.titleInfo ? (S(),
|
|
4214
|
+
e.titleInfo ? (S(), C("span", {
|
|
4226
4215
|
key: 1,
|
|
4227
4216
|
"data-align": e.titleInfo.align || "center"
|
|
4228
|
-
}, N(e.titleInfo.text), 9,
|
|
4229
|
-
e.showColumnAction || e.showResetButton || v.$slots.toolbar ? (S(), _(
|
|
4217
|
+
}, N(e.titleInfo.text), 9, er)) : D("", !0),
|
|
4218
|
+
e.showColumnAction || e.showResetButton || v.$slots.toolbar ? (S(), _(Yi, {
|
|
4230
4219
|
key: 2,
|
|
4231
4220
|
"column-action-button-label": e.columnActionButtonLabel,
|
|
4232
|
-
"has-actions-column":
|
|
4221
|
+
"has-actions-column": e.dataActionMenu.length > 0,
|
|
4233
4222
|
"has-selection-column": e.enableRowSelection,
|
|
4234
4223
|
"reset-button-label": e.resetButtonLabel,
|
|
4235
4224
|
"show-column-action": e.showColumnAction,
|
|
@@ -4243,29 +4232,29 @@ const li = { class: "pagination" }, si = {
|
|
|
4243
4232
|
]),
|
|
4244
4233
|
_: 3
|
|
4245
4234
|
}, 8, ["column-action-button-label", "has-actions-column", "has-selection-column", "reset-button-label", "show-column-action", "show-reset-button", "table"])) : D("", !0),
|
|
4246
|
-
A("div",
|
|
4235
|
+
A("div", tr, [
|
|
4247
4236
|
A("table", {
|
|
4248
4237
|
style: oe(`width: ${h.value.getCenterTotalSize()}`)
|
|
4249
4238
|
}, [
|
|
4250
|
-
E(
|
|
4239
|
+
E(Wi, {
|
|
4251
4240
|
"highlight-active-column": e.highlightActiveHeaderColumn,
|
|
4252
4241
|
"input-debounce-time": e.inputDebounceTime,
|
|
4253
4242
|
"is-filter-row-visible": f.value,
|
|
4254
4243
|
table: h.value
|
|
4255
4244
|
}, null, 8, ["highlight-active-column", "input-debounce-time", "is-filter-row-visible", "table"]),
|
|
4256
|
-
E(
|
|
4245
|
+
E(_i, {
|
|
4257
4246
|
"custom-formatters": e.customFormatters,
|
|
4258
4247
|
"empty-table-message": e.emptyTableMessage,
|
|
4259
4248
|
locale: e.locale,
|
|
4260
4249
|
table: h.value
|
|
4261
4250
|
}, null, 8, ["custom-formatters", "empty-table-message", "locale", "table"]),
|
|
4262
|
-
v.$slots.footer ? (S(),
|
|
4251
|
+
v.$slots.footer ? (S(), C("tfoot", nr, [
|
|
4263
4252
|
J(v.$slots, "footer")
|
|
4264
4253
|
])) : D("", !0)
|
|
4265
4254
|
], 4)
|
|
4266
4255
|
]),
|
|
4267
4256
|
(e.isServerTable || e.paginated) && m.value > 0 ? J(v.$slots, "pagination", { key: 3 }, () => [
|
|
4268
|
-
E(
|
|
4257
|
+
E(Si, te(e.paginationOptions, {
|
|
4269
4258
|
"current-page": a.value.pageIndex,
|
|
4270
4259
|
"default-items-per-page": a.value.pageSize,
|
|
4271
4260
|
"items-per-page-options": e.rowPerPageOptions,
|
|
@@ -4274,12 +4263,12 @@ const li = { class: "pagination" }, si = {
|
|
|
4274
4263
|
"onUpdate:itemsPerPage": h.value.setPageSize
|
|
4275
4264
|
}), null, 16, ["current-page", "default-items-per-page", "items-per-page-options", "total-items", "onUpdate:currentPage", "onUpdate:itemsPerPage"])
|
|
4276
4265
|
]) : D("", !0)
|
|
4277
|
-
], 8,
|
|
4266
|
+
], 8, Ji));
|
|
4278
4267
|
}
|
|
4279
|
-
}),
|
|
4268
|
+
}), rr = {
|
|
4280
4269
|
name: "FilesTable"
|
|
4281
|
-
},
|
|
4282
|
-
...
|
|
4270
|
+
}, lr = /* @__PURE__ */ Q({
|
|
4271
|
+
...rr,
|
|
4283
4272
|
props: {
|
|
4284
4273
|
archiveFile: Boolean,
|
|
4285
4274
|
columnsData: {
|
|
@@ -4377,8 +4366,8 @@ const li = { class: "pagination" }, si = {
|
|
|
4377
4366
|
cell: ({ row: { original: u } }) => u.uploadedBy ? u.uploadedBy.givenName || u.uploadedBy.lastName ? `${u.uploadedBy.givenName || ""} ${u.uploadedBy.lastName || ""}` : u.uploadedBy.email : Y("code", {}, "—"),
|
|
4378
4367
|
enableColumnFilter: !t.isServerTable,
|
|
4379
4368
|
enableSorting: !t.isServerTable,
|
|
4380
|
-
filterFn: (u,
|
|
4381
|
-
const g = u.getValue(
|
|
4369
|
+
filterFn: (u, d, f) => {
|
|
4370
|
+
const g = u.getValue(d);
|
|
4382
4371
|
return !f || f.length === 0 ? !0 : `${g.givenName || ""} ${g.lastName || ""}`.trim().toLowerCase().includes(f.toLowerCase()) || (g.email?.toLowerCase().includes(f.toLowerCase()) ?? !1);
|
|
4383
4372
|
},
|
|
4384
4373
|
filterPlaceholder: "Name",
|
|
@@ -4459,41 +4448,47 @@ const li = { class: "pagination" }, si = {
|
|
|
4459
4448
|
}), u;
|
|
4460
4449
|
}), l = B(() => [
|
|
4461
4450
|
...i.map((u) => {
|
|
4462
|
-
const
|
|
4451
|
+
const d = t.columnsData.find(
|
|
4463
4452
|
(f) => f.accessorKey === u.accessorKey
|
|
4464
4453
|
);
|
|
4465
|
-
return
|
|
4454
|
+
return d ? { ...u, ...d } : u;
|
|
4466
4455
|
}),
|
|
4467
4456
|
...t.columnsData.filter(
|
|
4468
4457
|
(u) => !i.some(
|
|
4469
|
-
(
|
|
4458
|
+
(d) => d.accessorKey === u.accessorKey
|
|
4470
4459
|
)
|
|
4471
4460
|
)
|
|
4472
4461
|
]), s = (u) => {
|
|
4473
4462
|
switch (u.action) {
|
|
4474
|
-
case "archive":
|
|
4463
|
+
case "archive": {
|
|
4475
4464
|
n("action:archive", u.data);
|
|
4476
4465
|
break;
|
|
4477
|
-
|
|
4466
|
+
}
|
|
4467
|
+
case "delete": {
|
|
4478
4468
|
n("action:delete", u.data);
|
|
4479
4469
|
break;
|
|
4480
|
-
|
|
4470
|
+
}
|
|
4471
|
+
case "download": {
|
|
4481
4472
|
n("action:download", u.data);
|
|
4482
4473
|
break;
|
|
4483
|
-
|
|
4474
|
+
}
|
|
4475
|
+
case "edit": {
|
|
4484
4476
|
n("action:edit", u.data);
|
|
4485
4477
|
break;
|
|
4486
|
-
|
|
4478
|
+
}
|
|
4479
|
+
case "share": {
|
|
4487
4480
|
n("action:share", u.data);
|
|
4488
4481
|
break;
|
|
4489
|
-
|
|
4482
|
+
}
|
|
4483
|
+
case "view": {
|
|
4490
4484
|
n("action:view", u.data);
|
|
4491
4485
|
break;
|
|
4486
|
+
}
|
|
4492
4487
|
}
|
|
4493
4488
|
}, a = (u) => {
|
|
4494
4489
|
n("update:request", u);
|
|
4495
4490
|
};
|
|
4496
|
-
return (u,
|
|
4491
|
+
return (u, d) => (S(), _(ir, te(e.tableOptions, {
|
|
4497
4492
|
id: e.id,
|
|
4498
4493
|
"columns-data": l.value,
|
|
4499
4494
|
data: e.files,
|
|
@@ -4534,10 +4529,10 @@ const li = { class: "pagination" }, si = {
|
|
|
4534
4529
|
} : void 0
|
|
4535
4530
|
]), 1040, ["id", "columns-data", "data", "data-action-menu", "empty-table-message", "initial-sorting", "is-loading", "is-server-table", "locale", "persist-state", "persist-state-storage", "total-records", "visible-columns"]));
|
|
4536
4531
|
}
|
|
4537
|
-
}),
|
|
4532
|
+
}), sr = {
|
|
4538
4533
|
name: "FilesPresentation"
|
|
4539
|
-
},
|
|
4540
|
-
...
|
|
4534
|
+
}, Ar = /* @__PURE__ */ Q({
|
|
4535
|
+
...sr,
|
|
4541
4536
|
props: {
|
|
4542
4537
|
actionButtonsVisibility: {
|
|
4543
4538
|
default: () => ({
|
|
@@ -4618,12 +4613,13 @@ const li = { class: "pagination" }, si = {
|
|
|
4618
4613
|
case "download":
|
|
4619
4614
|
case "edit":
|
|
4620
4615
|
case "share":
|
|
4621
|
-
case "view":
|
|
4616
|
+
case "view": {
|
|
4622
4617
|
n(`action:${l}`, s);
|
|
4623
4618
|
break;
|
|
4619
|
+
}
|
|
4624
4620
|
}
|
|
4625
4621
|
};
|
|
4626
|
-
return (l, s) => e.presentation === "list" ? (S(), _(
|
|
4622
|
+
return (l, s) => e.presentation === "list" ? (S(), _(y(gn), te({ key: 0 }, e.listProps, {
|
|
4627
4623
|
"action-buttons-visibility": e.actionButtonsVisibility,
|
|
4628
4624
|
files: e.files,
|
|
4629
4625
|
"file-detail-visibility": i.value,
|
|
@@ -4635,7 +4631,7 @@ const li = { class: "pagination" }, si = {
|
|
|
4635
4631
|
"onAction:edit": s[3] || (s[3] = (a) => r("edit", a)),
|
|
4636
4632
|
"onAction:share": s[4] || (s[4] = (a) => r("share", a)),
|
|
4637
4633
|
"onAction:view": s[5] || (s[5] = (a) => r("view", a))
|
|
4638
|
-
}), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "locale", "messages"])) : (S(), _(
|
|
4634
|
+
}), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "locale", "messages"])) : (S(), _(lr, te({ key: 1 }, e.tableProps, {
|
|
4639
4635
|
"archive-file": e.actionButtonsVisibility.archive,
|
|
4640
4636
|
"delete-file": e.actionButtonsVisibility.delete,
|
|
4641
4637
|
"download-file": e.actionButtonsVisibility.download,
|
|
@@ -4654,13 +4650,13 @@ const li = { class: "pagination" }, si = {
|
|
|
4654
4650
|
"onAction:view": s[11] || (s[11] = (a) => r("view", a))
|
|
4655
4651
|
}), null, 16, ["archive-file", "delete-file", "download-file", "edit-description", "files", "locale", "messages", "share-file", "view-file", "visible-columns"]));
|
|
4656
4652
|
}
|
|
4657
|
-
}),
|
|
4653
|
+
}), ar = { class: "table-wrapper" }, ur = {
|
|
4658
4654
|
key: 0,
|
|
4659
4655
|
class: "toggle-wrap"
|
|
4660
|
-
},
|
|
4656
|
+
}, cr = ["colSpan", "onClick"], dr = { key: 0 }, gr = ["data-label"], fr = { class: "page-navigation-container" }, pr = { class: "page-indicators-selection-container" }, mr = { class: "page-number-indicators" }, hr = { class: "go-to-page-container" }, vr = ["value", "max"], Sr = ["value"], wr = ["value"], yr = { class: "page-navigation-buttons-container" }, Cr = ["disabled"], Rr = ["disabled"], Fr = ["disabled"], br = ["disabled"], Pr = {
|
|
4661
4657
|
name: "TanstackTable"
|
|
4662
|
-
},
|
|
4663
|
-
...
|
|
4658
|
+
}, Dr = /* @__PURE__ */ Q({
|
|
4659
|
+
...Pr,
|
|
4664
4660
|
props: {
|
|
4665
4661
|
columnsData: {
|
|
4666
4662
|
type: Array,
|
|
@@ -4677,17 +4673,17 @@ const li = { class: "pagination" }, si = {
|
|
|
4677
4673
|
},
|
|
4678
4674
|
setup(e) {
|
|
4679
4675
|
const o = e, t = mo(), n = [];
|
|
4680
|
-
o.columnsData
|
|
4676
|
+
for (const d of o.columnsData) {
|
|
4681
4677
|
const f = t.accessor(
|
|
4682
|
-
|
|
4678
|
+
d.accessorKey,
|
|
4683
4679
|
{
|
|
4684
|
-
header: () =>
|
|
4680
|
+
header: () => d.header,
|
|
4685
4681
|
footer: (g) => g.column.id,
|
|
4686
|
-
enableSorting:
|
|
4682
|
+
enableSorting: d.sort !== void 0 ? d.sort : !1
|
|
4687
4683
|
}
|
|
4688
4684
|
);
|
|
4689
4685
|
n.push(f);
|
|
4690
|
-
}
|
|
4686
|
+
}
|
|
4691
4687
|
const i = K([]), r = Wt({
|
|
4692
4688
|
columns: n,
|
|
4693
4689
|
state: {
|
|
@@ -4695,8 +4691,8 @@ const li = { class: "pagination" }, si = {
|
|
|
4695
4691
|
return i.value;
|
|
4696
4692
|
}
|
|
4697
4693
|
},
|
|
4698
|
-
onSortingChange: (
|
|
4699
|
-
i.value = typeof
|
|
4694
|
+
onSortingChange: (d) => {
|
|
4695
|
+
i.value = typeof d == "function" ? d(i.value) : d;
|
|
4700
4696
|
},
|
|
4701
4697
|
columnResizeMode: "onChange",
|
|
4702
4698
|
data: o.rows,
|
|
@@ -4706,30 +4702,30 @@ const li = { class: "pagination" }, si = {
|
|
|
4706
4702
|
getSortedRowModel: Ut()
|
|
4707
4703
|
}), l = K(!1), s = () => {
|
|
4708
4704
|
l.value = !l.value;
|
|
4709
|
-
}, a = (
|
|
4710
|
-
const f =
|
|
4705
|
+
}, a = (d) => {
|
|
4706
|
+
const f = d.target, g = f.value ? Number(f.value) - 1 : 0;
|
|
4711
4707
|
r.setPageIndex(g);
|
|
4712
|
-
}, u = (
|
|
4713
|
-
const f =
|
|
4708
|
+
}, u = (d) => {
|
|
4709
|
+
const f = d.target, g = f.value ? Number(f.value) : 10;
|
|
4714
4710
|
r.setPageSize(g);
|
|
4715
4711
|
};
|
|
4716
|
-
return (
|
|
4712
|
+
return (d, f) => (S(), C("div", ar, [
|
|
4717
4713
|
A("table", {
|
|
4718
|
-
style: oe(`width: ${
|
|
4714
|
+
style: oe(`width: ${y(r).getCenterTotalSize()}`)
|
|
4719
4715
|
}, [
|
|
4720
|
-
o.enableToggle ? (S(),
|
|
4716
|
+
o.enableToggle ? (S(), C("div", ur, [
|
|
4721
4717
|
A("button", {
|
|
4722
4718
|
class: "table-toggle",
|
|
4723
4719
|
onClick: s
|
|
4724
4720
|
}, [
|
|
4725
|
-
E(
|
|
4721
|
+
E(y(j), {
|
|
4726
4722
|
icon: "mingcute:menu-fill",
|
|
4727
4723
|
class: "toggle-icon"
|
|
4728
4724
|
})
|
|
4729
4725
|
])
|
|
4730
4726
|
])) : D("", !0),
|
|
4731
4727
|
A("colgroup", null, [
|
|
4732
|
-
(S(!0),
|
|
4728
|
+
(S(!0), C(H, null, z(o.columnsData, (g) => (S(), C("col", {
|
|
4733
4729
|
key: g.accessorKey,
|
|
4734
4730
|
style: oe(`width: ${g.size}px`)
|
|
4735
4731
|
}, null, 4))), 128))
|
|
@@ -4737,123 +4733,123 @@ const li = { class: "pagination" }, si = {
|
|
|
4737
4733
|
A("thead", {
|
|
4738
4734
|
class: ge({ expand: l.value })
|
|
4739
4735
|
}, [
|
|
4740
|
-
(S(!0),
|
|
4736
|
+
(S(!0), C(H, null, z(y(r).getHeaderGroups(), (g) => (S(), C("tr", {
|
|
4741
4737
|
key: g.id
|
|
4742
4738
|
}, [
|
|
4743
|
-
(S(!0),
|
|
4744
|
-
key:
|
|
4745
|
-
colSpan:
|
|
4746
|
-
onClick: (m) =>
|
|
4739
|
+
(S(!0), C(H, null, z(g.headers, (c) => (S(), C("th", {
|
|
4740
|
+
key: c.id,
|
|
4741
|
+
colSpan: c.colSpan,
|
|
4742
|
+
onClick: (m) => c.column.getCanSort() ? c.column.getToggleSortingHandler()?.(m) : null
|
|
4747
4743
|
}, [
|
|
4748
|
-
|
|
4749
|
-
E(
|
|
4750
|
-
props:
|
|
4751
|
-
render:
|
|
4744
|
+
c.isPlaceholder ? D("", !0) : (S(), C("div", dr, [
|
|
4745
|
+
E(y(pe), {
|
|
4746
|
+
props: c.getContext(),
|
|
4747
|
+
render: c.column.columnDef.header
|
|
4752
4748
|
}, null, 8, ["props", "render"]),
|
|
4753
|
-
!
|
|
4749
|
+
!c.column.getIsSorted() && c.column.getCanSort() ? (S(), _(y(j), {
|
|
4754
4750
|
key: 0,
|
|
4755
4751
|
icon: "ri:arrow-up-down-line",
|
|
4756
4752
|
class: "sort-icon"
|
|
4757
4753
|
})) : D("", !0),
|
|
4758
|
-
|
|
4754
|
+
c.column.getIsSorted() && c.column.getCanSort() ? (S(), _(y(j), {
|
|
4759
4755
|
key: 1,
|
|
4760
|
-
icon:
|
|
4756
|
+
icon: c.column.getIsSorted() === "asc" ? "mdi:arrow-up" : "mdi:arrow-down",
|
|
4761
4757
|
class: "sort-icon"
|
|
4762
4758
|
}, null, 8, ["icon"])) : D("", !0)
|
|
4763
4759
|
]))
|
|
4764
|
-
], 8,
|
|
4760
|
+
], 8, cr))), 128))
|
|
4765
4761
|
]))), 128))
|
|
4766
4762
|
], 2),
|
|
4767
4763
|
A("tbody", null, [
|
|
4768
|
-
(S(!0),
|
|
4764
|
+
(S(!0), C(H, null, z(y(r).getRowModel().rows, (g) => (S(), C("tr", {
|
|
4769
4765
|
key: g.id
|
|
4770
4766
|
}, [
|
|
4771
|
-
(S(!0),
|
|
4772
|
-
key:
|
|
4773
|
-
"data-label":
|
|
4767
|
+
(S(!0), C(H, null, z(g.getVisibleCells(), (c) => (S(), C("td", {
|
|
4768
|
+
key: c.id,
|
|
4769
|
+
"data-label": c.column.id
|
|
4774
4770
|
}, [
|
|
4775
|
-
E(
|
|
4776
|
-
props:
|
|
4777
|
-
render:
|
|
4771
|
+
E(y(pe), {
|
|
4772
|
+
props: c.getContext(),
|
|
4773
|
+
render: c.column.columnDef.cell
|
|
4778
4774
|
}, null, 8, ["props", "render"])
|
|
4779
|
-
], 8,
|
|
4775
|
+
], 8, gr))), 128))
|
|
4780
4776
|
]))), 128))
|
|
4781
4777
|
])
|
|
4782
4778
|
], 4),
|
|
4783
|
-
A("div",
|
|
4784
|
-
A("div",
|
|
4785
|
-
A("span",
|
|
4786
|
-
A("span",
|
|
4779
|
+
A("div", fr, [
|
|
4780
|
+
A("div", pr, [
|
|
4781
|
+
A("span", mr, N(y(r).getState().pagination.pageIndex + 1) + " of " + N(y(r).getPageCount()), 1),
|
|
4782
|
+
A("span", hr, [
|
|
4787
4783
|
f[6] || (f[6] = A("span", { class: "go-to-page-text" }, " Go to page: ", -1)),
|
|
4788
4784
|
A("input", {
|
|
4789
4785
|
class: "page-input",
|
|
4790
4786
|
type: "number",
|
|
4791
|
-
value:
|
|
4792
|
-
max:
|
|
4787
|
+
value: y(r).getState().pagination.pageIndex + 1,
|
|
4788
|
+
max: y(r).getPageCount(),
|
|
4793
4789
|
onInput: f[0] || (f[0] = (g) => a(g))
|
|
4794
|
-
}, null, 40,
|
|
4790
|
+
}, null, 40, vr)
|
|
4795
4791
|
]),
|
|
4796
4792
|
A("select", {
|
|
4797
|
-
value:
|
|
4793
|
+
value: y(r).getState().pagination.pageSize,
|
|
4798
4794
|
onChange: f[1] || (f[1] = (g) => u(g))
|
|
4799
4795
|
}, [
|
|
4800
|
-
(S(),
|
|
4796
|
+
(S(), C(H, null, z([10, 20, 30, 40, 50], (g) => A("option", {
|
|
4801
4797
|
key: g,
|
|
4802
4798
|
value: g
|
|
4803
|
-
}, " Show " + N(g), 9,
|
|
4804
|
-
], 40,
|
|
4799
|
+
}, " Show " + N(g), 9, wr)), 64))
|
|
4800
|
+
], 40, Sr)
|
|
4805
4801
|
]),
|
|
4806
|
-
A("div",
|
|
4802
|
+
A("div", yr, [
|
|
4807
4803
|
A("button", {
|
|
4808
4804
|
class: "page-navigation-button",
|
|
4809
|
-
disabled: !
|
|
4810
|
-
onClick: f[2] || (f[2] = (g) =>
|
|
4805
|
+
disabled: !y(r).getCanPreviousPage(),
|
|
4806
|
+
onClick: f[2] || (f[2] = (g) => y(r).setPageIndex(0))
|
|
4811
4807
|
}, [
|
|
4812
|
-
E(
|
|
4808
|
+
E(y(j), {
|
|
4813
4809
|
icon: "material-symbols:keyboard-double-arrow-left-rounded",
|
|
4814
4810
|
class: "navigation-button-icon"
|
|
4815
4811
|
})
|
|
4816
4812
|
], 8, Cr),
|
|
4817
4813
|
A("button", {
|
|
4818
4814
|
class: "page-navigation-button",
|
|
4819
|
-
disabled: !
|
|
4820
|
-
onClick: f[3] || (f[3] = (g) =>
|
|
4815
|
+
disabled: !y(r).getCanPreviousPage(),
|
|
4816
|
+
onClick: f[3] || (f[3] = (g) => y(r).previousPage())
|
|
4821
4817
|
}, [
|
|
4822
|
-
E(
|
|
4818
|
+
E(y(j), {
|
|
4823
4819
|
icon: "material-symbols:arrow-back-ios-new-rounded",
|
|
4824
4820
|
class: "navigation-button-icon"
|
|
4825
4821
|
})
|
|
4826
|
-
], 8,
|
|
4822
|
+
], 8, Rr),
|
|
4827
4823
|
A("button", {
|
|
4828
4824
|
class: "page-navigation-button",
|
|
4829
|
-
disabled: !
|
|
4830
|
-
onClick: f[4] || (f[4] = (g) =>
|
|
4825
|
+
disabled: !y(r).getCanNextPage(),
|
|
4826
|
+
onClick: f[4] || (f[4] = (g) => y(r).nextPage())
|
|
4831
4827
|
}, [
|
|
4832
|
-
E(
|
|
4828
|
+
E(y(j), {
|
|
4833
4829
|
icon: "material-symbols:arrow-forward-ios-rounded",
|
|
4834
4830
|
class: "navigation-button-icon"
|
|
4835
4831
|
})
|
|
4836
|
-
], 8,
|
|
4832
|
+
], 8, Fr),
|
|
4837
4833
|
A("button", {
|
|
4838
4834
|
class: "page-navigation-button",
|
|
4839
|
-
disabled: !
|
|
4840
|
-
onClick: f[5] || (f[5] = (g) =>
|
|
4835
|
+
disabled: !y(r).getCanNextPage(),
|
|
4836
|
+
onClick: f[5] || (f[5] = (g) => y(r).setPageIndex(y(r).getPageCount() - 1))
|
|
4841
4837
|
}, [
|
|
4842
|
-
E(
|
|
4838
|
+
E(y(j), {
|
|
4843
4839
|
icon: "material-symbols:keyboard-double-arrow-right-rounded",
|
|
4844
4840
|
class: "navigation-button-icon"
|
|
4845
4841
|
})
|
|
4846
|
-
], 8,
|
|
4842
|
+
], 8, br)
|
|
4847
4843
|
])
|
|
4848
4844
|
])
|
|
4849
4845
|
]));
|
|
4850
4846
|
}
|
|
4851
4847
|
});
|
|
4852
4848
|
export {
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4849
|
+
Ar as FilesPresentation,
|
|
4850
|
+
lr as FilesTable,
|
|
4851
|
+
ir as Table,
|
|
4852
|
+
_i as TableBody,
|
|
4853
|
+
Wi as TableHeader,
|
|
4854
|
+
Dr as TanstackTable
|
|
4859
4855
|
};
|