@overdoser/react-toolkit 0.20.0 → 0.22.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/AGENTS.md +2 -1
- package/CHANGELOG.md +41 -0
- package/components/Accordion/Accordion.js +160 -177
- package/components/Accordion/Accordion.module.scss.js +19 -35
- package/components/ActionButton/ActionButton.js +155 -209
- package/components/ActionButton/ActionButton.module.scss.js +24 -46
- package/components/ActionButton/CopyButton.js +52 -64
- package/components/Alert/Alert.js +93 -96
- package/components/Alert/Alert.module.scss.js +17 -32
- package/components/Avatar/Avatar.js +44 -55
- package/components/Avatar/Avatar.module.scss.js +22 -42
- package/components/Badge/Badge.js +15 -37
- package/components/Badge/Badge.module.scss.js +16 -30
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Breadcrumbs/Breadcrumbs.js +52 -48
- package/components/Breadcrumbs/Breadcrumbs.module.scss.js +9 -16
- package/components/Button/Button.js +35 -57
- package/components/Button/Button.module.scss.js +24 -46
- package/components/Card/Card.js +94 -131
- package/components/Card/Card.module.scss.js +34 -59
- package/components/Chart/AreaChart.d.ts +1 -1
- package/components/Chart/AreaChart.js +248 -249
- package/components/Chart/Axis.d.ts +2 -2
- package/components/Chart/Axis.js +34 -43
- package/components/Chart/BarChart.d.ts +1 -1
- package/components/Chart/BarChart.js +307 -348
- package/components/Chart/Chart.module.scss.js +31 -60
- package/components/Chart/ChartContainer.js +33 -41
- package/components/Chart/ChartLegend.d.ts +1 -1
- package/components/Chart/ChartLegend.js +31 -30
- package/components/Chart/ChartTooltip.d.ts +1 -1
- package/components/Chart/ChartTooltip.js +45 -40
- package/components/Chart/LineChart.d.ts +1 -1
- package/components/Chart/LineChart.js +220 -232
- package/components/Chart/PieChart.d.ts +1 -1
- package/components/Chart/PieChart.js +224 -240
- package/components/Chart/RadarChart.d.ts +1 -1
- package/components/Chart/RadarChart.js +166 -215
- package/components/Chart/Sparkline.js +73 -68
- package/components/Chart/TradingChart.d.ts +1 -1
- package/components/Chart/TradingChart.js +804 -701
- package/components/Chart/scales.js +28 -35
- package/components/Chart/trading/indicators.js +61 -62
- package/components/Chart/trading/period.js +46 -68
- package/components/Chart/useChartDimensions.js +30 -22
- package/components/Chip/Chip.js +98 -141
- package/components/Chip/Chip.module.scss.js +31 -58
- package/components/CodeBlock/CodeBlock.js +111 -119
- package/components/CodeBlock/CodeBlock.module.scss.js +22 -42
- package/components/CommandPalette/CommandPalette.js +387 -392
- package/components/CommandPalette/CommandPalette.module.scss.js +27 -48
- package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/components/ConfirmDialog/ConfirmDialog.js +184 -199
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +11 -20
- package/components/Divider/Divider.js +25 -36
- package/components/Divider/Divider.module.scss.js +16 -30
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +157 -164
- package/components/Draggable/Draggable.module.scss.js +9 -16
- package/components/Drawer/Drawer.js +104 -126
- package/components/Drawer/Drawer.module.scss.js +65 -118
- package/components/Dropdown/Dropdown.js +175 -234
- package/components/Dropdown/Dropdown.module.scss.js +28 -52
- package/components/Dropdown/DropdownItem.js +55 -58
- package/components/Dropdown/DropdownLabel.js +14 -11
- package/components/Dropdown/DropdownSeparator.js +13 -11
- package/components/Dropdown/dropdownContext.js +4 -5
- package/components/Dropdown/useContextMenu.js +27 -17
- package/components/Dropzone/Dropzone.js +99 -105
- package/components/Dropzone/Dropzone.module.scss.js +11 -20
- package/components/EmptyState/EmptyState.js +57 -54
- package/components/EmptyState/EmptyState.module.scss.js +13 -24
- package/components/Form/Form.d.ts +1 -1
- package/components/Form/Form.js +31 -34
- package/components/Form/Form.module.scss.js +15 -28
- package/components/Form/FormField.d.ts +1 -1
- package/components/Form/FormField.js +71 -75
- package/components/Form/FormRow.d.ts +1 -1
- package/components/Form/FormRow.js +11 -8
- package/components/Form/formFieldDefaults.js +4 -5
- package/components/ImageViewer/ImageViewer.js +312 -201
- package/components/ImageViewer/ImageViewer.module.scss.js +25 -46
- package/components/ImageViewer/useZoomPan.js +206 -137
- package/components/Kbd/Kbd.js +24 -21
- package/components/Kbd/Kbd.module.scss.js +9 -16
- package/components/KeyValueList/KeyValueList.js +119 -123
- package/components/KeyValueList/KeyValueList.module.scss.js +22 -42
- package/components/Link/Link.js +45 -59
- package/components/Link/Link.module.scss.js +9 -15
- package/components/List/List.js +22 -46
- package/components/List/List.module.scss.js +11 -20
- package/components/Loader/Loader.js +152 -182
- package/components/Loader/Loader.module.scss.js +39 -69
- package/components/Modal/Modal.js +93 -105
- package/components/Modal/Modal.module.scss.js +17 -32
- package/components/PageHeader/PageHeader.js +79 -73
- package/components/PageHeader/PageHeader.module.scss.js +22 -42
- package/components/Pagination/Pagination.js +62 -83
- package/components/Pagination/Pagination.module.scss.js +12 -22
- package/components/Pagination/paginationRange.js +15 -22
- package/components/Popover/Popover.js +110 -134
- package/components/Popover/Popover.module.scss.js +11 -20
- package/components/ProgressBar/ProgressBar.d.ts +15 -1
- package/components/ProgressBar/ProgressBar.js +56 -89
- package/components/ProgressBar/ProgressBar.module.scss.js +28 -50
- package/components/RelativeTime/RelativeTime.js +36 -43
- package/components/RelativeTime/RelativeTime.module.scss.js +3 -7
- package/components/SegmentedControl/SegmentedControl.js +93 -129
- package/components/SegmentedControl/SegmentedControl.module.scss.js +20 -38
- package/components/Skeleton/Skeleton.js +36 -50
- package/components/Skeleton/Skeleton.module.scss.js +14 -24
- package/components/Spinner/Spinner.js +25 -25
- package/components/Spinner/Spinner.module.scss.js +11 -19
- package/components/SplitButton/SplitButton.js +149 -196
- package/components/SplitButton/SplitButton.module.scss.js +30 -56
- package/components/SplitPane/SplitPane.js +134 -170
- package/components/SplitPane/SplitPane.module.scss.js +13 -24
- package/components/StatCard/StatCard.js +132 -125
- package/components/StatCard/StatCard.module.scss.js +41 -71
- package/components/StatusDot/StatusDot.js +28 -39
- package/components/StatusDot/StatusDot.module.scss.js +17 -31
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/Table.js +381 -451
- package/components/Table/Table.module.scss.js +41 -80
- package/components/Table/useTableSort.js +51 -42
- package/components/Tabs/Tabs.js +109 -161
- package/components/Tabs/Tabs.module.scss.js +27 -52
- package/components/ThemeToggle/ThemeToggle.js +122 -98
- package/components/ThemeToggle/ThemeToggle.module.scss.js +12 -22
- package/components/Timeline/GanttTimeline.js +357 -318
- package/components/Timeline/GanttTimeline.module.scss.js +28 -54
- package/components/Timeline/HistoryTimeline.js +486 -450
- package/components/Timeline/HistoryTimeline.module.scss.js +30 -58
- package/components/Timeline/Timeline.module.scss.js +75 -140
- package/components/Timeline/TimelineShared.d.ts +7 -7
- package/components/Timeline/TimelineShared.js +288 -279
- package/components/Timeline/TraceEventDetails.d.ts +3 -3
- package/components/Timeline/TraceEventDetails.js +244 -177
- package/components/Timeline/TraceTimeline.js +823 -783
- package/components/Timeline/TraceTimeline.module.scss.js +97 -188
- package/components/Timeline/historyLayout.js +336 -263
- package/components/Timeline/timelineCore.js +208 -183
- package/components/Timeline/traceEvent.js +59 -61
- package/components/Timeline/traceLayout.js +101 -90
- package/components/Timeline/useTimeline.js +76 -79
- package/components/Timer/Timer.js +190 -156
- package/components/Timer/Timer.module.scss.js +28 -54
- package/components/Toast/Toast.d.ts +1 -1
- package/components/Toast/Toast.js +128 -128
- package/components/Toast/Toast.module.scss.js +36 -61
- package/components/Toast/toastStore.js +58 -62
- package/components/ToggleIconButton/ToggleIconButton.js +36 -58
- package/components/ToggleIconButton/ToggleIconButton.module.scss.js +14 -26
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +76 -85
- package/components/Tooltip/Tooltip.module.scss.js +16 -29
- package/components/Typography/Typography.js +10 -35
- package/components/Typography/Typography.module.scss.js +29 -52
- package/components/inputs/Checkbox/Checkbox.js +27 -51
- package/components/inputs/Checkbox/Checkbox.module.scss.js +9 -16
- package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
- package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +16 -30
- package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
- package/components/inputs/DatePicker/CalendarPanel.js +263 -286
- package/components/inputs/DatePicker/CalendarPanel.module.scss.js +22 -40
- package/components/inputs/DatePicker/DatePicker.js +115 -142
- package/components/inputs/DatePicker/DatePicker.module.scss.js +13 -24
- package/components/inputs/DatePicker/dateUtils.js +32 -41
- package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
- package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +19 -36
- package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
- package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
- package/components/inputs/DateTimePicker/TimeField.js +131 -132
- package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
- package/components/inputs/Input/Input.js +98 -109
- package/components/inputs/Input/Input.module.scss.js +14 -26
- package/components/inputs/NumberInput/NumberInput.js +112 -132
- package/components/inputs/NumberInput/NumberInput.module.scss.js +13 -24
- package/components/inputs/Radio/Radio.js +50 -73
- package/components/inputs/Radio/Radio.module.scss.js +8 -14
- package/components/inputs/SearchInput/SearchInput.js +98 -115
- package/components/inputs/SearchInput/SearchInput.module.scss.js +7 -12
- package/components/inputs/Select/Select.d.ts +55 -3
- package/components/inputs/Select/Select.js +696 -682
- package/components/inputs/Select/Select.module.scss.js +49 -72
- package/components/inputs/Slider/Slider.js +97 -128
- package/components/inputs/Slider/Slider.module.scss.js +8 -14
- package/components/inputs/Switch/Switch.js +11 -8
- package/components/inputs/Textarea/Textarea.js +42 -58
- package/components/inputs/Textarea/Textarea.module.scss.js +13 -24
- package/hooks/useClickOutside.js +17 -14
- package/hooks/useDebouncedValue.js +13 -14
- package/hooks/useElementSize.js +27 -22
- package/hooks/useEscapeLayer.js +28 -29
- package/hooks/useFocusTrap.js +27 -38
- package/hooks/useKeyboard.js +76 -64
- package/hooks/useMediaQuery.js +10 -15
- package/hooks/useNow.js +28 -33
- package/hooks/usePersistedState.js +98 -94
- package/hooks/usePortalPosition.d.ts +2 -1
- package/hooks/usePortalPosition.js +28 -19
- package/hooks/useResizable.js +106 -104
- package/hooks/useTheme.js +28 -23
- package/index.css +2 -1
- package/index.js +96 -214
- package/index.layered.css +2 -3
- package/llms.txt +28 -4
- package/manifest.json +41 -4
- package/package.json +1 -1
- package/utils/formatBytes.js +29 -13
- package/utils/themeScript.js +6 -8
- package/utils/timeAgo.js +59 -32
|
@@ -1,456 +1,386 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
|
+
import a from "clsx";
|
|
3
|
+
import o from "./Table.module.scss.js";
|
|
4
|
+
import { useTableSort as s } from "./useTableSort.js";
|
|
5
|
+
import { Loader as c } from "../Loader/Loader.js";
|
|
6
|
+
import { Skeleton as l } from "../Skeleton/Skeleton.js";
|
|
7
|
+
import { Checkbox as u } from "../inputs/Checkbox/Checkbox.js";
|
|
8
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
// src/components/Table/Table.tsx
|
|
10
|
+
function p(e) {
|
|
11
|
+
return typeof e.key == "string";
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
13
|
+
function m(e) {
|
|
14
|
+
return p(e) ? e.key : e.id;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
var ee = "button, a, input, select, textarea, label, [role=\"button\"], [role=\"checkbox\"], [role=\"menuitem\"], [contenteditable]";
|
|
17
|
+
function te({ direction: e, sortIndex: t }) {
|
|
18
|
+
return /* @__PURE__ */ f("span", {
|
|
19
|
+
className: o.sortIndicator,
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ d("span", {
|
|
23
|
+
className: a(o.sortArrow, e === "asc" && o.sortArrowActive),
|
|
24
|
+
children: "▲"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ d("span", {
|
|
27
|
+
className: a(o.sortArrow, e === "desc" && o.sortArrowActive),
|
|
28
|
+
children: "▼"
|
|
29
|
+
}),
|
|
30
|
+
t !== void 0 && t >= 0 && /* @__PURE__ */ d("span", {
|
|
31
|
+
className: o.sortIndex,
|
|
32
|
+
children: t + 1
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
22
36
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
className: c(n.pageButton, q?.pageButton),
|
|
91
|
-
disabled: s >= p,
|
|
92
|
-
onClick: () => L(s + 1, u),
|
|
93
|
-
"aria-label": "Next page",
|
|
94
|
-
children: "›"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] })
|
|
98
|
-
] });
|
|
37
|
+
function ne({ page: e, pageSize: t, totalRows: r, pageSizeOptions: i = [
|
|
38
|
+
10,
|
|
39
|
+
25,
|
|
40
|
+
50,
|
|
41
|
+
100
|
|
42
|
+
], onPageChange: s, paginatorClasses: c }) {
|
|
43
|
+
let l = Math.max(1, Math.ceil(r / t)), u = (e - 1) * t + 1, p = Math.min(e * t, r), m = n(() => {
|
|
44
|
+
let t = [];
|
|
45
|
+
if (l <= 7) for (let e = 1; e <= l; e++) t.push(e);
|
|
46
|
+
else {
|
|
47
|
+
t.push(1), e > 3 && t.push("ellipsis");
|
|
48
|
+
for (let n = Math.max(2, e - 1); n <= Math.min(l - 1, e + 1); n++) t.push(n);
|
|
49
|
+
e < l - 2 && t.push("ellipsis"), t.push(l);
|
|
50
|
+
}
|
|
51
|
+
return t;
|
|
52
|
+
}, [e, l]);
|
|
53
|
+
return /* @__PURE__ */ f("nav", {
|
|
54
|
+
className: a(o.paginator, c?.paginator),
|
|
55
|
+
"aria-label": "Table pagination",
|
|
56
|
+
children: [/* @__PURE__ */ f("div", {
|
|
57
|
+
className: o.paginatorInfo,
|
|
58
|
+
children: [/* @__PURE__ */ d("span", {
|
|
59
|
+
className: o.paginatorText,
|
|
60
|
+
children: r > 0 ? `${u}–${p} of ${r}` : "No results"
|
|
61
|
+
}), i.length > 1 && /* @__PURE__ */ d("select", {
|
|
62
|
+
className: o.pageSizeSelect,
|
|
63
|
+
value: t,
|
|
64
|
+
onChange: (e) => s(1, Number(e.target.value)),
|
|
65
|
+
"aria-label": "Rows per page",
|
|
66
|
+
children: i.map((e) => /* @__PURE__ */ f("option", {
|
|
67
|
+
value: e,
|
|
68
|
+
children: [e, " / page"]
|
|
69
|
+
}, e))
|
|
70
|
+
})]
|
|
71
|
+
}), /* @__PURE__ */ f("div", {
|
|
72
|
+
className: o.paginatorNav,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ d("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
className: a(o.pageButton, c?.pageButton),
|
|
77
|
+
disabled: e <= 1,
|
|
78
|
+
onClick: () => s(e - 1, t),
|
|
79
|
+
"aria-label": "Previous page",
|
|
80
|
+
children: "‹"
|
|
81
|
+
}),
|
|
82
|
+
m.map((n, r) => n === "ellipsis" ? /* @__PURE__ */ d("span", {
|
|
83
|
+
className: o.pageEllipsis,
|
|
84
|
+
children: "…"
|
|
85
|
+
}, `ellipsis-${r}`) : /* @__PURE__ */ d("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
className: a(o.pageButton, n === e && o.pageButtonActive, c?.pageButton),
|
|
88
|
+
onClick: () => s(n, t),
|
|
89
|
+
"aria-label": `Page ${n}`,
|
|
90
|
+
"aria-current": n === e ? "page" : void 0,
|
|
91
|
+
children: n
|
|
92
|
+
}, n)),
|
|
93
|
+
/* @__PURE__ */ d("button", {
|
|
94
|
+
type: "button",
|
|
95
|
+
className: a(o.pageButton, c?.pageButton),
|
|
96
|
+
disabled: e >= l,
|
|
97
|
+
onClick: () => s(e + 1, t),
|
|
98
|
+
"aria-label": "Next page",
|
|
99
|
+
children: "›"
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
99
104
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
"aria-label": "Select row",
|
|
380
|
-
checked: g,
|
|
381
|
-
disabled: !j(e),
|
|
382
|
-
onChange: (l) => Re(e, t, l)
|
|
383
|
-
}
|
|
384
|
-
) }),
|
|
385
|
-
U.map((l) => {
|
|
386
|
-
let h, k, x;
|
|
387
|
-
if (_(l)) {
|
|
388
|
-
const E = e[l.key];
|
|
389
|
-
k = typeof l.cellClassName == "function" ? l.cellClassName(E, e, t) : l.cellClassName, x = typeof l.cellStyle == "function" ? l.cellStyle(E, e, t) : l.cellStyle, h = l.render ? l.render(E, e, t) : E;
|
|
390
|
-
} else
|
|
391
|
-
k = typeof l.cellClassName == "function" ? l.cellClassName(e, t) : l.cellClassName, x = typeof l.cellStyle == "function" ? l.cellStyle(e, t) : l.cellStyle, h = l.render(e, t);
|
|
392
|
-
return /* @__PURE__ */ a(
|
|
393
|
-
"td",
|
|
394
|
-
{
|
|
395
|
-
className: c(
|
|
396
|
-
n.cell,
|
|
397
|
-
l.sticky && n.cellSticky,
|
|
398
|
-
o?.cell,
|
|
399
|
-
k
|
|
400
|
-
),
|
|
401
|
-
style: { textAlign: l.align, ...x },
|
|
402
|
-
children: h
|
|
403
|
-
},
|
|
404
|
-
P(l)
|
|
405
|
-
);
|
|
406
|
-
})
|
|
407
|
-
]
|
|
408
|
-
},
|
|
409
|
-
r
|
|
410
|
-
);
|
|
411
|
-
}) })
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
), Ge = { selectedKeys: d, selectedRows: $e, clear: ge };
|
|
415
|
-
return /* @__PURE__ */ v(
|
|
416
|
-
"div",
|
|
417
|
-
{
|
|
418
|
-
ref: oe,
|
|
419
|
-
className: c(
|
|
420
|
-
n.wrapper,
|
|
421
|
-
Te && n.scrollable,
|
|
422
|
-
Xe && n.dragging,
|
|
423
|
-
o?.wrapper
|
|
424
|
-
),
|
|
425
|
-
onPointerDown: p ? He : void 0,
|
|
426
|
-
onPointerMove: p ? _e : void 0,
|
|
427
|
-
onPointerUp: p ? ye : void 0,
|
|
428
|
-
onPointerCancel: p ? ye : void 0,
|
|
429
|
-
onContextMenu: p ? je : void 0,
|
|
430
|
-
children: [
|
|
431
|
-
Ue && /* @__PURE__ */ v("div", { className: c(n.bulkBar, o?.bulkBar), role: "region", "aria-label": "Selected rows", children: [
|
|
432
|
-
/* @__PURE__ */ a("span", { className: c(n.bulkLabel, o?.bulkLabel), children: fe ? fe(d.length) : `${d.length} selected` }),
|
|
433
|
-
/* @__PURE__ */ a("button", { type: "button", className: c(n.bulkClear, o?.bulkClear), onClick: ge, children: "Clear" }),
|
|
434
|
-
F !== void 0 && /* @__PURE__ */ a("div", { className: c(n.bulkActions, o?.bulkActions), children: typeof F == "function" ? F(Ge) : F })
|
|
435
|
-
] }),
|
|
436
|
-
O !== void 0 && (O || ve.current) ? (
|
|
437
|
-
// Once a consumer has used `loading`, keep the wrapper so toggling it
|
|
438
|
-
// doesn't remount the table (focus, scroll position).
|
|
439
|
-
/* @__PURE__ */ a(Ye, { loading: O && !Ce, delay: 150, backdrop: "dim", classes: { root: n.loaderWrap }, children: Ne })
|
|
440
|
-
) : Ne,
|
|
441
|
-
A && /* @__PURE__ */ a(
|
|
442
|
-
tt,
|
|
443
|
-
{
|
|
444
|
-
...A,
|
|
445
|
-
totalRows: we,
|
|
446
|
-
paginatorClasses: { paginator: o?.paginator, pageButton: o?.pageButton }
|
|
447
|
-
}
|
|
448
|
-
)
|
|
449
|
-
]
|
|
450
|
-
}
|
|
451
|
-
);
|
|
105
|
+
function h({ data: h, columns: g, sortConfig: _, onSort: v, multiSort: y = !0, scrollable: re = !1, dragScroll: b = !1, striped: ie = !1, hoverable: ae = !1, compact: oe = !1, className: se, style: ce, rowKey: x, rowClassName: S, rowStyle: C, emptyMessage: le = "No data", pagination: w, loading: T = !1, loadingRows: ue = 3, onRowClick: E, selectable: D = !1, selectedKeys: O, defaultSelectedKeys: de, onSelectionChange: k, isRowSelectable: A, bulkActions: j, selectionLabel: fe, columnVisibility: M, layout: pe = "auto", classes: N }) {
|
|
106
|
+
let P = v !== void 0, me = re || b, F = n(() => M ? g.filter((e) => M[m(e)] !== !1) : g, [g, M]), { sortedData: he, sortConfig: ge, requestSort: I, requestMultiSort: L } = s(h, _), R = P ? _ ?? [] : ge, z = P ? h : he, B = n(() => {
|
|
107
|
+
if (!w || P) return z;
|
|
108
|
+
let e = (w.page - 1) * w.pageSize;
|
|
109
|
+
return z.slice(e, e + w.pageSize);
|
|
110
|
+
}, [
|
|
111
|
+
z,
|
|
112
|
+
w,
|
|
113
|
+
P
|
|
114
|
+
]), _e = w?.totalRows ?? z.length, V = e((e, t) => {
|
|
115
|
+
if (!x) return t;
|
|
116
|
+
let n = e[x];
|
|
117
|
+
return typeof n == "number" ? n : String(n);
|
|
118
|
+
}, [x]);
|
|
119
|
+
t(() => {
|
|
120
|
+
D && !x && console.error("Table: `selectable` needs `rowKey` so selections survive sorting and paging; falling back to the row index.");
|
|
121
|
+
}, [D, x]);
|
|
122
|
+
let [ve, ye] = i(() => de ?? []), H = O !== void 0, U = H ? O : ve, W = n(() => new Set(U), [U]), G = r(null), K = e((e) => {
|
|
123
|
+
if (H || ye(e), k) {
|
|
124
|
+
let t = new Set(e);
|
|
125
|
+
k(e, z.filter((e, n) => t.has(V(e, n))));
|
|
126
|
+
}
|
|
127
|
+
}, [
|
|
128
|
+
H,
|
|
129
|
+
k,
|
|
130
|
+
z,
|
|
131
|
+
V
|
|
132
|
+
]), q = e((e) => !A || A(e) !== !1, [A]), J = n(() => {
|
|
133
|
+
if (!D) return [];
|
|
134
|
+
let e = [];
|
|
135
|
+
return B.forEach((t, n) => {
|
|
136
|
+
q(t) && e.push(V(t, n));
|
|
137
|
+
}), e;
|
|
138
|
+
}, [
|
|
139
|
+
D,
|
|
140
|
+
B,
|
|
141
|
+
q,
|
|
142
|
+
V
|
|
143
|
+
]), be = J.filter((e) => W.has(e)).length, Y = J.length > 0 && be === J.length, xe = be > 0 && !Y, Se = e(() => {
|
|
144
|
+
if (Y) {
|
|
145
|
+
let e = new Set(J);
|
|
146
|
+
K(U.filter((t) => !e.has(t)));
|
|
147
|
+
} else {
|
|
148
|
+
let e = [...U], t = new Set(U);
|
|
149
|
+
for (let n of J) t.has(n) || e.push(n);
|
|
150
|
+
K(e);
|
|
151
|
+
}
|
|
152
|
+
}, [
|
|
153
|
+
Y,
|
|
154
|
+
J,
|
|
155
|
+
U,
|
|
156
|
+
K
|
|
157
|
+
]), Ce = e((e, t, n) => {
|
|
158
|
+
let r = V(e, t), i = n.target.checked, a = n.nativeEvent.shiftKey === !0, o = [r];
|
|
159
|
+
if (a && G.current !== null) {
|
|
160
|
+
let e = B.map((e, t) => V(e, t)), t = e.indexOf(G.current), n = e.indexOf(r);
|
|
161
|
+
if (t >= 0 && n >= 0) {
|
|
162
|
+
let [r, i] = t < n ? [t, n] : [n, t];
|
|
163
|
+
o = [];
|
|
164
|
+
for (let t = r; t <= i; t++) q(B[t]) && o.push(e[t]);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
G.current = r;
|
|
168
|
+
let s = new Set(o);
|
|
169
|
+
if (i) {
|
|
170
|
+
let e = new Set(U), t = [...U];
|
|
171
|
+
for (let n of o) e.has(n) || t.push(n);
|
|
172
|
+
K(t);
|
|
173
|
+
} else K(U.filter((e) => !s.has(e)));
|
|
174
|
+
}, [
|
|
175
|
+
V,
|
|
176
|
+
B,
|
|
177
|
+
q,
|
|
178
|
+
U,
|
|
179
|
+
K
|
|
180
|
+
]), we = e(() => K([]), [K]), Te = n(() => D && U.length ? z.filter((e, t) => W.has(V(e, t))) : [], [
|
|
181
|
+
D,
|
|
182
|
+
U.length,
|
|
183
|
+
z,
|
|
184
|
+
W,
|
|
185
|
+
V
|
|
186
|
+
]), Ee = e((e, t, n) => {
|
|
187
|
+
if (!E) return;
|
|
188
|
+
let r = n.target?.closest?.(ee);
|
|
189
|
+
r && r !== n.currentTarget && n.currentTarget.contains(r) || E(e, t, n);
|
|
190
|
+
}, [E]), De = e((e, t, n) => {
|
|
191
|
+
E && n.target === n.currentTarget && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), E(e, t, n));
|
|
192
|
+
}, [E]), Oe = e((e, t, n) => {
|
|
193
|
+
let r = y && (t.ctrlKey || t.metaKey || t.shiftKey), i = n === "asc" ? "desc" : "asc";
|
|
194
|
+
if (P) {
|
|
195
|
+
if (r) {
|
|
196
|
+
let t = R.findIndex((t) => t.key === e), r;
|
|
197
|
+
r = t === -1 ? [...R, {
|
|
198
|
+
key: e,
|
|
199
|
+
direction: n
|
|
200
|
+
}] : R[t].direction === n ? R.map((n, r) => r === t ? {
|
|
201
|
+
key: e,
|
|
202
|
+
direction: i
|
|
203
|
+
} : n) : R.filter((e, n) => n !== t), v(r);
|
|
204
|
+
} else {
|
|
205
|
+
let t = R.find((t) => t.key === e);
|
|
206
|
+
t ? t.direction === n ? v([{
|
|
207
|
+
key: e,
|
|
208
|
+
direction: i
|
|
209
|
+
}]) : v([]) : v([{
|
|
210
|
+
key: e,
|
|
211
|
+
direction: n
|
|
212
|
+
}]);
|
|
213
|
+
}
|
|
214
|
+
} else r ? L(e, n) : I(e, n);
|
|
215
|
+
}, [
|
|
216
|
+
P,
|
|
217
|
+
y,
|
|
218
|
+
R,
|
|
219
|
+
v,
|
|
220
|
+
I,
|
|
221
|
+
L
|
|
222
|
+
]), X = r(null), Z = r(null), Q = r(!1), [ke, Ae] = i(!1), je = e((e) => {
|
|
223
|
+
let t = X.current;
|
|
224
|
+
t && (Q.current = !1, e.button !== 1 && e.button !== 2 || t.scrollWidth <= t.clientWidth || (e.button === 1 && e.preventDefault(), Z.current = {
|
|
225
|
+
pointerId: e.pointerId,
|
|
226
|
+
button: e.button,
|
|
227
|
+
startX: e.clientX,
|
|
228
|
+
startScrollLeft: t.scrollLeft,
|
|
229
|
+
downAt: performance.now(),
|
|
230
|
+
dragging: !1
|
|
231
|
+
}));
|
|
232
|
+
}, []), Me = e((e) => {
|
|
233
|
+
let t = Z.current, n = X.current;
|
|
234
|
+
if (!t || !n || e.pointerId !== t.pointerId) return;
|
|
235
|
+
let r = e.clientX - t.startX;
|
|
236
|
+
if (!t.dragging) {
|
|
237
|
+
if (t.button === 2 && performance.now() - t.downAt > 200) {
|
|
238
|
+
Z.current = null;
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (Math.abs(r) < 5) return;
|
|
242
|
+
t.dragging = !0, Ae(!0);
|
|
243
|
+
try {
|
|
244
|
+
n.setPointerCapture(t.pointerId);
|
|
245
|
+
} catch {}
|
|
246
|
+
}
|
|
247
|
+
n.scrollLeft = t.startScrollLeft - r;
|
|
248
|
+
}, []), Ne = e((e) => {
|
|
249
|
+
let t = Z.current;
|
|
250
|
+
t && e.pointerId === t.pointerId && (Z.current = null, t.dragging && (t.button === 2 && (Q.current = !0), Ae(!1)));
|
|
251
|
+
}, []), Pe = e((e) => {
|
|
252
|
+
(Z.current?.dragging || Q.current) && (Q.current = !1, e.preventDefault());
|
|
253
|
+
}, []), $ = (e) => R.find((t) => t.key === e)?.direction, Fe = (e) => {
|
|
254
|
+
if (R.length <= 1) return;
|
|
255
|
+
let t = R.findIndex((t) => t.key === e);
|
|
256
|
+
return t >= 0 ? t : void 0;
|
|
257
|
+
}, Ie = r(!1);
|
|
258
|
+
T && (Ie.current = !0);
|
|
259
|
+
let Le = F.length + +!!D, Re = T && B.length === 0, ze = D && U.length > 0, Be = /* @__PURE__ */ f("table", {
|
|
260
|
+
className: a(o.root, ie && o.striped, ae && o.hoverable, oe && o.compact, pe === "fixed" && o.layoutFixed, N?.root, se),
|
|
261
|
+
style: ce,
|
|
262
|
+
"aria-busy": T || void 0,
|
|
263
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", { children: [D && /* @__PURE__ */ d("th", {
|
|
264
|
+
className: a(o.headerCell, o.selectHeaderCell, N?.headerCell, N?.selectHeaderCell),
|
|
265
|
+
children: /* @__PURE__ */ d(u, {
|
|
266
|
+
"aria-label": "Select all",
|
|
267
|
+
checked: Y,
|
|
268
|
+
indeterminate: xe,
|
|
269
|
+
disabled: J.length === 0,
|
|
270
|
+
onChange: Se
|
|
271
|
+
})
|
|
272
|
+
}), F.map((e) => /* @__PURE__ */ f("th", {
|
|
273
|
+
className: a(o.headerCell, p(e) && e.sortable && o.headerCellSortable, e.sticky && o.headerCellSticky, N?.headerCell),
|
|
274
|
+
style: {
|
|
275
|
+
width: e.width,
|
|
276
|
+
textAlign: e.align
|
|
277
|
+
},
|
|
278
|
+
onClick: p(e) && e.sortable ? (t) => Oe(e.key, t, e.defaultSortDirection ?? "asc") : void 0,
|
|
279
|
+
"aria-sort": p(e) && e.sortable ? $(m(e)) === "asc" ? "ascending" : $(m(e)) === "desc" ? "descending" : "none" : void 0,
|
|
280
|
+
children: [e.header, p(e) && e.sortable && /* @__PURE__ */ d(te, {
|
|
281
|
+
direction: $(m(e)),
|
|
282
|
+
sortIndex: Fe(m(e))
|
|
283
|
+
})]
|
|
284
|
+
}, m(e)))] }) }), /* @__PURE__ */ d("tbody", { children: Re ? Array.from({ length: Math.max(1, ue) }, (e, t) => /* @__PURE__ */ f("tr", {
|
|
285
|
+
className: a(o.row, o.loadingRow, N?.row, N?.loadingRow),
|
|
286
|
+
"aria-hidden": "true",
|
|
287
|
+
children: [D && /* @__PURE__ */ d("td", { className: a(o.cell, o.selectCell, N?.cell) }), F.map((e) => /* @__PURE__ */ d("td", {
|
|
288
|
+
className: a(o.cell, N?.cell),
|
|
289
|
+
children: /* @__PURE__ */ d(l, { variant: "text" })
|
|
290
|
+
}, m(e)))]
|
|
291
|
+
}, `loading-${t}`)) : B.length === 0 ? /* @__PURE__ */ d("tr", {
|
|
292
|
+
className: o.emptyRow,
|
|
293
|
+
children: /* @__PURE__ */ d("td", {
|
|
294
|
+
className: a(o.emptyCell, N?.emptyCell),
|
|
295
|
+
colSpan: Le,
|
|
296
|
+
children: le
|
|
297
|
+
})
|
|
298
|
+
}) : B.map((e, t) => {
|
|
299
|
+
let n = x ? String(e[x]) : t, r = D ? V(e, t) : null, i = r !== null && W.has(r), s = typeof S == "function" ? S(e, t) : S, c = typeof C == "function" ? C(e, t) : C;
|
|
300
|
+
return /* @__PURE__ */ f("tr", {
|
|
301
|
+
className: a(o.row, E && o.rowClickable, i && o.rowSelected, N?.row, E && N?.rowClickable, i && N?.rowSelected, s),
|
|
302
|
+
style: c,
|
|
303
|
+
tabIndex: E ? 0 : void 0,
|
|
304
|
+
onClick: E ? (n) => Ee(e, t, n) : void 0,
|
|
305
|
+
onKeyDown: E ? (n) => De(e, t, n) : void 0,
|
|
306
|
+
"aria-selected": D ? i : void 0,
|
|
307
|
+
children: [D && /* @__PURE__ */ d("td", {
|
|
308
|
+
className: a(o.cell, o.selectCell, N?.cell, N?.selectCell),
|
|
309
|
+
children: /* @__PURE__ */ d(u, {
|
|
310
|
+
"aria-label": "Select row",
|
|
311
|
+
checked: i,
|
|
312
|
+
disabled: !q(e),
|
|
313
|
+
onChange: (n) => Ce(e, t, n)
|
|
314
|
+
})
|
|
315
|
+
}), F.map((n) => {
|
|
316
|
+
let r, i, s;
|
|
317
|
+
if (p(n)) {
|
|
318
|
+
let a = e[n.key];
|
|
319
|
+
i = typeof n.cellClassName == "function" ? n.cellClassName(a, e, t) : n.cellClassName, s = typeof n.cellStyle == "function" ? n.cellStyle(a, e, t) : n.cellStyle, r = n.render ? n.render(a, e, t) : a;
|
|
320
|
+
} else i = typeof n.cellClassName == "function" ? n.cellClassName(e, t) : n.cellClassName, s = typeof n.cellStyle == "function" ? n.cellStyle(e, t) : n.cellStyle, r = n.render(e, t);
|
|
321
|
+
return /* @__PURE__ */ d("td", {
|
|
322
|
+
className: a(o.cell, n.sticky && o.cellSticky, N?.cell, i),
|
|
323
|
+
style: {
|
|
324
|
+
textAlign: n.align,
|
|
325
|
+
...s
|
|
326
|
+
},
|
|
327
|
+
children: r
|
|
328
|
+
}, m(n));
|
|
329
|
+
})]
|
|
330
|
+
}, n);
|
|
331
|
+
}) })]
|
|
332
|
+
}), Ve = {
|
|
333
|
+
selectedKeys: U,
|
|
334
|
+
selectedRows: Te,
|
|
335
|
+
clear: we
|
|
336
|
+
};
|
|
337
|
+
return /* @__PURE__ */ f("div", {
|
|
338
|
+
ref: X,
|
|
339
|
+
className: a(o.wrapper, me && o.scrollable, ke && o.dragging, N?.wrapper),
|
|
340
|
+
onPointerDown: b ? je : void 0,
|
|
341
|
+
onPointerMove: b ? Me : void 0,
|
|
342
|
+
onPointerUp: b ? Ne : void 0,
|
|
343
|
+
onPointerCancel: b ? Ne : void 0,
|
|
344
|
+
onContextMenu: b ? Pe : void 0,
|
|
345
|
+
children: [
|
|
346
|
+
ze && /* @__PURE__ */ f("div", {
|
|
347
|
+
className: a(o.bulkBar, N?.bulkBar),
|
|
348
|
+
role: "region",
|
|
349
|
+
"aria-label": "Selected rows",
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ d("span", {
|
|
352
|
+
className: a(o.bulkLabel, N?.bulkLabel),
|
|
353
|
+
children: fe ? fe(U.length) : `${U.length} selected`
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ d("button", {
|
|
356
|
+
type: "button",
|
|
357
|
+
className: a(o.bulkClear, N?.bulkClear),
|
|
358
|
+
onClick: we,
|
|
359
|
+
children: "Clear"
|
|
360
|
+
}),
|
|
361
|
+
j !== void 0 && /* @__PURE__ */ d("div", {
|
|
362
|
+
className: a(o.bulkActions, N?.bulkActions),
|
|
363
|
+
children: typeof j == "function" ? j(Ve) : j
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
}),
|
|
367
|
+
T !== void 0 && (T || Ie.current) ? /* @__PURE__ */ d(c, {
|
|
368
|
+
loading: T && !Re,
|
|
369
|
+
delay: 150,
|
|
370
|
+
backdrop: "dim",
|
|
371
|
+
classes: { root: o.loaderWrap },
|
|
372
|
+
children: Be
|
|
373
|
+
}) : Be,
|
|
374
|
+
w && /* @__PURE__ */ d(ne, {
|
|
375
|
+
...w,
|
|
376
|
+
totalRows: _e,
|
|
377
|
+
paginatorClasses: {
|
|
378
|
+
paginator: N?.paginator,
|
|
379
|
+
pageButton: N?.pageButton
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
});
|
|
452
384
|
}
|
|
453
|
-
|
|
454
|
-
export {
|
|
455
|
-
ut as Table
|
|
456
|
-
};
|
|
385
|
+
var g = h;
|
|
386
|
+
export { g as Table };
|