@pibit.ai/cure-design-system 0.3.37 → 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/patterns/table/TableWrapper.d.ts +1 -1
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +880 -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,598 @@
|
|
|
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 || 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(
|
|
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(() => !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(
|
|
473
533
|
(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);
|
|
534
|
+
g.current = e, typeof ue == "function" ? ue(e) : ue && (ue.current = e);
|
|
478
535
|
},
|
|
479
|
-
[
|
|
480
|
-
),
|
|
481
|
-
|
|
482
|
-
|
|
536
|
+
[ue]
|
|
537
|
+
), Ar = Ce && Ee ? {
|
|
538
|
+
selectionMode: ae,
|
|
539
|
+
selectedKeys: F === "all" ? "all" : F,
|
|
540
|
+
onSelectionChange: Vn(S)
|
|
541
|
+
} : {}, Ur = (e, r = 0) => {
|
|
542
|
+
const t = e.__sourceIndex;
|
|
543
|
+
return typeof t == "number" ? t : r;
|
|
544
|
+
}, Me = I(
|
|
545
|
+
(e) => {
|
|
546
|
+
const r = A.current;
|
|
483
547
|
if (!r) return;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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);
|
|
550
|
+
},
|
|
551
|
+
[L, re]
|
|
552
|
+
), Ae = I(
|
|
553
|
+
(e, r) => {
|
|
554
|
+
const t = A.current;
|
|
555
|
+
if (!t) return;
|
|
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 = {
|
|
559
|
+
...t,
|
|
488
560
|
currentX: e,
|
|
489
|
-
currentY:
|
|
561
|
+
currentY: r,
|
|
490
562
|
active: l
|
|
491
563
|
};
|
|
492
564
|
if (l) {
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
if (
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
565
|
+
t.active || Tt(null);
|
|
566
|
+
const k = g.current;
|
|
567
|
+
if (k) {
|
|
568
|
+
const o = Rn(
|
|
569
|
+
k,
|
|
570
|
+
r,
|
|
571
|
+
t.fromSourceIndex,
|
|
572
|
+
t.rowId
|
|
501
573
|
);
|
|
502
|
-
|
|
503
|
-
...
|
|
504
|
-
toSourceIndex:
|
|
574
|
+
o && (h = {
|
|
575
|
+
...h,
|
|
576
|
+
toSourceIndex: o.toSourceIndex,
|
|
505
577
|
// Clip to scrollport so the line never draws over the header / outside the card.
|
|
506
|
-
dropLineY:
|
|
507
|
-
|
|
508
|
-
|
|
578
|
+
dropLineY: vn(
|
|
579
|
+
o.dropLineY,
|
|
580
|
+
k
|
|
509
581
|
),
|
|
510
|
-
dropLineLeft:
|
|
511
|
-
dropLineWidth:
|
|
582
|
+
dropLineLeft: o.dropLineLeft,
|
|
583
|
+
dropLineWidth: o.dropLineWidth
|
|
512
584
|
});
|
|
513
585
|
}
|
|
514
586
|
}
|
|
515
|
-
|
|
587
|
+
re(h);
|
|
516
588
|
},
|
|
517
|
-
[
|
|
518
|
-
),
|
|
519
|
-
(e,
|
|
520
|
-
var
|
|
521
|
-
if (!
|
|
522
|
-
const n = (
|
|
523
|
-
`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)}"]`
|
|
524
596
|
);
|
|
525
597
|
if (!n) return;
|
|
526
598
|
e.preventDefault();
|
|
@@ -528,255 +600,255 @@ const ht = "300px", ft = (i) => {
|
|
|
528
600
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
529
601
|
} catch {
|
|
530
602
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
rowId:
|
|
534
|
-
fromSourceIndex:
|
|
535
|
-
item:
|
|
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({
|
|
605
|
+
rowId: r,
|
|
606
|
+
fromSourceIndex: t,
|
|
607
|
+
item: i,
|
|
536
608
|
pointerId: e.pointerId,
|
|
537
609
|
startX: e.clientX,
|
|
538
610
|
startY: e.clientY,
|
|
539
611
|
currentX: e.clientX,
|
|
540
612
|
currentY: e.clientY,
|
|
541
613
|
active: !1,
|
|
542
|
-
preview:
|
|
543
|
-
toSourceIndex:
|
|
614
|
+
preview: c,
|
|
615
|
+
toSourceIndex: t,
|
|
544
616
|
dropLineY: null,
|
|
545
|
-
dropLineLeft:
|
|
546
|
-
dropLineWidth:
|
|
617
|
+
dropLineLeft: h.left,
|
|
618
|
+
dropLineWidth: h.width,
|
|
547
619
|
rowClone: l
|
|
548
620
|
});
|
|
549
621
|
},
|
|
550
|
-
[
|
|
551
|
-
),
|
|
552
|
-
|
|
553
|
-
if (!
|
|
622
|
+
[nt, re]
|
|
623
|
+
), Xt = p != null;
|
|
624
|
+
X(() => {
|
|
625
|
+
if (!Xt) return;
|
|
554
626
|
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);
|
|
627
|
+
var c;
|
|
628
|
+
n.pointerId === ((c = A.current) == null ? void 0 : c.pointerId) && Ae(n.clientX, n.clientY);
|
|
560
629
|
}, r = (n) => {
|
|
561
|
-
var
|
|
562
|
-
n.pointerId === ((
|
|
563
|
-
},
|
|
564
|
-
|
|
630
|
+
var c;
|
|
631
|
+
n.pointerId === ((c = A.current) == null ? void 0 : c.pointerId) && Me(!0);
|
|
632
|
+
}, t = (n) => {
|
|
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));
|
|
565
637
|
};
|
|
566
|
-
return window.addEventListener("pointermove", e), window.addEventListener("pointerup",
|
|
567
|
-
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup",
|
|
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);
|
|
568
640
|
};
|
|
569
|
-
}, [
|
|
570
|
-
if (!(
|
|
571
|
-
const e = document.body.style.userSelect,
|
|
641
|
+
}, [Xt, Me, Ae]), X(() => {
|
|
642
|
+
if (!(p != null && p.active)) return;
|
|
643
|
+
const e = document.body.style.userSelect, r = document.body.style.cursor;
|
|
572
644
|
return document.body.style.userSelect = "none", document.body.style.cursor = "grabbing", () => {
|
|
573
|
-
document.body.style.userSelect = e, document.body.style.cursor =
|
|
645
|
+
document.body.style.userSelect = e, document.body.style.cursor = r;
|
|
574
646
|
};
|
|
575
|
-
}, [
|
|
576
|
-
if (!(
|
|
647
|
+
}, [p == null ? void 0 : p.active]), X(() => {
|
|
648
|
+
if (!(p != null && p.active)) return;
|
|
577
649
|
let e = 0;
|
|
578
|
-
const
|
|
579
|
-
const
|
|
580
|
-
if (!(
|
|
581
|
-
const { x: n, y:
|
|
582
|
-
l !== 0 && (
|
|
650
|
+
const r = () => {
|
|
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);
|
|
583
655
|
};
|
|
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:
|
|
656
|
+
return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
|
|
657
|
+
}, [p == null ? void 0 : p.active, Ae]);
|
|
658
|
+
const Ue = I(
|
|
659
|
+
(e, r) => {
|
|
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({
|
|
667
|
+
anchor: t.anchor,
|
|
668
|
+
focus: o
|
|
597
669
|
}));
|
|
598
670
|
},
|
|
599
|
-
[
|
|
600
|
-
),
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
() =>
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
671
|
+
[B]
|
|
672
|
+
), pt = I((e) => {
|
|
673
|
+
const r = q.current;
|
|
674
|
+
q.current = null, Ot(!1), r && requestAnimationFrame(
|
|
675
|
+
() => rr(
|
|
676
|
+
g.current,
|
|
677
|
+
r.focus.rowId,
|
|
678
|
+
r.focus.columnKey
|
|
607
679
|
)
|
|
608
680
|
);
|
|
609
|
-
}, []),
|
|
681
|
+
}, []), Br = I(
|
|
610
682
|
(e) => {
|
|
611
|
-
if (!
|
|
612
|
-
const
|
|
683
|
+
if (!y || !W || !ee || Be(e.target)) return;
|
|
684
|
+
const r = ir(
|
|
613
685
|
e.target,
|
|
614
|
-
|
|
686
|
+
g.current
|
|
615
687
|
);
|
|
616
|
-
if (!
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
rowId:
|
|
620
|
-
columnKey:
|
|
621
|
-
sourceIndex:
|
|
688
|
+
if (!r) return;
|
|
689
|
+
const t = $e(r);
|
|
690
|
+
t && (e.preventDefault(), e.stopPropagation(), B(gt(t)), ee({
|
|
691
|
+
rowId: t.rowId,
|
|
692
|
+
columnKey: t.columnKey,
|
|
693
|
+
sourceIndex: t.sourceIndex
|
|
622
694
|
}));
|
|
623
695
|
},
|
|
624
|
-
[
|
|
625
|
-
),
|
|
696
|
+
[y, B, W, ee]
|
|
697
|
+
), $r = I(
|
|
626
698
|
(e) => {
|
|
627
|
-
if (!
|
|
628
|
-
const
|
|
699
|
+
if (!y || !W || e.button !== 0 || A.current) return;
|
|
700
|
+
const r = ir(
|
|
629
701
|
e.target,
|
|
630
|
-
|
|
702
|
+
g.current
|
|
631
703
|
);
|
|
632
|
-
if (!t) return;
|
|
633
|
-
const r = Fe(t);
|
|
634
704
|
if (!r) return;
|
|
635
|
-
const
|
|
636
|
-
|
|
705
|
+
const t = $e(r);
|
|
706
|
+
if (!t) return;
|
|
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 = {
|
|
637
709
|
pointerId: e.pointerId,
|
|
638
710
|
startX: e.clientX,
|
|
639
711
|
startY: e.clientY,
|
|
640
712
|
active: !1,
|
|
641
713
|
anchor: n,
|
|
642
|
-
origin:
|
|
643
|
-
focus:
|
|
644
|
-
extend:
|
|
645
|
-
},
|
|
714
|
+
origin: t,
|
|
715
|
+
focus: t,
|
|
716
|
+
extend: i
|
|
717
|
+
}, B(i ? { anchor: n, focus: t } : gt(t));
|
|
646
718
|
},
|
|
647
|
-
[
|
|
719
|
+
[y, w, B, W]
|
|
648
720
|
);
|
|
649
|
-
|
|
650
|
-
if (!
|
|
651
|
-
const e = (
|
|
652
|
-
const n =
|
|
653
|
-
!n ||
|
|
654
|
-
},
|
|
655
|
-
const n =
|
|
656
|
-
!n ||
|
|
657
|
-
},
|
|
658
|
-
const n =
|
|
659
|
-
!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);
|
|
660
732
|
};
|
|
661
|
-
return window.addEventListener("pointermove", e), window.addEventListener("pointerup",
|
|
662
|
-
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup",
|
|
733
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", t), () => {
|
|
734
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", t);
|
|
663
735
|
};
|
|
664
|
-
}, [
|
|
665
|
-
if (!
|
|
736
|
+
}, [y, pt, Ue]), X(() => {
|
|
737
|
+
if (!ie) return;
|
|
666
738
|
const e = document.body.style.userSelect;
|
|
667
739
|
return document.body.style.userSelect = "none", () => {
|
|
668
740
|
document.body.style.userSelect = e;
|
|
669
741
|
};
|
|
670
|
-
}, [
|
|
671
|
-
if (!
|
|
742
|
+
}, [ie]), X(() => {
|
|
743
|
+
if (!ie) return;
|
|
672
744
|
let e = 0;
|
|
673
|
-
const
|
|
674
|
-
const
|
|
675
|
-
if (!(
|
|
676
|
-
const { x: n, y:
|
|
677
|
-
(l !== 0 ||
|
|
745
|
+
const r = () => {
|
|
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);
|
|
678
750
|
};
|
|
679
|
-
return e = requestAnimationFrame(
|
|
680
|
-
}, [
|
|
681
|
-
if (!
|
|
682
|
-
const e = (
|
|
683
|
-
if (
|
|
684
|
-
const
|
|
685
|
-
if (!
|
|
751
|
+
return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
|
|
752
|
+
}, [ie, Ue]), X(() => {
|
|
753
|
+
if (!y || !w) return;
|
|
754
|
+
const e = (t) => {
|
|
755
|
+
if (Be(t.target)) return;
|
|
756
|
+
const i = g.current;
|
|
757
|
+
if (!i) return;
|
|
686
758
|
const n = document.activeElement;
|
|
687
|
-
if (n && !
|
|
759
|
+
if (n && !i.contains(n) && t.target instanceof Node && !i.contains(t.target))
|
|
688
760
|
return;
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
761
|
+
const c = xt(
|
|
762
|
+
w,
|
|
763
|
+
v,
|
|
692
764
|
Y
|
|
693
765
|
);
|
|
694
|
-
!
|
|
695
|
-
},
|
|
696
|
-
var
|
|
697
|
-
if (
|
|
698
|
-
const
|
|
699
|
-
if (!
|
|
766
|
+
!c || !He || (t.preventDefault(), He({ selection: w, rect: c, event: t }));
|
|
767
|
+
}, r = (t) => {
|
|
768
|
+
var h;
|
|
769
|
+
if (Be(t.target)) return;
|
|
770
|
+
const i = g.current;
|
|
771
|
+
if (!i) return;
|
|
700
772
|
const n = document.activeElement;
|
|
701
|
-
if (n && !
|
|
773
|
+
if (n && !i.contains(n) && t.target instanceof Node && !i.contains(t.target))
|
|
702
774
|
return;
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
775
|
+
const c = xt(
|
|
776
|
+
w,
|
|
777
|
+
v,
|
|
706
778
|
Y
|
|
707
779
|
);
|
|
708
|
-
if (!
|
|
709
|
-
const l = ((
|
|
710
|
-
|
|
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 });
|
|
711
783
|
};
|
|
712
|
-
return document.addEventListener("copy", e), document.addEventListener("paste",
|
|
713
|
-
document.removeEventListener("copy", e), document.removeEventListener("paste",
|
|
784
|
+
return document.addEventListener("copy", e), document.addEventListener("paste", r), () => {
|
|
785
|
+
document.removeEventListener("copy", e), document.removeEventListener("paste", r);
|
|
714
786
|
};
|
|
715
787
|
}, [
|
|
716
|
-
|
|
717
|
-
h,
|
|
788
|
+
v,
|
|
718
789
|
y,
|
|
790
|
+
w,
|
|
719
791
|
Y,
|
|
720
|
-
|
|
721
|
-
|
|
792
|
+
He,
|
|
793
|
+
ze
|
|
722
794
|
]);
|
|
723
|
-
const
|
|
724
|
-
if (
|
|
725
|
-
if (
|
|
726
|
-
|
|
795
|
+
const ht = Ce && Hn(F, v), Xr = Ce && zn(F, v), jr = () => {
|
|
796
|
+
if (S) {
|
|
797
|
+
if (ht) {
|
|
798
|
+
S(/* @__PURE__ */ new Set());
|
|
727
799
|
return;
|
|
728
800
|
}
|
|
729
|
-
|
|
801
|
+
S("all");
|
|
730
802
|
}
|
|
731
|
-
},
|
|
732
|
-
if (!
|
|
733
|
-
if (
|
|
734
|
-
|
|
803
|
+
}, qr = (e, r) => {
|
|
804
|
+
if (!S) return;
|
|
805
|
+
if (ae === "single") {
|
|
806
|
+
S(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
|
|
735
807
|
return;
|
|
736
808
|
}
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
},
|
|
740
|
-
const
|
|
741
|
-
return
|
|
742
|
-
|
|
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,
|
|
743
815
|
{
|
|
744
816
|
id: `group-${e.key}`,
|
|
745
817
|
highlightSelectedRow: !1,
|
|
746
818
|
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
747
|
-
children: /* @__PURE__ */
|
|
819
|
+
children: /* @__PURE__ */ a(m.Cell, { colSpan: me, className: x(D), children: Pt(e) })
|
|
748
820
|
},
|
|
749
821
|
`group-${e.key}`
|
|
750
|
-
) : /* @__PURE__ */
|
|
751
|
-
|
|
822
|
+
) : /* @__PURE__ */ a(
|
|
823
|
+
m.Row,
|
|
752
824
|
{
|
|
753
825
|
id: `group-${e.key}`,
|
|
754
826
|
highlightSelectedRow: !1,
|
|
755
827
|
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
756
|
-
children: /* @__PURE__ */
|
|
757
|
-
|
|
828
|
+
children: /* @__PURE__ */ a(
|
|
829
|
+
m.Cell,
|
|
758
830
|
{
|
|
759
|
-
colSpan:
|
|
760
|
-
className:
|
|
761
|
-
children: /* @__PURE__ */
|
|
831
|
+
colSpan: me,
|
|
832
|
+
className: x("py-1.5", D),
|
|
833
|
+
children: /* @__PURE__ */ E(
|
|
762
834
|
"button",
|
|
763
835
|
{
|
|
764
836
|
type: "button",
|
|
765
837
|
className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
|
|
766
|
-
onClick: () =>
|
|
767
|
-
"aria-expanded": !
|
|
838
|
+
onClick: () => Sr(e.key),
|
|
839
|
+
"aria-expanded": !r,
|
|
768
840
|
children: [
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
|
|
841
|
+
/* @__PURE__ */ a(
|
|
842
|
+
tn,
|
|
771
843
|
{
|
|
772
|
-
className:
|
|
844
|
+
className: x(
|
|
773
845
|
"size-4 shrink-0 text-fg-quaternary transition-transform",
|
|
774
|
-
!
|
|
846
|
+
!r && "rotate-90"
|
|
775
847
|
)
|
|
776
848
|
}
|
|
777
849
|
),
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: e.label || "(Empty)" }),
|
|
851
|
+
/* @__PURE__ */ E("span", { className: "text-tertiary", children: [
|
|
780
852
|
"(",
|
|
781
853
|
e.rows.length,
|
|
782
854
|
")"
|
|
@@ -789,55 +861,55 @@ const ht = "300px", ft = (i) => {
|
|
|
789
861
|
},
|
|
790
862
|
`group-${e.key}`
|
|
791
863
|
);
|
|
792
|
-
},
|
|
793
|
-
const
|
|
794
|
-
return /* @__PURE__ */
|
|
795
|
-
|
|
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,
|
|
796
868
|
{
|
|
797
869
|
onAction: () => {
|
|
798
|
-
var
|
|
799
|
-
(
|
|
870
|
+
var o;
|
|
871
|
+
(o = A.current) != null && o.active || ke == null || ke(e);
|
|
800
872
|
},
|
|
801
|
-
onMouseEnter: () =>
|
|
802
|
-
onMouseLeave: () =>
|
|
873
|
+
onMouseEnter: () => V == null ? void 0 : V(e, !0),
|
|
874
|
+
onMouseLeave: () => V == null ? void 0 : V(e, !1),
|
|
803
875
|
id: n,
|
|
804
876
|
value: e,
|
|
805
|
-
columns:
|
|
806
|
-
expandedColSpan:
|
|
807
|
-
isExpandable:
|
|
808
|
-
highlightSelectedRow:
|
|
809
|
-
renderExpandedContent:
|
|
810
|
-
[
|
|
811
|
-
[
|
|
812
|
-
className:
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
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)
|
|
821
893
|
),
|
|
822
|
-
style:
|
|
894
|
+
style: k ? Ln : void 0,
|
|
823
895
|
children: [
|
|
824
|
-
|
|
825
|
-
|
|
896
|
+
U && /* @__PURE__ */ a(
|
|
897
|
+
m.Cell,
|
|
826
898
|
{
|
|
827
899
|
"data-grid-no-range": "",
|
|
828
|
-
className:
|
|
900
|
+
className: x("relative w-10 text-center", D),
|
|
829
901
|
style: { minWidth: "40px", width: "40px" },
|
|
830
|
-
children: /* @__PURE__ */
|
|
902
|
+
children: /* @__PURE__ */ a(
|
|
831
903
|
"div",
|
|
832
904
|
{
|
|
833
905
|
className: "flex items-center justify-center",
|
|
834
|
-
onClick: (
|
|
835
|
-
onKeyDown: (
|
|
836
|
-
children: /* @__PURE__ */
|
|
837
|
-
|
|
906
|
+
onClick: (o) => o.stopPropagation(),
|
|
907
|
+
onKeyDown: (o) => o.stopPropagation(),
|
|
908
|
+
children: /* @__PURE__ */ a(
|
|
909
|
+
sr,
|
|
838
910
|
{
|
|
839
911
|
checked: l,
|
|
840
|
-
onCheckedChange: (
|
|
912
|
+
onCheckedChange: (o) => qr(n, o === !0),
|
|
841
913
|
"aria-label": `Select row ${n}`,
|
|
842
914
|
className: "items-center justify-center"
|
|
843
915
|
}
|
|
@@ -846,110 +918,110 @@ const ht = "300px", ft = (i) => {
|
|
|
846
918
|
)
|
|
847
919
|
}
|
|
848
920
|
),
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
),
|
|
855
|
-
|
|
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,
|
|
856
928
|
n,
|
|
857
|
-
|
|
858
|
-
|
|
929
|
+
o.key,
|
|
930
|
+
v,
|
|
859
931
|
Y
|
|
860
|
-
) : null,
|
|
861
|
-
return /* @__PURE__ */
|
|
862
|
-
|
|
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,
|
|
863
935
|
{
|
|
864
|
-
sticky:
|
|
865
|
-
stickyOffset:
|
|
936
|
+
sticky: o.sticky,
|
|
937
|
+
stickyOffset: o.stickyOffset,
|
|
866
938
|
style: {
|
|
867
|
-
...
|
|
868
|
-
...
|
|
939
|
+
...K,
|
|
940
|
+
...Re ? { boxShadow: Re } : null
|
|
869
941
|
},
|
|
870
942
|
"data-grid-cell": "",
|
|
871
943
|
"data-grid-row-id": n,
|
|
872
|
-
"data-grid-col-key":
|
|
873
|
-
"data-grid-source-index":
|
|
874
|
-
className:
|
|
944
|
+
"data-grid-col-key": o.key,
|
|
945
|
+
"data-grid-source-index": c,
|
|
946
|
+
className: x(
|
|
875
947
|
"relative overflow-x-hidden",
|
|
876
948
|
// Uncontrolled single-cell highlight (legacy).
|
|
877
|
-
|
|
949
|
+
Ye && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
|
|
878
950
|
// Controlled range: fill all selected cells except the anchor; perimeter via boxShadow.
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
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
|
|
884
956
|
),
|
|
885
957
|
children: (() => {
|
|
886
|
-
const
|
|
887
|
-
|
|
958
|
+
const Vt = zt === 0 && (i || rt) ? /* @__PURE__ */ E("div", { className: "flex items-center", children: [
|
|
959
|
+
L && /* @__PURE__ */ a(
|
|
888
960
|
"div",
|
|
889
961
|
{
|
|
890
962
|
"data-grid-no-range": "",
|
|
891
963
|
className: "flex items-center justify-center",
|
|
892
|
-
onClick: (
|
|
893
|
-
onContextMenu: (
|
|
894
|
-
onKeyDown: (
|
|
895
|
-
children: /* @__PURE__ */
|
|
896
|
-
|
|
964
|
+
onClick: ($) => $.stopPropagation(),
|
|
965
|
+
onContextMenu: ($) => $.stopPropagation(),
|
|
966
|
+
onKeyDown: ($) => $.stopPropagation(),
|
|
967
|
+
children: /* @__PURE__ */ a(
|
|
968
|
+
Un,
|
|
897
969
|
{
|
|
898
|
-
config:
|
|
899
|
-
sourceRowIndex:
|
|
970
|
+
config: L,
|
|
971
|
+
sourceRowIndex: c,
|
|
900
972
|
item: e,
|
|
901
|
-
enableDrag:
|
|
902
|
-
isDragging:
|
|
903
|
-
onDragHandlePointerDown: (
|
|
904
|
-
|
|
973
|
+
enableDrag: nt,
|
|
974
|
+
isDragging: k,
|
|
975
|
+
onDragHandlePointerDown: ($) => Yr(
|
|
976
|
+
$,
|
|
905
977
|
n,
|
|
906
|
-
|
|
978
|
+
c,
|
|
907
979
|
e
|
|
908
980
|
),
|
|
909
|
-
triggerClassName:
|
|
981
|
+
triggerClassName: x(
|
|
910
982
|
// Hover-reveal: hidden until row hover / focus / menu open / this row is the drag source.
|
|
911
983
|
// Do not force all handles visible while another row is dragging.
|
|
912
984
|
"transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
|
|
913
|
-
|
|
985
|
+
h || k ? "opacity-100" : "opacity-0"
|
|
914
986
|
),
|
|
915
|
-
onOpenChange: (
|
|
987
|
+
onOpenChange: ($) => Tt($ ? n : null)
|
|
916
988
|
}
|
|
917
989
|
)
|
|
918
990
|
}
|
|
919
991
|
),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
] }) :
|
|
922
|
-
return
|
|
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(
|
|
923
995
|
"div",
|
|
924
996
|
{
|
|
925
997
|
"data-grid-focus": !0,
|
|
926
998
|
tabIndex: -1,
|
|
927
999
|
className: "outline-hidden",
|
|
928
|
-
children:
|
|
1000
|
+
children: Vt
|
|
929
1001
|
}
|
|
930
|
-
) :
|
|
1002
|
+
) : Vt;
|
|
931
1003
|
})()
|
|
932
1004
|
},
|
|
933
|
-
|
|
1005
|
+
o.key
|
|
934
1006
|
);
|
|
935
1007
|
}),
|
|
936
|
-
|
|
937
|
-
|
|
1008
|
+
O && G && /* @__PURE__ */ a(
|
|
1009
|
+
m.Cell,
|
|
938
1010
|
{
|
|
939
1011
|
"data-grid-no-range": "",
|
|
940
|
-
className:
|
|
1012
|
+
className: x("relative w-14 text-center", D),
|
|
941
1013
|
style: { minWidth: "56px", width: "56px" },
|
|
942
|
-
children: /* @__PURE__ */
|
|
1014
|
+
children: /* @__PURE__ */ a(
|
|
943
1015
|
"button",
|
|
944
1016
|
{
|
|
945
1017
|
type: "button",
|
|
946
1018
|
title: "Delete row",
|
|
947
1019
|
"aria-label": "Delete row",
|
|
948
1020
|
className: "inline-flex items-center justify-center rounded p-1 text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-secondary",
|
|
949
|
-
onClick: (
|
|
950
|
-
|
|
1021
|
+
onClick: (o) => {
|
|
1022
|
+
o.stopPropagation(), G.onDeleteRow(c);
|
|
951
1023
|
},
|
|
952
|
-
children: /* @__PURE__ */
|
|
1024
|
+
children: /* @__PURE__ */ a(Yn, { name: "Trash02", className: "size-3" })
|
|
953
1025
|
}
|
|
954
1026
|
)
|
|
955
1027
|
}
|
|
@@ -958,104 +1030,107 @@ const ht = "300px", ft = (i) => {
|
|
|
958
1030
|
},
|
|
959
1031
|
n
|
|
960
1032
|
);
|
|
961
|
-
},
|
|
962
|
-
|
|
1033
|
+
}, Hr = (e) => /* @__PURE__ */ E(
|
|
1034
|
+
m.Row,
|
|
963
1035
|
{
|
|
964
1036
|
id: String(e.id),
|
|
965
1037
|
isExpandable: !1,
|
|
966
|
-
className:
|
|
1038
|
+
className: x(kt && "[&>td]:after:hidden", _t),
|
|
967
1039
|
children: [
|
|
968
|
-
|
|
969
|
-
|
|
1040
|
+
U && /* @__PURE__ */ a(
|
|
1041
|
+
m.Cell,
|
|
970
1042
|
{
|
|
971
|
-
className:
|
|
1043
|
+
className: x("relative w-10", D),
|
|
972
1044
|
style: { minWidth: "40px", width: "40px" }
|
|
973
1045
|
}
|
|
974
1046
|
),
|
|
975
|
-
|
|
976
|
-
|
|
1047
|
+
f.map((r) => /* @__PURE__ */ a(
|
|
1048
|
+
m.Cell,
|
|
977
1049
|
{
|
|
978
|
-
sticky:
|
|
979
|
-
stickyOffset:
|
|
980
|
-
style:
|
|
981
|
-
className:
|
|
1050
|
+
sticky: r.sticky,
|
|
1051
|
+
stickyOffset: r.stickyOffset,
|
|
1052
|
+
style: ft(r),
|
|
1053
|
+
className: x(
|
|
982
1054
|
"overflow-x-hidden text-left",
|
|
983
|
-
|
|
984
|
-
|
|
1055
|
+
r.cellClassName,
|
|
1056
|
+
D
|
|
985
1057
|
),
|
|
986
|
-
children: /* @__PURE__ */
|
|
1058
|
+
children: /* @__PURE__ */ a(Bn, { height: "14px", width: "75%", className: "rounded" })
|
|
987
1059
|
},
|
|
988
|
-
|
|
1060
|
+
r.key
|
|
989
1061
|
)),
|
|
990
|
-
|
|
991
|
-
|
|
1062
|
+
O && /* @__PURE__ */ a(
|
|
1063
|
+
m.Cell,
|
|
992
1064
|
{
|
|
993
|
-
className:
|
|
1065
|
+
className: x("w-14", D),
|
|
994
1066
|
style: { minWidth: "56px", width: "56px" }
|
|
995
1067
|
}
|
|
996
1068
|
)
|
|
997
1069
|
]
|
|
998
1070
|
},
|
|
999
1071
|
String(e.id)
|
|
1000
|
-
),
|
|
1001
|
-
const
|
|
1072
|
+
), zr = () => j ? Fe.map((e) => Hr(e)) : Oe && J ? J.flatMap((e) => {
|
|
1073
|
+
const r = Te.has(e.key);
|
|
1002
1074
|
return [
|
|
1003
|
-
|
|
1004
|
-
...
|
|
1005
|
-
(
|
|
1075
|
+
Kr(e),
|
|
1076
|
+
...r ? [] : e.rows.map(
|
|
1077
|
+
(t, i) => jt(t, void 0, i)
|
|
1006
1078
|
)
|
|
1007
1079
|
];
|
|
1008
|
-
}) :
|
|
1009
|
-
(e,
|
|
1010
|
-
),
|
|
1011
|
-
|
|
1080
|
+
}) : Fe.map(
|
|
1081
|
+
(e, r) => jt(e, void 0, r)
|
|
1082
|
+
), qt = /* @__PURE__ */ a(
|
|
1083
|
+
rn.Root,
|
|
1012
1084
|
{
|
|
1013
|
-
ref:
|
|
1014
|
-
onKeyDownCapture:
|
|
1015
|
-
onPointerDownCapture:
|
|
1016
|
-
onDoubleClickCapture:
|
|
1017
|
-
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(
|
|
1018
1090
|
"w-full",
|
|
1019
|
-
!
|
|
1020
|
-
|
|
1091
|
+
!P || $t ? "overflow-x-auto" : "overflow-x-hidden",
|
|
1092
|
+
Ie && "border border-secondary rounded-xl",
|
|
1021
1093
|
"[&_tr:hover>td]:!bg-secondary_subtle",
|
|
1022
|
-
|
|
1094
|
+
hr
|
|
1023
1095
|
),
|
|
1024
|
-
size:
|
|
1025
|
-
children: /* @__PURE__ */
|
|
1026
|
-
|
|
1096
|
+
size: bt,
|
|
1097
|
+
children: /* @__PURE__ */ E(
|
|
1098
|
+
m,
|
|
1027
1099
|
{
|
|
1028
|
-
"aria-label":
|
|
1029
|
-
size:
|
|
1030
|
-
isEditable:
|
|
1031
|
-
inlineSelection:
|
|
1032
|
-
className:
|
|
1033
|
-
|
|
1034
|
-
|
|
1100
|
+
"aria-label": ur,
|
|
1101
|
+
size: bt,
|
|
1102
|
+
isEditable: W,
|
|
1103
|
+
inlineSelection: Ee,
|
|
1104
|
+
className: x(
|
|
1105
|
+
P && "min-w-full",
|
|
1106
|
+
mr
|
|
1107
|
+
),
|
|
1108
|
+
style: Gr,
|
|
1109
|
+
...Ar,
|
|
1035
1110
|
children: [
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
|
|
1111
|
+
/* @__PURE__ */ E(
|
|
1112
|
+
m.Header,
|
|
1038
1113
|
{
|
|
1039
|
-
className:
|
|
1114
|
+
className: x(
|
|
1040
1115
|
"sticky top-0 z-20",
|
|
1041
|
-
|
|
1042
|
-
|
|
1116
|
+
Ie && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
|
|
1117
|
+
yr
|
|
1043
1118
|
),
|
|
1044
1119
|
children: [
|
|
1045
|
-
|
|
1046
|
-
|
|
1120
|
+
U && /* @__PURE__ */ a(
|
|
1121
|
+
m.Head,
|
|
1047
1122
|
{
|
|
1048
1123
|
label: "",
|
|
1049
1124
|
allowsSorting: !1,
|
|
1050
1125
|
isRowHeader: !1,
|
|
1051
1126
|
style: { minWidth: "40px", width: "40px" },
|
|
1052
|
-
className:
|
|
1127
|
+
className: x(D),
|
|
1053
1128
|
headerCellClass: "justify-center",
|
|
1054
|
-
children:
|
|
1055
|
-
|
|
1129
|
+
children: ae === "multiple" && S && /* @__PURE__ */ a("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ a(
|
|
1130
|
+
sr,
|
|
1056
1131
|
{
|
|
1057
|
-
checked:
|
|
1058
|
-
onCheckedChange: () =>
|
|
1132
|
+
checked: ht ? !0 : Xr && !ht ? "indeterminate" : !1,
|
|
1133
|
+
onCheckedChange: () => jr(),
|
|
1059
1134
|
"aria-label": "Select all rows",
|
|
1060
1135
|
className: "items-center justify-center"
|
|
1061
1136
|
}
|
|
@@ -1063,111 +1138,111 @@ const ht = "300px", ft = (i) => {
|
|
|
1063
1138
|
},
|
|
1064
1139
|
"selection"
|
|
1065
1140
|
),
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1141
|
+
f.map((e, r) => {
|
|
1142
|
+
const t = br ? Pr.get(e.key) : void 0, i = Ft.get(e.key), n = cr(
|
|
1068
1143
|
e.key,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
),
|
|
1072
|
-
return /* @__PURE__ */
|
|
1073
|
-
|
|
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,
|
|
1074
1149
|
{
|
|
1075
1150
|
sticky: e.sticky,
|
|
1076
1151
|
stickyOffset: e.stickyOffset,
|
|
1077
1152
|
id: e.key,
|
|
1078
1153
|
label: e.label,
|
|
1079
|
-
isRowHeader:
|
|
1154
|
+
isRowHeader: r === 0,
|
|
1080
1155
|
allowsSorting: e.allowsSorting,
|
|
1081
|
-
headerCellClass: `${e.headerCellClass} ${
|
|
1082
|
-
style:
|
|
1083
|
-
className:
|
|
1156
|
+
headerCellClass: `${e.headerCellClass} ${c}`,
|
|
1157
|
+
style: ft(e),
|
|
1158
|
+
className: x(
|
|
1084
1159
|
"overflow-hidden",
|
|
1085
1160
|
e.headClassName,
|
|
1086
|
-
|
|
1161
|
+
D
|
|
1087
1162
|
),
|
|
1088
|
-
headerAction:
|
|
1089
|
-
|
|
1163
|
+
headerAction: t && Pe ? /* @__PURE__ */ a(
|
|
1164
|
+
Gn,
|
|
1090
1165
|
{
|
|
1091
|
-
column:
|
|
1092
|
-
columnLabel:
|
|
1093
|
-
currentAlignment:
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
) : (
|
|
1097
|
-
capabilities:
|
|
1098
|
-
hideDisabled:
|
|
1099
|
-
onAction:
|
|
1100
|
-
renderExtraItems:
|
|
1166
|
+
column: t,
|
|
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,
|
|
1101
1176
|
showOnHeaderHover: !0
|
|
1102
1177
|
}
|
|
1103
1178
|
) : void 0,
|
|
1104
|
-
children: (
|
|
1179
|
+
children: (Xe == null ? void 0 : Xe(e.key)) ?? null
|
|
1105
1180
|
},
|
|
1106
1181
|
e.key
|
|
1107
1182
|
);
|
|
1108
1183
|
}),
|
|
1109
|
-
|
|
1110
|
-
|
|
1184
|
+
O && /* @__PURE__ */ a(
|
|
1185
|
+
m.Head,
|
|
1111
1186
|
{
|
|
1112
1187
|
label: "",
|
|
1113
1188
|
allowsSorting: !1,
|
|
1114
1189
|
isRowHeader: !1,
|
|
1115
1190
|
style: { minWidth: "56px", width: "56px" },
|
|
1116
|
-
className:
|
|
1191
|
+
className: x(D)
|
|
1117
1192
|
},
|
|
1118
1193
|
"actions"
|
|
1119
1194
|
)
|
|
1120
1195
|
]
|
|
1121
1196
|
}
|
|
1122
1197
|
),
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
!
|
|
1125
|
-
|
|
1126
|
-
|
|
1198
|
+
/* @__PURE__ */ E(m.Body, { children: [
|
|
1199
|
+
!Ut && zr(),
|
|
1200
|
+
Cr && /* @__PURE__ */ a(
|
|
1201
|
+
m.Row,
|
|
1127
1202
|
{
|
|
1128
1203
|
id: "empty-state",
|
|
1129
1204
|
highlightSelectedRow: !1,
|
|
1130
|
-
children: /* @__PURE__ */
|
|
1131
|
-
|
|
1205
|
+
children: /* @__PURE__ */ a(
|
|
1206
|
+
m.Cell,
|
|
1132
1207
|
{
|
|
1133
|
-
colSpan:
|
|
1134
|
-
className:
|
|
1208
|
+
colSpan: me,
|
|
1209
|
+
className: x(
|
|
1135
1210
|
"text-left text-placeholder_subtle border-b border-secondary py-3",
|
|
1136
|
-
|
|
1211
|
+
D
|
|
1137
1212
|
),
|
|
1138
|
-
children:
|
|
1213
|
+
children: Wt
|
|
1139
1214
|
}
|
|
1140
1215
|
)
|
|
1141
1216
|
},
|
|
1142
1217
|
"empty-state"
|
|
1143
1218
|
),
|
|
1144
|
-
|
|
1145
|
-
|
|
1219
|
+
ot && G && /* @__PURE__ */ E(
|
|
1220
|
+
m.Row,
|
|
1146
1221
|
{
|
|
1147
1222
|
id: "add-row-footer",
|
|
1148
1223
|
highlightSelectedRow: !1,
|
|
1149
1224
|
children: [
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
|
|
1225
|
+
/* @__PURE__ */ a(
|
|
1226
|
+
m.Cell,
|
|
1152
1227
|
{
|
|
1153
|
-
colSpan:
|
|
1154
|
-
className:
|
|
1155
|
-
children: /* @__PURE__ */
|
|
1156
|
-
|
|
1228
|
+
colSpan: me - (O ? 1 : 0),
|
|
1229
|
+
className: x(D),
|
|
1230
|
+
children: /* @__PURE__ */ a(
|
|
1231
|
+
Mn,
|
|
1157
1232
|
{
|
|
1158
1233
|
color: "tertiary",
|
|
1159
1234
|
className: "bg-secondary text-primary",
|
|
1160
1235
|
size: "xs",
|
|
1161
|
-
onClick:
|
|
1236
|
+
onClick: G.onAddRow,
|
|
1162
1237
|
children: "+ Add Row"
|
|
1163
1238
|
}
|
|
1164
1239
|
)
|
|
1165
1240
|
}
|
|
1166
1241
|
),
|
|
1167
|
-
|
|
1168
|
-
|
|
1242
|
+
O && /* @__PURE__ */ a(
|
|
1243
|
+
m.Cell,
|
|
1169
1244
|
{
|
|
1170
|
-
className:
|
|
1245
|
+
className: x("w-14", D),
|
|
1171
1246
|
style: { minWidth: "56px", width: "56px" }
|
|
1172
1247
|
}
|
|
1173
1248
|
)
|
|
@@ -1175,13 +1250,13 @@ const ht = "300px", ft = (i) => {
|
|
|
1175
1250
|
},
|
|
1176
1251
|
"add-row-footer"
|
|
1177
1252
|
),
|
|
1178
|
-
|
|
1179
|
-
|
|
1253
|
+
Or && Ke && /* @__PURE__ */ a(
|
|
1254
|
+
An,
|
|
1180
1255
|
{
|
|
1181
|
-
...
|
|
1182
|
-
hasActionsColumn:
|
|
1183
|
-
hasSelectionColumn:
|
|
1184
|
-
showBorders: !!
|
|
1256
|
+
...Ke,
|
|
1257
|
+
hasActionsColumn: O,
|
|
1258
|
+
hasSelectionColumn: U,
|
|
1259
|
+
showBorders: !!Ie
|
|
1185
1260
|
}
|
|
1186
1261
|
)
|
|
1187
1262
|
] })
|
|
@@ -1189,49 +1264,49 @@ const ht = "300px", ft = (i) => {
|
|
|
1189
1264
|
}
|
|
1190
1265
|
)
|
|
1191
1266
|
}
|
|
1192
|
-
),
|
|
1193
|
-
|
|
1267
|
+
), Kt = W ? /* @__PURE__ */ a(
|
|
1268
|
+
mn,
|
|
1194
1269
|
{
|
|
1195
|
-
rowIds:
|
|
1270
|
+
rowIds: v,
|
|
1196
1271
|
columnKeys: Y,
|
|
1197
|
-
containerRef:
|
|
1198
|
-
onSelectCell:
|
|
1199
|
-
onEditingCellChange:
|
|
1200
|
-
children:
|
|
1272
|
+
containerRef: g,
|
|
1273
|
+
onSelectCell: at,
|
|
1274
|
+
onEditingCellChange: _r,
|
|
1275
|
+
children: qt
|
|
1201
1276
|
}
|
|
1202
|
-
) :
|
|
1203
|
-
/* @__PURE__ */
|
|
1204
|
-
|
|
1205
|
-
|
|
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,
|
|
1206
1281
|
{
|
|
1207
|
-
y:
|
|
1208
|
-
left:
|
|
1209
|
-
width:
|
|
1282
|
+
y: p.dropLineY,
|
|
1283
|
+
left: p.dropLineLeft,
|
|
1284
|
+
width: p.dropLineWidth
|
|
1210
1285
|
}
|
|
1211
1286
|
)
|
|
1212
1287
|
] }) : null;
|
|
1213
|
-
return
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
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,
|
|
1218
1293
|
{
|
|
1219
|
-
currentPage:
|
|
1220
|
-
pageSize:
|
|
1221
|
-
totalPages:
|
|
1222
|
-
totalItems:
|
|
1223
|
-
onPageChange:
|
|
1224
|
-
onPageSizeChange:
|
|
1225
|
-
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
|
|
1226
1301
|
}
|
|
1227
1302
|
),
|
|
1228
|
-
|
|
1229
|
-
] }) : /* @__PURE__ */
|
|
1230
|
-
|
|
1231
|
-
|
|
1303
|
+
Ht
|
|
1304
|
+
] }) : /* @__PURE__ */ E(wt, { children: [
|
|
1305
|
+
Kt,
|
|
1306
|
+
Ht
|
|
1232
1307
|
] });
|
|
1233
1308
|
}
|
|
1234
1309
|
);
|
|
1235
1310
|
export {
|
|
1236
|
-
|
|
1311
|
+
ki as TableWrapper
|
|
1237
1312
|
};
|