@konstructio/ui 0.1.2-alpha.119 → 0.1.2-alpha.120
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/Breadcrumb-DDRmDlWK.js +93 -0
- package/dist/{Checkbox-DRdyrKjk.js → Checkbox-DrounE52.js} +2 -2
- package/dist/{CollapsedSteps-CR7oCTRC.js → CollapsedSteps-DvBeYShi.js} +3 -3
- package/dist/{CommandInput-Du2o616y.js → CommandInput-_vujzQ6B.js} +2 -2
- package/dist/{Counter-DMkXIsOO.js → Counter-LQ5_uh06.js} +2 -2
- package/dist/{DayPicker-BtpJg2q3.js → DayPicker-D7KFB2bI.js} +383 -383
- package/dist/DropdownButton-BWfWN4fg.js +121 -0
- package/dist/{HamburgerTrigger-BgeS_nBA.js → HamburgerTrigger-CfrAnhmG.js} +10 -10
- package/dist/{Input-2M2I_H60.js → Input-O2bqyJKW.js} +2 -2
- package/dist/Modal-B-l4ii6w.js +84 -0
- package/dist/{Wrapper-JmStmade.js → Wrapper-B5PmrW4J.js} +3 -3
- package/dist/{Wrapper-ThpRi_Gg.js → Wrapper-CZCSSCLm.js} +2 -2
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
- package/dist/components/Breadcrumb/components/index.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxCard/CheckboxCard.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +7 -5
- package/dist/components/CopyButton/CopyButton.variants.js +3 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/components/DatePickerContent/DatePickerContent.js +1 -1
- package/dist/components/Drawer/Drawer.js +78 -58
- package/dist/components/Drawer/Drawer.variants.js +40 -22
- package/dist/components/Drawer/components/Footer/Footer.js +5 -5
- package/dist/components/Drawer/constants/index.js +5 -4
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/DropdownButton/components/ActionSheet/ActionSheet.js +34 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/utils/index.js +2 -2
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -0
- package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +12 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +1 -1
- package/dist/components/Select/Select.variants.js +2 -0
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Sheet/Sheet.js +130 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +103 -86
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +13 -13
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.variants.js +1 -0
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +7 -7
- package/dist/components/VirtualizedTable/components/Body/Body.js +47 -44
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +68 -68
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +38 -31
- package/dist/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.js +75 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +42 -35
- package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +72 -72
- package/dist/components/VirtualizedTable/components/index.js +14 -12
- package/dist/components/VirtualizedTable/constants/index.js +5 -3
- package/dist/components/VirtualizedTable/constants/responsive.js +10 -0
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +4 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/utils/index.js +8 -4
- package/dist/components/VirtualizedTable/utils/pinned-columns/index.js +6 -0
- package/dist/components/VirtualizedTable/utils/pinned-columns/pinned-columns.js +32 -0
- package/dist/components/index.js +147 -145
- package/dist/{components-B_SWqhCL.js → components-Bq71eyUH.js} +1 -1
- package/dist/{country-locale-map-DbrJ3bEE.js → country-locale-map-BQYYErun.js} +1407 -1407
- package/dist/{debounce-dMRJxNsT.js → debounce-DhCY9mXz.js} +2 -2
- package/dist/{dist-Dg3vyTx9.js → dist-BCqfbYE9.js} +1356 -1317
- package/dist/dist-CMqY_9n-.js +445 -0
- package/dist/{es2015-B_07N-UL.js → es2015-BvX7Yq5Q.js} +2 -2
- package/dist/index.js +158 -156
- package/dist/{isSymbol-BG9higgO.js → isSymbol-CcfkyZfq.js} +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +10 -0
- package/dist/lib/components/Drawer/Drawer.variants.d.ts +1 -0
- package/dist/lib/components/Drawer/constants/index.d.ts +1 -0
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +2 -1
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +25 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.d.ts +7 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.types.d.ts +12 -0
- package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -0
- package/dist/lib/components/Sheet/Sheet.d.ts +21 -0
- package/dist/lib/components/Sheet/Sheet.types.d.ts +39 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +11 -2
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.types.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +4 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +2 -1
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/pinned-columns.d.ts +23 -0
- package/dist/lib/components/index.d.ts +3 -1
- package/dist/{libphonenumber-DtibHRPP.js → libphonenumber-BIeQOhzl.js} +196 -164
- package/dist/package.json +18 -18
- package/dist/{phone-number.provider-DnuL-yYF.js → phone-number.provider-CJeivoDY.js} +2 -2
- package/dist/{prop-types-BCUW56rg.js → prop-types-qsAjMBb1.js} +1 -1
- package/dist/{rolldown-runtime-Dw9YIBcH.js → rolldown-runtime-B28h4lGi.js} +6 -6
- package/dist/styles.css +1 -1
- package/dist/{table.provider-CzfMGbe4.js → table.provider-QUo2buYX.js} +561 -523
- package/dist/{x-Vur_9PXW.js → x-BmNOD9Gr.js} +2 -2
- package/package.json +18 -18
- package/dist/Breadcrumb-CpXRb08J.js +0 -93
- package/dist/DropdownButton-JilCRLJY.js +0 -92
- package/dist/Modal-0Wp5szX4.js +0 -84
- package/dist/dist-BCoDIdCt.js +0 -429
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
1
|
+
import { t as Qt } from "./dist-C_jtUTU9.js";
|
|
2
|
+
import { t as te } from "./utils-DnIJruo0.js";
|
|
3
|
+
import { t as Yt } from "./chevron-right-D4OkgIIT.js";
|
|
4
4
|
import "./components/VirtualizedTable/constants/pagination.js";
|
|
5
|
-
import { TableContext as
|
|
6
|
-
import { t as
|
|
7
|
-
import { getTableId as
|
|
8
|
-
import * as
|
|
9
|
-
import { useCallback as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useQuery as
|
|
12
|
-
function
|
|
5
|
+
import { TableContext as Zt } from "./components/VirtualizedTable/contexts/table.context.js";
|
|
6
|
+
import { t as Ce } from "./events.types-BG1Uh8i6.js";
|
|
7
|
+
import { getTableId as Ee } from "./components/VirtualizedTable/utils/get-table-id.js";
|
|
8
|
+
import * as Te from "react";
|
|
9
|
+
import { useCallback as L, useEffect as q, useLayoutEffect as Jt, useMemo as W, useRef as N, useState as x } from "react";
|
|
10
|
+
import { jsx as ve } from "react/jsx-runtime";
|
|
11
|
+
import { useQuery as bt } from "@tanstack/react-query";
|
|
12
|
+
function j(e, o) {
|
|
13
13
|
return typeof e == "function" ? e(o) : e;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function E(e, o) {
|
|
16
16
|
return (t) => {
|
|
17
17
|
o.setState((n) => ({
|
|
18
18
|
...n,
|
|
19
|
-
[e]:
|
|
19
|
+
[e]: j(t, n[e])
|
|
20
20
|
}));
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function _e(e) {
|
|
24
24
|
return e instanceof Function;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function en(e) {
|
|
27
27
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function tn(e, o) {
|
|
30
30
|
const t = [], n = (r) => {
|
|
31
31
|
r.forEach((i) => {
|
|
32
32
|
t.push(i);
|
|
@@ -36,7 +36,7 @@ function kt(e, o) {
|
|
|
36
36
|
};
|
|
37
37
|
return n(e), t;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function C(e, o, t) {
|
|
40
40
|
let n = [], r;
|
|
41
41
|
return (i) => {
|
|
42
42
|
let l;
|
|
@@ -46,8 +46,8 @@ function m(e, o, t) {
|
|
|
46
46
|
n = s;
|
|
47
47
|
let u;
|
|
48
48
|
if (t.key && t.debug && (u = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
49
|
-
const a = Math.round((Date.now() - l) * 100) / 100, d = Math.round((Date.now() - u) * 100) / 100, g = d / 16, f = (c,
|
|
50
|
-
for (c = String(c); c.length <
|
|
49
|
+
const a = Math.round((Date.now() - l) * 100) / 100, d = Math.round((Date.now() - u) * 100) / 100, g = d / 16, f = (c, S) => {
|
|
50
|
+
for (c = String(c); c.length < S; ) c = " " + c;
|
|
51
51
|
return c;
|
|
52
52
|
};
|
|
53
53
|
console.info(`%c⏱ ${f(d, 5)} /${f(a, 5)} ms`, `
|
|
@@ -58,7 +58,7 @@ function m(e, o, t) {
|
|
|
58
58
|
return r;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function v(e, o, t, n) {
|
|
62
62
|
return {
|
|
63
63
|
debug: () => {
|
|
64
64
|
var r;
|
|
@@ -68,7 +68,7 @@ function C(e, o, t, n) {
|
|
|
68
68
|
onChange: n
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function nn(e, o, t, n) {
|
|
72
72
|
const r = () => {
|
|
73
73
|
var l;
|
|
74
74
|
return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
@@ -78,7 +78,7 @@ function Ut(e, o, t, n) {
|
|
|
78
78
|
column: t,
|
|
79
79
|
getValue: () => o.getValue(n),
|
|
80
80
|
renderValue: r,
|
|
81
|
-
getContext:
|
|
81
|
+
getContext: C(() => [
|
|
82
82
|
e,
|
|
83
83
|
t,
|
|
84
84
|
o,
|
|
@@ -90,13 +90,13 @@ function Ut(e, o, t, n) {
|
|
|
90
90
|
cell: a,
|
|
91
91
|
getValue: a.getValue,
|
|
92
92
|
renderValue: a.renderValue
|
|
93
|
-
}),
|
|
93
|
+
}), v(e.options, "debugCells", "cell.getContext"))
|
|
94
94
|
};
|
|
95
95
|
return e._features.forEach((l) => {
|
|
96
96
|
l.createCell == null || l.createCell(i, t, o, e);
|
|
97
97
|
}, {}), i;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function on(e, o, t, n) {
|
|
100
100
|
var r, i;
|
|
101
101
|
const l = {
|
|
102
102
|
...e._getDefaultColumnDef(),
|
|
@@ -105,9 +105,9 @@ function Kt(e, o, t, n) {
|
|
|
105
105
|
let u = (r = (i = l.id) != null ? i : s ? typeof String.prototype.replaceAll == "function" ? s.replaceAll(".", "_") : s.replace(/\./g, "_") : void 0) != null ? r : typeof l.header == "string" ? l.header : void 0, a;
|
|
106
106
|
if (l.accessorFn ? a = l.accessorFn : s && (s.includes(".") ? a = (g) => {
|
|
107
107
|
let f = g;
|
|
108
|
-
for (const
|
|
108
|
+
for (const S of s.split(".")) {
|
|
109
109
|
var c;
|
|
110
|
-
f = (c = f) == null ? void 0 : c[
|
|
110
|
+
f = (c = f) == null ? void 0 : c[S], process.env.NODE_ENV !== "production" && f === void 0 && console.warn(`"${S}" in deeply nested key "${s}" returned undefined.`);
|
|
111
111
|
}
|
|
112
112
|
return f;
|
|
113
113
|
} : a = (g) => g[l.accessorKey]), !u)
|
|
@@ -119,20 +119,20 @@ function Kt(e, o, t, n) {
|
|
|
119
119
|
depth: t,
|
|
120
120
|
columnDef: l,
|
|
121
121
|
columns: [],
|
|
122
|
-
getFlatColumns:
|
|
122
|
+
getFlatColumns: C(() => [!0], () => {
|
|
123
123
|
var g;
|
|
124
124
|
return [d, ...(g = d.columns) == null ? void 0 : g.flatMap((f) => f.getFlatColumns())];
|
|
125
|
-
},
|
|
126
|
-
getLeafColumns:
|
|
125
|
+
}, v(e.options, "debugColumns", "column.getFlatColumns")),
|
|
126
|
+
getLeafColumns: C(() => [e._getOrderColumnsFn()], (g) => {
|
|
127
127
|
var f;
|
|
128
128
|
return (f = d.columns) != null && f.length ? g(d.columns.flatMap((c) => c.getLeafColumns())) : [d];
|
|
129
|
-
},
|
|
129
|
+
}, v(e.options, "debugColumns", "column.getLeafColumns"))
|
|
130
130
|
};
|
|
131
131
|
for (const g of e._features) g.createColumn == null || g.createColumn(d, e);
|
|
132
132
|
return d;
|
|
133
133
|
}
|
|
134
|
-
var
|
|
135
|
-
function
|
|
134
|
+
var P = "debugHeaders";
|
|
135
|
+
function lt(e, o, t) {
|
|
136
136
|
var n;
|
|
137
137
|
let r = {
|
|
138
138
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -161,8 +161,8 @@ function be(e, o, t) {
|
|
|
161
161
|
i.createHeader == null || i.createHeader(r, e);
|
|
162
162
|
}), r;
|
|
163
163
|
}
|
|
164
|
-
var
|
|
165
|
-
e.getHeaderGroups =
|
|
164
|
+
var rn = { createTable: (e) => {
|
|
165
|
+
e.getHeaderGroups = C(() => [
|
|
166
166
|
e.getAllColumns(),
|
|
167
167
|
e.getVisibleLeafColumns(),
|
|
168
168
|
e.getState().columnPinning.left,
|
|
@@ -170,40 +170,40 @@ var Xt = { createTable: (e) => {
|
|
|
170
170
|
], (o, t, n, r) => {
|
|
171
171
|
var i, l;
|
|
172
172
|
const s = (i = n?.map((d) => t.find((g) => g.id === d)).filter(Boolean)) != null ? i : [], u = (l = r?.map((d) => t.find((g) => g.id === d)).filter(Boolean)) != null ? l : [], a = t.filter((d) => !(n != null && n.includes(d.id)) && !(r != null && r.includes(d.id)));
|
|
173
|
-
return
|
|
173
|
+
return Re(o, [
|
|
174
174
|
...s,
|
|
175
175
|
...a,
|
|
176
176
|
...u
|
|
177
177
|
], e);
|
|
178
|
-
},
|
|
178
|
+
}, v(e.options, P, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [
|
|
179
179
|
e.getAllColumns(),
|
|
180
180
|
e.getVisibleLeafColumns(),
|
|
181
181
|
e.getState().columnPinning.left,
|
|
182
182
|
e.getState().columnPinning.right
|
|
183
|
-
], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))),
|
|
183
|
+
], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), Re(o, t, e, "center")), v(e.options, P, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [
|
|
184
184
|
e.getAllColumns(),
|
|
185
185
|
e.getVisibleLeafColumns(),
|
|
186
186
|
e.getState().columnPinning.left
|
|
187
187
|
], (o, t, n) => {
|
|
188
188
|
var r;
|
|
189
|
-
return
|
|
190
|
-
},
|
|
189
|
+
return Re(o, (r = n?.map((i) => t.find((l) => l.id === i)).filter(Boolean)) != null ? r : [], e, "left");
|
|
190
|
+
}, v(e.options, P, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [
|
|
191
191
|
e.getAllColumns(),
|
|
192
192
|
e.getVisibleLeafColumns(),
|
|
193
193
|
e.getState().columnPinning.right
|
|
194
194
|
], (o, t, n) => {
|
|
195
195
|
var r;
|
|
196
|
-
return
|
|
197
|
-
},
|
|
196
|
+
return Re(o, (r = n?.map((i) => t.find((l) => l.id === i)).filter(Boolean)) != null ? r : [], e, "right");
|
|
197
|
+
}, v(e.options, P, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), v(e.options, P, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), v(e.options, P, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), v(e.options, P, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), v(e.options, P, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), v(e.options, P, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), v(e.options, P, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), v(e.options, P, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), v(e.options, P, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
198
198
|
var n;
|
|
199
199
|
return !((n = t.subHeaders) != null && n.length);
|
|
200
|
-
}),
|
|
200
|
+
}), v(e.options, P, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
201
201
|
var n;
|
|
202
202
|
return !((n = t.subHeaders) != null && n.length);
|
|
203
|
-
}),
|
|
203
|
+
}), v(e.options, P, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
204
204
|
var n;
|
|
205
205
|
return !((n = t.subHeaders) != null && n.length);
|
|
206
|
-
}),
|
|
206
|
+
}), v(e.options, P, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [
|
|
207
207
|
e.getLeftHeaderGroups(),
|
|
208
208
|
e.getCenterHeaderGroups(),
|
|
209
209
|
e.getRightHeaderGroups()
|
|
@@ -214,15 +214,15 @@ var Xt = { createTable: (e) => {
|
|
|
214
214
|
...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [],
|
|
215
215
|
...(u = (a = n[0]) == null ? void 0 : a.headers) != null ? u : []
|
|
216
216
|
].map((d) => d.getLeafHeaders()).flat();
|
|
217
|
-
},
|
|
217
|
+
}, v(e.options, P, "getLeafHeaders"));
|
|
218
218
|
} };
|
|
219
|
-
function
|
|
219
|
+
function Re(e, o, t, n) {
|
|
220
220
|
var r, i;
|
|
221
221
|
let l = 0;
|
|
222
222
|
const s = function(g, f) {
|
|
223
223
|
f === void 0 && (f = 1), l = Math.max(l, f), g.filter((c) => c.getIsVisible()).forEach((c) => {
|
|
224
|
-
var
|
|
225
|
-
(
|
|
224
|
+
var S;
|
|
225
|
+
(S = c.columns) != null && S.length && s(c.columns, f + 1);
|
|
226
226
|
}, 0);
|
|
227
227
|
};
|
|
228
228
|
s(e);
|
|
@@ -232,48 +232,48 @@ function pe(e, o, t, n) {
|
|
|
232
232
|
depth: f,
|
|
233
233
|
id: [n, `${f}`].filter(Boolean).join("_"),
|
|
234
234
|
headers: []
|
|
235
|
-
},
|
|
236
|
-
g.forEach((
|
|
237
|
-
const $ = [...
|
|
238
|
-
let
|
|
239
|
-
if (
|
|
235
|
+
}, S = [];
|
|
236
|
+
g.forEach((R) => {
|
|
237
|
+
const $ = [...S].reverse()[0], w = R.column.depth === c.depth;
|
|
238
|
+
let _, F = !1;
|
|
239
|
+
if (w && R.column.parent ? _ = R.column.parent : (_ = R.column, F = !0), $ && $?.column === _) $.subHeaders.push(R);
|
|
240
240
|
else {
|
|
241
|
-
const
|
|
241
|
+
const H = lt(t, _, {
|
|
242
242
|
id: [
|
|
243
243
|
n,
|
|
244
244
|
f,
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
_.id,
|
|
246
|
+
R?.id
|
|
247
247
|
].filter(Boolean).join("_"),
|
|
248
|
-
isPlaceholder:
|
|
249
|
-
placeholderId:
|
|
248
|
+
isPlaceholder: F,
|
|
249
|
+
placeholderId: F ? `${S.filter((V) => V.column === _).length}` : void 0,
|
|
250
250
|
depth: f,
|
|
251
|
-
index:
|
|
251
|
+
index: S.length
|
|
252
252
|
});
|
|
253
|
-
|
|
253
|
+
H.subHeaders.push(R), S.push(H);
|
|
254
254
|
}
|
|
255
|
-
c.headers.push(
|
|
256
|
-
}), u.push(c), f > 0 && a(
|
|
255
|
+
c.headers.push(R), R.headerGroup = c;
|
|
256
|
+
}), u.push(c), f > 0 && a(S, f - 1);
|
|
257
257
|
};
|
|
258
|
-
a(o.map((g, f) =>
|
|
258
|
+
a(o.map((g, f) => lt(t, g, {
|
|
259
259
|
depth: l,
|
|
260
260
|
index: f
|
|
261
261
|
})), l - 1), u.reverse();
|
|
262
262
|
const d = (g) => g.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
263
|
-
let c = 0,
|
|
264
|
-
f.subHeaders && f.subHeaders.length ? (
|
|
265
|
-
let { colSpan:
|
|
266
|
-
c +=
|
|
263
|
+
let c = 0, S = 0, R = [0];
|
|
264
|
+
f.subHeaders && f.subHeaders.length ? (R = [], d(f.subHeaders).forEach((w) => {
|
|
265
|
+
let { colSpan: _, rowSpan: F } = w;
|
|
266
|
+
c += _, R.push(F);
|
|
267
267
|
})) : c = 1;
|
|
268
|
-
const $ = Math.min(...
|
|
269
|
-
return
|
|
268
|
+
const $ = Math.min(...R);
|
|
269
|
+
return S = S + $, f.colSpan = c, f.rowSpan = S, {
|
|
270
270
|
colSpan: c,
|
|
271
|
-
rowSpan:
|
|
271
|
+
rowSpan: S
|
|
272
272
|
};
|
|
273
273
|
});
|
|
274
274
|
return d((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var ln = (e, o, t, n, r, i, l) => {
|
|
277
277
|
let s = {
|
|
278
278
|
id: o,
|
|
279
279
|
index: n,
|
|
@@ -299,7 +299,7 @@ var Wt = (e, o, t, n, r, i, l) => {
|
|
|
299
299
|
return (a = s.getValue(u)) != null ? a : e.options.renderFallbackValue;
|
|
300
300
|
},
|
|
301
301
|
subRows: i ?? [],
|
|
302
|
-
getLeafRows: () =>
|
|
302
|
+
getLeafRows: () => tn(s.subRows, (u) => u.subRows),
|
|
303
303
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
304
304
|
getParentRows: () => {
|
|
305
305
|
let u = [], a = s;
|
|
@@ -310,60 +310,60 @@ var Wt = (e, o, t, n, r, i, l) => {
|
|
|
310
310
|
}
|
|
311
311
|
return u.reverse();
|
|
312
312
|
},
|
|
313
|
-
getAllCells:
|
|
314
|
-
_getAllCellsByColumnId:
|
|
313
|
+
getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((a) => nn(e, s, a, a.id)), v(e.options, "debugRows", "getAllCells")),
|
|
314
|
+
_getAllCellsByColumnId: C(() => [s.getAllCells()], (u) => u.reduce((a, d) => (a[d.column.id] = d, a), {}), v(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
315
315
|
};
|
|
316
316
|
for (let u = 0; u < e._features.length; u++) {
|
|
317
317
|
const a = e._features[u];
|
|
318
318
|
a == null || a.createRow == null || a.createRow(s, e);
|
|
319
319
|
}
|
|
320
320
|
return s;
|
|
321
|
-
},
|
|
321
|
+
}, sn = { createColumn: (e, o) => {
|
|
322
322
|
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 = () => {
|
|
323
323
|
if (e._getFacetedMinMaxValues)
|
|
324
324
|
return e._getFacetedMinMaxValues();
|
|
325
325
|
};
|
|
326
|
-
} },
|
|
326
|
+
} }, at = (e, o, t) => {
|
|
327
327
|
var n, r;
|
|
328
328
|
const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
329
329
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
|
|
330
330
|
};
|
|
331
|
-
|
|
332
|
-
var
|
|
331
|
+
at.autoRemove = (e) => D(e);
|
|
332
|
+
var gt = (e, o, t) => {
|
|
333
333
|
var n;
|
|
334
334
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
335
335
|
};
|
|
336
|
-
|
|
337
|
-
var
|
|
336
|
+
gt.autoRemove = (e) => D(e);
|
|
337
|
+
var dt = (e, o, t) => {
|
|
338
338
|
var n;
|
|
339
339
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
340
340
|
};
|
|
341
|
-
|
|
342
|
-
var
|
|
341
|
+
dt.autoRemove = (e) => D(e);
|
|
342
|
+
var ft = (e, o, t) => {
|
|
343
343
|
var n;
|
|
344
344
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
345
345
|
};
|
|
346
|
-
|
|
347
|
-
var
|
|
346
|
+
ft.autoRemove = (e) => D(e);
|
|
347
|
+
var ct = (e, o, t) => !t.some((n) => {
|
|
348
348
|
var r;
|
|
349
349
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
350
350
|
});
|
|
351
|
-
|
|
352
|
-
var
|
|
351
|
+
ct.autoRemove = (e) => D(e) || !(e != null && e.length);
|
|
352
|
+
var pt = (e, o, t) => t.some((n) => {
|
|
353
353
|
var r;
|
|
354
354
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
355
355
|
});
|
|
356
|
-
|
|
357
|
-
var
|
|
358
|
-
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
var
|
|
356
|
+
pt.autoRemove = (e) => D(e) || !(e != null && e.length);
|
|
357
|
+
var St = (e, o, t) => e.getValue(o) === t;
|
|
358
|
+
St.autoRemove = (e) => D(e);
|
|
359
|
+
var mt = (e, o, t) => e.getValue(o) == t;
|
|
360
|
+
mt.autoRemove = (e) => D(e);
|
|
361
|
+
var Ue = (e, o, t) => {
|
|
362
362
|
let [n, r] = t;
|
|
363
363
|
const i = e.getValue(o);
|
|
364
364
|
return i >= n && i <= r;
|
|
365
365
|
};
|
|
366
|
-
|
|
366
|
+
Ue.resolveFilterValue = (e) => {
|
|
367
367
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
368
368
|
if (i > l) {
|
|
369
369
|
const s = i;
|
|
@@ -371,39 +371,39 @@ Be.resolveFilterValue = (e) => {
|
|
|
371
371
|
}
|
|
372
372
|
return [i, l];
|
|
373
373
|
};
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
includesString:
|
|
377
|
-
includesStringSensitive:
|
|
378
|
-
equalsString:
|
|
379
|
-
arrIncludes:
|
|
380
|
-
arrIncludesAll:
|
|
381
|
-
arrIncludesSome:
|
|
382
|
-
equals:
|
|
383
|
-
weakEquals:
|
|
384
|
-
inNumberRange:
|
|
374
|
+
Ue.autoRemove = (e) => D(e) || D(e[0]) && D(e[1]);
|
|
375
|
+
var z = {
|
|
376
|
+
includesString: at,
|
|
377
|
+
includesStringSensitive: gt,
|
|
378
|
+
equalsString: dt,
|
|
379
|
+
arrIncludes: ft,
|
|
380
|
+
arrIncludesAll: ct,
|
|
381
|
+
arrIncludesSome: pt,
|
|
382
|
+
equals: St,
|
|
383
|
+
weakEquals: mt,
|
|
384
|
+
inNumberRange: Ue
|
|
385
385
|
};
|
|
386
|
-
function
|
|
386
|
+
function D(e) {
|
|
387
387
|
return e == null || e === "";
|
|
388
388
|
}
|
|
389
|
-
var
|
|
389
|
+
var un = {
|
|
390
390
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
391
391
|
getInitialState: (e) => ({
|
|
392
392
|
columnFilters: [],
|
|
393
393
|
...e
|
|
394
394
|
}),
|
|
395
395
|
getDefaultOptions: (e) => ({
|
|
396
|
-
onColumnFiltersChange:
|
|
396
|
+
onColumnFiltersChange: E("columnFilters", e),
|
|
397
397
|
filterFromLeafRows: !1,
|
|
398
398
|
maxLeafRowFilterDepth: 100
|
|
399
399
|
}),
|
|
400
400
|
createColumn: (e, o) => {
|
|
401
401
|
e.getAutoFilterFn = () => {
|
|
402
402
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
403
|
-
return typeof n == "string" ?
|
|
403
|
+
return typeof n == "string" ? z.includesString : typeof n == "number" ? z.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? z.equals : Array.isArray(n) ? z.arrIncludes : z.weakEquals;
|
|
404
404
|
}, e.getFilterFn = () => {
|
|
405
405
|
var t, n;
|
|
406
|
-
return
|
|
406
|
+
return _e(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : z[e.columnDef.filterFn];
|
|
407
407
|
}, e.getCanFilter = () => {
|
|
408
408
|
var t, n, r;
|
|
409
409
|
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
|
|
@@ -415,8 +415,8 @@ var Yt = {
|
|
|
415
415
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
416
416
|
}, e.setFilterValue = (t) => {
|
|
417
417
|
o.setColumnFilters((n) => {
|
|
418
|
-
const r = e.getFilterFn(), i = n?.find((d) => d.id === e.id), l =
|
|
419
|
-
if (
|
|
418
|
+
const r = e.getFilterFn(), i = n?.find((d) => d.id === e.id), l = j(t, i ? i.value : void 0);
|
|
419
|
+
if (st(r, l, e)) {
|
|
420
420
|
var s;
|
|
421
421
|
return (s = n?.filter((d) => d.id !== e.id)) != null ? s : [];
|
|
422
422
|
}
|
|
@@ -439,9 +439,9 @@ var Yt = {
|
|
|
439
439
|
e.setColumnFilters = (o) => {
|
|
440
440
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
441
441
|
var i;
|
|
442
|
-
return (i =
|
|
442
|
+
return (i = j(o, r)) == null ? void 0 : i.filter((l) => {
|
|
443
443
|
const s = t.find((u) => u.id === l.id);
|
|
444
|
-
return !(s &&
|
|
444
|
+
return !(s && st(s.getFilterFn(), l.value, s));
|
|
445
445
|
});
|
|
446
446
|
};
|
|
447
447
|
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
|
|
@@ -451,54 +451,54 @@ var Yt = {
|
|
|
451
451
|
}, 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());
|
|
452
452
|
}
|
|
453
453
|
};
|
|
454
|
-
function
|
|
454
|
+
function st(e, o, t) {
|
|
455
455
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
456
456
|
}
|
|
457
|
-
var
|
|
457
|
+
var an = (e, o, t) => t.reduce((n, r) => {
|
|
458
458
|
const i = r.getValue(e);
|
|
459
459
|
return n + (typeof i == "number" ? i : 0);
|
|
460
|
-
}, 0),
|
|
460
|
+
}, 0), gn = (e, o, t) => {
|
|
461
461
|
let n;
|
|
462
462
|
return t.forEach((r) => {
|
|
463
463
|
const i = r.getValue(e);
|
|
464
464
|
i != null && (n > i || n === void 0 && i >= i) && (n = i);
|
|
465
465
|
}), n;
|
|
466
|
-
},
|
|
466
|
+
}, dn = (e, o, t) => {
|
|
467
467
|
let n;
|
|
468
468
|
return t.forEach((r) => {
|
|
469
469
|
const i = r.getValue(e);
|
|
470
470
|
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
471
471
|
}), n;
|
|
472
|
-
},
|
|
472
|
+
}, fn = (e, o, t) => {
|
|
473
473
|
let n, r;
|
|
474
474
|
return t.forEach((i) => {
|
|
475
475
|
const l = i.getValue(e);
|
|
476
476
|
l != null && (n === void 0 ? l >= l && (n = r = l) : (n > l && (n = l), r < l && (r = l)));
|
|
477
477
|
}), [n, r];
|
|
478
|
-
},
|
|
478
|
+
}, cn = (e, o) => {
|
|
479
479
|
let t = 0, n = 0;
|
|
480
480
|
if (o.forEach((r) => {
|
|
481
481
|
let i = r.getValue(e);
|
|
482
482
|
i != null && (i = +i) >= i && (++t, n += i);
|
|
483
483
|
}), t) return n / t;
|
|
484
|
-
},
|
|
484
|
+
}, pn = (e, o) => {
|
|
485
485
|
if (!o.length) return;
|
|
486
486
|
const t = o.map((i) => i.getValue(e));
|
|
487
|
-
if (!
|
|
487
|
+
if (!en(t)) return;
|
|
488
488
|
if (t.length === 1) return t[0];
|
|
489
489
|
const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
|
|
490
490
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
491
|
-
},
|
|
492
|
-
sum:
|
|
493
|
-
min:
|
|
494
|
-
max:
|
|
495
|
-
extent:
|
|
496
|
-
mean:
|
|
497
|
-
median:
|
|
498
|
-
unique:
|
|
499
|
-
uniqueCount:
|
|
500
|
-
count:
|
|
501
|
-
},
|
|
491
|
+
}, Sn = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), mn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Cn = (e, o) => o.length, Ae = {
|
|
492
|
+
sum: an,
|
|
493
|
+
min: gn,
|
|
494
|
+
max: dn,
|
|
495
|
+
extent: fn,
|
|
496
|
+
mean: cn,
|
|
497
|
+
median: pn,
|
|
498
|
+
unique: Sn,
|
|
499
|
+
uniqueCount: mn,
|
|
500
|
+
count: Cn
|
|
501
|
+
}, vn = {
|
|
502
502
|
getDefaultColumnDef: () => ({
|
|
503
503
|
aggregatedCell: (e) => {
|
|
504
504
|
var o, t;
|
|
@@ -511,7 +511,7 @@ var Zt = (e, o, t) => t.reduce((n, r) => {
|
|
|
511
511
|
...e
|
|
512
512
|
}),
|
|
513
513
|
getDefaultOptions: (e) => ({
|
|
514
|
-
onGroupingChange:
|
|
514
|
+
onGroupingChange: E("grouping", e),
|
|
515
515
|
groupedColumnMode: "reorder"
|
|
516
516
|
}),
|
|
517
517
|
createColumn: (e, o) => {
|
|
@@ -533,12 +533,12 @@ var Zt = (e, o, t) => t.reduce((n, r) => {
|
|
|
533
533
|
};
|
|
534
534
|
}, e.getAutoAggregationFn = () => {
|
|
535
535
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
536
|
-
if (typeof n == "number") return
|
|
537
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
536
|
+
if (typeof n == "number") return Ae.sum;
|
|
537
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return Ae.extent;
|
|
538
538
|
}, e.getAggregationFn = () => {
|
|
539
539
|
var t, n;
|
|
540
540
|
if (!e) throw new Error();
|
|
541
|
-
return
|
|
541
|
+
return _e(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 : Ae[e.columnDef.aggregationFn];
|
|
542
542
|
};
|
|
543
543
|
},
|
|
544
544
|
createTable: (e) => {
|
|
@@ -561,24 +561,24 @@ var Zt = (e, o, t) => t.reduce((n, r) => {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
};
|
|
564
|
-
function
|
|
564
|
+
function Rn(e, o, t) {
|
|
565
565
|
if (!(o != null && o.length) || !t) return e;
|
|
566
566
|
const n = e.filter((r) => !o.includes(r.id));
|
|
567
567
|
return t === "remove" ? n : [...o.map((r) => e.find((i) => i.id === r)).filter(Boolean), ...n];
|
|
568
568
|
}
|
|
569
|
-
var
|
|
569
|
+
var hn = {
|
|
570
570
|
getInitialState: (e) => ({
|
|
571
571
|
columnOrder: [],
|
|
572
572
|
...e
|
|
573
573
|
}),
|
|
574
|
-
getDefaultOptions: (e) => ({ onColumnOrderChange:
|
|
574
|
+
getDefaultOptions: (e) => ({ onColumnOrderChange: E("columnOrder", e) }),
|
|
575
575
|
createColumn: (e, o) => {
|
|
576
|
-
e.getIndex =
|
|
576
|
+
e.getIndex = C((t) => [oe(o, t)], (t) => t.findIndex((n) => n.id === e.id), v(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
577
577
|
var n;
|
|
578
|
-
return ((n =
|
|
578
|
+
return ((n = oe(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
579
579
|
}, e.getIsLastColumn = (t) => {
|
|
580
580
|
var n;
|
|
581
|
-
const r =
|
|
581
|
+
const r = oe(o, t);
|
|
582
582
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
583
583
|
};
|
|
584
584
|
},
|
|
@@ -586,7 +586,7 @@ var an = {
|
|
|
586
586
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
|
587
587
|
var t;
|
|
588
588
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
589
|
-
}, e._getOrderColumnsFn =
|
|
589
|
+
}, e._getOrderColumnsFn = C(() => [
|
|
590
590
|
e.getState().columnOrder,
|
|
591
591
|
e.getState().grouping,
|
|
592
592
|
e.options.groupedColumnMode
|
|
@@ -601,18 +601,18 @@ var an = {
|
|
|
601
601
|
}
|
|
602
602
|
i = [...i, ...s];
|
|
603
603
|
}
|
|
604
|
-
return
|
|
605
|
-
},
|
|
604
|
+
return Rn(i, t, n);
|
|
605
|
+
}, v(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
606
606
|
}
|
|
607
|
-
},
|
|
607
|
+
}, Le = () => ({
|
|
608
608
|
left: [],
|
|
609
609
|
right: []
|
|
610
|
-
}),
|
|
610
|
+
}), wn = {
|
|
611
611
|
getInitialState: (e) => ({
|
|
612
|
-
columnPinning:
|
|
612
|
+
columnPinning: Le(),
|
|
613
613
|
...e
|
|
614
614
|
}),
|
|
615
|
-
getDefaultOptions: (e) => ({ onColumnPinningChange:
|
|
615
|
+
getDefaultOptions: (e) => ({ onColumnPinningChange: E("columnPinning", e) }),
|
|
616
616
|
createColumn: (e, o) => {
|
|
617
617
|
e.pin = (t) => {
|
|
618
618
|
const n = e.getLeafColumns().map((r) => r.id).filter(Boolean);
|
|
@@ -650,25 +650,25 @@ var an = {
|
|
|
650
650
|
};
|
|
651
651
|
},
|
|
652
652
|
createRow: (e, o) => {
|
|
653
|
-
e.getCenterVisibleCells =
|
|
653
|
+
e.getCenterVisibleCells = C(() => [
|
|
654
654
|
e._getAllVisibleCells(),
|
|
655
655
|
o.getState().columnPinning.left,
|
|
656
656
|
o.getState().columnPinning.right
|
|
657
657
|
], (t, n, r) => {
|
|
658
658
|
const i = [...n ?? [], ...r ?? []];
|
|
659
659
|
return t.filter((l) => !i.includes(l.column.id));
|
|
660
|
-
},
|
|
660
|
+
}, v(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((r) => t.find((i) => i.column.id === r)).filter(Boolean).map((r) => ({
|
|
661
661
|
...r,
|
|
662
662
|
position: "left"
|
|
663
|
-
})),
|
|
663
|
+
})), v(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((r) => t.find((i) => i.column.id === r)).filter(Boolean).map((r) => ({
|
|
664
664
|
...r,
|
|
665
665
|
position: "right"
|
|
666
|
-
})),
|
|
666
|
+
})), v(o.options, "debugRows", "getRightVisibleCells"));
|
|
667
667
|
},
|
|
668
668
|
createTable: (e) => {
|
|
669
669
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
670
670
|
var t, n;
|
|
671
|
-
return e.setColumnPinning(o ?
|
|
671
|
+
return e.setColumnPinning(o ? Le() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : Le());
|
|
672
672
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
673
673
|
var t;
|
|
674
674
|
const n = e.getState().columnPinning;
|
|
@@ -677,57 +677,57 @@ var an = {
|
|
|
677
677
|
return !!((r = n.left) != null && r.length || (i = n.right) != null && i.length);
|
|
678
678
|
}
|
|
679
679
|
return !!((t = n[o]) != null && t.length);
|
|
680
|
-
}, e.getLeftLeafColumns =
|
|
680
|
+
}, e.getLeftLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), v(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), v(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = C(() => [
|
|
681
681
|
e.getAllLeafColumns(),
|
|
682
682
|
e.getState().columnPinning.left,
|
|
683
683
|
e.getState().columnPinning.right
|
|
684
684
|
], (o, t, n) => {
|
|
685
685
|
const r = [...t ?? [], ...n ?? []];
|
|
686
686
|
return o.filter((i) => !r.includes(i.id));
|
|
687
|
-
},
|
|
687
|
+
}, v(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
688
688
|
}
|
|
689
689
|
};
|
|
690
|
-
function
|
|
690
|
+
function _n(e) {
|
|
691
691
|
return e || (typeof document < "u" ? document : null);
|
|
692
692
|
}
|
|
693
|
-
var
|
|
693
|
+
var he = {
|
|
694
694
|
size: 150,
|
|
695
695
|
minSize: 20,
|
|
696
696
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
697
|
-
},
|
|
697
|
+
}, De = () => ({
|
|
698
698
|
startOffset: null,
|
|
699
699
|
startSize: null,
|
|
700
700
|
deltaOffset: null,
|
|
701
701
|
deltaPercentage: null,
|
|
702
702
|
isResizingColumn: !1,
|
|
703
703
|
columnSizingStart: []
|
|
704
|
-
}),
|
|
705
|
-
getDefaultColumnDef: () =>
|
|
704
|
+
}), Fn = {
|
|
705
|
+
getDefaultColumnDef: () => he,
|
|
706
706
|
getInitialState: (e) => ({
|
|
707
707
|
columnSizing: {},
|
|
708
|
-
columnSizingInfo:
|
|
708
|
+
columnSizingInfo: De(),
|
|
709
709
|
...e
|
|
710
710
|
}),
|
|
711
711
|
getDefaultOptions: (e) => ({
|
|
712
712
|
columnResizeMode: "onEnd",
|
|
713
713
|
columnResizeDirection: "ltr",
|
|
714
|
-
onColumnSizingChange:
|
|
715
|
-
onColumnSizingInfoChange:
|
|
714
|
+
onColumnSizingChange: E("columnSizing", e),
|
|
715
|
+
onColumnSizingInfoChange: E("columnSizingInfo", e)
|
|
716
716
|
}),
|
|
717
717
|
createColumn: (e, o) => {
|
|
718
718
|
e.getSize = () => {
|
|
719
719
|
var t, n, r;
|
|
720
720
|
const i = o.getState().columnSizing[e.id];
|
|
721
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
722
|
-
}, e.getStart =
|
|
721
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : he.minSize, (n = i ?? e.columnDef.size) != null ? n : he.size), (r = e.columnDef.maxSize) != null ? r : he.maxSize);
|
|
722
|
+
}, e.getStart = C((t) => [
|
|
723
723
|
t,
|
|
724
|
-
|
|
724
|
+
oe(o, t),
|
|
725
725
|
o.getState().columnSizing
|
|
726
|
-
], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0),
|
|
726
|
+
], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), v(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [
|
|
727
727
|
t,
|
|
728
|
-
|
|
728
|
+
oe(o, t),
|
|
729
729
|
o.getState().columnSizing
|
|
730
|
-
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0),
|
|
730
|
+
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), v(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
731
731
|
o.setColumnSizing((t) => {
|
|
732
732
|
let { [e.id]: n, ...r } = t;
|
|
733
733
|
return r;
|
|
@@ -757,27 +757,27 @@ var Se = {
|
|
|
757
757
|
}, e.getResizeHandler = (t) => {
|
|
758
758
|
const n = o.getColumn(e.column.id), r = n?.getCanResize();
|
|
759
759
|
return (i) => {
|
|
760
|
-
if (!n || !r || (i.persist == null || i.persist(),
|
|
760
|
+
if (!n || !r || (i.persist == null || i.persist(), He(i) && i.touches && i.touches.length > 1))
|
|
761
761
|
return;
|
|
762
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((
|
|
763
|
-
typeof
|
|
764
|
-
var
|
|
765
|
-
const
|
|
766
|
-
return
|
|
767
|
-
let [
|
|
768
|
-
a[
|
|
762
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], u = He(i) ? Math.round(i.touches[0].clientX) : i.clientX, a = {}, d = (w, _) => {
|
|
763
|
+
typeof _ == "number" && (o.setColumnSizingInfo((F) => {
|
|
764
|
+
var H, V;
|
|
765
|
+
const y = o.options.columnResizeDirection === "rtl" ? -1 : 1, U = (_ - ((H = F?.startOffset) != null ? H : 0)) * y, Q = Math.max(U / ((V = F?.startSize) != null ? V : 0), -0.999999);
|
|
766
|
+
return F.columnSizingStart.forEach((re) => {
|
|
767
|
+
let [Fe, ie] = re;
|
|
768
|
+
a[Fe] = Math.round(Math.max(ie + ie * Q, 0) * 100) / 100;
|
|
769
769
|
}), {
|
|
770
|
-
...
|
|
771
|
-
deltaOffset:
|
|
772
|
-
deltaPercentage:
|
|
770
|
+
...F,
|
|
771
|
+
deltaOffset: U,
|
|
772
|
+
deltaPercentage: Q
|
|
773
773
|
};
|
|
774
|
-
}), (o.options.columnResizeMode === "onChange" ||
|
|
775
|
-
...
|
|
774
|
+
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((F) => ({
|
|
775
|
+
...F,
|
|
776
776
|
...a
|
|
777
777
|
})));
|
|
778
|
-
}, g = (
|
|
779
|
-
d("end",
|
|
780
|
-
...
|
|
778
|
+
}, g = (w) => d("move", w), f = (w) => {
|
|
779
|
+
d("end", w), o.setColumnSizingInfo((_) => ({
|
|
780
|
+
..._,
|
|
781
781
|
isResizingColumn: !1,
|
|
782
782
|
startOffset: null,
|
|
783
783
|
startSize: null,
|
|
@@ -785,20 +785,20 @@ var Se = {
|
|
|
785
785
|
deltaPercentage: null,
|
|
786
786
|
columnSizingStart: []
|
|
787
787
|
}));
|
|
788
|
-
}, c =
|
|
789
|
-
moveHandler: (
|
|
790
|
-
upHandler: (
|
|
791
|
-
c?.removeEventListener("mousemove",
|
|
788
|
+
}, c = _n(t), S = {
|
|
789
|
+
moveHandler: (w) => g(w.clientX),
|
|
790
|
+
upHandler: (w) => {
|
|
791
|
+
c?.removeEventListener("mousemove", S.moveHandler), c?.removeEventListener("mouseup", S.upHandler), f(w.clientX);
|
|
792
792
|
}
|
|
793
|
-
},
|
|
794
|
-
moveHandler: (
|
|
795
|
-
upHandler: (
|
|
796
|
-
var
|
|
797
|
-
c?.removeEventListener("touchmove",
|
|
793
|
+
}, R = {
|
|
794
|
+
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), g(w.touches[0].clientX), !1),
|
|
795
|
+
upHandler: (w) => {
|
|
796
|
+
var _;
|
|
797
|
+
c?.removeEventListener("touchmove", R.moveHandler), c?.removeEventListener("touchend", R.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), f((_ = w.touches[0]) == null ? void 0 : _.clientX);
|
|
798
798
|
}
|
|
799
|
-
}, $ =
|
|
800
|
-
|
|
801
|
-
...
|
|
799
|
+
}, $ = $n() ? { passive: !1 } : !1;
|
|
800
|
+
He(i) ? (c?.addEventListener("touchmove", R.moveHandler, $), c?.addEventListener("touchend", R.upHandler, $)) : (c?.addEventListener("mousemove", S.moveHandler, $), c?.addEventListener("mouseup", S.upHandler, $)), o.setColumnSizingInfo((w) => ({
|
|
801
|
+
...w,
|
|
802
802
|
startOffset: u,
|
|
803
803
|
startSize: l,
|
|
804
804
|
deltaOffset: 0,
|
|
@@ -815,7 +815,7 @@ var Se = {
|
|
|
815
815
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
816
816
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
817
817
|
var t;
|
|
818
|
-
e.setColumnSizingInfo(o ?
|
|
818
|
+
e.setColumnSizingInfo(o ? De() : (t = e.initialState.columnSizingInfo) != null ? t : De());
|
|
819
819
|
}, e.getTotalSize = () => {
|
|
820
820
|
var o, t;
|
|
821
821
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -830,9 +830,9 @@ var Se = {
|
|
|
830
830
|
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
},
|
|
834
|
-
function
|
|
835
|
-
if (typeof
|
|
833
|
+
}, we = null;
|
|
834
|
+
function $n() {
|
|
835
|
+
if (typeof we == "boolean") return we;
|
|
836
836
|
let e = !1;
|
|
837
837
|
try {
|
|
838
838
|
const o = { get passive() {
|
|
@@ -843,17 +843,17 @@ function cn() {
|
|
|
843
843
|
} catch {
|
|
844
844
|
e = !1;
|
|
845
845
|
}
|
|
846
|
-
return
|
|
846
|
+
return we = e, we;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function He(e) {
|
|
849
849
|
return e.type === "touchstart";
|
|
850
850
|
}
|
|
851
|
-
var
|
|
851
|
+
var Mn = {
|
|
852
852
|
getInitialState: (e) => ({
|
|
853
853
|
columnVisibility: {},
|
|
854
854
|
...e
|
|
855
855
|
}),
|
|
856
|
-
getDefaultOptions: (e) => ({ onColumnVisibilityChange:
|
|
856
|
+
getDefaultOptions: (e) => ({ onColumnVisibilityChange: E("columnVisibility", e) }),
|
|
857
857
|
createColumn: (e, o) => {
|
|
858
858
|
e.toggleVisibility = (t) => {
|
|
859
859
|
e.getCanHide() && o.setColumnVisibility((n) => ({
|
|
@@ -872,7 +872,7 @@ var pn = {
|
|
|
872
872
|
};
|
|
873
873
|
},
|
|
874
874
|
createRow: (e, o) => {
|
|
875
|
-
e._getAllVisibleCells =
|
|
875
|
+
e._getAllVisibleCells = C(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), v(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = C(() => [
|
|
876
876
|
e.getLeftVisibleCells(),
|
|
877
877
|
e.getCenterVisibleCells(),
|
|
878
878
|
e.getRightVisibleCells()
|
|
@@ -880,10 +880,10 @@ var pn = {
|
|
|
880
880
|
...t,
|
|
881
881
|
...n,
|
|
882
882
|
...r
|
|
883
|
-
],
|
|
883
|
+
], v(o.options, "debugRows", "getVisibleCells"));
|
|
884
884
|
},
|
|
885
885
|
createTable: (e) => {
|
|
886
|
-
const o = (t, n) =>
|
|
886
|
+
const o = (t, n) => C(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), v(e.options, "debugColumns", t));
|
|
887
887
|
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) => {
|
|
888
888
|
var n;
|
|
889
889
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
|
@@ -899,21 +899,21 @@ var pn = {
|
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
|
-
function
|
|
902
|
+
function oe(e, o) {
|
|
903
903
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
904
904
|
}
|
|
905
|
-
var
|
|
905
|
+
var Pn = { createTable: (e) => {
|
|
906
906
|
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 = () => {
|
|
907
907
|
if (e._getGlobalFacetedMinMaxValues)
|
|
908
908
|
return e._getGlobalFacetedMinMaxValues();
|
|
909
909
|
};
|
|
910
|
-
} },
|
|
910
|
+
} }, Vn = {
|
|
911
911
|
getInitialState: (e) => ({
|
|
912
912
|
globalFilter: void 0,
|
|
913
913
|
...e
|
|
914
914
|
}),
|
|
915
915
|
getDefaultOptions: (e) => ({
|
|
916
|
-
onGlobalFilterChange:
|
|
916
|
+
onGlobalFilterChange: E("globalFilter", e),
|
|
917
917
|
globalFilterFn: "auto",
|
|
918
918
|
getColumnCanGlobalFilter: (o) => {
|
|
919
919
|
var t;
|
|
@@ -928,23 +928,23 @@ var Sn = { createTable: (e) => {
|
|
|
928
928
|
};
|
|
929
929
|
},
|
|
930
930
|
createTable: (e) => {
|
|
931
|
-
e.getGlobalAutoFilterFn = () =>
|
|
931
|
+
e.getGlobalAutoFilterFn = () => z.includesString, e.getGlobalFilterFn = () => {
|
|
932
932
|
var o, t;
|
|
933
933
|
const { globalFilterFn: n } = e.options;
|
|
934
|
-
return
|
|
934
|
+
return _e(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : z[n];
|
|
935
935
|
}, e.setGlobalFilter = (o) => {
|
|
936
936
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
937
937
|
}, e.resetGlobalFilter = (o) => {
|
|
938
938
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
},
|
|
941
|
+
}, xn = {
|
|
942
942
|
getInitialState: (e) => ({
|
|
943
943
|
expanded: {},
|
|
944
944
|
...e
|
|
945
945
|
}),
|
|
946
946
|
getDefaultOptions: (e) => ({
|
|
947
|
-
onExpandedChange:
|
|
947
|
+
onExpandedChange: E("expanded", e),
|
|
948
948
|
paginateExpandedRows: !0
|
|
949
949
|
}),
|
|
950
950
|
createTable: (e) => {
|
|
@@ -1021,18 +1021,18 @@ var Sn = { createTable: (e) => {
|
|
|
1021
1021
|
};
|
|
1022
1022
|
};
|
|
1023
1023
|
}
|
|
1024
|
-
},
|
|
1025
|
-
pageIndex:
|
|
1026
|
-
pageSize:
|
|
1027
|
-
}),
|
|
1024
|
+
}, Be = 0, qe = 10, Oe = () => ({
|
|
1025
|
+
pageIndex: Be,
|
|
1026
|
+
pageSize: qe
|
|
1027
|
+
}), In = {
|
|
1028
1028
|
getInitialState: (e) => ({
|
|
1029
1029
|
...e,
|
|
1030
1030
|
pagination: {
|
|
1031
|
-
...
|
|
1031
|
+
...Oe(),
|
|
1032
1032
|
...e?.pagination
|
|
1033
1033
|
}
|
|
1034
1034
|
}),
|
|
1035
|
-
getDefaultOptions: (e) => ({ onPaginationChange:
|
|
1035
|
+
getDefaultOptions: (e) => ({ onPaginationChange: E("pagination", e) }),
|
|
1036
1036
|
createTable: (e) => {
|
|
1037
1037
|
let o = !1, t = !1;
|
|
1038
1038
|
e._autoResetPageIndex = () => {
|
|
@@ -1050,14 +1050,14 @@ var Sn = { createTable: (e) => {
|
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
}, e.setPagination = (n) => {
|
|
1053
|
-
const r = (i) =>
|
|
1053
|
+
const r = (i) => j(n, i);
|
|
1054
1054
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1055
1055
|
}, e.resetPagination = (n) => {
|
|
1056
1056
|
var r;
|
|
1057
|
-
e.setPagination(n ?
|
|
1057
|
+
e.setPagination(n ? Oe() : (r = e.initialState.pagination) != null ? r : Oe());
|
|
1058
1058
|
}, e.setPageIndex = (n) => {
|
|
1059
1059
|
e.setPagination((r) => {
|
|
1060
|
-
let i =
|
|
1060
|
+
let i = j(n, r.pageIndex);
|
|
1061
1061
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1062
1062
|
return i = Math.max(0, Math.min(i, l)), {
|
|
1063
1063
|
...r,
|
|
@@ -1066,13 +1066,13 @@ var Sn = { createTable: (e) => {
|
|
|
1066
1066
|
});
|
|
1067
1067
|
}, e.resetPageIndex = (n) => {
|
|
1068
1068
|
var r, i;
|
|
1069
|
-
e.setPageIndex(n ?
|
|
1069
|
+
e.setPageIndex(n ? Be : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Be);
|
|
1070
1070
|
}, e.resetPageSize = (n) => {
|
|
1071
1071
|
var r, i;
|
|
1072
|
-
e.setPageSize(n ?
|
|
1072
|
+
e.setPageSize(n ? qe : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : qe);
|
|
1073
1073
|
}, e.setPageSize = (n) => {
|
|
1074
1074
|
e.setPagination((r) => {
|
|
1075
|
-
const i = Math.max(1,
|
|
1075
|
+
const i = Math.max(1, j(n, r.pageSize)), l = r.pageSize * r.pageIndex, s = Math.floor(l / i);
|
|
1076
1076
|
return {
|
|
1077
1077
|
...r,
|
|
1078
1078
|
pageIndex: s,
|
|
@@ -1081,15 +1081,15 @@ var Sn = { createTable: (e) => {
|
|
|
1081
1081
|
});
|
|
1082
1082
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1083
1083
|
var i;
|
|
1084
|
-
let l =
|
|
1084
|
+
let l = j(n, (i = e.options.pageCount) != null ? i : -1);
|
|
1085
1085
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
1086
1086
|
...r,
|
|
1087
1087
|
pageCount: l
|
|
1088
1088
|
};
|
|
1089
|
-
}), e.getPageOptions =
|
|
1089
|
+
}), e.getPageOptions = C(() => [e.getPageCount()], (n) => {
|
|
1090
1090
|
let r = [];
|
|
1091
1091
|
return n && n > 0 && (r = [...new Array(n)].fill(null).map((i, l) => l)), r;
|
|
1092
|
-
},
|
|
1092
|
+
}, v(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
1093
1093
|
const { pageIndex: n } = e.getState().pagination, r = e.getPageCount();
|
|
1094
1094
|
return r === -1 ? !0 : r === 0 ? !1 : n < r - 1;
|
|
1095
1095
|
}, 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 = () => {
|
|
@@ -1100,15 +1100,15 @@ var Sn = { createTable: (e) => {
|
|
|
1100
1100
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, Ge = () => ({
|
|
1104
1104
|
top: [],
|
|
1105
1105
|
bottom: []
|
|
1106
|
-
}),
|
|
1106
|
+
}), yn = {
|
|
1107
1107
|
getInitialState: (e) => ({
|
|
1108
|
-
rowPinning:
|
|
1108
|
+
rowPinning: Ge(),
|
|
1109
1109
|
...e
|
|
1110
1110
|
}),
|
|
1111
|
-
getDefaultOptions: (e) => ({ onRowPinningChange:
|
|
1111
|
+
getDefaultOptions: (e) => ({ onRowPinningChange: E("rowPinning", e) }),
|
|
1112
1112
|
createRow: (e, o) => {
|
|
1113
1113
|
e.pin = (t, n, r) => {
|
|
1114
1114
|
const i = n ? e.getLeafRows().map((u) => {
|
|
@@ -1127,20 +1127,20 @@ var Sn = { createTable: (e) => {
|
|
|
1127
1127
|
if (t === "bottom") {
|
|
1128
1128
|
var g, f;
|
|
1129
1129
|
return {
|
|
1130
|
-
top: ((g = u?.top) != null ? g : []).filter((
|
|
1131
|
-
bottom: [...((f = u?.bottom) != null ? f : []).filter((
|
|
1130
|
+
top: ((g = u?.top) != null ? g : []).filter((R) => !(s != null && s.has(R))),
|
|
1131
|
+
bottom: [...((f = u?.bottom) != null ? f : []).filter((R) => !(s != null && s.has(R))), ...Array.from(s)]
|
|
1132
1132
|
};
|
|
1133
1133
|
}
|
|
1134
1134
|
if (t === "top") {
|
|
1135
|
-
var c,
|
|
1135
|
+
var c, S;
|
|
1136
1136
|
return {
|
|
1137
|
-
top: [...((c = u?.top) != null ? c : []).filter((
|
|
1138
|
-
bottom: ((
|
|
1137
|
+
top: [...((c = u?.top) != null ? c : []).filter((R) => !(s != null && s.has(R))), ...Array.from(s)],
|
|
1138
|
+
bottom: ((S = u?.bottom) != null ? S : []).filter((R) => !(s != null && s.has(R)))
|
|
1139
1139
|
};
|
|
1140
1140
|
}
|
|
1141
1141
|
return {
|
|
1142
|
-
top: ((a = u?.top) != null ? a : []).filter((
|
|
1143
|
-
bottom: ((d = u?.bottom) != null ? d : []).filter((
|
|
1142
|
+
top: ((a = u?.top) != null ? a : []).filter((R) => !(s != null && s.has(R))),
|
|
1143
|
+
bottom: ((d = u?.bottom) != null ? d : []).filter((R) => !(s != null && s.has(R)))
|
|
1144
1144
|
};
|
|
1145
1145
|
});
|
|
1146
1146
|
}, e.getCanPin = () => {
|
|
@@ -1164,7 +1164,7 @@ var Sn = { createTable: (e) => {
|
|
|
1164
1164
|
createTable: (e) => {
|
|
1165
1165
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1166
1166
|
var t, n;
|
|
1167
|
-
return e.setRowPinning(o ?
|
|
1167
|
+
return e.setRowPinning(o ? Ge() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Ge());
|
|
1168
1168
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1169
1169
|
var t;
|
|
1170
1170
|
const n = e.getState().rowPinning;
|
|
@@ -1182,22 +1182,22 @@ var Sn = { createTable: (e) => {
|
|
|
1182
1182
|
...i,
|
|
1183
1183
|
position: n
|
|
1184
1184
|
}));
|
|
1185
|
-
}, e.getTopRows =
|
|
1185
|
+
}, e.getTopRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), v(e.options, "debugRows", "getTopRows")), e.getBottomRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), v(e.options, "debugRows", "getBottomRows")), e.getCenterRows = C(() => [
|
|
1186
1186
|
e.getRowModel().rows,
|
|
1187
1187
|
e.getState().rowPinning.top,
|
|
1188
1188
|
e.getState().rowPinning.bottom
|
|
1189
1189
|
], (o, t, n) => {
|
|
1190
1190
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
|
1191
1191
|
return o.filter((i) => !r.has(i.id));
|
|
1192
|
-
},
|
|
1192
|
+
}, v(e.options, "debugRows", "getCenterRows"));
|
|
1193
1193
|
}
|
|
1194
|
-
},
|
|
1194
|
+
}, En = {
|
|
1195
1195
|
getInitialState: (e) => ({
|
|
1196
1196
|
rowSelection: {},
|
|
1197
1197
|
...e
|
|
1198
1198
|
}),
|
|
1199
1199
|
getDefaultOptions: (e) => ({
|
|
1200
|
-
onRowSelectionChange:
|
|
1200
|
+
onRowSelectionChange: E("rowSelection", e),
|
|
1201
1201
|
enableRowSelection: !0,
|
|
1202
1202
|
enableMultiRowSelection: !0,
|
|
1203
1203
|
enableSubRowSelection: !0
|
|
@@ -1219,21 +1219,21 @@ var Sn = { createTable: (e) => {
|
|
|
1219
1219
|
}, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
|
|
1220
1220
|
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = { ...t };
|
|
1221
1221
|
return e.getRowModel().rows.forEach((i) => {
|
|
1222
|
-
|
|
1222
|
+
Ne(r, i.id, n, !0, e);
|
|
1223
1223
|
}), r;
|
|
1224
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
1224
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ze(e, t) : {
|
|
1225
1225
|
rows: [],
|
|
1226
1226
|
flatRows: [],
|
|
1227
1227
|
rowsById: {}
|
|
1228
|
-
},
|
|
1228
|
+
}, v(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ze(e, t) : {
|
|
1229
1229
|
rows: [],
|
|
1230
1230
|
flatRows: [],
|
|
1231
1231
|
rowsById: {}
|
|
1232
|
-
},
|
|
1232
|
+
}, v(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ze(e, t) : {
|
|
1233
1233
|
rows: [],
|
|
1234
1234
|
flatRows: [],
|
|
1235
1235
|
rowsById: {}
|
|
1236
|
-
},
|
|
1236
|
+
}, v(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
1237
1237
|
const o = e.getFilteredRowModel().flatRows, { rowSelection: t } = e.getState();
|
|
1238
1238
|
let n = !!(o.length && Object.keys(t).length);
|
|
1239
1239
|
return n && o.some((r) => r.getCanSelect() && !t[r.id]) && (n = !1), n;
|
|
@@ -1261,17 +1261,17 @@ var Sn = { createTable: (e) => {
|
|
|
1261
1261
|
var l;
|
|
1262
1262
|
if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t) return i;
|
|
1263
1263
|
const s = { ...i };
|
|
1264
|
-
return
|
|
1264
|
+
return Ne(s, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), s;
|
|
1265
1265
|
});
|
|
1266
1266
|
}, e.getIsSelected = () => {
|
|
1267
1267
|
const { rowSelection: t } = o.getState();
|
|
1268
|
-
return
|
|
1268
|
+
return Ke(e, t);
|
|
1269
1269
|
}, e.getIsSomeSelected = () => {
|
|
1270
1270
|
const { rowSelection: t } = o.getState();
|
|
1271
|
-
return
|
|
1271
|
+
return je(e, t) === "some";
|
|
1272
1272
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1273
1273
|
const { rowSelection: t } = o.getState();
|
|
1274
|
-
return
|
|
1274
|
+
return je(e, t) === "all";
|
|
1275
1275
|
}, e.getCanSelect = () => {
|
|
1276
1276
|
var t;
|
|
1277
1277
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1289,16 +1289,16 @@ var Sn = { createTable: (e) => {
|
|
|
1289
1289
|
};
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
},
|
|
1292
|
+
}, Ne = (e, o, t, n, r) => {
|
|
1293
1293
|
var i;
|
|
1294
1294
|
const l = r.getRow(o, !0);
|
|
1295
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) =>
|
|
1295
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) => Ne(e, s.id, t, n, r));
|
|
1296
1296
|
};
|
|
1297
|
-
function
|
|
1297
|
+
function ze(e, o) {
|
|
1298
1298
|
const t = e.getState().rowSelection, n = [], r = {}, i = function(l, s) {
|
|
1299
1299
|
return l.map((u) => {
|
|
1300
1300
|
var a;
|
|
1301
|
-
const d =
|
|
1301
|
+
const d = Ke(u, t);
|
|
1302
1302
|
if (d && (n.push(u), r[u.id] = u), (a = u.subRows) != null && a.length && (u = {
|
|
1303
1303
|
...u,
|
|
1304
1304
|
subRows: i(u.subRows)
|
|
@@ -1311,33 +1311,33 @@ function Le(e, o) {
|
|
|
1311
1311
|
rowsById: r
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Ke(e, o) {
|
|
1315
1315
|
var t;
|
|
1316
1316
|
return (t = o[e.id]) != null ? t : !1;
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function je(e, o, t) {
|
|
1319
1319
|
var n;
|
|
1320
1320
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1321
1321
|
let r = !0, i = !1;
|
|
1322
1322
|
return e.subRows.forEach((l) => {
|
|
1323
|
-
if (!(i && !r) && (l.getCanSelect() && (
|
|
1324
|
-
const s =
|
|
1323
|
+
if (!(i && !r) && (l.getCanSelect() && (Ke(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
|
|
1324
|
+
const s = je(l, o);
|
|
1325
1325
|
s === "all" ? i = !0 : (s === "some" && (i = !0), r = !1);
|
|
1326
1326
|
}
|
|
1327
1327
|
}), r ? "all" : i ? "some" : !1;
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1329
|
+
var ke = /([0-9]+)/gm, An = (e, o, t) => Ct(k(e.getValue(t)).toLowerCase(), k(o.getValue(t)).toLowerCase()), Ln = (e, o, t) => Ct(k(e.getValue(t)), k(o.getValue(t))), Dn = (e, o, t) => Xe(k(e.getValue(t)).toLowerCase(), k(o.getValue(t)).toLowerCase()), Hn = (e, o, t) => Xe(k(e.getValue(t)), k(o.getValue(t))), On = (e, o, t) => {
|
|
1330
1330
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1331
1331
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1332
|
-
},
|
|
1333
|
-
function
|
|
1332
|
+
}, Gn = (e, o, t) => Xe(e.getValue(t), o.getValue(t));
|
|
1333
|
+
function Xe(e, o) {
|
|
1334
1334
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function k(e) {
|
|
1337
1337
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1340
|
-
const t = e.split(
|
|
1339
|
+
function Ct(e, o) {
|
|
1340
|
+
const t = e.split(ke).filter(Boolean), n = o.split(ke).filter(Boolean);
|
|
1341
1341
|
for (; t.length && n.length; ) {
|
|
1342
1342
|
const r = t.shift(), i = n.shift(), l = parseInt(r, 10), s = parseInt(i, 10), u = [l, s].sort();
|
|
1343
1343
|
if (isNaN(u[0])) {
|
|
@@ -1351,14 +1351,14 @@ function gt(e, o) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
return t.length - n.length;
|
|
1353
1353
|
}
|
|
1354
|
-
var
|
|
1355
|
-
alphanumeric:
|
|
1356
|
-
alphanumericCaseSensitive:
|
|
1357
|
-
text:
|
|
1358
|
-
textCaseSensitive:
|
|
1359
|
-
datetime:
|
|
1360
|
-
basic:
|
|
1361
|
-
},
|
|
1354
|
+
var ne = {
|
|
1355
|
+
alphanumeric: An,
|
|
1356
|
+
alphanumericCaseSensitive: Ln,
|
|
1357
|
+
text: Dn,
|
|
1358
|
+
textCaseSensitive: Hn,
|
|
1359
|
+
datetime: On,
|
|
1360
|
+
basic: Gn
|
|
1361
|
+
}, zn = {
|
|
1362
1362
|
getInitialState: (e) => ({
|
|
1363
1363
|
sorting: [],
|
|
1364
1364
|
...e
|
|
@@ -1368,7 +1368,7 @@ var ee = {
|
|
|
1368
1368
|
sortUndefined: 1
|
|
1369
1369
|
}),
|
|
1370
1370
|
getDefaultOptions: (e) => ({
|
|
1371
|
-
onSortingChange:
|
|
1371
|
+
onSortingChange: E("sorting", e),
|
|
1372
1372
|
isMultiSortEvent: (o) => o.shiftKey
|
|
1373
1373
|
}),
|
|
1374
1374
|
createColumn: (e, o) => {
|
|
@@ -1377,18 +1377,18 @@ var ee = {
|
|
|
1377
1377
|
let n = !1;
|
|
1378
1378
|
for (const r of t) {
|
|
1379
1379
|
const i = r?.getValue(e.id);
|
|
1380
|
-
if (Object.prototype.toString.call(i) === "[object Date]") return
|
|
1381
|
-
if (typeof i == "string" && (n = !0, i.split(
|
|
1382
|
-
return
|
|
1380
|
+
if (Object.prototype.toString.call(i) === "[object Date]") return ne.datetime;
|
|
1381
|
+
if (typeof i == "string" && (n = !0, i.split(ke).length > 1))
|
|
1382
|
+
return ne.alphanumeric;
|
|
1383
1383
|
}
|
|
1384
|
-
return n ?
|
|
1384
|
+
return n ? ne.text : ne.basic;
|
|
1385
1385
|
}, e.getAutoSortDir = () => {
|
|
1386
1386
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1387
1387
|
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
|
1388
1388
|
}, e.getSortingFn = () => {
|
|
1389
1389
|
var t, n;
|
|
1390
1390
|
if (!e) throw new Error();
|
|
1391
|
-
return
|
|
1391
|
+
return _e(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 : ne[e.columnDef.sortingFn];
|
|
1392
1392
|
}, e.toggleSorting = (t, n) => {
|
|
1393
1393
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
1394
1394
|
o.setSorting((l) => {
|
|
@@ -1444,27 +1444,27 @@ var ee = {
|
|
|
1444
1444
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1445
1445
|
}, 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());
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
Qt,
|
|
1453
|
-
Yt,
|
|
1454
|
-
Sn,
|
|
1455
|
-
mn,
|
|
1456
|
-
In,
|
|
1447
|
+
}, Tn = [
|
|
1448
|
+
rn,
|
|
1449
|
+
Mn,
|
|
1450
|
+
hn,
|
|
1451
|
+
wn,
|
|
1457
1452
|
sn,
|
|
1458
|
-
|
|
1453
|
+
un,
|
|
1454
|
+
Pn,
|
|
1455
|
+
Vn,
|
|
1456
|
+
zn,
|
|
1459
1457
|
vn,
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1458
|
+
xn,
|
|
1459
|
+
In,
|
|
1460
|
+
yn,
|
|
1461
|
+
En,
|
|
1462
|
+
Fn
|
|
1463
1463
|
];
|
|
1464
|
-
function
|
|
1464
|
+
function Bn(e) {
|
|
1465
1465
|
var o, t;
|
|
1466
1466
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1467
|
-
const n = [...
|
|
1467
|
+
const n = [...Tn, ...(o = e._features) != null ? o : []];
|
|
1468
1468
|
let r = { _features: n };
|
|
1469
1469
|
const i = r._features.reduce((g, f) => Object.assign(g, f.getDefaultOptions == null ? void 0 : f.getDefaultOptions(r)), {}), l = (g) => r.options.mergeOptions ? r.options.mergeOptions(i, g) : {
|
|
1470
1470
|
...i,
|
|
@@ -1496,7 +1496,7 @@ function xn(e) {
|
|
|
1496
1496
|
r.setState(r.initialState);
|
|
1497
1497
|
},
|
|
1498
1498
|
setOptions: (g) => {
|
|
1499
|
-
const f =
|
|
1499
|
+
const f = j(g, r.options);
|
|
1500
1500
|
r.options = l(f);
|
|
1501
1501
|
},
|
|
1502
1502
|
getState: () => r.options.state,
|
|
@@ -1504,8 +1504,8 @@ function xn(e) {
|
|
|
1504
1504
|
r.options.onStateChange == null || r.options.onStateChange(g);
|
|
1505
1505
|
},
|
|
1506
1506
|
_getRowId: (g, f, c) => {
|
|
1507
|
-
var
|
|
1508
|
-
return (
|
|
1507
|
+
var S;
|
|
1508
|
+
return (S = r.options.getRowId == null ? void 0 : r.options.getRowId(g, f, c)) != null ? S : `${c ? [c.id, f].join(".") : f}`;
|
|
1509
1509
|
},
|
|
1510
1510
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1511
1511
|
getRowModel: () => r.getPaginationRowModel(),
|
|
@@ -1515,34 +1515,34 @@ function xn(e) {
|
|
|
1515
1515
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
|
|
1516
1516
|
return c;
|
|
1517
1517
|
},
|
|
1518
|
-
_getDefaultColumnDef:
|
|
1518
|
+
_getDefaultColumnDef: C(() => [r.options.defaultColumn], (g) => {
|
|
1519
1519
|
var f;
|
|
1520
1520
|
return g = (f = g) != null ? f : {}, {
|
|
1521
1521
|
header: (c) => {
|
|
1522
|
-
const
|
|
1523
|
-
return
|
|
1522
|
+
const S = c.header.column.columnDef;
|
|
1523
|
+
return S.accessorKey ? S.accessorKey : S.accessorFn ? S.id : null;
|
|
1524
1524
|
},
|
|
1525
1525
|
cell: (c) => {
|
|
1526
|
-
var
|
|
1527
|
-
return (
|
|
1526
|
+
var S, R;
|
|
1527
|
+
return (S = (R = c.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? S : null;
|
|
1528
1528
|
},
|
|
1529
|
-
...r._features.reduce((c,
|
|
1529
|
+
...r._features.reduce((c, S) => Object.assign(c, S.getDefaultColumnDef == null ? void 0 : S.getDefaultColumnDef()), {}),
|
|
1530
1530
|
...g
|
|
1531
1531
|
};
|
|
1532
|
-
},
|
|
1532
|
+
}, v(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1533
1533
|
_getColumnDefs: () => r.options.columns,
|
|
1534
|
-
getAllColumns:
|
|
1535
|
-
const f = function(c,
|
|
1536
|
-
return
|
|
1537
|
-
const
|
|
1538
|
-
return
|
|
1534
|
+
getAllColumns: C(() => [r._getColumnDefs()], (g) => {
|
|
1535
|
+
const f = function(c, S, R) {
|
|
1536
|
+
return R === void 0 && (R = 0), c.map(($) => {
|
|
1537
|
+
const w = on(r, $, R, S), _ = $;
|
|
1538
|
+
return w.columns = _.columns ? f(_.columns, w, R + 1) : [], w;
|
|
1539
1539
|
});
|
|
1540
1540
|
};
|
|
1541
1541
|
return f(g);
|
|
1542
|
-
},
|
|
1543
|
-
getAllFlatColumns:
|
|
1544
|
-
_getAllFlatColumnsById:
|
|
1545
|
-
getAllLeafColumns:
|
|
1542
|
+
}, v(e, "debugColumns", "getAllColumns")),
|
|
1543
|
+
getAllFlatColumns: C(() => [r.getAllColumns()], (g) => g.flatMap((f) => f.getFlatColumns()), v(e, "debugColumns", "getAllFlatColumns")),
|
|
1544
|
+
_getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (g) => g.reduce((f, c) => (f[c.id] = c, f), {}), v(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1545
|
+
getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (g, f) => f(g.flatMap((c) => c.getLeafColumns())), v(e, "debugColumns", "getAllLeafColumns")),
|
|
1546
1546
|
getColumn: (g) => {
|
|
1547
1547
|
const f = r._getAllFlatColumnsById()[g];
|
|
1548
1548
|
return process.env.NODE_ENV !== "production" && !f && console.error(`[Table] Column with id '${g}' does not exist.`), f;
|
|
@@ -1555,8 +1555,8 @@ function xn(e) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
return r;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
return (e) =>
|
|
1558
|
+
function qn() {
|
|
1559
|
+
return (e) => C(() => [e.options.data], (o) => {
|
|
1560
1560
|
const t = {
|
|
1561
1561
|
rows: [],
|
|
1562
1562
|
flatRows: [],
|
|
@@ -1565,7 +1565,7 @@ function yn() {
|
|
|
1565
1565
|
i === void 0 && (i = 0);
|
|
1566
1566
|
const s = [];
|
|
1567
1567
|
for (let a = 0; a < r.length; a++) {
|
|
1568
|
-
const d =
|
|
1568
|
+
const d = ln(e, e._getRowId(r[a], a, l), r[a], a, i, void 0, l?.id);
|
|
1569
1569
|
if (t.flatRows.push(d), t.rowsById[d.id] = d, s.push(d), e.options.getSubRows) {
|
|
1570
1570
|
var u;
|
|
1571
1571
|
d.originalSubRows = e.options.getSubRows(r[a], a), (u = d.originalSubRows) != null && u.length && (d.subRows = n(d.originalSubRows, i + 1, d));
|
|
@@ -1574,10 +1574,10 @@ function yn() {
|
|
|
1574
1574
|
return s;
|
|
1575
1575
|
};
|
|
1576
1576
|
return t.rows = n(o), t;
|
|
1577
|
-
},
|
|
1577
|
+
}, v(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return (e) =>
|
|
1579
|
+
function Nn() {
|
|
1580
|
+
return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
1581
1581
|
if (!t.rows.length || !(o != null && o.length)) return t;
|
|
1582
1582
|
const n = e.getState().sorting, r = [], i = n.filter((u) => {
|
|
1583
1583
|
var a;
|
|
@@ -1596,18 +1596,18 @@ function En() {
|
|
|
1596
1596
|
return a.sort((d, g) => {
|
|
1597
1597
|
for (let c = 0; c < i.length; c += 1) {
|
|
1598
1598
|
var f;
|
|
1599
|
-
const
|
|
1600
|
-
let
|
|
1599
|
+
const S = i[c], R = l[S.id], $ = R.sortUndefined, w = (f = S?.desc) != null ? f : !1;
|
|
1600
|
+
let _ = 0;
|
|
1601
1601
|
if ($) {
|
|
1602
|
-
const
|
|
1603
|
-
if (
|
|
1604
|
-
if ($ === "first") return
|
|
1605
|
-
if ($ === "last") return
|
|
1606
|
-
|
|
1602
|
+
const F = d.getValue(S.id), H = g.getValue(S.id), V = F === void 0, y = H === void 0;
|
|
1603
|
+
if (V || y) {
|
|
1604
|
+
if ($ === "first") return V ? -1 : 1;
|
|
1605
|
+
if ($ === "last") return V ? 1 : -1;
|
|
1606
|
+
_ = V && y ? 0 : V ? $ : -$;
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
if (
|
|
1610
|
-
return
|
|
1609
|
+
if (_ === 0 && (_ = R.sortingFn(d, g, S.id)), _ !== 0)
|
|
1610
|
+
return w && (_ *= -1), R.invertSorting && (_ *= -1), _;
|
|
1611
1611
|
}
|
|
1612
1612
|
return d.index - g.index;
|
|
1613
1613
|
}), a.forEach((d) => {
|
|
@@ -1620,31 +1620,31 @@ function En() {
|
|
|
1620
1620
|
flatRows: r,
|
|
1621
1621
|
rowsById: t.rowsById
|
|
1622
1622
|
};
|
|
1623
|
-
},
|
|
1623
|
+
}, v(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return e ?
|
|
1625
|
+
function lo(e, o) {
|
|
1626
|
+
return e ? jn(e) ? /* @__PURE__ */ Te.createElement(e, o) : e : null;
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1629
|
-
return
|
|
1628
|
+
function jn(e) {
|
|
1629
|
+
return kn(e) || typeof e == "function" || Un(e);
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function kn(e) {
|
|
1632
1632
|
return typeof e == "function" && (() => {
|
|
1633
1633
|
const o = Object.getPrototypeOf(e);
|
|
1634
1634
|
return o.prototype && o.prototype.isReactComponent;
|
|
1635
1635
|
})();
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function Un(e) {
|
|
1638
1638
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function Kn(e) {
|
|
1641
1641
|
const o = {
|
|
1642
1642
|
state: {},
|
|
1643
1643
|
onStateChange: () => {
|
|
1644
1644
|
},
|
|
1645
1645
|
renderFallbackValue: null,
|
|
1646
1646
|
...e
|
|
1647
|
-
}, [t] =
|
|
1647
|
+
}, [t] = Te.useState(() => ({ current: Bn(o) })), [n, r] = Te.useState(() => t.current.initialState);
|
|
1648
1648
|
return t.current.setOptions((i) => ({
|
|
1649
1649
|
...i,
|
|
1650
1650
|
...e,
|
|
@@ -1657,203 +1657,239 @@ function Hn(e) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
})), t.current;
|
|
1659
1659
|
}
|
|
1660
|
-
var
|
|
1660
|
+
var ut = [
|
|
1661
1661
|
"data",
|
|
1662
1662
|
"error",
|
|
1663
1663
|
"isError",
|
|
1664
1664
|
"isLoading",
|
|
1665
1665
|
"isFetching",
|
|
1666
1666
|
"dataUpdatedAt"
|
|
1667
|
-
],
|
|
1667
|
+
], Xn = [], Wn = (e) => e === void 0 || e === "all" ? e : typeof e == "function" ? () => {
|
|
1668
1668
|
const o = e();
|
|
1669
|
-
return o === void 0 || o === "all" ? o : [.../* @__PURE__ */ new Set([...o, ...
|
|
1670
|
-
} : [.../* @__PURE__ */ new Set([...e, ...
|
|
1671
|
-
const [
|
|
1672
|
-
const
|
|
1673
|
-
return
|
|
1674
|
-
|
|
1675
|
-
}), Object.entries(
|
|
1676
|
-
|
|
1677
|
-
}), Object.entries(
|
|
1678
|
-
|
|
1679
|
-
}), Object.entries(
|
|
1680
|
-
|
|
1681
|
-
}),
|
|
1682
|
-
}, { notifyOnChangeProps:
|
|
1669
|
+
return o === void 0 || o === "all" ? o : [.../* @__PURE__ */ new Set([...o, ...ut])];
|
|
1670
|
+
} : [.../* @__PURE__ */ new Set([...e, ...ut])], so = ({ children: e, classNameExpandedCell: o, classNameExpandedContent: t, classNameExpandedRow: n, classNameExpandedHeader: r, classNameActiveExpandedRow: i, classNameHoverRow: l, columns: s = [], data: u = [], defaultExpanded: a, enableExpandedRow: d, enableHoverRow: g, expandedState: f, headerContent: c, id: S, isPaginationEnabled: R, queryOptions: $ = {}, totalItems: w, getRowId: _, fetchData: F, onExpandedChange: H, renderExpandedRow: V, keepExpandColumnVisible: y, columnPinning: U }) => {
|
|
1671
|
+
const [Q, re] = x([]), [Fe, ie] = x(!!F), [$e, Y] = x(0), [le, vt] = x(), [se, Rt] = x(10), [ht, wt] = x(w), We = F ? ht : w, _t = Math.ceil(We / se), [ue, Ft] = x({}), [ae, $t] = x({}), [ge, Mt] = x({}), [de, Pt] = x({}), Vt = () => {
|
|
1672
|
+
const p = typeof S == "string" || typeof S == "number" ? [S] : [...S];
|
|
1673
|
+
return R && p.push($e, se), le && p.push(le), Object.entries(ue).forEach(([m, h]) => {
|
|
1674
|
+
p.push(`${m}:${h.join(",")}`);
|
|
1675
|
+
}), Object.entries(ae).forEach(([m, h]) => {
|
|
1676
|
+
h && p.push(`${m}:${h}`);
|
|
1677
|
+
}), Object.entries(ge).forEach(([m, h]) => {
|
|
1678
|
+
h && p.push(`${m}:${h.from ?? ""}-${h.to ?? ""}`);
|
|
1679
|
+
}), Object.entries(de).forEach(([m, h]) => {
|
|
1680
|
+
h && p.push(`${m}:${h}`);
|
|
1681
|
+
}), p;
|
|
1682
|
+
}, { notifyOnChangeProps: xt, ...Qe } = $, Ye = N({}), Ze = N(!1), T = bt({
|
|
1683
1683
|
refetchOnMount: !1,
|
|
1684
1684
|
refetchOnWindowFocus: !1,
|
|
1685
|
-
...
|
|
1686
|
-
notifyOnChangeProps:
|
|
1687
|
-
queryKey:
|
|
1688
|
-
enabled: (
|
|
1689
|
-
if (!
|
|
1690
|
-
const { enabled:
|
|
1691
|
-
return typeof
|
|
1685
|
+
...Qe,
|
|
1686
|
+
notifyOnChangeProps: Wn(xt),
|
|
1687
|
+
queryKey: Vt(),
|
|
1688
|
+
enabled: (p) => {
|
|
1689
|
+
if (!F) return !1;
|
|
1690
|
+
const { enabled: m } = Qe;
|
|
1691
|
+
return typeof m == "function" ? !!m(p) : m ?? !0;
|
|
1692
1692
|
},
|
|
1693
1693
|
initialData: () => {
|
|
1694
|
-
if (!(
|
|
1694
|
+
if (!(Ze.current || u.length === 0))
|
|
1695
1695
|
return u;
|
|
1696
1696
|
},
|
|
1697
|
-
queryFn: async ({ signal:
|
|
1698
|
-
const { data:
|
|
1699
|
-
page: Math.max(
|
|
1700
|
-
pageSize:
|
|
1701
|
-
termOfSearch:
|
|
1702
|
-
...Object.keys(
|
|
1703
|
-
...Object.keys(
|
|
1704
|
-
...Object.keys(
|
|
1705
|
-
...Object.keys(
|
|
1706
|
-
},
|
|
1707
|
-
return
|
|
1697
|
+
queryFn: async ({ signal: p }) => {
|
|
1698
|
+
const { data: m, totalItemsCount: h } = await F({
|
|
1699
|
+
page: Math.max($e + 1, 1),
|
|
1700
|
+
pageSize: se,
|
|
1701
|
+
termOfSearch: le,
|
|
1702
|
+
...Object.keys(ue).length > 0 ? ue : {},
|
|
1703
|
+
...Object.keys(ae).length > 0 ? ae : {},
|
|
1704
|
+
...Object.keys(ge).length > 0 ? ge : {},
|
|
1705
|
+
...Object.keys(de).length > 0 ? de : {}
|
|
1706
|
+
}, p);
|
|
1707
|
+
return Ye.current = { totalItemsCount: h }, m;
|
|
1708
1708
|
}
|
|
1709
1709
|
});
|
|
1710
|
-
|
|
1711
|
-
|
|
1710
|
+
q(() => {
|
|
1711
|
+
Ze.current = !0;
|
|
1712
1712
|
}, []);
|
|
1713
|
-
const [
|
|
1714
|
-
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1717
|
-
if (!
|
|
1718
|
-
|
|
1719
|
-
const { totalItemsCount:
|
|
1720
|
-
|
|
1721
|
-
}, [
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1724
|
-
}, []),
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
...
|
|
1728
|
-
[
|
|
1713
|
+
const [It, Je] = x(!1), Me = N(0), be = N(!0), et = N(T.refetch);
|
|
1714
|
+
et.current = T.refetch;
|
|
1715
|
+
const Z = F ? T.data ?? Xn : u, yt = F ? T.isLoading : !1, Et = F ? T.isFetching : !1, At = F ? T.error : null, tt = !!c;
|
|
1716
|
+
q(() => {
|
|
1717
|
+
if (!F || T.dataUpdatedAt === 0) return;
|
|
1718
|
+
ie(!1);
|
|
1719
|
+
const { totalItemsCount: p } = Ye.current;
|
|
1720
|
+
p && wt(p);
|
|
1721
|
+
}, [F, T.dataUpdatedAt]);
|
|
1722
|
+
const Lt = L((p) => {
|
|
1723
|
+
vt(p), Y(0);
|
|
1724
|
+
}, []), Dt = L((p, m) => {
|
|
1725
|
+
const h = p.toLowerCase().replace(/\s+/g, "_");
|
|
1726
|
+
Ft((M) => ({
|
|
1727
|
+
...M,
|
|
1728
|
+
[h]: m
|
|
1729
1729
|
}));
|
|
1730
|
-
}, []),
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1733
|
-
...
|
|
1734
|
-
[
|
|
1735
|
-
})),
|
|
1736
|
-
}, []),
|
|
1737
|
-
const
|
|
1738
|
-
|
|
1739
|
-
...
|
|
1740
|
-
[
|
|
1741
|
-
from:
|
|
1742
|
-
to:
|
|
1730
|
+
}, []), Ht = L((p, m) => {
|
|
1731
|
+
const h = p.toLowerCase().replace(/\s+/g, "_");
|
|
1732
|
+
$t((M) => ({
|
|
1733
|
+
...M,
|
|
1734
|
+
[h]: m?.toISOString()
|
|
1735
|
+
})), Y(0);
|
|
1736
|
+
}, []), Ot = L((p, m) => {
|
|
1737
|
+
const h = p.toLowerCase().replace(/\s+/g, "_");
|
|
1738
|
+
Mt((M) => ({
|
|
1739
|
+
...M,
|
|
1740
|
+
[h]: m ? {
|
|
1741
|
+
from: m.from?.toISOString(),
|
|
1742
|
+
to: m.to?.toISOString()
|
|
1743
1743
|
} : void 0
|
|
1744
|
-
})),
|
|
1745
|
-
}, []),
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
...
|
|
1749
|
-
[
|
|
1750
|
-
})),
|
|
1751
|
-
}, []),
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1744
|
+
})), Y(0);
|
|
1745
|
+
}, []), Gt = L((p, m) => {
|
|
1746
|
+
const h = p.toLowerCase().replace(/\s+/g, "_");
|
|
1747
|
+
Pt((M) => ({
|
|
1748
|
+
...M,
|
|
1749
|
+
[h]: m?.toISOString()
|
|
1750
|
+
})), Y(0);
|
|
1751
|
+
}, []), zt = L((p) => Y(p), []), Tt = L((p) => Rt(p), []), [Bt, qt] = x(a ?? {}), Pe = f !== void 0, K = Pe ? f : Bt, J = L((p) => {
|
|
1752
|
+
const m = typeof p == "function" ? p(K) : p;
|
|
1753
|
+
Pe || qt(m), H?.(p);
|
|
1754
1754
|
}, [
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1755
|
+
K,
|
|
1756
|
+
Pe,
|
|
1757
|
+
H
|
|
1758
1758
|
]);
|
|
1759
|
-
|
|
1759
|
+
q(() => {
|
|
1760
1760
|
if (!d) return;
|
|
1761
|
-
const
|
|
1762
|
-
const { detail:
|
|
1763
|
-
|
|
1764
|
-
...
|
|
1765
|
-
[
|
|
1761
|
+
const p = Ee(S), m = new AbortController(), h = (B) => {
|
|
1762
|
+
const { detail: A } = B, { rowId: I } = A;
|
|
1763
|
+
A.tableId !== p || !I || J((O) => typeof O == "boolean" ? { [I]: !0 } : {
|
|
1764
|
+
...O,
|
|
1765
|
+
[I]: !0
|
|
1766
1766
|
});
|
|
1767
|
-
},
|
|
1768
|
-
const { detail:
|
|
1769
|
-
|
|
1770
|
-
if (typeof
|
|
1771
|
-
const
|
|
1772
|
-
return delete
|
|
1767
|
+
}, M = (B) => {
|
|
1768
|
+
const { detail: A } = B, { rowId: I } = A;
|
|
1769
|
+
A.tableId !== p || !I || J((O) => {
|
|
1770
|
+
if (typeof O == "boolean") return {};
|
|
1771
|
+
const me = { ...O };
|
|
1772
|
+
return delete me[I], me;
|
|
1773
1773
|
});
|
|
1774
|
-
},
|
|
1775
|
-
const { detail:
|
|
1776
|
-
|
|
1777
|
-
if (typeof
|
|
1778
|
-
const
|
|
1779
|
-
return
|
|
1774
|
+
}, G = (B) => {
|
|
1775
|
+
const { detail: A } = B, { rowId: I } = A;
|
|
1776
|
+
A.tableId !== p || !I || J((O) => {
|
|
1777
|
+
if (typeof O == "boolean") return { [I]: !O };
|
|
1778
|
+
const me = !!O[I], ye = { ...O };
|
|
1779
|
+
return me ? delete ye[I] : ye[I] = !0, ye;
|
|
1780
1780
|
});
|
|
1781
1781
|
};
|
|
1782
|
-
return document.addEventListener(
|
|
1782
|
+
return document.addEventListener(Ce.EXPAND_ROW, h, { signal: m.signal }), document.addEventListener(Ce.COLLAPSE_ROW, M, { signal: m.signal }), document.addEventListener(Ce.TOGGLE_ROW, G, { signal: m.signal }), () => m.abort();
|
|
1783
1783
|
}, [
|
|
1784
1784
|
d,
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
]),
|
|
1788
|
-
|
|
1789
|
-
}, []),
|
|
1790
|
-
if (!
|
|
1791
|
-
const
|
|
1792
|
-
const { detail:
|
|
1793
|
-
|
|
1794
|
-
|
|
1785
|
+
S,
|
|
1786
|
+
J
|
|
1787
|
+
]), q(() => () => {
|
|
1788
|
+
be.current = !1;
|
|
1789
|
+
}, []), q(() => {
|
|
1790
|
+
if (!F) return;
|
|
1791
|
+
const p = Ee(S), m = new AbortController(), h = (M) => {
|
|
1792
|
+
const { detail: G } = M;
|
|
1793
|
+
G.tableId !== void 0 && G.tableId !== p || (Me.current += 1, Je(!0), et.current().finally(() => {
|
|
1794
|
+
Me.current -= 1, Me.current === 0 && be.current && Je(!1);
|
|
1795
1795
|
}));
|
|
1796
1796
|
};
|
|
1797
|
-
return document.addEventListener(
|
|
1798
|
-
}, [
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
if (
|
|
1802
|
-
const
|
|
1803
|
-
return () => cancelAnimationFrame(
|
|
1804
|
-
} else
|
|
1805
|
-
}, [
|
|
1806
|
-
const [
|
|
1807
|
-
|
|
1808
|
-
if (
|
|
1797
|
+
return document.addEventListener(Ce.REFRESH, h, { signal: m.signal }), () => m.abort();
|
|
1798
|
+
}, [F, S]);
|
|
1799
|
+
const Ve = W(() => Z.some((p) => !!p.meta?.expandedRow), [Z]), fe = W(() => Z.map((p, m) => _ ? _(p, m) : String(m)), [Z, _]), Nt = W(() => typeof K == "boolean" ? K : fe.some((p) => !!K[p]), [K, fe]), jt = W(() => typeof y == "boolean" ? y : typeof y == "object" ? fe.some((p) => !!y[p]) : !1, [y, fe]), xe = Ve || V && (Nt || jt), [X, nt] = x(!!xe);
|
|
1800
|
+
q(() => {
|
|
1801
|
+
if (xe) {
|
|
1802
|
+
const p = requestAnimationFrame(() => nt(!0));
|
|
1803
|
+
return () => cancelAnimationFrame(p);
|
|
1804
|
+
} else nt(!1);
|
|
1805
|
+
}, [xe]);
|
|
1806
|
+
const [ce, ot] = x(!X);
|
|
1807
|
+
q(() => {
|
|
1808
|
+
if (X) ot(!1);
|
|
1809
1809
|
else {
|
|
1810
|
-
const
|
|
1811
|
-
return () => clearTimeout(
|
|
1810
|
+
const p = setTimeout(() => ot(!0), 300);
|
|
1811
|
+
return () => clearTimeout(p);
|
|
1812
1812
|
}
|
|
1813
|
-
}, [
|
|
1814
|
-
const
|
|
1813
|
+
}, [X]);
|
|
1814
|
+
const b = W(() => !d || !Ve && !V ? null : {
|
|
1815
1815
|
id: "__expand",
|
|
1816
|
-
header: () => /* @__PURE__ */
|
|
1817
|
-
cell: ({ row:
|
|
1818
|
-
const { meta:
|
|
1819
|
-
return !
|
|
1816
|
+
header: () => /* @__PURE__ */ ve(Qt, { children: "Expand Column" }),
|
|
1817
|
+
cell: ({ row: p }) => {
|
|
1818
|
+
const { meta: m } = p.original, h = typeof y == "object" && !!y[p.id];
|
|
1819
|
+
return !m?.expandedRow && !p.getIsExpanded() && !h ? null : /* @__PURE__ */ ve("button", {
|
|
1820
1820
|
type: "button",
|
|
1821
1821
|
className: "hover:cursor-pointer",
|
|
1822
|
-
onClick: () =>
|
|
1823
|
-
"aria-label":
|
|
1824
|
-
children: /* @__PURE__ */
|
|
1822
|
+
onClick: () => p.toggleExpanded(),
|
|
1823
|
+
"aria-label": p.getIsExpanded() ? "Collapse row" : "Expand row",
|
|
1824
|
+
children: /* @__PURE__ */ ve(Yt, { className: te("size-4 transition-transform text-slate-400 dark:text-metal-400", { "-rotate-90": p.getIsExpanded() }) })
|
|
1825
1825
|
});
|
|
1826
1826
|
},
|
|
1827
1827
|
enableSorting: !1,
|
|
1828
1828
|
meta: {
|
|
1829
|
-
headerClassName:
|
|
1830
|
-
className:
|
|
1829
|
+
headerClassName: te("transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden", X ? "w-10 max-w-10 px-2" : "w-0 max-w-0 !p-0", ce && te("!border-0 !rounded-none dark:[&+th]:border-l", !tt && "[&+th]:rounded-tl-lg")),
|
|
1830
|
+
className: te("transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden", X ? te("w-10 max-w-10 px-1 text-center", r) : "w-0 max-w-0 !p-0", ce && "!border-0 dark:[&+td]:border-l")
|
|
1831
1831
|
}
|
|
1832
1832
|
}, [
|
|
1833
1833
|
d,
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
]),
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1834
|
+
Ve,
|
|
1835
|
+
tt,
|
|
1836
|
+
V,
|
|
1837
|
+
X,
|
|
1838
|
+
ce,
|
|
1839
|
+
y
|
|
1840
|
+
]), kt = W(() => b ? [b, ...s] : s, [s, b]), Ie = W(() => {
|
|
1841
|
+
if (!U) return;
|
|
1842
|
+
const p = U.left ?? [];
|
|
1843
|
+
return {
|
|
1844
|
+
left: b && p.length > 0 && !p.includes("__expand") ? ["__expand", ...p] : p,
|
|
1845
|
+
right: U.right ?? []
|
|
1846
|
+
};
|
|
1847
|
+
}, [U, b]), [Ut, Kt] = x({}), pe = N(null), ee = N(/* @__PURE__ */ new Map()), rt = N(/* @__PURE__ */ new Map()), Se = L((p) => {
|
|
1848
|
+
Kt((m) => {
|
|
1849
|
+
let h = m;
|
|
1850
|
+
for (const M of p) {
|
|
1851
|
+
const G = [...ee.current].find(([, I]) => I === M);
|
|
1852
|
+
if (!G) continue;
|
|
1853
|
+
const [B] = G, A = M.getBoundingClientRect().width;
|
|
1854
|
+
h[B] !== A && (h = {
|
|
1855
|
+
...h,
|
|
1856
|
+
[B]: A
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
return h;
|
|
1860
|
+
});
|
|
1861
|
+
}, []), it = L((p, m) => {
|
|
1862
|
+
const h = ee.current.get(p);
|
|
1863
|
+
h !== m && (h && (pe.current?.unobserve(h), ee.current.delete(p)), m && (ee.current.set(p, m), !(typeof ResizeObserver > "u") && (pe.current ??= new ResizeObserver((M) => {
|
|
1864
|
+
Se(M.map(({ target: G }) => G));
|
|
1865
|
+
}), pe.current.observe(m))));
|
|
1866
|
+
}, [Se]);
|
|
1867
|
+
Jt(() => {
|
|
1868
|
+
Se([...ee.current.values()]);
|
|
1869
|
+
}, [Ie, Se]);
|
|
1870
|
+
const Xt = L((p) => {
|
|
1871
|
+
let m = rt.current.get(p);
|
|
1872
|
+
return m || (m = (h) => it(p, h), rt.current.set(p, m)), m;
|
|
1873
|
+
}, [it]);
|
|
1874
|
+
q(() => () => pe.current?.disconnect(), []);
|
|
1875
|
+
const Wt = Kn({
|
|
1876
|
+
data: Z,
|
|
1877
|
+
columns: kt,
|
|
1878
|
+
..._ ? { getRowId: _ } : {},
|
|
1844
1879
|
state: {
|
|
1845
|
-
sorting:
|
|
1846
|
-
...d ? { expanded:
|
|
1880
|
+
sorting: Q,
|
|
1881
|
+
...d ? { expanded: K } : {},
|
|
1882
|
+
...Ie ? { columnPinning: Ie } : {}
|
|
1847
1883
|
},
|
|
1848
|
-
onSortingChange:
|
|
1884
|
+
onSortingChange: re,
|
|
1849
1885
|
...d ? {
|
|
1850
|
-
onExpandedChange:
|
|
1886
|
+
onExpandedChange: J,
|
|
1851
1887
|
manualExpanding: !0
|
|
1852
1888
|
} : {},
|
|
1853
|
-
getCoreRowModel:
|
|
1854
|
-
getSortedRowModel:
|
|
1889
|
+
getCoreRowModel: qn(),
|
|
1890
|
+
getSortedRowModel: Nn()
|
|
1855
1891
|
});
|
|
1856
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ ve(Zt.Provider, {
|
|
1857
1893
|
value: {
|
|
1858
1894
|
classNameActiveExpandedRow: i,
|
|
1859
1895
|
classNameExpandedCell: o,
|
|
@@ -1862,39 +1898,41 @@ var tt = [
|
|
|
1862
1898
|
classNameHoverRow: l,
|
|
1863
1899
|
enableExpandedRow: d,
|
|
1864
1900
|
enableHoverRow: g,
|
|
1865
|
-
isBorderOnAdjacentCell:
|
|
1866
|
-
isExpandColumnVisible:
|
|
1867
|
-
isFirstLoad:
|
|
1868
|
-
multiselectSelected:
|
|
1869
|
-
dateFilters:
|
|
1870
|
-
dateRangeFilters:
|
|
1871
|
-
timeFilters:
|
|
1872
|
-
page:
|
|
1873
|
-
pageSize:
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1901
|
+
isBorderOnAdjacentCell: ce,
|
|
1902
|
+
isExpandColumnVisible: X,
|
|
1903
|
+
isFirstLoad: Fe,
|
|
1904
|
+
multiselectSelected: ue,
|
|
1905
|
+
dateFilters: ae,
|
|
1906
|
+
dateRangeFilters: ge,
|
|
1907
|
+
timeFilters: de,
|
|
1908
|
+
page: $e,
|
|
1909
|
+
pageSize: se,
|
|
1910
|
+
pinnedWidths: Ut,
|
|
1911
|
+
getPinnedHeaderRef: Xt,
|
|
1912
|
+
sortedData: Q,
|
|
1913
|
+
table: Wt,
|
|
1914
|
+
tableId: Ee(S),
|
|
1915
|
+
tableFetching: Et,
|
|
1916
|
+
tableLoading: yt || It,
|
|
1917
|
+
tableError: At,
|
|
1880
1918
|
headerContent: c,
|
|
1881
|
-
termOfSearch:
|
|
1882
|
-
totalItems:
|
|
1883
|
-
totalPages:
|
|
1884
|
-
handlePage:
|
|
1885
|
-
onChangeTermOfSearch:
|
|
1886
|
-
onPageSize:
|
|
1887
|
-
onSelectMultiselect:
|
|
1888
|
-
onSelectDateFilter:
|
|
1889
|
-
onSelectDateRangeFilter:
|
|
1890
|
-
onSelectTimeFilter:
|
|
1891
|
-
onSorting:
|
|
1892
|
-
renderExpandedRow:
|
|
1919
|
+
termOfSearch: le,
|
|
1920
|
+
totalItems: We,
|
|
1921
|
+
totalPages: _t,
|
|
1922
|
+
handlePage: zt,
|
|
1923
|
+
onChangeTermOfSearch: Lt,
|
|
1924
|
+
onPageSize: Tt,
|
|
1925
|
+
onSelectMultiselect: Dt,
|
|
1926
|
+
onSelectDateFilter: Ht,
|
|
1927
|
+
onSelectDateRangeFilter: Ot,
|
|
1928
|
+
onSelectTimeFilter: Gt,
|
|
1929
|
+
onSorting: re,
|
|
1930
|
+
renderExpandedRow: V
|
|
1893
1931
|
},
|
|
1894
1932
|
children: e
|
|
1895
1933
|
});
|
|
1896
1934
|
};
|
|
1897
1935
|
export {
|
|
1898
|
-
|
|
1899
|
-
|
|
1936
|
+
lo as n,
|
|
1937
|
+
so as t
|
|
1900
1938
|
};
|