@dmsi/wedgekit-react 3.0.0 → 3.0.2
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/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs.js +18 -14
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +355 -338
- package/dist/components/Link.d.ts +1 -2
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +23 -24
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,175 +1,175 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { useInfiniteScroll as
|
|
5
|
-
import { useTableLayout as
|
|
6
|
-
import { componentGap as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Checkbox as
|
|
9
|
-
import { DraggableCellHeader as
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { Menu as
|
|
13
|
-
import { MenuOption as
|
|
14
|
-
import { Paragraph as
|
|
15
|
-
import { Select as
|
|
16
|
-
import { Subheader as
|
|
17
|
-
import { useReactTable as
|
|
18
|
-
import { useSensors as
|
|
19
|
-
import { SortableContext as
|
|
20
|
-
import { restrictToHorizontalAxis as
|
|
21
|
-
import { Notification as
|
|
22
|
-
import { useVirtualizer as
|
|
2
|
+
import { jsx as n, jsxs as a, Fragment as Dt } from "react/jsx-runtime";
|
|
3
|
+
import Tt, { useImperativeHandle as Et, useState as g, useCallback as P, useEffect as Z, useRef as B, useId as Mt, useLayoutEffect as We } from "react";
|
|
4
|
+
import { useInfiniteScroll as Wt } from "../../hooks/useInfiniteScroll.js";
|
|
5
|
+
import { useTableLayout as jt } from "../../hooks/useTableLayout/useTableLayout.js";
|
|
6
|
+
import { componentGap as je, componentPadding as Fe } from "../../classNames.js";
|
|
7
|
+
import { Button as _e } from "../Button.js";
|
|
8
|
+
import { Checkbox as Ft } from "../Checkbox.js";
|
|
9
|
+
import { DraggableCellHeader as _t, DataGridCell as At } from "../DataGridCell.js";
|
|
10
|
+
import { Icon as Ae } from "../Icon.js";
|
|
11
|
+
import { Label as Gt } from "../Label.js";
|
|
12
|
+
import { Menu as Ot } from "../Menu.js";
|
|
13
|
+
import { MenuOption as Vt } from "../MenuOption.js";
|
|
14
|
+
import { Paragraph as y } from "../Paragraph.js";
|
|
15
|
+
import { Select as Ht } from "../Select.js";
|
|
16
|
+
import { Subheader as L } from "../Subheader.js";
|
|
17
|
+
import { useReactTable as qt, flexRender as Kt } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
18
|
+
import { useSensors as Zt, useSensor as fe, DndContext as Bt, closestCenter as Jt, KeyboardSensor as Qt, TouchSensor as Xt, MouseSensor as Yt } from "../../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
19
|
+
import { SortableContext as Ut, horizontalListSortingStrategy as eo, arrayMove as to } from "../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
20
|
+
import { restrictToHorizontalAxis as oo } from "../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
21
|
+
import { Notification as no } from "../Notification.js";
|
|
22
|
+
import { useVirtualizer as ro } from "../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
23
23
|
import { clsx as v } from "../../node_modules/clsx/dist/clsx.js";
|
|
24
|
-
import { PinnedColumns as
|
|
25
|
-
import { getSortIcon as
|
|
26
|
-
import { TableBody as
|
|
27
|
-
import { SummaryRow as
|
|
28
|
-
import { Spinner as
|
|
29
|
-
import { Tooltip as
|
|
30
|
-
import
|
|
31
|
-
import { getExpandedRowModel as
|
|
32
|
-
const
|
|
33
|
-
function
|
|
24
|
+
import { PinnedColumns as Ge } from "./PinnedColumns.js";
|
|
25
|
+
import { getSortIcon as Oe } from "./utils.js";
|
|
26
|
+
import { TableBody as lo } from "./TableBody/index.js";
|
|
27
|
+
import { SummaryRow as so } from "./SummaryRow/index.js";
|
|
28
|
+
import { Spinner as ge } from "../Spinner.js";
|
|
29
|
+
import { Tooltip as Ve } from "../Tooltip.js";
|
|
30
|
+
import He from "../../static/no-results-image.png.js";
|
|
31
|
+
import { getExpandedRowModel as io, getGroupedRowModel as co, getFilteredRowModel as ao, getSortedRowModel as mo, getCoreRowModel as uo } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
32
|
+
const fo = [5, 10, 15, 20, 25, 30, 35], qe = "h-[185px]";
|
|
33
|
+
function Ho({
|
|
34
34
|
id: s,
|
|
35
35
|
rowIdAccessor: b,
|
|
36
36
|
testid: l,
|
|
37
|
-
data:
|
|
38
|
-
columns:
|
|
39
|
-
status:
|
|
40
|
-
isLoadingMore:
|
|
41
|
-
onLoadMore:
|
|
37
|
+
data: D,
|
|
38
|
+
columns: Ke,
|
|
39
|
+
status: T,
|
|
40
|
+
isLoadingMore: E = !1,
|
|
41
|
+
onLoadMore: Ze,
|
|
42
42
|
pagination: r,
|
|
43
|
-
showFilterRow:
|
|
44
|
-
hasMore:
|
|
45
|
-
sorting:
|
|
46
|
-
onSortingChange:
|
|
47
|
-
columnFilters:
|
|
48
|
-
onColumnFiltersChange:
|
|
49
|
-
rowSelection:
|
|
50
|
-
onRowSelectionChange:
|
|
51
|
-
filteredSortedData:
|
|
52
|
-
totalRowCount:
|
|
53
|
-
hideStatusBar:
|
|
54
|
-
centerHeader:
|
|
55
|
-
enableColumnSelector:
|
|
56
|
-
predeterminedLeftPins:
|
|
57
|
-
predeterminedRightPins:
|
|
58
|
-
useMenuDefaultMinWidth:
|
|
59
|
-
rowDisabled:
|
|
60
|
-
rowDisabledAccessor:
|
|
43
|
+
showFilterRow: J = !1,
|
|
44
|
+
hasMore: Q = !1,
|
|
45
|
+
sorting: he,
|
|
46
|
+
onSortingChange: Be,
|
|
47
|
+
columnFilters: pe,
|
|
48
|
+
onColumnFiltersChange: Je,
|
|
49
|
+
rowSelection: X,
|
|
50
|
+
onRowSelectionChange: M,
|
|
51
|
+
filteredSortedData: Se,
|
|
52
|
+
totalRowCount: W,
|
|
53
|
+
hideStatusBar: Qe,
|
|
54
|
+
centerHeader: Xe,
|
|
55
|
+
enableColumnSelector: ve,
|
|
56
|
+
predeterminedLeftPins: Ye = [],
|
|
57
|
+
predeterminedRightPins: Ue = [],
|
|
58
|
+
useMenuDefaultMinWidth: et,
|
|
59
|
+
rowDisabled: tt,
|
|
60
|
+
rowDisabledAccessor: ot,
|
|
61
61
|
isLoading: h = !1,
|
|
62
|
-
loadingMessage:
|
|
63
|
-
loadingDescription:
|
|
64
|
-
maxHeight:
|
|
65
|
-
fillHeight:
|
|
66
|
-
manualFiltering:
|
|
67
|
-
notifications:
|
|
68
|
-
summaryRow:
|
|
69
|
-
groupBy:
|
|
70
|
-
groupRowMode:
|
|
71
|
-
groupDefaultExpand:
|
|
72
|
-
allowUserGrouping:
|
|
73
|
-
groupSelectionMode:
|
|
74
|
-
hideGroupedColumns:
|
|
75
|
-
grouping:
|
|
76
|
-
onGroupingChange:
|
|
77
|
-
expanded:
|
|
78
|
-
onExpandedChange:
|
|
79
|
-
ref:
|
|
62
|
+
loadingMessage: nt = "Loading Results",
|
|
63
|
+
loadingDescription: be,
|
|
64
|
+
maxHeight: j,
|
|
65
|
+
fillHeight: R = !1,
|
|
66
|
+
manualFiltering: Y = !1,
|
|
67
|
+
notifications: U,
|
|
68
|
+
summaryRow: we,
|
|
69
|
+
groupBy: F,
|
|
70
|
+
groupRowMode: ee = "spanning",
|
|
71
|
+
groupDefaultExpand: Ce = "none",
|
|
72
|
+
allowUserGrouping: te,
|
|
73
|
+
groupSelectionMode: oe = "row",
|
|
74
|
+
hideGroupedColumns: rt,
|
|
75
|
+
grouping: z,
|
|
76
|
+
onGroupingChange: lt,
|
|
77
|
+
expanded: _,
|
|
78
|
+
onExpandedChange: st,
|
|
79
|
+
ref: it
|
|
80
80
|
}) {
|
|
81
|
-
|
|
82
|
-
getSavedLayout: () =>
|
|
81
|
+
Et(it, () => ({
|
|
82
|
+
getSavedLayout: () => dt()
|
|
83
83
|
}));
|
|
84
|
-
const [xe,
|
|
85
|
-
columns:
|
|
86
|
-
setColumns:
|
|
87
|
-
getSavedLayout:
|
|
88
|
-
resetToDefaults:
|
|
89
|
-
} =
|
|
90
|
-
|
|
91
|
-
), [
|
|
84
|
+
const [xe, ye] = g([]), [Re, ze] = g([]), [ct, Ie] = g({}), [ne, re] = g(null), {
|
|
85
|
+
columns: w,
|
|
86
|
+
setColumns: le,
|
|
87
|
+
getSavedLayout: dt,
|
|
88
|
+
resetToDefaults: Ne
|
|
89
|
+
} = jt(Ke, s ?? l), [$e, se] = g(
|
|
90
|
+
w.map((e) => e.id)
|
|
91
|
+
), [Pe, at] = g(
|
|
92
92
|
Object.fromEntries(
|
|
93
|
-
|
|
93
|
+
w.filter((e) => !!e.id).map((e) => [e.id, e.meta?.visible ?? !0])
|
|
94
94
|
)
|
|
95
|
-
),
|
|
95
|
+
), Le = P(
|
|
96
96
|
(e) => {
|
|
97
|
-
|
|
97
|
+
at(
|
|
98
98
|
Object.fromEntries(
|
|
99
|
-
|
|
99
|
+
w.filter((o) => !!o.id).map((o) => [o.id, o.meta?.visible ?? !0])
|
|
100
100
|
)
|
|
101
|
-
), e &&
|
|
101
|
+
), e && se(w.map((o) => o.id));
|
|
102
102
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
const
|
|
103
|
+
[w]
|
|
104
|
+
), mt = P(() => {
|
|
105
|
+
Ne();
|
|
106
|
+
}, [Ne]);
|
|
107
|
+
Z(() => {
|
|
108
|
+
Le(!0);
|
|
109
|
+
}, [Le]);
|
|
110
|
+
const ut = r ? he ?? xe : xe, ft = r ? (e) => {
|
|
111
111
|
const o = typeof e == "function" ? e(
|
|
112
|
-
|
|
112
|
+
he ?? []
|
|
113
113
|
) : e;
|
|
114
|
-
(
|
|
115
|
-
} :
|
|
116
|
-
const o = typeof e == "function" ? e(
|
|
117
|
-
(
|
|
118
|
-
} :
|
|
119
|
-
|
|
120
|
-
const
|
|
114
|
+
(Be ?? ye)(o);
|
|
115
|
+
} : ye, ke = r != null || Y, gt = ke ? pe ?? Re : Re, ht = ke ? (e) => {
|
|
116
|
+
const o = typeof e == "function" ? e(pe ?? []) : e;
|
|
117
|
+
(Je ?? ze)(o);
|
|
118
|
+
} : ze, I = X ?? ct, N = B(I);
|
|
119
|
+
N.current = I;
|
|
120
|
+
const De = P(
|
|
121
121
|
(e) => {
|
|
122
122
|
if (r) {
|
|
123
|
-
const o = typeof e == "function" ? e(
|
|
124
|
-
|
|
125
|
-
} else if (
|
|
126
|
-
const o = typeof e == "function" ? e(
|
|
127
|
-
|
|
123
|
+
const o = typeof e == "function" ? e(N.current) : e;
|
|
124
|
+
N.current = o, (M ?? Ie)(o);
|
|
125
|
+
} else if (X && M) {
|
|
126
|
+
const o = typeof e == "function" ? e(N.current) : e;
|
|
127
|
+
N.current = o, M(o);
|
|
128
128
|
} else
|
|
129
|
-
|
|
129
|
+
Ie(e);
|
|
130
130
|
},
|
|
131
|
-
[
|
|
132
|
-
), [
|
|
133
|
-
|
|
131
|
+
[X, M, r]
|
|
132
|
+
), [pt, Te] = g(
|
|
133
|
+
F ?? []
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, [
|
|
138
|
-
const
|
|
135
|
+
Z(() => {
|
|
136
|
+
z === void 0 && F !== void 0 && Te(F);
|
|
137
|
+
}, [F, z]);
|
|
138
|
+
const ie = z ?? pt, St = z !== void 0 ? (e) => {
|
|
139
139
|
const o = typeof e == "function" ? e(
|
|
140
|
-
|
|
140
|
+
z
|
|
141
141
|
) : e;
|
|
142
|
-
|
|
143
|
-
} :
|
|
144
|
-
() =>
|
|
145
|
-
),
|
|
142
|
+
lt?.(o);
|
|
143
|
+
} : Te, [vt, Ee] = g(
|
|
144
|
+
() => Ce === "all" ? !0 : {}
|
|
145
|
+
), bt = _ ?? vt, wt = _ !== void 0 ? (e) => {
|
|
146
146
|
const o = typeof e == "function" ? e(
|
|
147
|
-
|
|
147
|
+
_
|
|
148
148
|
) : e;
|
|
149
|
-
|
|
150
|
-
} :
|
|
151
|
-
...
|
|
152
|
-
...Object.fromEntries(
|
|
153
|
-
} :
|
|
149
|
+
st?.(o);
|
|
150
|
+
} : Ee, Ct = rt ? {
|
|
151
|
+
...Pe,
|
|
152
|
+
...Object.fromEntries(ie.map((e) => [e, !1]))
|
|
153
|
+
} : Pe, xt = Mt(), f = B(null), Me = B(null), ce = B(null), yt = P(
|
|
154
154
|
(e, o) => {
|
|
155
|
-
|
|
156
|
-
...
|
|
155
|
+
le((t) => t.map((d) => d.id === e ? {
|
|
156
|
+
...d,
|
|
157
157
|
meta: {
|
|
158
|
-
...
|
|
158
|
+
...d.meta,
|
|
159
159
|
visible: o
|
|
160
160
|
}
|
|
161
|
-
} :
|
|
161
|
+
} : d));
|
|
162
162
|
},
|
|
163
|
-
[
|
|
164
|
-
), i =
|
|
165
|
-
columns:
|
|
166
|
-
data:
|
|
163
|
+
[le]
|
|
164
|
+
), i = qt({
|
|
165
|
+
columns: w,
|
|
166
|
+
data: D,
|
|
167
167
|
defaultColumn: { minSize: 50 },
|
|
168
|
-
getCoreRowModel:
|
|
169
|
-
getSortedRowModel:
|
|
170
|
-
getFilteredRowModel:
|
|
171
|
-
getGroupedRowModel:
|
|
172
|
-
getExpandedRowModel:
|
|
168
|
+
getCoreRowModel: uo(),
|
|
169
|
+
getSortedRowModel: mo(),
|
|
170
|
+
getFilteredRowModel: Y ? void 0 : ao(),
|
|
171
|
+
getGroupedRowModel: co(),
|
|
172
|
+
getExpandedRowModel: io(),
|
|
173
173
|
// Grouping only ever happens client-side in this grid — there is no
|
|
174
174
|
// server-side/manual grouping mode, unlike filtering.
|
|
175
175
|
groupedColumnMode: !1,
|
|
@@ -182,31 +182,31 @@ function Go({
|
|
|
182
182
|
// internal state update on every grouping change.
|
|
183
183
|
autoResetPageIndex: !1,
|
|
184
184
|
autoResetExpanded: !1,
|
|
185
|
-
manualFiltering:
|
|
185
|
+
manualFiltering: Y,
|
|
186
186
|
columnResizeMode: "onChange",
|
|
187
187
|
getRowId: b ? (e) => String(e[b]) : (e, o) => String(e.id ?? o + 1),
|
|
188
188
|
state: {
|
|
189
|
-
columnOrder:
|
|
190
|
-
sorting:
|
|
191
|
-
columnFilters:
|
|
192
|
-
rowSelection:
|
|
193
|
-
columnVisibility:
|
|
194
|
-
grouping:
|
|
195
|
-
expanded:
|
|
189
|
+
columnOrder: $e,
|
|
190
|
+
sorting: ut,
|
|
191
|
+
columnFilters: gt,
|
|
192
|
+
rowSelection: I,
|
|
193
|
+
columnVisibility: Ct,
|
|
194
|
+
grouping: ie,
|
|
195
|
+
expanded: bt
|
|
196
196
|
},
|
|
197
197
|
initialState: {
|
|
198
198
|
columnPinning: {
|
|
199
|
-
left:
|
|
200
|
-
right:
|
|
199
|
+
left: Ye,
|
|
200
|
+
right: Ue
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
enableColumnPinning: !0,
|
|
204
|
-
onColumnOrderChange:
|
|
205
|
-
onSortingChange:
|
|
206
|
-
onColumnFiltersChange:
|
|
207
|
-
onRowSelectionChange:
|
|
208
|
-
onGroupingChange:
|
|
209
|
-
onExpandedChange:
|
|
204
|
+
onColumnOrderChange: se,
|
|
205
|
+
onSortingChange: k(ft),
|
|
206
|
+
onColumnFiltersChange: k(ht),
|
|
207
|
+
onRowSelectionChange: k(De),
|
|
208
|
+
onGroupingChange: k(St),
|
|
209
|
+
onExpandedChange: k(wt),
|
|
210
210
|
filterFns: {
|
|
211
211
|
startsWith: (e, o, t) => {
|
|
212
212
|
const c = e?.getValue(o);
|
|
@@ -218,160 +218,177 @@ function Go({
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
|
|
222
|
-
if (
|
|
221
|
+
Z(() => {
|
|
222
|
+
if (Ce !== "first" || _ !== void 0)
|
|
223
223
|
return;
|
|
224
224
|
const e = {};
|
|
225
225
|
let o = i.getGroupedRowModel().rows.find((t) => t.depth === 0 && t.getIsGrouped());
|
|
226
226
|
for (; o; )
|
|
227
227
|
e[o.id] = !0, o = o.subRows.find((t) => t.getIsGrouped());
|
|
228
|
-
Object.keys(e).length > 0 &&
|
|
229
|
-
}, [
|
|
230
|
-
const
|
|
231
|
-
{ length:
|
|
228
|
+
Object.keys(e).length > 0 && Ee(e);
|
|
229
|
+
}, [ie]);
|
|
230
|
+
const A = r ? Se?.map((e) => String(e.id)) ?? [] : Array.from(
|
|
231
|
+
{ length: W ?? D.length },
|
|
232
232
|
(e, o) => String(o + 1)
|
|
233
|
-
),
|
|
234
|
-
(e) =>
|
|
235
|
-
),
|
|
236
|
-
|
|
237
|
-
if (!
|
|
233
|
+
), de = A.every(
|
|
234
|
+
(e) => I[e]
|
|
235
|
+
), Rt = !de && A.some((e) => I[e]), zt = () => {
|
|
236
|
+
De((e) => {
|
|
237
|
+
if (!de) {
|
|
238
238
|
const t = {};
|
|
239
|
-
for (const c of
|
|
239
|
+
for (const c of A)
|
|
240
240
|
t[c] = !0;
|
|
241
241
|
return { ...e, ...t };
|
|
242
242
|
} else {
|
|
243
243
|
const t = { ...e };
|
|
244
|
-
for (const c of
|
|
244
|
+
for (const c of A)
|
|
245
245
|
delete t[c];
|
|
246
246
|
return t;
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
|
-
|
|
250
|
+
Wt({
|
|
251
251
|
containerRef: f,
|
|
252
|
-
onLoadMore:
|
|
252
|
+
onLoadMore: Ze ?? (() => {
|
|
253
253
|
}),
|
|
254
|
-
isLoading:
|
|
254
|
+
isLoading: E,
|
|
255
255
|
enabled: !r
|
|
256
256
|
});
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
if (!f.current || Ee.current === le) return;
|
|
257
|
+
const G = i.getCenterVisibleLeafColumns().map((e) => e.id).join(","), O = P(() => {
|
|
258
|
+
if (!f.current) return null;
|
|
260
259
|
const e = f.current.offsetWidth;
|
|
261
|
-
if (e === 0) return;
|
|
262
|
-
const o = i.getLeftLeafColumns().reduce((u, S) => u + S.getSize(), 0), t = i.getRightLeafColumns().reduce((u, S) => u + S.getSize(), 0), c = e - o - t,
|
|
263
|
-
if (
|
|
264
|
-
const m =
|
|
260
|
+
if (e === 0) return null;
|
|
261
|
+
const o = i.getLeftLeafColumns().reduce((u, S) => u + S.getSize(), 0), t = i.getRightLeafColumns().reduce((u, S) => u + S.getSize(), 0), c = e - o - t, d = i.getCenterVisibleLeafColumns();
|
|
262
|
+
if (d.length === 0) return null;
|
|
263
|
+
const m = d.reduce(
|
|
265
264
|
(u, S) => u + S.getSize(),
|
|
266
265
|
0
|
|
267
|
-
),
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}), i.setColumnSizing((u) => ({ ...u, ...
|
|
271
|
-
}, [
|
|
272
|
-
|
|
266
|
+
), q = m > 0 ? c / m : 1, K = {};
|
|
267
|
+
return d.forEach((u) => {
|
|
268
|
+
K[u.id] = Math.max(Math.floor(u.getSize() * q), 50);
|
|
269
|
+
}), i.setColumnSizing((u) => ({ ...u, ...K })), e;
|
|
270
|
+
}, [i]);
|
|
271
|
+
We(() => {
|
|
272
|
+
if (!f.current || Me.current === G) return;
|
|
273
|
+
const e = O();
|
|
274
|
+
e !== null && (Me.current = G, ce.current = e);
|
|
275
|
+
}, [G, O]), Z(() => {
|
|
276
|
+
const e = f.current;
|
|
277
|
+
if (!e) return;
|
|
278
|
+
const o = new ResizeObserver(() => {
|
|
279
|
+
if (e.offsetWidth === ce.current) return;
|
|
280
|
+
const t = O();
|
|
281
|
+
t !== null && (ce.current = t);
|
|
282
|
+
});
|
|
283
|
+
return o.observe(e), () => o.disconnect();
|
|
284
|
+
}, [O]);
|
|
285
|
+
const It = (e) => {
|
|
273
286
|
const { active: o, over: t } = e;
|
|
274
|
-
o && t && o.id !== t.id &&
|
|
275
|
-
const
|
|
276
|
-
return
|
|
287
|
+
o && t && o.id !== t.id && se((c) => {
|
|
288
|
+
const d = c.indexOf(o.id), m = c.indexOf(t.id), q = to(c, d, m);
|
|
289
|
+
return le((K) => q.map((S) => K.find((kt) => kt.id === S)).filter(Boolean)), q;
|
|
277
290
|
});
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
),
|
|
283
|
-
(e) =>
|
|
284
|
-
),
|
|
285
|
-
count:
|
|
286
|
-
estimateSize: (e) =>
|
|
291
|
+
}, Nt = Zt(
|
|
292
|
+
fe(Yt),
|
|
293
|
+
fe(Xt),
|
|
294
|
+
fe(Qt)
|
|
295
|
+
), ae = i.getCenterVisibleLeafColumns(), $t = ae.map((e) => e.id), Pt = $e.filter(
|
|
296
|
+
(e) => $t.includes(e)
|
|
297
|
+
), C = ro({
|
|
298
|
+
count: ae.length,
|
|
299
|
+
estimateSize: (e) => ae[e].getSize(),
|
|
287
300
|
getScrollElement: () => f.current,
|
|
288
301
|
horizontal: !0,
|
|
289
302
|
overscan: 8
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
303
|
+
}), Lt = i.getState().columnSizing;
|
|
304
|
+
We(() => {
|
|
305
|
+
C.measure();
|
|
306
|
+
}, [C, Lt, G]);
|
|
307
|
+
const p = C.getVirtualItems();
|
|
308
|
+
let V, $;
|
|
309
|
+
C && p?.length && (V = p[0]?.start ?? 0, $ = C.getTotalSize() - (p[p.length - 1]?.end ?? 0));
|
|
310
|
+
const H = i.getRowModel().rows.length === 0, x = we && !H ? we : void 0, me = x ? i.getFilteredRowModel().rows.map((e) => e.original) : [], ue = x ? r ? Se ?? D : D : [];
|
|
294
311
|
return /* @__PURE__ */ n(
|
|
295
|
-
|
|
312
|
+
Bt,
|
|
296
313
|
{
|
|
297
|
-
id:
|
|
298
|
-
collisionDetection:
|
|
299
|
-
modifiers: [
|
|
300
|
-
onDragEnd:
|
|
301
|
-
sensors:
|
|
314
|
+
id: xt,
|
|
315
|
+
collisionDetection: Jt,
|
|
316
|
+
modifiers: [oo],
|
|
317
|
+
onDragEnd: It,
|
|
318
|
+
sensors: Nt,
|
|
302
319
|
children: /* @__PURE__ */ n(
|
|
303
|
-
|
|
320
|
+
Ut,
|
|
304
321
|
{
|
|
305
|
-
items:
|
|
306
|
-
strategy:
|
|
307
|
-
children: /* @__PURE__ */
|
|
322
|
+
items: Pt,
|
|
323
|
+
strategy: eo,
|
|
324
|
+
children: /* @__PURE__ */ a(
|
|
308
325
|
"div",
|
|
309
326
|
{
|
|
310
327
|
className: v(
|
|
311
328
|
"flex flex-col gap-2 w-full",
|
|
312
|
-
|
|
329
|
+
R ? "grow min-h-0" : "grow-0 h-fit"
|
|
313
330
|
),
|
|
314
331
|
children: [
|
|
315
|
-
|
|
316
|
-
/* @__PURE__ */
|
|
332
|
+
U && U.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 shrink-0 [color:initial]", children: U.map((e, o) => /* @__PURE__ */ n(no, { ...e }, e.id ?? o)) }),
|
|
333
|
+
/* @__PURE__ */ a(
|
|
317
334
|
"div",
|
|
318
335
|
{
|
|
319
336
|
id: s,
|
|
320
337
|
"data-testid": l,
|
|
321
338
|
className: v(
|
|
322
339
|
"flex flex-col rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
323
|
-
|
|
340
|
+
R ? "flex-1 min-h-0" : "grow-0 h-fit"
|
|
324
341
|
),
|
|
325
342
|
children: [
|
|
326
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ a(
|
|
327
344
|
"div",
|
|
328
345
|
{
|
|
329
346
|
className: v(
|
|
330
347
|
"flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
|
|
331
|
-
|
|
332
|
-
|
|
348
|
+
H ? "overflow-y-hidden" : !R && "min-h-[120px]",
|
|
349
|
+
R && "flex-1 min-h-0"
|
|
333
350
|
),
|
|
334
|
-
style:
|
|
351
|
+
style: j !== void 0 ? { maxHeight: typeof j == "number" ? `${j}px` : j } : void 0,
|
|
335
352
|
ref: f,
|
|
336
353
|
inert: h || void 0,
|
|
337
354
|
"aria-busy": h || void 0,
|
|
338
355
|
children: [
|
|
339
356
|
/* @__PURE__ */ n(
|
|
340
|
-
|
|
357
|
+
Ge,
|
|
341
358
|
{
|
|
342
359
|
testid: l,
|
|
343
360
|
pinDirection: "left",
|
|
344
361
|
table: i,
|
|
345
362
|
tableContainerRef: f,
|
|
346
363
|
pagination: r,
|
|
347
|
-
isLoadingMore:
|
|
348
|
-
hasMore:
|
|
349
|
-
showFilterRow:
|
|
350
|
-
groupRowMode:
|
|
351
|
-
groupSelectionMode:
|
|
352
|
-
allowUserGrouping:
|
|
353
|
-
hoveredRowId:
|
|
354
|
-
setHoveredRowId:
|
|
355
|
-
summaryRow:
|
|
356
|
-
filteredRows:
|
|
357
|
-
allRows:
|
|
358
|
-
totalRowCount:
|
|
364
|
+
isLoadingMore: E,
|
|
365
|
+
hasMore: Q,
|
|
366
|
+
showFilterRow: J,
|
|
367
|
+
groupRowMode: ee,
|
|
368
|
+
groupSelectionMode: oe,
|
|
369
|
+
allowUserGrouping: te,
|
|
370
|
+
hoveredRowId: ne,
|
|
371
|
+
setHoveredRowId: re,
|
|
372
|
+
summaryRow: x,
|
|
373
|
+
filteredRows: me,
|
|
374
|
+
allRows: ue,
|
|
375
|
+
totalRowCount: W
|
|
359
376
|
}
|
|
360
377
|
),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */ n("thead", { className: "sticky top-0 z-10 grid", children: i.getCenterHeaderGroups().map((e) => /* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ a("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
379
|
+
/* @__PURE__ */ n("thead", { className: "sticky top-0 z-10 grid", children: i.getCenterHeaderGroups().map((e) => /* @__PURE__ */ a(
|
|
363
380
|
"tr",
|
|
364
381
|
{
|
|
365
382
|
"data-testid": l ? `${l}-header-row-${e.id}` : void 0,
|
|
366
383
|
className: "flex w-full bg-background-primary-normal",
|
|
367
384
|
"data-theme": "brand",
|
|
368
385
|
children: [
|
|
369
|
-
|
|
386
|
+
V ? (
|
|
370
387
|
// fake empty column to the left for virtualization scroll padding
|
|
371
388
|
/* @__PURE__ */ n(
|
|
372
389
|
"th",
|
|
373
390
|
{
|
|
374
|
-
style: { display: "flex", width:
|
|
391
|
+
style: { display: "flex", width: V }
|
|
375
392
|
}
|
|
376
393
|
)
|
|
377
394
|
) : null,
|
|
@@ -379,50 +396,50 @@ function Go({
|
|
|
379
396
|
const t = e.headers[o.index];
|
|
380
397
|
if (t) {
|
|
381
398
|
if (typeof t.column.columnDef.header == "string") {
|
|
382
|
-
const c = i.getRowModel().rows[0]?.getValue(t.column.id),
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
|
|
399
|
+
const c = i.getRowModel().rows[0]?.getValue(t.column.id), d = t.column.columnDef.meta?.align ?? (typeof c == "number" ? "right" : "left");
|
|
400
|
+
return /* @__PURE__ */ a(
|
|
401
|
+
_t,
|
|
385
402
|
{
|
|
386
403
|
width: `${t.column.getSize()}px`,
|
|
387
404
|
id: s ? `${s}-header-${t.id}` : void 0,
|
|
388
405
|
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
389
406
|
header: t,
|
|
390
407
|
locked: t.column.columnDef.meta?.locked,
|
|
391
|
-
center:
|
|
392
|
-
allowUserGrouping:
|
|
393
|
-
isLast:
|
|
408
|
+
center: Xe,
|
|
409
|
+
allowUserGrouping: te,
|
|
410
|
+
isLast: !$ && o.index === p[p.length - 1]?.index,
|
|
394
411
|
className: v(
|
|
395
412
|
t.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
396
413
|
"group",
|
|
397
414
|
{
|
|
398
|
-
"justify-start":
|
|
399
|
-
"justify-end":
|
|
415
|
+
"justify-start": d === "left",
|
|
416
|
+
"justify-end": d === "right"
|
|
400
417
|
}
|
|
401
418
|
),
|
|
402
|
-
useMenuDefaultMinWidth:
|
|
419
|
+
useMenuDefaultMinWidth: et,
|
|
403
420
|
children: [
|
|
404
|
-
|
|
405
|
-
|
|
421
|
+
d === "left" && /* @__PURE__ */ n(
|
|
422
|
+
Ve,
|
|
406
423
|
{
|
|
407
424
|
showOnTruncation: !0,
|
|
408
425
|
message: t.column.columnDef.header,
|
|
409
426
|
position: "bottom",
|
|
410
|
-
children: /* @__PURE__ */ n(
|
|
427
|
+
children: /* @__PURE__ */ n(L, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
411
428
|
}
|
|
412
429
|
),
|
|
413
|
-
|
|
414
|
-
!t.column.getIsSorted() && t.column.getCanSort() && !i.getState().columnSizingInfo.isResizingColumn &&
|
|
430
|
+
Oe(t.column.getIsSorted()),
|
|
431
|
+
!t.column.getIsSorted() && t.column.getCanSort() && !i.getState().columnSizingInfo.isResizingColumn && Oe(
|
|
415
432
|
t.column.getNextSortingOrder(),
|
|
416
433
|
!0
|
|
417
434
|
),
|
|
418
|
-
t.column.getSortIndex() !== -1 && i.getState().sorting.length > 1 && /* @__PURE__ */ n(
|
|
419
|
-
|
|
420
|
-
|
|
435
|
+
t.column.getSortIndex() !== -1 && i.getState().sorting.length > 1 && /* @__PURE__ */ n(L, { tall: !0, children: t.column.getSortIndex() + 1 }),
|
|
436
|
+
d === "right" && /* @__PURE__ */ n(
|
|
437
|
+
Ve,
|
|
421
438
|
{
|
|
422
439
|
showOnTruncation: !0,
|
|
423
440
|
message: t.column.columnDef.header,
|
|
424
441
|
position: "bottom",
|
|
425
|
-
children: /* @__PURE__ */ n(
|
|
442
|
+
children: /* @__PURE__ */ n(L, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
426
443
|
}
|
|
427
444
|
),
|
|
428
445
|
/* @__PURE__ */ n(
|
|
@@ -446,36 +463,36 @@ function Go({
|
|
|
446
463
|
t.id
|
|
447
464
|
);
|
|
448
465
|
}
|
|
449
|
-
return /* @__PURE__ */ n(
|
|
450
|
-
|
|
466
|
+
return /* @__PURE__ */ n(Tt.Fragment, { children: t.column.columnDef.meta?.checkbox ? /* @__PURE__ */ n(
|
|
467
|
+
At,
|
|
451
468
|
{
|
|
452
469
|
id: s ? `${s}-header-${t.id}` : void 0,
|
|
453
470
|
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
454
471
|
type: "header",
|
|
455
472
|
component: "checkbox",
|
|
456
473
|
children: /* @__PURE__ */ n(
|
|
457
|
-
|
|
474
|
+
Ft,
|
|
458
475
|
{
|
|
459
476
|
id: s ? `${s}-select-all-checkbox` : void 0,
|
|
460
477
|
testid: l ? `${l}-select-all-checkbox` : void 0,
|
|
461
|
-
checked:
|
|
462
|
-
indeterminate:
|
|
463
|
-
onChange:
|
|
478
|
+
checked: de,
|
|
479
|
+
indeterminate: Rt,
|
|
480
|
+
onChange: zt
|
|
464
481
|
}
|
|
465
482
|
)
|
|
466
483
|
}
|
|
467
|
-
) :
|
|
484
|
+
) : Kt(
|
|
468
485
|
t.column.columnDef.header,
|
|
469
486
|
t.getContext()
|
|
470
487
|
) }, t.id);
|
|
471
488
|
}
|
|
472
489
|
}),
|
|
473
|
-
|
|
490
|
+
$ ? (
|
|
474
491
|
//fake empty column to the right for virtualization scroll padding
|
|
475
492
|
/* @__PURE__ */ n(
|
|
476
493
|
"th",
|
|
477
494
|
{
|
|
478
|
-
style: { display: "flex", width:
|
|
495
|
+
style: { display: "flex", width: $ }
|
|
479
496
|
}
|
|
480
497
|
)
|
|
481
498
|
) : null
|
|
@@ -484,121 +501,121 @@ function Go({
|
|
|
484
501
|
e.id
|
|
485
502
|
)) }),
|
|
486
503
|
/* @__PURE__ */ n(
|
|
487
|
-
|
|
504
|
+
lo,
|
|
488
505
|
{
|
|
489
506
|
id: s,
|
|
490
507
|
testid: l,
|
|
491
|
-
columnVirtualizer:
|
|
508
|
+
columnVirtualizer: C,
|
|
492
509
|
table: i,
|
|
493
510
|
tableContainerRef: f,
|
|
494
|
-
virtualPaddingLeft:
|
|
495
|
-
virtualPaddingRight:
|
|
511
|
+
virtualPaddingLeft: V,
|
|
512
|
+
virtualPaddingRight: $,
|
|
496
513
|
pagination: r,
|
|
497
|
-
isLoadingMore:
|
|
498
|
-
hasMore:
|
|
499
|
-
showFilterRow:
|
|
500
|
-
enableColumnSelector:
|
|
501
|
-
groupRowMode:
|
|
502
|
-
groupSelectionMode:
|
|
503
|
-
rowDisabled:
|
|
504
|
-
rowDisabledAccessor:
|
|
505
|
-
hoveredRowId:
|
|
506
|
-
setHoveredRowId:
|
|
514
|
+
isLoadingMore: E,
|
|
515
|
+
hasMore: Q,
|
|
516
|
+
showFilterRow: J,
|
|
517
|
+
enableColumnSelector: ve,
|
|
518
|
+
groupRowMode: ee,
|
|
519
|
+
groupSelectionMode: oe,
|
|
520
|
+
rowDisabled: tt,
|
|
521
|
+
rowDisabledAccessor: ot,
|
|
522
|
+
hoveredRowId: ne,
|
|
523
|
+
setHoveredRowId: re
|
|
507
524
|
}
|
|
508
525
|
),
|
|
509
|
-
|
|
510
|
-
|
|
526
|
+
x && /* @__PURE__ */ n(
|
|
527
|
+
so,
|
|
511
528
|
{
|
|
512
529
|
id: s,
|
|
513
530
|
testid: l,
|
|
514
531
|
table: i,
|
|
515
|
-
summaryConfig:
|
|
516
|
-
filteredRows:
|
|
517
|
-
allRows:
|
|
518
|
-
totalRowCount:
|
|
532
|
+
summaryConfig: x,
|
|
533
|
+
filteredRows: me,
|
|
534
|
+
allRows: ue,
|
|
535
|
+
totalRowCount: W,
|
|
519
536
|
locked: !1
|
|
520
537
|
}
|
|
521
538
|
)
|
|
522
539
|
] }),
|
|
523
540
|
/* @__PURE__ */ n(
|
|
524
|
-
|
|
541
|
+
Ge,
|
|
525
542
|
{
|
|
526
543
|
id: s,
|
|
527
|
-
enableColumnSelector:
|
|
528
|
-
toggleColumnVisibility:
|
|
529
|
-
resetColumnVisibility:
|
|
544
|
+
enableColumnSelector: ve,
|
|
545
|
+
toggleColumnVisibility: yt,
|
|
546
|
+
resetColumnVisibility: mt,
|
|
530
547
|
testid: l,
|
|
531
548
|
pinDirection: "right",
|
|
532
549
|
table: i,
|
|
533
550
|
tableContainerRef: f,
|
|
534
551
|
pagination: r,
|
|
535
|
-
isLoadingMore:
|
|
536
|
-
hasMore:
|
|
537
|
-
showFilterRow:
|
|
538
|
-
groupRowMode:
|
|
539
|
-
groupSelectionMode:
|
|
540
|
-
allowUserGrouping:
|
|
541
|
-
hoveredRowId:
|
|
542
|
-
setHoveredRowId:
|
|
543
|
-
summaryRow:
|
|
544
|
-
filteredRows:
|
|
545
|
-
allRows:
|
|
546
|
-
totalRowCount:
|
|
552
|
+
isLoadingMore: E,
|
|
553
|
+
hasMore: Q,
|
|
554
|
+
showFilterRow: J,
|
|
555
|
+
groupRowMode: ee,
|
|
556
|
+
groupSelectionMode: oe,
|
|
557
|
+
allowUserGrouping: te,
|
|
558
|
+
hoveredRowId: ne,
|
|
559
|
+
setHoveredRowId: re,
|
|
560
|
+
summaryRow: x,
|
|
561
|
+
filteredRows: me,
|
|
562
|
+
allRows: ue,
|
|
563
|
+
totalRowCount: W
|
|
547
564
|
}
|
|
548
565
|
)
|
|
549
566
|
]
|
|
550
567
|
}
|
|
551
568
|
),
|
|
552
|
-
h &&
|
|
569
|
+
h && H && /* @__PURE__ */ a(
|
|
553
570
|
"div",
|
|
554
571
|
{
|
|
555
572
|
className: v(
|
|
556
|
-
|
|
573
|
+
qe,
|
|
557
574
|
"flex flex-col items-center justify-center",
|
|
558
|
-
|
|
559
|
-
|
|
575
|
+
je,
|
|
576
|
+
Fe
|
|
560
577
|
),
|
|
561
578
|
children: [
|
|
562
|
-
/* @__PURE__ */ n(
|
|
563
|
-
/* @__PURE__ */ n(
|
|
564
|
-
|
|
579
|
+
/* @__PURE__ */ n(ge, { size: "large" }),
|
|
580
|
+
/* @__PURE__ */ n(L, { color: "text-secondary-normal", children: nt }),
|
|
581
|
+
be && /* @__PURE__ */ n(y, { color: "text-secondary-normal", children: be })
|
|
565
582
|
]
|
|
566
583
|
}
|
|
567
584
|
),
|
|
568
|
-
!h &&
|
|
585
|
+
!h && H && /* @__PURE__ */ a(
|
|
569
586
|
"div",
|
|
570
587
|
{
|
|
571
588
|
className: v(
|
|
572
|
-
|
|
589
|
+
qe,
|
|
573
590
|
"flex flex-col items-center justify-center",
|
|
574
|
-
|
|
575
|
-
|
|
591
|
+
je,
|
|
592
|
+
Fe
|
|
576
593
|
),
|
|
577
594
|
"data-testid": l ? `${l}-no-results` : void 0,
|
|
578
595
|
children: [
|
|
579
596
|
/* @__PURE__ */ n(
|
|
580
597
|
"img",
|
|
581
598
|
{
|
|
582
|
-
src:
|
|
599
|
+
src: He?.src ?? He,
|
|
583
600
|
alt: "No Results",
|
|
584
601
|
className: "h-30 opacity-20",
|
|
585
602
|
width: 120,
|
|
586
603
|
height: 120
|
|
587
604
|
}
|
|
588
605
|
),
|
|
589
|
-
/* @__PURE__ */ n(
|
|
590
|
-
/* @__PURE__ */ n(
|
|
606
|
+
/* @__PURE__ */ n(L, { color: "text-secondary-normal", children: "No Results" }),
|
|
607
|
+
/* @__PURE__ */ n(y, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
591
608
|
]
|
|
592
609
|
}
|
|
593
610
|
),
|
|
594
|
-
!
|
|
595
|
-
r && /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children: h ? /* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */ n(
|
|
598
|
-
/* @__PURE__ */ n(
|
|
599
|
-
] }) : /* @__PURE__ */
|
|
611
|
+
!Qe && /* @__PURE__ */ a("div", { className: v("p-2 pt-[7px] border-t border-border-primary-normal min-h-[34px]", !R && "h-full"), children: [
|
|
612
|
+
r && /* @__PURE__ */ a("div", { className: "flex justify-between items-center", children: [
|
|
613
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children: h ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [
|
|
614
|
+
/* @__PURE__ */ n(ge, { size: "small" }),
|
|
615
|
+
/* @__PURE__ */ n(y, { children: T || "Loading..." })
|
|
616
|
+
] }) : /* @__PURE__ */ a(Dt, { children: [
|
|
600
617
|
/* @__PURE__ */ n(
|
|
601
|
-
|
|
618
|
+
Ht,
|
|
602
619
|
{
|
|
603
620
|
id: s ? `${s}-pagesize-select` : void 0,
|
|
604
621
|
testid: l ? `${l}-pagesize-select` : void 0,
|
|
@@ -606,13 +623,13 @@ function Go({
|
|
|
606
623
|
value: r.pageSize.toString(),
|
|
607
624
|
onChange: (e) => r.onPageSizeChange?.(Number(e.target.value)),
|
|
608
625
|
renderMenu: (e) => /* @__PURE__ */ n(
|
|
609
|
-
|
|
626
|
+
Ot,
|
|
610
627
|
{
|
|
611
628
|
...e,
|
|
612
629
|
id: s ? `${s}-pagesize-menu` : void 0,
|
|
613
630
|
testid: l ? `${l}-pagesize-menu` : void 0,
|
|
614
|
-
children:
|
|
615
|
-
|
|
631
|
+
children: fo.map((o) => /* @__PURE__ */ n(
|
|
632
|
+
Vt,
|
|
616
633
|
{
|
|
617
634
|
id: s ? `${s}-pagesize-option-${o}` : void 0,
|
|
618
635
|
selected: r.pageSize === o,
|
|
@@ -625,22 +642,22 @@ function Go({
|
|
|
625
642
|
)
|
|
626
643
|
}
|
|
627
644
|
),
|
|
628
|
-
/* @__PURE__ */ n(
|
|
645
|
+
/* @__PURE__ */ n(Gt, { children: "Per Page" })
|
|
629
646
|
] }) }),
|
|
630
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
631
648
|
/* @__PURE__ */ n(
|
|
632
|
-
|
|
649
|
+
_e,
|
|
633
650
|
{
|
|
634
651
|
id: s ? `${s}-prev-page-button` : void 0,
|
|
635
652
|
testid: l ? `${l}-prev-page-button` : void 0,
|
|
636
653
|
iconOnly: !0,
|
|
637
|
-
leftIcon: /* @__PURE__ */ n(
|
|
654
|
+
leftIcon: /* @__PURE__ */ n(Ae, { name: "chevron_left" }),
|
|
638
655
|
onClick: () => r.onPageChange(r.pageIndex - 1),
|
|
639
656
|
variant: "tertiary",
|
|
640
657
|
disabled: r.pageIndex === 0
|
|
641
658
|
}
|
|
642
659
|
),
|
|
643
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ a(y, { children: [
|
|
644
661
|
r.pageIndex * r.pageSize + 1,
|
|
645
662
|
" -",
|
|
646
663
|
" ",
|
|
@@ -653,12 +670,12 @@ function Go({
|
|
|
653
670
|
r.total
|
|
654
671
|
] }),
|
|
655
672
|
/* @__PURE__ */ n(
|
|
656
|
-
|
|
673
|
+
_e,
|
|
657
674
|
{
|
|
658
675
|
id: s ? `${s}-next-page-button` : void 0,
|
|
659
676
|
testid: l ? `${l}-next-page-button` : void 0,
|
|
660
677
|
iconOnly: !0,
|
|
661
|
-
leftIcon: /* @__PURE__ */ n(
|
|
678
|
+
leftIcon: /* @__PURE__ */ n(Ae, { name: "chevron_right" }),
|
|
662
679
|
onClick: () => r.onPageChange(r.pageIndex + 1),
|
|
663
680
|
variant: "tertiary",
|
|
664
681
|
disabled: (r.pageIndex + 1) * r.pageSize >= r.total
|
|
@@ -666,15 +683,15 @@ function Go({
|
|
|
666
683
|
)
|
|
667
684
|
] })
|
|
668
685
|
] }),
|
|
669
|
-
!r && h && /* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */ n(
|
|
671
|
-
/* @__PURE__ */ n(
|
|
686
|
+
!r && h && /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
687
|
+
/* @__PURE__ */ n(ge, { size: "small" }),
|
|
688
|
+
/* @__PURE__ */ n(y, { testid: l ? `${l}-status-text` : void 0, children: T || "Loading..." })
|
|
672
689
|
] }),
|
|
673
|
-
!r && !h &&
|
|
674
|
-
|
|
690
|
+
!r && !h && T && /* @__PURE__ */ n(
|
|
691
|
+
y,
|
|
675
692
|
{
|
|
676
693
|
testid: l ? `${l}-status-text` : void 0,
|
|
677
|
-
children:
|
|
694
|
+
children: T
|
|
678
695
|
}
|
|
679
696
|
)
|
|
680
697
|
] })
|
|
@@ -689,7 +706,7 @@ function Go({
|
|
|
689
706
|
}
|
|
690
707
|
);
|
|
691
708
|
}
|
|
692
|
-
function
|
|
709
|
+
function k(s) {
|
|
693
710
|
return (b) => {
|
|
694
711
|
s(
|
|
695
712
|
(l) => typeof b == "function" ? b(l) : b
|
|
@@ -697,5 +714,5 @@ function P(s) {
|
|
|
697
714
|
};
|
|
698
715
|
}
|
|
699
716
|
export {
|
|
700
|
-
|
|
717
|
+
Ho as DataGrid
|
|
701
718
|
};
|