brd-ui-kit 0.1.73 → 0.1.75
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/brd-ui-kit.css +1 -1
- package/dist/calendar-C0DXP3T-.js +3118 -0
- package/dist/calendar-C0DXP3T-.js.map +1 -0
- package/dist/calendar-DReGV_22.cjs +2 -0
- package/dist/calendar-DReGV_22.cjs.map +1 -0
- package/dist/calendar-locale-CP2pxhFK.cjs +2 -0
- package/dist/calendar-locale-CP2pxhFK.cjs.map +1 -0
- package/dist/calendar-locale-DJf03PI9.js +592 -0
- package/dist/calendar-locale-DJf03PI9.js.map +1 -0
- package/dist/{chart-CgVfpT_X.cjs → chart-C69jBlXa.cjs} +2 -2
- package/dist/{chart-CgVfpT_X.cjs.map → chart-C69jBlXa.cjs.map} +1 -1
- package/dist/{chart-D15EtNmb.js → chart-CAPCe8o5.js} +3 -3
- package/dist/{chart-D15EtNmb.js.map → chart-CAPCe8o5.js.map} +1 -1
- package/dist/components/basic-table/basic-table.d.ts +33 -2
- package/dist/components/basic-table/index.d.ts +1 -1
- package/dist/components/data-table/data-table-actions-column.d.ts +23 -0
- package/dist/components/data-table/data-table-bulk-actions.d.ts +20 -0
- package/dist/components/data-table/data-table-column-visibility.d.ts +17 -0
- package/dist/components/data-table/data-table-editable-column.d.ts +12 -0
- package/dist/components/data-table/data-table-filter.d.ts +12 -0
- package/dist/components/data-table/data-table-row-actions-column.d.ts +53 -0
- package/dist/components/data-table/data-table-select-column.d.ts +2 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/dist/components/data-table/data-table.styles.d.ts +8 -0
- package/dist/components/data-table/index.d.ts +17 -0
- package/dist/components/data-table/use-data-table-editable-rows.d.ts +60 -0
- package/dist/components/data-table.d.ts +2 -0
- package/dist/components/textarea-field/index.d.ts +1 -1
- package/dist/components/ui/button/button.styles.d.ts +2 -2
- package/dist/components/ui/calendar/calendar.d.ts +14 -10
- package/dist/components/ui/calendar/calendar.styles.d.ts +60 -2
- package/dist/components/ui/calendar/index.d.ts +3 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +102 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.styles.d.ts +9 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu.d.ts +2 -0
- package/dist/components/ui/icon/icon-presets.d.ts +5 -5
- package/dist/components/ui/icon/icon.d.ts +2 -1
- package/dist/components/ui/pagination/pagination.d.ts +6 -5
- package/dist/components/ui/select/select.styles.d.ts +2 -2
- package/dist/components/ui/select-calendar-menu/index.d.ts +1 -0
- package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +33 -0
- package/dist/components/ui/select-calendar-menu.d.ts +2 -0
- package/dist/components/ui/toggle/toggle.styles.d.ts +1 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts +4 -3
- package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +8 -2
- package/dist/components-app-pagination-app-pagination.cjs +1 -1
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.js +46 -30
- package/dist/components-app-pagination-app-pagination.js.map +1 -1
- package/dist/components-app-pagination-app-pagination.styles.cjs +2 -2
- package/dist/components-app-pagination-app-pagination.styles.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.styles.js +12 -12
- package/dist/components-app-pagination-app-pagination.styles.js.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +6 -4
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +6 -4
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-basic-chart-basic-chart.cjs +1 -1
- package/dist/components-basic-chart-basic-chart.js +1 -1
- package/dist/components-basic-drawer-basic-drawer.cjs +1 -1
- package/dist/components-basic-drawer-basic-drawer.cjs.map +1 -1
- package/dist/components-basic-drawer-basic-drawer.js +13 -14
- package/dist/components-basic-drawer-basic-drawer.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +874 -757
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs +2 -0
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-actions-column.js +72 -0
- package/dist/components-data-table-data-table-actions-column.js.map +1 -0
- package/dist/components-data-table-data-table-bulk-actions.cjs +2 -0
- package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -0
- package/dist/components-data-table-data-table-bulk-actions.js +60 -0
- package/dist/components-data-table-data-table-bulk-actions.js.map +1 -0
- package/dist/components-data-table-data-table-column-visibility.cjs +3 -0
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -0
- package/dist/components-data-table-data-table-column-visibility.js +100 -0
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -0
- package/dist/components-data-table-data-table-editable-column.cjs +2 -0
- package/dist/components-data-table-data-table-editable-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-editable-column.js +15 -0
- package/dist/components-data-table-data-table-editable-column.js.map +1 -0
- package/dist/components-data-table-data-table-filter.cjs +2 -0
- package/dist/components-data-table-data-table-filter.cjs.map +1 -0
- package/dist/components-data-table-data-table-filter.js +39 -0
- package/dist/components-data-table-data-table-filter.js.map +1 -0
- package/dist/components-data-table-data-table-row-actions-column.cjs +2 -0
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-row-actions-column.js +174 -0
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -0
- package/dist/components-data-table-data-table-select-column.cjs +2 -0
- package/dist/components-data-table-data-table-select-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-select-column.js +44 -0
- package/dist/components-data-table-data-table-select-column.js.map +1 -0
- package/dist/components-data-table-data-table.cjs +2 -0
- package/dist/components-data-table-data-table.cjs.map +1 -0
- package/dist/components-data-table-data-table.js +37 -0
- package/dist/components-data-table-data-table.js.map +1 -0
- package/dist/components-data-table-data-table.styles.cjs +4 -0
- package/dist/components-data-table-data-table.styles.cjs.map +1 -0
- package/dist/components-data-table-data-table.styles.js +22 -0
- package/dist/components-data-table-data-table.styles.js.map +1 -0
- package/dist/components-data-table-use-data-table-editable-rows.cjs +2 -0
- package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -0
- package/dist/components-data-table-use-data-table-editable-rows.js +156 -0
- package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -0
- package/dist/components-data-table.cjs +2 -0
- package/dist/components-data-table.cjs.map +1 -0
- package/dist/components-data-table.js +21 -0
- package/dist/components-data-table.js.map +1 -0
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
- package/dist/components-files-uploader-files-uploader.js.map +1 -1
- package/dist/components-input-contact-input-contact.cjs +1 -1
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +6 -4
- package/dist/components-input-contact-input-contact.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +6 -4
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
- package/dist/components-popover-modal-popover-modal.js +27 -20
- package/dist/components-popover-modal-popover-modal.js.map +1 -1
- package/dist/components-textarea-field-textarea-field.cjs.map +1 -1
- package/dist/components-textarea-field-textarea-field.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +18 -8
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +49 -33
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -12
- package/dist/components-ui-calendar-calendar.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.js +12 -3757
- package/dist/components-ui-calendar-calendar.js.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs +17 -13
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.js +193 -24
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +3 -2
- package/dist/components-ui-calendar.js.map +1 -1
- package/dist/components-ui-card-card.styles.cjs +2 -2
- package/dist/components-ui-card-card.styles.cjs.map +1 -1
- package/dist/components-ui-card-card.styles.js +2 -2
- package/dist/components-ui-card-card.styles.js.map +1 -1
- package/dist/components-ui-chart-chart.cjs +1 -1
- package/dist/components-ui-chart-chart.js +1 -1
- package/dist/components-ui-chart.cjs +1 -1
- package/dist/components-ui-chart.js +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +3 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +293 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.cjs +29 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.js +43 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.js.map +1 -0
- package/dist/components-ui-dropdown-menu.cjs +2 -0
- package/dist/components-ui-dropdown-menu.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu.js +17 -0
- package/dist/components-ui-dropdown-menu.js.map +1 -0
- package/dist/components-ui-field-field.cjs +1 -1
- package/dist/components-ui-field-field.cjs.map +1 -1
- package/dist/components-ui-field-field.js +14 -14
- package/dist/components-ui-field-field.js.map +1 -1
- package/dist/components-ui-icon-icon-presets.cjs +1 -1
- package/dist/components-ui-icon-icon-presets.cjs.map +1 -1
- package/dist/components-ui-icon-icon-presets.js +3 -3
- package/dist/components-ui-icon-icon-presets.js.map +1 -1
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +2621 -3595
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-input-group-input-group.cjs.map +1 -1
- package/dist/components-ui-input-group-input-group.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +2 -1
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +93 -62
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-popover-popover.cjs.map +1 -1
- package/dist/components-ui-popover-popover.js +24 -14
- package/dist/components-ui-popover-popover.js.map +1 -1
- package/dist/components-ui-popover-popover.styles.cjs.map +1 -1
- package/dist/components-ui-popover-popover.styles.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +2 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +138 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -0
- package/dist/components-ui-select-calendar-menu.cjs +2 -0
- package/dist/components-ui-select-calendar-menu.cjs.map +1 -0
- package/dist/components-ui-select-calendar-menu.js +5 -0
- package/dist/components-ui-select-calendar-menu.js.map +1 -0
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-select-select.styles.cjs +2 -2
- package/dist/components-ui-select-select.styles.cjs.map +1 -1
- package/dist/components-ui-select-select.styles.js +5 -5
- package/dist/components-ui-select-select.styles.js.map +1 -1
- package/dist/components-ui-sonner-sonner.styles.cjs.map +1 -1
- package/dist/components-ui-sonner-sonner.styles.js.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.cjs +1 -1
- package/dist/components-ui-toggle-group-toggle-group.cjs.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.js +52 -42
- package/dist/components-ui-toggle-group-toggle-group.js.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs +1 -17
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.styles.js +53 -30
- package/dist/components-ui-toggle-group-toggle-group.styles.js.map +1 -1
- package/dist/components-ui-toggle-toggle.styles.cjs +6 -11
- package/dist/components-ui-toggle-toggle.styles.cjs.map +1 -1
- package/dist/components-ui-toggle-toggle.styles.js +16 -18
- package/dist/components-ui-toggle-toggle.styles.js.map +1 -1
- package/dist/constants/calendar-locale.d.ts +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +223 -188
- package/dist/index.js.map +1 -1
- package/package.json +44 -17
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Table as
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
1
|
+
import { jsx as y, jsxs as He } from "react/jsx-runtime";
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import { Table as Ge, TableHeader as Le, TableRow as Z, TableHead as Ae, TableBody as ze, TableCell as me } from "./components-ui-table-table.js";
|
|
4
|
+
import { cn as O } from "./lib-utils.js";
|
|
5
|
+
import { Input as Oe } from "./components-ui-input-input.js";
|
|
6
|
+
import { Textarea as Be } from "./components-ui-textarea-textarea.js";
|
|
7
|
+
function G(e, o) {
|
|
6
8
|
return typeof e == "function" ? e(o) : e;
|
|
7
9
|
}
|
|
8
|
-
function
|
|
10
|
+
function P(e, o) {
|
|
9
11
|
return (t) => {
|
|
10
12
|
o.setState((n) => ({
|
|
11
13
|
...n,
|
|
12
|
-
[e]:
|
|
14
|
+
[e]: G(t, n[e])
|
|
13
15
|
}));
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function W(e) {
|
|
17
19
|
return e instanceof Function;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
21
|
+
function Ne(e) {
|
|
20
22
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
21
23
|
}
|
|
22
|
-
function
|
|
23
|
-
const t = [], n = (
|
|
24
|
-
|
|
25
|
-
t.push(
|
|
26
|
-
const l = o(
|
|
24
|
+
function Te(e, o) {
|
|
25
|
+
const t = [], n = (i) => {
|
|
26
|
+
i.forEach((r) => {
|
|
27
|
+
t.push(r);
|
|
28
|
+
const l = o(r);
|
|
27
29
|
l != null && l.length && n(l);
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
32
|
return n(e), t;
|
|
31
33
|
}
|
|
32
34
|
function S(e, o, t) {
|
|
33
|
-
let n = [],
|
|
34
|
-
return (
|
|
35
|
+
let n = [], i;
|
|
36
|
+
return (r) => {
|
|
35
37
|
let l;
|
|
36
38
|
t.key && t.debug && (l = Date.now());
|
|
37
|
-
const u = e(
|
|
39
|
+
const u = e(r);
|
|
38
40
|
if (!(u.length !== n.length || u.some((c, m) => n[m] !== c)))
|
|
39
|
-
return
|
|
41
|
+
return i;
|
|
40
42
|
n = u;
|
|
41
|
-
let
|
|
42
|
-
if (t.key && t.debug && (
|
|
43
|
-
const c = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() -
|
|
43
|
+
let g;
|
|
44
|
+
if (t.key && t.debug && (g = Date.now()), i = o(...u), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
|
|
45
|
+
const c = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, d = m / 16, s = (f, p) => {
|
|
44
46
|
for (f = String(f); f.length < p; )
|
|
45
47
|
f = " " + f;
|
|
46
48
|
return f;
|
|
@@ -48,88 +50,88 @@ function S(e, o, t) {
|
|
|
48
50
|
console.info(`%c⏱ ${s(m, 5)} /${s(c, 5)} ms`, `
|
|
49
51
|
font-size: .6rem;
|
|
50
52
|
font-weight: bold;
|
|
51
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
53
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t?.key);
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return i;
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
function C(e, o, t, n) {
|
|
57
59
|
return {
|
|
58
60
|
debug: () => {
|
|
59
|
-
var
|
|
60
|
-
return (
|
|
61
|
+
var i;
|
|
62
|
+
return (i = e?.debugAll) != null ? i : e[o];
|
|
61
63
|
},
|
|
62
64
|
key: process.env.NODE_ENV === "development" && t,
|
|
63
65
|
onChange: n
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
+
function qe(e, o, t, n) {
|
|
69
|
+
const i = () => {
|
|
68
70
|
var l;
|
|
69
|
-
return (l =
|
|
70
|
-
},
|
|
71
|
+
return (l = r.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
72
|
+
}, r = {
|
|
71
73
|
id: `${o.id}_${t.id}`,
|
|
72
74
|
row: o,
|
|
73
75
|
column: t,
|
|
74
76
|
getValue: () => o.getValue(n),
|
|
75
|
-
renderValue:
|
|
76
|
-
getContext: S(() => [e, t, o,
|
|
77
|
+
renderValue: i,
|
|
78
|
+
getContext: S(() => [e, t, o, r], (l, u, a, g) => ({
|
|
77
79
|
table: l,
|
|
78
80
|
column: u,
|
|
79
81
|
row: a,
|
|
80
|
-
cell:
|
|
81
|
-
getValue:
|
|
82
|
-
renderValue:
|
|
82
|
+
cell: g,
|
|
83
|
+
getValue: g.getValue,
|
|
84
|
+
renderValue: g.renderValue
|
|
83
85
|
}), C(e.options, "debugCells", "cell.getContext"))
|
|
84
86
|
};
|
|
85
87
|
return e._features.forEach((l) => {
|
|
86
|
-
l.createCell == null || l.createCell(
|
|
87
|
-
}, {}),
|
|
88
|
+
l.createCell == null || l.createCell(r, t, o, e);
|
|
89
|
+
}, {}), r;
|
|
88
90
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
+
function ke(e, o, t, n) {
|
|
92
|
+
var i, r;
|
|
91
93
|
const u = {
|
|
92
94
|
...e._getDefaultColumnDef(),
|
|
93
95
|
...o
|
|
94
96
|
}, a = u.accessorKey;
|
|
95
|
-
let
|
|
96
|
-
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (
|
|
97
|
-
let s =
|
|
97
|
+
let g = (i = (r = u.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof u.header == "string" ? u.header : void 0, c;
|
|
98
|
+
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (d) => {
|
|
99
|
+
let s = d;
|
|
98
100
|
for (const p of a.split(".")) {
|
|
99
101
|
var f;
|
|
100
102
|
s = (f = s) == null ? void 0 : f[p], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
|
|
101
103
|
}
|
|
102
104
|
return s;
|
|
103
|
-
} : c = (
|
|
105
|
+
} : c = (d) => d[u.accessorKey]), !g)
|
|
104
106
|
throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
105
107
|
let m = {
|
|
106
|
-
id: `${String(
|
|
108
|
+
id: `${String(g)}`,
|
|
107
109
|
accessorFn: c,
|
|
108
110
|
parent: n,
|
|
109
111
|
depth: t,
|
|
110
112
|
columnDef: u,
|
|
111
113
|
columns: [],
|
|
112
114
|
getFlatColumns: S(() => [!0], () => {
|
|
113
|
-
var
|
|
114
|
-
return [m, ...(
|
|
115
|
+
var d;
|
|
116
|
+
return [m, ...(d = m.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
|
|
115
117
|
}, C(e.options, "debugColumns", "column.getFlatColumns")),
|
|
116
|
-
getLeafColumns: S(() => [e._getOrderColumnsFn()], (
|
|
118
|
+
getLeafColumns: S(() => [e._getOrderColumnsFn()], (d) => {
|
|
117
119
|
var s;
|
|
118
120
|
if ((s = m.columns) != null && s.length) {
|
|
119
121
|
let f = m.columns.flatMap((p) => p.getLeafColumns());
|
|
120
|
-
return
|
|
122
|
+
return d(f);
|
|
121
123
|
}
|
|
122
124
|
return [m];
|
|
123
125
|
}, C(e.options, "debugColumns", "column.getLeafColumns"))
|
|
124
126
|
};
|
|
125
|
-
for (const
|
|
126
|
-
|
|
127
|
+
for (const d of e._features)
|
|
128
|
+
d.createColumn == null || d.createColumn(m, e);
|
|
127
129
|
return m;
|
|
128
130
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
131
|
+
const x = "debugHeaders";
|
|
132
|
+
function Se(e, o, t) {
|
|
131
133
|
var n;
|
|
132
|
-
let
|
|
134
|
+
let r = {
|
|
133
135
|
id: (n = t.id) != null ? n : o.id,
|
|
134
136
|
column: o,
|
|
135
137
|
index: t.index,
|
|
@@ -144,221 +146,221 @@ function se(e, o, t) {
|
|
|
144
146
|
const l = [], u = (a) => {
|
|
145
147
|
a.subHeaders && a.subHeaders.length && a.subHeaders.map(u), l.push(a);
|
|
146
148
|
};
|
|
147
|
-
return u(
|
|
149
|
+
return u(r), l;
|
|
148
150
|
},
|
|
149
151
|
getContext: () => ({
|
|
150
152
|
table: e,
|
|
151
|
-
header:
|
|
153
|
+
header: r,
|
|
152
154
|
column: o
|
|
153
155
|
})
|
|
154
156
|
};
|
|
155
157
|
return e._features.forEach((l) => {
|
|
156
|
-
l.createHeader == null || l.createHeader(
|
|
157
|
-
}),
|
|
158
|
+
l.createHeader == null || l.createHeader(r, e);
|
|
159
|
+
}), r;
|
|
158
160
|
}
|
|
159
|
-
const
|
|
161
|
+
const je = {
|
|
160
162
|
createTable: (e) => {
|
|
161
|
-
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n,
|
|
162
|
-
var
|
|
163
|
-
const u = (
|
|
164
|
-
return
|
|
165
|
-
}, C(e.options,
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
return
|
|
169
|
-
}, C(e.options,
|
|
170
|
-
var
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
}, C(e.options,
|
|
163
|
+
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => {
|
|
164
|
+
var r, l;
|
|
165
|
+
const u = (r = n?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? r : [], a = (l = i?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], g = t.filter((m) => !(n != null && n.includes(m.id)) && !(i != null && i.includes(m.id)));
|
|
166
|
+
return X(o, [...u, ...g, ...a], e);
|
|
167
|
+
}, C(e.options, x, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => (t = t.filter((r) => !(n != null && n.includes(r.id)) && !(i != null && i.includes(r.id))), X(o, t, e, "center")), C(e.options, x, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
168
|
+
var i;
|
|
169
|
+
const r = (i = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? i : [];
|
|
170
|
+
return X(o, r, e, "left");
|
|
171
|
+
}, C(e.options, x, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
172
|
+
var i;
|
|
173
|
+
const r = (i = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? i : [];
|
|
174
|
+
return X(o, r, e, "right");
|
|
175
|
+
}, C(e.options, x, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
174
176
|
var n;
|
|
175
177
|
return !((n = t.subHeaders) != null && n.length);
|
|
176
|
-
}), C(e.options,
|
|
178
|
+
}), C(e.options, x, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
177
179
|
var n;
|
|
178
180
|
return !((n = t.subHeaders) != null && n.length);
|
|
179
|
-
}), C(e.options,
|
|
181
|
+
}), C(e.options, x, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
180
182
|
var n;
|
|
181
183
|
return !((n = t.subHeaders) != null && n.length);
|
|
182
|
-
}), C(e.options,
|
|
183
|
-
var
|
|
184
|
-
return [...(
|
|
185
|
-
}, C(e.options,
|
|
184
|
+
}), C(e.options, x, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
185
|
+
var i, r, l, u, a, g;
|
|
186
|
+
return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (g = n[0]) == null ? void 0 : g.headers) != null ? a : []].map((c) => c.getLeafHeaders()).flat();
|
|
187
|
+
}, C(e.options, x, "getLeafHeaders"));
|
|
186
188
|
}
|
|
187
189
|
};
|
|
188
|
-
function
|
|
189
|
-
var
|
|
190
|
+
function X(e, o, t, n) {
|
|
191
|
+
var i, r;
|
|
190
192
|
let l = 0;
|
|
191
|
-
const u = function(
|
|
192
|
-
s === void 0 && (s = 1), l = Math.max(l, s),
|
|
193
|
+
const u = function(d, s) {
|
|
194
|
+
s === void 0 && (s = 1), l = Math.max(l, s), d.filter((f) => f.getIsVisible()).forEach((f) => {
|
|
193
195
|
var p;
|
|
194
196
|
(p = f.columns) != null && p.length && u(f.columns, s + 1);
|
|
195
197
|
}, 0);
|
|
196
198
|
};
|
|
197
199
|
u(e);
|
|
198
200
|
let a = [];
|
|
199
|
-
const
|
|
201
|
+
const g = (d, s) => {
|
|
200
202
|
const f = {
|
|
201
203
|
depth: s,
|
|
202
204
|
id: [n, `${s}`].filter(Boolean).join("_"),
|
|
203
205
|
headers: []
|
|
204
206
|
}, p = [];
|
|
205
|
-
|
|
206
|
-
const w = [...p].reverse()[0],
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
207
|
+
d.forEach((R) => {
|
|
208
|
+
const w = [...p].reverse()[0], v = R.column.depth === f.depth;
|
|
209
|
+
let h, I = !1;
|
|
210
|
+
if (v && R.column.parent ? h = R.column.parent : (h = R.column, I = !0), w && w?.column === h)
|
|
209
211
|
w.subHeaders.push(R);
|
|
210
212
|
else {
|
|
211
|
-
const
|
|
212
|
-
id: [n, s,
|
|
213
|
-
isPlaceholder:
|
|
214
|
-
placeholderId:
|
|
213
|
+
const $ = Se(t, h, {
|
|
214
|
+
id: [n, s, h.id, R?.id].filter(Boolean).join("_"),
|
|
215
|
+
isPlaceholder: I,
|
|
216
|
+
placeholderId: I ? `${p.filter((H) => H.column === h).length}` : void 0,
|
|
215
217
|
depth: s,
|
|
216
218
|
index: p.length
|
|
217
219
|
});
|
|
218
|
-
|
|
220
|
+
$.subHeaders.push(R), p.push($);
|
|
219
221
|
}
|
|
220
222
|
f.headers.push(R), R.headerGroup = f;
|
|
221
|
-
}), a.push(f), s > 0 &&
|
|
222
|
-
}, c = o.map((
|
|
223
|
+
}), a.push(f), s > 0 && g(p, s - 1);
|
|
224
|
+
}, c = o.map((d, s) => Se(t, d, {
|
|
223
225
|
depth: l,
|
|
224
226
|
index: s
|
|
225
227
|
}));
|
|
226
|
-
|
|
227
|
-
const m = (
|
|
228
|
+
g(c, l - 1), a.reverse();
|
|
229
|
+
const m = (d) => d.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
228
230
|
let p = 0, R = 0, w = [0];
|
|
229
|
-
f.subHeaders && f.subHeaders.length ? (w = [], m(f.subHeaders).forEach((
|
|
231
|
+
f.subHeaders && f.subHeaders.length ? (w = [], m(f.subHeaders).forEach((h) => {
|
|
230
232
|
let {
|
|
231
|
-
colSpan:
|
|
232
|
-
rowSpan:
|
|
233
|
-
} =
|
|
234
|
-
p +=
|
|
233
|
+
colSpan: I,
|
|
234
|
+
rowSpan: $
|
|
235
|
+
} = h;
|
|
236
|
+
p += I, w.push($);
|
|
235
237
|
})) : p = 1;
|
|
236
|
-
const
|
|
237
|
-
return R = R +
|
|
238
|
+
const v = Math.min(...w);
|
|
239
|
+
return R = R + v, f.colSpan = p, f.rowSpan = R, {
|
|
238
240
|
colSpan: p,
|
|
239
241
|
rowSpan: R
|
|
240
242
|
};
|
|
241
243
|
});
|
|
242
|
-
return m((
|
|
244
|
+
return m((i = (r = a[0]) == null ? void 0 : r.headers) != null ? i : []), a;
|
|
243
245
|
}
|
|
244
|
-
const
|
|
246
|
+
const de = (e, o, t, n, i, r, l) => {
|
|
245
247
|
let u = {
|
|
246
248
|
id: o,
|
|
247
249
|
index: n,
|
|
248
250
|
original: t,
|
|
249
|
-
depth:
|
|
251
|
+
depth: i,
|
|
250
252
|
parentId: l,
|
|
251
253
|
_valuesCache: {},
|
|
252
254
|
_uniqueValuesCache: {},
|
|
253
255
|
getValue: (a) => {
|
|
254
256
|
if (u._valuesCache.hasOwnProperty(a))
|
|
255
257
|
return u._valuesCache[a];
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
return u._valuesCache[a] =
|
|
258
|
+
const g = e.getColumn(a);
|
|
259
|
+
if (g != null && g.accessorFn)
|
|
260
|
+
return u._valuesCache[a] = g.accessorFn(u.original, n), u._valuesCache[a];
|
|
259
261
|
},
|
|
260
262
|
getUniqueValues: (a) => {
|
|
261
263
|
if (u._uniqueValuesCache.hasOwnProperty(a))
|
|
262
264
|
return u._uniqueValuesCache[a];
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
265
|
+
const g = e.getColumn(a);
|
|
266
|
+
if (g != null && g.accessorFn)
|
|
267
|
+
return g.columnDef.getUniqueValues ? (u._uniqueValuesCache[a] = g.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[a]) : (u._uniqueValuesCache[a] = [u.getValue(a)], u._uniqueValuesCache[a]);
|
|
266
268
|
},
|
|
267
269
|
renderValue: (a) => {
|
|
268
|
-
var
|
|
269
|
-
return (
|
|
270
|
+
var g;
|
|
271
|
+
return (g = u.getValue(a)) != null ? g : e.options.renderFallbackValue;
|
|
270
272
|
},
|
|
271
273
|
subRows: [],
|
|
272
|
-
getLeafRows: () =>
|
|
274
|
+
getLeafRows: () => Te(u.subRows, (a) => a.subRows),
|
|
273
275
|
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
|
274
276
|
getParentRows: () => {
|
|
275
|
-
let a = [],
|
|
277
|
+
let a = [], g = u;
|
|
276
278
|
for (; ; ) {
|
|
277
|
-
const c =
|
|
279
|
+
const c = g.getParentRow();
|
|
278
280
|
if (!c) break;
|
|
279
|
-
a.push(c),
|
|
281
|
+
a.push(c), g = c;
|
|
280
282
|
}
|
|
281
283
|
return a.reverse();
|
|
282
284
|
},
|
|
283
|
-
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((
|
|
284
|
-
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((
|
|
285
|
+
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((g) => qe(e, u, g, g.id)), C(e.options, "debugRows", "getAllCells")),
|
|
286
|
+
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((g, c) => (g[c.column.id] = c, g), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
285
287
|
};
|
|
286
288
|
for (let a = 0; a < e._features.length; a++) {
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
+
const g = e._features[a];
|
|
290
|
+
g == null || g.createRow == null || g.createRow(u, e);
|
|
289
291
|
}
|
|
290
292
|
return u;
|
|
291
|
-
},
|
|
293
|
+
}, Ue = {
|
|
292
294
|
createColumn: (e, o) => {
|
|
293
295
|
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 = () => {
|
|
294
296
|
if (e._getFacetedMinMaxValues)
|
|
295
297
|
return e._getFacetedMinMaxValues();
|
|
296
298
|
};
|
|
297
299
|
}
|
|
298
|
-
},
|
|
299
|
-
var n,
|
|
300
|
-
const
|
|
301
|
-
return !!(!((
|
|
300
|
+
}, he = (e, o, t) => {
|
|
301
|
+
var n, i;
|
|
302
|
+
const r = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
303
|
+
return !!(!((i = e.getValue(o)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(r));
|
|
302
304
|
};
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
+
he.autoRemove = (e) => E(e);
|
|
306
|
+
const ve = (e, o, t) => {
|
|
305
307
|
var n;
|
|
306
308
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
307
309
|
};
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
+
ve.autoRemove = (e) => E(e);
|
|
311
|
+
const _e = (e, o, t) => {
|
|
310
312
|
var n;
|
|
311
313
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
312
314
|
};
|
|
313
|
-
|
|
314
|
-
const
|
|
315
|
+
_e.autoRemove = (e) => E(e);
|
|
316
|
+
const Fe = (e, o, t) => {
|
|
315
317
|
var n;
|
|
316
318
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
317
319
|
};
|
|
318
|
-
|
|
319
|
-
const
|
|
320
|
-
var
|
|
321
|
-
return !((
|
|
320
|
+
Fe.autoRemove = (e) => E(e);
|
|
321
|
+
const $e = (e, o, t) => !t.some((n) => {
|
|
322
|
+
var i;
|
|
323
|
+
return !((i = e.getValue(o)) != null && i.includes(n));
|
|
322
324
|
});
|
|
323
|
-
|
|
324
|
-
const
|
|
325
|
-
var
|
|
326
|
-
return (
|
|
325
|
+
$e.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
326
|
+
const Ve = (e, o, t) => t.some((n) => {
|
|
327
|
+
var i;
|
|
328
|
+
return (i = e.getValue(o)) == null ? void 0 : i.includes(n);
|
|
327
329
|
});
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
let [n,
|
|
335
|
-
const
|
|
336
|
-
return
|
|
330
|
+
Ve.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
331
|
+
const Me = (e, o, t) => e.getValue(o) === t;
|
|
332
|
+
Me.autoRemove = (e) => E(e);
|
|
333
|
+
const xe = (e, o, t) => e.getValue(o) == t;
|
|
334
|
+
xe.autoRemove = (e) => E(e);
|
|
335
|
+
const ce = (e, o, t) => {
|
|
336
|
+
let [n, i] = t;
|
|
337
|
+
const r = e.getValue(o);
|
|
338
|
+
return r >= n && r <= i;
|
|
337
339
|
};
|
|
338
|
-
|
|
339
|
-
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o,
|
|
340
|
-
if (
|
|
341
|
-
const u =
|
|
342
|
-
|
|
340
|
+
ce.resolveFilterValue = (e) => {
|
|
341
|
+
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, i = typeof t != "number" ? parseFloat(t) : t, r = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(i) ? 1 / 0 : i;
|
|
342
|
+
if (r > l) {
|
|
343
|
+
const u = r;
|
|
344
|
+
r = l, l = u;
|
|
343
345
|
}
|
|
344
|
-
return [
|
|
346
|
+
return [r, l];
|
|
345
347
|
};
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
includesString:
|
|
349
|
-
includesStringSensitive:
|
|
350
|
-
equalsString:
|
|
351
|
-
arrIncludes:
|
|
352
|
-
arrIncludesAll:
|
|
353
|
-
arrIncludesSome:
|
|
354
|
-
equals:
|
|
355
|
-
weakEquals:
|
|
356
|
-
inNumberRange:
|
|
348
|
+
ce.autoRemove = (e) => E(e) || E(e[0]) && E(e[1]);
|
|
349
|
+
const D = {
|
|
350
|
+
includesString: he,
|
|
351
|
+
includesStringSensitive: ve,
|
|
352
|
+
equalsString: _e,
|
|
353
|
+
arrIncludes: Fe,
|
|
354
|
+
arrIncludesAll: $e,
|
|
355
|
+
arrIncludesSome: Ve,
|
|
356
|
+
equals: Me,
|
|
357
|
+
weakEquals: xe,
|
|
358
|
+
inNumberRange: ce
|
|
357
359
|
};
|
|
358
|
-
function
|
|
360
|
+
function E(e) {
|
|
359
361
|
return e == null || e === "";
|
|
360
362
|
}
|
|
361
|
-
const
|
|
363
|
+
const Ke = {
|
|
362
364
|
getDefaultColumnDef: () => ({
|
|
363
365
|
filterFn: "auto"
|
|
364
366
|
}),
|
|
@@ -367,33 +369,33 @@ const De = {
|
|
|
367
369
|
...e
|
|
368
370
|
}),
|
|
369
371
|
getDefaultOptions: (e) => ({
|
|
370
|
-
onColumnFiltersChange:
|
|
372
|
+
onColumnFiltersChange: P("columnFilters", e),
|
|
371
373
|
filterFromLeafRows: !1,
|
|
372
374
|
maxLeafRowFilterDepth: 100
|
|
373
375
|
}),
|
|
374
376
|
createColumn: (e, o) => {
|
|
375
377
|
e.getAutoFilterFn = () => {
|
|
376
378
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
377
|
-
return typeof n == "string" ?
|
|
379
|
+
return typeof n == "string" ? D.includesString : typeof n == "number" ? D.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? D.equals : Array.isArray(n) ? D.arrIncludes : D.weakEquals;
|
|
378
380
|
}, e.getFilterFn = () => {
|
|
379
381
|
var t, n;
|
|
380
|
-
return
|
|
382
|
+
return W(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
381
383
|
// @ts-ignore
|
|
382
|
-
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t :
|
|
384
|
+
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : D[e.columnDef.filterFn]
|
|
383
385
|
);
|
|
384
386
|
}, e.getCanFilter = () => {
|
|
385
|
-
var t, n,
|
|
386
|
-
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((
|
|
387
|
+
var t, n, i;
|
|
388
|
+
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((i = o.options.enableFilters) != null ? i : !0) && !!e.accessorFn;
|
|
387
389
|
}, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
388
390
|
var t;
|
|
389
391
|
return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
|
|
390
392
|
}, e.getFilterIndex = () => {
|
|
391
393
|
var t, n;
|
|
392
|
-
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((
|
|
394
|
+
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
393
395
|
}, e.setFilterValue = (t) => {
|
|
394
396
|
o.setColumnFilters((n) => {
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
+
const i = e.getFilterFn(), r = n?.find((c) => c.id === e.id), l = G(t, r ? r.value : void 0);
|
|
398
|
+
if (Ce(i, l, e)) {
|
|
397
399
|
var u;
|
|
398
400
|
return (u = n?.filter((c) => c.id !== e.id)) != null ? u : [];
|
|
399
401
|
}
|
|
@@ -401,9 +403,9 @@ const De = {
|
|
|
401
403
|
id: e.id,
|
|
402
404
|
value: l
|
|
403
405
|
};
|
|
404
|
-
if (
|
|
405
|
-
var
|
|
406
|
-
return (
|
|
406
|
+
if (r) {
|
|
407
|
+
var g;
|
|
408
|
+
return (g = n?.map((c) => c.id === e.id ? a : c)) != null ? g : [];
|
|
407
409
|
}
|
|
408
410
|
return n != null && n.length ? [...n, a] : [a];
|
|
409
411
|
});
|
|
@@ -414,13 +416,13 @@ const De = {
|
|
|
414
416
|
},
|
|
415
417
|
createTable: (e) => {
|
|
416
418
|
e.setColumnFilters = (o) => {
|
|
417
|
-
const t = e.getAllLeafColumns(), n = (
|
|
418
|
-
var
|
|
419
|
-
return (
|
|
419
|
+
const t = e.getAllLeafColumns(), n = (i) => {
|
|
420
|
+
var r;
|
|
421
|
+
return (r = G(o, i)) == null ? void 0 : r.filter((l) => {
|
|
420
422
|
const u = t.find((a) => a.id === l.id);
|
|
421
423
|
if (u) {
|
|
422
424
|
const a = u.getFilterFn();
|
|
423
|
-
if (
|
|
425
|
+
if (Ce(a, l.value, u))
|
|
424
426
|
return !1;
|
|
425
427
|
}
|
|
426
428
|
return !0;
|
|
@@ -433,57 +435,57 @@ const De = {
|
|
|
433
435
|
}, 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());
|
|
434
436
|
}
|
|
435
437
|
};
|
|
436
|
-
function
|
|
438
|
+
function Ce(e, o, t) {
|
|
437
439
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
438
440
|
}
|
|
439
|
-
const
|
|
440
|
-
const
|
|
441
|
-
return n + (typeof
|
|
442
|
-
}, 0),
|
|
441
|
+
const Xe = (e, o, t) => t.reduce((n, i) => {
|
|
442
|
+
const r = i.getValue(e);
|
|
443
|
+
return n + (typeof r == "number" ? r : 0);
|
|
444
|
+
}, 0), Je = (e, o, t) => {
|
|
443
445
|
let n;
|
|
444
|
-
return t.forEach((
|
|
445
|
-
const
|
|
446
|
-
|
|
446
|
+
return t.forEach((i) => {
|
|
447
|
+
const r = i.getValue(e);
|
|
448
|
+
r != null && (n > r || n === void 0 && r >= r) && (n = r);
|
|
447
449
|
}), n;
|
|
448
|
-
},
|
|
450
|
+
}, Qe = (e, o, t) => {
|
|
449
451
|
let n;
|
|
450
|
-
return t.forEach((r) => {
|
|
451
|
-
const i = r.getValue(e);
|
|
452
|
-
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
453
|
-
}), n;
|
|
454
|
-
}, Ae = (e, o, t) => {
|
|
455
|
-
let n, r;
|
|
456
452
|
return t.forEach((i) => {
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
}),
|
|
460
|
-
},
|
|
453
|
+
const r = i.getValue(e);
|
|
454
|
+
r != null && (n < r || n === void 0 && r >= r) && (n = r);
|
|
455
|
+
}), n;
|
|
456
|
+
}, We = (e, o, t) => {
|
|
457
|
+
let n, i;
|
|
458
|
+
return t.forEach((r) => {
|
|
459
|
+
const l = r.getValue(e);
|
|
460
|
+
l != null && (n === void 0 ? l >= l && (n = i = l) : (n > l && (n = l), i < l && (i = l)));
|
|
461
|
+
}), [n, i];
|
|
462
|
+
}, Ye = (e, o) => {
|
|
461
463
|
let t = 0, n = 0;
|
|
462
|
-
if (o.forEach((
|
|
463
|
-
let
|
|
464
|
-
|
|
464
|
+
if (o.forEach((i) => {
|
|
465
|
+
let r = i.getValue(e);
|
|
466
|
+
r != null && (r = +r) >= r && (++t, n += r);
|
|
465
467
|
}), t) return n / t;
|
|
466
|
-
},
|
|
468
|
+
}, Ze = (e, o) => {
|
|
467
469
|
if (!o.length)
|
|
468
470
|
return;
|
|
469
|
-
const t = o.map((
|
|
470
|
-
if (!
|
|
471
|
+
const t = o.map((r) => r.getValue(e));
|
|
472
|
+
if (!Ne(t))
|
|
471
473
|
return;
|
|
472
474
|
if (t.length === 1)
|
|
473
475
|
return t[0];
|
|
474
|
-
const n = Math.floor(t.length / 2),
|
|
475
|
-
return t.length % 2 !== 0 ?
|
|
476
|
-
},
|
|
477
|
-
sum:
|
|
478
|
-
min:
|
|
479
|
-
max:
|
|
480
|
-
extent:
|
|
481
|
-
mean:
|
|
482
|
-
median:
|
|
483
|
-
unique:
|
|
484
|
-
uniqueCount:
|
|
485
|
-
count:
|
|
486
|
-
},
|
|
476
|
+
const n = Math.floor(t.length / 2), i = t.sort((r, l) => r - l);
|
|
477
|
+
return t.length % 2 !== 0 ? i[n] : (i[n - 1] + i[n]) / 2;
|
|
478
|
+
}, be = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), et = (e, o) => new Set(o.map((t) => t.getValue(e))).size, tt = (e, o) => o.length, b = {
|
|
479
|
+
sum: Xe,
|
|
480
|
+
min: Je,
|
|
481
|
+
max: Qe,
|
|
482
|
+
extent: We,
|
|
483
|
+
mean: Ye,
|
|
484
|
+
median: Ze,
|
|
485
|
+
unique: be,
|
|
486
|
+
uniqueCount: et,
|
|
487
|
+
count: tt
|
|
488
|
+
}, nt = {
|
|
487
489
|
getDefaultColumnDef: () => ({
|
|
488
490
|
aggregatedCell: (e) => {
|
|
489
491
|
var o, t;
|
|
@@ -496,7 +498,7 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
496
498
|
...e
|
|
497
499
|
}),
|
|
498
500
|
getDefaultOptions: (e) => ({
|
|
499
|
-
onGroupingChange:
|
|
501
|
+
onGroupingChange: P("grouping", e),
|
|
500
502
|
groupedColumnMode: "reorder"
|
|
501
503
|
}),
|
|
502
504
|
createColumn: (e, o) => {
|
|
@@ -519,14 +521,14 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
519
521
|
}, e.getAutoAggregationFn = () => {
|
|
520
522
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
521
523
|
if (typeof n == "number")
|
|
522
|
-
return
|
|
524
|
+
return b.sum;
|
|
523
525
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
524
|
-
return
|
|
526
|
+
return b.extent;
|
|
525
527
|
}, e.getAggregationFn = () => {
|
|
526
528
|
var t, n;
|
|
527
529
|
if (!e)
|
|
528
530
|
throw new Error();
|
|
529
|
-
return
|
|
531
|
+
return W(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 : b[e.columnDef.aggregationFn];
|
|
530
532
|
};
|
|
531
533
|
},
|
|
532
534
|
createTable: (e) => {
|
|
@@ -545,173 +547,173 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
545
547
|
},
|
|
546
548
|
createCell: (e, o, t, n) => {
|
|
547
549
|
e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
|
|
548
|
-
var
|
|
549
|
-
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((
|
|
550
|
+
var i;
|
|
551
|
+
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((i = t.subRows) != null && i.length);
|
|
550
552
|
};
|
|
551
553
|
}
|
|
552
554
|
};
|
|
553
|
-
function
|
|
555
|
+
function ot(e, o, t) {
|
|
554
556
|
if (!(o != null && o.length) || !t)
|
|
555
557
|
return e;
|
|
556
|
-
const n = e.filter((
|
|
557
|
-
return t === "remove" ? n : [...o.map((
|
|
558
|
+
const n = e.filter((r) => !o.includes(r.id));
|
|
559
|
+
return t === "remove" ? n : [...o.map((r) => e.find((l) => l.id === r)).filter(Boolean), ...n];
|
|
558
560
|
}
|
|
559
|
-
const
|
|
561
|
+
const it = {
|
|
560
562
|
getInitialState: (e) => ({
|
|
561
563
|
columnOrder: [],
|
|
562
564
|
...e
|
|
563
565
|
}),
|
|
564
566
|
getDefaultOptions: (e) => ({
|
|
565
|
-
onColumnOrderChange:
|
|
567
|
+
onColumnOrderChange: P("columnOrder", e)
|
|
566
568
|
}),
|
|
567
569
|
createColumn: (e, o) => {
|
|
568
|
-
e.getIndex = S((t) => [
|
|
570
|
+
e.getIndex = S((t) => [j(o, t)], (t) => t.findIndex((n) => n.id === e.id), C(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
569
571
|
var n;
|
|
570
|
-
return ((n =
|
|
572
|
+
return ((n = j(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
571
573
|
}, e.getIsLastColumn = (t) => {
|
|
572
574
|
var n;
|
|
573
|
-
const
|
|
574
|
-
return ((n =
|
|
575
|
+
const i = j(o, t);
|
|
576
|
+
return ((n = i[i.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
575
577
|
};
|
|
576
578
|
},
|
|
577
579
|
createTable: (e) => {
|
|
578
580
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
|
579
581
|
var t;
|
|
580
582
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
581
|
-
}, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (
|
|
582
|
-
let
|
|
583
|
+
}, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (i) => {
|
|
584
|
+
let r = [];
|
|
583
585
|
if (!(o != null && o.length))
|
|
584
|
-
|
|
586
|
+
r = i;
|
|
585
587
|
else {
|
|
586
|
-
const l = [...o], u = [...
|
|
588
|
+
const l = [...o], u = [...i];
|
|
587
589
|
for (; u.length && l.length; ) {
|
|
588
|
-
const a = l.shift(),
|
|
589
|
-
|
|
590
|
+
const a = l.shift(), g = u.findIndex((c) => c.id === a);
|
|
591
|
+
g > -1 && r.push(u.splice(g, 1)[0]);
|
|
590
592
|
}
|
|
591
|
-
|
|
593
|
+
r = [...r, ...u];
|
|
592
594
|
}
|
|
593
|
-
return
|
|
595
|
+
return ot(r, t, n);
|
|
594
596
|
}, C(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
595
597
|
}
|
|
596
|
-
},
|
|
598
|
+
}, ee = () => ({
|
|
597
599
|
left: [],
|
|
598
600
|
right: []
|
|
599
|
-
}),
|
|
601
|
+
}), rt = {
|
|
600
602
|
getInitialState: (e) => ({
|
|
601
|
-
columnPinning:
|
|
603
|
+
columnPinning: ee(),
|
|
602
604
|
...e
|
|
603
605
|
}),
|
|
604
606
|
getDefaultOptions: (e) => ({
|
|
605
|
-
onColumnPinningChange:
|
|
607
|
+
onColumnPinningChange: P("columnPinning", e)
|
|
606
608
|
}),
|
|
607
609
|
createColumn: (e, o) => {
|
|
608
610
|
e.pin = (t) => {
|
|
609
|
-
const n = e.getLeafColumns().map((
|
|
610
|
-
o.setColumnPinning((
|
|
611
|
-
var
|
|
611
|
+
const n = e.getLeafColumns().map((i) => i.id).filter(Boolean);
|
|
612
|
+
o.setColumnPinning((i) => {
|
|
613
|
+
var r, l;
|
|
612
614
|
if (t === "right") {
|
|
613
615
|
var u, a;
|
|
614
616
|
return {
|
|
615
|
-
left: ((u =
|
|
616
|
-
right: [...((a =
|
|
617
|
+
left: ((u = i?.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))),
|
|
618
|
+
right: [...((a = i?.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
|
|
617
619
|
};
|
|
618
620
|
}
|
|
619
621
|
if (t === "left") {
|
|
620
|
-
var
|
|
622
|
+
var g, c;
|
|
621
623
|
return {
|
|
622
|
-
left: [...((
|
|
623
|
-
right: ((c =
|
|
624
|
+
left: [...((g = i?.left) != null ? g : []).filter((m) => !(n != null && n.includes(m))), ...n],
|
|
625
|
+
right: ((c = i?.right) != null ? c : []).filter((m) => !(n != null && n.includes(m)))
|
|
624
626
|
};
|
|
625
627
|
}
|
|
626
628
|
return {
|
|
627
|
-
left: ((
|
|
628
|
-
right: ((l =
|
|
629
|
+
left: ((r = i?.left) != null ? r : []).filter((m) => !(n != null && n.includes(m))),
|
|
630
|
+
right: ((l = i?.right) != null ? l : []).filter((m) => !(n != null && n.includes(m)))
|
|
629
631
|
};
|
|
630
632
|
});
|
|
631
633
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
|
632
|
-
var
|
|
633
|
-
return ((
|
|
634
|
+
var i, r, l;
|
|
635
|
+
return ((i = n.columnDef.enablePinning) != null ? i : !0) && ((r = (l = o.options.enableColumnPinning) != null ? l : o.options.enablePinning) != null ? r : !0);
|
|
634
636
|
}), e.getIsPinned = () => {
|
|
635
637
|
const t = e.getLeafColumns().map((u) => u.id), {
|
|
636
638
|
left: n,
|
|
637
|
-
right:
|
|
638
|
-
} = o.getState().columnPinning,
|
|
639
|
-
return
|
|
639
|
+
right: i
|
|
640
|
+
} = o.getState().columnPinning, r = t.some((u) => n?.includes(u)), l = t.some((u) => i?.includes(u));
|
|
641
|
+
return r ? "left" : l ? "right" : !1;
|
|
640
642
|
}, e.getPinnedIndex = () => {
|
|
641
643
|
var t, n;
|
|
642
|
-
const
|
|
643
|
-
return
|
|
644
|
+
const i = e.getIsPinned();
|
|
645
|
+
return i ? (t = (n = o.getState().columnPinning) == null || (n = n[i]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
|
|
644
646
|
};
|
|
645
647
|
},
|
|
646
648
|
createRow: (e, o) => {
|
|
647
|
-
e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n,
|
|
648
|
-
const
|
|
649
|
-
return t.filter((l) => !
|
|
650
|
-
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((
|
|
651
|
-
...
|
|
649
|
+
e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, i) => {
|
|
650
|
+
const r = [...n ?? [], ...i ?? []];
|
|
651
|
+
return t.filter((l) => !r.includes(l.column.id));
|
|
652
|
+
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
653
|
+
...r,
|
|
652
654
|
position: "left"
|
|
653
|
-
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((
|
|
654
|
-
...
|
|
655
|
+
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
656
|
+
...r,
|
|
655
657
|
position: "right"
|
|
656
658
|
})), C(o.options, "debugRows", "getRightVisibleCells"));
|
|
657
659
|
},
|
|
658
660
|
createTable: (e) => {
|
|
659
661
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
660
662
|
var t, n;
|
|
661
|
-
return e.setColumnPinning(o ?
|
|
663
|
+
return e.setColumnPinning(o ? ee() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ee());
|
|
662
664
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
663
665
|
var t;
|
|
664
666
|
const n = e.getState().columnPinning;
|
|
665
667
|
if (!o) {
|
|
666
|
-
var
|
|
667
|
-
return !!((
|
|
668
|
+
var i, r;
|
|
669
|
+
return !!((i = n.left) != null && i.length || (r = n.right) != null && r.length);
|
|
668
670
|
}
|
|
669
671
|
return !!((t = n[o]) != null && t.length);
|
|
670
|
-
}, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((
|
|
671
|
-
const
|
|
672
|
-
return o.filter((
|
|
672
|
+
}, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((i) => i.id === n)).filter(Boolean), C(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((i) => i.id === n)).filter(Boolean), C(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
|
|
673
|
+
const i = [...t ?? [], ...n ?? []];
|
|
674
|
+
return o.filter((r) => !i.includes(r.id));
|
|
673
675
|
}, C(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
674
676
|
}
|
|
675
677
|
};
|
|
676
|
-
function
|
|
678
|
+
function lt(e) {
|
|
677
679
|
return e || (typeof document < "u" ? document : null);
|
|
678
680
|
}
|
|
679
|
-
const
|
|
681
|
+
const J = {
|
|
680
682
|
size: 150,
|
|
681
683
|
minSize: 20,
|
|
682
684
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
683
|
-
},
|
|
685
|
+
}, te = () => ({
|
|
684
686
|
startOffset: null,
|
|
685
687
|
startSize: null,
|
|
686
688
|
deltaOffset: null,
|
|
687
689
|
deltaPercentage: null,
|
|
688
690
|
isResizingColumn: !1,
|
|
689
691
|
columnSizingStart: []
|
|
690
|
-
}),
|
|
691
|
-
getDefaultColumnDef: () =>
|
|
692
|
+
}), st = {
|
|
693
|
+
getDefaultColumnDef: () => J,
|
|
692
694
|
getInitialState: (e) => ({
|
|
693
695
|
columnSizing: {},
|
|
694
|
-
columnSizingInfo:
|
|
696
|
+
columnSizingInfo: te(),
|
|
695
697
|
...e
|
|
696
698
|
}),
|
|
697
699
|
getDefaultOptions: (e) => ({
|
|
698
700
|
columnResizeMode: "onEnd",
|
|
699
701
|
columnResizeDirection: "ltr",
|
|
700
|
-
onColumnSizingChange:
|
|
701
|
-
onColumnSizingInfoChange:
|
|
702
|
+
onColumnSizingChange: P("columnSizing", e),
|
|
703
|
+
onColumnSizingInfoChange: P("columnSizingInfo", e)
|
|
702
704
|
}),
|
|
703
705
|
createColumn: (e, o) => {
|
|
704
706
|
e.getSize = () => {
|
|
705
|
-
var t, n,
|
|
706
|
-
const
|
|
707
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
708
|
-
}, e.getStart = S((t) => [t,
|
|
707
|
+
var t, n, i;
|
|
708
|
+
const r = o.getState().columnSizing[e.id];
|
|
709
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : J.minSize, (n = r ?? e.columnDef.size) != null ? n : J.size), (i = e.columnDef.maxSize) != null ? i : J.maxSize);
|
|
710
|
+
}, e.getStart = S((t) => [t, j(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((i, r) => i + r.getSize(), 0), C(o.options, "debugColumns", "getStart")), e.getAfter = S((t) => [t, j(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((i, r) => i + r.getSize(), 0), C(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
709
711
|
o.setColumnSizing((t) => {
|
|
710
712
|
let {
|
|
711
713
|
[e.id]: n,
|
|
712
|
-
...
|
|
714
|
+
...i
|
|
713
715
|
} = t;
|
|
714
|
-
return
|
|
716
|
+
return i;
|
|
715
717
|
});
|
|
716
718
|
}, e.getCanResize = () => {
|
|
717
719
|
var t, n;
|
|
@@ -721,12 +723,12 @@ const L = {
|
|
|
721
723
|
createHeader: (e, o) => {
|
|
722
724
|
e.getSize = () => {
|
|
723
725
|
let t = 0;
|
|
724
|
-
const n = (
|
|
725
|
-
if (
|
|
726
|
-
|
|
726
|
+
const n = (i) => {
|
|
727
|
+
if (i.subHeaders.length)
|
|
728
|
+
i.subHeaders.forEach(n);
|
|
727
729
|
else {
|
|
728
|
-
var
|
|
729
|
-
t += (
|
|
730
|
+
var r;
|
|
731
|
+
t += (r = i.column.getSize()) != null ? r : 0;
|
|
730
732
|
}
|
|
731
733
|
};
|
|
732
734
|
return n(e), t;
|
|
@@ -737,29 +739,29 @@ const L = {
|
|
|
737
739
|
}
|
|
738
740
|
return 0;
|
|
739
741
|
}, e.getResizeHandler = (t) => {
|
|
740
|
-
const n = o.getColumn(e.column.id),
|
|
741
|
-
return (
|
|
742
|
-
if (!n || !
|
|
742
|
+
const n = o.getColumn(e.column.id), i = n?.getCanResize();
|
|
743
|
+
return (r) => {
|
|
744
|
+
if (!n || !i || (r.persist == null || r.persist(), ne(r) && r.touches && r.touches.length > 1))
|
|
743
745
|
return;
|
|
744
|
-
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a =
|
|
745
|
-
typeof
|
|
746
|
-
var
|
|
747
|
-
const
|
|
748
|
-
return
|
|
749
|
-
let [
|
|
750
|
-
|
|
746
|
+
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = ne(r) ? Math.round(r.touches[0].clientX) : r.clientX, g = {}, c = (w, v) => {
|
|
747
|
+
typeof v == "number" && (o.setColumnSizingInfo((h) => {
|
|
748
|
+
var I, $;
|
|
749
|
+
const H = o.options.columnResizeDirection === "rtl" ? -1 : 1, V = (v - ((I = h?.startOffset) != null ? I : 0)) * H, B = Math.max(V / (($ = h?.startSize) != null ? $ : 0), -0.999999);
|
|
750
|
+
return h.columnSizingStart.forEach((U) => {
|
|
751
|
+
let [N, K] = U;
|
|
752
|
+
g[N] = Math.round(Math.max(K + K * B, 0) * 100) / 100;
|
|
751
753
|
}), {
|
|
752
|
-
...
|
|
753
|
-
deltaOffset:
|
|
754
|
-
deltaPercentage:
|
|
754
|
+
...h,
|
|
755
|
+
deltaOffset: V,
|
|
756
|
+
deltaPercentage: B
|
|
755
757
|
};
|
|
756
|
-
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((
|
|
757
|
-
...v,
|
|
758
|
-
...d
|
|
759
|
-
})));
|
|
760
|
-
}, m = (w) => c("move", w), g = (w) => {
|
|
761
|
-
c("end", w), o.setColumnSizingInfo((h) => ({
|
|
758
|
+
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((h) => ({
|
|
762
759
|
...h,
|
|
760
|
+
...g
|
|
761
|
+
})));
|
|
762
|
+
}, m = (w) => c("move", w), d = (w) => {
|
|
763
|
+
c("end", w), o.setColumnSizingInfo((v) => ({
|
|
764
|
+
...v,
|
|
763
765
|
isResizingColumn: !1,
|
|
764
766
|
startOffset: null,
|
|
765
767
|
startSize: null,
|
|
@@ -767,21 +769,21 @@ const L = {
|
|
|
767
769
|
deltaPercentage: null,
|
|
768
770
|
columnSizingStart: []
|
|
769
771
|
}));
|
|
770
|
-
}, s =
|
|
772
|
+
}, s = lt(t), f = {
|
|
771
773
|
moveHandler: (w) => m(w.clientX),
|
|
772
774
|
upHandler: (w) => {
|
|
773
|
-
s?.removeEventListener("mousemove", f.moveHandler), s?.removeEventListener("mouseup", f.upHandler),
|
|
775
|
+
s?.removeEventListener("mousemove", f.moveHandler), s?.removeEventListener("mouseup", f.upHandler), d(w.clientX);
|
|
774
776
|
}
|
|
775
777
|
}, p = {
|
|
776
778
|
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
|
|
777
779
|
upHandler: (w) => {
|
|
778
|
-
var
|
|
779
|
-
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()),
|
|
780
|
+
var v;
|
|
781
|
+
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), d((v = w.touches[0]) == null ? void 0 : v.clientX);
|
|
780
782
|
}
|
|
781
|
-
}, R =
|
|
783
|
+
}, R = ut() ? {
|
|
782
784
|
passive: !1
|
|
783
785
|
} : !1;
|
|
784
|
-
|
|
786
|
+
ne(r) ? (s?.addEventListener("touchmove", p.moveHandler, R), s?.addEventListener("touchend", p.upHandler, R)) : (s?.addEventListener("mousemove", f.moveHandler, R), s?.addEventListener("mouseup", f.upHandler, R)), o.setColumnSizingInfo((w) => ({
|
|
785
787
|
...w,
|
|
786
788
|
startOffset: a,
|
|
787
789
|
startSize: l,
|
|
@@ -799,25 +801,25 @@ const L = {
|
|
|
799
801
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
800
802
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
801
803
|
var t;
|
|
802
|
-
e.setColumnSizingInfo(o ?
|
|
804
|
+
e.setColumnSizingInfo(o ? te() : (t = e.initialState.columnSizingInfo) != null ? t : te());
|
|
803
805
|
}, e.getTotalSize = () => {
|
|
804
806
|
var o, t;
|
|
805
|
-
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
807
|
+
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
806
808
|
}, e.getLeftTotalSize = () => {
|
|
807
809
|
var o, t;
|
|
808
|
-
return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
810
|
+
return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
809
811
|
}, e.getCenterTotalSize = () => {
|
|
810
812
|
var o, t;
|
|
811
|
-
return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
813
|
+
return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
812
814
|
}, e.getRightTotalSize = () => {
|
|
813
815
|
var o, t;
|
|
814
|
-
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
816
|
+
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
815
817
|
};
|
|
816
818
|
}
|
|
817
819
|
};
|
|
818
|
-
let
|
|
819
|
-
function
|
|
820
|
-
if (typeof
|
|
820
|
+
let Q = null;
|
|
821
|
+
function ut() {
|
|
822
|
+
if (typeof Q == "boolean") return Q;
|
|
821
823
|
let e = !1;
|
|
822
824
|
try {
|
|
823
825
|
const o = {
|
|
@@ -830,18 +832,18 @@ function Je() {
|
|
|
830
832
|
} catch {
|
|
831
833
|
e = !1;
|
|
832
834
|
}
|
|
833
|
-
return
|
|
835
|
+
return Q = e, Q;
|
|
834
836
|
}
|
|
835
|
-
function
|
|
837
|
+
function ne(e) {
|
|
836
838
|
return e.type === "touchstart";
|
|
837
839
|
}
|
|
838
|
-
const
|
|
840
|
+
const at = {
|
|
839
841
|
getInitialState: (e) => ({
|
|
840
842
|
columnVisibility: {},
|
|
841
843
|
...e
|
|
842
844
|
}),
|
|
843
845
|
getDefaultOptions: (e) => ({
|
|
844
|
-
onColumnVisibilityChange:
|
|
846
|
+
onColumnVisibilityChange: P("columnVisibility", e)
|
|
845
847
|
}),
|
|
846
848
|
createColumn: (e, o) => {
|
|
847
849
|
e.toggleVisibility = (t) => {
|
|
@@ -851,8 +853,8 @@ const Qe = {
|
|
|
851
853
|
}));
|
|
852
854
|
}, e.getIsVisible = () => {
|
|
853
855
|
var t, n;
|
|
854
|
-
const
|
|
855
|
-
return (t =
|
|
856
|
+
const i = e.columns;
|
|
857
|
+
return (t = i.length ? i.some((r) => r.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
|
|
856
858
|
}, e.getCanHide = () => {
|
|
857
859
|
var t, n;
|
|
858
860
|
return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
|
|
@@ -861,18 +863,18 @@ const Qe = {
|
|
|
861
863
|
};
|
|
862
864
|
},
|
|
863
865
|
createRow: (e, o) => {
|
|
864
|
-
e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n,
|
|
866
|
+
e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, i) => [...t, ...n, ...i], C(o.options, "debugRows", "getVisibleCells"));
|
|
865
867
|
},
|
|
866
868
|
createTable: (e) => {
|
|
867
|
-
const o = (t, n) => S(() => [n(), n().filter((
|
|
869
|
+
const o = (t, n) => S(() => [n(), n().filter((i) => i.getIsVisible()).map((i) => i.id).join("_")], (i) => i.filter((r) => r.getIsVisible == null ? void 0 : r.getIsVisible()), C(e.options, "debugColumns", t));
|
|
868
870
|
e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
869
871
|
var n;
|
|
870
872
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
|
871
873
|
}, e.toggleAllColumnsVisible = (t) => {
|
|
872
874
|
var n;
|
|
873
|
-
t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((
|
|
874
|
-
...
|
|
875
|
-
[
|
|
875
|
+
t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((i, r) => ({
|
|
876
|
+
...i,
|
|
877
|
+
[r.id]: t || !(r.getCanHide != null && r.getCanHide())
|
|
876
878
|
}), {}));
|
|
877
879
|
}, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
|
|
878
880
|
var n;
|
|
@@ -880,23 +882,23 @@ const Qe = {
|
|
|
880
882
|
};
|
|
881
883
|
}
|
|
882
884
|
};
|
|
883
|
-
function
|
|
885
|
+
function j(e, o) {
|
|
884
886
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
885
887
|
}
|
|
886
|
-
const
|
|
888
|
+
const gt = {
|
|
887
889
|
createTable: (e) => {
|
|
888
890
|
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 = () => {
|
|
889
891
|
if (e._getGlobalFacetedMinMaxValues)
|
|
890
892
|
return e._getGlobalFacetedMinMaxValues();
|
|
891
893
|
};
|
|
892
894
|
}
|
|
893
|
-
},
|
|
895
|
+
}, dt = {
|
|
894
896
|
getInitialState: (e) => ({
|
|
895
897
|
globalFilter: void 0,
|
|
896
898
|
...e
|
|
897
899
|
}),
|
|
898
900
|
getDefaultOptions: (e) => ({
|
|
899
|
-
onGlobalFilterChange:
|
|
901
|
+
onGlobalFilterChange: P("globalFilter", e),
|
|
900
902
|
globalFilterFn: "auto",
|
|
901
903
|
getColumnCanGlobalFilter: (o) => {
|
|
902
904
|
var t;
|
|
@@ -906,43 +908,43 @@ const We = {
|
|
|
906
908
|
}),
|
|
907
909
|
createColumn: (e, o) => {
|
|
908
910
|
e.getCanGlobalFilter = () => {
|
|
909
|
-
var t, n,
|
|
910
|
-
return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((
|
|
911
|
+
var t, n, i, r;
|
|
912
|
+
return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((i = o.options.enableFilters) != null ? i : !0) && ((r = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? r : !0) && !!e.accessorFn;
|
|
911
913
|
};
|
|
912
914
|
},
|
|
913
915
|
createTable: (e) => {
|
|
914
|
-
e.getGlobalAutoFilterFn = () =>
|
|
916
|
+
e.getGlobalAutoFilterFn = () => D.includesString, e.getGlobalFilterFn = () => {
|
|
915
917
|
var o, t;
|
|
916
918
|
const {
|
|
917
919
|
globalFilterFn: n
|
|
918
920
|
} = e.options;
|
|
919
|
-
return
|
|
921
|
+
return W(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : D[n];
|
|
920
922
|
}, e.setGlobalFilter = (o) => {
|
|
921
923
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
922
924
|
}, e.resetGlobalFilter = (o) => {
|
|
923
925
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
924
926
|
};
|
|
925
927
|
}
|
|
926
|
-
},
|
|
928
|
+
}, ct = {
|
|
927
929
|
getInitialState: (e) => ({
|
|
928
930
|
expanded: {},
|
|
929
931
|
...e
|
|
930
932
|
}),
|
|
931
933
|
getDefaultOptions: (e) => ({
|
|
932
|
-
onExpandedChange:
|
|
934
|
+
onExpandedChange: P("expanded", e),
|
|
933
935
|
paginateExpandedRows: !0
|
|
934
936
|
}),
|
|
935
937
|
createTable: (e) => {
|
|
936
938
|
let o = !1, t = !1;
|
|
937
939
|
e._autoResetExpanded = () => {
|
|
938
|
-
var n,
|
|
940
|
+
var n, i;
|
|
939
941
|
if (!o) {
|
|
940
942
|
e._queue(() => {
|
|
941
943
|
o = !0;
|
|
942
944
|
});
|
|
943
945
|
return;
|
|
944
946
|
}
|
|
945
|
-
if ((n = (
|
|
947
|
+
if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
|
|
946
948
|
if (t) return;
|
|
947
949
|
t = !0, e._queue(() => {
|
|
948
950
|
e.resetExpanded(), t = !1;
|
|
@@ -951,8 +953,8 @@ const We = {
|
|
|
951
953
|
}, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
|
|
952
954
|
n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
|
|
953
955
|
}, e.resetExpanded = (n) => {
|
|
954
|
-
var
|
|
955
|
-
e.setExpanded(n ? {} : (
|
|
956
|
+
var i, r;
|
|
957
|
+
e.setExpanded(n ? {} : (i = (r = e.initialState) == null ? void 0 : r.expanded) != null ? i : {});
|
|
956
958
|
}, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
|
|
957
959
|
n.persist == null || n.persist(), e.toggleAllRowsExpanded();
|
|
958
960
|
}, e.getIsSomeRowsExpanded = () => {
|
|
@@ -960,11 +962,11 @@ const We = {
|
|
|
960
962
|
return n === !0 || Object.values(n).some(Boolean);
|
|
961
963
|
}, e.getIsAllRowsExpanded = () => {
|
|
962
964
|
const n = e.getState().expanded;
|
|
963
|
-
return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((
|
|
965
|
+
return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((i) => !i.getIsExpanded()));
|
|
964
966
|
}, e.getExpandedDepth = () => {
|
|
965
967
|
let n = 0;
|
|
966
|
-
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((
|
|
967
|
-
const l =
|
|
968
|
+
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((r) => {
|
|
969
|
+
const l = r.split(".");
|
|
968
970
|
n = Math.max(n, l.length);
|
|
969
971
|
}), n;
|
|
970
972
|
}, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
|
|
@@ -972,17 +974,17 @@ const We = {
|
|
|
972
974
|
createRow: (e, o) => {
|
|
973
975
|
e.toggleExpanded = (t) => {
|
|
974
976
|
o.setExpanded((n) => {
|
|
975
|
-
var
|
|
976
|
-
const
|
|
977
|
+
var i;
|
|
978
|
+
const r = n === !0 ? !0 : !!(n != null && n[e.id]);
|
|
977
979
|
let l = {};
|
|
978
980
|
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((u) => {
|
|
979
981
|
l[u] = !0;
|
|
980
|
-
}) : l = n, t = (
|
|
982
|
+
}) : l = n, t = (i = t) != null ? i : !r, !r && t)
|
|
981
983
|
return {
|
|
982
984
|
...l,
|
|
983
985
|
[e.id]: !0
|
|
984
986
|
};
|
|
985
|
-
if (
|
|
987
|
+
if (r && !t) {
|
|
986
988
|
const {
|
|
987
989
|
[e.id]: u,
|
|
988
990
|
...a
|
|
@@ -996,8 +998,8 @@ const We = {
|
|
|
996
998
|
const n = o.getState().expanded;
|
|
997
999
|
return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n?.[e.id]);
|
|
998
1000
|
}, e.getCanExpand = () => {
|
|
999
|
-
var t, n,
|
|
1000
|
-
return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((
|
|
1001
|
+
var t, n, i;
|
|
1002
|
+
return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((i = e.subRows) != null && i.length);
|
|
1001
1003
|
}, e.getIsAllParentsExpanded = () => {
|
|
1002
1004
|
let t = !0, n = e;
|
|
1003
1005
|
for (; t && n.parentId; )
|
|
@@ -1010,81 +1012,81 @@ const We = {
|
|
|
1010
1012
|
};
|
|
1011
1013
|
};
|
|
1012
1014
|
}
|
|
1013
|
-
},
|
|
1014
|
-
pageIndex:
|
|
1015
|
-
pageSize:
|
|
1016
|
-
}),
|
|
1015
|
+
}, le = 0, se = 10, oe = () => ({
|
|
1016
|
+
pageIndex: le,
|
|
1017
|
+
pageSize: se
|
|
1018
|
+
}), ft = {
|
|
1017
1019
|
getInitialState: (e) => ({
|
|
1018
1020
|
...e,
|
|
1019
1021
|
pagination: {
|
|
1020
|
-
...
|
|
1022
|
+
...oe(),
|
|
1021
1023
|
...e?.pagination
|
|
1022
1024
|
}
|
|
1023
1025
|
}),
|
|
1024
1026
|
getDefaultOptions: (e) => ({
|
|
1025
|
-
onPaginationChange:
|
|
1027
|
+
onPaginationChange: P("pagination", e)
|
|
1026
1028
|
}),
|
|
1027
1029
|
createTable: (e) => {
|
|
1028
1030
|
let o = !1, t = !1;
|
|
1029
1031
|
e._autoResetPageIndex = () => {
|
|
1030
|
-
var n,
|
|
1032
|
+
var n, i;
|
|
1031
1033
|
if (!o) {
|
|
1032
1034
|
e._queue(() => {
|
|
1033
1035
|
o = !0;
|
|
1034
1036
|
});
|
|
1035
1037
|
return;
|
|
1036
1038
|
}
|
|
1037
|
-
if ((n = (
|
|
1039
|
+
if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
|
|
1038
1040
|
if (t) return;
|
|
1039
1041
|
t = !0, e._queue(() => {
|
|
1040
1042
|
e.resetPageIndex(), t = !1;
|
|
1041
1043
|
});
|
|
1042
1044
|
}
|
|
1043
1045
|
}, e.setPagination = (n) => {
|
|
1044
|
-
const
|
|
1045
|
-
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(
|
|
1046
|
+
const i = (r) => G(n, r);
|
|
1047
|
+
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(i);
|
|
1046
1048
|
}, e.resetPagination = (n) => {
|
|
1047
|
-
var
|
|
1048
|
-
e.setPagination(n ?
|
|
1049
|
+
var i;
|
|
1050
|
+
e.setPagination(n ? oe() : (i = e.initialState.pagination) != null ? i : oe());
|
|
1049
1051
|
}, e.setPageIndex = (n) => {
|
|
1050
|
-
e.setPagination((
|
|
1051
|
-
let
|
|
1052
|
+
e.setPagination((i) => {
|
|
1053
|
+
let r = G(n, i.pageIndex);
|
|
1052
1054
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1053
|
-
return
|
|
1054
|
-
...
|
|
1055
|
-
pageIndex:
|
|
1055
|
+
return r = Math.max(0, Math.min(r, l)), {
|
|
1056
|
+
...i,
|
|
1057
|
+
pageIndex: r
|
|
1056
1058
|
};
|
|
1057
1059
|
});
|
|
1058
1060
|
}, e.resetPageIndex = (n) => {
|
|
1059
|
-
var
|
|
1060
|
-
e.setPageIndex(n ?
|
|
1061
|
+
var i, r;
|
|
1062
|
+
e.setPageIndex(n ? le : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageIndex) != null ? i : le);
|
|
1061
1063
|
}, e.resetPageSize = (n) => {
|
|
1062
|
-
var
|
|
1063
|
-
e.setPageSize(n ?
|
|
1064
|
+
var i, r;
|
|
1065
|
+
e.setPageSize(n ? se : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageSize) != null ? i : se);
|
|
1064
1066
|
}, e.setPageSize = (n) => {
|
|
1065
|
-
e.setPagination((
|
|
1066
|
-
const
|
|
1067
|
+
e.setPagination((i) => {
|
|
1068
|
+
const r = Math.max(1, G(n, i.pageSize)), l = i.pageSize * i.pageIndex, u = Math.floor(l / r);
|
|
1067
1069
|
return {
|
|
1068
|
-
...
|
|
1070
|
+
...i,
|
|
1069
1071
|
pageIndex: u,
|
|
1070
|
-
pageSize:
|
|
1072
|
+
pageSize: r
|
|
1071
1073
|
};
|
|
1072
1074
|
});
|
|
1073
|
-
}, e.setPageCount = (n) => e.setPagination((
|
|
1074
|
-
var
|
|
1075
|
-
let l =
|
|
1075
|
+
}, e.setPageCount = (n) => e.setPagination((i) => {
|
|
1076
|
+
var r;
|
|
1077
|
+
let l = G(n, (r = e.options.pageCount) != null ? r : -1);
|
|
1076
1078
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
1077
|
-
...
|
|
1079
|
+
...i,
|
|
1078
1080
|
pageCount: l
|
|
1079
1081
|
};
|
|
1080
1082
|
}), e.getPageOptions = S(() => [e.getPageCount()], (n) => {
|
|
1081
|
-
let
|
|
1082
|
-
return n && n > 0 && (
|
|
1083
|
+
let i = [];
|
|
1084
|
+
return n && n > 0 && (i = [...new Array(n)].fill(null).map((r, l) => l)), i;
|
|
1083
1085
|
}, C(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
1084
1086
|
const {
|
|
1085
1087
|
pageIndex: n
|
|
1086
|
-
} = e.getState().pagination,
|
|
1087
|
-
return
|
|
1088
|
+
} = e.getState().pagination, i = e.getPageCount();
|
|
1089
|
+
return i === -1 ? !0 : i === 0 ? !1 : n < i - 1;
|
|
1088
1090
|
}, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
|
|
1089
1091
|
var n;
|
|
1090
1092
|
return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
|
|
@@ -1093,37 +1095,37 @@ const We = {
|
|
|
1093
1095
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1094
1096
|
};
|
|
1095
1097
|
}
|
|
1096
|
-
},
|
|
1098
|
+
}, ie = () => ({
|
|
1097
1099
|
top: [],
|
|
1098
1100
|
bottom: []
|
|
1099
|
-
}),
|
|
1101
|
+
}), pt = {
|
|
1100
1102
|
getInitialState: (e) => ({
|
|
1101
|
-
rowPinning:
|
|
1103
|
+
rowPinning: ie(),
|
|
1102
1104
|
...e
|
|
1103
1105
|
}),
|
|
1104
1106
|
getDefaultOptions: (e) => ({
|
|
1105
|
-
onRowPinningChange:
|
|
1107
|
+
onRowPinningChange: P("rowPinning", e)
|
|
1106
1108
|
}),
|
|
1107
1109
|
createRow: (e, o) => {
|
|
1108
|
-
e.pin = (t, n,
|
|
1109
|
-
const
|
|
1110
|
+
e.pin = (t, n, i) => {
|
|
1111
|
+
const r = n ? e.getLeafRows().map((a) => {
|
|
1110
1112
|
let {
|
|
1111
|
-
id:
|
|
1113
|
+
id: g
|
|
1112
1114
|
} = a;
|
|
1113
|
-
return
|
|
1114
|
-
}) : [], l =
|
|
1115
|
+
return g;
|
|
1116
|
+
}) : [], l = i ? e.getParentRows().map((a) => {
|
|
1115
1117
|
let {
|
|
1116
|
-
id:
|
|
1118
|
+
id: g
|
|
1117
1119
|
} = a;
|
|
1118
|
-
return
|
|
1119
|
-
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...
|
|
1120
|
+
return g;
|
|
1121
|
+
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...r]);
|
|
1120
1122
|
o.setRowPinning((a) => {
|
|
1121
|
-
var
|
|
1123
|
+
var g, c;
|
|
1122
1124
|
if (t === "bottom") {
|
|
1123
|
-
var m,
|
|
1125
|
+
var m, d;
|
|
1124
1126
|
return {
|
|
1125
1127
|
top: ((m = a?.top) != null ? m : []).filter((p) => !(u != null && u.has(p))),
|
|
1126
|
-
bottom: [...((
|
|
1128
|
+
bottom: [...((d = a?.bottom) != null ? d : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)]
|
|
1127
1129
|
};
|
|
1128
1130
|
}
|
|
1129
1131
|
if (t === "top") {
|
|
@@ -1134,7 +1136,7 @@ const We = {
|
|
|
1134
1136
|
};
|
|
1135
1137
|
}
|
|
1136
1138
|
return {
|
|
1137
|
-
top: ((
|
|
1139
|
+
top: ((g = a?.top) != null ? g : []).filter((p) => !(u != null && u.has(p))),
|
|
1138
1140
|
bottom: ((c = a?.bottom) != null ? c : []).filter((p) => !(u != null && u.has(p)))
|
|
1139
1141
|
};
|
|
1140
1142
|
});
|
|
@@ -1142,43 +1144,43 @@ const We = {
|
|
|
1142
1144
|
var t;
|
|
1143
1145
|
const {
|
|
1144
1146
|
enableRowPinning: n,
|
|
1145
|
-
enablePinning:
|
|
1147
|
+
enablePinning: i
|
|
1146
1148
|
} = o.options;
|
|
1147
|
-
return typeof n == "function" ? n(e) : (t = n ??
|
|
1149
|
+
return typeof n == "function" ? n(e) : (t = n ?? i) != null ? t : !0;
|
|
1148
1150
|
}, e.getIsPinned = () => {
|
|
1149
1151
|
const t = [e.id], {
|
|
1150
1152
|
top: n,
|
|
1151
|
-
bottom:
|
|
1152
|
-
} = o.getState().rowPinning,
|
|
1153
|
-
return
|
|
1153
|
+
bottom: i
|
|
1154
|
+
} = o.getState().rowPinning, r = t.some((u) => n?.includes(u)), l = t.some((u) => i?.includes(u));
|
|
1155
|
+
return r ? "top" : l ? "bottom" : !1;
|
|
1154
1156
|
}, e.getPinnedIndex = () => {
|
|
1155
1157
|
var t, n;
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1158
|
-
const
|
|
1158
|
+
const i = e.getIsPinned();
|
|
1159
|
+
if (!i) return -1;
|
|
1160
|
+
const r = (t = i === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((l) => {
|
|
1159
1161
|
let {
|
|
1160
1162
|
id: u
|
|
1161
1163
|
} = l;
|
|
1162
1164
|
return u;
|
|
1163
1165
|
});
|
|
1164
|
-
return (n =
|
|
1166
|
+
return (n = r?.indexOf(e.id)) != null ? n : -1;
|
|
1165
1167
|
};
|
|
1166
1168
|
},
|
|
1167
1169
|
createTable: (e) => {
|
|
1168
1170
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1169
1171
|
var t, n;
|
|
1170
|
-
return e.setRowPinning(o ?
|
|
1172
|
+
return e.setRowPinning(o ? ie() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ie());
|
|
1171
1173
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1172
1174
|
var t;
|
|
1173
1175
|
const n = e.getState().rowPinning;
|
|
1174
1176
|
if (!o) {
|
|
1175
|
-
var
|
|
1176
|
-
return !!((
|
|
1177
|
+
var i, r;
|
|
1178
|
+
return !!((i = n.top) != null && i.length || (r = n.bottom) != null && r.length);
|
|
1177
1179
|
}
|
|
1178
1180
|
return !!((t = n[o]) != null && t.length);
|
|
1179
1181
|
}, e._getPinnedRows = (o, t, n) => {
|
|
1180
|
-
var
|
|
1181
|
-
return ((
|
|
1182
|
+
var i;
|
|
1183
|
+
return ((i = e.options.keepPinnedRows) == null || i ? (
|
|
1182
1184
|
//get all rows that are pinned even if they would not be otherwise visible
|
|
1183
1185
|
//account for expanded parent rows, but not pagination or filtering
|
|
1184
1186
|
(t ?? []).map((l) => {
|
|
@@ -1193,17 +1195,17 @@ const We = {
|
|
|
1193
1195
|
position: n
|
|
1194
1196
|
}));
|
|
1195
1197
|
}, e.getTopRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), C(e.options, "debugRows", "getTopRows")), e.getBottomRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), C(e.options, "debugRows", "getBottomRows")), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
|
|
1196
|
-
const
|
|
1197
|
-
return o.filter((
|
|
1198
|
+
const i = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
|
1199
|
+
return o.filter((r) => !i.has(r.id));
|
|
1198
1200
|
}, C(e.options, "debugRows", "getCenterRows"));
|
|
1199
1201
|
}
|
|
1200
|
-
},
|
|
1202
|
+
}, mt = {
|
|
1201
1203
|
getInitialState: (e) => ({
|
|
1202
1204
|
rowSelection: {},
|
|
1203
1205
|
...e
|
|
1204
1206
|
}),
|
|
1205
1207
|
getDefaultOptions: (e) => ({
|
|
1206
|
-
onRowSelectionChange:
|
|
1208
|
+
onRowSelectionChange: P("rowSelection", e),
|
|
1207
1209
|
enableRowSelection: !0,
|
|
1208
1210
|
enableMultiRowSelection: !0,
|
|
1209
1211
|
enableSubRowSelection: !0
|
|
@@ -1220,29 +1222,29 @@ const We = {
|
|
|
1220
1222
|
o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
|
|
1221
1223
|
const n = {
|
|
1222
1224
|
...t
|
|
1223
|
-
},
|
|
1224
|
-
return o ?
|
|
1225
|
-
|
|
1226
|
-
}) :
|
|
1227
|
-
delete n[
|
|
1225
|
+
}, i = e.getPreGroupedRowModel().flatRows;
|
|
1226
|
+
return o ? i.forEach((r) => {
|
|
1227
|
+
r.getCanSelect() && (n[r.id] = !0);
|
|
1228
|
+
}) : i.forEach((r) => {
|
|
1229
|
+
delete n[r.id];
|
|
1228
1230
|
}), n;
|
|
1229
1231
|
});
|
|
1230
1232
|
}, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
|
|
1231
|
-
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(),
|
|
1233
|
+
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), i = {
|
|
1232
1234
|
...t
|
|
1233
1235
|
};
|
|
1234
|
-
return e.getRowModel().rows.forEach((
|
|
1235
|
-
|
|
1236
|
-
}),
|
|
1237
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ?
|
|
1236
|
+
return e.getRowModel().rows.forEach((r) => {
|
|
1237
|
+
ue(i, r.id, n, !0, e);
|
|
1238
|
+
}), i;
|
|
1239
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? re(e, t) : {
|
|
1238
1240
|
rows: [],
|
|
1239
1241
|
flatRows: [],
|
|
1240
1242
|
rowsById: {}
|
|
1241
|
-
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ?
|
|
1243
|
+
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? re(e, t) : {
|
|
1242
1244
|
rows: [],
|
|
1243
1245
|
flatRows: [],
|
|
1244
1246
|
rowsById: {}
|
|
1245
|
-
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ?
|
|
1247
|
+
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? re(e, t) : {
|
|
1246
1248
|
rows: [],
|
|
1247
1249
|
flatRows: [],
|
|
1248
1250
|
rowsById: {}
|
|
@@ -1251,13 +1253,13 @@ const We = {
|
|
|
1251
1253
|
rowSelection: t
|
|
1252
1254
|
} = e.getState();
|
|
1253
1255
|
let n = !!(o.length && Object.keys(t).length);
|
|
1254
|
-
return n && o.some((
|
|
1256
|
+
return n && o.some((i) => i.getCanSelect() && !t[i.id]) && (n = !1), n;
|
|
1255
1257
|
}, e.getIsAllPageRowsSelected = () => {
|
|
1256
|
-
const o = e.getPaginationRowModel().flatRows.filter((
|
|
1258
|
+
const o = e.getPaginationRowModel().flatRows.filter((i) => i.getCanSelect()), {
|
|
1257
1259
|
rowSelection: t
|
|
1258
1260
|
} = e.getState();
|
|
1259
1261
|
let n = !!o.length;
|
|
1260
|
-
return n && o.some((
|
|
1262
|
+
return n && o.some((i) => !t[i.id]) && (n = !1), n;
|
|
1261
1263
|
}, e.getIsSomeRowsSelected = () => {
|
|
1262
1264
|
var o;
|
|
1263
1265
|
const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
|
|
@@ -1273,31 +1275,31 @@ const We = {
|
|
|
1273
1275
|
},
|
|
1274
1276
|
createRow: (e, o) => {
|
|
1275
1277
|
e.toggleSelected = (t, n) => {
|
|
1276
|
-
const
|
|
1277
|
-
o.setRowSelection((
|
|
1278
|
+
const i = e.getIsSelected();
|
|
1279
|
+
o.setRowSelection((r) => {
|
|
1278
1280
|
var l;
|
|
1279
|
-
if (t = typeof t < "u" ? t : !
|
|
1280
|
-
return
|
|
1281
|
+
if (t = typeof t < "u" ? t : !i, e.getCanSelect() && i === t)
|
|
1282
|
+
return r;
|
|
1281
1283
|
const u = {
|
|
1282
|
-
...
|
|
1284
|
+
...r
|
|
1283
1285
|
};
|
|
1284
|
-
return
|
|
1286
|
+
return ue(u, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), u;
|
|
1285
1287
|
});
|
|
1286
1288
|
}, e.getIsSelected = () => {
|
|
1287
1289
|
const {
|
|
1288
1290
|
rowSelection: t
|
|
1289
1291
|
} = o.getState();
|
|
1290
|
-
return
|
|
1292
|
+
return fe(e, t);
|
|
1291
1293
|
}, e.getIsSomeSelected = () => {
|
|
1292
1294
|
const {
|
|
1293
1295
|
rowSelection: t
|
|
1294
1296
|
} = o.getState();
|
|
1295
|
-
return
|
|
1297
|
+
return ae(e, t) === "some";
|
|
1296
1298
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1297
1299
|
const {
|
|
1298
1300
|
rowSelection: t
|
|
1299
1301
|
} = o.getState();
|
|
1300
|
-
return
|
|
1302
|
+
return ae(e, t) === "all";
|
|
1301
1303
|
}, e.getCanSelect = () => {
|
|
1302
1304
|
var t;
|
|
1303
1305
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1310,67 +1312,67 @@ const We = {
|
|
|
1310
1312
|
}, e.getToggleSelectedHandler = () => {
|
|
1311
1313
|
const t = e.getCanSelect();
|
|
1312
1314
|
return (n) => {
|
|
1313
|
-
var
|
|
1314
|
-
t && e.toggleSelected((
|
|
1315
|
+
var i;
|
|
1316
|
+
t && e.toggleSelected((i = n.target) == null ? void 0 : i.checked);
|
|
1315
1317
|
};
|
|
1316
1318
|
};
|
|
1317
1319
|
}
|
|
1318
|
-
},
|
|
1319
|
-
var
|
|
1320
|
-
const l =
|
|
1321
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (
|
|
1320
|
+
}, ue = (e, o, t, n, i) => {
|
|
1321
|
+
var r;
|
|
1322
|
+
const l = i.getRow(o, !0);
|
|
1323
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (r = l.subRows) != null && r.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => ue(e, u.id, t, n, i));
|
|
1322
1324
|
};
|
|
1323
|
-
function
|
|
1324
|
-
const t = e.getState().rowSelection, n = [],
|
|
1325
|
+
function re(e, o) {
|
|
1326
|
+
const t = e.getState().rowSelection, n = [], i = {}, r = function(l, u) {
|
|
1325
1327
|
return l.map((a) => {
|
|
1326
|
-
var
|
|
1327
|
-
const c =
|
|
1328
|
-
if (c && (n.push(a),
|
|
1328
|
+
var g;
|
|
1329
|
+
const c = fe(a, t);
|
|
1330
|
+
if (c && (n.push(a), i[a.id] = a), (g = a.subRows) != null && g.length && (a = {
|
|
1329
1331
|
...a,
|
|
1330
|
-
subRows:
|
|
1332
|
+
subRows: r(a.subRows)
|
|
1331
1333
|
}), c)
|
|
1332
1334
|
return a;
|
|
1333
1335
|
}).filter(Boolean);
|
|
1334
1336
|
};
|
|
1335
1337
|
return {
|
|
1336
|
-
rows:
|
|
1338
|
+
rows: r(o.rows),
|
|
1337
1339
|
flatRows: n,
|
|
1338
|
-
rowsById:
|
|
1340
|
+
rowsById: i
|
|
1339
1341
|
};
|
|
1340
1342
|
}
|
|
1341
|
-
function
|
|
1343
|
+
function fe(e, o) {
|
|
1342
1344
|
var t;
|
|
1343
1345
|
return (t = o[e.id]) != null ? t : !1;
|
|
1344
1346
|
}
|
|
1345
|
-
function
|
|
1347
|
+
function ae(e, o, t) {
|
|
1346
1348
|
var n;
|
|
1347
1349
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1348
|
-
let
|
|
1350
|
+
let i = !0, r = !1;
|
|
1349
1351
|
return e.subRows.forEach((l) => {
|
|
1350
|
-
if (!(
|
|
1351
|
-
const u =
|
|
1352
|
-
u === "all" ?
|
|
1352
|
+
if (!(r && !i) && (l.getCanSelect() && (fe(l, o) ? r = !0 : i = !1), l.subRows && l.subRows.length)) {
|
|
1353
|
+
const u = ae(l, o);
|
|
1354
|
+
u === "all" ? r = !0 : (u === "some" && (r = !0), i = !1);
|
|
1353
1355
|
}
|
|
1354
|
-
}),
|
|
1356
|
+
}), i ? "all" : r ? "some" : !1;
|
|
1355
1357
|
}
|
|
1356
|
-
const
|
|
1357
|
-
const n = e.getValue(t),
|
|
1358
|
-
return n >
|
|
1359
|
-
},
|
|
1360
|
-
function
|
|
1358
|
+
const ge = /([0-9]+)/gm, St = (e, o, t) => Pe(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), Ct = (e, o, t) => Pe(L(e.getValue(t)), L(o.getValue(t))), Rt = (e, o, t) => pe(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), wt = (e, o, t) => pe(L(e.getValue(t)), L(o.getValue(t))), ht = (e, o, t) => {
|
|
1359
|
+
const n = e.getValue(t), i = o.getValue(t);
|
|
1360
|
+
return n > i ? 1 : n < i ? -1 : 0;
|
|
1361
|
+
}, vt = (e, o, t) => pe(e.getValue(t), o.getValue(t));
|
|
1362
|
+
function pe(e, o) {
|
|
1361
1363
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1362
1364
|
}
|
|
1363
|
-
function
|
|
1365
|
+
function L(e) {
|
|
1364
1366
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1365
1367
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const t = e.split(
|
|
1368
|
+
function Pe(e, o) {
|
|
1369
|
+
const t = e.split(ge).filter(Boolean), n = o.split(ge).filter(Boolean);
|
|
1368
1370
|
for (; t.length && n.length; ) {
|
|
1369
|
-
const
|
|
1371
|
+
const i = t.shift(), r = n.shift(), l = parseInt(i, 10), u = parseInt(r, 10), a = [l, u].sort();
|
|
1370
1372
|
if (isNaN(a[0])) {
|
|
1371
|
-
if (r > i)
|
|
1372
|
-
return 1;
|
|
1373
1373
|
if (i > r)
|
|
1374
|
+
return 1;
|
|
1375
|
+
if (r > i)
|
|
1374
1376
|
return -1;
|
|
1375
1377
|
continue;
|
|
1376
1378
|
}
|
|
@@ -1383,14 +1385,14 @@ function Re(e, o) {
|
|
|
1383
1385
|
}
|
|
1384
1386
|
return t.length - n.length;
|
|
1385
1387
|
}
|
|
1386
|
-
const
|
|
1387
|
-
alphanumeric:
|
|
1388
|
-
alphanumericCaseSensitive:
|
|
1389
|
-
text:
|
|
1390
|
-
textCaseSensitive:
|
|
1391
|
-
datetime:
|
|
1392
|
-
basic:
|
|
1393
|
-
},
|
|
1388
|
+
const k = {
|
|
1389
|
+
alphanumeric: St,
|
|
1390
|
+
alphanumericCaseSensitive: Ct,
|
|
1391
|
+
text: Rt,
|
|
1392
|
+
textCaseSensitive: wt,
|
|
1393
|
+
datetime: ht,
|
|
1394
|
+
basic: vt
|
|
1395
|
+
}, _t = {
|
|
1394
1396
|
getInitialState: (e) => ({
|
|
1395
1397
|
sorting: [],
|
|
1396
1398
|
...e
|
|
@@ -1400,21 +1402,21 @@ const D = {
|
|
|
1400
1402
|
sortUndefined: 1
|
|
1401
1403
|
}),
|
|
1402
1404
|
getDefaultOptions: (e) => ({
|
|
1403
|
-
onSortingChange:
|
|
1405
|
+
onSortingChange: P("sorting", e),
|
|
1404
1406
|
isMultiSortEvent: (o) => o.shiftKey
|
|
1405
1407
|
}),
|
|
1406
1408
|
createColumn: (e, o) => {
|
|
1407
1409
|
e.getAutoSortingFn = () => {
|
|
1408
1410
|
const t = o.getFilteredRowModel().flatRows.slice(10);
|
|
1409
1411
|
let n = !1;
|
|
1410
|
-
for (const
|
|
1411
|
-
const
|
|
1412
|
-
if (Object.prototype.toString.call(
|
|
1413
|
-
return
|
|
1414
|
-
if (typeof
|
|
1415
|
-
return
|
|
1412
|
+
for (const i of t) {
|
|
1413
|
+
const r = i?.getValue(e.id);
|
|
1414
|
+
if (Object.prototype.toString.call(r) === "[object Date]")
|
|
1415
|
+
return k.datetime;
|
|
1416
|
+
if (typeof r == "string" && (n = !0, r.split(ge).length > 1))
|
|
1417
|
+
return k.alphanumeric;
|
|
1416
1418
|
}
|
|
1417
|
-
return n ?
|
|
1419
|
+
return n ? k.text : k.basic;
|
|
1418
1420
|
}, e.getAutoSortDir = () => {
|
|
1419
1421
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1420
1422
|
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
|
@@ -1422,35 +1424,35 @@ const D = {
|
|
|
1422
1424
|
var t, n;
|
|
1423
1425
|
if (!e)
|
|
1424
1426
|
throw new Error();
|
|
1425
|
-
return
|
|
1427
|
+
return W(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 : k[e.columnDef.sortingFn];
|
|
1426
1428
|
}, e.toggleSorting = (t, n) => {
|
|
1427
|
-
const
|
|
1429
|
+
const i = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
|
|
1428
1430
|
o.setSorting((l) => {
|
|
1429
1431
|
const u = l?.find((s) => s.id === e.id), a = l?.findIndex((s) => s.id === e.id);
|
|
1430
|
-
let
|
|
1431
|
-
if (l != null && l.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1432
|
+
let g = [], c, m = r ? t : i === "desc";
|
|
1433
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (r || i || (c = "remove")), c === "add") {
|
|
1434
|
+
var d;
|
|
1435
|
+
g = [...l, {
|
|
1434
1436
|
id: e.id,
|
|
1435
1437
|
desc: m
|
|
1436
|
-
}],
|
|
1437
|
-
} else c === "toggle" ?
|
|
1438
|
+
}], g.splice(0, g.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
1439
|
+
} else c === "toggle" ? g = l.map((s) => s.id === e.id ? {
|
|
1438
1440
|
...s,
|
|
1439
1441
|
desc: m
|
|
1440
|
-
} : s) : c === "remove" ?
|
|
1442
|
+
} : s) : c === "remove" ? g = l.filter((s) => s.id !== e.id) : g = [{
|
|
1441
1443
|
id: e.id,
|
|
1442
1444
|
desc: m
|
|
1443
1445
|
}];
|
|
1444
|
-
return
|
|
1446
|
+
return g;
|
|
1445
1447
|
});
|
|
1446
1448
|
}, e.getFirstSortDir = () => {
|
|
1447
1449
|
var t, n;
|
|
1448
1450
|
return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
|
|
1449
1451
|
}, e.getNextSortingOrder = (t) => {
|
|
1450
|
-
var n,
|
|
1451
|
-
const
|
|
1452
|
-
return l ? l !==
|
|
1453
|
-
(!(t && (
|
|
1452
|
+
var n, i;
|
|
1453
|
+
const r = e.getFirstSortDir(), l = e.getIsSorted();
|
|
1454
|
+
return l ? l !== r && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
|
|
1455
|
+
(!(t && (i = o.options.enableMultiRemove) != null) || i) ? !1 : l === "desc" ? "asc" : "desc" : r;
|
|
1454
1456
|
}, e.getCanSort = () => {
|
|
1455
1457
|
var t, n;
|
|
1456
1458
|
return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
|
|
@@ -1459,11 +1461,11 @@ const D = {
|
|
|
1459
1461
|
return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
|
|
1460
1462
|
}, e.getIsSorted = () => {
|
|
1461
1463
|
var t;
|
|
1462
|
-
const n = (t = o.getState().sorting) == null ? void 0 : t.find((
|
|
1464
|
+
const n = (t = o.getState().sorting) == null ? void 0 : t.find((i) => i.id === e.id);
|
|
1463
1465
|
return n ? n.desc ? "desc" : "asc" : !1;
|
|
1464
1466
|
}, e.getSortIndex = () => {
|
|
1465
1467
|
var t, n;
|
|
1466
|
-
return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((
|
|
1468
|
+
return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
1467
1469
|
}, e.clearSorting = () => {
|
|
1468
1470
|
o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
|
|
1469
1471
|
}, e.getToggleSortingHandler = () => {
|
|
@@ -1479,92 +1481,92 @@ const D = {
|
|
|
1479
1481
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1480
1482
|
}, 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());
|
|
1481
1483
|
}
|
|
1482
|
-
},
|
|
1483
|
-
ye,
|
|
1484
|
-
Qe,
|
|
1484
|
+
}, Ft = [
|
|
1485
1485
|
je,
|
|
1486
|
+
at,
|
|
1487
|
+
it,
|
|
1488
|
+
rt,
|
|
1486
1489
|
Ue,
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
We,
|
|
1490
|
+
Ke,
|
|
1491
|
+
gt,
|
|
1490
1492
|
//depends on ColumnFaceting
|
|
1491
|
-
|
|
1493
|
+
dt,
|
|
1492
1494
|
//depends on ColumnFiltering
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
+
_t,
|
|
1496
|
+
nt,
|
|
1495
1497
|
//depends on RowSorting
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1498
|
+
ct,
|
|
1499
|
+
ft,
|
|
1500
|
+
pt,
|
|
1501
|
+
mt,
|
|
1502
|
+
st
|
|
1501
1503
|
];
|
|
1502
|
-
function
|
|
1504
|
+
function $t(e) {
|
|
1503
1505
|
var o, t;
|
|
1504
1506
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1505
|
-
const n = [...
|
|
1506
|
-
let
|
|
1507
|
+
const n = [...Ft, ...(o = e._features) != null ? o : []];
|
|
1508
|
+
let i = {
|
|
1507
1509
|
_features: n
|
|
1508
1510
|
};
|
|
1509
|
-
const
|
|
1510
|
-
...
|
|
1511
|
-
...
|
|
1511
|
+
const r = i._features.reduce((d, s) => Object.assign(d, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(i)), {}), l = (d) => i.options.mergeOptions ? i.options.mergeOptions(r, d) : {
|
|
1512
|
+
...r,
|
|
1513
|
+
...d
|
|
1512
1514
|
};
|
|
1513
1515
|
let a = {
|
|
1514
1516
|
...{},
|
|
1515
1517
|
...(t = e.initialState) != null ? t : {}
|
|
1516
1518
|
};
|
|
1517
|
-
|
|
1519
|
+
i._features.forEach((d) => {
|
|
1518
1520
|
var s;
|
|
1519
|
-
a = (s =
|
|
1521
|
+
a = (s = d.getInitialState == null ? void 0 : d.getInitialState(a)) != null ? s : a;
|
|
1520
1522
|
});
|
|
1521
|
-
const
|
|
1523
|
+
const g = [];
|
|
1522
1524
|
let c = !1;
|
|
1523
1525
|
const m = {
|
|
1524
1526
|
_features: n,
|
|
1525
1527
|
options: {
|
|
1526
|
-
...
|
|
1528
|
+
...r,
|
|
1527
1529
|
...e
|
|
1528
1530
|
},
|
|
1529
1531
|
initialState: a,
|
|
1530
|
-
_queue: (
|
|
1531
|
-
|
|
1532
|
-
for (;
|
|
1533
|
-
|
|
1532
|
+
_queue: (d) => {
|
|
1533
|
+
g.push(d), c || (c = !0, Promise.resolve().then(() => {
|
|
1534
|
+
for (; g.length; )
|
|
1535
|
+
g.shift()();
|
|
1534
1536
|
c = !1;
|
|
1535
1537
|
}).catch((s) => setTimeout(() => {
|
|
1536
1538
|
throw s;
|
|
1537
1539
|
})));
|
|
1538
1540
|
},
|
|
1539
1541
|
reset: () => {
|
|
1540
|
-
|
|
1542
|
+
i.setState(i.initialState);
|
|
1541
1543
|
},
|
|
1542
|
-
setOptions: (
|
|
1543
|
-
const s =
|
|
1544
|
-
|
|
1544
|
+
setOptions: (d) => {
|
|
1545
|
+
const s = G(d, i.options);
|
|
1546
|
+
i.options = l(s);
|
|
1545
1547
|
},
|
|
1546
|
-
getState: () =>
|
|
1547
|
-
setState: (
|
|
1548
|
-
|
|
1548
|
+
getState: () => i.options.state,
|
|
1549
|
+
setState: (d) => {
|
|
1550
|
+
i.options.onStateChange == null || i.options.onStateChange(d);
|
|
1549
1551
|
},
|
|
1550
|
-
_getRowId: (
|
|
1552
|
+
_getRowId: (d, s, f) => {
|
|
1551
1553
|
var p;
|
|
1552
|
-
return (p =
|
|
1554
|
+
return (p = i.options.getRowId == null ? void 0 : i.options.getRowId(d, s, f)) != null ? p : `${f ? [f.id, s].join(".") : s}`;
|
|
1553
1555
|
},
|
|
1554
|
-
getCoreRowModel: () => (
|
|
1556
|
+
getCoreRowModel: () => (i._getCoreRowModel || (i._getCoreRowModel = i.options.getCoreRowModel(i)), i._getCoreRowModel()),
|
|
1555
1557
|
// The final calls start at the bottom of the model,
|
|
1556
1558
|
// expanded rows, which then work their way up
|
|
1557
|
-
getRowModel: () =>
|
|
1559
|
+
getRowModel: () => i.getPaginationRowModel(),
|
|
1558
1560
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1559
|
-
getRow: (
|
|
1560
|
-
let f = (s ?
|
|
1561
|
-
if (!f && (f =
|
|
1562
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
1561
|
+
getRow: (d, s) => {
|
|
1562
|
+
let f = (s ? i.getPrePaginationRowModel() : i.getRowModel()).rowsById[d];
|
|
1563
|
+
if (!f && (f = i.getCoreRowModel().rowsById[d], !f))
|
|
1564
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
1563
1565
|
return f;
|
|
1564
1566
|
},
|
|
1565
|
-
_getDefaultColumnDef: S(() => [
|
|
1567
|
+
_getDefaultColumnDef: S(() => [i.options.defaultColumn], (d) => {
|
|
1566
1568
|
var s;
|
|
1567
|
-
return
|
|
1569
|
+
return d = (s = d) != null ? s : {}, {
|
|
1568
1570
|
header: (f) => {
|
|
1569
1571
|
const p = f.header.column.columnDef;
|
|
1570
1572
|
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
|
@@ -1574,52 +1576,52 @@ function gt(e) {
|
|
|
1574
1576
|
var p, R;
|
|
1575
1577
|
return (p = (R = f.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
|
|
1576
1578
|
},
|
|
1577
|
-
...
|
|
1578
|
-
...
|
|
1579
|
+
...i._features.reduce((f, p) => Object.assign(f, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
|
|
1580
|
+
...d
|
|
1579
1581
|
};
|
|
1580
1582
|
}, C(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1581
|
-
_getColumnDefs: () =>
|
|
1582
|
-
getAllColumns: S(() => [
|
|
1583
|
+
_getColumnDefs: () => i.options.columns,
|
|
1584
|
+
getAllColumns: S(() => [i._getColumnDefs()], (d) => {
|
|
1583
1585
|
const s = function(f, p, R) {
|
|
1584
1586
|
return R === void 0 && (R = 0), f.map((w) => {
|
|
1585
|
-
const
|
|
1586
|
-
return
|
|
1587
|
+
const v = ke(i, w, R, p), h = w;
|
|
1588
|
+
return v.columns = h.columns ? s(h.columns, v, R + 1) : [], v;
|
|
1587
1589
|
});
|
|
1588
1590
|
};
|
|
1589
|
-
return s(
|
|
1591
|
+
return s(d);
|
|
1590
1592
|
}, C(e, "debugColumns", "getAllColumns")),
|
|
1591
|
-
getAllFlatColumns: S(() => [
|
|
1592
|
-
_getAllFlatColumnsById: S(() => [
|
|
1593
|
-
getAllLeafColumns: S(() => [
|
|
1594
|
-
let f =
|
|
1593
|
+
getAllFlatColumns: S(() => [i.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), C(e, "debugColumns", "getAllFlatColumns")),
|
|
1594
|
+
_getAllFlatColumnsById: S(() => [i.getAllFlatColumns()], (d) => d.reduce((s, f) => (s[f.id] = f, s), {}), C(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1595
|
+
getAllLeafColumns: S(() => [i.getAllColumns(), i._getOrderColumnsFn()], (d, s) => {
|
|
1596
|
+
let f = d.flatMap((p) => p.getLeafColumns());
|
|
1595
1597
|
return s(f);
|
|
1596
1598
|
}, C(e, "debugColumns", "getAllLeafColumns")),
|
|
1597
|
-
getColumn: (
|
|
1598
|
-
const s =
|
|
1599
|
-
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${
|
|
1599
|
+
getColumn: (d) => {
|
|
1600
|
+
const s = i._getAllFlatColumnsById()[d];
|
|
1601
|
+
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
|
|
1600
1602
|
}
|
|
1601
1603
|
};
|
|
1602
|
-
Object.assign(
|
|
1603
|
-
for (let
|
|
1604
|
-
const s =
|
|
1605
|
-
s == null || s.createTable == null || s.createTable(
|
|
1604
|
+
Object.assign(i, m);
|
|
1605
|
+
for (let d = 0; d < i._features.length; d++) {
|
|
1606
|
+
const s = i._features[d];
|
|
1607
|
+
s == null || s.createTable == null || s.createTable(i);
|
|
1606
1608
|
}
|
|
1607
|
-
return
|
|
1609
|
+
return i;
|
|
1608
1610
|
}
|
|
1609
|
-
function
|
|
1611
|
+
function Vt() {
|
|
1610
1612
|
return (e) => S(() => [e.options.data], (o) => {
|
|
1611
1613
|
const t = {
|
|
1612
1614
|
rows: [],
|
|
1613
1615
|
flatRows: [],
|
|
1614
1616
|
rowsById: {}
|
|
1615
|
-
}, n = function(
|
|
1616
|
-
|
|
1617
|
+
}, n = function(i, r, l) {
|
|
1618
|
+
r === void 0 && (r = 0);
|
|
1617
1619
|
const u = [];
|
|
1618
|
-
for (let
|
|
1619
|
-
const c =
|
|
1620
|
+
for (let g = 0; g < i.length; g++) {
|
|
1621
|
+
const c = de(e, e._getRowId(i[g], g, l), i[g], g, r, void 0, l?.id);
|
|
1620
1622
|
if (t.flatRows.push(c), t.rowsById[c.id] = c, u.push(c), e.options.getSubRows) {
|
|
1621
1623
|
var a;
|
|
1622
|
-
c.originalSubRows = e.options.getSubRows(
|
|
1624
|
+
c.originalSubRows = e.options.getSubRows(i[g], g), (a = c.originalSubRows) != null && a.length && (c.subRows = n(c.originalSubRows, r + 1, c));
|
|
1623
1625
|
}
|
|
1624
1626
|
}
|
|
1625
1627
|
return u;
|
|
@@ -1627,10 +1629,10 @@ function dt() {
|
|
|
1627
1629
|
return t.rows = n(o), t;
|
|
1628
1630
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1629
1631
|
}
|
|
1630
|
-
function
|
|
1632
|
+
function Mt(e) {
|
|
1631
1633
|
const o = [], t = (n) => {
|
|
1632
|
-
var
|
|
1633
|
-
o.push(n), (
|
|
1634
|
+
var i;
|
|
1635
|
+
o.push(n), (i = n.subRows) != null && i.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
1634
1636
|
};
|
|
1635
1637
|
return e.rows.forEach(t), {
|
|
1636
1638
|
rows: o,
|
|
@@ -1638,73 +1640,73 @@ function ct(e) {
|
|
|
1638
1640
|
rowsById: e.rowsById
|
|
1639
1641
|
};
|
|
1640
1642
|
}
|
|
1641
|
-
function
|
|
1642
|
-
return t.options.filterFromLeafRows ?
|
|
1643
|
+
function xt(e, o, t) {
|
|
1644
|
+
return t.options.filterFromLeafRows ? Pt(e, o, t) : It(e, o, t);
|
|
1643
1645
|
}
|
|
1644
|
-
function
|
|
1646
|
+
function Pt(e, o, t) {
|
|
1645
1647
|
var n;
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
+
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1649
|
+
g === void 0 && (g = 0);
|
|
1648
1650
|
const c = [];
|
|
1649
|
-
for (let
|
|
1651
|
+
for (let d = 0; d < a.length; d++) {
|
|
1650
1652
|
var m;
|
|
1651
|
-
let s = a[
|
|
1652
|
-
const f =
|
|
1653
|
-
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length &&
|
|
1654
|
-
if (f.subRows = u(s.subRows,
|
|
1655
|
-
c.push(s),
|
|
1653
|
+
let s = a[d];
|
|
1654
|
+
const f = de(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1655
|
+
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length && g < l) {
|
|
1656
|
+
if (f.subRows = u(s.subRows, g + 1), s = f, o(s) && !f.subRows.length) {
|
|
1657
|
+
c.push(s), r[s.id] = s, i.push(s);
|
|
1656
1658
|
continue;
|
|
1657
1659
|
}
|
|
1658
1660
|
if (o(s) || f.subRows.length) {
|
|
1659
|
-
c.push(s),
|
|
1661
|
+
c.push(s), r[s.id] = s, i.push(s);
|
|
1660
1662
|
continue;
|
|
1661
1663
|
}
|
|
1662
1664
|
} else
|
|
1663
|
-
s = f, o(s) && (c.push(s),
|
|
1665
|
+
s = f, o(s) && (c.push(s), r[s.id] = s, i.push(s));
|
|
1664
1666
|
}
|
|
1665
1667
|
return c;
|
|
1666
1668
|
};
|
|
1667
1669
|
return {
|
|
1668
1670
|
rows: u(e),
|
|
1669
|
-
flatRows:
|
|
1670
|
-
rowsById:
|
|
1671
|
+
flatRows: i,
|
|
1672
|
+
rowsById: r
|
|
1671
1673
|
};
|
|
1672
1674
|
}
|
|
1673
|
-
function
|
|
1675
|
+
function It(e, o, t) {
|
|
1674
1676
|
var n;
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1677
|
+
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1678
|
+
g === void 0 && (g = 0);
|
|
1677
1679
|
const c = [];
|
|
1678
|
-
for (let
|
|
1679
|
-
let s = a[
|
|
1680
|
+
for (let d = 0; d < a.length; d++) {
|
|
1681
|
+
let s = a[d];
|
|
1680
1682
|
if (o(s)) {
|
|
1681
1683
|
var m;
|
|
1682
|
-
if ((m = s.subRows) != null && m.length &&
|
|
1683
|
-
const p =
|
|
1684
|
-
p.subRows = u(s.subRows,
|
|
1684
|
+
if ((m = s.subRows) != null && m.length && g < l) {
|
|
1685
|
+
const p = de(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1686
|
+
p.subRows = u(s.subRows, g + 1), s = p;
|
|
1685
1687
|
}
|
|
1686
|
-
c.push(s),
|
|
1688
|
+
c.push(s), i.push(s), r[s.id] = s;
|
|
1687
1689
|
}
|
|
1688
1690
|
}
|
|
1689
1691
|
return c;
|
|
1690
1692
|
};
|
|
1691
1693
|
return {
|
|
1692
1694
|
rows: u(e),
|
|
1693
|
-
flatRows:
|
|
1694
|
-
rowsById:
|
|
1695
|
+
flatRows: i,
|
|
1696
|
+
rowsById: r
|
|
1695
1697
|
};
|
|
1696
1698
|
}
|
|
1697
|
-
function
|
|
1699
|
+
function yt() {
|
|
1698
1700
|
return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
1699
1701
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
1700
|
-
for (let
|
|
1701
|
-
o.flatRows[
|
|
1702
|
+
for (let d = 0; d < o.flatRows.length; d++)
|
|
1703
|
+
o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
|
|
1702
1704
|
return o;
|
|
1703
1705
|
}
|
|
1704
|
-
const
|
|
1705
|
-
(t ?? []).forEach((
|
|
1706
|
+
const i = [], r = [];
|
|
1707
|
+
(t ?? []).forEach((d) => {
|
|
1706
1708
|
var s;
|
|
1707
|
-
const f = e.getColumn(
|
|
1709
|
+
const f = e.getColumn(d.id);
|
|
1708
1710
|
if (!f)
|
|
1709
1711
|
return;
|
|
1710
1712
|
const p = f.getFilterFn();
|
|
@@ -1712,35 +1714,35 @@ function St() {
|
|
|
1712
1714
|
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${f.id}.`);
|
|
1713
1715
|
return;
|
|
1714
1716
|
}
|
|
1715
|
-
|
|
1716
|
-
id:
|
|
1717
|
+
i.push({
|
|
1718
|
+
id: d.id,
|
|
1717
1719
|
filterFn: p,
|
|
1718
|
-
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(
|
|
1720
|
+
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(d.value)) != null ? s : d.value
|
|
1719
1721
|
});
|
|
1720
1722
|
});
|
|
1721
|
-
const l = (t ?? []).map((
|
|
1722
|
-
n && u && a.length && (l.push("__global__"), a.forEach((
|
|
1723
|
+
const l = (t ?? []).map((d) => d.id), u = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
|
|
1724
|
+
n && u && a.length && (l.push("__global__"), a.forEach((d) => {
|
|
1723
1725
|
var s;
|
|
1724
|
-
|
|
1725
|
-
id:
|
|
1726
|
+
r.push({
|
|
1727
|
+
id: d.id,
|
|
1726
1728
|
filterFn: u,
|
|
1727
1729
|
resolvedValue: (s = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? s : n
|
|
1728
1730
|
});
|
|
1729
1731
|
}));
|
|
1730
|
-
let
|
|
1731
|
-
for (let
|
|
1732
|
-
const s = o.flatRows[
|
|
1733
|
-
if (s.columnFilters = {},
|
|
1734
|
-
for (let f = 0; f <
|
|
1735
|
-
|
|
1736
|
-
const p =
|
|
1737
|
-
s.columnFilters[p] =
|
|
1732
|
+
let g, c;
|
|
1733
|
+
for (let d = 0; d < o.flatRows.length; d++) {
|
|
1734
|
+
const s = o.flatRows[d];
|
|
1735
|
+
if (s.columnFilters = {}, i.length)
|
|
1736
|
+
for (let f = 0; f < i.length; f++) {
|
|
1737
|
+
g = i[f];
|
|
1738
|
+
const p = g.id;
|
|
1739
|
+
s.columnFilters[p] = g.filterFn(s, p, g.resolvedValue, (R) => {
|
|
1738
1740
|
s.columnFiltersMeta[p] = R;
|
|
1739
1741
|
});
|
|
1740
1742
|
}
|
|
1741
|
-
if (
|
|
1742
|
-
for (let f = 0; f <
|
|
1743
|
-
c =
|
|
1743
|
+
if (r.length) {
|
|
1744
|
+
for (let f = 0; f < r.length; f++) {
|
|
1745
|
+
c = r[f];
|
|
1744
1746
|
const p = c.id;
|
|
1745
1747
|
if (c.filterFn(s, p, c.resolvedValue, (R) => {
|
|
1746
1748
|
s.columnFiltersMeta[p] = R;
|
|
@@ -1752,111 +1754,111 @@ function St() {
|
|
|
1752
1754
|
s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
|
|
1753
1755
|
}
|
|
1754
1756
|
}
|
|
1755
|
-
const m = (
|
|
1757
|
+
const m = (d) => {
|
|
1756
1758
|
for (let s = 0; s < l.length; s++)
|
|
1757
|
-
if (
|
|
1759
|
+
if (d.columnFilters[l[s]] === !1)
|
|
1758
1760
|
return !1;
|
|
1759
1761
|
return !0;
|
|
1760
1762
|
};
|
|
1761
|
-
return
|
|
1763
|
+
return xt(o.rows, m, e);
|
|
1762
1764
|
}, C(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
1763
1765
|
}
|
|
1764
|
-
function
|
|
1766
|
+
function Et(e) {
|
|
1765
1767
|
return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
1766
1768
|
if (!n.rows.length)
|
|
1767
1769
|
return n;
|
|
1768
1770
|
const {
|
|
1769
|
-
pageSize:
|
|
1770
|
-
pageIndex:
|
|
1771
|
+
pageSize: i,
|
|
1772
|
+
pageIndex: r
|
|
1771
1773
|
} = t;
|
|
1772
1774
|
let {
|
|
1773
1775
|
rows: l,
|
|
1774
1776
|
flatRows: u,
|
|
1775
1777
|
rowsById: a
|
|
1776
1778
|
} = n;
|
|
1777
|
-
const
|
|
1778
|
-
l = l.slice(
|
|
1779
|
+
const g = i * r, c = g + i;
|
|
1780
|
+
l = l.slice(g, c);
|
|
1779
1781
|
let m;
|
|
1780
1782
|
o.options.paginateExpandedRows ? m = {
|
|
1781
1783
|
rows: l,
|
|
1782
1784
|
flatRows: u,
|
|
1783
1785
|
rowsById: a
|
|
1784
|
-
} : m =
|
|
1786
|
+
} : m = Mt({
|
|
1785
1787
|
rows: l,
|
|
1786
1788
|
flatRows: u,
|
|
1787
1789
|
rowsById: a
|
|
1788
1790
|
}), m.flatRows = [];
|
|
1789
|
-
const
|
|
1790
|
-
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(
|
|
1791
|
+
const d = (s) => {
|
|
1792
|
+
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
|
|
1791
1793
|
};
|
|
1792
|
-
return m.rows.forEach(
|
|
1794
|
+
return m.rows.forEach(d), m;
|
|
1793
1795
|
}, C(o.options, "debugTable", "getPaginationRowModel"));
|
|
1794
1796
|
}
|
|
1795
|
-
function
|
|
1797
|
+
function Dt() {
|
|
1796
1798
|
return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
1797
1799
|
if (!t.rows.length || !(o != null && o.length))
|
|
1798
1800
|
return t;
|
|
1799
|
-
const n = e.getState().sorting,
|
|
1800
|
-
var
|
|
1801
|
-
return (
|
|
1801
|
+
const n = e.getState().sorting, i = [], r = n.filter((a) => {
|
|
1802
|
+
var g;
|
|
1803
|
+
return (g = e.getColumn(a.id)) == null ? void 0 : g.getCanSort();
|
|
1802
1804
|
}), l = {};
|
|
1803
|
-
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
sortUndefined:
|
|
1807
|
-
invertSorting:
|
|
1808
|
-
sortingFn:
|
|
1805
|
+
r.forEach((a) => {
|
|
1806
|
+
const g = e.getColumn(a.id);
|
|
1807
|
+
g && (l[a.id] = {
|
|
1808
|
+
sortUndefined: g.columnDef.sortUndefined,
|
|
1809
|
+
invertSorting: g.columnDef.invertSorting,
|
|
1810
|
+
sortingFn: g.getSortingFn()
|
|
1809
1811
|
});
|
|
1810
1812
|
});
|
|
1811
1813
|
const u = (a) => {
|
|
1812
|
-
const
|
|
1814
|
+
const g = a.map((c) => ({
|
|
1813
1815
|
...c
|
|
1814
1816
|
}));
|
|
1815
|
-
return
|
|
1816
|
-
for (let s = 0; s <
|
|
1817
|
-
var
|
|
1818
|
-
const f =
|
|
1819
|
-
let
|
|
1817
|
+
return g.sort((c, m) => {
|
|
1818
|
+
for (let s = 0; s < r.length; s += 1) {
|
|
1819
|
+
var d;
|
|
1820
|
+
const f = r[s], p = l[f.id], R = p.sortUndefined, w = (d = f?.desc) != null ? d : !1;
|
|
1821
|
+
let v = 0;
|
|
1820
1822
|
if (R) {
|
|
1821
|
-
const
|
|
1822
|
-
if (
|
|
1823
|
-
if (R === "first") return
|
|
1824
|
-
if (R === "last") return
|
|
1825
|
-
|
|
1823
|
+
const h = c.getValue(f.id), I = m.getValue(f.id), $ = h === void 0, H = I === void 0;
|
|
1824
|
+
if ($ || H) {
|
|
1825
|
+
if (R === "first") return $ ? -1 : 1;
|
|
1826
|
+
if (R === "last") return $ ? 1 : -1;
|
|
1827
|
+
v = $ && H ? 0 : $ ? R : -R;
|
|
1826
1828
|
}
|
|
1827
1829
|
}
|
|
1828
|
-
if (
|
|
1829
|
-
return w && (
|
|
1830
|
+
if (v === 0 && (v = p.sortingFn(c, m, f.id)), v !== 0)
|
|
1831
|
+
return w && (v *= -1), p.invertSorting && (v *= -1), v;
|
|
1830
1832
|
}
|
|
1831
1833
|
return c.index - m.index;
|
|
1832
|
-
}),
|
|
1834
|
+
}), g.forEach((c) => {
|
|
1833
1835
|
var m;
|
|
1834
|
-
|
|
1835
|
-
}),
|
|
1836
|
+
i.push(c), (m = c.subRows) != null && m.length && (c.subRows = u(c.subRows));
|
|
1837
|
+
}), g;
|
|
1836
1838
|
};
|
|
1837
1839
|
return {
|
|
1838
1840
|
rows: u(t.rows),
|
|
1839
|
-
flatRows:
|
|
1841
|
+
flatRows: i,
|
|
1840
1842
|
rowsById: t.rowsById
|
|
1841
1843
|
};
|
|
1842
1844
|
}, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1843
1845
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return e ?
|
|
1846
|
+
function Re(e, o) {
|
|
1847
|
+
return e ? Ht(e) ? /* @__PURE__ */ A.createElement(e, o) : e : null;
|
|
1846
1848
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return
|
|
1849
|
+
function Ht(e) {
|
|
1850
|
+
return Gt(e) || typeof e == "function" || Lt(e);
|
|
1849
1851
|
}
|
|
1850
|
-
function
|
|
1852
|
+
function Gt(e) {
|
|
1851
1853
|
return typeof e == "function" && (() => {
|
|
1852
1854
|
const o = Object.getPrototypeOf(e);
|
|
1853
1855
|
return o.prototype && o.prototype.isReactComponent;
|
|
1854
1856
|
})();
|
|
1855
1857
|
}
|
|
1856
|
-
function
|
|
1858
|
+
function Lt(e) {
|
|
1857
1859
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
1858
1860
|
}
|
|
1859
|
-
function
|
|
1861
|
+
function At(e) {
|
|
1860
1862
|
const o = {
|
|
1861
1863
|
state: {},
|
|
1862
1864
|
// Dummy state
|
|
@@ -1865,11 +1867,11 @@ function _t(e) {
|
|
|
1865
1867
|
// noop
|
|
1866
1868
|
renderFallbackValue: null,
|
|
1867
1869
|
...e
|
|
1868
|
-
}, [t] =
|
|
1869
|
-
current:
|
|
1870
|
-
})), [n,
|
|
1871
|
-
return t.current.setOptions((
|
|
1872
|
-
...
|
|
1870
|
+
}, [t] = A.useState(() => ({
|
|
1871
|
+
current: $t(o)
|
|
1872
|
+
})), [n, i] = A.useState(() => t.current.initialState);
|
|
1873
|
+
return t.current.setOptions((r) => ({
|
|
1874
|
+
...r,
|
|
1873
1875
|
...e,
|
|
1874
1876
|
state: {
|
|
1875
1877
|
...n,
|
|
@@ -1878,88 +1880,203 @@ function _t(e) {
|
|
|
1878
1880
|
// Similarly, we'll maintain both our internal state and any user-provided
|
|
1879
1881
|
// state.
|
|
1880
1882
|
onStateChange: (l) => {
|
|
1881
|
-
|
|
1883
|
+
i(l), e.onStateChange == null || e.onStateChange(l);
|
|
1882
1884
|
}
|
|
1883
1885
|
})), t.current;
|
|
1884
1886
|
}
|
|
1885
|
-
function
|
|
1887
|
+
function we(e) {
|
|
1888
|
+
return e.meta;
|
|
1889
|
+
}
|
|
1890
|
+
function zt(e, o) {
|
|
1891
|
+
if (o?.editKey)
|
|
1892
|
+
return o.editKey;
|
|
1893
|
+
if ("accessorKey" in e && typeof e.accessorKey == "string")
|
|
1894
|
+
return e.accessorKey;
|
|
1895
|
+
}
|
|
1896
|
+
function Ot(e, o, t) {
|
|
1897
|
+
const n = t?.getEditValue?.(e) ?? e[o];
|
|
1898
|
+
return typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
1899
|
+
}
|
|
1900
|
+
function Bt() {
|
|
1901
|
+
const e = window.getSelection();
|
|
1902
|
+
return !!e && !e.isCollapsed && e.toString().trim().length > 0;
|
|
1903
|
+
}
|
|
1904
|
+
function Ut({
|
|
1886
1905
|
columns: e,
|
|
1887
1906
|
data: o,
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1907
|
+
emptyState: t,
|
|
1908
|
+
sorting: n,
|
|
1909
|
+
columnFilters: i,
|
|
1910
|
+
columnVisibility: r,
|
|
1911
|
+
onColumnVisibilityChange: l,
|
|
1912
|
+
rowSelection: u,
|
|
1913
|
+
onRowSelectionChange: a,
|
|
1914
|
+
getRowId: g,
|
|
1915
|
+
pagination: c,
|
|
1916
|
+
globalFilter: m,
|
|
1917
|
+
setGlobalFilter: d,
|
|
1918
|
+
onSortingChange: s,
|
|
1919
|
+
onColumnFiltersChange: f,
|
|
1920
|
+
onPaginationChange: p,
|
|
1921
|
+
rowClickable: R = !1,
|
|
1922
|
+
onRowClick: w,
|
|
1923
|
+
onTableChange: v,
|
|
1924
|
+
editableRowId: h,
|
|
1925
|
+
editingValues: I,
|
|
1926
|
+
onEditingValuesChange: $,
|
|
1927
|
+
autoResetPageIndex: H,
|
|
1928
|
+
className: V
|
|
1899
1929
|
}) {
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1930
|
+
const B = R && !!w, U = l !== void 0, N = a !== void 0, K = A.useMemo(
|
|
1931
|
+
() => ({
|
|
1932
|
+
sorting: n,
|
|
1933
|
+
columnFilters: i,
|
|
1934
|
+
...c && { pagination: c },
|
|
1935
|
+
globalFilter: m,
|
|
1936
|
+
...U && { columnVisibility: r ?? {} },
|
|
1937
|
+
...N && { rowSelection: u ?? {} }
|
|
1938
|
+
}),
|
|
1939
|
+
[
|
|
1940
|
+
n,
|
|
1941
|
+
i,
|
|
1942
|
+
c,
|
|
1943
|
+
m,
|
|
1944
|
+
U,
|
|
1945
|
+
r,
|
|
1946
|
+
N,
|
|
1947
|
+
u
|
|
1948
|
+
]
|
|
1949
|
+
), Y = A.useCallback(
|
|
1950
|
+
(_, M) => {
|
|
1951
|
+
$?.((F) => ({
|
|
1952
|
+
...F,
|
|
1953
|
+
[_]: M
|
|
1954
|
+
}));
|
|
1955
|
+
},
|
|
1956
|
+
[$]
|
|
1957
|
+
), z = At({
|
|
1906
1958
|
data: o,
|
|
1907
1959
|
columns: e,
|
|
1908
|
-
state:
|
|
1909
|
-
onSortingChange:
|
|
1910
|
-
onColumnFiltersChange:
|
|
1911
|
-
onPaginationChange:
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1960
|
+
state: K,
|
|
1961
|
+
onSortingChange: s,
|
|
1962
|
+
onColumnFiltersChange: f,
|
|
1963
|
+
onPaginationChange: p,
|
|
1964
|
+
onColumnVisibilityChange: l,
|
|
1965
|
+
onRowSelectionChange: a,
|
|
1966
|
+
getRowId: g,
|
|
1967
|
+
enableRowSelection: N,
|
|
1968
|
+
getCoreRowModel: Vt(),
|
|
1969
|
+
getPaginationRowModel: Et(),
|
|
1970
|
+
getSortedRowModel: Dt(),
|
|
1971
|
+
getFilteredRowModel: yt(),
|
|
1972
|
+
onGlobalFilterChange: d,
|
|
1973
|
+
globalFilterFn: "includesString",
|
|
1974
|
+
autoResetPageIndex: H
|
|
1918
1975
|
});
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1976
|
+
A.useLayoutEffect(() => {
|
|
1977
|
+
v?.(z);
|
|
1978
|
+
}, [v, z]);
|
|
1979
|
+
const Ie = A.useCallback(
|
|
1980
|
+
(_, M, F) => _.editComponent === "textarea" ? /* @__PURE__ */ y(
|
|
1981
|
+
Be,
|
|
1922
1982
|
{
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1983
|
+
value: F,
|
|
1984
|
+
placeholder: _.editPlaceholder,
|
|
1985
|
+
className: _.editClassName,
|
|
1986
|
+
onChange: (T) => Y(M, T.target.value)
|
|
1987
|
+
}
|
|
1988
|
+
) : /* @__PURE__ */ y(
|
|
1989
|
+
Oe,
|
|
1990
|
+
{
|
|
1991
|
+
value: F,
|
|
1992
|
+
placeholder: _.editPlaceholder,
|
|
1993
|
+
className: _.editClassName,
|
|
1994
|
+
onChange: (T) => Y(M, T.target.value)
|
|
1995
|
+
}
|
|
1996
|
+
),
|
|
1997
|
+
[Y]
|
|
1998
|
+
);
|
|
1999
|
+
return /* @__PURE__ */ y("div", { className: V?.className, children: /* @__PURE__ */ He(Ge, { className: V?.tableClassName, children: [
|
|
2000
|
+
/* @__PURE__ */ y(Le, { className: V?.headerClassName, children: z.getHeaderGroups().map((_) => /* @__PURE__ */ y(
|
|
2001
|
+
Z,
|
|
2002
|
+
{
|
|
2003
|
+
className: O(V?.rowClassName, V?.headRowClassName),
|
|
2004
|
+
children: _.headers.map((M) => {
|
|
2005
|
+
const F = we(M.column.columnDef);
|
|
2006
|
+
return /* @__PURE__ */ y(
|
|
2007
|
+
Ae,
|
|
2008
|
+
{
|
|
2009
|
+
className: O(
|
|
2010
|
+
F?.className,
|
|
2011
|
+
F?.headClassName,
|
|
2012
|
+
V?.headCellClassName
|
|
2013
|
+
),
|
|
2014
|
+
style: {
|
|
2015
|
+
...F?.style,
|
|
2016
|
+
...F?.headStyle
|
|
2017
|
+
},
|
|
2018
|
+
children: M.isPlaceholder ? null : Re(M.column.columnDef.header, M.getContext())
|
|
2019
|
+
},
|
|
2020
|
+
M.id
|
|
2021
|
+
);
|
|
2022
|
+
})
|
|
1932
2023
|
},
|
|
1933
|
-
|
|
2024
|
+
_.id
|
|
1934
2025
|
)) }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
2026
|
+
/* @__PURE__ */ y(ze, { children: z.getRowModel().rows.length ? z.getRowModel().rows.map((_) => /* @__PURE__ */ y(
|
|
2027
|
+
Z,
|
|
1937
2028
|
{
|
|
1938
|
-
className:
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2029
|
+
className: O(
|
|
2030
|
+
V?.rowClassName,
|
|
2031
|
+
V?.bodyRowClassName,
|
|
2032
|
+
h === _.id && V?.editingRowClassName
|
|
2033
|
+
),
|
|
2034
|
+
"data-state": _.getIsSelected() && "selected",
|
|
2035
|
+
clickable: B && h !== _.id,
|
|
2036
|
+
onClick: B && h !== _.id ? () => {
|
|
2037
|
+
Bt() || w?.(_.original);
|
|
2038
|
+
} : void 0,
|
|
2039
|
+
children: _.getVisibleCells().map((M) => {
|
|
2040
|
+
const F = we(M.column.columnDef), T = h === _.id, q = zt(
|
|
2041
|
+
M.column.columnDef,
|
|
2042
|
+
F
|
|
2043
|
+
), ye = T && F?.editable === !0 && q !== void 0 && $ !== void 0, Ee = q !== void 0 ? I?.[q] ?? Ot(_.original, q, F) : "", De = ye ? Ie(F, q, Ee) : null;
|
|
2044
|
+
return /* @__PURE__ */ y(
|
|
2045
|
+
me,
|
|
2046
|
+
{
|
|
2047
|
+
className: O(
|
|
2048
|
+
F?.className,
|
|
2049
|
+
F?.cellClassName,
|
|
2050
|
+
V?.cellClassName
|
|
2051
|
+
),
|
|
2052
|
+
style: {
|
|
2053
|
+
...F?.style,
|
|
2054
|
+
...F?.cellStyle
|
|
2055
|
+
},
|
|
2056
|
+
children: De ?? Re(M.column.columnDef.cell, M.getContext())
|
|
2057
|
+
},
|
|
2058
|
+
M.id
|
|
2059
|
+
);
|
|
2060
|
+
})
|
|
1950
2061
|
},
|
|
1951
|
-
|
|
1952
|
-
)) : /* @__PURE__ */
|
|
1953
|
-
|
|
2062
|
+
_.id
|
|
2063
|
+
)) : /* @__PURE__ */ y(
|
|
2064
|
+
Z,
|
|
1954
2065
|
{
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2066
|
+
className: O(V?.rowClassName, V?.emptyRowClassName),
|
|
2067
|
+
children: /* @__PURE__ */ y(
|
|
2068
|
+
me,
|
|
2069
|
+
{
|
|
2070
|
+
colSpan: Math.max(1, z.getVisibleLeafColumns().length),
|
|
2071
|
+
className: O(V?.cellClassName, V?.emptyCellClassName),
|
|
2072
|
+
children: t ?? "No results."
|
|
2073
|
+
}
|
|
2074
|
+
)
|
|
1958
2075
|
}
|
|
1959
|
-
) })
|
|
2076
|
+
) })
|
|
1960
2077
|
] }) });
|
|
1961
2078
|
}
|
|
1962
2079
|
export {
|
|
1963
|
-
|
|
2080
|
+
Ut as BasicTable
|
|
1964
2081
|
};
|
|
1965
2082
|
//# sourceMappingURL=components-basic-table-basic-table.js.map
|