@pibit.ai/cure-design-system 0.3.35 → 0.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +90 -85
- package/dist/patterns/table/TableWrapper.d.ts +1 -1
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +815 -728
- package/dist/patterns/table/index.d.ts +5 -4
- package/dist/patterns/table/index.d.ts.map +1 -1
- package/dist/patterns/table/scrollCellIntoView.d.ts +48 -0
- package/dist/patterns/table/scrollCellIntoView.d.ts.map +1 -0
- package/dist/patterns/table/scrollCellIntoView.js +122 -0
- package/dist/patterns/table/tableZoomLayout.d.ts +59 -0
- package/dist/patterns/table/tableZoomLayout.d.ts.map +1 -0
- package/dist/patterns/table/tableZoomLayout.js +37 -0
- package/dist/patterns/table/tableZoomLayout.test.d.ts +2 -0
- package/dist/patterns/table/tableZoomLayout.test.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts +2 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/TableToolbar.js +104 -102
- package/dist/patterns/table/types.d.ts +38 -1
- package/dist/patterns/table/types.d.ts.map +1 -1
- package/dist/patterns/table/useGridKeyboardNavigation.d.ts +14 -3
- package/dist/patterns/table/useGridKeyboardNavigation.d.ts.map +1 -1
- package/dist/patterns/table/useGridKeyboardNavigation.js +47 -46
- package/dist/styles/components.css +1 -1
- package/package.json +1 -1
|
@@ -1,420 +1,492 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { jsx as a, jsxs as E, Fragment as wt } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Vr, useMemo as b, useState as H, useRef as oe, useEffect as X, useCallback as I, useLayoutEffect as Jt } from "react";
|
|
3
|
+
import { Slider as Jr, SliderTrack as Qr, SliderThumb as en } from "react-aria-components";
|
|
4
|
+
import { ChevronRight as tn } from "@untitledui/icons";
|
|
5
|
+
import { cx as x } from "../../utils/cn.js";
|
|
6
|
+
import { TableCard as rn, Table as m } from "./table.js";
|
|
7
|
+
import { TablePagination as nn } from "./TablePagination.js";
|
|
8
|
+
import { getEffectiveAlignment as dr, resolveColumnLabel as sn, alignmentClass as on } from "./toolbar/tableToolbarHelpers.js";
|
|
9
|
+
import { normalizeZoomConfig as an, DEFAULT_TABLE_ZOOM as cn, parsePxValue as mt, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as Qt, supportsCssZoom as dn, DEFAULT_TABLE_ZOOM_MIN as ln, clamp as er, computeFillBaseWidth as un, computeEffectiveTableWidth as fn, computeFlexColumnWidth as pn, DEFAULT_COLUMN_MAX_WIDTH as lr, computeNeedsHorizontalScroll as hn } from "./tableZoomLayout.js";
|
|
10
|
+
import { findGridCell as tr, isWithinCellEditor as Be, getGridNeighbor as yn, getGridTabNeighbor as wn, focusGridCell as rr, GridNavProvider as mn } from "./useGridKeyboardNavigation.js";
|
|
11
|
+
import { scrollGridCellIntoView as gn } from "./scrollCellIntoView.js";
|
|
12
|
+
import { ROW_DRAG_THRESHOLD_PX as xn, computeDropTarget as Rn, clipDropLineToScrollport as vn, ROW_REORDER_ATTR as nr, measureRowPreview as bn, cloneRowForPreview as kn, FloatingRowPreview as En, DropIndicatorLine as In, getRowDragScrollDelta as Nn, ROW_DRAG_SOURCE_STYLE as Ln, ROW_SOURCE_INDEX_ATTR as Wn } from "./rowReorderDrag.js";
|
|
13
|
+
import { selectionFromSingleCell as gt, resolveCellCoordFromElement as $e, resolveRowAnchorCoordFromTarget as Dn, buildCellRangeRect as xt, nextKeyboardCellSelection as _n, CELL_RANGE_DRAG_THRESHOLD_PX as Pn, hitTestGridCell as Sn, canStartCellRangeFromTarget as ir, getDragScrollDeltas as Tn, getCellRangeVisualState as Cn, cellRangeEdgeBoxShadow as On } from "./cellRangeSelection.js";
|
|
14
|
+
import { BulkActionBar as Fn } from "./toolbar/BulkActionBar.js";
|
|
15
|
+
import { TableToolbar as Zn } from "./toolbar/TableToolbar.js";
|
|
16
|
+
import { Checkbox as sr } from "../../primitives/checkbox/checkbox.js";
|
|
17
|
+
import { ColumnHeaderMenu as Gn } from "./toolbar/ColumnHeaderMenu.js";
|
|
18
|
+
import { Button as Mn } from "../../primitives/button/button.js";
|
|
19
|
+
import { SummaryFooterRow as An } from "./toolbar/SummaryFooter.js";
|
|
20
|
+
import { RowActionsMenu as Un } from "./toolbar/RowActionsMenu.js";
|
|
21
|
+
import { Icon as Yn } from "../../primitives/icon/icon.js";
|
|
22
|
+
import { ShimmerLine as Bn } from "../../primitives/shimmer/shimmer.js";
|
|
23
|
+
const $n = dn(), Xn = 5, jn = "__all__", or = {
|
|
21
24
|
ArrowUp: "up",
|
|
22
25
|
ArrowDown: "down",
|
|
23
26
|
ArrowLeft: "left",
|
|
24
27
|
ArrowRight: "right"
|
|
25
|
-
},
|
|
26
|
-
function
|
|
27
|
-
return
|
|
28
|
+
}, ve = (s) => s.__rowId ?? s.id ?? s.rule_id ?? String(s);
|
|
29
|
+
function ar(s, u) {
|
|
30
|
+
return s === "all" ? new Set(u) : s ?? /* @__PURE__ */ new Set();
|
|
28
31
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
32
|
+
function qn(s, u, f) {
|
|
33
|
+
return s ? s === "all" ? f.includes(u) : s.has(u) : !1;
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
35
|
+
function Kn(s, u) {
|
|
36
|
+
return s ? s === "all" ? u.length : s.size : 0;
|
|
34
37
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
38
|
+
function Hn(s, u) {
|
|
39
|
+
return u.length === 0 ? !1 : s === "all" ? !0 : u.every((f) => (s == null ? void 0 : s.has(f)) ?? !1);
|
|
37
40
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
41
|
+
function zn(s, u) {
|
|
42
|
+
return s === "all" ? u.length > 0 : u.some((f) => (s == null ? void 0 : s.has(f)) ?? !1);
|
|
40
43
|
}
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
return (
|
|
44
|
-
|
|
44
|
+
function Vn(s) {
|
|
45
|
+
if (s)
|
|
46
|
+
return (u) => {
|
|
47
|
+
s(u === "all" ? "all" : new Set([...u].map(String)));
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
return
|
|
50
|
+
function Jn(s) {
|
|
51
|
+
var u;
|
|
52
|
+
return s != null && s.length ? s.length > 1 ? !0 : ((u = s[0]) == null ? void 0 : u.key) !== jn : !1;
|
|
50
53
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
54
|
+
function cr(s, u, f) {
|
|
55
|
+
return f ? dr(f, u ?? /* @__PURE__ */ new Map()) : (u == null ? void 0 : u.get(s)) ?? "left";
|
|
53
56
|
}
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
width: i.width,
|
|
60
|
-
maxWidth: i.maxWidth ?? lt,
|
|
61
|
-
minWidth: i.minWidth ?? i.width
|
|
62
|
-
}), Kt = (i) => {
|
|
63
|
-
const d = dt(i);
|
|
64
|
-
return d ? {
|
|
65
|
-
minWidth: d,
|
|
66
|
-
width: d,
|
|
67
|
-
maxWidth: i.maxWidth ?? d
|
|
68
|
-
} : {
|
|
69
|
-
minWidth: i.minWidth,
|
|
70
|
-
maxWidth: i.maxWidth ?? lt
|
|
71
|
-
};
|
|
72
|
-
}, Kn = Fr(
|
|
57
|
+
const be = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), Rt = (s) => s.width ?? (s.maxWidth && s.sticky === "right" ? s.maxWidth : void 0), Qn = (s) => ({
|
|
58
|
+
width: s.width,
|
|
59
|
+
maxWidth: s.maxWidth ?? lr,
|
|
60
|
+
minWidth: s.minWidth ?? s.width
|
|
61
|
+
}), ki = Vr(
|
|
73
62
|
function({
|
|
74
|
-
data:
|
|
75
|
-
columns:
|
|
76
|
-
renderRowCell:
|
|
77
|
-
onRowClick:
|
|
78
|
-
onRowHover:
|
|
79
|
-
arialabel:
|
|
80
|
-
size:
|
|
81
|
-
allowDefaultRowClass:
|
|
82
|
-
centeredHeaders:
|
|
83
|
-
rootClassName:
|
|
84
|
-
removeBorders:
|
|
85
|
-
headerClassName:
|
|
86
|
-
isRowExpandable:
|
|
87
|
-
renderExpandedContent:
|
|
88
|
-
loading:
|
|
89
|
-
loadingRowCount:
|
|
90
|
-
renderHeaderCell:
|
|
91
|
-
tableClassName:
|
|
92
|
-
getRowClassName:
|
|
93
|
-
selectionMode:
|
|
94
|
-
selectedKeys:
|
|
95
|
-
onSelectionChange:
|
|
96
|
-
inlineSelection:
|
|
97
|
-
toolbar:
|
|
98
|
-
showToolbar:
|
|
99
|
-
toolbarTitle:
|
|
100
|
-
toolbarTrailing:
|
|
101
|
-
disableExtendedTools:
|
|
102
|
-
pagination:
|
|
103
|
-
showBorders:
|
|
104
|
-
emptyState:
|
|
105
|
-
editChrome:
|
|
106
|
-
showEditActions:
|
|
107
|
-
searchCollapsible:
|
|
108
|
-
isEditable:
|
|
109
|
-
toolbarSlot:
|
|
110
|
-
rowHeightClass:
|
|
111
|
-
groupedData:
|
|
112
|
-
showSummaryFooter:
|
|
113
|
-
summaryFooterProps:
|
|
114
|
-
bulkActionBar:
|
|
115
|
-
renderBulkActionBar:
|
|
116
|
-
onBulkDuplicate:
|
|
117
|
-
onBulkDelete:
|
|
118
|
-
bulkActionBusy:
|
|
119
|
-
columnAlignments:
|
|
120
|
-
onColumnHeaderAction:
|
|
121
|
-
showColumnHeaderMenu:
|
|
122
|
-
columnMenuCapabilities:
|
|
123
|
-
renderGroupHeader:
|
|
124
|
-
columnMenuSchema:
|
|
125
|
-
columnSchema:
|
|
126
|
-
labelMeta:
|
|
127
|
-
renderColumnHeaderMenuExtraItems:
|
|
128
|
-
fillWidth:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
63
|
+
data: u,
|
|
64
|
+
columns: f,
|
|
65
|
+
renderRowCell: vt,
|
|
66
|
+
onRowClick: ke,
|
|
67
|
+
onRowHover: V,
|
|
68
|
+
arialabel: ur,
|
|
69
|
+
size: bt = "sm",
|
|
70
|
+
allowDefaultRowClass: fr = !1,
|
|
71
|
+
centeredHeaders: pr = [],
|
|
72
|
+
rootClassName: hr,
|
|
73
|
+
removeBorders: kt,
|
|
74
|
+
headerClassName: yr,
|
|
75
|
+
isRowExpandable: Et,
|
|
76
|
+
renderExpandedContent: wr,
|
|
77
|
+
loading: j = !1,
|
|
78
|
+
loadingRowCount: It = Xn,
|
|
79
|
+
renderHeaderCell: Xe,
|
|
80
|
+
tableClassName: mr,
|
|
81
|
+
getRowClassName: je,
|
|
82
|
+
selectionMode: ae = "none",
|
|
83
|
+
selectedKeys: F,
|
|
84
|
+
onSelectionChange: S,
|
|
85
|
+
inlineSelection: Ee = !1,
|
|
86
|
+
toolbar: d,
|
|
87
|
+
showToolbar: gr,
|
|
88
|
+
toolbarTitle: Nt,
|
|
89
|
+
toolbarTrailing: Lt,
|
|
90
|
+
disableExtendedTools: ce,
|
|
91
|
+
pagination: T,
|
|
92
|
+
showBorders: Ie,
|
|
93
|
+
emptyState: Wt,
|
|
94
|
+
editChrome: G,
|
|
95
|
+
showEditActions: xr = !1,
|
|
96
|
+
searchCollapsible: Dt,
|
|
97
|
+
isEditable: Rr,
|
|
98
|
+
toolbarSlot: qe,
|
|
99
|
+
rowHeightClass: _t,
|
|
100
|
+
groupedData: J,
|
|
101
|
+
showSummaryFooter: vr,
|
|
102
|
+
summaryFooterProps: Ke,
|
|
103
|
+
bulkActionBar: Ne,
|
|
104
|
+
renderBulkActionBar: Le,
|
|
105
|
+
onBulkDuplicate: We,
|
|
106
|
+
onBulkDelete: De,
|
|
107
|
+
bulkActionBusy: _e,
|
|
108
|
+
columnAlignments: Q,
|
|
109
|
+
onColumnHeaderAction: Pe,
|
|
110
|
+
showColumnHeaderMenu: br,
|
|
111
|
+
columnMenuCapabilities: kr,
|
|
112
|
+
renderGroupHeader: Pt,
|
|
113
|
+
columnMenuSchema: de,
|
|
114
|
+
columnSchema: le,
|
|
115
|
+
labelMeta: Er,
|
|
116
|
+
renderColumnHeaderMenuExtraItems: Ir,
|
|
117
|
+
fillWidth: Nr = !1,
|
|
118
|
+
zoom: N,
|
|
119
|
+
rowActions: L,
|
|
120
|
+
onCellActivate: ee,
|
|
121
|
+
cellSelection: w = null,
|
|
122
|
+
onCellSelectionChange: _,
|
|
123
|
+
onCopyCells: He,
|
|
124
|
+
onPasteCells: ze,
|
|
125
|
+
onClearCells: Ve
|
|
126
|
+
}, ue) {
|
|
127
|
+
const R = b(
|
|
128
|
+
() => N ? an(N) : null,
|
|
129
|
+
[N == null ? void 0 : N.defaultZoom, N == null ? void 0 : N.minZoom, N == null ? void 0 : N.maxZoom, N == null ? void 0 : N.step]
|
|
130
|
+
), [fe, Je] = H(
|
|
131
|
+
() => (R == null ? void 0 : R.defaultZoom) ?? cn
|
|
132
|
+
), M = R !== null && $n, pe = fe / 100, P = Nr || M, g = oe(null), [he, St] = H(null), te = b(() => {
|
|
133
|
+
if (!P) return null;
|
|
134
|
+
const e = f.reduce(
|
|
135
|
+
(i, n) => be(n) ? i + mt(Rt(n)) : i,
|
|
136
|
+
0
|
|
137
|
+
);
|
|
138
|
+
return { minTableWidth: f.filter(
|
|
139
|
+
(i) => !be(i)
|
|
140
|
+
).reduce(
|
|
141
|
+
(i, n) => i + mt(
|
|
142
|
+
n.minWidth ?? (M ? Qt : void 0)
|
|
143
|
+
),
|
|
144
|
+
0
|
|
145
|
+
) + e };
|
|
146
|
+
}, [f, P, M]), Se = (R == null ? void 0 : R.minZoom) ?? ln;
|
|
147
|
+
X(() => {
|
|
148
|
+
R && Je(
|
|
149
|
+
(e) => er(e, R.minZoom, R.maxZoom)
|
|
150
|
+
);
|
|
151
|
+
}, [R]);
|
|
152
|
+
const [Te, Lr] = H(
|
|
138
153
|
() => /* @__PURE__ */ new Set()
|
|
139
|
-
), [
|
|
154
|
+
), [Wr, Tt] = H(
|
|
140
155
|
null
|
|
141
|
-
), [
|
|
142
|
-
|
|
143
|
-
}, []), [
|
|
144
|
-
() =>
|
|
145
|
-
[
|
|
146
|
-
),
|
|
147
|
-
|
|
156
|
+
), [p, Dr] = H(null), A = oe(null), Qe = oe({ x: 0, y: 0 }), re = I((e) => {
|
|
157
|
+
A.current = e, Dr(e);
|
|
158
|
+
}, []), [z, Ct] = H(null), [ne, _r] = H(null), y = typeof _ == "function", q = oe(null), et = oe({ x: 0, y: 0 }), [ie, Ot] = H(!1), tt = oe(null), Ce = ae === "single" || ae === "multiple", rt = !!L, U = Ce && !Ee, Oe = Jn(J), nt = !!(L != null && L.onReorderRows) && (L == null ? void 0 : L.enableRowReorder) !== !1 && !Oe && !j, Pr = b(() => de != null && de.length ? new Map(de.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [de]), Ft = b(() => le != null && le.length ? new Map(le.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [le]), Y = b(
|
|
159
|
+
() => f.map((e) => e.key),
|
|
160
|
+
[f]
|
|
161
|
+
), Sr = I((e) => {
|
|
162
|
+
Lr((r) => {
|
|
148
163
|
const t = new Set(r);
|
|
149
164
|
return t.has(e) ? t.delete(e) : t.add(e), t;
|
|
150
165
|
});
|
|
151
|
-
}, []),
|
|
166
|
+
}, []), Fe = b(() => j ? Array.from({ length: It }, (e, r) => ({
|
|
152
167
|
id: `loading-${r}`
|
|
153
|
-
})) :
|
|
168
|
+
})) : u.map((e) => {
|
|
154
169
|
const r = e;
|
|
155
170
|
if (r.__rowId != null)
|
|
156
171
|
return r;
|
|
157
|
-
const t =
|
|
172
|
+
const t = ve(r);
|
|
158
173
|
return r.id != null && String(r.id) === t ? r : { ...r, id: t };
|
|
159
|
-
}), [
|
|
160
|
-
(e) =>
|
|
161
|
-
) :
|
|
162
|
-
() =>
|
|
163
|
-
[
|
|
164
|
-
),
|
|
165
|
-
if (!
|
|
166
|
-
const e =
|
|
167
|
-
(r) =>
|
|
174
|
+
}), [j, u, It]), v = b(() => j ? [] : Oe && J ? J.flatMap(
|
|
175
|
+
(e) => Te.has(e.key) ? [] : e.rows.map((r) => ve(r))
|
|
176
|
+
) : Fe.map((e) => ve(e)), [j, Oe, J, Te, Fe]), ye = b(
|
|
177
|
+
() => ar(F, v),
|
|
178
|
+
[F, v]
|
|
179
|
+
), it = Kn(F, v), st = it > 0, Zt = st && !!(Ne ?? Le ?? We ?? De), we = b(() => {
|
|
180
|
+
if (!st) return;
|
|
181
|
+
const e = u.filter(
|
|
182
|
+
(r) => ye.has(ve(r))
|
|
168
183
|
);
|
|
169
184
|
return {
|
|
170
|
-
selectedKeys:
|
|
185
|
+
selectedKeys: ye,
|
|
171
186
|
selectedRows: e,
|
|
172
|
-
clearSelection: () =>
|
|
173
|
-
busy:
|
|
187
|
+
clearSelection: () => S == null ? void 0 : S(/* @__PURE__ */ new Set()),
|
|
188
|
+
busy: _e
|
|
174
189
|
};
|
|
175
190
|
}, [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
]),
|
|
182
|
-
if (
|
|
183
|
-
if (
|
|
184
|
-
if (
|
|
185
|
-
if (
|
|
186
|
-
return
|
|
187
|
-
if (
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
|
|
191
|
+
st,
|
|
192
|
+
ye,
|
|
193
|
+
u,
|
|
194
|
+
S,
|
|
195
|
+
_e
|
|
196
|
+
]), Gt = b(() => {
|
|
197
|
+
if (qe != null) return qe;
|
|
198
|
+
if (Zt) {
|
|
199
|
+
if (Ne != null) return Ne;
|
|
200
|
+
if (Le && we)
|
|
201
|
+
return Le(we);
|
|
202
|
+
if (we && (We || De))
|
|
203
|
+
return /* @__PURE__ */ a(
|
|
204
|
+
Fn,
|
|
190
205
|
{
|
|
191
|
-
count:
|
|
192
|
-
onDuplicate:
|
|
193
|
-
onDelete:
|
|
194
|
-
onClearSelection:
|
|
195
|
-
busy:
|
|
206
|
+
count: it,
|
|
207
|
+
onDuplicate: We,
|
|
208
|
+
onDelete: De,
|
|
209
|
+
onClearSelection: we.clearSelection,
|
|
210
|
+
busy: _e
|
|
196
211
|
}
|
|
197
212
|
);
|
|
198
213
|
}
|
|
199
|
-
|
|
200
|
-
|
|
214
|
+
const e = M && R ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
215
|
+
/* @__PURE__ */ a(
|
|
216
|
+
Jr,
|
|
217
|
+
{
|
|
218
|
+
"aria-label": "Table zoom",
|
|
219
|
+
className: "w-24 shrink-0",
|
|
220
|
+
minValue: Se,
|
|
221
|
+
maxValue: R.maxZoom,
|
|
222
|
+
step: R.step,
|
|
223
|
+
value: er(fe, Se, R.maxZoom),
|
|
224
|
+
onChange: (t) => Je(Array.isArray(t) ? t[0] : t),
|
|
225
|
+
isDisabled: ce || Se >= R.maxZoom,
|
|
226
|
+
children: /* @__PURE__ */ a(Qr, { className: "relative flex h-4 w-full items-center data-[disabled]:opacity-50", children: ({ state: t }) => /* @__PURE__ */ E(wt, { children: [
|
|
227
|
+
/* @__PURE__ */ a("div", { className: "absolute h-1 w-full rounded-full bg-tertiary" }),
|
|
228
|
+
/* @__PURE__ */ a(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
className: "absolute h-1 rounded-full bg-brand-solid",
|
|
232
|
+
style: {
|
|
233
|
+
width: `${t.getThumbPercent(0) * 100}%`
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ a(en, { className: "top-1/2 size-3 rounded-full border-2 border-slider-handle-border bg-slider-handle-bg shadow-sm outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-focus-ring" })
|
|
238
|
+
] }) })
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ E(
|
|
242
|
+
"button",
|
|
243
|
+
{
|
|
244
|
+
type: "button",
|
|
245
|
+
"aria-label": `Reset table zoom to ${R.defaultZoom}%`,
|
|
246
|
+
title: "Reset zoom",
|
|
247
|
+
className: "w-9 shrink-0 text-right text-xs tabular-nums text-secondary enabled:hover:text-primary disabled:opacity-50",
|
|
248
|
+
disabled: fe === R.defaultZoom || ce,
|
|
249
|
+
onClick: () => Je(R.defaultZoom),
|
|
250
|
+
children: [
|
|
251
|
+
fe,
|
|
252
|
+
"%"
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
] }) : null, r = Lt;
|
|
257
|
+
return !d && !r && !e ? null : /* @__PURE__ */ a(
|
|
258
|
+
Zn,
|
|
201
259
|
{
|
|
202
|
-
sort:
|
|
203
|
-
filter:
|
|
204
|
-
search:
|
|
205
|
-
rowHeight:
|
|
206
|
-
hideFields:
|
|
207
|
-
align:
|
|
208
|
-
groupBy:
|
|
209
|
-
summary:
|
|
210
|
-
sortContent:
|
|
211
|
-
filterContent:
|
|
212
|
-
fallbackTitle:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
260
|
+
sort: d == null ? void 0 : d.sort,
|
|
261
|
+
filter: d == null ? void 0 : d.filter,
|
|
262
|
+
search: d == null ? void 0 : d.search,
|
|
263
|
+
rowHeight: d == null ? void 0 : d.rowHeight,
|
|
264
|
+
hideFields: d == null ? void 0 : d.hideFields,
|
|
265
|
+
align: d == null ? void 0 : d.align,
|
|
266
|
+
groupBy: d == null ? void 0 : d.groupBy,
|
|
267
|
+
summary: d == null ? void 0 : d.summary,
|
|
268
|
+
sortContent: d == null ? void 0 : d.sortContent,
|
|
269
|
+
filterContent: d == null ? void 0 : d.filterContent,
|
|
270
|
+
fallbackTitle: Nt,
|
|
271
|
+
beforeSearch: e,
|
|
272
|
+
trailing: r,
|
|
273
|
+
searchCollapsible: Dt,
|
|
274
|
+
disableExtendedTools: ce,
|
|
275
|
+
undoRedo: d != null && d.undoRedo ? {
|
|
276
|
+
...d.undoRedo,
|
|
277
|
+
isDisabled: d.undoRedo.isDisabled ?? ce
|
|
219
278
|
} : void 0
|
|
220
279
|
}
|
|
221
|
-
)
|
|
280
|
+
);
|
|
222
281
|
}, [
|
|
223
|
-
|
|
224
|
-
|
|
282
|
+
qe,
|
|
283
|
+
Zt,
|
|
284
|
+
Ne,
|
|
285
|
+
Le,
|
|
225
286
|
we,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
287
|
+
We,
|
|
288
|
+
De,
|
|
289
|
+
_e,
|
|
290
|
+
it,
|
|
291
|
+
d,
|
|
292
|
+
Nt,
|
|
293
|
+
Lt,
|
|
294
|
+
Dt,
|
|
295
|
+
ce,
|
|
232
296
|
R,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
]), Dt = Nt != null && nr !== !1, Pt = !!P && (P == null ? void 0 : P.showPagination) !== !1, gr = Dt || Pt, Wt = !X && d.length === 0 && mt != null, S = !!(or && F), Je = !!(F != null && F.showFooterRow), W = ir ?? (S || Je || qe), mr = Wt && !(Je && F), ae = u.length + (z ? 1 : 0) + (S ? 1 : 0), xr = !!(sr && Me), I = ye ? "border-r border-secondary last:border-r-0" : void 0, j = k(() => {
|
|
238
|
-
if (!L) return null;
|
|
239
|
-
const e = u.reduce(
|
|
240
|
-
(o, n) => fe(n) ? o + ct(dt(n)) : o,
|
|
241
|
-
0
|
|
242
|
-
);
|
|
243
|
-
return { minTableWidth: u.filter(
|
|
244
|
-
(o) => !fe(o)
|
|
245
|
-
).reduce(
|
|
246
|
-
(o, n) => o + ct(n.minWidth),
|
|
247
|
-
0
|
|
248
|
-
) + e };
|
|
249
|
-
}, [u, L]), br = k(() => {
|
|
297
|
+
M,
|
|
298
|
+
fe,
|
|
299
|
+
Se
|
|
300
|
+
]), Mt = Gt != null && gr !== !1, At = !!T && (T == null ? void 0 : T.showPagination) !== !1, Tr = Mt || At, Ut = !j && u.length === 0 && Wt != null, O = !!(xr && G), ot = !!(G != null && G.showFooterRow), W = Rr ?? (O || ot || rt), Cr = Ut && !(ot && G), me = f.length + (U ? 1 : 0) + (O ? 1 : 0), Or = !!(vr && Ke), D = Ie ? "border-r border-secondary last:border-r-0" : void 0, Fr = b(() => {
|
|
250
301
|
const e = /* @__PURE__ */ new Map();
|
|
251
|
-
return
|
|
302
|
+
return Pe && f.forEach((r) => {
|
|
252
303
|
e.set(
|
|
253
304
|
r.key,
|
|
254
|
-
(t) =>
|
|
305
|
+
(t) => Pe(r.key, t)
|
|
255
306
|
);
|
|
256
307
|
}), e;
|
|
257
|
-
}, [
|
|
308
|
+
}, [f, Pe]), at = I(
|
|
258
309
|
(e, r, t) => {
|
|
259
|
-
var
|
|
260
|
-
let
|
|
261
|
-
if (
|
|
262
|
-
const l = (
|
|
263
|
-
|
|
310
|
+
var c;
|
|
311
|
+
let i = t ?? null;
|
|
312
|
+
if (i == null) {
|
|
313
|
+
const l = (c = tr(
|
|
314
|
+
g.current,
|
|
264
315
|
e,
|
|
265
316
|
r
|
|
266
|
-
)) == null ? void 0 :
|
|
267
|
-
|
|
317
|
+
)) == null ? void 0 : c.getAttribute("data-grid-source-index"), h = l != null && l !== "" ? Number(l) : NaN;
|
|
318
|
+
i = Number.isNaN(h) ? null : h;
|
|
268
319
|
}
|
|
269
320
|
const n = {
|
|
270
321
|
rowId: e,
|
|
271
322
|
columnKey: r,
|
|
272
|
-
sourceIndex:
|
|
323
|
+
sourceIndex: i
|
|
273
324
|
};
|
|
274
|
-
if (
|
|
275
|
-
|
|
325
|
+
if (y) {
|
|
326
|
+
_ == null || _(gt(n));
|
|
276
327
|
return;
|
|
277
328
|
}
|
|
278
|
-
|
|
329
|
+
Ct(n);
|
|
279
330
|
},
|
|
280
|
-
[
|
|
281
|
-
),
|
|
282
|
-
if (
|
|
283
|
-
|
|
331
|
+
[y, _]
|
|
332
|
+
), Ze = I(() => {
|
|
333
|
+
if (y) {
|
|
334
|
+
_ == null || _(null);
|
|
284
335
|
return;
|
|
285
336
|
}
|
|
286
|
-
|
|
287
|
-
}, [
|
|
337
|
+
Ct(null);
|
|
338
|
+
}, [y, _]), C = y ? (w == null ? void 0 : w.focus) ?? null : z, B = I(
|
|
288
339
|
(e) => {
|
|
289
|
-
|
|
340
|
+
y && (_ == null || _(e));
|
|
290
341
|
},
|
|
291
|
-
[
|
|
292
|
-
),
|
|
342
|
+
[y, _]
|
|
343
|
+
), Zr = I(
|
|
293
344
|
(e) => {
|
|
294
|
-
var
|
|
295
|
-
const r = e.key in
|
|
296
|
-
if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !r ||
|
|
345
|
+
var Ye, se, Re;
|
|
346
|
+
const r = e.key in or;
|
|
347
|
+
if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !r || Be(e.target)) return;
|
|
297
348
|
if (e.key === "Escape") {
|
|
298
|
-
if (!
|
|
299
|
-
e.preventDefault(), e.stopPropagation(),
|
|
349
|
+
if (!C && !w) return;
|
|
350
|
+
e.preventDefault(), e.stopPropagation(), Ze(), (Ye = g.current) != null && Ye.contains(document.activeElement) && document.activeElement.blur();
|
|
300
351
|
return;
|
|
301
352
|
}
|
|
302
|
-
const t = (
|
|
303
|
-
|
|
353
|
+
const t = (Re = (se = e.target).closest) == null ? void 0 : Re.call(
|
|
354
|
+
se,
|
|
304
355
|
"[data-grid-cell]"
|
|
305
|
-
),
|
|
356
|
+
), i = t ? $e(t) : null, n = y && r && e.shiftKey && !C && !i ? Dn(e.target, g.current) : null, c = n != null && ye.has(n.rowId), l = C ?? i ?? (c ? n : null);
|
|
306
357
|
if (!l) return;
|
|
307
358
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
308
|
-
if (!
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
359
|
+
if (!y || !w || !Ve) return;
|
|
360
|
+
const K = xt(
|
|
361
|
+
w,
|
|
362
|
+
v,
|
|
312
363
|
Y
|
|
313
364
|
);
|
|
314
|
-
if (!
|
|
315
|
-
e.preventDefault(), e.stopPropagation(),
|
|
365
|
+
if (!K) return;
|
|
366
|
+
e.preventDefault(), e.stopPropagation(), Ve({
|
|
367
|
+
selection: w,
|
|
368
|
+
rect: K,
|
|
369
|
+
event: e.nativeEvent
|
|
370
|
+
});
|
|
316
371
|
return;
|
|
317
372
|
}
|
|
318
373
|
if (e.key === "Enter") {
|
|
319
|
-
if (!
|
|
320
|
-
e.preventDefault(), e.stopPropagation(),
|
|
374
|
+
if (!ee) return;
|
|
375
|
+
e.preventDefault(), e.stopPropagation(), ee({
|
|
321
376
|
rowId: l.rowId,
|
|
322
377
|
columnKey: l.columnKey,
|
|
323
378
|
sourceIndex: l.sourceIndex
|
|
324
379
|
});
|
|
325
380
|
return;
|
|
326
381
|
}
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
382
|
+
const h = y && e.shiftKey && r, k = r ? or[e.key] : e.shiftKey ? "left" : "right", o = r ? yn(
|
|
383
|
+
g.current,
|
|
384
|
+
v,
|
|
330
385
|
Y,
|
|
331
386
|
l.rowId,
|
|
332
387
|
l.columnKey,
|
|
333
|
-
|
|
334
|
-
) :
|
|
335
|
-
|
|
336
|
-
|
|
388
|
+
k
|
|
389
|
+
) : wn(
|
|
390
|
+
g.current,
|
|
391
|
+
v,
|
|
337
392
|
Y,
|
|
338
393
|
l.rowId,
|
|
339
394
|
l.columnKey,
|
|
340
395
|
!e.shiftKey
|
|
341
396
|
);
|
|
342
|
-
if (!
|
|
397
|
+
if (!o && !(h && !w)) {
|
|
343
398
|
r && (e.preventDefault(), e.stopPropagation());
|
|
344
399
|
return;
|
|
345
400
|
}
|
|
346
401
|
e.preventDefault(), e.stopPropagation();
|
|
347
|
-
const
|
|
348
|
-
rowId:
|
|
349
|
-
columnKey:
|
|
350
|
-
sourceIndex:
|
|
351
|
-
} : null,
|
|
352
|
-
if (
|
|
353
|
-
const
|
|
402
|
+
const yt = o ? {
|
|
403
|
+
rowId: o.rowId,
|
|
404
|
+
columnKey: o.columnKey,
|
|
405
|
+
sourceIndex: o.sourceIndex
|
|
406
|
+
} : null, ge = c ? null : yt, xe = ge ? k : null;
|
|
407
|
+
if (tt.current = xe, y) {
|
|
408
|
+
const K = _n(
|
|
354
409
|
l,
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
410
|
+
ge,
|
|
411
|
+
w,
|
|
412
|
+
h
|
|
358
413
|
);
|
|
359
|
-
|
|
360
|
-
} else
|
|
361
|
-
const
|
|
414
|
+
K && K !== w && B(K);
|
|
415
|
+
} else o && at(o.rowId, o.columnKey, o.sourceIndex);
|
|
416
|
+
const Z = ge ?? l;
|
|
362
417
|
requestAnimationFrame(
|
|
363
|
-
() =>
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
418
|
+
() => rr(
|
|
419
|
+
g.current,
|
|
420
|
+
Z.rowId,
|
|
421
|
+
Z.columnKey,
|
|
422
|
+
{ dir: xe }
|
|
367
423
|
)
|
|
368
424
|
);
|
|
369
425
|
},
|
|
370
426
|
[
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
h,
|
|
427
|
+
C,
|
|
428
|
+
v,
|
|
374
429
|
y,
|
|
375
|
-
|
|
430
|
+
w,
|
|
431
|
+
Ze,
|
|
376
432
|
Y,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
433
|
+
B,
|
|
434
|
+
ye,
|
|
435
|
+
ee,
|
|
436
|
+
Ve,
|
|
437
|
+
at
|
|
382
438
|
]
|
|
383
439
|
);
|
|
384
|
-
|
|
385
|
-
if (!W || !
|
|
440
|
+
X(() => {
|
|
441
|
+
if (!W || !C && !w) return;
|
|
386
442
|
const e = (r) => {
|
|
387
|
-
const t =
|
|
388
|
-
t && !t.contains(r.target) &&
|
|
443
|
+
const t = g.current;
|
|
444
|
+
t && !t.contains(r.target) && Ze();
|
|
389
445
|
};
|
|
390
446
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
391
|
-
}, [W,
|
|
392
|
-
const
|
|
447
|
+
}, [W, C, w, Ze]);
|
|
448
|
+
const ct = (C == null ? void 0 : C.rowId) ?? null, dt = (C == null ? void 0 : C.columnKey) ?? null;
|
|
449
|
+
Jt(() => {
|
|
450
|
+
if (!W || ie || !ct || !dt) return;
|
|
451
|
+
const e = tr(
|
|
452
|
+
g.current,
|
|
453
|
+
ct,
|
|
454
|
+
dt
|
|
455
|
+
);
|
|
456
|
+
e && gn(e, { dir: tt.current });
|
|
457
|
+
}, [W, ie, ct, dt]);
|
|
458
|
+
const Yt = b(() => {
|
|
393
459
|
let e = 0;
|
|
394
|
-
return
|
|
395
|
-
|
|
460
|
+
return U && (e += 40), O && (e += 56), f.forEach((r) => {
|
|
461
|
+
be(r) && (e += mt(Rt(r)));
|
|
396
462
|
}), e;
|
|
397
|
-
}, [
|
|
398
|
-
() =>
|
|
399
|
-
[
|
|
400
|
-
),
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
463
|
+
}, [f, O, U]), Bt = b(
|
|
464
|
+
() => f.filter((e) => !be(e)).length,
|
|
465
|
+
[f]
|
|
466
|
+
), lt = b(
|
|
467
|
+
() => P && te ? un(he, te.minTableWidth) : null,
|
|
468
|
+
[he, P, te]
|
|
469
|
+
), $t = P && hn(lt, he, pe), Ge = b(
|
|
470
|
+
() => fn(lt, he, pe),
|
|
471
|
+
[lt, he, pe]
|
|
472
|
+
), ut = b(
|
|
473
|
+
() => pn(
|
|
474
|
+
Ge,
|
|
475
|
+
Yt,
|
|
476
|
+
Bt
|
|
477
|
+
),
|
|
478
|
+
[Ge, Yt, Bt]
|
|
479
|
+
);
|
|
480
|
+
Jt(() => {
|
|
481
|
+
if (!P) {
|
|
482
|
+
St(null);
|
|
411
483
|
return;
|
|
412
484
|
}
|
|
413
|
-
const e =
|
|
485
|
+
const e = g.current;
|
|
414
486
|
if (!e) return;
|
|
415
487
|
const r = () => {
|
|
416
|
-
const
|
|
417
|
-
|
|
488
|
+
const i = e.clientWidth;
|
|
489
|
+
i > 0 && St((n) => n === i ? n : i);
|
|
418
490
|
};
|
|
419
491
|
r();
|
|
420
492
|
const t = new ResizeObserver(r);
|
|
@@ -422,93 +494,105 @@ const lt = "300px", ct = (i) => {
|
|
|
422
494
|
t.disconnect();
|
|
423
495
|
};
|
|
424
496
|
}, [
|
|
497
|
+
f.length,
|
|
425
498
|
u.length,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
z
|
|
499
|
+
P,
|
|
500
|
+
j,
|
|
501
|
+
O,
|
|
502
|
+
U
|
|
431
503
|
]);
|
|
432
|
-
const
|
|
433
|
-
(e) => L ? fe(e) ? Kt(e) : tt != null ? {
|
|
434
|
-
width: `${tt}px`,
|
|
435
|
-
minWidth: e.minWidth,
|
|
436
|
-
maxWidth: e.maxWidth ?? lt
|
|
437
|
-
} : Kt(e) : Nn(e),
|
|
438
|
-
[L, tt]
|
|
439
|
-
), vr = k(() => {
|
|
440
|
-
if (!(!L || !j))
|
|
441
|
-
return et ? {
|
|
442
|
-
width: `${j.minTableWidth}px`,
|
|
443
|
-
tableLayout: "fixed"
|
|
444
|
-
} : {
|
|
445
|
-
width: "100%",
|
|
446
|
-
tableLayout: "fixed"
|
|
447
|
-
};
|
|
448
|
-
}, [L, j, et]), kr = v(
|
|
504
|
+
const ft = I(
|
|
449
505
|
(e) => {
|
|
450
|
-
|
|
506
|
+
if (!P)
|
|
507
|
+
return Qn(e);
|
|
508
|
+
const r = e.minWidth ?? (M ? Qt : void 0), t = Rt(e), i = t, n = e.maxWidth ?? t ?? lr;
|
|
509
|
+
return be(e) && i ? {
|
|
510
|
+
minWidth: i,
|
|
511
|
+
width: i,
|
|
512
|
+
maxWidth: n ?? i
|
|
513
|
+
} : ut != null ? {
|
|
514
|
+
width: `${ut}px`,
|
|
515
|
+
minWidth: r
|
|
516
|
+
} : { minWidth: r, maxWidth: n };
|
|
451
517
|
},
|
|
452
|
-
[
|
|
453
|
-
),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
518
|
+
[P, ut, M]
|
|
519
|
+
), Gr = b(() => !P || !te ? void 0 : {
|
|
520
|
+
...M ? { zoom: pe } : void 0,
|
|
521
|
+
// The zoom-independent base, so the painted width tracks the zoom and overflows by
|
|
522
|
+
// more as you zoom in — matching the widths `getColumnStyle` hands the columns.
|
|
523
|
+
width: `${Ge ?? te.minTableWidth}px`,
|
|
524
|
+
tableLayout: "fixed"
|
|
525
|
+
}, [
|
|
526
|
+
P,
|
|
527
|
+
te,
|
|
528
|
+
$t,
|
|
529
|
+
Ge,
|
|
530
|
+
M,
|
|
531
|
+
pe
|
|
532
|
+
]), Mr = I(
|
|
533
|
+
(e) => {
|
|
534
|
+
g.current = e, typeof ue == "function" ? ue(e) : ue && (ue.current = e);
|
|
535
|
+
},
|
|
536
|
+
[ue]
|
|
537
|
+
), Ar = Ce && Ee ? {
|
|
538
|
+
selectionMode: ae,
|
|
539
|
+
selectedKeys: F === "all" ? "all" : F,
|
|
540
|
+
onSelectionChange: Vn(S)
|
|
541
|
+
} : {}, Ur = (e, r = 0) => {
|
|
458
542
|
const t = e.__sourceIndex;
|
|
459
543
|
return typeof t == "number" ? t : r;
|
|
460
|
-
},
|
|
544
|
+
}, Me = I(
|
|
461
545
|
(e) => {
|
|
462
|
-
const r =
|
|
546
|
+
const r = A.current;
|
|
463
547
|
if (!r) return;
|
|
464
|
-
const { fromSourceIndex: t, toSourceIndex:
|
|
465
|
-
|
|
548
|
+
const { fromSourceIndex: t, toSourceIndex: i, item: n, active: c } = r;
|
|
549
|
+
re(null), e && c && t !== i && (L != null && L.onReorderRows) && L.onReorderRows(t, i, n);
|
|
466
550
|
},
|
|
467
|
-
[
|
|
468
|
-
),
|
|
551
|
+
[L, re]
|
|
552
|
+
), Ae = I(
|
|
469
553
|
(e, r) => {
|
|
470
|
-
const t =
|
|
554
|
+
const t = A.current;
|
|
471
555
|
if (!t) return;
|
|
472
|
-
|
|
473
|
-
const
|
|
474
|
-
let
|
|
556
|
+
Qe.current = { x: e, y: r };
|
|
557
|
+
const i = e - t.startX, n = r - t.startY, c = Math.hypot(i, n), l = t.active || c >= xn;
|
|
558
|
+
let h = {
|
|
475
559
|
...t,
|
|
476
560
|
currentX: e,
|
|
477
561
|
currentY: r,
|
|
478
562
|
active: l
|
|
479
563
|
};
|
|
480
564
|
if (l) {
|
|
481
|
-
t.active ||
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
484
|
-
const
|
|
485
|
-
|
|
565
|
+
t.active || Tt(null);
|
|
566
|
+
const k = g.current;
|
|
567
|
+
if (k) {
|
|
568
|
+
const o = Rn(
|
|
569
|
+
k,
|
|
486
570
|
r,
|
|
487
571
|
t.fromSourceIndex,
|
|
488
572
|
t.rowId
|
|
489
573
|
);
|
|
490
|
-
|
|
491
|
-
...
|
|
492
|
-
toSourceIndex:
|
|
574
|
+
o && (h = {
|
|
575
|
+
...h,
|
|
576
|
+
toSourceIndex: o.toSourceIndex,
|
|
493
577
|
// Clip to scrollport so the line never draws over the header / outside the card.
|
|
494
|
-
dropLineY:
|
|
495
|
-
|
|
496
|
-
|
|
578
|
+
dropLineY: vn(
|
|
579
|
+
o.dropLineY,
|
|
580
|
+
k
|
|
497
581
|
),
|
|
498
|
-
dropLineLeft:
|
|
499
|
-
dropLineWidth:
|
|
582
|
+
dropLineLeft: o.dropLineLeft,
|
|
583
|
+
dropLineWidth: o.dropLineWidth
|
|
500
584
|
});
|
|
501
585
|
}
|
|
502
586
|
}
|
|
503
|
-
|
|
587
|
+
re(h);
|
|
504
588
|
},
|
|
505
|
-
[
|
|
506
|
-
),
|
|
507
|
-
(e, r, t,
|
|
508
|
-
var
|
|
509
|
-
if (!
|
|
510
|
-
const n = (
|
|
511
|
-
`tr[${
|
|
589
|
+
[re]
|
|
590
|
+
), Yr = I(
|
|
591
|
+
(e, r, t, i) => {
|
|
592
|
+
var k, o;
|
|
593
|
+
if (!nt || e.button !== 0) return;
|
|
594
|
+
const n = (k = g.current) == null ? void 0 : k.querySelector(
|
|
595
|
+
`tr[${nr}="${CSS.escape(r)}"]`
|
|
512
596
|
);
|
|
513
597
|
if (!n) return;
|
|
514
598
|
e.preventDefault();
|
|
@@ -516,112 +600,112 @@ const lt = "300px", ct = (i) => {
|
|
|
516
600
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
517
601
|
} catch {
|
|
518
602
|
}
|
|
519
|
-
const
|
|
520
|
-
|
|
603
|
+
const c = bn(n), l = kn(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
|
|
604
|
+
Qe.current = { x: e.clientX, y: e.clientY }, re({
|
|
521
605
|
rowId: r,
|
|
522
606
|
fromSourceIndex: t,
|
|
523
|
-
item:
|
|
607
|
+
item: i,
|
|
524
608
|
pointerId: e.pointerId,
|
|
525
609
|
startX: e.clientX,
|
|
526
610
|
startY: e.clientY,
|
|
527
611
|
currentX: e.clientX,
|
|
528
612
|
currentY: e.clientY,
|
|
529
613
|
active: !1,
|
|
530
|
-
preview:
|
|
614
|
+
preview: c,
|
|
531
615
|
toSourceIndex: t,
|
|
532
616
|
dropLineY: null,
|
|
533
|
-
dropLineLeft:
|
|
534
|
-
dropLineWidth:
|
|
617
|
+
dropLineLeft: h.left,
|
|
618
|
+
dropLineWidth: h.width,
|
|
535
619
|
rowClone: l
|
|
536
620
|
});
|
|
537
621
|
},
|
|
538
|
-
[
|
|
539
|
-
),
|
|
540
|
-
|
|
541
|
-
if (!
|
|
622
|
+
[nt, re]
|
|
623
|
+
), Xt = p != null;
|
|
624
|
+
X(() => {
|
|
625
|
+
if (!Xt) return;
|
|
542
626
|
const e = (n) => {
|
|
543
|
-
var
|
|
544
|
-
n.pointerId === ((
|
|
627
|
+
var c;
|
|
628
|
+
n.pointerId === ((c = A.current) == null ? void 0 : c.pointerId) && Ae(n.clientX, n.clientY);
|
|
545
629
|
}, r = (n) => {
|
|
546
|
-
var
|
|
547
|
-
n.pointerId === ((
|
|
630
|
+
var c;
|
|
631
|
+
n.pointerId === ((c = A.current) == null ? void 0 : c.pointerId) && Me(!0);
|
|
548
632
|
}, t = (n) => {
|
|
549
|
-
var
|
|
550
|
-
n.pointerId === ((
|
|
551
|
-
},
|
|
552
|
-
n.key === "Escape" && (n.preventDefault(),
|
|
633
|
+
var c;
|
|
634
|
+
n.pointerId === ((c = A.current) == null ? void 0 : c.pointerId) && Me(!1);
|
|
635
|
+
}, i = (n) => {
|
|
636
|
+
n.key === "Escape" && (n.preventDefault(), Me(!1));
|
|
553
637
|
};
|
|
554
|
-
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", t), window.addEventListener("keydown",
|
|
555
|
-
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", t), window.removeEventListener("keydown",
|
|
638
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", t), window.addEventListener("keydown", i), () => {
|
|
639
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", t), window.removeEventListener("keydown", i);
|
|
556
640
|
};
|
|
557
|
-
}, [
|
|
558
|
-
if (!(
|
|
641
|
+
}, [Xt, Me, Ae]), X(() => {
|
|
642
|
+
if (!(p != null && p.active)) return;
|
|
559
643
|
const e = document.body.style.userSelect, r = document.body.style.cursor;
|
|
560
644
|
return document.body.style.userSelect = "none", document.body.style.cursor = "grabbing", () => {
|
|
561
645
|
document.body.style.userSelect = e, document.body.style.cursor = r;
|
|
562
646
|
};
|
|
563
|
-
}, [
|
|
564
|
-
if (!(
|
|
647
|
+
}, [p == null ? void 0 : p.active]), X(() => {
|
|
648
|
+
if (!(p != null && p.active)) return;
|
|
565
649
|
let e = 0;
|
|
566
650
|
const r = () => {
|
|
567
|
-
const t =
|
|
568
|
-
if (!(t != null && t.active) || !
|
|
569
|
-
const { x: n, y:
|
|
570
|
-
l !== 0 && (
|
|
651
|
+
const t = A.current, i = g.current;
|
|
652
|
+
if (!(t != null && t.active) || !i) return;
|
|
653
|
+
const { x: n, y: c } = Qe.current, l = Nn(i, c);
|
|
654
|
+
l !== 0 && (i.scrollTop += l, Ae(n, c)), e = requestAnimationFrame(r);
|
|
571
655
|
};
|
|
572
656
|
return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
|
|
573
|
-
}, [
|
|
574
|
-
const
|
|
657
|
+
}, [p == null ? void 0 : p.active, Ae]);
|
|
658
|
+
const Ue = I(
|
|
575
659
|
(e, r) => {
|
|
576
|
-
const t =
|
|
577
|
-
if (!t || !
|
|
578
|
-
|
|
579
|
-
const n = e - t.startX,
|
|
580
|
-
if (
|
|
581
|
-
const
|
|
582
|
-
|
|
660
|
+
const t = q.current, i = g.current;
|
|
661
|
+
if (!t || !i) return;
|
|
662
|
+
et.current = { x: e, y: r };
|
|
663
|
+
const n = e - t.startX, c = r - t.startY, l = Math.hypot(n, c), h = t.active || l >= Pn;
|
|
664
|
+
if (h && !t.active && (t.active = !0, Ot(!0)), !h) return;
|
|
665
|
+
const k = Sn(i, e, r), o = k ? $e(k) : null;
|
|
666
|
+
o && (t.focus = o, B({
|
|
583
667
|
anchor: t.anchor,
|
|
584
|
-
focus:
|
|
668
|
+
focus: o
|
|
585
669
|
}));
|
|
586
670
|
},
|
|
587
|
-
[
|
|
588
|
-
),
|
|
589
|
-
const r =
|
|
590
|
-
|
|
591
|
-
() =>
|
|
592
|
-
|
|
671
|
+
[B]
|
|
672
|
+
), pt = I((e) => {
|
|
673
|
+
const r = q.current;
|
|
674
|
+
q.current = null, Ot(!1), r && requestAnimationFrame(
|
|
675
|
+
() => rr(
|
|
676
|
+
g.current,
|
|
593
677
|
r.focus.rowId,
|
|
594
678
|
r.focus.columnKey
|
|
595
679
|
)
|
|
596
680
|
);
|
|
597
|
-
}, []),
|
|
681
|
+
}, []), Br = I(
|
|
598
682
|
(e) => {
|
|
599
|
-
if (!
|
|
600
|
-
const r =
|
|
683
|
+
if (!y || !W || !ee || Be(e.target)) return;
|
|
684
|
+
const r = ir(
|
|
601
685
|
e.target,
|
|
602
|
-
|
|
686
|
+
g.current
|
|
603
687
|
);
|
|
604
688
|
if (!r) return;
|
|
605
|
-
const t =
|
|
606
|
-
t && (e.preventDefault(), e.stopPropagation(),
|
|
689
|
+
const t = $e(r);
|
|
690
|
+
t && (e.preventDefault(), e.stopPropagation(), B(gt(t)), ee({
|
|
607
691
|
rowId: t.rowId,
|
|
608
692
|
columnKey: t.columnKey,
|
|
609
693
|
sourceIndex: t.sourceIndex
|
|
610
694
|
}));
|
|
611
695
|
},
|
|
612
|
-
[
|
|
613
|
-
),
|
|
696
|
+
[y, B, W, ee]
|
|
697
|
+
), $r = I(
|
|
614
698
|
(e) => {
|
|
615
|
-
if (!
|
|
616
|
-
const r =
|
|
699
|
+
if (!y || !W || e.button !== 0 || A.current) return;
|
|
700
|
+
const r = ir(
|
|
617
701
|
e.target,
|
|
618
|
-
|
|
702
|
+
g.current
|
|
619
703
|
);
|
|
620
704
|
if (!r) return;
|
|
621
|
-
const t =
|
|
705
|
+
const t = $e(r);
|
|
622
706
|
if (!t) return;
|
|
623
|
-
const
|
|
624
|
-
|
|
707
|
+
const i = e.shiftKey && w != null, n = i ? w.anchor : t;
|
|
708
|
+
tt.current = null, et.current = { x: e.clientX, y: e.clientY }, q.current = {
|
|
625
709
|
pointerId: e.pointerId,
|
|
626
710
|
startX: e.clientX,
|
|
627
711
|
startY: e.clientY,
|
|
@@ -629,142 +713,142 @@ const lt = "300px", ct = (i) => {
|
|
|
629
713
|
anchor: n,
|
|
630
714
|
origin: t,
|
|
631
715
|
focus: t,
|
|
632
|
-
extend:
|
|
633
|
-
},
|
|
716
|
+
extend: i
|
|
717
|
+
}, B(i ? { anchor: n, focus: t } : gt(t));
|
|
634
718
|
},
|
|
635
|
-
[
|
|
719
|
+
[y, w, B, W]
|
|
636
720
|
);
|
|
637
|
-
|
|
638
|
-
if (!
|
|
639
|
-
const e = (
|
|
640
|
-
const n =
|
|
641
|
-
!n ||
|
|
642
|
-
}, r = (
|
|
643
|
-
const n =
|
|
644
|
-
!n ||
|
|
645
|
-
}, t = (
|
|
646
|
-
const n =
|
|
647
|
-
!n ||
|
|
721
|
+
X(() => {
|
|
722
|
+
if (!y) return;
|
|
723
|
+
const e = (i) => {
|
|
724
|
+
const n = q.current;
|
|
725
|
+
!n || i.pointerId !== n.pointerId || (i.preventDefault(), Ue(i.clientX, i.clientY));
|
|
726
|
+
}, r = (i) => {
|
|
727
|
+
const n = q.current;
|
|
728
|
+
!n || i.pointerId !== n.pointerId || pt(!0);
|
|
729
|
+
}, t = (i) => {
|
|
730
|
+
const n = q.current;
|
|
731
|
+
!n || i.pointerId !== n.pointerId || pt(!1);
|
|
648
732
|
};
|
|
649
733
|
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", t), () => {
|
|
650
734
|
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", t);
|
|
651
735
|
};
|
|
652
|
-
}, [
|
|
653
|
-
if (!
|
|
736
|
+
}, [y, pt, Ue]), X(() => {
|
|
737
|
+
if (!ie) return;
|
|
654
738
|
const e = document.body.style.userSelect;
|
|
655
739
|
return document.body.style.userSelect = "none", () => {
|
|
656
740
|
document.body.style.userSelect = e;
|
|
657
741
|
};
|
|
658
|
-
}, [
|
|
659
|
-
if (!
|
|
742
|
+
}, [ie]), X(() => {
|
|
743
|
+
if (!ie) return;
|
|
660
744
|
let e = 0;
|
|
661
745
|
const r = () => {
|
|
662
|
-
const t =
|
|
663
|
-
if (!(t != null && t.active) || !
|
|
664
|
-
const { x: n, y:
|
|
665
|
-
(l !== 0 ||
|
|
746
|
+
const t = q.current, i = g.current;
|
|
747
|
+
if (!(t != null && t.active) || !i) return;
|
|
748
|
+
const { x: n, y: c } = et.current, { dx: l, dy: h } = Tn(i, n, c);
|
|
749
|
+
(l !== 0 || h !== 0) && (l !== 0 && (i.scrollLeft += l), h !== 0 && (i.scrollTop += h), Ue(n, c)), e = requestAnimationFrame(r);
|
|
666
750
|
};
|
|
667
751
|
return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
|
|
668
|
-
}, [
|
|
669
|
-
if (!
|
|
752
|
+
}, [ie, Ue]), X(() => {
|
|
753
|
+
if (!y || !w) return;
|
|
670
754
|
const e = (t) => {
|
|
671
|
-
if (
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
755
|
+
if (Be(t.target)) return;
|
|
756
|
+
const i = g.current;
|
|
757
|
+
if (!i) return;
|
|
674
758
|
const n = document.activeElement;
|
|
675
|
-
if (n && !
|
|
759
|
+
if (n && !i.contains(n) && t.target instanceof Node && !i.contains(t.target))
|
|
676
760
|
return;
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
761
|
+
const c = xt(
|
|
762
|
+
w,
|
|
763
|
+
v,
|
|
680
764
|
Y
|
|
681
765
|
);
|
|
682
|
-
!
|
|
766
|
+
!c || !He || (t.preventDefault(), He({ selection: w, rect: c, event: t }));
|
|
683
767
|
}, r = (t) => {
|
|
684
|
-
var
|
|
685
|
-
if (
|
|
686
|
-
const
|
|
687
|
-
if (!
|
|
768
|
+
var h;
|
|
769
|
+
if (Be(t.target)) return;
|
|
770
|
+
const i = g.current;
|
|
771
|
+
if (!i) return;
|
|
688
772
|
const n = document.activeElement;
|
|
689
|
-
if (n && !
|
|
773
|
+
if (n && !i.contains(n) && t.target instanceof Node && !i.contains(t.target))
|
|
690
774
|
return;
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
|
|
775
|
+
const c = xt(
|
|
776
|
+
w,
|
|
777
|
+
v,
|
|
694
778
|
Y
|
|
695
779
|
);
|
|
696
|
-
if (!
|
|
697
|
-
const l = ((
|
|
698
|
-
t.preventDefault(),
|
|
780
|
+
if (!c || !ze) return;
|
|
781
|
+
const l = ((h = t.clipboardData) == null ? void 0 : h.getData("text/plain")) ?? "";
|
|
782
|
+
t.preventDefault(), ze({ selection: w, rect: c, text: l, event: t });
|
|
699
783
|
};
|
|
700
784
|
return document.addEventListener("copy", e), document.addEventListener("paste", r), () => {
|
|
701
785
|
document.removeEventListener("copy", e), document.removeEventListener("paste", r);
|
|
702
786
|
};
|
|
703
787
|
}, [
|
|
704
|
-
|
|
705
|
-
h,
|
|
788
|
+
v,
|
|
706
789
|
y,
|
|
790
|
+
w,
|
|
707
791
|
Y,
|
|
708
|
-
|
|
709
|
-
|
|
792
|
+
He,
|
|
793
|
+
ze
|
|
710
794
|
]);
|
|
711
|
-
const
|
|
712
|
-
if (
|
|
713
|
-
if (
|
|
714
|
-
|
|
795
|
+
const ht = Ce && Hn(F, v), Xr = Ce && zn(F, v), jr = () => {
|
|
796
|
+
if (S) {
|
|
797
|
+
if (ht) {
|
|
798
|
+
S(/* @__PURE__ */ new Set());
|
|
715
799
|
return;
|
|
716
800
|
}
|
|
717
|
-
|
|
801
|
+
S("all");
|
|
718
802
|
}
|
|
719
|
-
},
|
|
720
|
-
if (!
|
|
721
|
-
if (
|
|
722
|
-
|
|
803
|
+
}, qr = (e, r) => {
|
|
804
|
+
if (!S) return;
|
|
805
|
+
if (ae === "single") {
|
|
806
|
+
S(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
|
|
723
807
|
return;
|
|
724
808
|
}
|
|
725
|
-
const t =
|
|
726
|
-
r ? t.add(e) : t.delete(e),
|
|
727
|
-
},
|
|
728
|
-
const r =
|
|
729
|
-
return
|
|
730
|
-
|
|
809
|
+
const t = F === "all" ? new Set(v) : new Set(ar(F, v));
|
|
810
|
+
r ? t.add(e) : t.delete(e), S(t);
|
|
811
|
+
}, Kr = (e) => {
|
|
812
|
+
const r = Te.has(e.key);
|
|
813
|
+
return Pt ? /* @__PURE__ */ a(
|
|
814
|
+
m.Row,
|
|
731
815
|
{
|
|
732
816
|
id: `group-${e.key}`,
|
|
733
817
|
highlightSelectedRow: !1,
|
|
734
818
|
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
735
|
-
children: /* @__PURE__ */
|
|
819
|
+
children: /* @__PURE__ */ a(m.Cell, { colSpan: me, className: x(D), children: Pt(e) })
|
|
736
820
|
},
|
|
737
821
|
`group-${e.key}`
|
|
738
|
-
) : /* @__PURE__ */
|
|
739
|
-
|
|
822
|
+
) : /* @__PURE__ */ a(
|
|
823
|
+
m.Row,
|
|
740
824
|
{
|
|
741
825
|
id: `group-${e.key}`,
|
|
742
826
|
highlightSelectedRow: !1,
|
|
743
827
|
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
744
|
-
children: /* @__PURE__ */
|
|
745
|
-
|
|
828
|
+
children: /* @__PURE__ */ a(
|
|
829
|
+
m.Cell,
|
|
746
830
|
{
|
|
747
|
-
colSpan:
|
|
748
|
-
className:
|
|
749
|
-
children: /* @__PURE__ */
|
|
831
|
+
colSpan: me,
|
|
832
|
+
className: x("py-1.5", D),
|
|
833
|
+
children: /* @__PURE__ */ E(
|
|
750
834
|
"button",
|
|
751
835
|
{
|
|
752
836
|
type: "button",
|
|
753
837
|
className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
|
|
754
|
-
onClick: () =>
|
|
838
|
+
onClick: () => Sr(e.key),
|
|
755
839
|
"aria-expanded": !r,
|
|
756
840
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
|
|
841
|
+
/* @__PURE__ */ a(
|
|
842
|
+
tn,
|
|
759
843
|
{
|
|
760
|
-
className:
|
|
844
|
+
className: x(
|
|
761
845
|
"size-4 shrink-0 text-fg-quaternary transition-transform",
|
|
762
846
|
!r && "rotate-90"
|
|
763
847
|
)
|
|
764
848
|
}
|
|
765
849
|
),
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: e.label || "(Empty)" }),
|
|
851
|
+
/* @__PURE__ */ E("span", { className: "text-tertiary", children: [
|
|
768
852
|
"(",
|
|
769
853
|
e.rows.length,
|
|
770
854
|
")"
|
|
@@ -777,55 +861,55 @@ const lt = "300px", ct = (i) => {
|
|
|
777
861
|
},
|
|
778
862
|
`group-${e.key}`
|
|
779
863
|
);
|
|
780
|
-
},
|
|
781
|
-
const
|
|
782
|
-
return /* @__PURE__ */
|
|
783
|
-
|
|
864
|
+
}, jt = (e, r, t = 0) => {
|
|
865
|
+
const i = Et ? Et(e) : !1, n = ve(e), c = Ur(e, t), l = qn(F, n, v), h = Wr === n, k = (p == null ? void 0 : p.active) === !0 && p.rowId === n;
|
|
866
|
+
return /* @__PURE__ */ E(
|
|
867
|
+
m.Row,
|
|
784
868
|
{
|
|
785
869
|
onAction: () => {
|
|
786
|
-
var
|
|
787
|
-
(
|
|
870
|
+
var o;
|
|
871
|
+
(o = A.current) != null && o.active || ke == null || ke(e);
|
|
788
872
|
},
|
|
789
|
-
onMouseEnter: () =>
|
|
790
|
-
onMouseLeave: () =>
|
|
873
|
+
onMouseEnter: () => V == null ? void 0 : V(e, !0),
|
|
874
|
+
onMouseLeave: () => V == null ? void 0 : V(e, !1),
|
|
791
875
|
id: n,
|
|
792
876
|
value: e,
|
|
793
|
-
columns:
|
|
794
|
-
expandedColSpan:
|
|
795
|
-
isExpandable:
|
|
796
|
-
highlightSelectedRow:
|
|
797
|
-
renderExpandedContent:
|
|
798
|
-
[
|
|
799
|
-
[
|
|
800
|
-
className:
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
877
|
+
columns: f,
|
|
878
|
+
expandedColSpan: me,
|
|
879
|
+
isExpandable: i,
|
|
880
|
+
highlightSelectedRow: Ee,
|
|
881
|
+
renderExpandedContent: i ? wr : void 0,
|
|
882
|
+
[nr]: n,
|
|
883
|
+
[Wn]: String(c),
|
|
884
|
+
className: x(
|
|
885
|
+
ke && "cursor-pointer",
|
|
886
|
+
fr ? "prose" : "",
|
|
887
|
+
kt && "[&>td]:after:hidden",
|
|
888
|
+
rt && "group/rowactions",
|
|
889
|
+
h && "bg-utility-brand-25 hover:bg-utility-brand-25",
|
|
890
|
+
U && l && "bg-secondary",
|
|
891
|
+
_t,
|
|
892
|
+
je == null ? void 0 : je(e)
|
|
809
893
|
),
|
|
810
|
-
style:
|
|
894
|
+
style: k ? Ln : void 0,
|
|
811
895
|
children: [
|
|
812
|
-
|
|
813
|
-
|
|
896
|
+
U && /* @__PURE__ */ a(
|
|
897
|
+
m.Cell,
|
|
814
898
|
{
|
|
815
899
|
"data-grid-no-range": "",
|
|
816
|
-
className:
|
|
900
|
+
className: x("relative w-10 text-center", D),
|
|
817
901
|
style: { minWidth: "40px", width: "40px" },
|
|
818
|
-
children: /* @__PURE__ */
|
|
902
|
+
children: /* @__PURE__ */ a(
|
|
819
903
|
"div",
|
|
820
904
|
{
|
|
821
905
|
className: "flex items-center justify-center",
|
|
822
|
-
onClick: (
|
|
823
|
-
onKeyDown: (
|
|
824
|
-
children: /* @__PURE__ */
|
|
825
|
-
|
|
906
|
+
onClick: (o) => o.stopPropagation(),
|
|
907
|
+
onKeyDown: (o) => o.stopPropagation(),
|
|
908
|
+
children: /* @__PURE__ */ a(
|
|
909
|
+
sr,
|
|
826
910
|
{
|
|
827
911
|
checked: l,
|
|
828
|
-
onCheckedChange: (
|
|
912
|
+
onCheckedChange: (o) => qr(n, o === !0),
|
|
829
913
|
"aria-label": `Select row ${n}`,
|
|
830
914
|
className: "items-center justify-center"
|
|
831
915
|
}
|
|
@@ -834,110 +918,110 @@ const lt = "300px", ct = (i) => {
|
|
|
834
918
|
)
|
|
835
919
|
}
|
|
836
920
|
),
|
|
837
|
-
|
|
838
|
-
const
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
),
|
|
843
|
-
|
|
921
|
+
f.map((o, zt) => {
|
|
922
|
+
const yt = Ft.get(o.key), ge = cr(
|
|
923
|
+
o.key,
|
|
924
|
+
Q,
|
|
925
|
+
yt
|
|
926
|
+
), xe = (ne == null ? void 0 : ne.rowId) === n && (ne == null ? void 0 : ne.columnKey) === o.key, Z = y ? Cn(
|
|
927
|
+
w,
|
|
844
928
|
n,
|
|
845
|
-
|
|
846
|
-
|
|
929
|
+
o.key,
|
|
930
|
+
v,
|
|
847
931
|
Y
|
|
848
|
-
) : null,
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
|
|
932
|
+
) : null, Ye = !y && W && !xe && (z == null ? void 0 : z.rowId) === n && (z == null ? void 0 : z.columnKey) === o.key, se = !!(Z != null && Z.inRange) && W && !xe, Re = se && Z ? On(Z.edges) : void 0, K = ft(o);
|
|
933
|
+
return /* @__PURE__ */ a(
|
|
934
|
+
m.Cell,
|
|
851
935
|
{
|
|
852
|
-
sticky:
|
|
853
|
-
stickyOffset:
|
|
936
|
+
sticky: o.sticky,
|
|
937
|
+
stickyOffset: o.stickyOffset,
|
|
854
938
|
style: {
|
|
855
|
-
...
|
|
856
|
-
...
|
|
939
|
+
...K,
|
|
940
|
+
...Re ? { boxShadow: Re } : null
|
|
857
941
|
},
|
|
858
942
|
"data-grid-cell": "",
|
|
859
943
|
"data-grid-row-id": n,
|
|
860
|
-
"data-grid-col-key":
|
|
861
|
-
"data-grid-source-index":
|
|
862
|
-
className:
|
|
944
|
+
"data-grid-col-key": o.key,
|
|
945
|
+
"data-grid-source-index": c,
|
|
946
|
+
className: x(
|
|
863
947
|
"relative overflow-x-hidden",
|
|
864
948
|
// Uncontrolled single-cell highlight (legacy).
|
|
865
|
-
|
|
949
|
+
Ye && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
|
|
866
950
|
// Controlled range: fill all selected cells except the anchor; perimeter via boxShadow.
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
951
|
+
se && "z-1 outline-hidden after:opacity-0",
|
|
952
|
+
se && Z && !Z.isAnchor && "bg-utility-brand-25",
|
|
953
|
+
o.cellClassName,
|
|
954
|
+
on(ge),
|
|
955
|
+
D
|
|
872
956
|
),
|
|
873
957
|
children: (() => {
|
|
874
|
-
const
|
|
875
|
-
|
|
958
|
+
const Vt = zt === 0 && (i || rt) ? /* @__PURE__ */ E("div", { className: "flex items-center", children: [
|
|
959
|
+
L && /* @__PURE__ */ a(
|
|
876
960
|
"div",
|
|
877
961
|
{
|
|
878
962
|
"data-grid-no-range": "",
|
|
879
963
|
className: "flex items-center justify-center",
|
|
880
|
-
onClick: (
|
|
881
|
-
onContextMenu: (
|
|
882
|
-
onKeyDown: (
|
|
883
|
-
children: /* @__PURE__ */
|
|
884
|
-
|
|
964
|
+
onClick: ($) => $.stopPropagation(),
|
|
965
|
+
onContextMenu: ($) => $.stopPropagation(),
|
|
966
|
+
onKeyDown: ($) => $.stopPropagation(),
|
|
967
|
+
children: /* @__PURE__ */ a(
|
|
968
|
+
Un,
|
|
885
969
|
{
|
|
886
|
-
config:
|
|
887
|
-
sourceRowIndex:
|
|
970
|
+
config: L,
|
|
971
|
+
sourceRowIndex: c,
|
|
888
972
|
item: e,
|
|
889
|
-
enableDrag:
|
|
890
|
-
isDragging:
|
|
891
|
-
onDragHandlePointerDown: (
|
|
892
|
-
|
|
973
|
+
enableDrag: nt,
|
|
974
|
+
isDragging: k,
|
|
975
|
+
onDragHandlePointerDown: ($) => Yr(
|
|
976
|
+
$,
|
|
893
977
|
n,
|
|
894
|
-
|
|
978
|
+
c,
|
|
895
979
|
e
|
|
896
980
|
),
|
|
897
|
-
triggerClassName:
|
|
981
|
+
triggerClassName: x(
|
|
898
982
|
// Hover-reveal: hidden until row hover / focus / menu open / this row is the drag source.
|
|
899
983
|
// Do not force all handles visible while another row is dragging.
|
|
900
984
|
"transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
|
|
901
|
-
|
|
985
|
+
h || k ? "opacity-100" : "opacity-0"
|
|
902
986
|
),
|
|
903
|
-
onOpenChange: (
|
|
987
|
+
onOpenChange: ($) => Tt($ ? n : null)
|
|
904
988
|
}
|
|
905
989
|
)
|
|
906
990
|
}
|
|
907
991
|
),
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
] }) :
|
|
910
|
-
return W ? /* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: vt(o.key, e[o.key], e) })
|
|
993
|
+
] }) : vt(o.key, e[o.key], e);
|
|
994
|
+
return W ? /* @__PURE__ */ a(
|
|
911
995
|
"div",
|
|
912
996
|
{
|
|
913
997
|
"data-grid-focus": !0,
|
|
914
998
|
tabIndex: -1,
|
|
915
999
|
className: "outline-hidden",
|
|
916
|
-
children:
|
|
1000
|
+
children: Vt
|
|
917
1001
|
}
|
|
918
|
-
) :
|
|
1002
|
+
) : Vt;
|
|
919
1003
|
})()
|
|
920
1004
|
},
|
|
921
|
-
|
|
1005
|
+
o.key
|
|
922
1006
|
);
|
|
923
1007
|
}),
|
|
924
|
-
|
|
925
|
-
|
|
1008
|
+
O && G && /* @__PURE__ */ a(
|
|
1009
|
+
m.Cell,
|
|
926
1010
|
{
|
|
927
1011
|
"data-grid-no-range": "",
|
|
928
|
-
className:
|
|
1012
|
+
className: x("relative w-14 text-center", D),
|
|
929
1013
|
style: { minWidth: "56px", width: "56px" },
|
|
930
|
-
children: /* @__PURE__ */
|
|
1014
|
+
children: /* @__PURE__ */ a(
|
|
931
1015
|
"button",
|
|
932
1016
|
{
|
|
933
1017
|
type: "button",
|
|
934
1018
|
title: "Delete row",
|
|
935
1019
|
"aria-label": "Delete row",
|
|
936
1020
|
className: "inline-flex items-center justify-center rounded p-1 text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-secondary",
|
|
937
|
-
onClick: (
|
|
938
|
-
|
|
1021
|
+
onClick: (o) => {
|
|
1022
|
+
o.stopPropagation(), G.onDeleteRow(c);
|
|
939
1023
|
},
|
|
940
|
-
children: /* @__PURE__ */
|
|
1024
|
+
children: /* @__PURE__ */ a(Yn, { name: "Trash02", className: "size-3" })
|
|
941
1025
|
}
|
|
942
1026
|
)
|
|
943
1027
|
}
|
|
@@ -946,104 +1030,107 @@ const lt = "300px", ct = (i) => {
|
|
|
946
1030
|
},
|
|
947
1031
|
n
|
|
948
1032
|
);
|
|
949
|
-
},
|
|
950
|
-
|
|
1033
|
+
}, Hr = (e) => /* @__PURE__ */ E(
|
|
1034
|
+
m.Row,
|
|
951
1035
|
{
|
|
952
1036
|
id: String(e.id),
|
|
953
1037
|
isExpandable: !1,
|
|
954
|
-
className:
|
|
1038
|
+
className: x(kt && "[&>td]:after:hidden", _t),
|
|
955
1039
|
children: [
|
|
956
|
-
|
|
957
|
-
|
|
1040
|
+
U && /* @__PURE__ */ a(
|
|
1041
|
+
m.Cell,
|
|
958
1042
|
{
|
|
959
|
-
className:
|
|
1043
|
+
className: x("relative w-10", D),
|
|
960
1044
|
style: { minWidth: "40px", width: "40px" }
|
|
961
1045
|
}
|
|
962
1046
|
),
|
|
963
|
-
|
|
964
|
-
|
|
1047
|
+
f.map((r) => /* @__PURE__ */ a(
|
|
1048
|
+
m.Cell,
|
|
965
1049
|
{
|
|
966
1050
|
sticky: r.sticky,
|
|
967
1051
|
stickyOffset: r.stickyOffset,
|
|
968
|
-
style:
|
|
969
|
-
className:
|
|
1052
|
+
style: ft(r),
|
|
1053
|
+
className: x(
|
|
970
1054
|
"overflow-x-hidden text-left",
|
|
971
1055
|
r.cellClassName,
|
|
972
|
-
|
|
1056
|
+
D
|
|
973
1057
|
),
|
|
974
|
-
children: /* @__PURE__ */
|
|
1058
|
+
children: /* @__PURE__ */ a(Bn, { height: "14px", width: "75%", className: "rounded" })
|
|
975
1059
|
},
|
|
976
1060
|
r.key
|
|
977
1061
|
)),
|
|
978
|
-
|
|
979
|
-
|
|
1062
|
+
O && /* @__PURE__ */ a(
|
|
1063
|
+
m.Cell,
|
|
980
1064
|
{
|
|
981
|
-
className:
|
|
1065
|
+
className: x("w-14", D),
|
|
982
1066
|
style: { minWidth: "56px", width: "56px" }
|
|
983
1067
|
}
|
|
984
1068
|
)
|
|
985
1069
|
]
|
|
986
1070
|
},
|
|
987
1071
|
String(e.id)
|
|
988
|
-
),
|
|
989
|
-
const r =
|
|
1072
|
+
), zr = () => j ? Fe.map((e) => Hr(e)) : Oe && J ? J.flatMap((e) => {
|
|
1073
|
+
const r = Te.has(e.key);
|
|
990
1074
|
return [
|
|
991
|
-
|
|
1075
|
+
Kr(e),
|
|
992
1076
|
...r ? [] : e.rows.map(
|
|
993
|
-
(t,
|
|
1077
|
+
(t, i) => jt(t, void 0, i)
|
|
994
1078
|
)
|
|
995
1079
|
];
|
|
996
|
-
}) :
|
|
997
|
-
(e, r) =>
|
|
998
|
-
),
|
|
999
|
-
|
|
1080
|
+
}) : Fe.map(
|
|
1081
|
+
(e, r) => jt(e, void 0, r)
|
|
1082
|
+
), qt = /* @__PURE__ */ a(
|
|
1083
|
+
rn.Root,
|
|
1000
1084
|
{
|
|
1001
|
-
ref:
|
|
1002
|
-
onKeyDownCapture: W ?
|
|
1003
|
-
onPointerDownCapture:
|
|
1004
|
-
onDoubleClickCapture:
|
|
1005
|
-
className:
|
|
1085
|
+
ref: Mr,
|
|
1086
|
+
onKeyDownCapture: W ? Zr : void 0,
|
|
1087
|
+
onPointerDownCapture: y ? $r : void 0,
|
|
1088
|
+
onDoubleClickCapture: y ? Br : void 0,
|
|
1089
|
+
className: x(
|
|
1006
1090
|
"w-full",
|
|
1007
|
-
!
|
|
1008
|
-
|
|
1091
|
+
!P || $t ? "overflow-x-auto" : "overflow-x-hidden",
|
|
1092
|
+
Ie && "border border-secondary rounded-xl",
|
|
1009
1093
|
"[&_tr:hover>td]:!bg-secondary_subtle",
|
|
1010
|
-
|
|
1094
|
+
hr
|
|
1011
1095
|
),
|
|
1012
|
-
size:
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1014
|
-
|
|
1096
|
+
size: bt,
|
|
1097
|
+
children: /* @__PURE__ */ E(
|
|
1098
|
+
m,
|
|
1015
1099
|
{
|
|
1016
|
-
"aria-label":
|
|
1017
|
-
size:
|
|
1100
|
+
"aria-label": ur,
|
|
1101
|
+
size: bt,
|
|
1018
1102
|
isEditable: W,
|
|
1019
|
-
inlineSelection:
|
|
1020
|
-
className:
|
|
1021
|
-
|
|
1022
|
-
|
|
1103
|
+
inlineSelection: Ee,
|
|
1104
|
+
className: x(
|
|
1105
|
+
P && "min-w-full",
|
|
1106
|
+
mr
|
|
1107
|
+
),
|
|
1108
|
+
style: Gr,
|
|
1109
|
+
...Ar,
|
|
1023
1110
|
children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
|
|
1111
|
+
/* @__PURE__ */ E(
|
|
1112
|
+
m.Header,
|
|
1026
1113
|
{
|
|
1027
|
-
className:
|
|
1114
|
+
className: x(
|
|
1028
1115
|
"sticky top-0 z-20",
|
|
1029
|
-
|
|
1030
|
-
|
|
1116
|
+
Ie && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
|
|
1117
|
+
yr
|
|
1031
1118
|
),
|
|
1032
1119
|
children: [
|
|
1033
|
-
|
|
1034
|
-
|
|
1120
|
+
U && /* @__PURE__ */ a(
|
|
1121
|
+
m.Head,
|
|
1035
1122
|
{
|
|
1036
1123
|
label: "",
|
|
1037
1124
|
allowsSorting: !1,
|
|
1038
1125
|
isRowHeader: !1,
|
|
1039
1126
|
style: { minWidth: "40px", width: "40px" },
|
|
1040
|
-
className:
|
|
1127
|
+
className: x(D),
|
|
1041
1128
|
headerCellClass: "justify-center",
|
|
1042
|
-
children:
|
|
1043
|
-
|
|
1129
|
+
children: ae === "multiple" && S && /* @__PURE__ */ a("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ a(
|
|
1130
|
+
sr,
|
|
1044
1131
|
{
|
|
1045
|
-
checked:
|
|
1046
|
-
onCheckedChange: () =>
|
|
1132
|
+
checked: ht ? !0 : Xr && !ht ? "indeterminate" : !1,
|
|
1133
|
+
onCheckedChange: () => jr(),
|
|
1047
1134
|
"aria-label": "Select all rows",
|
|
1048
1135
|
className: "items-center justify-center"
|
|
1049
1136
|
}
|
|
@@ -1051,14 +1138,14 @@ const lt = "300px", ct = (i) => {
|
|
|
1051
1138
|
},
|
|
1052
1139
|
"selection"
|
|
1053
1140
|
),
|
|
1054
|
-
|
|
1055
|
-
const t =
|
|
1141
|
+
f.map((e, r) => {
|
|
1142
|
+
const t = br ? Pr.get(e.key) : void 0, i = Ft.get(e.key), n = cr(
|
|
1056
1143
|
e.key,
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
),
|
|
1060
|
-
return /* @__PURE__ */
|
|
1061
|
-
|
|
1144
|
+
Q,
|
|
1145
|
+
i
|
|
1146
|
+
), c = pr.includes(e.key) || n === "center" ? "justify-center" : n === "right" ? "justify-end" : "";
|
|
1147
|
+
return /* @__PURE__ */ a(
|
|
1148
|
+
m.Head,
|
|
1062
1149
|
{
|
|
1063
1150
|
sticky: e.sticky,
|
|
1064
1151
|
stickyOffset: e.stickyOffset,
|
|
@@ -1066,96 +1153,96 @@ const lt = "300px", ct = (i) => {
|
|
|
1066
1153
|
label: e.label,
|
|
1067
1154
|
isRowHeader: r === 0,
|
|
1068
1155
|
allowsSorting: e.allowsSorting,
|
|
1069
|
-
headerCellClass: `${e.headerCellClass} ${
|
|
1070
|
-
style:
|
|
1071
|
-
className:
|
|
1156
|
+
headerCellClass: `${e.headerCellClass} ${c}`,
|
|
1157
|
+
style: ft(e),
|
|
1158
|
+
className: x(
|
|
1072
1159
|
"overflow-hidden",
|
|
1073
1160
|
e.headClassName,
|
|
1074
|
-
|
|
1161
|
+
D
|
|
1075
1162
|
),
|
|
1076
|
-
headerAction: t &&
|
|
1077
|
-
|
|
1163
|
+
headerAction: t && Pe ? /* @__PURE__ */ a(
|
|
1164
|
+
Gn,
|
|
1078
1165
|
{
|
|
1079
1166
|
column: t,
|
|
1080
|
-
columnLabel: t.label ?? (
|
|
1081
|
-
currentAlignment:
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
) : (
|
|
1085
|
-
capabilities:
|
|
1086
|
-
hideDisabled:
|
|
1087
|
-
onAction:
|
|
1088
|
-
renderExtraItems:
|
|
1167
|
+
columnLabel: t.label ?? (i ? sn(i, Er) : e.label),
|
|
1168
|
+
currentAlignment: i ? dr(
|
|
1169
|
+
i,
|
|
1170
|
+
Q ?? /* @__PURE__ */ new Map()
|
|
1171
|
+
) : (Q == null ? void 0 : Q.get(e.key)) ?? "left",
|
|
1172
|
+
capabilities: kr,
|
|
1173
|
+
hideDisabled: f.length <= 1,
|
|
1174
|
+
onAction: Fr.get(e.key),
|
|
1175
|
+
renderExtraItems: Ir,
|
|
1089
1176
|
showOnHeaderHover: !0
|
|
1090
1177
|
}
|
|
1091
1178
|
) : void 0,
|
|
1092
|
-
children: (
|
|
1179
|
+
children: (Xe == null ? void 0 : Xe(e.key)) ?? null
|
|
1093
1180
|
},
|
|
1094
1181
|
e.key
|
|
1095
1182
|
);
|
|
1096
1183
|
}),
|
|
1097
|
-
|
|
1098
|
-
|
|
1184
|
+
O && /* @__PURE__ */ a(
|
|
1185
|
+
m.Head,
|
|
1099
1186
|
{
|
|
1100
1187
|
label: "",
|
|
1101
1188
|
allowsSorting: !1,
|
|
1102
1189
|
isRowHeader: !1,
|
|
1103
1190
|
style: { minWidth: "56px", width: "56px" },
|
|
1104
|
-
className:
|
|
1191
|
+
className: x(D)
|
|
1105
1192
|
},
|
|
1106
1193
|
"actions"
|
|
1107
1194
|
)
|
|
1108
1195
|
]
|
|
1109
1196
|
}
|
|
1110
1197
|
),
|
|
1111
|
-
/* @__PURE__ */
|
|
1112
|
-
!
|
|
1113
|
-
|
|
1114
|
-
|
|
1198
|
+
/* @__PURE__ */ E(m.Body, { children: [
|
|
1199
|
+
!Ut && zr(),
|
|
1200
|
+
Cr && /* @__PURE__ */ a(
|
|
1201
|
+
m.Row,
|
|
1115
1202
|
{
|
|
1116
1203
|
id: "empty-state",
|
|
1117
1204
|
highlightSelectedRow: !1,
|
|
1118
|
-
children: /* @__PURE__ */
|
|
1119
|
-
|
|
1205
|
+
children: /* @__PURE__ */ a(
|
|
1206
|
+
m.Cell,
|
|
1120
1207
|
{
|
|
1121
|
-
colSpan:
|
|
1122
|
-
className:
|
|
1208
|
+
colSpan: me,
|
|
1209
|
+
className: x(
|
|
1123
1210
|
"text-left text-placeholder_subtle border-b border-secondary py-3",
|
|
1124
|
-
|
|
1211
|
+
D
|
|
1125
1212
|
),
|
|
1126
|
-
children:
|
|
1213
|
+
children: Wt
|
|
1127
1214
|
}
|
|
1128
1215
|
)
|
|
1129
1216
|
},
|
|
1130
1217
|
"empty-state"
|
|
1131
1218
|
),
|
|
1132
|
-
|
|
1133
|
-
|
|
1219
|
+
ot && G && /* @__PURE__ */ E(
|
|
1220
|
+
m.Row,
|
|
1134
1221
|
{
|
|
1135
1222
|
id: "add-row-footer",
|
|
1136
1223
|
highlightSelectedRow: !1,
|
|
1137
1224
|
children: [
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
|
|
1225
|
+
/* @__PURE__ */ a(
|
|
1226
|
+
m.Cell,
|
|
1140
1227
|
{
|
|
1141
|
-
colSpan:
|
|
1142
|
-
className:
|
|
1143
|
-
children: /* @__PURE__ */
|
|
1144
|
-
|
|
1228
|
+
colSpan: me - (O ? 1 : 0),
|
|
1229
|
+
className: x(D),
|
|
1230
|
+
children: /* @__PURE__ */ a(
|
|
1231
|
+
Mn,
|
|
1145
1232
|
{
|
|
1146
1233
|
color: "tertiary",
|
|
1147
1234
|
className: "bg-secondary text-primary",
|
|
1148
1235
|
size: "xs",
|
|
1149
|
-
onClick:
|
|
1236
|
+
onClick: G.onAddRow,
|
|
1150
1237
|
children: "+ Add Row"
|
|
1151
1238
|
}
|
|
1152
1239
|
)
|
|
1153
1240
|
}
|
|
1154
1241
|
),
|
|
1155
|
-
|
|
1156
|
-
|
|
1242
|
+
O && /* @__PURE__ */ a(
|
|
1243
|
+
m.Cell,
|
|
1157
1244
|
{
|
|
1158
|
-
className:
|
|
1245
|
+
className: x("w-14", D),
|
|
1159
1246
|
style: { minWidth: "56px", width: "56px" }
|
|
1160
1247
|
}
|
|
1161
1248
|
)
|
|
@@ -1163,13 +1250,13 @@ const lt = "300px", ct = (i) => {
|
|
|
1163
1250
|
},
|
|
1164
1251
|
"add-row-footer"
|
|
1165
1252
|
),
|
|
1166
|
-
|
|
1167
|
-
|
|
1253
|
+
Or && Ke && /* @__PURE__ */ a(
|
|
1254
|
+
An,
|
|
1168
1255
|
{
|
|
1169
|
-
...
|
|
1170
|
-
hasActionsColumn:
|
|
1171
|
-
hasSelectionColumn:
|
|
1172
|
-
showBorders: !!
|
|
1256
|
+
...Ke,
|
|
1257
|
+
hasActionsColumn: O,
|
|
1258
|
+
hasSelectionColumn: U,
|
|
1259
|
+
showBorders: !!Ie
|
|
1173
1260
|
}
|
|
1174
1261
|
)
|
|
1175
1262
|
] })
|
|
@@ -1177,49 +1264,49 @@ const lt = "300px", ct = (i) => {
|
|
|
1177
1264
|
}
|
|
1178
1265
|
)
|
|
1179
1266
|
}
|
|
1180
|
-
),
|
|
1181
|
-
|
|
1267
|
+
), Kt = W ? /* @__PURE__ */ a(
|
|
1268
|
+
mn,
|
|
1182
1269
|
{
|
|
1183
|
-
rowIds:
|
|
1270
|
+
rowIds: v,
|
|
1184
1271
|
columnKeys: Y,
|
|
1185
|
-
containerRef:
|
|
1186
|
-
onSelectCell:
|
|
1187
|
-
onEditingCellChange:
|
|
1188
|
-
children:
|
|
1272
|
+
containerRef: g,
|
|
1273
|
+
onSelectCell: at,
|
|
1274
|
+
onEditingCellChange: _r,
|
|
1275
|
+
children: qt
|
|
1189
1276
|
}
|
|
1190
|
-
) :
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
|
|
1193
|
-
|
|
1277
|
+
) : qt, Ht = p != null && p.active ? /* @__PURE__ */ E(wt, { children: [
|
|
1278
|
+
/* @__PURE__ */ a(En, { session: p }),
|
|
1279
|
+
p.dropLineY != null && /* @__PURE__ */ a(
|
|
1280
|
+
In,
|
|
1194
1281
|
{
|
|
1195
|
-
y:
|
|
1196
|
-
left:
|
|
1197
|
-
width:
|
|
1282
|
+
y: p.dropLineY,
|
|
1283
|
+
left: p.dropLineLeft,
|
|
1284
|
+
width: p.dropLineWidth
|
|
1198
1285
|
}
|
|
1199
1286
|
)
|
|
1200
1287
|
] }) : null;
|
|
1201
|
-
return
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1288
|
+
return Tr ? /* @__PURE__ */ E("div", { className: "flex flex-col gap-3", children: [
|
|
1289
|
+
Mt && Gt,
|
|
1290
|
+
Kt,
|
|
1291
|
+
At && T && /* @__PURE__ */ a(
|
|
1292
|
+
nn,
|
|
1206
1293
|
{
|
|
1207
|
-
currentPage:
|
|
1208
|
-
pageSize:
|
|
1209
|
-
totalPages:
|
|
1210
|
-
totalItems:
|
|
1211
|
-
onPageChange:
|
|
1212
|
-
onPageSizeChange:
|
|
1213
|
-
showPagination:
|
|
1294
|
+
currentPage: T.currentPage,
|
|
1295
|
+
pageSize: T.pageSize,
|
|
1296
|
+
totalPages: T.totalPages,
|
|
1297
|
+
totalItems: T.totalItems,
|
|
1298
|
+
onPageChange: T.onPageChange,
|
|
1299
|
+
onPageSizeChange: T.onPageSizeChange,
|
|
1300
|
+
showPagination: T.showPagination
|
|
1214
1301
|
}
|
|
1215
1302
|
),
|
|
1216
|
-
|
|
1217
|
-
] }) : /* @__PURE__ */
|
|
1218
|
-
|
|
1219
|
-
|
|
1303
|
+
Ht
|
|
1304
|
+
] }) : /* @__PURE__ */ E(wt, { children: [
|
|
1305
|
+
Kt,
|
|
1306
|
+
Ht
|
|
1220
1307
|
] });
|
|
1221
1308
|
}
|
|
1222
1309
|
);
|
|
1223
1310
|
export {
|
|
1224
|
-
|
|
1311
|
+
ki as TableWrapper
|
|
1225
1312
|
};
|