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