@konstructio/ui 0.1.2-alpha.95 → 0.1.2-alpha.96
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/components/VirtualizedTable/VirtualizedTable.js +64 -61
- package/dist/components/VirtualizedTable/components/Body/Body.js +60 -42
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +78 -68
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/events/index.js +10 -7
- package/dist/components/index.js +25 -24
- package/dist/index.js +43 -42
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -2
- package/dist/lib/components/index.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/{table.provider-BBlJgEJf.js → table.provider-BPlFpIAe.js} +309 -309
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
1
|
+
import { n as _t } from "./dist-EV-1XXQr.js";
|
|
2
|
+
import { t as se } from "./utils-COaoD3PI.js";
|
|
3
|
+
import { t as Ft } from "./chevron-right-BFOnP164.js";
|
|
4
4
|
import "./components/VirtualizedTable/constants/pagination.js";
|
|
5
|
-
import { TableContext as
|
|
6
|
-
import { VirtualizedTableEvent as
|
|
7
|
-
import * as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { useQuery as
|
|
11
|
-
function
|
|
5
|
+
import { TableContext as $t } from "./components/VirtualizedTable/contexts/table.context.js";
|
|
6
|
+
import { VirtualizedTableEvent as _e } from "./components/VirtualizedTable/events/index.js";
|
|
7
|
+
import * as Ee from "react";
|
|
8
|
+
import { useCallback as O, useEffect as Fe, useMemo as j, useState as P } from "react";
|
|
9
|
+
import { jsx as ue } from "react/jsx-runtime";
|
|
10
|
+
import { useQuery as Mt } from "@tanstack/react-query";
|
|
11
|
+
function z(e, o) {
|
|
12
12
|
return typeof e == "function" ? e(o) : e;
|
|
13
13
|
}
|
|
14
14
|
function x(e, o) {
|
|
15
15
|
return (t) => {
|
|
16
16
|
o.setState((n) => ({
|
|
17
17
|
...n,
|
|
18
|
-
[e]:
|
|
18
|
+
[e]: z(t, n[e])
|
|
19
19
|
}));
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function fe(e) {
|
|
23
23
|
return e instanceof Function;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Vt(e) {
|
|
26
26
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Pt(e, o) {
|
|
29
29
|
const t = [], n = (r) => {
|
|
30
30
|
r.forEach((i) => {
|
|
31
31
|
t.push(i);
|
|
@@ -67,7 +67,7 @@ function C(e, o, t, n) {
|
|
|
67
67
|
onChange: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function xt(e, o, t, n) {
|
|
71
71
|
const r = () => {
|
|
72
72
|
var l;
|
|
73
73
|
return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
@@ -95,7 +95,7 @@ function Pt(e, o, t, n) {
|
|
|
95
95
|
l.createCell == null || l.createCell(i, t, o, e);
|
|
96
96
|
}, {}), i;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function It(e, o, t, n) {
|
|
99
99
|
var r, i;
|
|
100
100
|
const l = {
|
|
101
101
|
...e._getDefaultColumnDef(),
|
|
@@ -131,7 +131,7 @@ function xt(e, o, t, n) {
|
|
|
131
131
|
return d;
|
|
132
132
|
}
|
|
133
133
|
var V = "debugHeaders";
|
|
134
|
-
function
|
|
134
|
+
function Ne(e, o, t) {
|
|
135
135
|
var n;
|
|
136
136
|
let r = {
|
|
137
137
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -160,7 +160,7 @@ function qe(e, o, t) {
|
|
|
160
160
|
i.createHeader == null || i.createHeader(r, e);
|
|
161
161
|
}), r;
|
|
162
162
|
}
|
|
163
|
-
var
|
|
163
|
+
var yt = { createTable: (e) => {
|
|
164
164
|
e.getHeaderGroups = m(() => [
|
|
165
165
|
e.getAllColumns(),
|
|
166
166
|
e.getVisibleLeafColumns(),
|
|
@@ -169,7 +169,7 @@ var It = { createTable: (e) => {
|
|
|
169
169
|
], (o, t, n, r) => {
|
|
170
170
|
var i, l;
|
|
171
171
|
const s = (i = n?.map((d) => t.find((g) => g.id === d)).filter(Boolean)) != null ? i : [], u = (l = r?.map((d) => t.find((g) => g.id === d)).filter(Boolean)) != null ? l : [], a = t.filter((d) => !(n != null && n.includes(d.id)) && !(r != null && r.includes(d.id)));
|
|
172
|
-
return
|
|
172
|
+
return ae(o, [
|
|
173
173
|
...s,
|
|
174
174
|
...a,
|
|
175
175
|
...u
|
|
@@ -179,20 +179,20 @@ var It = { createTable: (e) => {
|
|
|
179
179
|
e.getVisibleLeafColumns(),
|
|
180
180
|
e.getState().columnPinning.left,
|
|
181
181
|
e.getState().columnPinning.right
|
|
182
|
-
], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))),
|
|
182
|
+
], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), ae(o, t, e, "center")), C(e.options, V, "getCenterHeaderGroups")), e.getLeftHeaderGroups = m(() => [
|
|
183
183
|
e.getAllColumns(),
|
|
184
184
|
e.getVisibleLeafColumns(),
|
|
185
185
|
e.getState().columnPinning.left
|
|
186
186
|
], (o, t, n) => {
|
|
187
187
|
var r;
|
|
188
|
-
return
|
|
188
|
+
return ae(o, (r = n?.map((i) => t.find((l) => l.id === i)).filter(Boolean)) != null ? r : [], e, "left");
|
|
189
189
|
}, C(e.options, V, "getLeftHeaderGroups")), e.getRightHeaderGroups = m(() => [
|
|
190
190
|
e.getAllColumns(),
|
|
191
191
|
e.getVisibleLeafColumns(),
|
|
192
192
|
e.getState().columnPinning.right
|
|
193
193
|
], (o, t, n) => {
|
|
194
194
|
var r;
|
|
195
|
-
return
|
|
195
|
+
return ae(o, (r = n?.map((i) => t.find((l) => l.id === i)).filter(Boolean)) != null ? r : [], e, "right");
|
|
196
196
|
}, C(e.options, V, "getRightHeaderGroups")), e.getFooterGroups = m(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, V, "getFooterGroups")), e.getLeftFooterGroups = m(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, V, "getLeftFooterGroups")), e.getCenterFooterGroups = m(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, V, "getCenterFooterGroups")), e.getRightFooterGroups = m(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, V, "getRightFooterGroups")), e.getFlatHeaders = m(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, V, "getFlatHeaders")), e.getLeftFlatHeaders = m(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, V, "getLeftFlatHeaders")), e.getCenterFlatHeaders = m(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, V, "getCenterFlatHeaders")), e.getRightFlatHeaders = m(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, V, "getRightFlatHeaders")), e.getCenterLeafHeaders = m(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
197
197
|
var n;
|
|
198
198
|
return !((n = t.subHeaders) != null && n.length);
|
|
@@ -215,7 +215,7 @@ var It = { createTable: (e) => {
|
|
|
215
215
|
].map((d) => d.getLeafHeaders()).flat();
|
|
216
216
|
}, C(e.options, V, "getLeafHeaders"));
|
|
217
217
|
} };
|
|
218
|
-
function
|
|
218
|
+
function ae(e, o, t, n) {
|
|
219
219
|
var r, i;
|
|
220
220
|
let l = 0;
|
|
221
221
|
const s = function(g, f) {
|
|
@@ -237,7 +237,7 @@ function ue(e, o, t, n) {
|
|
|
237
237
|
let w, $ = !1;
|
|
238
238
|
if (R && v.column.parent ? w = v.column.parent : (w = v.column, $ = !0), F && F?.column === w) F.subHeaders.push(v);
|
|
239
239
|
else {
|
|
240
|
-
const I =
|
|
240
|
+
const I = Ne(t, w, {
|
|
241
241
|
id: [
|
|
242
242
|
n,
|
|
243
243
|
f,
|
|
@@ -254,7 +254,7 @@ function ue(e, o, t, n) {
|
|
|
254
254
|
c.headers.push(v), v.headerGroup = c;
|
|
255
255
|
}), u.push(c), f > 0 && a(p, f - 1);
|
|
256
256
|
};
|
|
257
|
-
a(o.map((g, f) =>
|
|
257
|
+
a(o.map((g, f) => Ne(t, g, {
|
|
258
258
|
depth: l,
|
|
259
259
|
index: f
|
|
260
260
|
})), l - 1), u.reverse();
|
|
@@ -272,7 +272,7 @@ function ue(e, o, t, n) {
|
|
|
272
272
|
});
|
|
273
273
|
return d((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
|
|
274
274
|
}
|
|
275
|
-
var
|
|
275
|
+
var Et = (e, o, t, n, r, i, l) => {
|
|
276
276
|
let s = {
|
|
277
277
|
id: o,
|
|
278
278
|
index: n,
|
|
@@ -298,7 +298,7 @@ var yt = (e, o, t, n, r, i, l) => {
|
|
|
298
298
|
return (a = s.getValue(u)) != null ? a : e.options.renderFallbackValue;
|
|
299
299
|
},
|
|
300
300
|
subRows: i ?? [],
|
|
301
|
-
getLeafRows: () =>
|
|
301
|
+
getLeafRows: () => Pt(s.subRows, (u) => u.subRows),
|
|
302
302
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
303
303
|
getParentRows: () => {
|
|
304
304
|
let u = [], a = s;
|
|
@@ -309,7 +309,7 @@ var yt = (e, o, t, n, r, i, l) => {
|
|
|
309
309
|
}
|
|
310
310
|
return u.reverse();
|
|
311
311
|
},
|
|
312
|
-
getAllCells: m(() => [e.getAllLeafColumns()], (u) => u.map((a) =>
|
|
312
|
+
getAllCells: m(() => [e.getAllLeafColumns()], (u) => u.map((a) => xt(e, s, a, a.id)), C(e.options, "debugRows", "getAllCells")),
|
|
313
313
|
_getAllCellsByColumnId: m(() => [s.getAllCells()], (u) => u.reduce((a, d) => (a[d.column.id] = d, a), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
314
314
|
};
|
|
315
315
|
for (let u = 0; u < e._features.length; u++) {
|
|
@@ -317,52 +317,52 @@ var yt = (e, o, t, n, r, i, l) => {
|
|
|
317
317
|
a == null || a.createRow == null || a.createRow(s, e);
|
|
318
318
|
}
|
|
319
319
|
return s;
|
|
320
|
-
},
|
|
320
|
+
}, Dt = { createColumn: (e, o) => {
|
|
321
321
|
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 = () => {
|
|
322
322
|
if (e._getFacetedMinMaxValues)
|
|
323
323
|
return e._getFacetedMinMaxValues();
|
|
324
324
|
};
|
|
325
|
-
} },
|
|
325
|
+
} }, ke = (e, o, t) => {
|
|
326
326
|
var n, r;
|
|
327
327
|
const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
328
328
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
|
|
329
329
|
};
|
|
330
|
-
je.autoRemove = (e) => E(e);
|
|
331
|
-
var ke = (e, o, t) => {
|
|
332
|
-
var n;
|
|
333
|
-
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
334
|
-
};
|
|
335
330
|
ke.autoRemove = (e) => E(e);
|
|
336
331
|
var Ue = (e, o, t) => {
|
|
337
332
|
var n;
|
|
338
|
-
return ((n = e.getValue(o)) == null || (n = n.toString()) == null
|
|
333
|
+
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
339
334
|
};
|
|
340
335
|
Ue.autoRemove = (e) => E(e);
|
|
341
336
|
var Ke = (e, o, t) => {
|
|
342
337
|
var n;
|
|
343
|
-
return (n = e.getValue(o)) == null ? void 0 : n.
|
|
338
|
+
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
344
339
|
};
|
|
345
340
|
Ke.autoRemove = (e) => E(e);
|
|
346
|
-
var Xe = (e, o, t) =>
|
|
341
|
+
var Xe = (e, o, t) => {
|
|
342
|
+
var n;
|
|
343
|
+
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
344
|
+
};
|
|
345
|
+
Xe.autoRemove = (e) => E(e);
|
|
346
|
+
var We = (e, o, t) => !t.some((n) => {
|
|
347
347
|
var r;
|
|
348
348
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
349
349
|
});
|
|
350
|
-
|
|
351
|
-
var
|
|
350
|
+
We.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
351
|
+
var Qe = (e, o, t) => t.some((n) => {
|
|
352
352
|
var r;
|
|
353
353
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
354
354
|
});
|
|
355
|
-
|
|
356
|
-
var
|
|
357
|
-
Qe.autoRemove = (e) => E(e);
|
|
358
|
-
var Ze = (e, o, t) => e.getValue(o) == t;
|
|
355
|
+
Qe.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
356
|
+
var Ze = (e, o, t) => e.getValue(o) === t;
|
|
359
357
|
Ze.autoRemove = (e) => E(e);
|
|
360
|
-
var
|
|
358
|
+
var Je = (e, o, t) => e.getValue(o) == t;
|
|
359
|
+
Je.autoRemove = (e) => E(e);
|
|
360
|
+
var Oe = (e, o, t) => {
|
|
361
361
|
let [n, r] = t;
|
|
362
362
|
const i = e.getValue(o);
|
|
363
363
|
return i >= n && i <= r;
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
Oe.resolveFilterValue = (e) => {
|
|
366
366
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
367
367
|
if (i > l) {
|
|
368
368
|
const s = i;
|
|
@@ -370,22 +370,22 @@ He.resolveFilterValue = (e) => {
|
|
|
370
370
|
}
|
|
371
371
|
return [i, l];
|
|
372
372
|
};
|
|
373
|
-
|
|
373
|
+
Oe.autoRemove = (e) => E(e) || E(e[0]) && E(e[1]);
|
|
374
374
|
var L = {
|
|
375
|
-
includesString:
|
|
376
|
-
includesStringSensitive:
|
|
377
|
-
equalsString:
|
|
378
|
-
arrIncludes:
|
|
379
|
-
arrIncludesAll:
|
|
380
|
-
arrIncludesSome:
|
|
381
|
-
equals:
|
|
382
|
-
weakEquals:
|
|
383
|
-
inNumberRange:
|
|
375
|
+
includesString: ke,
|
|
376
|
+
includesStringSensitive: Ue,
|
|
377
|
+
equalsString: Ke,
|
|
378
|
+
arrIncludes: Xe,
|
|
379
|
+
arrIncludesAll: We,
|
|
380
|
+
arrIncludesSome: Qe,
|
|
381
|
+
equals: Ze,
|
|
382
|
+
weakEquals: Je,
|
|
383
|
+
inNumberRange: Oe
|
|
384
384
|
};
|
|
385
385
|
function E(e) {
|
|
386
386
|
return e == null || e === "";
|
|
387
387
|
}
|
|
388
|
-
var
|
|
388
|
+
var At = {
|
|
389
389
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
390
390
|
getInitialState: (e) => ({
|
|
391
391
|
columnFilters: [],
|
|
@@ -402,7 +402,7 @@ var Dt = {
|
|
|
402
402
|
return typeof n == "string" ? L.includesString : typeof n == "number" ? L.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? L.equals : Array.isArray(n) ? L.arrIncludes : L.weakEquals;
|
|
403
403
|
}, e.getFilterFn = () => {
|
|
404
404
|
var t, n;
|
|
405
|
-
return
|
|
405
|
+
return fe(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : L[e.columnDef.filterFn];
|
|
406
406
|
}, e.getCanFilter = () => {
|
|
407
407
|
var t, n, r;
|
|
408
408
|
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
|
|
@@ -414,8 +414,8 @@ var Dt = {
|
|
|
414
414
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
415
415
|
}, e.setFilterValue = (t) => {
|
|
416
416
|
o.setColumnFilters((n) => {
|
|
417
|
-
const r = e.getFilterFn(), i = n?.find((d) => d.id === e.id), l =
|
|
418
|
-
if (
|
|
417
|
+
const r = e.getFilterFn(), i = n?.find((d) => d.id === e.id), l = z(t, i ? i.value : void 0);
|
|
418
|
+
if (je(r, l, e)) {
|
|
419
419
|
var s;
|
|
420
420
|
return (s = n?.filter((d) => d.id !== e.id)) != null ? s : [];
|
|
421
421
|
}
|
|
@@ -438,9 +438,9 @@ var Dt = {
|
|
|
438
438
|
e.setColumnFilters = (o) => {
|
|
439
439
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
440
440
|
var i;
|
|
441
|
-
return (i =
|
|
441
|
+
return (i = z(o, r)) == null ? void 0 : i.filter((l) => {
|
|
442
442
|
const s = t.find((u) => u.id === l.id);
|
|
443
|
-
return !(s &&
|
|
443
|
+
return !(s && je(s.getFilterFn(), l.value, s));
|
|
444
444
|
});
|
|
445
445
|
};
|
|
446
446
|
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
|
|
@@ -450,54 +450,54 @@ var Dt = {
|
|
|
450
450
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
451
451
|
}
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function je(e, o, t) {
|
|
454
454
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
455
455
|
}
|
|
456
|
-
var
|
|
456
|
+
var Lt = (e, o, t) => t.reduce((n, r) => {
|
|
457
457
|
const i = r.getValue(e);
|
|
458
458
|
return n + (typeof i == "number" ? i : 0);
|
|
459
|
-
}, 0),
|
|
459
|
+
}, 0), Gt = (e, o, t) => {
|
|
460
460
|
let n;
|
|
461
461
|
return t.forEach((r) => {
|
|
462
462
|
const i = r.getValue(e);
|
|
463
463
|
i != null && (n > i || n === void 0 && i >= i) && (n = i);
|
|
464
464
|
}), n;
|
|
465
|
-
},
|
|
465
|
+
}, Ht = (e, o, t) => {
|
|
466
466
|
let n;
|
|
467
467
|
return t.forEach((r) => {
|
|
468
468
|
const i = r.getValue(e);
|
|
469
469
|
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
470
470
|
}), n;
|
|
471
|
-
},
|
|
471
|
+
}, Ot = (e, o, t) => {
|
|
472
472
|
let n, r;
|
|
473
473
|
return t.forEach((i) => {
|
|
474
474
|
const l = i.getValue(e);
|
|
475
475
|
l != null && (n === void 0 ? l >= l && (n = r = l) : (n > l && (n = l), r < l && (r = l)));
|
|
476
476
|
}), [n, r];
|
|
477
|
-
},
|
|
477
|
+
}, zt = (e, o) => {
|
|
478
478
|
let t = 0, n = 0;
|
|
479
479
|
if (o.forEach((r) => {
|
|
480
480
|
let i = r.getValue(e);
|
|
481
481
|
i != null && (i = +i) >= i && (++t, n += i);
|
|
482
482
|
}), t) return n / t;
|
|
483
|
-
},
|
|
483
|
+
}, Tt = (e, o) => {
|
|
484
484
|
if (!o.length) return;
|
|
485
485
|
const t = o.map((i) => i.getValue(e));
|
|
486
|
-
if (!
|
|
486
|
+
if (!Vt(t)) return;
|
|
487
487
|
if (t.length === 1) return t[0];
|
|
488
488
|
const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
|
|
489
489
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
490
|
-
},
|
|
491
|
-
sum:
|
|
492
|
-
min:
|
|
493
|
-
max:
|
|
494
|
-
extent:
|
|
495
|
-
mean:
|
|
496
|
-
median:
|
|
497
|
-
unique:
|
|
498
|
-
uniqueCount:
|
|
499
|
-
count:
|
|
500
|
-
},
|
|
490
|
+
}, Bt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), qt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Nt = (e, o) => o.length, $e = {
|
|
491
|
+
sum: Lt,
|
|
492
|
+
min: Gt,
|
|
493
|
+
max: Ht,
|
|
494
|
+
extent: Ot,
|
|
495
|
+
mean: zt,
|
|
496
|
+
median: Tt,
|
|
497
|
+
unique: Bt,
|
|
498
|
+
uniqueCount: qt,
|
|
499
|
+
count: Nt
|
|
500
|
+
}, jt = {
|
|
501
501
|
getDefaultColumnDef: () => ({
|
|
502
502
|
aggregatedCell: (e) => {
|
|
503
503
|
var o, t;
|
|
@@ -532,12 +532,12 @@ var At = (e, o, t) => t.reduce((n, r) => {
|
|
|
532
532
|
};
|
|
533
533
|
}, e.getAutoAggregationFn = () => {
|
|
534
534
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
535
|
-
if (typeof n == "number") return
|
|
536
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
535
|
+
if (typeof n == "number") return $e.sum;
|
|
536
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return $e.extent;
|
|
537
537
|
}, e.getAggregationFn = () => {
|
|
538
538
|
var t, n;
|
|
539
539
|
if (!e) throw new Error();
|
|
540
|
-
return
|
|
540
|
+
return fe(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : $e[e.columnDef.aggregationFn];
|
|
541
541
|
};
|
|
542
542
|
},
|
|
543
543
|
createTable: (e) => {
|
|
@@ -560,24 +560,24 @@ var At = (e, o, t) => t.reduce((n, r) => {
|
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
|
-
function
|
|
563
|
+
function kt(e, o, t) {
|
|
564
564
|
if (!(o != null && o.length) || !t) return e;
|
|
565
565
|
const n = e.filter((r) => !o.includes(r.id));
|
|
566
566
|
return t === "remove" ? n : [...o.map((r) => e.find((i) => i.id === r)).filter(Boolean), ...n];
|
|
567
567
|
}
|
|
568
|
-
var
|
|
568
|
+
var Ut = {
|
|
569
569
|
getInitialState: (e) => ({
|
|
570
570
|
columnOrder: [],
|
|
571
571
|
...e
|
|
572
572
|
}),
|
|
573
573
|
getDefaultOptions: (e) => ({ onColumnOrderChange: x("columnOrder", e) }),
|
|
574
574
|
createColumn: (e, o) => {
|
|
575
|
-
e.getIndex = m((t) => [
|
|
575
|
+
e.getIndex = m((t) => [J(o, t)], (t) => t.findIndex((n) => n.id === e.id), C(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
576
576
|
var n;
|
|
577
|
-
return ((n =
|
|
577
|
+
return ((n = J(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
578
578
|
}, e.getIsLastColumn = (t) => {
|
|
579
579
|
var n;
|
|
580
|
-
const r =
|
|
580
|
+
const r = J(o, t);
|
|
581
581
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
582
582
|
};
|
|
583
583
|
},
|
|
@@ -600,15 +600,15 @@ var kt = {
|
|
|
600
600
|
}
|
|
601
601
|
i = [...i, ...s];
|
|
602
602
|
}
|
|
603
|
-
return
|
|
603
|
+
return kt(i, t, n);
|
|
604
604
|
}, C(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
605
605
|
}
|
|
606
|
-
},
|
|
606
|
+
}, Me = () => ({
|
|
607
607
|
left: [],
|
|
608
608
|
right: []
|
|
609
|
-
}),
|
|
609
|
+
}), Kt = {
|
|
610
610
|
getInitialState: (e) => ({
|
|
611
|
-
columnPinning:
|
|
611
|
+
columnPinning: Me(),
|
|
612
612
|
...e
|
|
613
613
|
}),
|
|
614
614
|
getDefaultOptions: (e) => ({ onColumnPinningChange: x("columnPinning", e) }),
|
|
@@ -667,7 +667,7 @@ var kt = {
|
|
|
667
667
|
createTable: (e) => {
|
|
668
668
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
669
669
|
var t, n;
|
|
670
|
-
return e.setColumnPinning(o ?
|
|
670
|
+
return e.setColumnPinning(o ? Me() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : Me());
|
|
671
671
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
672
672
|
var t;
|
|
673
673
|
const n = e.getState().columnPinning;
|
|
@@ -686,25 +686,25 @@ var kt = {
|
|
|
686
686
|
}, C(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
-
function
|
|
689
|
+
function Xt(e) {
|
|
690
690
|
return e || (typeof document < "u" ? document : null);
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var ge = {
|
|
693
693
|
size: 150,
|
|
694
694
|
minSize: 20,
|
|
695
695
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
696
|
-
},
|
|
696
|
+
}, Ve = () => ({
|
|
697
697
|
startOffset: null,
|
|
698
698
|
startSize: null,
|
|
699
699
|
deltaOffset: null,
|
|
700
700
|
deltaPercentage: null,
|
|
701
701
|
isResizingColumn: !1,
|
|
702
702
|
columnSizingStart: []
|
|
703
|
-
}),
|
|
704
|
-
getDefaultColumnDef: () =>
|
|
703
|
+
}), Wt = {
|
|
704
|
+
getDefaultColumnDef: () => ge,
|
|
705
705
|
getInitialState: (e) => ({
|
|
706
706
|
columnSizing: {},
|
|
707
|
-
columnSizingInfo:
|
|
707
|
+
columnSizingInfo: Ve(),
|
|
708
708
|
...e
|
|
709
709
|
}),
|
|
710
710
|
getDefaultOptions: (e) => ({
|
|
@@ -717,14 +717,14 @@ var ae = {
|
|
|
717
717
|
e.getSize = () => {
|
|
718
718
|
var t, n, r;
|
|
719
719
|
const i = o.getState().columnSizing[e.id];
|
|
720
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
720
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ge.minSize, (n = i ?? e.columnDef.size) != null ? n : ge.size), (r = e.columnDef.maxSize) != null ? r : ge.maxSize);
|
|
721
721
|
}, e.getStart = m((t) => [
|
|
722
722
|
t,
|
|
723
|
-
|
|
723
|
+
J(o, t),
|
|
724
724
|
o.getState().columnSizing
|
|
725
725
|
], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getStart")), e.getAfter = m((t) => [
|
|
726
726
|
t,
|
|
727
|
-
|
|
727
|
+
J(o, t),
|
|
728
728
|
o.getState().columnSizing
|
|
729
729
|
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
730
730
|
o.setColumnSizing((t) => {
|
|
@@ -756,19 +756,19 @@ var ae = {
|
|
|
756
756
|
}, e.getResizeHandler = (t) => {
|
|
757
757
|
const n = o.getColumn(e.column.id), r = n?.getCanResize();
|
|
758
758
|
return (i) => {
|
|
759
|
-
if (!n || !r || (i.persist == null || i.persist(),
|
|
759
|
+
if (!n || !r || (i.persist == null || i.persist(), Pe(i) && i.touches && i.touches.length > 1))
|
|
760
760
|
return;
|
|
761
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u =
|
|
761
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = Pe(i) ? Math.round(i.touches[0].clientX) : i.clientX, a = {}, d = (R, w) => {
|
|
762
762
|
typeof w == "number" && (o.setColumnSizingInfo(($) => {
|
|
763
763
|
var I, M;
|
|
764
|
-
const
|
|
765
|
-
return $.columnSizingStart.forEach((
|
|
766
|
-
let [
|
|
767
|
-
a[
|
|
764
|
+
const B = o.options.columnResizeDirection === "rtl" ? -1 : 1, k = (w - ((I = $?.startOffset) != null ? I : 0)) * B, Y = Math.max(k / ((M = $?.startSize) != null ? M : 0), -0.999999);
|
|
765
|
+
return $.columnSizingStart.forEach((ce) => {
|
|
766
|
+
let [U, G] = ce;
|
|
767
|
+
a[U] = Math.round(Math.max(G + G * Y, 0) * 100) / 100;
|
|
768
768
|
}), {
|
|
769
769
|
...$,
|
|
770
|
-
deltaOffset:
|
|
771
|
-
deltaPercentage:
|
|
770
|
+
deltaOffset: k,
|
|
771
|
+
deltaPercentage: Y
|
|
772
772
|
};
|
|
773
773
|
}), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing(($) => ({
|
|
774
774
|
...$,
|
|
@@ -784,7 +784,7 @@ var ae = {
|
|
|
784
784
|
deltaPercentage: null,
|
|
785
785
|
columnSizingStart: []
|
|
786
786
|
}));
|
|
787
|
-
}, c =
|
|
787
|
+
}, c = Xt(t), p = {
|
|
788
788
|
moveHandler: (R) => g(R.clientX),
|
|
789
789
|
upHandler: (R) => {
|
|
790
790
|
c?.removeEventListener("mousemove", p.moveHandler), c?.removeEventListener("mouseup", p.upHandler), f(R.clientX);
|
|
@@ -795,8 +795,8 @@ var ae = {
|
|
|
795
795
|
var w;
|
|
796
796
|
c?.removeEventListener("touchmove", v.moveHandler), c?.removeEventListener("touchend", v.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), f((w = R.touches[0]) == null ? void 0 : w.clientX);
|
|
797
797
|
}
|
|
798
|
-
}, F =
|
|
799
|
-
|
|
798
|
+
}, F = Qt() ? { passive: !1 } : !1;
|
|
799
|
+
Pe(i) ? (c?.addEventListener("touchmove", v.moveHandler, F), c?.addEventListener("touchend", v.upHandler, F)) : (c?.addEventListener("mousemove", p.moveHandler, F), c?.addEventListener("mouseup", p.upHandler, F)), o.setColumnSizingInfo((R) => ({
|
|
800
800
|
...R,
|
|
801
801
|
startOffset: u,
|
|
802
802
|
startSize: l,
|
|
@@ -814,7 +814,7 @@ var ae = {
|
|
|
814
814
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
815
815
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
816
816
|
var t;
|
|
817
|
-
e.setColumnSizingInfo(o ?
|
|
817
|
+
e.setColumnSizingInfo(o ? Ve() : (t = e.initialState.columnSizingInfo) != null ? t : Ve());
|
|
818
818
|
}, e.getTotalSize = () => {
|
|
819
819
|
var o, t;
|
|
820
820
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -829,9 +829,9 @@ var ae = {
|
|
|
829
829
|
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
function
|
|
834
|
-
if (typeof
|
|
832
|
+
}, de = null;
|
|
833
|
+
function Qt() {
|
|
834
|
+
if (typeof de == "boolean") return de;
|
|
835
835
|
let e = !1;
|
|
836
836
|
try {
|
|
837
837
|
const o = { get passive() {
|
|
@@ -842,12 +842,12 @@ function Wt() {
|
|
|
842
842
|
} catch {
|
|
843
843
|
e = !1;
|
|
844
844
|
}
|
|
845
|
-
return
|
|
845
|
+
return de = e, de;
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Pe(e) {
|
|
848
848
|
return e.type === "touchstart";
|
|
849
849
|
}
|
|
850
|
-
var
|
|
850
|
+
var Zt = {
|
|
851
851
|
getInitialState: (e) => ({
|
|
852
852
|
columnVisibility: {},
|
|
853
853
|
...e
|
|
@@ -898,15 +898,15 @@ var Qt = {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
};
|
|
901
|
-
function
|
|
901
|
+
function J(e, o) {
|
|
902
902
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
903
903
|
}
|
|
904
|
-
var
|
|
904
|
+
var Jt = { createTable: (e) => {
|
|
905
905
|
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 = () => {
|
|
906
906
|
if (e._getGlobalFacetedMinMaxValues)
|
|
907
907
|
return e._getGlobalFacetedMinMaxValues();
|
|
908
908
|
};
|
|
909
|
-
} },
|
|
909
|
+
} }, Yt = {
|
|
910
910
|
getInitialState: (e) => ({
|
|
911
911
|
globalFilter: void 0,
|
|
912
912
|
...e
|
|
@@ -930,14 +930,14 @@ var Zt = { createTable: (e) => {
|
|
|
930
930
|
e.getGlobalAutoFilterFn = () => L.includesString, e.getGlobalFilterFn = () => {
|
|
931
931
|
var o, t;
|
|
932
932
|
const { globalFilterFn: n } = e.options;
|
|
933
|
-
return
|
|
933
|
+
return fe(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : L[n];
|
|
934
934
|
}, e.setGlobalFilter = (o) => {
|
|
935
935
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
936
936
|
}, e.resetGlobalFilter = (o) => {
|
|
937
937
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
938
938
|
};
|
|
939
939
|
}
|
|
940
|
-
},
|
|
940
|
+
}, bt = {
|
|
941
941
|
getInitialState: (e) => ({
|
|
942
942
|
expanded: {},
|
|
943
943
|
...e
|
|
@@ -1020,14 +1020,14 @@ var Zt = { createTable: (e) => {
|
|
|
1020
1020
|
};
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
|
-
},
|
|
1024
|
-
pageIndex:
|
|
1025
|
-
pageSize:
|
|
1026
|
-
}),
|
|
1023
|
+
}, De = 0, Ae = 10, xe = () => ({
|
|
1024
|
+
pageIndex: De,
|
|
1025
|
+
pageSize: Ae
|
|
1026
|
+
}), en = {
|
|
1027
1027
|
getInitialState: (e) => ({
|
|
1028
1028
|
...e,
|
|
1029
1029
|
pagination: {
|
|
1030
|
-
...
|
|
1030
|
+
...xe(),
|
|
1031
1031
|
...e?.pagination
|
|
1032
1032
|
}
|
|
1033
1033
|
}),
|
|
@@ -1049,14 +1049,14 @@ var Zt = { createTable: (e) => {
|
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
1051
|
}, e.setPagination = (n) => {
|
|
1052
|
-
const r = (i) =>
|
|
1052
|
+
const r = (i) => z(n, i);
|
|
1053
1053
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1054
1054
|
}, e.resetPagination = (n) => {
|
|
1055
1055
|
var r;
|
|
1056
|
-
e.setPagination(n ?
|
|
1056
|
+
e.setPagination(n ? xe() : (r = e.initialState.pagination) != null ? r : xe());
|
|
1057
1057
|
}, e.setPageIndex = (n) => {
|
|
1058
1058
|
e.setPagination((r) => {
|
|
1059
|
-
let i =
|
|
1059
|
+
let i = z(n, r.pageIndex);
|
|
1060
1060
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1061
1061
|
return i = Math.max(0, Math.min(i, l)), {
|
|
1062
1062
|
...r,
|
|
@@ -1065,13 +1065,13 @@ var Zt = { createTable: (e) => {
|
|
|
1065
1065
|
});
|
|
1066
1066
|
}, e.resetPageIndex = (n) => {
|
|
1067
1067
|
var r, i;
|
|
1068
|
-
e.setPageIndex(n ?
|
|
1068
|
+
e.setPageIndex(n ? De : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : De);
|
|
1069
1069
|
}, e.resetPageSize = (n) => {
|
|
1070
1070
|
var r, i;
|
|
1071
|
-
e.setPageSize(n ?
|
|
1071
|
+
e.setPageSize(n ? Ae : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Ae);
|
|
1072
1072
|
}, e.setPageSize = (n) => {
|
|
1073
1073
|
e.setPagination((r) => {
|
|
1074
|
-
const i = Math.max(1,
|
|
1074
|
+
const i = Math.max(1, z(n, r.pageSize)), l = r.pageSize * r.pageIndex, s = Math.floor(l / i);
|
|
1075
1075
|
return {
|
|
1076
1076
|
...r,
|
|
1077
1077
|
pageIndex: s,
|
|
@@ -1080,7 +1080,7 @@ var Zt = { createTable: (e) => {
|
|
|
1080
1080
|
});
|
|
1081
1081
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1082
1082
|
var i;
|
|
1083
|
-
let l =
|
|
1083
|
+
let l = z(n, (i = e.options.pageCount) != null ? i : -1);
|
|
1084
1084
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
1085
1085
|
...r,
|
|
1086
1086
|
pageCount: l
|
|
@@ -1099,12 +1099,12 @@ var Zt = { createTable: (e) => {
|
|
|
1099
1099
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
|
-
},
|
|
1102
|
+
}, Ie = () => ({
|
|
1103
1103
|
top: [],
|
|
1104
1104
|
bottom: []
|
|
1105
|
-
}),
|
|
1105
|
+
}), tn = {
|
|
1106
1106
|
getInitialState: (e) => ({
|
|
1107
|
-
rowPinning:
|
|
1107
|
+
rowPinning: Ie(),
|
|
1108
1108
|
...e
|
|
1109
1109
|
}),
|
|
1110
1110
|
getDefaultOptions: (e) => ({ onRowPinningChange: x("rowPinning", e) }),
|
|
@@ -1163,7 +1163,7 @@ var Zt = { createTable: (e) => {
|
|
|
1163
1163
|
createTable: (e) => {
|
|
1164
1164
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1165
1165
|
var t, n;
|
|
1166
|
-
return e.setRowPinning(o ?
|
|
1166
|
+
return e.setRowPinning(o ? Ie() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Ie());
|
|
1167
1167
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1168
1168
|
var t;
|
|
1169
1169
|
const n = e.getState().rowPinning;
|
|
@@ -1190,7 +1190,7 @@ var Zt = { createTable: (e) => {
|
|
|
1190
1190
|
return o.filter((i) => !r.has(i.id));
|
|
1191
1191
|
}, C(e.options, "debugRows", "getCenterRows"));
|
|
1192
1192
|
}
|
|
1193
|
-
},
|
|
1193
|
+
}, nn = {
|
|
1194
1194
|
getInitialState: (e) => ({
|
|
1195
1195
|
rowSelection: {},
|
|
1196
1196
|
...e
|
|
@@ -1218,17 +1218,17 @@ var Zt = { createTable: (e) => {
|
|
|
1218
1218
|
}, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
|
|
1219
1219
|
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = { ...t };
|
|
1220
1220
|
return e.getRowModel().rows.forEach((i) => {
|
|
1221
|
-
|
|
1221
|
+
Le(r, i.id, n, !0, e);
|
|
1222
1222
|
}), r;
|
|
1223
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = m(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ?
|
|
1223
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = m(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1224
1224
|
rows: [],
|
|
1225
1225
|
flatRows: [],
|
|
1226
1226
|
rowsById: {}
|
|
1227
|
-
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = m(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ?
|
|
1227
|
+
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = m(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1228
1228
|
rows: [],
|
|
1229
1229
|
flatRows: [],
|
|
1230
1230
|
rowsById: {}
|
|
1231
|
-
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = m(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ?
|
|
1231
|
+
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = m(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1232
1232
|
rows: [],
|
|
1233
1233
|
flatRows: [],
|
|
1234
1234
|
rowsById: {}
|
|
@@ -1260,17 +1260,17 @@ var Zt = { createTable: (e) => {
|
|
|
1260
1260
|
var l;
|
|
1261
1261
|
if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t) return i;
|
|
1262
1262
|
const s = { ...i };
|
|
1263
|
-
return
|
|
1263
|
+
return Le(s, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), s;
|
|
1264
1264
|
});
|
|
1265
1265
|
}, e.getIsSelected = () => {
|
|
1266
1266
|
const { rowSelection: t } = o.getState();
|
|
1267
|
-
return
|
|
1267
|
+
return ze(e, t);
|
|
1268
1268
|
}, e.getIsSomeSelected = () => {
|
|
1269
1269
|
const { rowSelection: t } = o.getState();
|
|
1270
|
-
return
|
|
1270
|
+
return Ge(e, t) === "some";
|
|
1271
1271
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1272
1272
|
const { rowSelection: t } = o.getState();
|
|
1273
|
-
return
|
|
1273
|
+
return Ge(e, t) === "all";
|
|
1274
1274
|
}, e.getCanSelect = () => {
|
|
1275
1275
|
var t;
|
|
1276
1276
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1288,16 +1288,16 @@ var Zt = { createTable: (e) => {
|
|
|
1288
1288
|
};
|
|
1289
1289
|
};
|
|
1290
1290
|
}
|
|
1291
|
-
},
|
|
1291
|
+
}, Le = (e, o, t, n, r) => {
|
|
1292
1292
|
var i;
|
|
1293
1293
|
const l = r.getRow(o, !0);
|
|
1294
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) =>
|
|
1294
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) => Le(e, s.id, t, n, r));
|
|
1295
1295
|
};
|
|
1296
|
-
function
|
|
1296
|
+
function ye(e, o) {
|
|
1297
1297
|
const t = e.getState().rowSelection, n = [], r = {}, i = function(l, s) {
|
|
1298
1298
|
return l.map((u) => {
|
|
1299
1299
|
var a;
|
|
1300
|
-
const d =
|
|
1300
|
+
const d = ze(u, t);
|
|
1301
1301
|
if (d && (n.push(u), r[u.id] = u), (a = u.subRows) != null && a.length && (u = {
|
|
1302
1302
|
...u,
|
|
1303
1303
|
subRows: i(u.subRows)
|
|
@@ -1310,33 +1310,33 @@ function Ie(e, o) {
|
|
|
1310
1310
|
rowsById: r
|
|
1311
1311
|
};
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function ze(e, o) {
|
|
1314
1314
|
var t;
|
|
1315
1315
|
return (t = o[e.id]) != null ? t : !1;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Ge(e, o, t) {
|
|
1318
1318
|
var n;
|
|
1319
1319
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1320
1320
|
let r = !0, i = !1;
|
|
1321
1321
|
return e.subRows.forEach((l) => {
|
|
1322
|
-
if (!(i && !r) && (l.getCanSelect() && (
|
|
1323
|
-
const s =
|
|
1322
|
+
if (!(i && !r) && (l.getCanSelect() && (ze(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
|
|
1323
|
+
const s = Ge(l, o);
|
|
1324
1324
|
s === "all" ? i = !0 : (s === "some" && (i = !0), r = !1);
|
|
1325
1325
|
}
|
|
1326
1326
|
}), r ? "all" : i ? "some" : !1;
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1328
|
+
var He = /([0-9]+)/gm, on = (e, o, t) => Ye(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), rn = (e, o, t) => Ye(T(e.getValue(t)), T(o.getValue(t))), ln = (e, o, t) => Te(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), sn = (e, o, t) => Te(T(e.getValue(t)), T(o.getValue(t))), un = (e, o, t) => {
|
|
1329
1329
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1330
1330
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1331
|
-
},
|
|
1332
|
-
function
|
|
1331
|
+
}, an = (e, o, t) => Te(e.getValue(t), o.getValue(t));
|
|
1332
|
+
function Te(e, o) {
|
|
1333
1333
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function T(e) {
|
|
1336
1336
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const t = e.split(
|
|
1338
|
+
function Ye(e, o) {
|
|
1339
|
+
const t = e.split(He).filter(Boolean), n = o.split(He).filter(Boolean);
|
|
1340
1340
|
for (; t.length && n.length; ) {
|
|
1341
1341
|
const r = t.shift(), i = n.shift(), l = parseInt(r, 10), s = parseInt(i, 10), u = [l, s].sort();
|
|
1342
1342
|
if (isNaN(u[0])) {
|
|
@@ -1350,14 +1350,14 @@ function Je(e, o) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
return t.length - n.length;
|
|
1352
1352
|
}
|
|
1353
|
-
var
|
|
1354
|
-
alphanumeric:
|
|
1355
|
-
alphanumericCaseSensitive:
|
|
1356
|
-
text:
|
|
1357
|
-
textCaseSensitive:
|
|
1358
|
-
datetime:
|
|
1359
|
-
basic:
|
|
1360
|
-
},
|
|
1353
|
+
var Z = {
|
|
1354
|
+
alphanumeric: on,
|
|
1355
|
+
alphanumericCaseSensitive: rn,
|
|
1356
|
+
text: ln,
|
|
1357
|
+
textCaseSensitive: sn,
|
|
1358
|
+
datetime: un,
|
|
1359
|
+
basic: an
|
|
1360
|
+
}, gn = {
|
|
1361
1361
|
getInitialState: (e) => ({
|
|
1362
1362
|
sorting: [],
|
|
1363
1363
|
...e
|
|
@@ -1376,18 +1376,18 @@ var Q = {
|
|
|
1376
1376
|
let n = !1;
|
|
1377
1377
|
for (const r of t) {
|
|
1378
1378
|
const i = r?.getValue(e.id);
|
|
1379
|
-
if (Object.prototype.toString.call(i) === "[object Date]") return
|
|
1380
|
-
if (typeof i == "string" && (n = !0, i.split(
|
|
1381
|
-
return
|
|
1379
|
+
if (Object.prototype.toString.call(i) === "[object Date]") return Z.datetime;
|
|
1380
|
+
if (typeof i == "string" && (n = !0, i.split(He).length > 1))
|
|
1381
|
+
return Z.alphanumeric;
|
|
1382
1382
|
}
|
|
1383
|
-
return n ?
|
|
1383
|
+
return n ? Z.text : Z.basic;
|
|
1384
1384
|
}, e.getAutoSortDir = () => {
|
|
1385
1385
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1386
1386
|
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
|
1387
1387
|
}, e.getSortingFn = () => {
|
|
1388
1388
|
var t, n;
|
|
1389
1389
|
if (!e) throw new Error();
|
|
1390
|
-
return
|
|
1390
|
+
return fe(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Z[e.columnDef.sortingFn];
|
|
1391
1391
|
}, e.toggleSorting = (t, n) => {
|
|
1392
1392
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
1393
1393
|
o.setSorting((l) => {
|
|
@@ -1443,27 +1443,27 @@ var Q = {
|
|
|
1443
1443
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1444
1444
|
}, 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());
|
|
1445
1445
|
}
|
|
1446
|
-
},
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
kt,
|
|
1446
|
+
}, dn = [
|
|
1447
|
+
yt,
|
|
1448
|
+
Zt,
|
|
1450
1449
|
Ut,
|
|
1451
|
-
|
|
1450
|
+
Kt,
|
|
1452
1451
|
Dt,
|
|
1453
|
-
|
|
1452
|
+
At,
|
|
1454
1453
|
Jt,
|
|
1455
|
-
an,
|
|
1456
|
-
Nt,
|
|
1457
1454
|
Yt,
|
|
1455
|
+
gn,
|
|
1456
|
+
jt,
|
|
1458
1457
|
bt,
|
|
1459
1458
|
en,
|
|
1460
1459
|
tn,
|
|
1461
|
-
|
|
1460
|
+
nn,
|
|
1461
|
+
Wt
|
|
1462
1462
|
];
|
|
1463
|
-
function
|
|
1463
|
+
function fn(e) {
|
|
1464
1464
|
var o, t;
|
|
1465
1465
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1466
|
-
const n = [...
|
|
1466
|
+
const n = [...dn, ...(o = e._features) != null ? o : []];
|
|
1467
1467
|
let r = { _features: n };
|
|
1468
1468
|
const i = r._features.reduce((g, f) => Object.assign(g, f.getDefaultOptions == null ? void 0 : f.getDefaultOptions(r)), {}), l = (g) => r.options.mergeOptions ? r.options.mergeOptions(i, g) : {
|
|
1469
1469
|
...i,
|
|
@@ -1495,7 +1495,7 @@ function dn(e) {
|
|
|
1495
1495
|
r.setState(r.initialState);
|
|
1496
1496
|
},
|
|
1497
1497
|
setOptions: (g) => {
|
|
1498
|
-
r.options = l(
|
|
1498
|
+
r.options = l(z(g, r.options));
|
|
1499
1499
|
},
|
|
1500
1500
|
getState: () => r.options.state,
|
|
1501
1501
|
setState: (g) => {
|
|
@@ -1532,7 +1532,7 @@ function dn(e) {
|
|
|
1532
1532
|
getAllColumns: m(() => [r._getColumnDefs()], (g) => {
|
|
1533
1533
|
const f = function(c, p, v) {
|
|
1534
1534
|
return v === void 0 && (v = 0), c.map((F) => {
|
|
1535
|
-
const R =
|
|
1535
|
+
const R = It(r, F, v, p), w = F;
|
|
1536
1536
|
return R.columns = w.columns ? f(w.columns, R, v + 1) : [], R;
|
|
1537
1537
|
});
|
|
1538
1538
|
};
|
|
@@ -1553,7 +1553,7 @@ function dn(e) {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
return r;
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function cn() {
|
|
1557
1557
|
return (e) => m(() => [e.options.data], (o) => {
|
|
1558
1558
|
const t = {
|
|
1559
1559
|
rows: [],
|
|
@@ -1563,7 +1563,7 @@ function fn() {
|
|
|
1563
1563
|
i === void 0 && (i = 0);
|
|
1564
1564
|
const s = [];
|
|
1565
1565
|
for (let a = 0; a < r.length; a++) {
|
|
1566
|
-
const d =
|
|
1566
|
+
const d = Et(e, e._getRowId(r[a], a, l), r[a], a, i, void 0, l?.id);
|
|
1567
1567
|
if (t.flatRows.push(d), t.rowsById[d.id] = d, s.push(d), e.options.getSubRows) {
|
|
1568
1568
|
var u;
|
|
1569
1569
|
d.originalSubRows = e.options.getSubRows(r[a], a), (u = d.originalSubRows) != null && u.length && (d.subRows = n(d.originalSubRows, i + 1, d));
|
|
@@ -1574,7 +1574,7 @@ function fn() {
|
|
|
1574
1574
|
return t.rows = n(o), t;
|
|
1575
1575
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function pn() {
|
|
1578
1578
|
return (e) => m(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
1579
1579
|
if (!t.rows.length || !(o != null && o.length)) return t;
|
|
1580
1580
|
const n = e.getState().sorting, r = [], i = n.filter((u) => {
|
|
@@ -1597,11 +1597,11 @@ function cn() {
|
|
|
1597
1597
|
const p = i[c], v = l[p.id], F = v.sortUndefined, R = (f = p?.desc) != null ? f : !1;
|
|
1598
1598
|
let w = 0;
|
|
1599
1599
|
if (F) {
|
|
1600
|
-
const $ = d.getValue(p.id), I = g.getValue(p.id), M = $ === void 0,
|
|
1601
|
-
if (M ||
|
|
1600
|
+
const $ = d.getValue(p.id), I = g.getValue(p.id), M = $ === void 0, B = I === void 0;
|
|
1601
|
+
if (M || B) {
|
|
1602
1602
|
if (F === "first") return M ? -1 : 1;
|
|
1603
1603
|
if (F === "last") return M ? 1 : -1;
|
|
1604
|
-
w = M &&
|
|
1604
|
+
w = M && B ? 0 : M ? F : -F;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
if (w === 0 && (w = v.sortingFn(d, g, p.id)), w !== 0)
|
|
@@ -1620,29 +1620,29 @@ function cn() {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
}, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return e ?
|
|
1625
|
-
}
|
|
1626
|
-
function pn(e) {
|
|
1627
|
-
return Sn(e) || typeof e == "function" || mn(e);
|
|
1623
|
+
function yn(e, o) {
|
|
1624
|
+
return e ? Sn(e) ? /* @__PURE__ */ Ee.createElement(e, o) : e : null;
|
|
1628
1625
|
}
|
|
1629
1626
|
function Sn(e) {
|
|
1627
|
+
return mn(e) || typeof e == "function" || Cn(e);
|
|
1628
|
+
}
|
|
1629
|
+
function mn(e) {
|
|
1630
1630
|
return typeof e == "function" && (() => {
|
|
1631
1631
|
const o = Object.getPrototypeOf(e);
|
|
1632
1632
|
return o.prototype && o.prototype.isReactComponent;
|
|
1633
1633
|
})();
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Cn(e) {
|
|
1636
1636
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function vn(e) {
|
|
1639
1639
|
const o = {
|
|
1640
1640
|
state: {},
|
|
1641
1641
|
onStateChange: () => {
|
|
1642
1642
|
},
|
|
1643
1643
|
renderFallbackValue: null,
|
|
1644
1644
|
...e
|
|
1645
|
-
}, [t] =
|
|
1645
|
+
}, [t] = Ee.useState(() => ({ current: fn(o) })), [n, r] = Ee.useState(() => t.current.initialState);
|
|
1646
1646
|
return t.current.setOptions((i) => ({
|
|
1647
1647
|
...i,
|
|
1648
1648
|
...e,
|
|
@@ -1655,17 +1655,17 @@ function Cn(e) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
})), t.current;
|
|
1657
1657
|
}
|
|
1658
|
-
var
|
|
1659
|
-
const [
|
|
1658
|
+
var En = ({ children: e, classNameExpandedCell: o, classNameExpandedContent: t, classNameExpandedRow: n, classNameExpandedHeader: r, classNameActiveExpandedRow: i, classNameHoverRow: l, columns: s = [], data: u = [], defaultExpanded: a, enableExpandedRow: d, enableHoverRow: g, expandedState: f, id: c, isPaginationEnabled: p, queryOptions: v = {}, totalItems: F, getRowId: R, fetchData: w, onExpandedChange: $, renderExpandedRow: I, keepExpandColumnVisible: M }) => {
|
|
1659
|
+
const [B, k] = P([]), [Y, ce] = P(!!w), [U, G] = P(0), [b, be] = P(), [K, et] = P(10), [tt, nt] = P(F), pe = w ? tt : F, ot = j(() => Math.ceil(pe / K), [pe, K]), [ee, rt] = P({}), [te, it] = P({}), [ne, lt] = P({}), [oe, st] = P({}), Se = Mt({
|
|
1660
1660
|
queryKey: (() => {
|
|
1661
1661
|
const S = typeof c == "string" || typeof c == "number" ? [c] : c;
|
|
1662
|
-
return p && S.push(
|
|
1662
|
+
return p && S.push(U, K), b && S.push(b), Object.entries(ee).forEach(([h, _]) => {
|
|
1663
1663
|
S.push(`${h}:${_.join(",")}`);
|
|
1664
|
-
}), Object.entries(ee).forEach(([h, _]) => {
|
|
1665
|
-
_ && S.push(`${h}:${_}`);
|
|
1666
1664
|
}), Object.entries(te).forEach(([h, _]) => {
|
|
1667
|
-
_ && S.push(`${h}:${_
|
|
1665
|
+
_ && S.push(`${h}:${_}`);
|
|
1668
1666
|
}), Object.entries(ne).forEach(([h, _]) => {
|
|
1667
|
+
_ && S.push(`${h}:${_.from ?? ""}-${_.to ?? ""}`);
|
|
1668
|
+
}), Object.entries(oe).forEach(([h, _]) => {
|
|
1669
1669
|
_ && S.push(`${h}:${_}`);
|
|
1670
1670
|
}), S;
|
|
1671
1671
|
})(),
|
|
@@ -1674,142 +1674,142 @@ var yn = ({ children: e, classNameExpandedCell: o, classNameExpandedContent: t,
|
|
|
1674
1674
|
initialData: u,
|
|
1675
1675
|
enabled: !!w,
|
|
1676
1676
|
queryFn: async ({ signal: S }) => w({
|
|
1677
|
-
page: Math.max(
|
|
1678
|
-
pageSize:
|
|
1679
|
-
termOfSearch:
|
|
1680
|
-
...Object.keys(b).length > 0 ? b : {},
|
|
1677
|
+
page: Math.max(U + 1, 1),
|
|
1678
|
+
pageSize: K,
|
|
1679
|
+
termOfSearch: b,
|
|
1681
1680
|
...Object.keys(ee).length > 0 ? ee : {},
|
|
1682
1681
|
...Object.keys(te).length > 0 ? te : {},
|
|
1683
|
-
...Object.keys(ne).length > 0 ? ne : {}
|
|
1684
|
-
|
|
1682
|
+
...Object.keys(ne).length > 0 ? ne : {},
|
|
1683
|
+
...Object.keys(oe).length > 0 ? oe : {}
|
|
1684
|
+
}, S).then(({ data: h, totalItemsCount: _ }) => (ce(!1), _ && nt(_), h)),
|
|
1685
1685
|
...v
|
|
1686
|
-
}),
|
|
1687
|
-
|
|
1688
|
-
}, []),
|
|
1686
|
+
}), X = w ? Se.data : u, ut = w ? Se.isLoading : !1, me = w ? Se.isFetching : !1, at = O((S) => {
|
|
1687
|
+
be(S), G(0);
|
|
1688
|
+
}, []), gt = O((S, h) => {
|
|
1689
1689
|
const _ = S.toLowerCase().replace(/\s+/g, "_");
|
|
1690
|
-
|
|
1690
|
+
rt((A) => ({
|
|
1691
1691
|
...A,
|
|
1692
1692
|
[_]: h
|
|
1693
1693
|
}));
|
|
1694
|
-
}, []),
|
|
1694
|
+
}, []), dt = O((S, h) => {
|
|
1695
1695
|
const _ = S.toLowerCase().replace(/\s+/g, "_");
|
|
1696
|
-
|
|
1696
|
+
it((A) => ({
|
|
1697
1697
|
...A,
|
|
1698
1698
|
[_]: h?.toISOString()
|
|
1699
1699
|
})), G(0);
|
|
1700
|
-
}, []),
|
|
1700
|
+
}, []), ft = O((S, h) => {
|
|
1701
1701
|
const _ = S.toLowerCase().replace(/\s+/g, "_");
|
|
1702
|
-
|
|
1702
|
+
lt((A) => ({
|
|
1703
1703
|
...A,
|
|
1704
1704
|
[_]: h ? {
|
|
1705
1705
|
from: h.from?.toISOString(),
|
|
1706
1706
|
to: h.to?.toISOString()
|
|
1707
1707
|
} : void 0
|
|
1708
1708
|
})), G(0);
|
|
1709
|
-
}, []),
|
|
1709
|
+
}, []), ct = O((S, h) => {
|
|
1710
1710
|
const _ = S.toLowerCase().replace(/\s+/g, "_");
|
|
1711
|
-
|
|
1711
|
+
st((A) => ({
|
|
1712
1712
|
...A,
|
|
1713
1713
|
[_]: h?.toISOString()
|
|
1714
1714
|
})), G(0);
|
|
1715
|
-
}, []),
|
|
1716
|
-
const h = typeof S == "function" ? S(
|
|
1717
|
-
|
|
1715
|
+
}, []), pt = O((S) => G(S), []), St = O((S) => et(S), []), [mt, Ct] = P(a ?? {}), Ce = f !== void 0, q = Ce ? f : mt, W = O((S) => {
|
|
1716
|
+
const h = typeof S == "function" ? S(q) : S;
|
|
1717
|
+
Ce || Ct(h), $?.(S);
|
|
1718
1718
|
}, [
|
|
1719
|
-
|
|
1720
|
-
|
|
1719
|
+
q,
|
|
1720
|
+
Ce,
|
|
1721
1721
|
$
|
|
1722
1722
|
]);
|
|
1723
|
-
|
|
1723
|
+
Fe(() => {
|
|
1724
1724
|
if (!d) return;
|
|
1725
|
-
const S = Array.isArray(c) ? c.join(",") : String(c), h = new AbortController(), _ = (
|
|
1726
|
-
const { detail: y } =
|
|
1727
|
-
|
|
1725
|
+
const S = Array.isArray(c) ? c.join(",") : String(c), h = new AbortController(), _ = (Q) => {
|
|
1726
|
+
const { detail: H } = Q, { rowId: y } = H;
|
|
1727
|
+
H.tableId !== S || !y || W((D) => typeof D == "boolean" ? { [y]: !0 } : {
|
|
1728
1728
|
...D,
|
|
1729
|
-
[y
|
|
1729
|
+
[y]: !0
|
|
1730
1730
|
});
|
|
1731
|
-
}, A = (
|
|
1732
|
-
const { detail: y } =
|
|
1733
|
-
|
|
1731
|
+
}, A = (Q) => {
|
|
1732
|
+
const { detail: H } = Q, { rowId: y } = H;
|
|
1733
|
+
H.tableId !== S || !y || W((D) => {
|
|
1734
1734
|
if (typeof D == "boolean") return {};
|
|
1735
|
-
const
|
|
1736
|
-
return delete
|
|
1735
|
+
const le = { ...D };
|
|
1736
|
+
return delete le[y], le;
|
|
1737
1737
|
});
|
|
1738
|
-
},
|
|
1739
|
-
const { detail: y } =
|
|
1740
|
-
|
|
1741
|
-
if (typeof D == "boolean") return { [y
|
|
1742
|
-
const
|
|
1743
|
-
return
|
|
1738
|
+
}, ht = (Q) => {
|
|
1739
|
+
const { detail: H } = Q, { rowId: y } = H;
|
|
1740
|
+
H.tableId !== S || !y || W((D) => {
|
|
1741
|
+
if (typeof D == "boolean") return { [y]: !D };
|
|
1742
|
+
const le = !!D[y], he = { ...D };
|
|
1743
|
+
return le ? delete he[y] : he[y] = !0, he;
|
|
1744
1744
|
});
|
|
1745
1745
|
};
|
|
1746
|
-
return document.addEventListener(
|
|
1746
|
+
return document.addEventListener(_e.EXPAND_ROW, _, { signal: h.signal }), document.addEventListener(_e.COLLAPSE_ROW, A, { signal: h.signal }), document.addEventListener(_e.TOGGLE_ROW, ht, { signal: h.signal }), () => h.abort();
|
|
1747
1747
|
}, [
|
|
1748
1748
|
d,
|
|
1749
1749
|
c,
|
|
1750
|
-
|
|
1750
|
+
W
|
|
1751
1751
|
]);
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1752
|
+
const ve = j(() => X.some((S) => !!S.meta?.expandedRow), [X]), re = j(() => me ? [] : X.map((S, h) => R ? R(S, h) : String(h)), [
|
|
1753
|
+
X,
|
|
1754
1754
|
R,
|
|
1755
|
-
|
|
1756
|
-
]),
|
|
1757
|
-
|
|
1758
|
-
if (
|
|
1759
|
-
const S = requestAnimationFrame(() =>
|
|
1755
|
+
me
|
|
1756
|
+
]), vt = j(() => typeof q == "boolean" ? q : re.some((S) => !!q[S]), [q, re]), Rt = j(() => typeof M == "boolean" ? M : typeof M == "object" ? re.some((S) => !!M[S]) : !1, [M, re]), Re = ve || I && (vt || Rt), [N, Be] = P(!!Re);
|
|
1757
|
+
Fe(() => {
|
|
1758
|
+
if (Re) {
|
|
1759
|
+
const S = requestAnimationFrame(() => Be(!0));
|
|
1760
1760
|
return () => cancelAnimationFrame(S);
|
|
1761
|
-
} else
|
|
1762
|
-
}, [
|
|
1763
|
-
const [
|
|
1764
|
-
|
|
1765
|
-
if (
|
|
1761
|
+
} else Be(!1);
|
|
1762
|
+
}, [Re]);
|
|
1763
|
+
const [ie, qe] = P(!N);
|
|
1764
|
+
Fe(() => {
|
|
1765
|
+
if (N) qe(!1);
|
|
1766
1766
|
else {
|
|
1767
|
-
const S = setTimeout(() =>
|
|
1767
|
+
const S = setTimeout(() => qe(!0), 300);
|
|
1768
1768
|
return () => clearTimeout(S);
|
|
1769
1769
|
}
|
|
1770
|
-
}, [
|
|
1771
|
-
const
|
|
1770
|
+
}, [N]);
|
|
1771
|
+
const we = j(() => !d || !ve && !I ? null : {
|
|
1772
1772
|
id: "__expand",
|
|
1773
|
-
header: () => /* @__PURE__ */
|
|
1773
|
+
header: () => /* @__PURE__ */ ue(_t, { children: "Expand Column" }),
|
|
1774
1774
|
cell: ({ row: S }) => {
|
|
1775
1775
|
const { meta: h } = S.original, _ = typeof M == "object" && !!M[S.id];
|
|
1776
|
-
return !h?.expandedRow && !S.getIsExpanded() && !_ ? null : /* @__PURE__ */
|
|
1776
|
+
return !h?.expandedRow && !S.getIsExpanded() && !_ ? null : /* @__PURE__ */ ue("button", {
|
|
1777
1777
|
type: "button",
|
|
1778
1778
|
className: "hover:cursor-pointer",
|
|
1779
1779
|
onClick: () => S.toggleExpanded(),
|
|
1780
1780
|
"aria-label": S.getIsExpanded() ? "Collapse row" : "Expand row",
|
|
1781
|
-
children: /* @__PURE__ */
|
|
1781
|
+
children: /* @__PURE__ */ ue(Ft, { className: se("size-4 transition-transform text-slate-400 dark:text-metal-400", { "-rotate-90": S.getIsExpanded() }) })
|
|
1782
1782
|
});
|
|
1783
1783
|
},
|
|
1784
1784
|
enableSorting: !1,
|
|
1785
1785
|
meta: {
|
|
1786
|
-
headerClassName:
|
|
1787
|
-
className:
|
|
1786
|
+
headerClassName: se("transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden", N ? "w-10 max-w-10 px-2" : "w-0 max-w-0 !p-0", ie && "!border-0 !rounded-none [&+th]:rounded-tl-lg dark:[&+th]:border-l"),
|
|
1787
|
+
className: se("transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden", N ? se("w-10 max-w-10 px-1 text-center", r) : "w-0 max-w-0 !p-0", ie && "!border-0 dark:[&+td]:border-l")
|
|
1788
1788
|
}
|
|
1789
1789
|
}, [
|
|
1790
1790
|
d,
|
|
1791
|
-
|
|
1791
|
+
ve,
|
|
1792
1792
|
I,
|
|
1793
|
-
|
|
1794
|
-
|
|
1793
|
+
N,
|
|
1794
|
+
ie,
|
|
1795
1795
|
M
|
|
1796
|
-
]),
|
|
1797
|
-
data:
|
|
1798
|
-
columns:
|
|
1796
|
+
]), wt = vn({
|
|
1797
|
+
data: X,
|
|
1798
|
+
columns: j(() => we ? [we, ...s] : s, [s, we]),
|
|
1799
1799
|
...R ? { getRowId: R } : {},
|
|
1800
1800
|
state: {
|
|
1801
|
-
sorting:
|
|
1802
|
-
...d ? { expanded:
|
|
1801
|
+
sorting: B,
|
|
1802
|
+
...d ? { expanded: q } : {}
|
|
1803
1803
|
},
|
|
1804
|
-
onSortingChange:
|
|
1804
|
+
onSortingChange: k,
|
|
1805
1805
|
...d ? {
|
|
1806
|
-
onExpandedChange:
|
|
1806
|
+
onExpandedChange: W,
|
|
1807
1807
|
manualExpanding: !0
|
|
1808
1808
|
} : {},
|
|
1809
|
-
getCoreRowModel:
|
|
1810
|
-
getSortedRowModel:
|
|
1809
|
+
getCoreRowModel: cn(),
|
|
1810
|
+
getSortedRowModel: pn()
|
|
1811
1811
|
});
|
|
1812
|
-
return /* @__PURE__ */
|
|
1812
|
+
return /* @__PURE__ */ ue($t.Provider, {
|
|
1813
1813
|
value: {
|
|
1814
1814
|
classNameActiveExpandedRow: i,
|
|
1815
1815
|
classNameExpandedCell: o,
|
|
@@ -1818,36 +1818,36 @@ var yn = ({ children: e, classNameExpandedCell: o, classNameExpandedContent: t,
|
|
|
1818
1818
|
classNameHoverRow: l,
|
|
1819
1819
|
enableExpandedRow: d,
|
|
1820
1820
|
enableHoverRow: g,
|
|
1821
|
-
isBorderOnAdjacentCell:
|
|
1822
|
-
isExpandColumnVisible:
|
|
1823
|
-
isFirstLoad:
|
|
1824
|
-
multiselectSelected:
|
|
1825
|
-
dateFilters:
|
|
1826
|
-
dateRangeFilters:
|
|
1827
|
-
timeFilters:
|
|
1828
|
-
page:
|
|
1829
|
-
pageSize:
|
|
1830
|
-
sortedData:
|
|
1831
|
-
table:
|
|
1832
|
-
tableFetching:
|
|
1833
|
-
tableLoading:
|
|
1834
|
-
termOfSearch:
|
|
1835
|
-
totalItems:
|
|
1836
|
-
totalPages:
|
|
1837
|
-
handlePage:
|
|
1838
|
-
onChangeTermOfSearch:
|
|
1839
|
-
onPageSize:
|
|
1840
|
-
onSelectMultiselect:
|
|
1841
|
-
onSelectDateFilter:
|
|
1842
|
-
onSelectDateRangeFilter:
|
|
1843
|
-
onSelectTimeFilter:
|
|
1844
|
-
onSorting:
|
|
1821
|
+
isBorderOnAdjacentCell: ie,
|
|
1822
|
+
isExpandColumnVisible: N,
|
|
1823
|
+
isFirstLoad: Y,
|
|
1824
|
+
multiselectSelected: ee,
|
|
1825
|
+
dateFilters: te,
|
|
1826
|
+
dateRangeFilters: ne,
|
|
1827
|
+
timeFilters: oe,
|
|
1828
|
+
page: U,
|
|
1829
|
+
pageSize: K,
|
|
1830
|
+
sortedData: B,
|
|
1831
|
+
table: wt,
|
|
1832
|
+
tableFetching: me,
|
|
1833
|
+
tableLoading: ut,
|
|
1834
|
+
termOfSearch: b,
|
|
1835
|
+
totalItems: pe,
|
|
1836
|
+
totalPages: ot,
|
|
1837
|
+
handlePage: pt,
|
|
1838
|
+
onChangeTermOfSearch: at,
|
|
1839
|
+
onPageSize: St,
|
|
1840
|
+
onSelectMultiselect: gt,
|
|
1841
|
+
onSelectDateFilter: dt,
|
|
1842
|
+
onSelectDateRangeFilter: ft,
|
|
1843
|
+
onSelectTimeFilter: ct,
|
|
1844
|
+
onSorting: k,
|
|
1845
1845
|
renderExpandedRow: I
|
|
1846
1846
|
},
|
|
1847
1847
|
children: e
|
|
1848
1848
|
});
|
|
1849
1849
|
};
|
|
1850
1850
|
export {
|
|
1851
|
-
|
|
1852
|
-
|
|
1851
|
+
yn as n,
|
|
1852
|
+
En as t
|
|
1853
1853
|
};
|