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