@bigcapitalhq/blueprintjs-react-table 0.3.0 → 0.3.1
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/README.md +86 -0
- package/dist/blueprintjs-react-table.cjs +2 -2
- package/dist/blueprintjs-react-table.cjs.map +1 -1
- package/dist/blueprintjs-react-table.js +1565 -1417
- package/dist/blueprintjs-react-table.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/BP_Table.d.ts +13 -3
- package/dist/types/components/body/TableBody.d.ts +4 -3
- package/dist/types/components/body/TableBodyCell.d.ts +5 -3
- package/dist/types/components/body/TableRowExpander.d.ts +8 -0
- package/dist/types/components/body/TableRowHeaderCell.d.ts +2 -1
- package/dist/types/components/body/TableRowSelectionCell.d.ts +2 -1
- package/dist/types/components/common/classes.d.ts +3 -0
- package/dist/types/components/common/pinning.d.ts +1 -1
- package/dist/types/components/container/TableContainer.d.ts +5 -3
- package/dist/types/components/pagination/pagination-row-count-context.d.ts +2 -0
- package/dist/types/components/quadrant/TableQuadrant.d.ts +4 -3
- package/dist/types/components/quadrant/TableQuadrantStack.d.ts +4 -3
- package/dist/types/hooks/use-bp-table-instance.d.ts +3 -1
- package/dist/types/hooks/use-row-resizing.d.ts +5 -1
- package/dist/types/hooks/use-uncontrolled.d.ts +2 -1
- package/dist/types/types.d.ts +22 -2
- package/package.json +1 -1
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { useLayoutEffect as
|
|
6
|
-
import { tableFeatures as Pt, sortFns as
|
|
7
|
-
import { useVirtualizer as
|
|
8
|
-
import { Classes as
|
|
9
|
-
import { DragHandleVerticalIcon as
|
|
10
|
-
var
|
|
11
|
-
function
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Xe = (t, e, n) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var Et = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as a, jsxs as W, Fragment as Nt } from "react/jsx-runtime";
|
|
5
|
+
import { useLayoutEffect as dt, useState as lt, useRef as Z, createContext as Gt, useCallback as P, useMemo as gt, useEffect as Lt, useContext as Wt, Fragment as zt } from "react";
|
|
6
|
+
import { tableFeatures as Pt, sortFns as Ke, rowSortingFeature as Qe, cellSelectionFeature as Ze, rowSelectionFeature as je, rowPinningFeature as qe, rowExpandingFeature as Je, columnPinningFeature as tn, columnVisibilityFeature as en, columnOrderingFeature as nn, columnResizingFeature as on, columnSizingFeature as ln, createSortedRowModel as sn, createExpandedRowModel as rn, useTable as cn, functionalUpdate as de, rowPaginationFeature as fe, createPaginatedRowModel as he } from "@tanstack/react-table";
|
|
7
|
+
import { useVirtualizer as an } from "@tanstack/react-virtual";
|
|
8
|
+
import { Classes as ft, Icon as me, ContextMenu as un, Checkbox as we, PopoverNext as dn, Menu as fn, MenuItem as Dt, HTMLSelect as hn, ButtonGroup as mn, Button as It } from "@blueprintjs/core";
|
|
9
|
+
import { DragHandleVerticalIcon as wn } from "@blueprintjs/icons";
|
|
10
|
+
var Ot = /* @__PURE__ */ ((t) => (t.CELLS = "cells", t.COLUMN_HEADERS = "column-header", t.ROW_HEADERS = "row-header", t))(Ot || {});
|
|
11
|
+
function $t(t, e) {
|
|
12
12
|
return t.indexOf(e) !== -1;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
columnSizingFeature:
|
|
16
|
-
columnResizingFeature:
|
|
17
|
-
columnOrderingFeature:
|
|
18
|
-
columnVisibilityFeature:
|
|
19
|
-
columnPinningFeature:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
const Vt = Pt({
|
|
15
|
+
columnSizingFeature: ln,
|
|
16
|
+
columnResizingFeature: on,
|
|
17
|
+
columnOrderingFeature: nn,
|
|
18
|
+
columnVisibilityFeature: en,
|
|
19
|
+
columnPinningFeature: tn,
|
|
20
|
+
rowExpandingFeature: Je,
|
|
21
|
+
rowPinningFeature: qe,
|
|
22
|
+
rowSelectionFeature: je,
|
|
23
|
+
cellSelectionFeature: Ze,
|
|
24
|
+
rowSortingFeature: Qe,
|
|
25
|
+
expandedRowModel: rn(),
|
|
26
|
+
sortedRowModel: sn(),
|
|
27
|
+
sortFns: Ke
|
|
28
|
+
}), En = (t) => cn({
|
|
27
29
|
...t,
|
|
28
30
|
initialState: t.initialState ?? {},
|
|
29
|
-
features: t.features ??
|
|
31
|
+
features: t.features ?? Vt,
|
|
30
32
|
columnResizeMode: t.columnResizeMode ?? "onEnd"
|
|
31
33
|
});
|
|
32
|
-
function
|
|
34
|
+
function gn({
|
|
33
35
|
table: t,
|
|
34
36
|
numFrozenColumns: e,
|
|
35
37
|
numFrozenRows: n
|
|
36
38
|
}) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
const l = t.getVisibleLeafColumns(), s = t.getRowModel().rows;
|
|
40
|
+
dt(() => {
|
|
39
41
|
var c;
|
|
40
42
|
if (t.setColumnPinning == null)
|
|
41
43
|
return;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
}, [e, t,
|
|
44
|
+
const o = l.slice(0, Math.max(0, e)).map((i) => i.id), r = ((c = t.state.columnPinning) == null ? void 0 : c.start) ?? [];
|
|
45
|
+
Zt(r, o) || t.setColumnPinning((i) => ({ ...i, start: o }));
|
|
46
|
+
}, [e, t, l]), dt(() => {
|
|
45
47
|
var c;
|
|
46
48
|
if (t.setRowPinning == null)
|
|
47
49
|
return;
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
+
const o = s.slice(0, Math.max(0, n)).map((i) => i.id), r = ((c = t.state.rowPinning) == null ? void 0 : c.top) ?? [];
|
|
51
|
+
Zt(r, o) || t.setRowPinning((i) => ({ ...i, top: o }));
|
|
50
52
|
}, [n, s, t]);
|
|
51
53
|
}
|
|
52
|
-
function
|
|
53
|
-
return t.length === e.length && t.every((n,
|
|
54
|
+
function Zt(t, e) {
|
|
55
|
+
return t.length === e.length && t.every((n, l) => n === e[l]);
|
|
54
56
|
}
|
|
55
|
-
const
|
|
56
|
-
function
|
|
57
|
+
const Ee = 5;
|
|
58
|
+
function Ln({
|
|
57
59
|
table: t,
|
|
58
60
|
columnHeaderHeight: e,
|
|
59
61
|
frozenRowCount: n,
|
|
60
|
-
frozenRowsHeight:
|
|
62
|
+
frozenRowsHeight: l,
|
|
61
63
|
getRowHeight: s,
|
|
62
|
-
scrollContainerRef:
|
|
64
|
+
scrollContainerRef: o,
|
|
63
65
|
enableRowVirtualization: r,
|
|
64
66
|
overscanRowCount: c
|
|
65
67
|
}) {
|
|
66
|
-
const i = Math.max(0, t.getRowModel().rows.length - n), u =
|
|
68
|
+
const i = Math.max(0, t.getRowModel().rows.length - n), u = an({
|
|
67
69
|
count: i,
|
|
68
|
-
getScrollElement: () =>
|
|
70
|
+
getScrollElement: () => o.current,
|
|
69
71
|
estimateSize: (f) => s(n + f),
|
|
70
72
|
overscan: c,
|
|
71
73
|
/**
|
|
@@ -73,32 +75,32 @@ function dn({
|
|
|
73
75
|
* rows inside the shared scroll container; this offset aligns virtual item
|
|
74
76
|
* offsets with the absolute positioning used by body cells.
|
|
75
77
|
*/
|
|
76
|
-
scrollMargin: e +
|
|
78
|
+
scrollMargin: e + l,
|
|
77
79
|
enabled: r
|
|
78
80
|
});
|
|
79
|
-
return
|
|
81
|
+
return dt(() => {
|
|
80
82
|
u.measure();
|
|
81
83
|
}, [n, s, u]), r ? u : void 0;
|
|
82
84
|
}
|
|
83
|
-
function
|
|
85
|
+
function jt({
|
|
84
86
|
value: t,
|
|
85
87
|
initialValue: e,
|
|
86
88
|
finalValue: n,
|
|
87
|
-
onChange:
|
|
88
|
-
}
|
|
89
|
+
onChange: l
|
|
89
90
|
}) {
|
|
90
|
-
const [s,
|
|
91
|
+
const [s, o] = lt(
|
|
91
92
|
e !== void 0 ? e : n
|
|
92
|
-
), r = (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
), r = Z(s);
|
|
94
|
+
return [t !== void 0 ? t : s, (i) => {
|
|
95
|
+
const u = t !== void 0 ? t : r.current, f = typeof i == "function" ? i(u) : i;
|
|
96
|
+
t === void 0 && (r.current = f, o(() => f)), l == null || l(f);
|
|
97
|
+
}, t !== void 0];
|
|
98
|
+
}
|
|
99
|
+
const Tn = 20, Cn = 30, ge = 30, vn = 30, qt = 150, pn = 50, An = 200, Ft = Gt(void 0);
|
|
100
|
+
function Nn(t) {
|
|
99
101
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
100
102
|
}
|
|
101
|
-
var
|
|
103
|
+
var Le = { exports: {} };
|
|
102
104
|
/*!
|
|
103
105
|
Copyright (c) 2018 Jed Watson.
|
|
104
106
|
Licensed under the MIT License (MIT), see
|
|
@@ -108,52 +110,52 @@ var he = { exports: {} };
|
|
|
108
110
|
(function() {
|
|
109
111
|
var e = {}.hasOwnProperty;
|
|
110
112
|
function n() {
|
|
111
|
-
for (var
|
|
113
|
+
for (var o = "", r = 0; r < arguments.length; r++) {
|
|
112
114
|
var c = arguments[r];
|
|
113
|
-
c && (
|
|
115
|
+
c && (o = s(o, l(c)));
|
|
114
116
|
}
|
|
115
|
-
return
|
|
117
|
+
return o;
|
|
116
118
|
}
|
|
117
|
-
function o
|
|
118
|
-
if (typeof
|
|
119
|
-
return
|
|
120
|
-
if (typeof
|
|
119
|
+
function l(o) {
|
|
120
|
+
if (typeof o == "string" || typeof o == "number")
|
|
121
|
+
return o;
|
|
122
|
+
if (typeof o != "object")
|
|
121
123
|
return "";
|
|
122
|
-
if (Array.isArray(
|
|
123
|
-
return n.apply(null,
|
|
124
|
-
if (
|
|
125
|
-
return
|
|
124
|
+
if (Array.isArray(o))
|
|
125
|
+
return n.apply(null, o);
|
|
126
|
+
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
|
|
127
|
+
return o.toString();
|
|
126
128
|
var r = "";
|
|
127
|
-
for (var c in
|
|
128
|
-
e.call(
|
|
129
|
+
for (var c in o)
|
|
130
|
+
e.call(o, c) && o[c] && (r = s(r, c));
|
|
129
131
|
return r;
|
|
130
132
|
}
|
|
131
|
-
function s(
|
|
132
|
-
return r ?
|
|
133
|
+
function s(o, r) {
|
|
134
|
+
return r ? o ? o + " " + r : o + r : o;
|
|
133
135
|
}
|
|
134
136
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
135
137
|
})();
|
|
136
|
-
})(
|
|
137
|
-
var
|
|
138
|
-
const
|
|
139
|
-
function
|
|
138
|
+
})(Le);
|
|
139
|
+
var _n = Le.exports;
|
|
140
|
+
const G = /* @__PURE__ */ Nn(_n), h = ft.getClassNamespace(), Sn = `${h}-table-body-cells`, Rn = `${h}-table-body-virtual-client`, Jt = `${h}-table-bottom-container`, Te = `${h}-table-cell`, In = `${h}-table-cell-client`, Mn = `${h}-table-cell-ghost`, Ce = `${h}-table-cell-ledger-even`, ve = `${h}-table-cell-ledger-odd`, On = `${h}-table-column-header-tr`, yn = `${h}-table-column-headers`, bt = `${h}-table-column-header-cell`, pe = `${h}-table-column-name`, Ae = `${h}-table-column-name-text`, xn = `${h}-table-container`, _t = `${h}-table-dragging`, Ne = `${h}-table-focus-region`, Bn = `${h}-table-has-reorder-handle`, Tt = `${h}-table-header`, Dn = `${h}-table-header-active`, _e = `${h}-table-header-content`, $n = `${h}-table-horizontal-guide`, kt = `${h}-table-last-in-column`, Se = `${h}-table-last-in-row`, Hn = `${h}-table-menu`, Un = `${h}-table-no-horizontal-scroll`, zn = `${h}-table-no-vertical-scroll`, Re = `${h}-table-no-wrap-text`, yt = `${h}-table-overlay`, Yt = `${h}-table-overlay-layer`, Fn = `${h}-table-pagination-bar`, te = `${h}-table-pagination-bar-controls`, Ht = `${h}-table-pagination-bar-text`, Gn = `${h}-table-pagination-layout`, Wn = `${h}-table-quadrant`, Pn = `${h}-table-quadrant-body-container`, Vn = `${h}-table-quadrant-left`, bn = `${h}-table-quadrant-main`, kn = `${h}-table-quadrant-scroll-container`, Yn = `${h}-table-quadrant-stack`, Xn = `${h}-table-quadrant-top`, Kn = `${h}-table-quadrant-top-left`, Qn = `${h}-table-region`, Zn = `${h}-table-reorder-handle`, jn = `${h}-table-reorder-handle-target`, Ie = `${h}-table-resize-guides`, Me = `${h}-table-resize-handle`, Oe = `${h}-table-resize-handle-target`, qn = `${h}-table-resize-horizontal`, Jn = `${h}-table-resize-vertical`, to = `${h}-table-row-headers`, ee = `${h}-table-row-headers-cells-container`, ye = `${h}-table-row-name`, xe = `${h}-table-row-name-text`, eo = `${h}-table-cell-with-expander`, no = `${h}-table-row-expander`, oo = `${h}-table-row-detail`, Xt = `${h}-table-row-selected`, Be = `${h}-table-row-selection-cell`, De = `${h}-table-row-selection-checkbox`, lo = `${h}-table-row-selection-header-cell`, so = `${h}-table-selection-enabled`, $e = `${h}-table-selection-region`, ro = `${h}-table-th-menu`, co = `${h}-table-th-menu-container`, io = `${h}-table-th-menu-container-background`, ao = `${h}-table-th-menu-open`, uo = `${h}-table-thead`, fo = `${h}-table-top-container`, He = `${h}-table-truncated-cell`, Ue = `${h}-table-truncated-text`, ze = `${h}-table-vertical-guide`;
|
|
141
|
+
function Fe(t, e) {
|
|
140
142
|
return typeof e == "number" ? `${t}${e}` : e.indexOf(t) === 0 ? e : `${t}${e}`;
|
|
141
143
|
}
|
|
142
|
-
function
|
|
143
|
-
return
|
|
144
|
+
function Kt(t) {
|
|
145
|
+
return Fe(`${h}-table-cell-col-`, t);
|
|
144
146
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
147
|
+
function vt(t) {
|
|
148
|
+
return Fe(`${h}-table-cell-row-`, t);
|
|
147
149
|
}
|
|
148
|
-
var
|
|
150
|
+
var ct = /* @__PURE__ */ ((t) => (t.CELLS = "cells", t.FULL_ROWS = "full-rows", t.FULL_COLUMNS = "full-columns", t.FULL_TABLE = "full-table", t))(ct || {}), Ge = /* @__PURE__ */ ((t) => (t.CELL = "cell", t))(Ge || {}), ho = /* @__PURE__ */ ((t) => (t.UP = "up", t.DOWN = "down", t.LEFT = "left", t.RIGHT = "right", t))(ho || {});
|
|
149
151
|
class A {
|
|
150
152
|
static getRegionCardinality(e) {
|
|
151
153
|
return e.cols != null && e.rows != null ? "cells" : e.cols != null ? "full-columns" : e.rows != null ? "full-rows" : "full-table";
|
|
152
154
|
}
|
|
153
|
-
static cell(e, n,
|
|
155
|
+
static cell(e, n, l, s) {
|
|
154
156
|
return {
|
|
155
157
|
cols: A.normalizeInterval(n, s),
|
|
156
|
-
rows: A.normalizeInterval(e,
|
|
158
|
+
rows: A.normalizeInterval(e, l)
|
|
157
159
|
};
|
|
158
160
|
}
|
|
159
161
|
static row(e, n) {
|
|
@@ -169,17 +171,17 @@ class A {
|
|
|
169
171
|
const n = A.getRegionCardinality(e);
|
|
170
172
|
return n === "cells" ? A.cell(e.rows[0], e.cols[0], e.rows[1], e.cols[1]) : n === "full-columns" ? A.column(e.cols[0], e.cols[1]) : n === "full-rows" ? A.row(e.rows[0], e.rows[1]) : A.table();
|
|
171
173
|
}
|
|
172
|
-
static update(e, n,
|
|
174
|
+
static update(e, n, l) {
|
|
173
175
|
const s = e.slice();
|
|
174
|
-
return
|
|
176
|
+
return l != null ? s.splice(l, 1, n) : (s.pop(), s.push(n)), s;
|
|
175
177
|
}
|
|
176
|
-
static clampRegion(e, n,
|
|
178
|
+
static clampRegion(e, n, l) {
|
|
177
179
|
const s = A.copy(e);
|
|
178
|
-
return e.rows != null && (s.rows[0] = A.clamp(e.rows[0], 0, n), s.rows[1] = A.clamp(e.rows[1], 0, n)), e.cols != null && (s.cols[0] = A.clamp(e.cols[0], 0,
|
|
180
|
+
return e.rows != null && (s.rows[0] = A.clamp(e.rows[0], 0, n), s.rows[1] = A.clamp(e.rows[1], 0, n)), e.cols != null && (s.cols[0] = A.clamp(e.cols[0], 0, l), s.cols[1] = A.clamp(e.cols[1], 0, l)), s;
|
|
179
181
|
}
|
|
180
182
|
static expandRegion(e, n) {
|
|
181
|
-
const
|
|
182
|
-
if (s !==
|
|
183
|
+
const l = A.getRegionCardinality(e), s = A.getRegionCardinality(n);
|
|
184
|
+
if (s !== l)
|
|
183
185
|
return n;
|
|
184
186
|
switch (s) {
|
|
185
187
|
case "full-rows":
|
|
@@ -206,14 +208,14 @@ class A {
|
|
|
206
208
|
static getRegionFromFocusedRegion(e) {
|
|
207
209
|
return A.cell(e.row, e.col);
|
|
208
210
|
}
|
|
209
|
-
static getCellRegionFromRegion(e, n,
|
|
211
|
+
static getCellRegionFromRegion(e, n, l) {
|
|
210
212
|
switch (A.getRegionCardinality(e)) {
|
|
211
213
|
case "full-table":
|
|
212
|
-
return A.cell(0, 0, n - 1,
|
|
214
|
+
return A.cell(0, 0, n - 1, l - 1);
|
|
213
215
|
case "full-columns":
|
|
214
216
|
return A.cell(0, e.cols[0], n - 1, e.cols[1]);
|
|
215
217
|
case "full-rows":
|
|
216
|
-
return A.cell(e.rows[0], 0, e.rows[1],
|
|
218
|
+
return A.cell(e.rows[0], 0, e.rows[1], l - 1);
|
|
217
219
|
default:
|
|
218
220
|
return A.cell(e.rows[0], e.cols[0], e.rows[1], e.cols[1]);
|
|
219
221
|
}
|
|
@@ -240,9 +242,9 @@ class A {
|
|
|
240
242
|
static findContainingRegion(e, n) {
|
|
241
243
|
if (e == null)
|
|
242
244
|
return -1;
|
|
243
|
-
for (let
|
|
244
|
-
if (A.regionContains(e[
|
|
245
|
-
return
|
|
245
|
+
for (let l = 0; l < e.length; l++)
|
|
246
|
+
if (A.regionContains(e[l], n))
|
|
247
|
+
return l;
|
|
246
248
|
return -1;
|
|
247
249
|
}
|
|
248
250
|
/**
|
|
@@ -257,24 +259,24 @@ class A {
|
|
|
257
259
|
* query region must be fully contained in the corresponding interval of a
|
|
258
260
|
* region.
|
|
259
261
|
*/
|
|
260
|
-
static overlapsRegion(e, n,
|
|
261
|
-
const s =
|
|
262
|
+
static overlapsRegion(e, n, l = !1) {
|
|
263
|
+
const s = l ? A.intervalOverlaps : A.intervalContains;
|
|
262
264
|
if (e == null || n == null)
|
|
263
265
|
return !1;
|
|
264
|
-
for (const
|
|
265
|
-
switch (A.getRegionCardinality(
|
|
266
|
+
for (const o of e)
|
|
267
|
+
switch (A.getRegionCardinality(o)) {
|
|
266
268
|
case "full-table":
|
|
267
269
|
return !0;
|
|
268
270
|
case "full-columns":
|
|
269
|
-
if (s(
|
|
271
|
+
if (s(o.cols, n.cols))
|
|
270
272
|
return !0;
|
|
271
273
|
continue;
|
|
272
274
|
case "full-rows":
|
|
273
|
-
if (s(
|
|
275
|
+
if (s(o.rows, n.rows))
|
|
274
276
|
return !0;
|
|
275
277
|
continue;
|
|
276
278
|
case "cells":
|
|
277
|
-
if (s(
|
|
279
|
+
if (s(o.cols, n.cols) && s(o.rows, n.rows))
|
|
278
280
|
return !0;
|
|
279
281
|
continue;
|
|
280
282
|
}
|
|
@@ -285,23 +287,23 @@ class A {
|
|
|
285
287
|
* an ordered array of every unique cell that exists in those regions. The
|
|
286
288
|
* cell coordinates are sorted by row and then column.
|
|
287
289
|
*/
|
|
288
|
-
static enumerateUniqueCells(e, n,
|
|
290
|
+
static enumerateUniqueCells(e, n, l) {
|
|
289
291
|
if (e == null || e.length === 0)
|
|
290
292
|
return [];
|
|
291
|
-
const s = /* @__PURE__ */ new Set(),
|
|
293
|
+
const s = /* @__PURE__ */ new Set(), o = [];
|
|
292
294
|
for (const r of e)
|
|
293
|
-
A.eachCellInRegion(r, n,
|
|
295
|
+
A.eachCellInRegion(r, n, l, (c, i) => {
|
|
294
296
|
const u = `${c}-${i}`;
|
|
295
|
-
s.has(u) || (s.add(u),
|
|
297
|
+
s.has(u) || (s.add(u), o.push({ col: i, row: c }));
|
|
296
298
|
});
|
|
297
|
-
return
|
|
299
|
+
return o.sort((r, c) => r.row - c.row || r.col - c.col), o;
|
|
298
300
|
}
|
|
299
301
|
static joinStyledRegionGroups(e, n) {
|
|
300
|
-
const
|
|
301
|
-
return e != null && e.length > 0 &&
|
|
302
|
-
className:
|
|
302
|
+
const l = [];
|
|
303
|
+
return e != null && e.length > 0 && l.push({ className: $e, regions: e }), n != null && l.push({
|
|
304
|
+
className: Ne,
|
|
303
305
|
regions: [A.getRegionFromFocusedRegion(n)]
|
|
304
|
-
}),
|
|
306
|
+
}), l;
|
|
305
307
|
}
|
|
306
308
|
static regionContains(e, n) {
|
|
307
309
|
return A.overlapsRegion([e], n, !1);
|
|
@@ -312,41 +314,41 @@ class A {
|
|
|
312
314
|
static intervalOverlaps(e, n) {
|
|
313
315
|
return e == null || n == null ? !1 : e[0] <= n[1] && n[0] <= e[1];
|
|
314
316
|
}
|
|
315
|
-
static eachCellInRegion(e, n,
|
|
317
|
+
static eachCellInRegion(e, n, l, s) {
|
|
316
318
|
switch (A.getRegionCardinality(e)) {
|
|
317
319
|
case "full-table":
|
|
318
|
-
for (let
|
|
319
|
-
for (let r = 0; r <
|
|
320
|
-
s(
|
|
320
|
+
for (let o = 0; o < n; o++)
|
|
321
|
+
for (let r = 0; r < l; r++)
|
|
322
|
+
s(o, r);
|
|
321
323
|
break;
|
|
322
324
|
case "full-columns":
|
|
323
|
-
for (let
|
|
325
|
+
for (let o = 0; o < n; o++)
|
|
324
326
|
for (let r = e.cols[0]; r <= e.cols[1]; r++)
|
|
325
|
-
s(
|
|
327
|
+
s(o, r);
|
|
326
328
|
break;
|
|
327
329
|
case "full-rows":
|
|
328
|
-
for (let
|
|
329
|
-
for (let r = 0; r <
|
|
330
|
-
s(
|
|
330
|
+
for (let o = e.rows[0]; o <= e.rows[1]; o++)
|
|
331
|
+
for (let r = 0; r < l; r++)
|
|
332
|
+
s(o, r);
|
|
331
333
|
break;
|
|
332
334
|
case "cells":
|
|
333
|
-
for (let
|
|
335
|
+
for (let o = e.rows[0]; o <= e.rows[1]; o++)
|
|
334
336
|
for (let r = e.cols[0]; r <= e.cols[1]; r++)
|
|
335
|
-
s(
|
|
337
|
+
s(o, r);
|
|
336
338
|
break;
|
|
337
339
|
}
|
|
338
340
|
}
|
|
339
|
-
static clamp(e, n,
|
|
340
|
-
return Math.max(n, Math.min(
|
|
341
|
+
static clamp(e, n, l) {
|
|
342
|
+
return Math.max(n, Math.min(l, e));
|
|
341
343
|
}
|
|
342
344
|
static intervalsEqual(e, n) {
|
|
343
345
|
return e == null ? n == null : n == null ? !1 : e[0] === n[0] && e[1] === n[1];
|
|
344
346
|
}
|
|
345
347
|
static normalizeInterval(e, n) {
|
|
346
|
-
return (n == null ? [e, e] : [e, n]).sort((s,
|
|
348
|
+
return (n == null ? [e, e] : [e, n]).sort((s, o) => s - o);
|
|
347
349
|
}
|
|
348
350
|
}
|
|
349
|
-
function
|
|
351
|
+
function mo(t) {
|
|
350
352
|
switch (t) {
|
|
351
353
|
case "up":
|
|
352
354
|
return { rows: -1, cols: 0 };
|
|
@@ -358,7 +360,7 @@ function lo(t) {
|
|
|
358
360
|
return { rows: 0, cols: 1 };
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
|
-
function
|
|
363
|
+
function dl(t, e) {
|
|
362
364
|
switch (e) {
|
|
363
365
|
case "up":
|
|
364
366
|
return { ...t, focusSelectionIndex: 0, row: t.row - 1 };
|
|
@@ -370,110 +372,104 @@ function el(t, e) {
|
|
|
370
372
|
return { ...t, col: t.col + 1, focusSelectionIndex: 0 };
|
|
371
373
|
}
|
|
372
374
|
}
|
|
373
|
-
function
|
|
375
|
+
function fl(t, e, n) {
|
|
374
376
|
if (A.getRegionCardinality(t) === "full-table")
|
|
375
377
|
return t;
|
|
376
|
-
const
|
|
377
|
-
let s = 0,
|
|
378
|
+
const l = A.copy(t);
|
|
379
|
+
let s = 0, o = 0;
|
|
378
380
|
if (n != null) {
|
|
379
|
-
const c =
|
|
380
|
-
e === "up" ? s = c && !i ? 1 : 0 : e === "down" ? s = i && !c ? 0 : 1 : e === "left" ?
|
|
381
|
+
const c = l.rows != null && n.row === l.rows[0], i = l.rows != null && n.row === l.rows[1], u = l.cols != null && n.col === l.cols[0], f = l.cols != null && n.col === l.cols[1];
|
|
382
|
+
e === "up" ? s = c && !i ? 1 : 0 : e === "down" ? s = i && !c ? 0 : 1 : e === "left" ? o = u && !f ? 1 : 0 : o = f && !u ? 0 : 1;
|
|
381
383
|
} else
|
|
382
|
-
s = e === "down" ? 1 : 0,
|
|
383
|
-
const r =
|
|
384
|
-
return
|
|
384
|
+
s = e === "down" ? 1 : 0, o = e === "right" ? 1 : 0;
|
|
385
|
+
const r = mo(e);
|
|
386
|
+
return l.rows != null && (l.rows[s] += r.rows), l.cols != null && (l.cols[o] += r.cols), l;
|
|
385
387
|
}
|
|
386
|
-
function
|
|
388
|
+
function We(t) {
|
|
387
389
|
return t.getStartVisibleLeafColumns().length;
|
|
388
390
|
}
|
|
389
|
-
function
|
|
391
|
+
function mt(t) {
|
|
390
392
|
return t.getTopRows().length;
|
|
391
393
|
}
|
|
392
|
-
function
|
|
394
|
+
function Ct(t) {
|
|
393
395
|
return t.getStartTotalSize();
|
|
394
396
|
}
|
|
395
|
-
function
|
|
397
|
+
function St(t, e) {
|
|
396
398
|
return e === "start" ? t.getStartVisibleLeafColumns() : t.getCenterVisibleLeafColumns();
|
|
397
399
|
}
|
|
398
|
-
function
|
|
400
|
+
function pt(t, e) {
|
|
399
401
|
return e === "start" ? t.getStartTotalSize() : t.getCenterTotalSize();
|
|
400
402
|
}
|
|
401
|
-
function
|
|
402
|
-
return e.getIsPinned() === "start" ? e.getStart("start") :
|
|
403
|
-
}
|
|
404
|
-
function Bt(t, e) {
|
|
405
|
-
return ro(0, rt(t), e);
|
|
403
|
+
function wo(t, e, n) {
|
|
404
|
+
return e.getIsPinned() === "start" ? e.getStart("start") : Ct(t) + e.getStart("center") - n;
|
|
406
405
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
409
|
-
for (let s = t; s < e; s++)
|
|
410
|
-
o += n(s);
|
|
411
|
-
return o;
|
|
406
|
+
function xt(t, e) {
|
|
407
|
+
return e(mt(t));
|
|
412
408
|
}
|
|
413
|
-
function
|
|
409
|
+
function ne(t, e, n) {
|
|
414
410
|
if (n < 0)
|
|
415
411
|
return;
|
|
416
|
-
let
|
|
417
|
-
const s =
|
|
418
|
-
let
|
|
419
|
-
for (;
|
|
420
|
-
const r =
|
|
412
|
+
let l = 0;
|
|
413
|
+
const s = St(t, e);
|
|
414
|
+
let o = s.length - 1;
|
|
415
|
+
for (; l <= o; ) {
|
|
416
|
+
const r = l + o >> 1, c = s[r], i = c.getStart(e);
|
|
421
417
|
if (n < i) {
|
|
422
|
-
|
|
418
|
+
o = r - 1;
|
|
423
419
|
continue;
|
|
424
420
|
}
|
|
425
421
|
if (n >= i + c.getSize()) {
|
|
426
|
-
|
|
422
|
+
l = r + 1;
|
|
427
423
|
continue;
|
|
428
424
|
}
|
|
429
425
|
return c.getIndex();
|
|
430
426
|
}
|
|
431
427
|
}
|
|
432
|
-
function
|
|
433
|
-
const
|
|
428
|
+
function oe(t, e, n, l, s) {
|
|
429
|
+
const o = mt(t), r = t.getRowModel().rows.length, c = e === "top" ? 0 : o, i = e === "top" ? o : r;
|
|
434
430
|
if (n < 0 || c >= i)
|
|
435
431
|
return;
|
|
436
|
-
const u =
|
|
437
|
-
let f = c,
|
|
438
|
-
for (; f <=
|
|
439
|
-
const
|
|
440
|
-
if (n <
|
|
441
|
-
|
|
432
|
+
const u = l(c);
|
|
433
|
+
let f = c, d = i - 1;
|
|
434
|
+
for (; f <= d; ) {
|
|
435
|
+
const E = f + d >> 1, v = l(E) - u;
|
|
436
|
+
if (n < v) {
|
|
437
|
+
d = E - 1;
|
|
442
438
|
continue;
|
|
443
439
|
}
|
|
444
|
-
if (n >=
|
|
445
|
-
f =
|
|
440
|
+
if (n >= v + s(E)) {
|
|
441
|
+
f = E + 1;
|
|
446
442
|
continue;
|
|
447
443
|
}
|
|
448
|
-
return
|
|
444
|
+
return E;
|
|
449
445
|
}
|
|
450
446
|
}
|
|
451
|
-
function
|
|
447
|
+
function Eo({
|
|
452
448
|
table: t,
|
|
453
449
|
scrollContainerRef: e,
|
|
454
450
|
rowHeaderWidth: n,
|
|
455
|
-
columnHeaderHeight:
|
|
451
|
+
columnHeaderHeight: l,
|
|
456
452
|
getRowTop: s,
|
|
457
|
-
getRowHeight:
|
|
453
|
+
getRowHeight: o
|
|
458
454
|
}, r, c) {
|
|
459
455
|
const i = e.current;
|
|
460
456
|
if (i == null)
|
|
461
457
|
return;
|
|
462
|
-
const u = i.getBoundingClientRect(), f = r - u.left,
|
|
463
|
-
if (!(
|
|
464
|
-
return { col:
|
|
465
|
-
}
|
|
466
|
-
class
|
|
467
|
-
constructor({ table: e, target: n, selectedRegions:
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
458
|
+
const u = i.getBoundingClientRect(), f = r - u.left, d = c - u.top, E = Ct(t), v = xt(t, s), N = f - n, g = N - E + i.scrollLeft, L = d - l, T = L - v + i.scrollTop, C = N >= 0 && N < E ? ne(t, "start", N) : ne(t, "center", g), m = L >= 0 && L < v ? oe(t, "top", L, s, o) : oe(t, "center", T, s, o);
|
|
459
|
+
if (!(C == null || m == null))
|
|
460
|
+
return { col: C, row: m };
|
|
461
|
+
}
|
|
462
|
+
class go {
|
|
463
|
+
constructor({ table: e, target: n, selectedRegions: l, numRows: s, numCols: o }) {
|
|
464
|
+
Et(this, "target");
|
|
465
|
+
Et(this, "regions");
|
|
466
|
+
Et(this, "selectedRegions");
|
|
467
|
+
Et(this, "numRows");
|
|
468
|
+
Et(this, "numCols");
|
|
469
|
+
Et(this, "targetRow");
|
|
470
|
+
Et(this, "targetCell");
|
|
475
471
|
var r;
|
|
476
|
-
this.target = n, this.selectedRegions =
|
|
472
|
+
this.target = n, this.selectedRegions = l, this.numRows = s, this.numCols = o, this.regions = A.overlapsRegion(l, n) ? l : [n], this.targetRow = e.getRowModel().rows[n.rows[0]], this.targetCell = (r = this.targetRow) == null ? void 0 : r.getVisibleCells()[n.cols[0]];
|
|
477
473
|
}
|
|
478
474
|
getTarget() {
|
|
479
475
|
return this.target;
|
|
@@ -494,60 +490,60 @@ class io {
|
|
|
494
490
|
return this.targetCell;
|
|
495
491
|
}
|
|
496
492
|
}
|
|
497
|
-
function
|
|
493
|
+
function Lo(t) {
|
|
498
494
|
var u, f;
|
|
499
495
|
const e = t.getVisibleLeafColumns(), n = t.state.columnPinning;
|
|
500
496
|
if (n == null || (((u = n.start) == null ? void 0 : u.length) ?? 0) + (((f = n.end) == null ? void 0 : f.length) ?? 0) === 0)
|
|
501
497
|
return e;
|
|
502
|
-
const
|
|
503
|
-
return [...s, ...i, ...
|
|
498
|
+
const l = new Map(e.map((d) => [d.id, d])), s = (n.start ?? []).map((d) => l.get(d)).filter((d) => d != null), o = (n.end ?? []).map((d) => l.get(d)).filter((d) => d != null), r = new Set(s.map((d) => d.id)), c = new Set(o.map((d) => d.id)), i = e.filter((d) => !r.has(d.id) && !c.has(d.id));
|
|
499
|
+
return [...s, ...i, ...o];
|
|
504
500
|
}
|
|
505
|
-
function
|
|
501
|
+
function To(t, e, n) {
|
|
506
502
|
if (t.length === 0)
|
|
507
503
|
return null;
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
for (let c =
|
|
504
|
+
const l = Math.max(0, Math.min(e, t.length - 1)), s = Math.max(0, Math.min(n, t.length - 1));
|
|
505
|
+
let o = Number.POSITIVE_INFINITY, r = Number.NEGATIVE_INFINITY;
|
|
506
|
+
for (let c = l; c <= s; c++) {
|
|
511
507
|
const i = t[c];
|
|
512
|
-
i <
|
|
508
|
+
i < o && (o = i), i > r && (r = i);
|
|
513
509
|
}
|
|
514
|
-
return [
|
|
510
|
+
return [o, r];
|
|
515
511
|
}
|
|
516
|
-
function
|
|
512
|
+
function Co(t, e, n) {
|
|
517
513
|
if (t.length === 0)
|
|
518
514
|
return null;
|
|
519
|
-
let
|
|
520
|
-
for (;
|
|
521
|
-
const c =
|
|
522
|
-
t[c].getDisplayIndex() >= e ? (
|
|
515
|
+
let l = 0, s = t.length - 1, o = -1;
|
|
516
|
+
for (; l <= s; ) {
|
|
517
|
+
const c = l + s >> 1;
|
|
518
|
+
t[c].getDisplayIndex() >= e ? (o = c, s = c - 1) : l = c + 1;
|
|
523
519
|
}
|
|
524
|
-
if (
|
|
520
|
+
if (o < 0 || t[o].getDisplayIndex() > n)
|
|
525
521
|
return null;
|
|
526
|
-
|
|
527
|
-
let r =
|
|
528
|
-
for (;
|
|
529
|
-
const c =
|
|
530
|
-
t[c].getDisplayIndex() <= n ? (r = c,
|
|
522
|
+
l = o, s = t.length - 1;
|
|
523
|
+
let r = o;
|
|
524
|
+
for (; l <= s; ) {
|
|
525
|
+
const c = l + s >> 1;
|
|
526
|
+
t[c].getDisplayIndex() <= n ? (r = c, l = c + 1) : s = c - 1;
|
|
531
527
|
}
|
|
532
|
-
return [
|
|
528
|
+
return [o, r];
|
|
533
529
|
}
|
|
534
|
-
function
|
|
535
|
-
const s = t[0] === 0 && t[1] === n - 1,
|
|
536
|
-
return s &&
|
|
530
|
+
function vo(t, e, n, l) {
|
|
531
|
+
const s = t[0] === 0 && t[1] === n - 1, o = e[0] === 0 && e[1] === l - 1;
|
|
532
|
+
return s && o ? A.table() : o ? A.row(t[0], t[1]) : s ? A.column(e[0], e[1]) : A.cell(t[0], e[0], t[1], e[1]);
|
|
537
533
|
}
|
|
538
|
-
function
|
|
534
|
+
function le(t) {
|
|
539
535
|
const e = t.getCellSelectionBounds();
|
|
540
536
|
if (e.length === 0)
|
|
541
537
|
return [];
|
|
542
|
-
const n = t.getRowModel().rows, s =
|
|
538
|
+
const n = t.getRowModel().rows, s = Lo(t).map((r) => r.getIndex()), o = [];
|
|
543
539
|
for (const r of e) {
|
|
544
|
-
const c =
|
|
540
|
+
const c = Co(n, r.minRowIndex, r.maxRowIndex), i = To(
|
|
545
541
|
s,
|
|
546
542
|
r.minColumnIndex,
|
|
547
543
|
r.maxColumnIndex
|
|
548
544
|
);
|
|
549
|
-
c == null || i == null ||
|
|
550
|
-
|
|
545
|
+
c == null || i == null || o.push(
|
|
546
|
+
vo(
|
|
551
547
|
c,
|
|
552
548
|
i,
|
|
553
549
|
n.length,
|
|
@@ -555,41 +551,41 @@ function qt(t) {
|
|
|
555
551
|
)
|
|
556
552
|
);
|
|
557
553
|
}
|
|
558
|
-
return
|
|
554
|
+
return o;
|
|
559
555
|
}
|
|
560
|
-
function
|
|
556
|
+
function po(t, e) {
|
|
561
557
|
if (e == null || e.length === 0)
|
|
562
558
|
return [];
|
|
563
|
-
const n = t.getRowModel().rows,
|
|
564
|
-
if (n.length === 0 ||
|
|
559
|
+
const n = t.getRowModel().rows, l = t.getVisibleLeafColumns();
|
|
560
|
+
if (n.length === 0 || l.length === 0)
|
|
565
561
|
return [];
|
|
566
562
|
const s = [];
|
|
567
|
-
for (const
|
|
563
|
+
for (const o of e) {
|
|
568
564
|
let r, c;
|
|
569
|
-
switch (A.getRegionCardinality(
|
|
570
|
-
case
|
|
571
|
-
r = [0, n.length - 1], c = [0,
|
|
565
|
+
switch (A.getRegionCardinality(o)) {
|
|
566
|
+
case ct.FULL_TABLE:
|
|
567
|
+
r = [0, n.length - 1], c = [0, l.length - 1];
|
|
572
568
|
break;
|
|
573
|
-
case
|
|
574
|
-
r = [0, n.length - 1], c =
|
|
569
|
+
case ct.FULL_COLUMNS:
|
|
570
|
+
r = [0, n.length - 1], c = o.cols;
|
|
575
571
|
break;
|
|
576
|
-
case
|
|
577
|
-
r =
|
|
572
|
+
case ct.FULL_ROWS:
|
|
573
|
+
r = o.rows, c = [0, l.length - 1];
|
|
578
574
|
break;
|
|
579
575
|
default:
|
|
580
|
-
r =
|
|
576
|
+
r = o.rows, c = o.cols;
|
|
581
577
|
break;
|
|
582
578
|
}
|
|
583
|
-
r[0] < 0 || r[1] >= n.length || c[0] < 0 || c[1] >=
|
|
579
|
+
r[0] < 0 || r[1] >= n.length || c[0] < 0 || c[1] >= l.length || s.push({
|
|
584
580
|
anchorRowId: n[r[0]].id,
|
|
585
|
-
anchorColumnId:
|
|
581
|
+
anchorColumnId: l[c[0]].id,
|
|
586
582
|
focusRowId: n[r[1]].id,
|
|
587
|
-
focusColumnId:
|
|
583
|
+
focusColumnId: l[c[1]].id
|
|
588
584
|
});
|
|
589
585
|
}
|
|
590
586
|
return s;
|
|
591
587
|
}
|
|
592
|
-
function
|
|
588
|
+
function se(t) {
|
|
593
589
|
const e = t.getFocusedCell();
|
|
594
590
|
if (e == null)
|
|
595
591
|
return;
|
|
@@ -597,12 +593,12 @@ function Jt(t) {
|
|
|
597
593
|
if (!(n < 0))
|
|
598
594
|
return { row: n, col: e.column.getIndex() };
|
|
599
595
|
}
|
|
600
|
-
function
|
|
601
|
-
const n = t.getRowModel().rows[e.row],
|
|
602
|
-
if (!(n == null ||
|
|
603
|
-
return n.getAllCellsByColumnId()[
|
|
596
|
+
function Ao(t, e) {
|
|
597
|
+
const n = t.getRowModel().rows[e.row], l = t.getVisibleLeafColumns()[e.col];
|
|
598
|
+
if (!(n == null || l == null))
|
|
599
|
+
return n.getAllCellsByColumnId()[l.id];
|
|
604
600
|
}
|
|
605
|
-
function
|
|
601
|
+
function re(t) {
|
|
606
602
|
return JSON.stringify(
|
|
607
603
|
t.map((e) => ({
|
|
608
604
|
rows: e.rows ?? null,
|
|
@@ -610,259 +606,259 @@ function te(t) {
|
|
|
610
606
|
}))
|
|
611
607
|
);
|
|
612
608
|
}
|
|
613
|
-
function
|
|
609
|
+
function No({
|
|
614
610
|
table: t,
|
|
615
611
|
getRowTop: e,
|
|
616
612
|
getRowHeight: n,
|
|
617
|
-
scrollContainerRef:
|
|
613
|
+
scrollContainerRef: l,
|
|
618
614
|
rowHeaderWidth: s,
|
|
619
|
-
columnHeaderHeight:
|
|
615
|
+
columnHeaderHeight: o,
|
|
620
616
|
bodyContextMenuRenderer: r,
|
|
621
617
|
enableBodyContextMenu: c,
|
|
622
618
|
enableFocusedCell: i = !1,
|
|
623
619
|
onFocusedCell: u,
|
|
624
620
|
onFocusedRegion: f,
|
|
625
|
-
selectedRegions:
|
|
626
|
-
onSelection:
|
|
627
|
-
selectionModes:
|
|
621
|
+
selectedRegions: d,
|
|
622
|
+
onSelection: E,
|
|
623
|
+
selectionModes: v
|
|
628
624
|
}) {
|
|
629
|
-
const
|
|
630
|
-
(w) =>
|
|
631
|
-
[
|
|
632
|
-
),
|
|
633
|
-
() =>
|
|
625
|
+
const N = d != null, g = c ?? r != null, L = Z(!1), T = Z(void 0), C = P(
|
|
626
|
+
(w) => v == null ? !0 : v.includes(w),
|
|
627
|
+
[v]
|
|
628
|
+
), m = t.state.cellSelection, U = t.state.columnPinning, y = t.getRowModel().rows, z = t.getVisibleLeafColumns(), S = gt(
|
|
629
|
+
() => le(t),
|
|
634
630
|
// The translation helper reads reactive table state (selection, rows,
|
|
635
631
|
// columns, pinning) that the linter cannot see through the `table` prop.
|
|
636
632
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
637
|
-
[
|
|
638
|
-
),
|
|
639
|
-
() => i ?
|
|
633
|
+
[m, U, y, t, z]
|
|
634
|
+
), R = gt(
|
|
635
|
+
() => i ? se(t) : void 0,
|
|
640
636
|
// Same as above: the helper reads the selection and row model from the table.
|
|
641
637
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
642
|
-
[
|
|
643
|
-
),
|
|
638
|
+
[m, i, y, t]
|
|
639
|
+
), V = gt(() => {
|
|
644
640
|
const w = [];
|
|
645
|
-
return
|
|
646
|
-
className:
|
|
647
|
-
regions: [A.cell(
|
|
641
|
+
return S.length > 0 && w.push({ className: $e, regions: S }), R != null && w.push({
|
|
642
|
+
className: Ne,
|
|
643
|
+
regions: [A.cell(R.row, R.col)]
|
|
648
644
|
}), w;
|
|
649
|
-
}, [
|
|
650
|
-
|
|
651
|
-
if (!
|
|
645
|
+
}, [R, S]);
|
|
646
|
+
Lt(() => {
|
|
647
|
+
if (!N)
|
|
652
648
|
return;
|
|
653
|
-
const w =
|
|
654
|
-
|
|
655
|
-
}, [
|
|
656
|
-
const
|
|
657
|
-
|
|
658
|
-
const w =
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
661
|
-
|
|
649
|
+
const w = re(d ?? []);
|
|
650
|
+
T.current !== w && (T.current = w, t.setCellSelection(po(t, d)));
|
|
651
|
+
}, [d, N, t]);
|
|
652
|
+
const j = Z(null), _ = Z(!1);
|
|
653
|
+
Lt(() => {
|
|
654
|
+
const w = re(S);
|
|
655
|
+
if (j.current !== w) {
|
|
656
|
+
if (j.current = w, !_.current) {
|
|
657
|
+
_.current = !0;
|
|
662
658
|
return;
|
|
663
659
|
}
|
|
664
|
-
|
|
660
|
+
N && T.current === w || E == null || E(S);
|
|
665
661
|
}
|
|
666
|
-
}, [
|
|
667
|
-
const
|
|
668
|
-
|
|
662
|
+
}, [N, E, S]);
|
|
663
|
+
const x = Z(null);
|
|
664
|
+
Lt(() => {
|
|
669
665
|
if (!i)
|
|
670
666
|
return;
|
|
671
|
-
const w =
|
|
672
|
-
|
|
673
|
-
type:
|
|
674
|
-
row:
|
|
675
|
-
col:
|
|
667
|
+
const w = R != null ? `${R.row}-${R.col}` : null;
|
|
668
|
+
x.current !== w && (x.current = w, R != null && (u == null || u(R), f == null || f({
|
|
669
|
+
type: Ge.CELL,
|
|
670
|
+
row: R.row,
|
|
671
|
+
col: R.col,
|
|
676
672
|
focusSelectionIndex: 0
|
|
677
673
|
})));
|
|
678
|
-
}, [i,
|
|
679
|
-
const
|
|
674
|
+
}, [i, R, u, f]);
|
|
675
|
+
const H = P(() => {
|
|
680
676
|
var w;
|
|
681
|
-
i && ((w =
|
|
682
|
-
}, [i,
|
|
683
|
-
const w =
|
|
677
|
+
i && ((w = l.current) == null || w.focus());
|
|
678
|
+
}, [i, l]), I = P(() => {
|
|
679
|
+
const w = se(t);
|
|
684
680
|
if (w == null)
|
|
685
681
|
return;
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
682
|
+
const p = l.current;
|
|
683
|
+
if (p == null)
|
|
688
684
|
return;
|
|
689
|
-
const
|
|
690
|
-
if (
|
|
685
|
+
const $ = t.getVisibleLeafColumns()[w.col];
|
|
686
|
+
if ($ == null)
|
|
691
687
|
return;
|
|
692
|
-
const
|
|
693
|
-
let
|
|
694
|
-
if (w.col >=
|
|
695
|
-
const
|
|
696
|
-
|
|
688
|
+
const K = We(t), q = Ct(t), it = mt(t), nt = xt(t, e), tt = $.getStart(), at = tt + $.getSize(), ht = e(w.row), k = ht + n(w.row), Y = p.clientWidth - s - q, ot = p.clientHeight - o - nt;
|
|
689
|
+
let et = p.scrollLeft, rt = p.scrollTop;
|
|
690
|
+
if (w.col >= K) {
|
|
691
|
+
const ut = tt - q, wt = at - q;
|
|
692
|
+
ut < et ? et = Math.max(0, ut) : wt > et + Y && (et = wt - Y);
|
|
697
693
|
}
|
|
698
|
-
if (w.row >=
|
|
699
|
-
const
|
|
700
|
-
|
|
694
|
+
if (w.row >= it) {
|
|
695
|
+
const ut = ht - nt, wt = k - nt;
|
|
696
|
+
ut < rt ? rt = Math.max(0, ut) : wt > rt + ot && (rt = wt - ot);
|
|
701
697
|
}
|
|
702
|
-
|
|
698
|
+
et !== p.scrollLeft && (p.scrollLeft = et), rt !== p.scrollTop && (p.scrollTop = rt);
|
|
703
699
|
}, [
|
|
704
|
-
|
|
700
|
+
o,
|
|
705
701
|
n,
|
|
706
702
|
e,
|
|
707
703
|
s,
|
|
708
|
-
|
|
704
|
+
l,
|
|
709
705
|
t
|
|
710
706
|
]);
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}, [
|
|
714
|
-
const
|
|
707
|
+
Lt(() => {
|
|
708
|
+
L.current && (L.current = !1, I());
|
|
709
|
+
}, [m, I, t]);
|
|
710
|
+
const X = P(
|
|
715
711
|
(w) => {
|
|
716
|
-
const
|
|
717
|
-
let
|
|
718
|
-
if (
|
|
719
|
-
w.preventDefault(), w.stopPropagation(), w.shiftKey ? t.extendCellSelection(
|
|
712
|
+
const p = w.metaKey || w.ctrlKey, F = w.key;
|
|
713
|
+
let $;
|
|
714
|
+
if (F === "ArrowUp" ? $ = "up" : F === "ArrowDown" ? $ = "down" : F === "ArrowLeft" ? $ = "left" : F === "ArrowRight" && ($ = "right"), $ != null) {
|
|
715
|
+
w.preventDefault(), w.stopPropagation(), w.shiftKey ? t.extendCellSelection($) : i && (L.current = !0, t.moveCellSelection($));
|
|
720
716
|
return;
|
|
721
717
|
}
|
|
722
|
-
if (
|
|
723
|
-
w.preventDefault(), w.stopPropagation(),
|
|
718
|
+
if (F === "Tab" && i) {
|
|
719
|
+
w.preventDefault(), w.stopPropagation(), L.current = !0, t.moveCellSelection(w.shiftKey ? "left" : "right");
|
|
724
720
|
return;
|
|
725
721
|
}
|
|
726
|
-
if (
|
|
722
|
+
if (F === "Escape") {
|
|
727
723
|
w.preventDefault(), w.stopPropagation(), t.resetCellSelection(!0);
|
|
728
724
|
return;
|
|
729
725
|
}
|
|
730
|
-
|
|
726
|
+
p && F.toLowerCase() === "a" && (w.preventDefault(), w.stopPropagation(), t.selectAllCells());
|
|
731
727
|
},
|
|
732
728
|
[i, t]
|
|
733
|
-
),
|
|
734
|
-
(w,
|
|
735
|
-
{ table: t, scrollContainerRef:
|
|
729
|
+
), M = P(
|
|
730
|
+
(w, p) => Eo(
|
|
731
|
+
{ table: t, scrollContainerRef: l, rowHeaderWidth: s, columnHeaderHeight: o, getRowTop: e, getRowHeight: n },
|
|
736
732
|
w,
|
|
737
|
-
|
|
733
|
+
p
|
|
738
734
|
),
|
|
739
|
-
[
|
|
740
|
-
),
|
|
735
|
+
[o, n, e, s, l, t]
|
|
736
|
+
), O = P(
|
|
741
737
|
(w) => {
|
|
742
|
-
w.button === 0 &&
|
|
738
|
+
w.button === 0 && H();
|
|
743
739
|
},
|
|
744
|
-
[
|
|
745
|
-
),
|
|
740
|
+
[H]
|
|
741
|
+
), B = P(
|
|
746
742
|
(w) => {
|
|
747
|
-
if (!
|
|
743
|
+
if (!g)
|
|
748
744
|
return;
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
745
|
+
const p = M(w.clientX, w.clientY);
|
|
746
|
+
if (p == null)
|
|
751
747
|
return;
|
|
752
|
-
const
|
|
753
|
-
|
|
748
|
+
const F = Ao(t, p);
|
|
749
|
+
F != null && (F.getIsSelected() || C(ct.CELLS) && t.setCellSelection([
|
|
754
750
|
{
|
|
755
|
-
anchorRowId:
|
|
756
|
-
anchorColumnId:
|
|
757
|
-
focusRowId:
|
|
758
|
-
focusColumnId:
|
|
751
|
+
anchorRowId: F.row.id,
|
|
752
|
+
anchorColumnId: F.column.id,
|
|
753
|
+
focusRowId: F.row.id,
|
|
754
|
+
focusColumnId: F.column.id
|
|
759
755
|
}
|
|
760
756
|
]));
|
|
761
757
|
},
|
|
762
|
-
[
|
|
763
|
-
),
|
|
758
|
+
[M, g, C, t]
|
|
759
|
+
), D = P(
|
|
764
760
|
(w) => {
|
|
765
|
-
if (!
|
|
761
|
+
if (!g || r == null)
|
|
766
762
|
return;
|
|
767
|
-
const
|
|
768
|
-
if (
|
|
763
|
+
const p = M(w.clientX, w.clientY);
|
|
764
|
+
if (p == null)
|
|
769
765
|
return;
|
|
770
|
-
const
|
|
766
|
+
const F = new go({
|
|
771
767
|
table: t,
|
|
772
|
-
target: A.cell(
|
|
768
|
+
target: A.cell(p.row, p.col),
|
|
773
769
|
// Read the selection freshly: the right-click may have just moved it.
|
|
774
|
-
selectedRegions:
|
|
770
|
+
selectedRegions: le(t),
|
|
775
771
|
numRows: t.getRowModel().rows.length,
|
|
776
772
|
numCols: t.getVisibleLeafColumns().length
|
|
777
773
|
});
|
|
778
|
-
return r(
|
|
774
|
+
return r(F) ?? void 0;
|
|
779
775
|
},
|
|
780
|
-
[r,
|
|
781
|
-
),
|
|
782
|
-
(w,
|
|
783
|
-
if (!
|
|
784
|
-
t.resetCellSelection(!0),
|
|
776
|
+
[r, M, g, t]
|
|
777
|
+
), b = P(
|
|
778
|
+
(w, p) => {
|
|
779
|
+
if (!C(ct.FULL_COLUMNS)) {
|
|
780
|
+
t.resetCellSelection(!0), H();
|
|
785
781
|
return;
|
|
786
782
|
}
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
|
|
790
|
-
const q =
|
|
783
|
+
p.preventDefault(), p.stopPropagation();
|
|
784
|
+
const F = t.getRowModel().rows, $ = t.getVisibleLeafColumns()[w];
|
|
785
|
+
$ == null || F.length === 0 || (p.shiftKey ? t.setCellSelection((K) => {
|
|
786
|
+
const q = K[K.length - 1];
|
|
791
787
|
return q == null ? [
|
|
792
788
|
{
|
|
793
|
-
anchorRowId:
|
|
794
|
-
anchorColumnId:
|
|
795
|
-
focusRowId:
|
|
796
|
-
focusColumnId:
|
|
789
|
+
anchorRowId: F[0].id,
|
|
790
|
+
anchorColumnId: $.id,
|
|
791
|
+
focusRowId: F[F.length - 1].id,
|
|
792
|
+
focusColumnId: $.id
|
|
797
793
|
}
|
|
798
|
-
] : [...
|
|
794
|
+
] : [...K.slice(0, -1), { ...q, focusColumnId: $.id }];
|
|
799
795
|
}) : t.setCellSelection([
|
|
800
796
|
{
|
|
801
|
-
anchorRowId:
|
|
802
|
-
anchorColumnId:
|
|
803
|
-
focusRowId:
|
|
804
|
-
focusColumnId:
|
|
797
|
+
anchorRowId: F[0].id,
|
|
798
|
+
anchorColumnId: $.id,
|
|
799
|
+
focusRowId: F[F.length - 1].id,
|
|
800
|
+
focusColumnId: $.id
|
|
805
801
|
}
|
|
806
|
-
]),
|
|
802
|
+
]), H());
|
|
807
803
|
},
|
|
808
|
-
[
|
|
809
|
-
),
|
|
810
|
-
(w,
|
|
811
|
-
if (!
|
|
812
|
-
t.resetCellSelection(!0),
|
|
804
|
+
[H, C, t]
|
|
805
|
+
), J = P(
|
|
806
|
+
(w, p) => {
|
|
807
|
+
if (!C(ct.FULL_ROWS)) {
|
|
808
|
+
t.resetCellSelection(!0), H();
|
|
813
809
|
return;
|
|
814
810
|
}
|
|
815
|
-
|
|
816
|
-
const
|
|
817
|
-
|
|
818
|
-
const
|
|
819
|
-
return
|
|
811
|
+
p.preventDefault(), p.stopPropagation();
|
|
812
|
+
const F = t.getRowModel().rows, $ = t.getVisibleLeafColumns(), K = F[w];
|
|
813
|
+
K == null || $.length === 0 || (p.shiftKey ? t.setCellSelection((q) => {
|
|
814
|
+
const it = q[q.length - 1];
|
|
815
|
+
return it == null ? [
|
|
820
816
|
{
|
|
821
|
-
anchorRowId:
|
|
822
|
-
anchorColumnId:
|
|
823
|
-
focusRowId:
|
|
824
|
-
focusColumnId:
|
|
817
|
+
anchorRowId: K.id,
|
|
818
|
+
anchorColumnId: $[0].id,
|
|
819
|
+
focusRowId: K.id,
|
|
820
|
+
focusColumnId: $[$.length - 1].id
|
|
825
821
|
}
|
|
826
|
-
] : [...q.slice(0, -1), { ...
|
|
822
|
+
] : [...q.slice(0, -1), { ...it, focusRowId: K.id }];
|
|
827
823
|
}) : t.setCellSelection([
|
|
828
824
|
{
|
|
829
|
-
anchorRowId:
|
|
830
|
-
anchorColumnId:
|
|
831
|
-
focusRowId:
|
|
832
|
-
focusColumnId:
|
|
825
|
+
anchorRowId: K.id,
|
|
826
|
+
anchorColumnId: $[0].id,
|
|
827
|
+
focusRowId: K.id,
|
|
828
|
+
focusColumnId: $[$.length - 1].id
|
|
833
829
|
}
|
|
834
|
-
]),
|
|
830
|
+
]), H());
|
|
835
831
|
},
|
|
836
|
-
[
|
|
837
|
-
),
|
|
832
|
+
[H, C, t]
|
|
833
|
+
), st = P(
|
|
838
834
|
(w) => {
|
|
839
|
-
if (!
|
|
840
|
-
t.resetCellSelection(!0),
|
|
835
|
+
if (!C(ct.FULL_TABLE)) {
|
|
836
|
+
t.resetCellSelection(!0), H();
|
|
841
837
|
return;
|
|
842
838
|
}
|
|
843
|
-
w.preventDefault(), w.stopPropagation(), t.selectAllCells(),
|
|
839
|
+
w.preventDefault(), w.stopPropagation(), t.selectAllCells(), H();
|
|
844
840
|
},
|
|
845
|
-
[
|
|
841
|
+
[H, C, t]
|
|
846
842
|
);
|
|
847
843
|
return {
|
|
848
|
-
regionGroups:
|
|
849
|
-
handleBodyContextMenu:
|
|
850
|
-
handleBodyPointerDown:
|
|
851
|
-
handleColumnHeaderMouseDown:
|
|
852
|
-
handleKeyDown:
|
|
853
|
-
handleMenuMouseDown:
|
|
854
|
-
handleRowHeaderMouseDown:
|
|
855
|
-
isBodyContextMenuEnabled:
|
|
856
|
-
isSelectionModeEnabled:
|
|
857
|
-
renderBodyContextMenu:
|
|
844
|
+
regionGroups: V,
|
|
845
|
+
handleBodyContextMenu: B,
|
|
846
|
+
handleBodyPointerDown: O,
|
|
847
|
+
handleColumnHeaderMouseDown: b,
|
|
848
|
+
handleKeyDown: X,
|
|
849
|
+
handleMenuMouseDown: st,
|
|
850
|
+
handleRowHeaderMouseDown: J,
|
|
851
|
+
isBodyContextMenuEnabled: g,
|
|
852
|
+
isSelectionModeEnabled: C,
|
|
853
|
+
renderBodyContextMenu: D
|
|
858
854
|
};
|
|
859
855
|
}
|
|
860
|
-
function
|
|
856
|
+
function _o({
|
|
861
857
|
minHeight: t,
|
|
862
858
|
headerRowCount: e
|
|
863
859
|
}) {
|
|
864
|
-
const n =
|
|
865
|
-
|
|
860
|
+
const n = Z(null), [l, s] = lt(null);
|
|
861
|
+
dt(() => {
|
|
866
862
|
const r = n.current;
|
|
867
863
|
if (r == null)
|
|
868
864
|
return;
|
|
@@ -874,462 +870,528 @@ function Lo({
|
|
|
874
870
|
const i = new ResizeObserver(c);
|
|
875
871
|
return i.observe(r), () => i.disconnect();
|
|
876
872
|
}, []);
|
|
877
|
-
const
|
|
873
|
+
const o = Math.max(0, e) * ge;
|
|
878
874
|
return {
|
|
879
875
|
ref: n,
|
|
880
|
-
height: Math.max(t,
|
|
876
|
+
height: Math.max(t, o, l ?? 0)
|
|
881
877
|
};
|
|
882
878
|
}
|
|
883
|
-
function
|
|
879
|
+
function So({
|
|
884
880
|
enableGhostCells: t,
|
|
885
881
|
rowHeight: e,
|
|
886
882
|
rowHeaderWidth: n,
|
|
887
|
-
columnHeaderHeight:
|
|
883
|
+
columnHeaderHeight: l,
|
|
888
884
|
totalWidth: s,
|
|
889
|
-
totalHeight:
|
|
885
|
+
totalHeight: o,
|
|
890
886
|
scrollContainerRef: r
|
|
891
887
|
}) {
|
|
892
|
-
const [c, i] =
|
|
893
|
-
if (
|
|
894
|
-
const
|
|
895
|
-
if (
|
|
888
|
+
const [c, i] = lt(null);
|
|
889
|
+
if (dt(() => {
|
|
890
|
+
const v = r.current;
|
|
891
|
+
if (v == null)
|
|
896
892
|
return;
|
|
897
|
-
const
|
|
898
|
-
i({ width:
|
|
893
|
+
const N = () => {
|
|
894
|
+
i({ width: v.clientWidth, height: v.clientHeight });
|
|
899
895
|
};
|
|
900
|
-
|
|
901
|
-
const
|
|
902
|
-
return
|
|
896
|
+
N();
|
|
897
|
+
const g = new ResizeObserver(N);
|
|
898
|
+
return g.observe(v), () => g.disconnect();
|
|
903
899
|
}, [r]), !t || c == null)
|
|
904
900
|
return;
|
|
905
|
-
const u = c.width - n - s, f = c.height -
|
|
906
|
-
if (!(
|
|
901
|
+
const u = c.width - n - s, f = c.height - l - o, d = u > 0 ? Math.min(Math.ceil(u / qt), pn) : 0, E = f > 0 ? Math.min(Math.ceil(f / e), An) : 0;
|
|
902
|
+
if (!(d === 0 && E === 0))
|
|
907
903
|
return {
|
|
908
|
-
columnCount:
|
|
909
|
-
rowCount:
|
|
910
|
-
columnWidth:
|
|
904
|
+
columnCount: d,
|
|
905
|
+
rowCount: E,
|
|
906
|
+
columnWidth: qt,
|
|
911
907
|
rowHeight: e
|
|
912
908
|
};
|
|
913
909
|
}
|
|
914
|
-
function
|
|
910
|
+
function Pe(t, e) {
|
|
915
911
|
return e == null ? t : t + e.columnCount * e.columnWidth;
|
|
916
912
|
}
|
|
917
|
-
const
|
|
918
|
-
function
|
|
913
|
+
const Ro = 6, Io = 100;
|
|
914
|
+
function Mo({
|
|
919
915
|
rowHeight: t,
|
|
920
916
|
rowCount: e,
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
917
|
+
getDetailHeight: n,
|
|
918
|
+
rowHeights: l,
|
|
919
|
+
defaultRowHeights: s,
|
|
920
|
+
enableRowResizing: o = !1,
|
|
921
|
+
minRowHeight: r = Ro,
|
|
922
|
+
maxRowHeight: c = Io,
|
|
923
|
+
onRowHeightChanged: i
|
|
927
924
|
}) {
|
|
928
|
-
const
|
|
929
|
-
|
|
930
|
-
), [
|
|
931
|
-
(
|
|
932
|
-
[
|
|
933
|
-
), { rowTops:
|
|
934
|
-
const
|
|
935
|
-
let
|
|
936
|
-
for (let
|
|
937
|
-
|
|
938
|
-
return { rowTops:
|
|
939
|
-
}, [
|
|
940
|
-
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
const
|
|
954
|
-
var
|
|
955
|
-
const
|
|
956
|
-
if (
|
|
925
|
+
const u = l != null, [f, d] = lt(
|
|
926
|
+
s ?? []
|
|
927
|
+
), [E, v] = lt(null), [N, g] = lt(null), L = Z(null), T = P(
|
|
928
|
+
(M) => u ? l[M] ?? t : f[M] ?? (s == null ? void 0 : s[M]) ?? t,
|
|
929
|
+
[s, f, u, t, l]
|
|
930
|
+
), { rowTops: C, totalHeight: m } = gt(() => {
|
|
931
|
+
const M = new Array(e + 1);
|
|
932
|
+
let O = 0;
|
|
933
|
+
for (let B = 0; B < e; B++)
|
|
934
|
+
M[B] = O, O += T(B) + ((n == null ? void 0 : n(B)) ?? 0);
|
|
935
|
+
return M[e] = O, { rowTops: M, totalHeight: O };
|
|
936
|
+
}, [n, T, e]), U = P((M) => C[M] ?? 0, [C]), y = P((M) => C[M + 1] - C[M], [C]), z = Z(T);
|
|
937
|
+
z.current = T;
|
|
938
|
+
const S = Z(C);
|
|
939
|
+
S.current = C;
|
|
940
|
+
const R = Z(o);
|
|
941
|
+
R.current = o;
|
|
942
|
+
const V = Z(u);
|
|
943
|
+
V.current = u;
|
|
944
|
+
const j = Z(r);
|
|
945
|
+
j.current = r;
|
|
946
|
+
const _ = Z(c);
|
|
947
|
+
_.current = c;
|
|
948
|
+
const x = Z(i);
|
|
949
|
+
x.current = i;
|
|
950
|
+
const H = P((M) => {
|
|
951
|
+
var b, J;
|
|
952
|
+
const O = L.current;
|
|
953
|
+
if (O == null)
|
|
957
954
|
return;
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
955
|
+
const B = "touches" in M ? (b = M.touches[0]) == null ? void 0 : b.clientY : M.clientY;
|
|
956
|
+
if (B == null)
|
|
960
957
|
return;
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
Math.max(
|
|
958
|
+
const D = Math.min(
|
|
959
|
+
O.max,
|
|
960
|
+
Math.max(O.min, O.startHeight + (B - O.startY))
|
|
964
961
|
);
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
return
|
|
968
|
-
}), (
|
|
969
|
-
}, []), I =
|
|
970
|
-
|
|
971
|
-
}, [
|
|
972
|
-
var
|
|
973
|
-
if (!
|
|
962
|
+
V.current || d((st) => {
|
|
963
|
+
const w = st.slice();
|
|
964
|
+
return w[O.index] = D, w;
|
|
965
|
+
}), (J = x.current) == null || J.call(x, O.index, D), g(O.rowTop + D);
|
|
966
|
+
}, []), I = P(() => {
|
|
967
|
+
L.current = null, v(null), g(null), window.removeEventListener("mousemove", H), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", H), window.removeEventListener("touchend", I), window.removeEventListener("touchcancel", I);
|
|
968
|
+
}, [H]), X = P((M, O) => {
|
|
969
|
+
var J;
|
|
970
|
+
if (!R.current)
|
|
974
971
|
return;
|
|
975
|
-
|
|
976
|
-
const
|
|
977
|
-
if (
|
|
972
|
+
O.preventDefault(), O.stopPropagation();
|
|
973
|
+
const B = "touches" in O ? (J = O.touches[0]) == null ? void 0 : J.clientY : O.clientY;
|
|
974
|
+
if (B == null)
|
|
978
975
|
return;
|
|
979
|
-
const
|
|
980
|
-
|
|
981
|
-
index:
|
|
982
|
-
startY:
|
|
983
|
-
startHeight:
|
|
984
|
-
rowTop:
|
|
985
|
-
min:
|
|
986
|
-
max:
|
|
987
|
-
},
|
|
988
|
-
}, [
|
|
989
|
-
return
|
|
990
|
-
window.removeEventListener("mousemove",
|
|
991
|
-
}, [
|
|
992
|
-
enabled:
|
|
993
|
-
getRowHeight:
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
976
|
+
const D = S.current[M] ?? 0, b = z.current(M);
|
|
977
|
+
L.current = {
|
|
978
|
+
index: M,
|
|
979
|
+
startY: B,
|
|
980
|
+
startHeight: b,
|
|
981
|
+
rowTop: D,
|
|
982
|
+
min: j.current,
|
|
983
|
+
max: _.current
|
|
984
|
+
}, v(M), g(D + b), window.addEventListener("mousemove", H), window.addEventListener("mouseup", I), window.addEventListener("touchmove", H), window.addEventListener("touchend", I), window.addEventListener("touchcancel", I);
|
|
985
|
+
}, [H, I]);
|
|
986
|
+
return Lt(() => () => {
|
|
987
|
+
window.removeEventListener("mousemove", H), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", H), window.removeEventListener("touchend", I), window.removeEventListener("touchcancel", I);
|
|
988
|
+
}, [H, I]), {
|
|
989
|
+
enabled: o,
|
|
990
|
+
getRowHeight: T,
|
|
991
|
+
getRowSpanHeight: y,
|
|
992
|
+
getRowTop: U,
|
|
993
|
+
totalHeight: m,
|
|
994
|
+
resizingRowIndex: E,
|
|
995
|
+
resizingGuideTop: N,
|
|
996
|
+
startRowResize: X
|
|
999
997
|
};
|
|
1000
998
|
}
|
|
1001
|
-
const
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
999
|
+
const Ve = Gt(null);
|
|
1000
|
+
function Rt() {
|
|
1001
|
+
return Wt(Ve);
|
|
1004
1002
|
}
|
|
1005
|
-
const
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1003
|
+
const be = Gt(null);
|
|
1004
|
+
function Oo() {
|
|
1005
|
+
return Wt(be);
|
|
1008
1006
|
}
|
|
1009
|
-
function
|
|
1007
|
+
function yo(t, e) {
|
|
1010
1008
|
return e < t ? e : t <= e && e < t + 1 ? t : Math.max(0, e - 1);
|
|
1011
1009
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const [
|
|
1014
|
-
(
|
|
1015
|
-
var z,
|
|
1016
|
-
const
|
|
1017
|
-
if (
|
|
1018
|
-
let
|
|
1019
|
-
for (const
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1010
|
+
function xo(t, e, n, l, s) {
|
|
1011
|
+
const [o, r] = lt(null), [c, i] = lt(null), u = Z(null), f = P(
|
|
1012
|
+
(L) => {
|
|
1013
|
+
var z, S;
|
|
1014
|
+
const T = ((z = n.current) == null ? void 0 : z.getBoundingClientRect().left) ?? 0, C = ((S = l.current) == null ? void 0 : S.scrollLeft) ?? 0, m = Ct(t), U = L - T - s;
|
|
1015
|
+
if (U < m) {
|
|
1016
|
+
let R = 0;
|
|
1017
|
+
for (const V of St(t, "start"))
|
|
1018
|
+
if (V.getStart("start") + V.getSize() / 2 < U)
|
|
1019
|
+
R++;
|
|
1022
1020
|
else
|
|
1023
1021
|
break;
|
|
1024
|
-
return
|
|
1022
|
+
return R;
|
|
1025
1023
|
}
|
|
1026
|
-
let
|
|
1027
|
-
for (const
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
1024
|
+
let y = We(t);
|
|
1025
|
+
for (const R of St(t, "center"))
|
|
1026
|
+
if (m + R.getStart("center") - C + R.getSize() / 2 < U)
|
|
1027
|
+
y++;
|
|
1030
1028
|
else
|
|
1031
1029
|
break;
|
|
1032
|
-
return
|
|
1030
|
+
return y;
|
|
1033
1031
|
},
|
|
1034
|
-
[n, s,
|
|
1035
|
-
),
|
|
1036
|
-
(
|
|
1032
|
+
[n, s, l, t]
|
|
1033
|
+
), d = P(
|
|
1034
|
+
(L) => {
|
|
1037
1035
|
var z;
|
|
1038
|
-
const
|
|
1039
|
-
if (u.current = null, r(null), i(null),
|
|
1036
|
+
const T = u.current;
|
|
1037
|
+
if (u.current = null, r(null), i(null), T == null)
|
|
1040
1038
|
return;
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1039
|
+
const C = t.getVisibleLeafColumns(), m = (z = C[T.oldIndex]) == null ? void 0 : z.id;
|
|
1040
|
+
if (m == null)
|
|
1043
1041
|
return;
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1042
|
+
const U = yo(T.oldIndex, f(L)), y = C.map((S) => S.id).filter((S) => S !== m);
|
|
1043
|
+
y.splice(U, 0, m), t.setColumnOrder(y);
|
|
1046
1044
|
},
|
|
1047
1045
|
[f, t]
|
|
1048
|
-
),
|
|
1049
|
-
(
|
|
1050
|
-
u.current != null && i(f(
|
|
1046
|
+
), E = P(
|
|
1047
|
+
(L) => {
|
|
1048
|
+
u.current != null && i(f(L.clientX));
|
|
1051
1049
|
},
|
|
1052
1050
|
[f]
|
|
1053
|
-
),
|
|
1054
|
-
(
|
|
1055
|
-
|
|
1051
|
+
), v = P(
|
|
1052
|
+
(L) => {
|
|
1053
|
+
d(L.clientX);
|
|
1056
1054
|
},
|
|
1057
|
-
[
|
|
1058
|
-
),
|
|
1059
|
-
(
|
|
1060
|
-
e && (
|
|
1055
|
+
[d]
|
|
1056
|
+
), N = P(
|
|
1057
|
+
(L, T) => {
|
|
1058
|
+
e && (T.preventDefault(), u.current = { oldIndex: L.getIndex() }, r(L.id), i(f(T.clientX)), window.addEventListener("pointermove", E), window.addEventListener("pointerup", v), window.addEventListener("pointercancel", v));
|
|
1061
1059
|
},
|
|
1062
|
-
[e, f,
|
|
1060
|
+
[e, f, E, v]
|
|
1063
1061
|
);
|
|
1064
|
-
return
|
|
1065
|
-
window.removeEventListener("pointermove",
|
|
1066
|
-
}, [
|
|
1067
|
-
() => ({ enableColumnReordering: e, reorderingColumnId:
|
|
1068
|
-
[e,
|
|
1069
|
-
), guideIndex: c, reorderingColumnId:
|
|
1062
|
+
return Lt(() => () => {
|
|
1063
|
+
window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", v), window.removeEventListener("pointercancel", v);
|
|
1064
|
+
}, [E, v]), { contextValue: gt(
|
|
1065
|
+
() => ({ enableColumnReordering: e, reorderingColumnId: o, startReorder: N }),
|
|
1066
|
+
[e, o, N]
|
|
1067
|
+
), guideIndex: c, reorderingColumnId: o };
|
|
1070
1068
|
}
|
|
1071
|
-
function
|
|
1069
|
+
function Bo({
|
|
1072
1070
|
table: t,
|
|
1073
1071
|
reorderingColumnId: e,
|
|
1074
1072
|
guideIndex: n,
|
|
1075
|
-
rowHeaderWidth:
|
|
1073
|
+
rowHeaderWidth: l,
|
|
1076
1074
|
scrollLeft: s
|
|
1077
1075
|
}) {
|
|
1078
1076
|
if (e == null || n == null)
|
|
1079
1077
|
return null;
|
|
1080
|
-
const
|
|
1078
|
+
const o = t.getVisibleLeafColumns(), r = t.getStartVisibleLeafColumns().length, c = o[n], i = Ct(t);
|
|
1081
1079
|
let u;
|
|
1082
|
-
return n <= r ? u = n < r && c != null ? c.getStart("start") : i : c != null ? u = i + c.getStart("center") - s : u = i +
|
|
1080
|
+
return n <= r ? u = n < r && c != null ? c.getStart("start") : i : c != null ? u = i + c.getStart("center") - s : u = i + pt(t, "center") - s, /* @__PURE__ */ a("div", { className: G(Ie, Yt), children: /* @__PURE__ */ a(
|
|
1083
1081
|
"div",
|
|
1084
1082
|
{
|
|
1085
|
-
className:
|
|
1086
|
-
style: { left:
|
|
1083
|
+
className: G(yt, ze),
|
|
1084
|
+
style: { left: l + u }
|
|
1087
1085
|
}
|
|
1088
1086
|
) });
|
|
1089
1087
|
}
|
|
1090
|
-
function
|
|
1088
|
+
function Do({
|
|
1091
1089
|
table: t,
|
|
1092
1090
|
rowHeaderWidth: e,
|
|
1093
1091
|
columnHeaderHeight: n,
|
|
1094
|
-
scrollLeft:
|
|
1092
|
+
scrollLeft: l,
|
|
1095
1093
|
scrollTop: s,
|
|
1096
|
-
frozenRowCount:
|
|
1094
|
+
frozenRowCount: o,
|
|
1097
1095
|
resizingGuideTop: r = null,
|
|
1098
1096
|
resizingRowIndex: c = null
|
|
1099
1097
|
}) {
|
|
1100
|
-
const i = t.state.columnResizing, u = i == null ? void 0 : i.isResizingColumn, f = u != null && u !== !1 ? t.getColumn(u) : void 0,
|
|
1101
|
-
return
|
|
1102
|
-
|
|
1098
|
+
const i = t.state.columnResizing, u = i == null ? void 0 : i.isResizingColumn, f = u != null && u !== !1 ? t.getColumn(u) : void 0, d = f != null ? e + wo(t, f, l) + f.getSize() + ((i == null ? void 0 : i.deltaOffset) ?? 0) : null, E = r != null && c != null ? n + r - (c < o ? 0 : s) : null;
|
|
1099
|
+
return d == null && E == null ? null : /* @__PURE__ */ W("div", { className: G(Ie, Yt), children: [
|
|
1100
|
+
d != null && /* @__PURE__ */ a(
|
|
1103
1101
|
"div",
|
|
1104
1102
|
{
|
|
1105
|
-
className:
|
|
1106
|
-
style: { left:
|
|
1103
|
+
className: G(yt, ze),
|
|
1104
|
+
style: { left: d }
|
|
1107
1105
|
}
|
|
1108
1106
|
),
|
|
1109
|
-
|
|
1107
|
+
E != null && /* @__PURE__ */ a(
|
|
1110
1108
|
"div",
|
|
1111
1109
|
{
|
|
1112
|
-
className:
|
|
1113
|
-
style: { top:
|
|
1110
|
+
className: G(yt, $n),
|
|
1111
|
+
style: { top: E }
|
|
1114
1112
|
}
|
|
1115
1113
|
)
|
|
1116
1114
|
] });
|
|
1117
1115
|
}
|
|
1118
|
-
function
|
|
1116
|
+
function $o({
|
|
1117
|
+
row: t,
|
|
1118
|
+
rowIndex: e,
|
|
1119
|
+
rowExpanderButtonProps: n,
|
|
1120
|
+
rowExpanderIconProps: l
|
|
1121
|
+
}) {
|
|
1122
|
+
const s = t.getIsExpanded(), o = typeof n == "function" ? n(t) : n, r = typeof l == "function" ? l(t) : l;
|
|
1123
|
+
return /* @__PURE__ */ a(
|
|
1124
|
+
"button",
|
|
1125
|
+
{
|
|
1126
|
+
type: "button",
|
|
1127
|
+
"aria-expanded": s,
|
|
1128
|
+
"aria-label": `${s ? "Collapse" : "Expand"} row ${e + 1}`,
|
|
1129
|
+
...o,
|
|
1130
|
+
className: G(no, o == null ? void 0 : o.className),
|
|
1131
|
+
onMouseDown: (c) => {
|
|
1132
|
+
var i;
|
|
1133
|
+
c.stopPropagation(), (i = o == null ? void 0 : o.onMouseDown) == null || i.call(o, c);
|
|
1134
|
+
},
|
|
1135
|
+
onPointerDown: (c) => {
|
|
1136
|
+
var i;
|
|
1137
|
+
c.stopPropagation(), (i = o == null ? void 0 : o.onPointerDown) == null || i.call(o, c);
|
|
1138
|
+
},
|
|
1139
|
+
onKeyDown: (c) => {
|
|
1140
|
+
var i;
|
|
1141
|
+
c.stopPropagation(), (i = o == null ? void 0 : o.onKeyDown) == null || i.call(o, c);
|
|
1142
|
+
},
|
|
1143
|
+
onClick: (c) => {
|
|
1144
|
+
var i;
|
|
1145
|
+
(i = o == null ? void 0 : o.onClick) == null || i.call(o, c), c.defaultPrevented || t.toggleExpanded();
|
|
1146
|
+
},
|
|
1147
|
+
children: /* @__PURE__ */ a(me, { icon: s ? "caret-down" : "caret-right", size: 14, ...r })
|
|
1148
|
+
}
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
function At({
|
|
1119
1152
|
loading: t,
|
|
1120
1153
|
variableLength: e = !1,
|
|
1121
1154
|
children: n
|
|
1122
1155
|
}) {
|
|
1123
1156
|
if (t) {
|
|
1124
|
-
const
|
|
1125
|
-
return /* @__PURE__ */
|
|
1157
|
+
const l = e ? 75 - Math.floor(Math.random() * 11) * 5 : 100;
|
|
1158
|
+
return /* @__PURE__ */ a("div", { className: ft.SKELETON, style: { width: `${l}%` } });
|
|
1126
1159
|
}
|
|
1127
|
-
return /* @__PURE__ */
|
|
1160
|
+
return /* @__PURE__ */ a(Nt, { children: n });
|
|
1128
1161
|
}
|
|
1129
|
-
function
|
|
1162
|
+
function Ho({
|
|
1130
1163
|
table: t,
|
|
1131
1164
|
cell: e,
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1165
|
+
cellProps: n,
|
|
1166
|
+
rowIndex: l,
|
|
1167
|
+
rowTop: s,
|
|
1168
|
+
columnRegion: o,
|
|
1169
|
+
rowHeight: r,
|
|
1170
|
+
loading: c,
|
|
1171
|
+
isExpansionCell: i,
|
|
1172
|
+
rowExpanderButtonProps: u,
|
|
1173
|
+
rowExpanderIconProps: f,
|
|
1174
|
+
isLastInRow: d,
|
|
1175
|
+
isLastInColumn: E
|
|
1139
1176
|
}) {
|
|
1140
|
-
var
|
|
1141
|
-
const
|
|
1142
|
-
return /* @__PURE__ */ d(
|
|
1177
|
+
var U, y, z;
|
|
1178
|
+
const v = e.column.getSize(), N = e.column.getStart(o), g = i && ((y = (U = e.row).getCanExpand) == null ? void 0 : y.call(U)), L = (z = e.column.columnDef.meta) == null ? void 0 : z.bodyCellClassName, T = g && !c, C = i && e.row.depth > 0 ? { paddingInlineStart: e.row.depth * 16 } : void 0, m = /* @__PURE__ */ a(
|
|
1143
1179
|
"div",
|
|
1144
1180
|
{
|
|
1145
|
-
className:
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1181
|
+
className: G(Ue, Re),
|
|
1182
|
+
style: T ? void 0 : C,
|
|
1183
|
+
children: /* @__PURE__ */ a(At, { loading: c, variableLength: !0, children: /* @__PURE__ */ a(t.FlexRender, { cell: e }) })
|
|
1184
|
+
}
|
|
1185
|
+
);
|
|
1186
|
+
return /* @__PURE__ */ a(
|
|
1187
|
+
"div",
|
|
1188
|
+
{
|
|
1189
|
+
...n,
|
|
1190
|
+
className: G(
|
|
1191
|
+
Te,
|
|
1192
|
+
He,
|
|
1193
|
+
vt(l),
|
|
1194
|
+
Kt(e.column.getIndex()),
|
|
1195
|
+
l % 2 === 0 ? Ce : ve,
|
|
1151
1196
|
{
|
|
1152
|
-
[
|
|
1153
|
-
[
|
|
1154
|
-
[
|
|
1155
|
-
[
|
|
1197
|
+
[Se]: d,
|
|
1198
|
+
[kt]: E,
|
|
1199
|
+
[ft.LOADING]: c,
|
|
1200
|
+
[Xt]: e.row.getIsSelected()
|
|
1156
1201
|
},
|
|
1157
|
-
|
|
1202
|
+
L,
|
|
1203
|
+
n == null ? void 0 : n.className
|
|
1158
1204
|
),
|
|
1159
1205
|
style: {
|
|
1160
|
-
|
|
1161
|
-
|
|
1206
|
+
...n == null ? void 0 : n.style,
|
|
1207
|
+
height: r,
|
|
1208
|
+
left: N,
|
|
1162
1209
|
position: "absolute",
|
|
1163
|
-
top:
|
|
1164
|
-
width:
|
|
1210
|
+
top: s,
|
|
1211
|
+
width: v
|
|
1165
1212
|
},
|
|
1166
|
-
onMouseDown: (
|
|
1167
|
-
|
|
1213
|
+
onMouseDown: (S) => {
|
|
1214
|
+
var R;
|
|
1215
|
+
(R = n == null ? void 0 : n.onMouseDown) == null || R.call(n, S), !S.defaultPrevented && S.button === 0 && e.getSelectionStartHandler()(S);
|
|
1168
1216
|
},
|
|
1169
|
-
onMouseEnter:
|
|
1170
|
-
|
|
1217
|
+
onMouseEnter: (S) => {
|
|
1218
|
+
var R;
|
|
1219
|
+
(R = n == null ? void 0 : n.onMouseEnter) == null || R.call(n, S), S.defaultPrevented || e.getSelectionExtendHandler()(S);
|
|
1220
|
+
},
|
|
1221
|
+
children: T ? /* @__PURE__ */ W("div", { className: eo, style: C, children: [
|
|
1222
|
+
/* @__PURE__ */ a(
|
|
1223
|
+
$o,
|
|
1224
|
+
{
|
|
1225
|
+
row: e.row,
|
|
1226
|
+
rowIndex: l,
|
|
1227
|
+
rowExpanderButtonProps: u,
|
|
1228
|
+
rowExpanderIconProps: f
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
m
|
|
1232
|
+
] }) : m
|
|
1171
1233
|
}
|
|
1172
1234
|
);
|
|
1173
1235
|
}
|
|
1174
|
-
function
|
|
1236
|
+
function Ut({
|
|
1175
1237
|
columnIndex: t,
|
|
1176
1238
|
rowIndex: e,
|
|
1177
1239
|
left: n,
|
|
1178
|
-
top:
|
|
1240
|
+
top: l,
|
|
1179
1241
|
width: s,
|
|
1180
|
-
height:
|
|
1242
|
+
height: o,
|
|
1181
1243
|
loading: r
|
|
1182
1244
|
}) {
|
|
1183
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ a(
|
|
1184
1246
|
"div",
|
|
1185
1247
|
{
|
|
1186
|
-
className:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
e % 2 === 0 ?
|
|
1193
|
-
{ [
|
|
1248
|
+
className: G(
|
|
1249
|
+
Te,
|
|
1250
|
+
Mn,
|
|
1251
|
+
He,
|
|
1252
|
+
vt(e),
|
|
1253
|
+
Kt(t),
|
|
1254
|
+
e % 2 === 0 ? Ce : ve,
|
|
1255
|
+
{ [ft.LOADING]: r }
|
|
1194
1256
|
),
|
|
1195
|
-
style: { height:
|
|
1196
|
-
children: /* @__PURE__ */
|
|
1257
|
+
style: { height: o, left: n, position: "absolute", top: l, width: s },
|
|
1258
|
+
children: /* @__PURE__ */ a("div", { className: G(Ue, Re), children: /* @__PURE__ */ a(At, { loading: r, variableLength: !0 }) })
|
|
1197
1259
|
}
|
|
1198
1260
|
);
|
|
1199
1261
|
}
|
|
1200
|
-
function
|
|
1262
|
+
function Uo({
|
|
1201
1263
|
table: t,
|
|
1202
1264
|
ghosts: e,
|
|
1203
1265
|
loading: n,
|
|
1204
|
-
columnRegion:
|
|
1266
|
+
columnRegion: l,
|
|
1205
1267
|
rowRegion: s,
|
|
1206
|
-
rowIndices:
|
|
1268
|
+
rowIndices: o,
|
|
1207
1269
|
regionTop: r,
|
|
1208
1270
|
regionHeight: c,
|
|
1209
1271
|
getRowTop: i,
|
|
1210
1272
|
getRowHeight: u
|
|
1211
1273
|
}) {
|
|
1212
|
-
const f = t.getRowModel().rows,
|
|
1213
|
-
return /* @__PURE__ */
|
|
1214
|
-
|
|
1215
|
-
var
|
|
1216
|
-
return /* @__PURE__ */
|
|
1217
|
-
|
|
1274
|
+
const f = t.getRowModel().rows, d = t.getVisibleLeafColumns().length, E = pt(t, l), v = St(t, l), N = l === "center", g = s === "center";
|
|
1275
|
+
return /* @__PURE__ */ W(Nt, { children: [
|
|
1276
|
+
N && o.map((L) => {
|
|
1277
|
+
var T;
|
|
1278
|
+
return /* @__PURE__ */ a(zt, { children: Array.from({ length: e.columnCount }).map((C, m) => /* @__PURE__ */ a(
|
|
1279
|
+
Ut,
|
|
1218
1280
|
{
|
|
1219
|
-
columnIndex:
|
|
1220
|
-
rowIndex:
|
|
1221
|
-
left:
|
|
1222
|
-
top: i(
|
|
1281
|
+
columnIndex: d + m,
|
|
1282
|
+
rowIndex: L,
|
|
1283
|
+
left: E + m * e.columnWidth,
|
|
1284
|
+
top: i(L) - r,
|
|
1223
1285
|
width: e.columnWidth,
|
|
1224
|
-
height: u(
|
|
1286
|
+
height: u(L),
|
|
1225
1287
|
loading: n
|
|
1226
1288
|
},
|
|
1227
|
-
`ghost-column-cell-${
|
|
1228
|
-
)) }, `ghost-column-cells-${((
|
|
1289
|
+
`ghost-column-cell-${L}-${m}`
|
|
1290
|
+
)) }, `ghost-column-cells-${((T = f[L]) == null ? void 0 : T.id) ?? L}`);
|
|
1229
1291
|
}),
|
|
1230
|
-
|
|
1231
|
-
const
|
|
1232
|
-
return /* @__PURE__ */
|
|
1233
|
-
|
|
1234
|
-
|
|
1292
|
+
g && Array.from({ length: e.rowCount }).map((L, T) => {
|
|
1293
|
+
const C = f.length + T, m = c + T * e.rowHeight;
|
|
1294
|
+
return /* @__PURE__ */ W(zt, { children: [
|
|
1295
|
+
v.map((U) => /* @__PURE__ */ a(
|
|
1296
|
+
Ut,
|
|
1235
1297
|
{
|
|
1236
|
-
columnIndex:
|
|
1237
|
-
rowIndex:
|
|
1238
|
-
left:
|
|
1239
|
-
top:
|
|
1240
|
-
width:
|
|
1298
|
+
columnIndex: U.getIndex(),
|
|
1299
|
+
rowIndex: C,
|
|
1300
|
+
left: U.getStart(l),
|
|
1301
|
+
top: m,
|
|
1302
|
+
width: U.getSize(),
|
|
1241
1303
|
height: e.rowHeight,
|
|
1242
1304
|
loading: n
|
|
1243
1305
|
},
|
|
1244
|
-
`ghost-row-cell-${
|
|
1306
|
+
`ghost-row-cell-${T}-${U.id}`
|
|
1245
1307
|
)),
|
|
1246
|
-
|
|
1247
|
-
|
|
1308
|
+
N && Array.from({ length: e.columnCount }).map((U, y) => /* @__PURE__ */ a(
|
|
1309
|
+
Ut,
|
|
1248
1310
|
{
|
|
1249
|
-
columnIndex:
|
|
1250
|
-
rowIndex:
|
|
1251
|
-
left:
|
|
1252
|
-
top:
|
|
1311
|
+
columnIndex: d + y,
|
|
1312
|
+
rowIndex: C,
|
|
1313
|
+
left: E + y * e.columnWidth,
|
|
1314
|
+
top: m,
|
|
1253
1315
|
width: e.columnWidth,
|
|
1254
1316
|
height: e.rowHeight,
|
|
1255
1317
|
loading: n
|
|
1256
1318
|
},
|
|
1257
|
-
`ghost-corner-cell-${
|
|
1319
|
+
`ghost-corner-cell-${T}-${y}`
|
|
1258
1320
|
))
|
|
1259
|
-
] }, `ghost-row-cells-${
|
|
1321
|
+
] }, `ghost-row-cells-${T}`);
|
|
1260
1322
|
})
|
|
1261
1323
|
] });
|
|
1262
1324
|
}
|
|
1263
|
-
function
|
|
1264
|
-
let
|
|
1265
|
-
for (const
|
|
1266
|
-
const r =
|
|
1267
|
-
r < n[0] || r > n[1] || (
|
|
1325
|
+
function ce(t, e, n) {
|
|
1326
|
+
let l = null, s = 0;
|
|
1327
|
+
for (const o of St(t, e)) {
|
|
1328
|
+
const r = o.getIndex();
|
|
1329
|
+
r < n[0] || r > n[1] || (l == null && (l = o.getStart(e)), s += o.getSize());
|
|
1268
1330
|
}
|
|
1269
|
-
return
|
|
1331
|
+
return l == null ? null : { offset: l, size: s };
|
|
1270
1332
|
}
|
|
1271
|
-
function
|
|
1272
|
-
const
|
|
1333
|
+
function ie(t, e, n, l, s) {
|
|
1334
|
+
const o = mt(t), r = t.getRowModel().rows.length, c = Math.max(n[0], e === "top" ? 0 : o), i = Math.min(n[1], e === "top" ? o - 1 : r - 1);
|
|
1273
1335
|
if (c > i)
|
|
1274
1336
|
return null;
|
|
1275
|
-
const u = e === "center" ?
|
|
1337
|
+
const u = e === "center" ? zo(t, e, l) : 0;
|
|
1276
1338
|
return {
|
|
1277
|
-
offset:
|
|
1278
|
-
size:
|
|
1339
|
+
offset: l(c) - u,
|
|
1340
|
+
size: l(i) + s(i) - l(c)
|
|
1279
1341
|
};
|
|
1280
1342
|
}
|
|
1281
|
-
function
|
|
1282
|
-
return e === "center" ? n(
|
|
1343
|
+
function zo(t, e, n) {
|
|
1344
|
+
return e === "center" ? n(mt(t)) : 0;
|
|
1283
1345
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const r = A.getRegionCardinality(e), c = { offset: 0, size:
|
|
1346
|
+
function Fo(t, e, n, l, s, o) {
|
|
1347
|
+
const r = A.getRegionCardinality(e), c = { offset: 0, size: pt(t, n) }, i = mt(t), u = t.getRowModel().rows.length, f = {
|
|
1286
1348
|
offset: 0,
|
|
1287
|
-
size: (
|
|
1349
|
+
size: (l === "top" ? i : u - i) === 0 ? 0 : s(l === "top" ? i - 1 : u - 1) + o(l === "top" ? i - 1 : u - 1) - s(l === "top" ? 0 : i)
|
|
1288
1350
|
};
|
|
1289
|
-
let
|
|
1351
|
+
let d, E;
|
|
1290
1352
|
switch (r) {
|
|
1291
|
-
case
|
|
1292
|
-
|
|
1353
|
+
case ct.CELLS:
|
|
1354
|
+
d = ce(t, n, e.cols), E = ie(t, l, e.rows, s, o);
|
|
1293
1355
|
break;
|
|
1294
|
-
case
|
|
1295
|
-
|
|
1356
|
+
case ct.FULL_COLUMNS:
|
|
1357
|
+
d = ce(t, n, e.cols), E = f;
|
|
1296
1358
|
break;
|
|
1297
|
-
case
|
|
1298
|
-
|
|
1359
|
+
case ct.FULL_ROWS:
|
|
1360
|
+
d = c, E = ie(t, l, e.rows, s, o);
|
|
1299
1361
|
break;
|
|
1300
1362
|
default:
|
|
1301
|
-
|
|
1363
|
+
d = c, E = f;
|
|
1302
1364
|
break;
|
|
1303
1365
|
}
|
|
1304
|
-
return
|
|
1305
|
-
height:
|
|
1306
|
-
left:
|
|
1307
|
-
top:
|
|
1308
|
-
width:
|
|
1366
|
+
return d == null || E == null || d.size <= 0 || E.size <= 0 ? null : {
|
|
1367
|
+
height: E.size,
|
|
1368
|
+
left: d.offset,
|
|
1369
|
+
top: E.offset,
|
|
1370
|
+
width: d.size
|
|
1309
1371
|
};
|
|
1310
1372
|
}
|
|
1311
|
-
function
|
|
1373
|
+
function Go({
|
|
1312
1374
|
table: t,
|
|
1313
1375
|
regionGroups: e,
|
|
1314
1376
|
columnRegion: n,
|
|
1315
|
-
rowRegion:
|
|
1377
|
+
rowRegion: l,
|
|
1316
1378
|
getRowTop: s,
|
|
1317
|
-
getRowHeight:
|
|
1379
|
+
getRowHeight: o
|
|
1318
1380
|
}) {
|
|
1319
|
-
return /* @__PURE__ */
|
|
1381
|
+
return /* @__PURE__ */ a("div", { className: Yt, "aria-hidden": !0, children: e.map(
|
|
1320
1382
|
(r, c) => r.regions.map((i, u) => {
|
|
1321
|
-
const f =
|
|
1383
|
+
const f = Fo(
|
|
1322
1384
|
t,
|
|
1323
1385
|
i,
|
|
1324
1386
|
n,
|
|
1325
|
-
|
|
1387
|
+
l,
|
|
1326
1388
|
s,
|
|
1327
|
-
|
|
1389
|
+
o
|
|
1328
1390
|
);
|
|
1329
|
-
return f == null ? null : /* @__PURE__ */
|
|
1391
|
+
return f == null ? null : /* @__PURE__ */ a(
|
|
1330
1392
|
"div",
|
|
1331
1393
|
{
|
|
1332
|
-
className:
|
|
1394
|
+
className: G(yt, Qn, r.className),
|
|
1333
1395
|
style: f
|
|
1334
1396
|
},
|
|
1335
1397
|
`${c}-${u}`
|
|
@@ -1337,86 +1399,107 @@ function Bo({
|
|
|
1337
1399
|
})
|
|
1338
1400
|
) });
|
|
1339
1401
|
}
|
|
1340
|
-
function
|
|
1402
|
+
function Wo({
|
|
1341
1403
|
table: t,
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1404
|
+
renderRowDetail: e,
|
|
1405
|
+
getCellProps: n,
|
|
1406
|
+
rowExpanderButtonProps: l,
|
|
1407
|
+
rowExpanderIconProps: s,
|
|
1408
|
+
columnRegion: o,
|
|
1409
|
+
rowRegion: r,
|
|
1410
|
+
offsetTop: c = 0,
|
|
1411
|
+
offsetLeft: i = 0,
|
|
1412
|
+
areCellsLoading: u,
|
|
1413
|
+
rowVirtualizer: f,
|
|
1414
|
+
rowResizing: d,
|
|
1415
|
+
ghosts: E,
|
|
1416
|
+
className: v,
|
|
1417
|
+
...N
|
|
1352
1418
|
}) {
|
|
1353
|
-
const
|
|
1354
|
-
{ length:
|
|
1355
|
-
(
|
|
1356
|
-
),
|
|
1357
|
-
return /* @__PURE__ */
|
|
1419
|
+
const g = Rt(), L = g != null && g.isBodyContextMenuEnabled, T = t.getRowModel().rows, C = mt(t), m = r === "top", U = m ? C : T.length - C, y = m ? 0 : d.getRowTop(C), z = m ? d.getRowTop(C) : d.totalHeight - d.getRowTop(C), S = pt(t, o), R = t.getStartVisibleLeafColumns().length > 0 ? "start" : "center", V = t.getCenterVisibleLeafColumns().length > 0 ? "center" : "start", _ = !m && f != null ? f.getVirtualItems() : void 0, x = _ != null ? _.map((I) => C + I.index) : Array.from(
|
|
1420
|
+
{ length: U },
|
|
1421
|
+
(I, X) => m ? X : C + X
|
|
1422
|
+
), H = m ? C - 1 : T.length - 1;
|
|
1423
|
+
return /* @__PURE__ */ a(
|
|
1358
1424
|
"div",
|
|
1359
1425
|
{
|
|
1360
|
-
...
|
|
1361
|
-
className:
|
|
1362
|
-
style: { paddingLeft:
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1364
|
-
|
|
1426
|
+
...N,
|
|
1427
|
+
className: G(Pn, v),
|
|
1428
|
+
style: { paddingLeft: i, paddingTop: c },
|
|
1429
|
+
children: /* @__PURE__ */ a("div", { children: /* @__PURE__ */ W(
|
|
1430
|
+
un,
|
|
1365
1431
|
{
|
|
1366
|
-
className:
|
|
1367
|
-
style: { height:
|
|
1368
|
-
onPointerDown:
|
|
1369
|
-
disabled: !
|
|
1370
|
-
onContextMenu:
|
|
1371
|
-
content: ({ mouseEvent:
|
|
1432
|
+
className: G(Rn, In),
|
|
1433
|
+
style: { height: z, width: S },
|
|
1434
|
+
onPointerDown: g == null ? void 0 : g.handleBodyPointerDown,
|
|
1435
|
+
disabled: !L,
|
|
1436
|
+
onContextMenu: L ? g == null ? void 0 : g.handleBodyContextMenu : void 0,
|
|
1437
|
+
content: ({ mouseEvent: I }) => I == null || g == null ? void 0 : g.renderBodyContextMenu(I),
|
|
1372
1438
|
children: [
|
|
1373
|
-
/* @__PURE__ */
|
|
1374
|
-
|
|
1375
|
-
const
|
|
1376
|
-
if (
|
|
1439
|
+
/* @__PURE__ */ W("div", { className: Sn, children: [
|
|
1440
|
+
x.map((I) => {
|
|
1441
|
+
const X = T[I];
|
|
1442
|
+
if (X == null)
|
|
1377
1443
|
return null;
|
|
1378
|
-
const
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1444
|
+
const M = o === "start" ? X.getStartVisibleCells() : X.getCenterVisibleCells(), O = d.getRowTop(I) - y, B = d.getRowHeight(I), D = d.getRowSpanHeight(I) - B;
|
|
1445
|
+
return /* @__PURE__ */ W(zt, { children: [
|
|
1446
|
+
M.map((b, J) => /* @__PURE__ */ a(
|
|
1447
|
+
Ho,
|
|
1448
|
+
{
|
|
1449
|
+
table: t,
|
|
1450
|
+
cell: b,
|
|
1451
|
+
cellProps: n == null ? void 0 : n(b),
|
|
1452
|
+
rowExpanderButtonProps: l,
|
|
1453
|
+
rowExpanderIconProps: s,
|
|
1454
|
+
isExpansionCell: o === R && J === 0,
|
|
1455
|
+
rowIndex: I,
|
|
1456
|
+
rowTop: O,
|
|
1457
|
+
columnRegion: o,
|
|
1458
|
+
rowHeight: B,
|
|
1459
|
+
loading: u,
|
|
1460
|
+
isLastInRow: J === M.length - 1,
|
|
1461
|
+
isLastInColumn: I === H
|
|
1462
|
+
},
|
|
1463
|
+
b.id
|
|
1464
|
+
)),
|
|
1465
|
+
D > 0 && o === V && /* @__PURE__ */ a(
|
|
1466
|
+
"div",
|
|
1467
|
+
{
|
|
1468
|
+
className: oo,
|
|
1469
|
+
style: { top: O + B, height: D, width: S },
|
|
1470
|
+
onPointerDown: (b) => b.stopPropagation(),
|
|
1471
|
+
onKeyDown: (b) => b.stopPropagation(),
|
|
1472
|
+
onContextMenu: (b) => b.stopPropagation(),
|
|
1473
|
+
children: e == null ? void 0 : e(X)
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
] }, X.id);
|
|
1394
1477
|
}),
|
|
1395
|
-
|
|
1396
|
-
|
|
1478
|
+
E != null && /* @__PURE__ */ a(
|
|
1479
|
+
Uo,
|
|
1397
1480
|
{
|
|
1398
1481
|
table: t,
|
|
1399
|
-
ghosts:
|
|
1400
|
-
loading:
|
|
1401
|
-
columnRegion:
|
|
1402
|
-
rowRegion:
|
|
1403
|
-
rowIndices:
|
|
1404
|
-
regionTop:
|
|
1405
|
-
regionHeight:
|
|
1406
|
-
getRowTop:
|
|
1407
|
-
getRowHeight:
|
|
1482
|
+
ghosts: E,
|
|
1483
|
+
loading: u,
|
|
1484
|
+
columnRegion: o,
|
|
1485
|
+
rowRegion: r,
|
|
1486
|
+
rowIndices: x,
|
|
1487
|
+
regionTop: y,
|
|
1488
|
+
regionHeight: z,
|
|
1489
|
+
getRowTop: d.getRowTop,
|
|
1490
|
+
getRowHeight: d.getRowHeight
|
|
1408
1491
|
}
|
|
1409
1492
|
)
|
|
1410
1493
|
] }),
|
|
1411
|
-
|
|
1412
|
-
|
|
1494
|
+
g != null && g.regionGroups.length > 0 && /* @__PURE__ */ a(
|
|
1495
|
+
Go,
|
|
1413
1496
|
{
|
|
1414
1497
|
table: t,
|
|
1415
|
-
regionGroups:
|
|
1416
|
-
columnRegion:
|
|
1417
|
-
rowRegion:
|
|
1418
|
-
getRowTop:
|
|
1419
|
-
getRowHeight:
|
|
1498
|
+
regionGroups: g.regionGroups,
|
|
1499
|
+
columnRegion: o,
|
|
1500
|
+
rowRegion: r,
|
|
1501
|
+
getRowTop: d.getRowTop,
|
|
1502
|
+
getRowHeight: d.getRowHeight
|
|
1420
1503
|
}
|
|
1421
1504
|
)
|
|
1422
1505
|
]
|
|
@@ -1425,290 +1508,294 @@ function Do({
|
|
|
1425
1508
|
}
|
|
1426
1509
|
);
|
|
1427
1510
|
}
|
|
1428
|
-
function
|
|
1511
|
+
function Po({
|
|
1429
1512
|
row: t,
|
|
1430
1513
|
rowIndex: e,
|
|
1431
1514
|
rowHeight: n,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1515
|
+
detailHeight: l,
|
|
1516
|
+
loading: s,
|
|
1517
|
+
isLastInColumn: o,
|
|
1518
|
+
isResizing: r = !1,
|
|
1519
|
+
onResizeStart: c,
|
|
1520
|
+
className: i,
|
|
1521
|
+
...u
|
|
1438
1522
|
}) {
|
|
1439
|
-
const
|
|
1440
|
-
return /* @__PURE__ */
|
|
1523
|
+
const f = Rt();
|
|
1524
|
+
return /* @__PURE__ */ W(
|
|
1441
1525
|
"div",
|
|
1442
1526
|
{
|
|
1443
|
-
...
|
|
1444
|
-
className:
|
|
1445
|
-
[
|
|
1446
|
-
[
|
|
1447
|
-
[
|
|
1448
|
-
},
|
|
1449
|
-
style: { flexBasis: n, height: n, minHeight: 0 },
|
|
1450
|
-
onMouseDown: (
|
|
1527
|
+
...u,
|
|
1528
|
+
className: G(Tt, vt(e), {
|
|
1529
|
+
[kt]: o,
|
|
1530
|
+
[ft.LOADING]: s,
|
|
1531
|
+
[Xt]: (t == null ? void 0 : t.getIsSelected()) ?? !1
|
|
1532
|
+
}, i),
|
|
1533
|
+
style: { marginBottom: l, flexBasis: n, height: n, minHeight: 0 },
|
|
1534
|
+
onMouseDown: (d) => f == null ? void 0 : f.handleRowHeaderMouseDown(e, d),
|
|
1451
1535
|
children: [
|
|
1452
|
-
/* @__PURE__ */
|
|
1453
|
-
!
|
|
1536
|
+
/* @__PURE__ */ a("div", { className: ye, children: /* @__PURE__ */ a("div", { className: xe, children: /* @__PURE__ */ a(At, { loading: s, children: /* @__PURE__ */ a("span", { children: e + 1 }) }) }) }),
|
|
1537
|
+
!s && c != null && /* @__PURE__ */ a(
|
|
1454
1538
|
"div",
|
|
1455
1539
|
{
|
|
1456
|
-
className:
|
|
1457
|
-
[
|
|
1540
|
+
className: G(Oe, qn, {
|
|
1541
|
+
[_t]: r
|
|
1458
1542
|
}),
|
|
1459
|
-
onMouseDown:
|
|
1460
|
-
onTouchStart:
|
|
1461
|
-
children: /* @__PURE__ */
|
|
1543
|
+
onMouseDown: c,
|
|
1544
|
+
onTouchStart: c,
|
|
1545
|
+
children: /* @__PURE__ */ a("div", { className: G(Me, { [_t]: r }) })
|
|
1462
1546
|
}
|
|
1463
1547
|
)
|
|
1464
1548
|
]
|
|
1465
1549
|
}
|
|
1466
1550
|
);
|
|
1467
1551
|
}
|
|
1468
|
-
function
|
|
1552
|
+
function Vo({
|
|
1469
1553
|
row: t,
|
|
1470
1554
|
rowIndex: e,
|
|
1471
1555
|
rowHeight: n,
|
|
1472
|
-
|
|
1473
|
-
|
|
1556
|
+
detailHeight: l,
|
|
1557
|
+
loading: s,
|
|
1558
|
+
isLastInColumn: o
|
|
1474
1559
|
}) {
|
|
1475
|
-
const
|
|
1476
|
-
return /* @__PURE__ */
|
|
1560
|
+
const r = (t == null ? void 0 : t.getIsSelected()) ?? !1;
|
|
1561
|
+
return /* @__PURE__ */ a(
|
|
1477
1562
|
"div",
|
|
1478
1563
|
{
|
|
1479
|
-
className:
|
|
1480
|
-
[
|
|
1481
|
-
[
|
|
1482
|
-
[
|
|
1564
|
+
className: G(Tt, Be, vt(e), {
|
|
1565
|
+
[kt]: o,
|
|
1566
|
+
[ft.LOADING]: s,
|
|
1567
|
+
[Xt]: r
|
|
1483
1568
|
}),
|
|
1484
|
-
style: { height: n },
|
|
1485
|
-
children: !
|
|
1486
|
-
|
|
1569
|
+
style: { marginBottom: l, height: n },
|
|
1570
|
+
children: !s && t != null && /* @__PURE__ */ a("div", { className: De, children: /* @__PURE__ */ a(
|
|
1571
|
+
we,
|
|
1487
1572
|
{
|
|
1488
1573
|
"aria-label": `Select row ${e + 1}`,
|
|
1489
|
-
checked:
|
|
1574
|
+
checked: r,
|
|
1490
1575
|
disabled: !t.getCanSelect(),
|
|
1491
|
-
onChange: (
|
|
1576
|
+
onChange: (c) => t.getToggleSelectedHandler()(c)
|
|
1492
1577
|
}
|
|
1493
1578
|
) })
|
|
1494
1579
|
}
|
|
1495
1580
|
);
|
|
1496
1581
|
}
|
|
1497
|
-
function
|
|
1582
|
+
function ae({
|
|
1498
1583
|
table: t,
|
|
1499
1584
|
rowRegion: e,
|
|
1500
1585
|
rowHeaderWidth: n,
|
|
1501
|
-
enableRowHeader:
|
|
1586
|
+
enableRowHeader: l = !0,
|
|
1502
1587
|
selectionColumnWidth: s = 0,
|
|
1503
|
-
areRowHeadersLoading:
|
|
1588
|
+
areRowHeadersLoading: o,
|
|
1504
1589
|
rowVirtualizer: r,
|
|
1505
1590
|
rowResizing: c,
|
|
1506
1591
|
ghosts: i,
|
|
1507
1592
|
className: u,
|
|
1508
1593
|
...f
|
|
1509
1594
|
}) {
|
|
1510
|
-
if (!
|
|
1595
|
+
if (!l && s === 0)
|
|
1511
1596
|
return null;
|
|
1512
|
-
const
|
|
1513
|
-
height:
|
|
1597
|
+
const d = t.getRowModel().rows, E = l ? n : 0, v = mt(t), N = e === "top", g = N ? 0 : v, L = N ? v : d.length - v, T = N ? c.getRowTop(v) : c.totalHeight - c.getRowTop(v), m = !N && r != null ? r.getVirtualItems() : void 0, U = (r == null ? void 0 : r.options.scrollMargin) ?? 0, y = m != null && m.length > 0 ? m[0].start - U : 0, z = m != null && m.length > 0 ? T - (m[m.length - 1].end - U) : 0, S = m != null ? m.map((_) => v + _.index) : Array.from({ length: L }, (_, x) => g + x), R = N ? v - 1 : d.length - 1, V = {
|
|
1598
|
+
height: T,
|
|
1514
1599
|
transform: "translateY(0px)",
|
|
1515
|
-
paddingTop:
|
|
1600
|
+
paddingTop: y,
|
|
1516
1601
|
paddingBottom: z
|
|
1517
|
-
},
|
|
1518
|
-
return /* @__PURE__ */
|
|
1602
|
+
}, j = i != null && !N ? Array.from({ length: i.rowCount }, (_, x) => d.length + x) : [];
|
|
1603
|
+
return /* @__PURE__ */ a(
|
|
1519
1604
|
"div",
|
|
1520
1605
|
{
|
|
1521
1606
|
...f,
|
|
1522
|
-
className:
|
|
1523
|
-
style: { width:
|
|
1524
|
-
children: /* @__PURE__ */
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
var
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
|
|
1607
|
+
className: G(to, u),
|
|
1608
|
+
style: { width: E + s },
|
|
1609
|
+
children: /* @__PURE__ */ W("div", { style: { display: "flex", height: T }, children: [
|
|
1610
|
+
l && /* @__PURE__ */ a("div", { style: { flex: "0 0 auto", width: n }, children: /* @__PURE__ */ W("div", { className: ee, style: V, children: [
|
|
1611
|
+
S.map((_) => {
|
|
1612
|
+
var x;
|
|
1613
|
+
return /* @__PURE__ */ a(
|
|
1614
|
+
Po,
|
|
1530
1615
|
{
|
|
1531
|
-
row:
|
|
1532
|
-
rowIndex:
|
|
1533
|
-
rowHeight: c.getRowHeight(
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1616
|
+
row: d[_],
|
|
1617
|
+
rowIndex: _,
|
|
1618
|
+
rowHeight: c.getRowHeight(_),
|
|
1619
|
+
detailHeight: c.getRowSpanHeight(_) - c.getRowHeight(_),
|
|
1620
|
+
loading: o,
|
|
1621
|
+
isLastInColumn: _ === R,
|
|
1622
|
+
isResizing: c.resizingRowIndex === _,
|
|
1623
|
+
onResizeStart: c.enabled ? (H) => c.startRowResize(_, H) : void 0
|
|
1538
1624
|
},
|
|
1539
|
-
((
|
|
1625
|
+
((x = d[_]) == null ? void 0 : x.id) ?? _
|
|
1540
1626
|
);
|
|
1541
1627
|
}),
|
|
1542
|
-
|
|
1628
|
+
j.map((_, x) => /* @__PURE__ */ a(
|
|
1543
1629
|
"div",
|
|
1544
1630
|
{
|
|
1545
|
-
className:
|
|
1546
|
-
[
|
|
1631
|
+
className: G(Tt, vt(_), {
|
|
1632
|
+
[ft.LOADING]: o
|
|
1547
1633
|
}),
|
|
1548
1634
|
style: { flexBasis: i == null ? void 0 : i.rowHeight, height: i == null ? void 0 : i.rowHeight, minHeight: 0 },
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1635
|
+
children: /* @__PURE__ */ a("div", { className: ye, children: /* @__PURE__ */ a("div", { className: xe, children: /* @__PURE__ */ a(At, { loading: o }) }) })
|
|
1550
1636
|
},
|
|
1551
|
-
`ghost-row-header-${
|
|
1637
|
+
`ghost-row-header-${x}`
|
|
1552
1638
|
))
|
|
1553
1639
|
] }) }),
|
|
1554
|
-
s > 0 && /* @__PURE__ */
|
|
1555
|
-
|
|
1556
|
-
var
|
|
1557
|
-
return /* @__PURE__ */
|
|
1558
|
-
|
|
1640
|
+
s > 0 && /* @__PURE__ */ a("div", { style: { flex: "0 0 auto", width: s }, children: /* @__PURE__ */ W("div", { className: ee, style: V, children: [
|
|
1641
|
+
S.map((_) => {
|
|
1642
|
+
var x;
|
|
1643
|
+
return /* @__PURE__ */ a(
|
|
1644
|
+
Vo,
|
|
1559
1645
|
{
|
|
1560
|
-
row:
|
|
1561
|
-
rowIndex:
|
|
1562
|
-
rowHeight: c.getRowHeight(
|
|
1563
|
-
|
|
1564
|
-
|
|
1646
|
+
row: d[_],
|
|
1647
|
+
rowIndex: _,
|
|
1648
|
+
rowHeight: c.getRowHeight(_),
|
|
1649
|
+
detailHeight: c.getRowSpanHeight(_) - c.getRowHeight(_),
|
|
1650
|
+
loading: o,
|
|
1651
|
+
isLastInColumn: _ === R
|
|
1565
1652
|
},
|
|
1566
|
-
((
|
|
1653
|
+
((x = d[_]) == null ? void 0 : x.id) ?? _
|
|
1567
1654
|
);
|
|
1568
1655
|
}),
|
|
1569
|
-
|
|
1656
|
+
j.map((_, x) => /* @__PURE__ */ a(
|
|
1570
1657
|
"div",
|
|
1571
1658
|
{
|
|
1572
|
-
className:
|
|
1573
|
-
[
|
|
1659
|
+
className: G(Tt, Be, vt(_), {
|
|
1660
|
+
[ft.LOADING]: o
|
|
1574
1661
|
}),
|
|
1575
1662
|
style: { height: i == null ? void 0 : i.rowHeight }
|
|
1576
1663
|
},
|
|
1577
|
-
`ghost-row-selection-${
|
|
1664
|
+
`ghost-row-selection-${x}`
|
|
1578
1665
|
))
|
|
1579
1666
|
] }) })
|
|
1580
1667
|
] })
|
|
1581
1668
|
}
|
|
1582
1669
|
);
|
|
1583
1670
|
}
|
|
1584
|
-
function
|
|
1671
|
+
function bo({
|
|
1585
1672
|
header: t,
|
|
1586
1673
|
isOpen: e,
|
|
1587
1674
|
onOpenChange: n
|
|
1588
1675
|
}) {
|
|
1589
|
-
const
|
|
1676
|
+
const l = t.column.getIsSorted(), s = (r) => {
|
|
1590
1677
|
t.column.toggleSorting(r), n(!1);
|
|
1591
|
-
},
|
|
1678
|
+
}, o = () => {
|
|
1592
1679
|
t.column.clearSorting(), n(!1);
|
|
1593
1680
|
};
|
|
1594
|
-
return /* @__PURE__ */
|
|
1595
|
-
/* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
|
|
1681
|
+
return /* @__PURE__ */ W("div", { className: G(co, { [ao]: e }), children: [
|
|
1682
|
+
/* @__PURE__ */ a("div", { className: io }),
|
|
1683
|
+
/* @__PURE__ */ a(
|
|
1684
|
+
dn,
|
|
1598
1685
|
{
|
|
1599
|
-
className:
|
|
1600
|
-
content: /* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
|
|
1686
|
+
className: ro,
|
|
1687
|
+
content: /* @__PURE__ */ W(fn, { children: [
|
|
1688
|
+
/* @__PURE__ */ a(Dt, { icon: "sort-asc", text: "Sort Asc", onClick: () => s(!1) }),
|
|
1689
|
+
/* @__PURE__ */ a(Dt, { icon: "sort-desc", text: "Sort Desc", onClick: () => s(!0) }),
|
|
1690
|
+
l && /* @__PURE__ */ a(Dt, { icon: "sort", text: "Clear Sort", onClick: o })
|
|
1604
1691
|
] }),
|
|
1605
1692
|
isOpen: e,
|
|
1606
1693
|
onInteraction: n,
|
|
1607
1694
|
placement: "bottom",
|
|
1608
1695
|
rootBoundary: "viewport",
|
|
1609
|
-
children: /* @__PURE__ */
|
|
1696
|
+
children: /* @__PURE__ */ a(me, { icon: "chevron-down" })
|
|
1610
1697
|
}
|
|
1611
1698
|
)
|
|
1612
1699
|
] });
|
|
1613
1700
|
}
|
|
1614
|
-
function
|
|
1701
|
+
function ko({
|
|
1615
1702
|
table: t,
|
|
1616
1703
|
header: e,
|
|
1617
1704
|
isLastInRow: n,
|
|
1618
|
-
enableSorting:
|
|
1705
|
+
enableSorting: l = !1,
|
|
1619
1706
|
loading: s
|
|
1620
1707
|
}) {
|
|
1621
|
-
var
|
|
1622
|
-
const
|
|
1623
|
-
return /* @__PURE__ */
|
|
1708
|
+
var C;
|
|
1709
|
+
const o = e.getSize(), r = e.column.getIsResizing(), c = e.getResizeHandler(), i = typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : void 0, u = Oo(), f = Rt(), d = (u == null ? void 0 : u.enableColumnReordering) ?? !1, E = (u == null ? void 0 : u.reorderingColumnId) === e.column.id, v = l && e.column.getCanSort(), N = (C = e.column.columnDef.meta) == null ? void 0 : C.headCellClassName, [g, L] = lt(!1), T = e.column.getIndex();
|
|
1710
|
+
return /* @__PURE__ */ W(
|
|
1624
1711
|
"div",
|
|
1625
1712
|
{
|
|
1626
|
-
className:
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
{ [
|
|
1631
|
-
{ [
|
|
1632
|
-
{ [
|
|
1633
|
-
{ [
|
|
1634
|
-
|
|
1713
|
+
className: G(
|
|
1714
|
+
Tt,
|
|
1715
|
+
Kt(T),
|
|
1716
|
+
bt,
|
|
1717
|
+
{ [Se]: n },
|
|
1718
|
+
{ [Bn]: d },
|
|
1719
|
+
{ [Dn]: g },
|
|
1720
|
+
{ [ft.LOADING]: s },
|
|
1721
|
+
N
|
|
1635
1722
|
),
|
|
1636
|
-
style: { flexBasis:
|
|
1637
|
-
onMouseDown: (
|
|
1723
|
+
style: { flexBasis: o, minWidth: 0, width: o },
|
|
1724
|
+
onMouseDown: (m) => f == null ? void 0 : f.handleColumnHeaderMouseDown(T, m),
|
|
1638
1725
|
children: [
|
|
1639
|
-
/* @__PURE__ */
|
|
1640
|
-
|
|
1726
|
+
/* @__PURE__ */ W("div", { className: pe, title: i, children: [
|
|
1727
|
+
d && /* @__PURE__ */ a(
|
|
1641
1728
|
"div",
|
|
1642
1729
|
{
|
|
1643
|
-
className:
|
|
1644
|
-
onPointerDown: (
|
|
1645
|
-
children: /* @__PURE__ */
|
|
1730
|
+
className: G(jn, { [_t]: E }),
|
|
1731
|
+
onPointerDown: (m) => u == null ? void 0 : u.startReorder(e.column, m),
|
|
1732
|
+
children: /* @__PURE__ */ a("div", { className: Zn, children: /* @__PURE__ */ a(wn, { title: "Press down to drag" }) })
|
|
1646
1733
|
}
|
|
1647
1734
|
),
|
|
1648
|
-
|
|
1649
|
-
|
|
1735
|
+
v && !s && /* @__PURE__ */ a(
|
|
1736
|
+
bo,
|
|
1650
1737
|
{
|
|
1651
1738
|
table: t,
|
|
1652
1739
|
header: e,
|
|
1653
|
-
isOpen:
|
|
1654
|
-
onOpenChange:
|
|
1740
|
+
isOpen: g,
|
|
1741
|
+
onOpenChange: L
|
|
1655
1742
|
}
|
|
1656
1743
|
),
|
|
1657
|
-
/* @__PURE__ */
|
|
1744
|
+
/* @__PURE__ */ a("div", { className: Ae, children: /* @__PURE__ */ a(At, { loading: s, variableLength: !0, children: /* @__PURE__ */ a(t.FlexRender, { header: e }) }) })
|
|
1658
1745
|
] }),
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
!s && /* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ a("div", { className: _e }),
|
|
1747
|
+
!s && /* @__PURE__ */ a(
|
|
1661
1748
|
"div",
|
|
1662
1749
|
{
|
|
1663
|
-
className:
|
|
1664
|
-
[
|
|
1750
|
+
className: G(Oe, Jn, {
|
|
1751
|
+
[_t]: r
|
|
1665
1752
|
}),
|
|
1666
1753
|
onMouseDown: c,
|
|
1667
1754
|
onTouchStart: c,
|
|
1668
|
-
children: /* @__PURE__ */
|
|
1755
|
+
children: /* @__PURE__ */ a("div", { className: G(Me, { [_t]: r }) })
|
|
1669
1756
|
}
|
|
1670
1757
|
)
|
|
1671
1758
|
]
|
|
1672
1759
|
}
|
|
1673
1760
|
);
|
|
1674
1761
|
}
|
|
1675
|
-
function
|
|
1762
|
+
function Yo({
|
|
1676
1763
|
table: t,
|
|
1677
1764
|
headerGroup: e,
|
|
1678
1765
|
columnRegion: n,
|
|
1679
|
-
enableSorting:
|
|
1766
|
+
enableSorting: l = !1,
|
|
1680
1767
|
areColumnHeadersLoading: s,
|
|
1681
|
-
ghosts:
|
|
1768
|
+
ghosts: o
|
|
1682
1769
|
}) {
|
|
1683
1770
|
var i;
|
|
1684
|
-
const r = (i = e.headers[e.headers.length - 1]) == null ? void 0 : i.id, c =
|
|
1685
|
-
return /* @__PURE__ */
|
|
1771
|
+
const r = (i = e.headers[e.headers.length - 1]) == null ? void 0 : i.id, c = Pe(pt(t, n), o);
|
|
1772
|
+
return /* @__PURE__ */ W(
|
|
1686
1773
|
"div",
|
|
1687
1774
|
{
|
|
1688
|
-
className:
|
|
1775
|
+
className: G(uo, On),
|
|
1689
1776
|
style: { transform: "translateX(0px)", width: c },
|
|
1690
1777
|
children: [
|
|
1691
|
-
e.headers.map((u) => /* @__PURE__ */
|
|
1692
|
-
|
|
1778
|
+
e.headers.map((u) => /* @__PURE__ */ a(
|
|
1779
|
+
ko,
|
|
1693
1780
|
{
|
|
1694
1781
|
table: t,
|
|
1695
1782
|
header: u,
|
|
1696
1783
|
isLastInRow: u.id === r,
|
|
1697
|
-
enableSorting:
|
|
1784
|
+
enableSorting: l,
|
|
1698
1785
|
loading: s
|
|
1699
1786
|
},
|
|
1700
1787
|
u.id
|
|
1701
1788
|
)),
|
|
1702
|
-
|
|
1789
|
+
o != null && Array.from({ length: o.columnCount }).map((u, f) => /* @__PURE__ */ W(
|
|
1703
1790
|
"div",
|
|
1704
1791
|
{
|
|
1705
|
-
className:
|
|
1706
|
-
[
|
|
1792
|
+
className: G(Tt, bt, {
|
|
1793
|
+
[ft.LOADING]: s
|
|
1707
1794
|
}),
|
|
1708
|
-
style: { flexBasis:
|
|
1795
|
+
style: { flexBasis: o.columnWidth, minWidth: 0, width: o.columnWidth },
|
|
1709
1796
|
children: [
|
|
1710
|
-
/* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ a("div", { className: pe, children: /* @__PURE__ */ a("div", { className: Ae, children: /* @__PURE__ */ a(At, { loading: s, variableLength: !0 }) }) }),
|
|
1798
|
+
/* @__PURE__ */ a("div", { className: _e })
|
|
1712
1799
|
]
|
|
1713
1800
|
},
|
|
1714
1801
|
`ghost-column-header-${f}`
|
|
@@ -1717,188 +1804,196 @@ function Uo({
|
|
|
1717
1804
|
}
|
|
1718
1805
|
);
|
|
1719
1806
|
}
|
|
1720
|
-
function
|
|
1807
|
+
function Xo({
|
|
1721
1808
|
table: t,
|
|
1722
1809
|
columnRegion: e,
|
|
1723
1810
|
enableSorting: n = !1,
|
|
1724
|
-
areColumnHeadersLoading:
|
|
1811
|
+
areColumnHeadersLoading: l,
|
|
1725
1812
|
ghosts: s,
|
|
1726
|
-
className:
|
|
1813
|
+
className: o,
|
|
1727
1814
|
...r
|
|
1728
1815
|
}) {
|
|
1729
|
-
const c = e === "start" ? t.getStartHeaderGroups() : t.getCenterHeaderGroups(), i = e === "center" ? s : void 0, u =
|
|
1730
|
-
return /* @__PURE__ */
|
|
1731
|
-
|
|
1816
|
+
const c = e === "start" ? t.getStartHeaderGroups() : t.getCenterHeaderGroups(), i = e === "center" ? s : void 0, u = Pe(pt(t, e), i);
|
|
1817
|
+
return /* @__PURE__ */ a("div", { ...r, className: G(yn, o), children: /* @__PURE__ */ a("div", { style: { width: u }, children: c.map((f) => /* @__PURE__ */ a(
|
|
1818
|
+
Yo,
|
|
1732
1819
|
{
|
|
1733
1820
|
table: t,
|
|
1734
1821
|
headerGroup: f,
|
|
1735
1822
|
columnRegion: e,
|
|
1736
1823
|
enableSorting: n,
|
|
1737
|
-
areColumnHeadersLoading:
|
|
1824
|
+
areColumnHeadersLoading: l,
|
|
1738
1825
|
ghosts: i
|
|
1739
1826
|
},
|
|
1740
1827
|
f.id
|
|
1741
1828
|
)) }) });
|
|
1742
1829
|
}
|
|
1743
|
-
function
|
|
1830
|
+
function Ko({
|
|
1744
1831
|
width: t,
|
|
1745
1832
|
height: e,
|
|
1746
1833
|
className: n,
|
|
1747
|
-
...
|
|
1834
|
+
...l
|
|
1748
1835
|
}) {
|
|
1749
|
-
const s =
|
|
1750
|
-
return /* @__PURE__ */
|
|
1836
|
+
const s = Rt();
|
|
1837
|
+
return /* @__PURE__ */ a(
|
|
1751
1838
|
"div",
|
|
1752
1839
|
{
|
|
1753
|
-
...
|
|
1754
|
-
className:
|
|
1840
|
+
...l,
|
|
1841
|
+
className: G(Hn, n),
|
|
1755
1842
|
style: { width: t, height: e },
|
|
1756
1843
|
onMouseDown: s == null ? void 0 : s.handleMenuMouseDown
|
|
1757
1844
|
}
|
|
1758
1845
|
);
|
|
1759
1846
|
}
|
|
1760
|
-
function
|
|
1847
|
+
function Qo({
|
|
1761
1848
|
table: t,
|
|
1762
1849
|
width: e,
|
|
1763
1850
|
height: n,
|
|
1764
|
-
loading:
|
|
1851
|
+
loading: l = !1
|
|
1765
1852
|
}) {
|
|
1766
|
-
const s = t.getIsAllRowsSelected(),
|
|
1767
|
-
return /* @__PURE__ */
|
|
1853
|
+
const s = t.getIsAllRowsSelected(), o = t.getIsSomeRowsSelected();
|
|
1854
|
+
return /* @__PURE__ */ a(
|
|
1768
1855
|
"div",
|
|
1769
1856
|
{
|
|
1770
|
-
className:
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1857
|
+
className: G(
|
|
1858
|
+
Tt,
|
|
1859
|
+
bt,
|
|
1860
|
+
lo
|
|
1774
1861
|
),
|
|
1775
1862
|
style: { flex: "0 0 auto", height: n, width: e },
|
|
1776
|
-
children: !
|
|
1777
|
-
|
|
1863
|
+
children: !l && /* @__PURE__ */ a("div", { className: De, children: /* @__PURE__ */ a(
|
|
1864
|
+
we,
|
|
1778
1865
|
{
|
|
1779
1866
|
"aria-label": "Select all rows",
|
|
1780
1867
|
checked: s,
|
|
1781
|
-
indeterminate: !s &&
|
|
1868
|
+
indeterminate: !s && o,
|
|
1782
1869
|
onChange: (r) => t.getToggleAllRowsSelectedHandler()(r)
|
|
1783
1870
|
}
|
|
1784
1871
|
) })
|
|
1785
1872
|
}
|
|
1786
1873
|
);
|
|
1787
1874
|
}
|
|
1788
|
-
var
|
|
1789
|
-
function
|
|
1875
|
+
var Q = /* @__PURE__ */ ((t) => (t.MAIN = "main", t.TOP = "top", t.LEFT = "left", t.TOP_LEFT = "top-left", t))(Q || {});
|
|
1876
|
+
function Zo(t) {
|
|
1790
1877
|
switch (t) {
|
|
1791
|
-
case
|
|
1792
|
-
return
|
|
1793
|
-
case
|
|
1794
|
-
return
|
|
1795
|
-
case
|
|
1796
|
-
return
|
|
1797
|
-
case
|
|
1798
|
-
return
|
|
1878
|
+
case Q.MAIN:
|
|
1879
|
+
return bn;
|
|
1880
|
+
case Q.TOP:
|
|
1881
|
+
return Xn;
|
|
1882
|
+
case Q.LEFT:
|
|
1883
|
+
return Vn;
|
|
1884
|
+
case Q.TOP_LEFT:
|
|
1885
|
+
return Kn;
|
|
1799
1886
|
default:
|
|
1800
1887
|
return;
|
|
1801
1888
|
}
|
|
1802
1889
|
}
|
|
1803
|
-
function
|
|
1890
|
+
function Mt({
|
|
1804
1891
|
quadrantType: t,
|
|
1805
1892
|
table: e,
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1893
|
+
renderRowDetail: n,
|
|
1894
|
+
getCellProps: l,
|
|
1895
|
+
rowExpanderButtonProps: s,
|
|
1896
|
+
rowExpanderIconProps: o,
|
|
1897
|
+
rowHeaderWidth: r,
|
|
1898
|
+
enableRowHeader: c = !0,
|
|
1899
|
+
columnHeaderHeight: i,
|
|
1900
|
+
columnHeaderMeasureRef: u,
|
|
1901
|
+
enableSorting: f = !1,
|
|
1902
|
+
areCellsLoading: d,
|
|
1903
|
+
areColumnHeadersLoading: E,
|
|
1904
|
+
areRowHeadersLoading: v,
|
|
1905
|
+
rowResizing: N,
|
|
1906
|
+
rowVirtualizer: g,
|
|
1907
|
+
ghosts: L,
|
|
1908
|
+
scrollContainerRef: T,
|
|
1909
|
+
onScroll: C,
|
|
1910
|
+
onWheel: m,
|
|
1911
|
+
style: U,
|
|
1912
|
+
selectionColumnWidth: y = 0
|
|
1822
1913
|
}) {
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1914
|
+
const z = t === Q.MAIN, S = t === Q.TOP || t === Q.TOP_LEFT, V = t === Q.LEFT || t === Q.TOP_LEFT ? "start" : "center", j = S ? "top" : "center", _ = t === Q.TOP || t === Q.TOP_LEFT, x = t === Q.TOP_LEFT, H = Rt(), I = Ct(e), X = xt(e, N.getRowTop), M = c ? r : 0, O = (b, J) => /* @__PURE__ */ a(
|
|
1915
|
+
Wo,
|
|
1825
1916
|
{
|
|
1826
1917
|
table: e,
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1918
|
+
renderRowDetail: n,
|
|
1919
|
+
getCellProps: l,
|
|
1920
|
+
rowExpanderButtonProps: s,
|
|
1921
|
+
rowExpanderIconProps: o,
|
|
1922
|
+
columnRegion: V,
|
|
1923
|
+
rowRegion: j,
|
|
1924
|
+
offsetTop: b,
|
|
1925
|
+
offsetLeft: J,
|
|
1926
|
+
areCellsLoading: d,
|
|
1927
|
+
rowVirtualizer: g,
|
|
1928
|
+
rowResizing: N,
|
|
1929
|
+
ghosts: L
|
|
1835
1930
|
}
|
|
1836
|
-
),
|
|
1931
|
+
), B = _ ? /* @__PURE__ */ W(
|
|
1837
1932
|
"div",
|
|
1838
1933
|
{
|
|
1839
|
-
ref: t ===
|
|
1840
|
-
className:
|
|
1841
|
-
style:
|
|
1934
|
+
ref: t === Q.TOP ? u : void 0,
|
|
1935
|
+
className: fo,
|
|
1936
|
+
style: V === "center" ? { paddingLeft: I } : void 0,
|
|
1842
1937
|
children: [
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1938
|
+
x && /* @__PURE__ */ W(Nt, { children: [
|
|
1939
|
+
c && /* @__PURE__ */ a(Ko, { width: r, height: i }),
|
|
1940
|
+
y > 0 && /* @__PURE__ */ a(
|
|
1941
|
+
Qo,
|
|
1847
1942
|
{
|
|
1848
1943
|
table: e,
|
|
1849
|
-
width:
|
|
1850
|
-
height:
|
|
1851
|
-
loading:
|
|
1944
|
+
width: y,
|
|
1945
|
+
height: i,
|
|
1946
|
+
loading: v
|
|
1852
1947
|
}
|
|
1853
1948
|
)
|
|
1854
1949
|
] }),
|
|
1855
|
-
/* @__PURE__ */
|
|
1856
|
-
|
|
1950
|
+
/* @__PURE__ */ a(
|
|
1951
|
+
Xo,
|
|
1857
1952
|
{
|
|
1858
1953
|
table: e,
|
|
1859
|
-
columnRegion:
|
|
1860
|
-
enableSorting:
|
|
1861
|
-
areColumnHeadersLoading:
|
|
1862
|
-
ghosts:
|
|
1954
|
+
columnRegion: V,
|
|
1955
|
+
enableSorting: f,
|
|
1956
|
+
areColumnHeadersLoading: E,
|
|
1957
|
+
ghosts: L
|
|
1863
1958
|
}
|
|
1864
1959
|
)
|
|
1865
1960
|
]
|
|
1866
1961
|
}
|
|
1867
1962
|
) : void 0;
|
|
1868
|
-
let
|
|
1963
|
+
let D;
|
|
1869
1964
|
switch (t) {
|
|
1870
|
-
case
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1965
|
+
case Q.MAIN:
|
|
1966
|
+
D = O(
|
|
1967
|
+
i + X,
|
|
1968
|
+
M + y + I
|
|
1874
1969
|
);
|
|
1875
1970
|
break;
|
|
1876
|
-
case
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
O(0,
|
|
1971
|
+
case Q.TOP:
|
|
1972
|
+
D = /* @__PURE__ */ W(Nt, { children: [
|
|
1973
|
+
B,
|
|
1974
|
+
O(0, I)
|
|
1880
1975
|
] });
|
|
1881
1976
|
break;
|
|
1882
|
-
case
|
|
1883
|
-
|
|
1884
|
-
/* @__PURE__ */
|
|
1977
|
+
case Q.LEFT:
|
|
1978
|
+
D = // The frozen rows' band at the top is covered by the TOP_LEFT quadrant.
|
|
1979
|
+
/* @__PURE__ */ a("div", { style: { paddingTop: X }, children: /* @__PURE__ */ W(
|
|
1885
1980
|
"div",
|
|
1886
1981
|
{
|
|
1887
|
-
className:
|
|
1888
|
-
style: { width:
|
|
1982
|
+
className: Jt,
|
|
1983
|
+
style: { width: M + y + I },
|
|
1889
1984
|
children: [
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
|
|
1985
|
+
/* @__PURE__ */ a(
|
|
1986
|
+
ae,
|
|
1892
1987
|
{
|
|
1893
1988
|
table: e,
|
|
1894
1989
|
rowRegion: "center",
|
|
1895
|
-
rowHeaderWidth:
|
|
1896
|
-
enableRowHeader:
|
|
1897
|
-
selectionColumnWidth:
|
|
1898
|
-
areRowHeadersLoading:
|
|
1899
|
-
rowVirtualizer:
|
|
1900
|
-
rowResizing:
|
|
1901
|
-
ghosts:
|
|
1990
|
+
rowHeaderWidth: r,
|
|
1991
|
+
enableRowHeader: c,
|
|
1992
|
+
selectionColumnWidth: y,
|
|
1993
|
+
areRowHeadersLoading: v,
|
|
1994
|
+
rowVirtualizer: g,
|
|
1995
|
+
rowResizing: N,
|
|
1996
|
+
ghosts: L
|
|
1902
1997
|
}
|
|
1903
1998
|
),
|
|
1904
1999
|
O(0, 0)
|
|
@@ -1906,27 +2001,27 @@ function It({
|
|
|
1906
2001
|
}
|
|
1907
2002
|
) });
|
|
1908
2003
|
break;
|
|
1909
|
-
case
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
/* @__PURE__ */
|
|
2004
|
+
case Q.TOP_LEFT:
|
|
2005
|
+
D = /* @__PURE__ */ W(Nt, { children: [
|
|
2006
|
+
B,
|
|
2007
|
+
/* @__PURE__ */ W(
|
|
1913
2008
|
"div",
|
|
1914
2009
|
{
|
|
1915
|
-
className:
|
|
1916
|
-
style: { width:
|
|
2010
|
+
className: Jt,
|
|
2011
|
+
style: { width: M + y + I },
|
|
1917
2012
|
children: [
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
|
|
2013
|
+
/* @__PURE__ */ a(
|
|
2014
|
+
ae,
|
|
1920
2015
|
{
|
|
1921
2016
|
table: e,
|
|
1922
2017
|
rowRegion: "top",
|
|
1923
|
-
rowHeaderWidth:
|
|
1924
|
-
enableRowHeader:
|
|
1925
|
-
selectionColumnWidth:
|
|
1926
|
-
areRowHeadersLoading:
|
|
1927
|
-
rowVirtualizer:
|
|
1928
|
-
rowResizing:
|
|
1929
|
-
ghosts:
|
|
2018
|
+
rowHeaderWidth: r,
|
|
2019
|
+
enableRowHeader: c,
|
|
2020
|
+
selectionColumnWidth: y,
|
|
2021
|
+
areRowHeadersLoading: v,
|
|
2022
|
+
rowVirtualizer: g,
|
|
2023
|
+
rowResizing: N,
|
|
2024
|
+
ghosts: L
|
|
1930
2025
|
}
|
|
1931
2026
|
),
|
|
1932
2027
|
O(0, 0)
|
|
@@ -1936,477 +2031,530 @@ function It({
|
|
|
1936
2031
|
] });
|
|
1937
2032
|
break;
|
|
1938
2033
|
default:
|
|
1939
|
-
|
|
2034
|
+
D = void 0;
|
|
1940
2035
|
}
|
|
1941
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ a("div", { className: G(Wn, Zo(t)), style: U, children: /* @__PURE__ */ a(
|
|
1942
2037
|
"div",
|
|
1943
2038
|
{
|
|
1944
|
-
ref:
|
|
1945
|
-
className:
|
|
1946
|
-
tabIndex:
|
|
1947
|
-
onKeyDown:
|
|
1948
|
-
onScroll:
|
|
1949
|
-
onWheel:
|
|
1950
|
-
children:
|
|
2039
|
+
ref: T,
|
|
2040
|
+
className: kn,
|
|
2041
|
+
tabIndex: z && H != null ? 0 : void 0,
|
|
2042
|
+
onKeyDown: z ? H == null ? void 0 : H.handleKeyDown : void 0,
|
|
2043
|
+
onScroll: C,
|
|
2044
|
+
onWheel: m,
|
|
2045
|
+
children: D
|
|
1951
2046
|
}
|
|
1952
2047
|
) });
|
|
1953
2048
|
}
|
|
1954
|
-
function
|
|
2049
|
+
function jo({
|
|
1955
2050
|
table: t,
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2051
|
+
renderRowDetail: e,
|
|
2052
|
+
getCellProps: n,
|
|
2053
|
+
rowExpanderButtonProps: l,
|
|
2054
|
+
rowExpanderIconProps: s,
|
|
2055
|
+
rowHeaderWidth: o,
|
|
2056
|
+
enableRowHeader: r = !0,
|
|
2057
|
+
columnHeaderHeight: c,
|
|
2058
|
+
columnHeaderMeasureRef: i,
|
|
2059
|
+
enableColumnReordering: u = !1,
|
|
2060
|
+
enableSorting: f = !1,
|
|
2061
|
+
areCellsLoading: d,
|
|
2062
|
+
areColumnHeadersLoading: E,
|
|
2063
|
+
areRowHeadersLoading: v,
|
|
2064
|
+
selection: N,
|
|
2065
|
+
rowResizing: g,
|
|
2066
|
+
ghosts: L,
|
|
2067
|
+
enableRowVirtualization: T,
|
|
2068
|
+
overscanRowCount: C,
|
|
2069
|
+
scrollContainerRef: m,
|
|
2070
|
+
selectionColumnWidth: U = 0
|
|
1972
2071
|
}) {
|
|
1973
|
-
const
|
|
2072
|
+
const y = Z(null), z = Z(null), S = Z(null), R = Z(null), V = Ct(t), j = mt(t), _ = xt(t, g.getRowTop), x = (r ? o : 0) + U, H = Ln({
|
|
1974
2073
|
table: t,
|
|
1975
|
-
columnHeaderHeight:
|
|
1976
|
-
frozenRowCount:
|
|
1977
|
-
frozenRowsHeight:
|
|
1978
|
-
getRowHeight:
|
|
1979
|
-
scrollContainerRef:
|
|
1980
|
-
enableRowVirtualization:
|
|
1981
|
-
overscanRowCount:
|
|
1982
|
-
}), { contextValue:
|
|
2074
|
+
columnHeaderHeight: c,
|
|
2075
|
+
frozenRowCount: j,
|
|
2076
|
+
frozenRowsHeight: _,
|
|
2077
|
+
getRowHeight: g.getRowSpanHeight,
|
|
2078
|
+
scrollContainerRef: m,
|
|
2079
|
+
enableRowVirtualization: T ?? !1,
|
|
2080
|
+
overscanRowCount: C ?? Ee
|
|
2081
|
+
}), { contextValue: I, guideIndex: X, reorderingColumnId: M } = xo(
|
|
1983
2082
|
t,
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
), [O,
|
|
1989
|
-
|
|
1990
|
-
const [
|
|
1991
|
-
const
|
|
1992
|
-
|
|
1993
|
-
}, [
|
|
1994
|
-
if (
|
|
1995
|
-
const
|
|
1996
|
-
|
|
2083
|
+
u,
|
|
2084
|
+
y,
|
|
2085
|
+
m,
|
|
2086
|
+
x
|
|
2087
|
+
), [O, B] = lt({ left: 0, top: 0 }), D = t.state.columnResizing, b = (D == null ? void 0 : D.isResizingColumn) != null && D.isResizingColumn !== !1, J = g.resizingGuideTop != null, st = M != null, w = Z(!1);
|
|
2088
|
+
w.current = b || J || st;
|
|
2089
|
+
const [p, F] = lt({ vertical: 0, horizontal: 0 }), $ = P(() => {
|
|
2090
|
+
const k = m.current;
|
|
2091
|
+
k != null && (z.current != null && (z.current.scrollLeft = k.scrollLeft), S.current != null && (S.current.scrollTop = k.scrollTop), R.current != null && (R.current.scrollLeft = 0, R.current.scrollTop = 0));
|
|
2092
|
+
}, [m]), K = P(() => {
|
|
2093
|
+
if ($(), w.current) {
|
|
2094
|
+
const k = m.current;
|
|
2095
|
+
k != null && B({ left: k.scrollLeft, top: k.scrollTop });
|
|
1997
2096
|
}
|
|
1998
|
-
}, [
|
|
1999
|
-
const
|
|
2000
|
-
if (
|
|
2097
|
+
}, [m, $]), q = P(() => {
|
|
2098
|
+
const k = m.current;
|
|
2099
|
+
if (k == null)
|
|
2001
2100
|
return;
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2004
|
-
(
|
|
2101
|
+
const Y = Math.max(0, k.offsetWidth - k.clientWidth), ot = Math.max(0, k.offsetHeight - k.clientHeight);
|
|
2102
|
+
F(
|
|
2103
|
+
(et) => et.vertical === Y && et.horizontal === ot ? et : { vertical: Y, horizontal: ot }
|
|
2005
2104
|
);
|
|
2006
|
-
}, [
|
|
2007
|
-
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2105
|
+
}, [m]), it = t.getTotalSize();
|
|
2106
|
+
dt(() => {
|
|
2107
|
+
const k = m.current;
|
|
2108
|
+
if (k == null)
|
|
2010
2109
|
return;
|
|
2011
|
-
|
|
2012
|
-
const
|
|
2013
|
-
return
|
|
2014
|
-
}, [
|
|
2015
|
-
|
|
2110
|
+
q();
|
|
2111
|
+
const Y = new ResizeObserver(q);
|
|
2112
|
+
return Y.observe(k), () => Y.disconnect();
|
|
2113
|
+
}, [q, m]), dt(() => {
|
|
2114
|
+
q();
|
|
2016
2115
|
}, [
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
]),
|
|
2024
|
-
|
|
2025
|
-
}, [
|
|
2026
|
-
if (!
|
|
2116
|
+
c,
|
|
2117
|
+
V,
|
|
2118
|
+
_,
|
|
2119
|
+
q,
|
|
2120
|
+
g.totalHeight,
|
|
2121
|
+
it
|
|
2122
|
+
]), dt(() => {
|
|
2123
|
+
$();
|
|
2124
|
+
}, [c, V, _, $]), dt(() => {
|
|
2125
|
+
if (!w.current)
|
|
2027
2126
|
return;
|
|
2028
|
-
const
|
|
2029
|
-
if (
|
|
2127
|
+
const k = m.current;
|
|
2128
|
+
if (k == null)
|
|
2030
2129
|
return;
|
|
2031
|
-
const
|
|
2032
|
-
(
|
|
2130
|
+
const Y = k.scrollLeft, ot = k.scrollTop;
|
|
2131
|
+
(Y !== O.left || ot !== O.top) && B({ left: Y, top: ot });
|
|
2033
2132
|
}, [
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2133
|
+
b,
|
|
2134
|
+
st,
|
|
2135
|
+
J,
|
|
2136
|
+
m,
|
|
2038
2137
|
O.left,
|
|
2039
2138
|
O.top
|
|
2040
2139
|
]);
|
|
2041
|
-
const
|
|
2042
|
-
(
|
|
2043
|
-
const
|
|
2044
|
-
if (
|
|
2140
|
+
const nt = P(
|
|
2141
|
+
(k) => {
|
|
2142
|
+
const Y = m.current;
|
|
2143
|
+
if (Y == null)
|
|
2045
2144
|
return;
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2145
|
+
const ot = Math.max(0, Y.scrollWidth - Y.clientWidth), et = Math.max(0, Y.scrollHeight - Y.clientHeight), rt = ue(Y.scrollLeft + k.deltaX, 0, ot), ut = ue(Y.scrollTop + k.deltaY, 0, et);
|
|
2146
|
+
rt !== Y.scrollLeft && (Y.scrollLeft = rt), ut !== Y.scrollTop && (Y.scrollTop = ut);
|
|
2048
2147
|
},
|
|
2049
|
-
[
|
|
2050
|
-
),
|
|
2148
|
+
[m]
|
|
2149
|
+
), tt = c + _, at = x + V, ht = {
|
|
2051
2150
|
table: t,
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2151
|
+
renderRowDetail: e,
|
|
2152
|
+
getCellProps: n,
|
|
2153
|
+
rowExpanderButtonProps: l,
|
|
2154
|
+
rowExpanderIconProps: s,
|
|
2155
|
+
rowHeaderWidth: o,
|
|
2156
|
+
enableRowHeader: r,
|
|
2157
|
+
selectionColumnWidth: U,
|
|
2158
|
+
columnHeaderHeight: c,
|
|
2159
|
+
enableSorting: f,
|
|
2160
|
+
areCellsLoading: d,
|
|
2161
|
+
areColumnHeadersLoading: E,
|
|
2162
|
+
areRowHeadersLoading: v,
|
|
2163
|
+
rowResizing: g,
|
|
2164
|
+
rowVirtualizer: H,
|
|
2165
|
+
ghosts: L
|
|
2063
2166
|
};
|
|
2064
|
-
return /* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
|
|
2167
|
+
return /* @__PURE__ */ a("div", { ref: y, className: Yn, children: /* @__PURE__ */ a(be.Provider, { value: I, children: /* @__PURE__ */ W(Ve.Provider, { value: N, children: [
|
|
2168
|
+
/* @__PURE__ */ a(
|
|
2169
|
+
Mt,
|
|
2067
2170
|
{
|
|
2068
|
-
...
|
|
2069
|
-
quadrantType:
|
|
2070
|
-
scrollContainerRef:
|
|
2071
|
-
onScroll:
|
|
2171
|
+
...ht,
|
|
2172
|
+
quadrantType: Q.MAIN,
|
|
2173
|
+
scrollContainerRef: m,
|
|
2174
|
+
onScroll: K
|
|
2072
2175
|
}
|
|
2073
2176
|
),
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
|
|
2177
|
+
/* @__PURE__ */ a(
|
|
2178
|
+
Mt,
|
|
2076
2179
|
{
|
|
2077
|
-
...
|
|
2078
|
-
quadrantType:
|
|
2079
|
-
columnHeaderMeasureRef:
|
|
2080
|
-
scrollContainerRef:
|
|
2081
|
-
onWheel:
|
|
2180
|
+
...ht,
|
|
2181
|
+
quadrantType: Q.TOP,
|
|
2182
|
+
columnHeaderMeasureRef: i,
|
|
2183
|
+
scrollContainerRef: z,
|
|
2184
|
+
onWheel: nt,
|
|
2082
2185
|
style: {
|
|
2083
|
-
height:
|
|
2084
|
-
left:
|
|
2085
|
-
right:
|
|
2186
|
+
height: tt,
|
|
2187
|
+
left: x,
|
|
2188
|
+
right: p.vertical
|
|
2086
2189
|
}
|
|
2087
2190
|
}
|
|
2088
2191
|
),
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
|
|
2192
|
+
/* @__PURE__ */ a(
|
|
2193
|
+
Mt,
|
|
2091
2194
|
{
|
|
2092
|
-
...
|
|
2093
|
-
quadrantType:
|
|
2094
|
-
scrollContainerRef:
|
|
2095
|
-
onWheel:
|
|
2195
|
+
...ht,
|
|
2196
|
+
quadrantType: Q.LEFT,
|
|
2197
|
+
scrollContainerRef: S,
|
|
2198
|
+
onWheel: nt,
|
|
2096
2199
|
style: {
|
|
2097
|
-
bottom:
|
|
2098
|
-
top:
|
|
2099
|
-
width:
|
|
2200
|
+
bottom: p.horizontal,
|
|
2201
|
+
top: c,
|
|
2202
|
+
width: at
|
|
2100
2203
|
}
|
|
2101
2204
|
}
|
|
2102
2205
|
),
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
|
|
2206
|
+
/* @__PURE__ */ a(
|
|
2207
|
+
Mt,
|
|
2105
2208
|
{
|
|
2106
|
-
...
|
|
2107
|
-
quadrantType:
|
|
2108
|
-
scrollContainerRef:
|
|
2109
|
-
onWheel:
|
|
2110
|
-
style: { height:
|
|
2209
|
+
...ht,
|
|
2210
|
+
quadrantType: Q.TOP_LEFT,
|
|
2211
|
+
scrollContainerRef: R,
|
|
2212
|
+
onWheel: nt,
|
|
2213
|
+
style: { height: tt, width: at }
|
|
2111
2214
|
}
|
|
2112
2215
|
),
|
|
2113
|
-
/* @__PURE__ */
|
|
2114
|
-
|
|
2216
|
+
/* @__PURE__ */ a(
|
|
2217
|
+
Do,
|
|
2115
2218
|
{
|
|
2116
2219
|
table: t,
|
|
2117
|
-
rowHeaderWidth:
|
|
2118
|
-
columnHeaderHeight:
|
|
2220
|
+
rowHeaderWidth: x,
|
|
2221
|
+
columnHeaderHeight: c,
|
|
2119
2222
|
scrollLeft: O.left,
|
|
2120
2223
|
scrollTop: O.top,
|
|
2121
|
-
frozenRowCount:
|
|
2122
|
-
resizingGuideTop:
|
|
2123
|
-
resizingRowIndex:
|
|
2224
|
+
frozenRowCount: j,
|
|
2225
|
+
resizingGuideTop: g.resizingGuideTop,
|
|
2226
|
+
resizingRowIndex: g.resizingRowIndex
|
|
2124
2227
|
}
|
|
2125
2228
|
),
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
|
|
2229
|
+
/* @__PURE__ */ a(
|
|
2230
|
+
Bo,
|
|
2128
2231
|
{
|
|
2129
2232
|
table: t,
|
|
2130
|
-
reorderingColumnId:
|
|
2131
|
-
guideIndex:
|
|
2132
|
-
rowHeaderWidth:
|
|
2233
|
+
reorderingColumnId: M,
|
|
2234
|
+
guideIndex: X,
|
|
2235
|
+
rowHeaderWidth: x,
|
|
2133
2236
|
scrollLeft: O.left
|
|
2134
2237
|
}
|
|
2135
2238
|
)
|
|
2136
2239
|
] }) }) });
|
|
2137
2240
|
}
|
|
2138
|
-
function
|
|
2241
|
+
function ue(t, e, n) {
|
|
2139
2242
|
return Math.max(e, Math.min(n, t));
|
|
2140
2243
|
}
|
|
2141
|
-
function
|
|
2244
|
+
function qo({
|
|
2142
2245
|
table: t,
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2246
|
+
renderRowDetail: e,
|
|
2247
|
+
getCellProps: n,
|
|
2248
|
+
rowExpanderButtonProps: l,
|
|
2249
|
+
rowExpanderIconProps: s,
|
|
2250
|
+
rowDetailHeight: o,
|
|
2251
|
+
rowHeight: r,
|
|
2252
|
+
rowHeaderWidth: c,
|
|
2253
|
+
enableRowHeader: i = !0,
|
|
2254
|
+
columnHeaderHeight: u,
|
|
2255
|
+
enableColumnReordering: f = !1,
|
|
2256
|
+
enableSorting: d = !1,
|
|
2257
|
+
areCellsLoading: E,
|
|
2258
|
+
areColumnHeadersLoading: v,
|
|
2259
|
+
areRowHeadersLoading: N,
|
|
2260
|
+
enableFocusedCell: g = !1,
|
|
2261
|
+
enableGhostCells: L = !1,
|
|
2262
|
+
bodyContextMenuRenderer: T,
|
|
2263
|
+
enableBodyContextMenu: C,
|
|
2264
|
+
onFocusedCell: m,
|
|
2265
|
+
onFocusedRegion: U,
|
|
2266
|
+
selectedRegions: y,
|
|
2267
|
+
onSelection: z,
|
|
2268
|
+
selectionModes: S,
|
|
2269
|
+
enableRowVirtualization: R,
|
|
2270
|
+
overscanRowCount: V,
|
|
2271
|
+
enableRowResizing: j = !1,
|
|
2272
|
+
rowHeights: _,
|
|
2273
|
+
defaultRowHeights: x,
|
|
2274
|
+
onRowHeightChanged: H,
|
|
2275
|
+
minRowHeight: I,
|
|
2276
|
+
maxRowHeight: X,
|
|
2277
|
+
selectionColumnWidth: M = 0,
|
|
2278
|
+
className: O,
|
|
2279
|
+
...B
|
|
2172
2280
|
}) {
|
|
2173
|
-
const
|
|
2174
|
-
minHeight:
|
|
2281
|
+
const D = Z(null), b = (i ? c : 0) + M, { ref: J, height: st } = _o({
|
|
2282
|
+
minHeight: u,
|
|
2175
2283
|
headerRowCount: t.getHeaderGroups().length
|
|
2176
|
-
}),
|
|
2177
|
-
|
|
2284
|
+
}), w = gt(() => {
|
|
2285
|
+
var it;
|
|
2286
|
+
if (!e || !t.options.getIsRowExpanded && !((it = t.getIsSomeRowsExpanded) != null && it.call(t)))
|
|
2287
|
+
return;
|
|
2288
|
+
const q = t.getRowModel().rows;
|
|
2289
|
+
return (nt) => {
|
|
2290
|
+
var at;
|
|
2291
|
+
const tt = q[nt];
|
|
2292
|
+
return (at = tt.getIsExpanded) != null && at.call(tt) && tt.getCanExpand() ? Math.max(0, o) : 0;
|
|
2293
|
+
};
|
|
2294
|
+
}, [e, o, t]), p = Mo({
|
|
2295
|
+
rowHeight: r,
|
|
2178
2296
|
rowCount: t.getRowModel().rows.length,
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2297
|
+
getDetailHeight: w,
|
|
2298
|
+
rowHeights: _,
|
|
2299
|
+
defaultRowHeights: x,
|
|
2300
|
+
enableRowResizing: j,
|
|
2301
|
+
minRowHeight: I,
|
|
2302
|
+
maxRowHeight: X,
|
|
2303
|
+
onRowHeightChanged: H
|
|
2304
|
+
}), F = No({
|
|
2186
2305
|
table: t,
|
|
2187
|
-
getRowTop:
|
|
2188
|
-
getRowHeight:
|
|
2189
|
-
scrollContainerRef:
|
|
2190
|
-
rowHeaderWidth:
|
|
2191
|
-
columnHeaderHeight:
|
|
2192
|
-
bodyContextMenuRenderer:
|
|
2193
|
-
enableBodyContextMenu:
|
|
2194
|
-
enableFocusedCell:
|
|
2195
|
-
onFocusedCell:
|
|
2196
|
-
onFocusedRegion:
|
|
2197
|
-
selectedRegions:
|
|
2198
|
-
onSelection:
|
|
2199
|
-
selectionModes:
|
|
2200
|
-
}),
|
|
2201
|
-
enableGhostCells:
|
|
2202
|
-
rowHeight:
|
|
2203
|
-
rowHeaderWidth:
|
|
2204
|
-
columnHeaderHeight:
|
|
2306
|
+
getRowTop: p.getRowTop,
|
|
2307
|
+
getRowHeight: p.getRowHeight,
|
|
2308
|
+
scrollContainerRef: D,
|
|
2309
|
+
rowHeaderWidth: b,
|
|
2310
|
+
columnHeaderHeight: st,
|
|
2311
|
+
bodyContextMenuRenderer: T,
|
|
2312
|
+
enableBodyContextMenu: C,
|
|
2313
|
+
enableFocusedCell: g,
|
|
2314
|
+
onFocusedCell: m,
|
|
2315
|
+
onFocusedRegion: U,
|
|
2316
|
+
selectedRegions: y,
|
|
2317
|
+
onSelection: z,
|
|
2318
|
+
selectionModes: S
|
|
2319
|
+
}), $ = So({
|
|
2320
|
+
enableGhostCells: L,
|
|
2321
|
+
rowHeight: r,
|
|
2322
|
+
rowHeaderWidth: b,
|
|
2323
|
+
columnHeaderHeight: st,
|
|
2205
2324
|
totalWidth: t.getTotalSize(),
|
|
2206
|
-
totalHeight:
|
|
2207
|
-
scrollContainerRef:
|
|
2208
|
-
}),
|
|
2209
|
-
return /* @__PURE__ */
|
|
2325
|
+
totalHeight: p.totalHeight,
|
|
2326
|
+
scrollContainerRef: D
|
|
2327
|
+
}), K = F.isSelectionModeEnabled(ct.CELLS) ? so : void 0;
|
|
2328
|
+
return /* @__PURE__ */ a(
|
|
2210
2329
|
"div",
|
|
2211
2330
|
{
|
|
2212
|
-
...
|
|
2213
|
-
className:
|
|
2214
|
-
[
|
|
2215
|
-
[
|
|
2216
|
-
},
|
|
2217
|
-
children: /* @__PURE__ */
|
|
2218
|
-
|
|
2331
|
+
...B,
|
|
2332
|
+
className: G(xn, K, {
|
|
2333
|
+
[Un]: $ != null && $.columnCount > 0,
|
|
2334
|
+
[zn]: $ != null && $.rowCount > 0
|
|
2335
|
+
}, O),
|
|
2336
|
+
children: /* @__PURE__ */ a(
|
|
2337
|
+
jo,
|
|
2219
2338
|
{
|
|
2220
2339
|
table: t,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2340
|
+
renderRowDetail: e,
|
|
2341
|
+
getCellProps: n,
|
|
2342
|
+
rowExpanderButtonProps: l,
|
|
2343
|
+
rowExpanderIconProps: s,
|
|
2344
|
+
rowHeaderWidth: c,
|
|
2345
|
+
enableRowHeader: i,
|
|
2346
|
+
columnHeaderHeight: st,
|
|
2347
|
+
columnHeaderMeasureRef: J,
|
|
2348
|
+
enableColumnReordering: f,
|
|
2349
|
+
enableSorting: d,
|
|
2350
|
+
areCellsLoading: E,
|
|
2351
|
+
areColumnHeadersLoading: v,
|
|
2352
|
+
areRowHeadersLoading: N,
|
|
2353
|
+
selection: F,
|
|
2354
|
+
rowResizing: p,
|
|
2355
|
+
ghosts: $,
|
|
2356
|
+
enableRowVirtualization: R,
|
|
2357
|
+
overscanRowCount: V,
|
|
2358
|
+
scrollContainerRef: D,
|
|
2359
|
+
selectionColumnWidth: M
|
|
2237
2360
|
}
|
|
2238
2361
|
)
|
|
2239
2362
|
}
|
|
2240
2363
|
);
|
|
2241
2364
|
}
|
|
2242
|
-
|
|
2365
|
+
const Jo = () => !0;
|
|
2366
|
+
function hl({
|
|
2243
2367
|
htmlProps: t,
|
|
2244
|
-
rowHeight: e =
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2368
|
+
rowHeight: e = Tn,
|
|
2369
|
+
expandedRows: n,
|
|
2370
|
+
initialExpandedRows: l,
|
|
2371
|
+
onExpandedRowsChange: s,
|
|
2372
|
+
renderRowDetail: o,
|
|
2373
|
+
getCellProps: r,
|
|
2374
|
+
rowExpanderButtonProps: c,
|
|
2375
|
+
rowExpanderIconProps: i,
|
|
2376
|
+
rowDetailHeight: u = 100,
|
|
2377
|
+
showRowSelectionCheckboxes: f = !1,
|
|
2378
|
+
rowSelectionColumnWidth: d = vn,
|
|
2379
|
+
rowHeaderWidth: E = Cn,
|
|
2380
|
+
enableRowHeader: v = !0,
|
|
2381
|
+
columnHeaderHeight: N = ge,
|
|
2382
|
+
enableColumnReordering: g = !1,
|
|
2383
|
+
enableSorting: L = !1,
|
|
2384
|
+
loadingOptions: T = [],
|
|
2385
|
+
enableFocusedCell: C = !1,
|
|
2386
|
+
enableGhostCells: m = !1,
|
|
2387
|
+
bodyContextMenuRenderer: U,
|
|
2388
|
+
enableBodyContextMenu: y,
|
|
2389
|
+
onFocusedCell: z,
|
|
2390
|
+
onFocusedRegion: S,
|
|
2391
|
+
selectedRegions: R,
|
|
2392
|
+
onSelection: V,
|
|
2393
|
+
selectionModes: j,
|
|
2394
|
+
enableRowVirtualization: _ = !1,
|
|
2395
|
+
numFrozenColumns: x = 0,
|
|
2396
|
+
numFrozenRows: H = 0,
|
|
2397
|
+
overscanRowCount: I = Ee,
|
|
2398
|
+
columnVisibility: X,
|
|
2399
|
+
enableRowResizing: M = !1,
|
|
2400
|
+
rowHeights: O,
|
|
2401
|
+
defaultRowHeights: B,
|
|
2402
|
+
onRowHeightChanged: D,
|
|
2403
|
+
minRowHeight: b,
|
|
2404
|
+
maxRowHeight: J,
|
|
2405
|
+
rowSelection: st,
|
|
2406
|
+
defaultRowSelection: w,
|
|
2407
|
+
...p
|
|
2276
2408
|
}) {
|
|
2277
|
-
var
|
|
2278
|
-
const [
|
|
2279
|
-
value:
|
|
2280
|
-
initialValue:
|
|
2409
|
+
var et, rt, ut, wt, Qt;
|
|
2410
|
+
const [F, $] = jt({
|
|
2411
|
+
value: st ?? ((et = p.state) == null ? void 0 : et.rowSelection),
|
|
2412
|
+
initialValue: w ?? ((rt = p.initialState) == null ? void 0 : rt.rowSelection),
|
|
2413
|
+
finalValue: {},
|
|
2414
|
+
onChange: p.onRowSelectionChange
|
|
2415
|
+
}), K = (ut = p.atoms) == null ? void 0 : ut.expanded, [q, it] = jt({
|
|
2416
|
+
value: (K == null ? void 0 : K.get()) ?? n ?? ((wt = p.state) == null ? void 0 : wt.expanded),
|
|
2417
|
+
initialValue: l ?? ((Qt = p.initialState) == null ? void 0 : Qt.expanded),
|
|
2281
2418
|
finalValue: {},
|
|
2282
|
-
onChange:
|
|
2283
|
-
}),
|
|
2284
|
-
|
|
2285
|
-
|
|
2419
|
+
onChange: s
|
|
2420
|
+
}), nt = En({
|
|
2421
|
+
...p,
|
|
2422
|
+
initialState: l === void 0 ? p.initialState : {
|
|
2423
|
+
...p.initialState,
|
|
2424
|
+
expanded: l
|
|
2286
2425
|
},
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
...G,
|
|
2290
|
-
enableSorting: i,
|
|
2426
|
+
getRowCanExpand: p.getRowCanExpand ?? (o != null && p.enableExpanding !== !1 ? Jo : void 0),
|
|
2427
|
+
enableSorting: L,
|
|
2291
2428
|
state: {
|
|
2292
|
-
...
|
|
2293
|
-
...
|
|
2294
|
-
rowSelection:
|
|
2429
|
+
...p.state,
|
|
2430
|
+
...X !== void 0 ? { columnVisibility: X } : {},
|
|
2431
|
+
rowSelection: F,
|
|
2432
|
+
expanded: q
|
|
2295
2433
|
},
|
|
2296
|
-
onRowSelectionChange:
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2434
|
+
onRowSelectionChange: $,
|
|
2435
|
+
onExpandedChange: (Bt) => {
|
|
2436
|
+
it(Bt), p.onExpandedChange ? p.onExpandedChange(Bt) : K == null || K.set((ke) => de(Bt, ke));
|
|
2437
|
+
}
|
|
2438
|
+
}), tt = Wt(Ft), at = tt ? nt.getPrePaginatedRowModel().rows.length : void 0;
|
|
2439
|
+
dt(() => {
|
|
2440
|
+
at !== void 0 && (tt == null || tt(at));
|
|
2441
|
+
}, [at, tt]), gn({ table: nt, numFrozenColumns: x, numFrozenRows: H });
|
|
2442
|
+
const ht = $t(T, Ot.CELLS), k = $t(
|
|
2443
|
+
T,
|
|
2444
|
+
Ot.COLUMN_HEADERS
|
|
2445
|
+
), Y = $t(T, Ot.ROW_HEADERS), ot = /* @__PURE__ */ a(
|
|
2446
|
+
qo,
|
|
2305
2447
|
{
|
|
2306
|
-
table:
|
|
2448
|
+
table: nt,
|
|
2307
2449
|
rowHeight: e,
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2450
|
+
renderRowDetail: o,
|
|
2451
|
+
getCellProps: r,
|
|
2452
|
+
rowExpanderButtonProps: c,
|
|
2453
|
+
rowExpanderIconProps: i,
|
|
2454
|
+
rowDetailHeight: u,
|
|
2455
|
+
rowHeaderWidth: E,
|
|
2456
|
+
enableRowHeader: v,
|
|
2457
|
+
columnHeaderHeight: N,
|
|
2458
|
+
enableColumnReordering: g,
|
|
2459
|
+
enableSorting: L,
|
|
2460
|
+
areCellsLoading: ht,
|
|
2461
|
+
areColumnHeadersLoading: k,
|
|
2462
|
+
areRowHeadersLoading: Y,
|
|
2463
|
+
enableFocusedCell: C,
|
|
2464
|
+
enableGhostCells: m,
|
|
2465
|
+
bodyContextMenuRenderer: U,
|
|
2466
|
+
enableBodyContextMenu: y,
|
|
2467
|
+
onFocusedCell: z,
|
|
2468
|
+
onFocusedRegion: S,
|
|
2469
|
+
selectedRegions: R,
|
|
2470
|
+
onSelection: V,
|
|
2471
|
+
selectionModes: j,
|
|
2472
|
+
enableRowVirtualization: _,
|
|
2473
|
+
overscanRowCount: I,
|
|
2474
|
+
enableRowResizing: M,
|
|
2475
|
+
rowHeights: O,
|
|
2476
|
+
defaultRowHeights: B,
|
|
2477
|
+
onRowHeightChanged: D,
|
|
2478
|
+
minRowHeight: b,
|
|
2479
|
+
maxRowHeight: J,
|
|
2480
|
+
selectionColumnWidth: f ? d : 0,
|
|
2334
2481
|
...t
|
|
2335
2482
|
}
|
|
2336
2483
|
);
|
|
2484
|
+
return tt ? /* @__PURE__ */ a(Ft.Provider, { value: void 0, children: ot }) : ot;
|
|
2337
2485
|
}
|
|
2338
|
-
const
|
|
2339
|
-
function
|
|
2486
|
+
const tl = 10, el = [10, 20, 50, 100];
|
|
2487
|
+
function nl({
|
|
2340
2488
|
pageIndex: t,
|
|
2341
2489
|
pageSize: e,
|
|
2342
2490
|
pageCount: n,
|
|
2343
|
-
rowCount:
|
|
2344
|
-
pageSizeOptions: s =
|
|
2345
|
-
onPageIndexChange:
|
|
2491
|
+
rowCount: l,
|
|
2492
|
+
pageSizeOptions: s = el,
|
|
2493
|
+
onPageIndexChange: o,
|
|
2346
2494
|
onPageSizeChange: r,
|
|
2347
2495
|
className: c
|
|
2348
2496
|
}) {
|
|
2349
|
-
const i = n != null && n >= 0 ? n : void 0, u = t > 0, f = i === void 0 ? !0 : t < i - 1,
|
|
2350
|
-
return /* @__PURE__ */
|
|
2351
|
-
/* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2354
|
-
|
|
2497
|
+
const i = n != null && n >= 0 ? n : void 0, u = t > 0, f = i === void 0 ? !0 : t < i - 1, d = l === void 0 || l === 0 ? 0 : t * e + 1, E = l === void 0 ? void 0 : Math.min((t + 1) * e, l), v = s.includes(e) ? s : [...s, e].sort((N, g) => N - g);
|
|
2498
|
+
return /* @__PURE__ */ W("div", { className: G(Fn, c), children: [
|
|
2499
|
+
/* @__PURE__ */ W("div", { className: te, children: [
|
|
2500
|
+
/* @__PURE__ */ a("span", { className: Ht, children: "Rows per page:" }),
|
|
2501
|
+
/* @__PURE__ */ a(
|
|
2502
|
+
hn,
|
|
2355
2503
|
{
|
|
2356
2504
|
"aria-label": "Rows per page",
|
|
2357
|
-
onChange: (
|
|
2358
|
-
options:
|
|
2505
|
+
onChange: (N) => r(Number(N.currentTarget.value)),
|
|
2506
|
+
options: v,
|
|
2359
2507
|
value: e
|
|
2360
2508
|
}
|
|
2361
2509
|
),
|
|
2362
|
-
|
|
2363
|
-
|
|
2510
|
+
l !== void 0 && /* @__PURE__ */ W("span", { className: Ht, children: [
|
|
2511
|
+
d === 0 ? 0 : `${d}–${E}`,
|
|
2364
2512
|
" of ",
|
|
2365
|
-
|
|
2513
|
+
l
|
|
2366
2514
|
] })
|
|
2367
2515
|
] }),
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
/* @__PURE__ */
|
|
2516
|
+
/* @__PURE__ */ W("div", { className: te, children: [
|
|
2517
|
+
/* @__PURE__ */ W("span", { className: Ht, children: [
|
|
2370
2518
|
"Page ",
|
|
2371
2519
|
t + 1,
|
|
2372
2520
|
i !== void 0 ? ` of ${i}` : ""
|
|
2373
2521
|
] }),
|
|
2374
|
-
/* @__PURE__ */
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
|
|
2522
|
+
/* @__PURE__ */ W(mn, { children: [
|
|
2523
|
+
/* @__PURE__ */ a(
|
|
2524
|
+
It,
|
|
2377
2525
|
{
|
|
2378
2526
|
"aria-label": "First page",
|
|
2379
2527
|
disabled: !u,
|
|
2380
2528
|
icon: "double-chevron-left",
|
|
2381
|
-
onClick: () =>
|
|
2529
|
+
onClick: () => o(0)
|
|
2382
2530
|
}
|
|
2383
2531
|
),
|
|
2384
|
-
/* @__PURE__ */
|
|
2385
|
-
|
|
2532
|
+
/* @__PURE__ */ a(
|
|
2533
|
+
It,
|
|
2386
2534
|
{
|
|
2387
2535
|
"aria-label": "Previous page",
|
|
2388
2536
|
disabled: !u,
|
|
2389
2537
|
icon: "chevron-left",
|
|
2390
|
-
onClick: () =>
|
|
2538
|
+
onClick: () => o(t - 1)
|
|
2391
2539
|
}
|
|
2392
2540
|
),
|
|
2393
|
-
/* @__PURE__ */
|
|
2394
|
-
|
|
2541
|
+
/* @__PURE__ */ a(
|
|
2542
|
+
It,
|
|
2395
2543
|
{
|
|
2396
2544
|
"aria-label": "Next page",
|
|
2397
2545
|
disabled: !f,
|
|
2398
2546
|
icon: "chevron-right",
|
|
2399
|
-
onClick: () =>
|
|
2547
|
+
onClick: () => o(t + 1)
|
|
2400
2548
|
}
|
|
2401
2549
|
),
|
|
2402
|
-
/* @__PURE__ */
|
|
2403
|
-
|
|
2550
|
+
/* @__PURE__ */ a(
|
|
2551
|
+
It,
|
|
2404
2552
|
{
|
|
2405
2553
|
"aria-label": "Last page",
|
|
2406
2554
|
disabled: i === void 0 || !f,
|
|
2407
2555
|
icon: "double-chevron-right",
|
|
2408
2556
|
onClick: () => {
|
|
2409
|
-
i !== void 0 &&
|
|
2557
|
+
i !== void 0 && o(i - 1);
|
|
2410
2558
|
}
|
|
2411
2559
|
}
|
|
2412
2560
|
)
|
|
@@ -2414,98 +2562,98 @@ function Yo({
|
|
|
2414
2562
|
] })
|
|
2415
2563
|
] });
|
|
2416
2564
|
}
|
|
2417
|
-
const
|
|
2418
|
-
...
|
|
2419
|
-
rowPaginationFeature:
|
|
2420
|
-
paginatedRowModel:
|
|
2565
|
+
const ol = Pt({
|
|
2566
|
+
...Vt,
|
|
2567
|
+
rowPaginationFeature: fe,
|
|
2568
|
+
paginatedRowModel: he()
|
|
2421
2569
|
});
|
|
2422
|
-
function
|
|
2570
|
+
function ml(t) {
|
|
2423
2571
|
function e({
|
|
2424
|
-
data:
|
|
2572
|
+
data: l,
|
|
2425
2573
|
initialState: s,
|
|
2426
|
-
state:
|
|
2574
|
+
state: o,
|
|
2427
2575
|
features: r,
|
|
2428
2576
|
onPaginationChange: c,
|
|
2429
2577
|
manualPagination: i,
|
|
2430
2578
|
pageCount: u,
|
|
2431
2579
|
rowCount: f,
|
|
2432
|
-
initialPageIndex:
|
|
2433
|
-
initialPageSize:
|
|
2434
|
-
pageSizeOptions:
|
|
2435
|
-
showPaginationBar:
|
|
2436
|
-
paginationBarClassName:
|
|
2437
|
-
...
|
|
2580
|
+
initialPageIndex: d = 0,
|
|
2581
|
+
initialPageSize: E = tl,
|
|
2582
|
+
pageSizeOptions: v,
|
|
2583
|
+
showPaginationBar: N = !0,
|
|
2584
|
+
paginationBarClassName: g,
|
|
2585
|
+
...L
|
|
2438
2586
|
}) {
|
|
2439
|
-
const [
|
|
2440
|
-
var
|
|
2587
|
+
const [T, C] = lt(() => {
|
|
2588
|
+
var B, D;
|
|
2441
2589
|
return {
|
|
2442
|
-
pageIndex: ((
|
|
2443
|
-
pageSize: ((
|
|
2590
|
+
pageIndex: ((B = s == null ? void 0 : s.pagination) == null ? void 0 : B.pageIndex) ?? d,
|
|
2591
|
+
pageSize: ((D = s == null ? void 0 : s.pagination) == null ? void 0 : D.pageSize) ?? E
|
|
2444
2592
|
};
|
|
2445
|
-
}),
|
|
2446
|
-
(
|
|
2447
|
-
c == null || c(
|
|
2593
|
+
}), m = o == null ? void 0 : o.pagination, U = m ?? T, { pageIndex: y, pageSize: z } = U, S = P(
|
|
2594
|
+
(B) => {
|
|
2595
|
+
c == null || c(B), m === void 0 && C((D) => de(B, D));
|
|
2448
2596
|
},
|
|
2449
|
-
[
|
|
2450
|
-
),
|
|
2451
|
-
|
|
2452
|
-
if (
|
|
2597
|
+
[m, c]
|
|
2598
|
+
), R = i === !0, [V, j] = lt(), _ = !R && L.getSubRows != null && L.paginateExpandedRows !== !1, x = _ ? V : l.length, H = R ? f : x, I = gt(() => R ? u != null && u >= 0 ? u : f != null ? Math.ceil(f / z) : void 0 : x === void 0 ? void 0 : Math.max(1, Math.ceil(x / z)), [x, R, u, z, f]);
|
|
2599
|
+
Lt(() => {
|
|
2600
|
+
if (I === void 0)
|
|
2453
2601
|
return;
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2456
|
-
}, [
|
|
2457
|
-
const
|
|
2458
|
-
() => r == null ?
|
|
2459
|
-
...
|
|
2602
|
+
const B = Math.max(0, I - 1);
|
|
2603
|
+
y > B && S((D) => ({ ...D, pageIndex: B }));
|
|
2604
|
+
}, [S, I, y]);
|
|
2605
|
+
const X = gt(
|
|
2606
|
+
() => r == null ? ol : Pt({
|
|
2607
|
+
...Vt,
|
|
2460
2608
|
...r,
|
|
2461
|
-
rowPaginationFeature:
|
|
2462
|
-
paginatedRowModel:
|
|
2609
|
+
rowPaginationFeature: fe,
|
|
2610
|
+
paginatedRowModel: he()
|
|
2463
2611
|
}),
|
|
2464
2612
|
[r]
|
|
2465
|
-
),
|
|
2466
|
-
(
|
|
2467
|
-
|
|
2468
|
-
...
|
|
2469
|
-
pageIndex: Math.max(0,
|
|
2613
|
+
), M = P(
|
|
2614
|
+
(B) => {
|
|
2615
|
+
S((D) => ({
|
|
2616
|
+
...D,
|
|
2617
|
+
pageIndex: Math.max(0, B)
|
|
2470
2618
|
}));
|
|
2471
2619
|
},
|
|
2472
|
-
[
|
|
2473
|
-
), O =
|
|
2474
|
-
(
|
|
2475
|
-
|
|
2476
|
-
...
|
|
2620
|
+
[S]
|
|
2621
|
+
), O = P(
|
|
2622
|
+
(B) => {
|
|
2623
|
+
S((D) => ({
|
|
2624
|
+
...D,
|
|
2477
2625
|
pageIndex: 0,
|
|
2478
|
-
pageSize:
|
|
2626
|
+
pageSize: B
|
|
2479
2627
|
}));
|
|
2480
2628
|
},
|
|
2481
|
-
[
|
|
2629
|
+
[S]
|
|
2482
2630
|
);
|
|
2483
|
-
return /* @__PURE__ */
|
|
2484
|
-
/* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ W("div", { className: Gn, children: [
|
|
2632
|
+
/* @__PURE__ */ a(Ft.Provider, { value: _ ? j : void 0, children: /* @__PURE__ */ a(
|
|
2485
2633
|
t,
|
|
2486
2634
|
{
|
|
2487
|
-
...
|
|
2488
|
-
data:
|
|
2635
|
+
...L,
|
|
2636
|
+
data: l,
|
|
2489
2637
|
initialState: s,
|
|
2490
|
-
state: { ...
|
|
2491
|
-
features:
|
|
2492
|
-
onPaginationChange:
|
|
2638
|
+
state: { ...o, pagination: U },
|
|
2639
|
+
features: X,
|
|
2640
|
+
onPaginationChange: S,
|
|
2493
2641
|
manualPagination: i,
|
|
2494
2642
|
pageCount: u,
|
|
2495
2643
|
rowCount: f
|
|
2496
2644
|
}
|
|
2497
|
-
),
|
|
2498
|
-
|
|
2499
|
-
|
|
2645
|
+
) }),
|
|
2646
|
+
N && /* @__PURE__ */ a(
|
|
2647
|
+
nl,
|
|
2500
2648
|
{
|
|
2501
|
-
className:
|
|
2502
|
-
onPageIndexChange:
|
|
2649
|
+
className: g,
|
|
2650
|
+
onPageIndexChange: M,
|
|
2503
2651
|
onPageSizeChange: O,
|
|
2504
|
-
pageCount:
|
|
2505
|
-
pageIndex:
|
|
2652
|
+
pageCount: I,
|
|
2653
|
+
pageIndex: y,
|
|
2506
2654
|
pageSize: z,
|
|
2507
|
-
pageSizeOptions:
|
|
2508
|
-
rowCount:
|
|
2655
|
+
pageSizeOptions: v,
|
|
2656
|
+
rowCount: H
|
|
2509
2657
|
}
|
|
2510
2658
|
)
|
|
2511
2659
|
] });
|
|
@@ -2514,20 +2662,20 @@ function ll(t) {
|
|
|
2514
2662
|
return e.displayName = `withPagination(${n})`, e;
|
|
2515
2663
|
}
|
|
2516
2664
|
export {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2665
|
+
hl as BP_Table,
|
|
2666
|
+
Vt as DEFAULT_BP_TABLE_FEATURES,
|
|
2667
|
+
tl as DEFAULT_PAGE_SIZE,
|
|
2668
|
+
el as DEFAULT_PAGE_SIZE_OPTIONS,
|
|
2669
|
+
ho as Direction,
|
|
2670
|
+
Ge as FocusMode,
|
|
2671
|
+
ct as RegionCardinality,
|
|
2524
2672
|
A as Regions,
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2673
|
+
Ot as TableLoadingOption,
|
|
2674
|
+
nl as TablePaginationBar,
|
|
2675
|
+
mo as directionToDelta,
|
|
2676
|
+
$t as hasLoadingOption,
|
|
2677
|
+
dl as moveFocusedCell,
|
|
2678
|
+
fl as resizeRegion,
|
|
2679
|
+
ml as withPagination
|
|
2532
2680
|
};
|
|
2533
2681
|
//# sourceMappingURL=blueprintjs-react-table.js.map
|