@redis-ui/table 2.12.0 → 2.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/dist/Table/Table.cjs +95 -146
- package/dist/Table/Table.context.cjs +16 -1
- package/dist/Table/Table.context.d.ts +23 -4
- package/dist/Table/Table.context.js +16 -1
- package/dist/Table/Table.d.ts +88 -5
- package/dist/Table/Table.js +95 -146
- package/dist/Table/Table.style.cjs +43 -13
- package/dist/Table/Table.style.d.ts +6 -6
- package/dist/Table/Table.style.js +43 -13
- package/dist/Table/Table.types.d.ts +22 -38
- package/dist/Table/components/Compose/Compose.cjs +45 -0
- package/dist/Table/components/Compose/Compose.d.ts +13 -0
- package/dist/Table/components/Compose/Compose.js +45 -0
- package/dist/Table/components/EmptyState/EmptyState.cjs +31 -0
- package/dist/Table/components/EmptyState/EmptyState.d.ts +6 -0
- package/dist/Table/components/EmptyState/EmptyState.js +31 -0
- package/dist/Table/components/ExpandRowButton/ExpandAllRowsButton.cjs +20 -0
- package/dist/Table/components/ExpandRowButton/ExpandAllRowsButton.d.ts +8 -0
- package/dist/Table/components/ExpandRowButton/ExpandAllRowsButton.js +20 -0
- package/dist/Table/components/ExpandRowButton/ExpandAllRowsButton.test.d.ts +1 -0
- package/dist/Table/components/ExpandRowButton/useExpanderColumn.cjs +19 -0
- package/dist/Table/components/ExpandRowButton/useExpanderColumn.d.ts +6 -0
- package/dist/Table/components/ExpandRowButton/useExpanderColumn.js +19 -0
- package/dist/Table/components/ExpandRowButton/useExpanderColumn.test.d.ts +1 -0
- package/dist/Table/components/HiddenCaption/HiddenCaption.cjs +13 -0
- package/dist/Table/components/HiddenCaption/HiddenCaption.d.ts +3 -0
- package/dist/Table/components/HiddenCaption/HiddenCaption.js +13 -0
- package/dist/Table/components/PluggableTable/PluggableTable.cjs +19 -0
- package/dist/Table/components/PluggableTable/PluggableTable.d.ts +10 -0
- package/dist/Table/components/PluggableTable/PluggableTable.js +19 -0
- package/dist/Table/components/PluggableTable/compositionComponents.cjs +21 -0
- package/dist/Table/components/PluggableTable/compositionComponents.d.ts +67 -0
- package/dist/Table/components/PluggableTable/compositionComponents.js +21 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.cjs +1 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.d.ts +1 -1
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.js +1 -0
- package/dist/Table/components/RowSelection/useRowSelectionColumn.cjs +26 -0
- package/dist/Table/components/RowSelection/useRowSelectionColumn.d.ts +8 -0
- package/dist/Table/components/RowSelection/useRowSelectionColumn.js +26 -0
- package/dist/Table/components/RowSelection/useRowSelectionColumn.test.d.ts +1 -0
- package/dist/Table/components/ShowOnRowHover/ShowOnRowHover.style.cjs +3 -1
- package/dist/Table/components/ShowOnRowHover/ShowOnRowHover.style.js +3 -1
- package/dist/Table/components/TableBody/TableBody.cjs +33 -0
- package/dist/Table/components/TableBody/TableBody.d.ts +23 -0
- package/dist/Table/components/TableBody/TableBody.js +33 -0
- package/dist/Table/components/TableBody/components/Compose/Compose.cjs +8 -0
- package/dist/Table/components/TableBody/components/Compose/Compose.d.ts +3 -0
- package/dist/Table/components/TableBody/components/Compose/Compose.js +8 -0
- package/dist/Table/components/TableBodyCell/TableBodyCell.cjs +18 -0
- package/dist/Table/components/TableBodyCell/TableBodyCell.d.ts +9 -0
- package/dist/Table/components/TableBodyCell/TableBodyCell.js +18 -0
- package/dist/Table/components/TableBodyCell/components/Compose/Compose.cjs +25 -0
- package/dist/Table/components/TableBodyCell/components/Compose/Compose.d.ts +9 -0
- package/dist/Table/components/TableBodyCell/components/Compose/Compose.js +25 -0
- package/dist/Table/components/TableBodyCell/components/Compose/Compose.test.d.ts +1 -0
- package/dist/Table/components/TableBodyRow/TableBodyRow.cjs +48 -0
- package/dist/Table/components/TableBodyRow/TableBodyRow.d.ts +20 -0
- package/dist/Table/components/TableBodyRow/TableBodyRow.js +48 -0
- package/dist/Table/components/TableBodyRow/TableBodyRowExpandable.cjs +33 -0
- package/dist/Table/components/TableBodyRow/TableBodyRowExpandable.d.ts +2 -0
- package/dist/Table/components/TableBodyRow/TableBodyRowExpandable.js +33 -0
- package/dist/Table/components/TableBodyRow/components/Compose/Compose.cjs +17 -0
- package/dist/Table/components/TableBodyRow/components/Compose/Compose.d.ts +5 -0
- package/dist/Table/components/TableBodyRow/components/Compose/Compose.js +17 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.cjs +3 -4
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.d.ts +1 -1
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.js +3 -4
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.cjs +9 -4
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.d.ts +1 -1
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.js +9 -4
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.types.d.ts +3 -5
- package/dist/Table/components/TableHeader/TableHeader.cjs +28 -0
- package/dist/Table/components/TableHeader/TableHeader.d.ts +21 -0
- package/dist/Table/components/TableHeader/TableHeader.js +28 -0
- package/dist/Table/components/TableHeader/components/Compose/Compose.cjs +5 -0
- package/dist/Table/components/TableHeader/components/Compose/Compose.d.ts +3 -0
- package/dist/Table/components/TableHeader/components/Compose/Compose.js +5 -0
- package/dist/Table/components/TableHeaderCell/SRSortingNotification.cjs +18 -0
- package/dist/Table/components/TableHeaderCell/SRSortingNotification.d.ts +1 -0
- package/dist/Table/components/TableHeaderCell/SRSortingNotification.js +18 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.cjs +15 -33
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.context.cjs +15 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.context.d.ts +8 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.context.js +15 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.d.ts +16 -4
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.js +15 -33
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.test.d.ts +1 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.cjs +0 -22
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.d.ts +0 -1
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.js +1 -23
- package/dist/Table/components/TableHeaderCell/components/Compose/Compose.cjs +48 -0
- package/dist/Table/components/TableHeaderCell/components/Compose/Compose.d.ts +9 -0
- package/dist/Table/components/TableHeaderCell/components/Compose/Compose.js +48 -0
- package/dist/Table/components/TableHeaderCell/components/Compose/Compose.test.d.ts +1 -0
- package/dist/Table/components/TableHeaderCell/components/Heading/Heading.cjs +35 -0
- package/dist/Table/components/TableHeaderCell/components/Heading/Heading.d.ts +5 -0
- package/dist/Table/components/TableHeaderCell/components/Heading/Heading.js +35 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/SortableHeading.cjs +16 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/SortableHeading.d.ts +8 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/SortableHeading.js +16 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/Compose/Compose.cjs +24 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/Compose/Compose.d.ts +5 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/Compose/Compose.js +24 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/SortIndicator/SortIndicator.cjs +6 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/SortIndicator/SortIndicator.d.ts +2 -0
- package/dist/Table/components/TableHeaderCell/components/SortableHeading/components/SortIndicator/SortIndicator.js +6 -0
- package/dist/Table/components/TableHeaderRow/TableHeaderRow.cjs +27 -0
- package/dist/Table/components/TableHeaderRow/TableHeaderRow.d.ts +12 -0
- package/dist/Table/components/TableHeaderRow/TableHeaderRow.js +27 -0
- package/dist/Table/components/TableHeaderRow/components/Compose/Compose.cjs +5 -0
- package/dist/Table/components/TableHeaderRow/components/Compose/Compose.d.ts +3 -0
- package/dist/Table/components/TableHeaderRow/components/Compose/Compose.js +5 -0
- package/dist/Table/components/TablePagination/TablePagination.cjs +65 -99
- package/dist/Table/components/TablePagination/TablePagination.d.ts +23 -3
- package/dist/Table/components/TablePagination/TablePagination.js +66 -100
- package/dist/Table/components/TablePagination/TablePagination.style.cjs +70 -50
- package/dist/Table/components/TablePagination/TablePagination.style.d.ts +17 -50
- package/dist/Table/components/TablePagination/TablePagination.style.js +72 -52
- package/dist/Table/components/TablePagination/components/Compose/Compose.cjs +41 -0
- package/dist/Table/components/TablePagination/components/Compose/Compose.d.ts +3 -0
- package/dist/Table/components/TablePagination/components/Compose/Compose.js +41 -0
- package/dist/Table/components/TableRoot/TableRoot.cjs +13 -0
- package/dist/Table/components/TableRoot/TableRoot.d.ts +2 -0
- package/dist/Table/components/TableRoot/TableRoot.js +13 -0
- package/dist/Table/index.d.ts +3 -6
- package/dist/Table/plugins/ClickableRowPlugin.cjs +48 -0
- package/dist/Table/plugins/ClickableRowPlugin.d.ts +25 -0
- package/dist/Table/plugins/ClickableRowPlugin.js +48 -0
- package/dist/Table/plugins/ExpandableRowPlugin.cjs +44 -0
- package/dist/Table/plugins/ExpandableRowPlugin.d.ts +28 -0
- package/dist/Table/plugins/ExpandableRowPlugin.js +44 -0
- package/dist/Table/plugins/PaginationPlugin.cjs +45 -0
- package/dist/Table/plugins/PaginationPlugin.d.ts +16 -0
- package/dist/Table/plugins/PaginationPlugin.js +45 -0
- package/dist/Table/plugins/RowNavigationPlugin.cjs +139 -0
- package/dist/Table/plugins/RowNavigationPlugin.d.ts +44 -0
- package/dist/Table/plugins/RowNavigationPlugin.js +139 -0
- package/dist/Table/plugins/RowSelectionPlugin.cjs +28 -0
- package/dist/Table/plugins/RowSelectionPlugin.d.ts +12 -0
- package/dist/Table/plugins/RowSelectionPlugin.js +28 -0
- package/dist/Table/plugins/SortingPlugin.cjs +44 -0
- package/dist/Table/plugins/SortingPlugin.d.ts +18 -0
- package/dist/Table/plugins/SortingPlugin.js +44 -0
- package/dist/Table/tanStackExtendedTypes.d.ts +20 -0
- package/dist/Table/utils/plugin.utils.cjs +49 -0
- package/dist/Table/utils/plugin.utils.d.ts +17 -0
- package/dist/Table/utils/plugin.utils.js +49 -0
- package/dist/Table/utils/plugin.utils.test.d.ts +1 -0
- package/dist/Table/utils/table.utils.cjs +13 -0
- package/dist/Table/utils/table.utils.d.ts +2 -0
- package/dist/Table/utils/table.utils.js +13 -0
- package/dist/Table/utils/table.utils.test.d.ts +1 -0
- package/dist/index.cjs +60 -0
- package/dist/index.js +61 -1
- package/dist/node_modules/@tanstack/react-table/build/lib/index.cjs +7 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +8 -1
- package/dist/node_modules/@tanstack/table-core/build/lib/index.cjs +361 -4
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +361 -4
- package/package.json +6 -5
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.cjs +0 -16
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.d.ts +0 -8
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.js +0 -16
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +0 -32
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -14
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -24
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
package/dist/Table/Table.cjs
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const index$3 = require("../node_modules/@radix-ui/react-visually-hidden/dist/index.cjs");
|
|
6
|
-
const index$1 = require("../node_modules/@tanstack/react-table/build/lib/index.cjs");
|
|
7
|
-
const index = require("../node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs");
|
|
8
|
-
const TablePagination = require("./components/TablePagination/TablePagination.cjs");
|
|
9
4
|
const ExpandRowButton = require("./components/ExpandRowButton/ExpandRowButton.cjs");
|
|
10
5
|
const TableExpandedRow = require("./components/TableExpandedRow/TableExpandedRow.cjs");
|
|
11
6
|
const TableAnimatedExpandedRow = require("./components/TableExpandedRow/TableAnimatedExpandedRow.cjs");
|
|
12
|
-
const Table_context = require("./Table.context.cjs");
|
|
13
|
-
const TableHeaderCell = require("./components/TableHeaderCell/TableHeaderCell.cjs");
|
|
14
|
-
const TableHeaderCell_utils = require("./components/TableHeaderCell/TableHeaderCell.utils.cjs");
|
|
15
|
-
const EmptyStateRow = require("./components/EmptyStateRow/EmptyStateRow.cjs");
|
|
16
7
|
const RowSelectionButton = require("./components/RowSelection/RowSelectionButton.cjs");
|
|
17
8
|
const HeaderMultiRowSelectionButton = require("./components/RowSelection/HeaderMultiRowSelectionButton.cjs");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
9
|
+
const RowSelectionPlugin = require("./plugins/RowSelectionPlugin.cjs");
|
|
10
|
+
const ExpandableRowPlugin = require("./plugins/ExpandableRowPlugin.cjs");
|
|
11
|
+
const PaginationPlugin = require("./plugins/PaginationPlugin.cjs");
|
|
12
|
+
const SortingPlugin = require("./plugins/SortingPlugin.cjs");
|
|
13
|
+
const ClickableRowPlugin = require("./plugins/ClickableRowPlugin.cjs");
|
|
14
|
+
const Table_context = require("./Table.context.cjs");
|
|
15
|
+
const PluggableTable = require("./components/PluggableTable/PluggableTable.cjs");
|
|
16
|
+
const compositionComponents = require("./components/PluggableTable/compositionComponents.cjs");
|
|
17
|
+
const RowNavigationPlugin = require("./plugins/RowNavigationPlugin.cjs");
|
|
18
|
+
const ShowOnRowHover_style = require("./components/ShowOnRowHover/ShowOnRowHover.style.cjs");
|
|
19
|
+
const ExpandAllRowsButton = require("./components/ExpandRowButton/ExpandAllRowsButton.cjs");
|
|
20
|
+
const useExpanderColumn = require("./components/ExpandRowButton/useExpanderColumn.cjs");
|
|
21
|
+
const useRowSelectionColumn = require("./components/RowSelection/useRowSelectionColumn.cjs");
|
|
26
22
|
const Table = Object.assign(({
|
|
27
23
|
columns,
|
|
28
24
|
caption,
|
|
@@ -31,17 +27,21 @@ const Table = Object.assign(({
|
|
|
31
27
|
getRowId,
|
|
32
28
|
emptyState,
|
|
33
29
|
maxHeight,
|
|
30
|
+
minWidth,
|
|
34
31
|
stripedRows = false,
|
|
35
32
|
// sorting
|
|
33
|
+
enableSorting,
|
|
36
34
|
defaultSorting,
|
|
37
35
|
onSortingChange,
|
|
38
36
|
sorting,
|
|
39
|
-
manualSorting
|
|
37
|
+
manualSorting,
|
|
40
38
|
// row expansion
|
|
39
|
+
defaultExpanded,
|
|
41
40
|
getIsRowExpandable,
|
|
42
41
|
renderExpandedRow,
|
|
43
42
|
expandRowOnClick,
|
|
44
|
-
expandedRowComponent
|
|
43
|
+
expandedRowComponent,
|
|
44
|
+
getSubRows,
|
|
45
45
|
// pagination
|
|
46
46
|
pagination,
|
|
47
47
|
defaultPagination,
|
|
@@ -49,149 +49,98 @@ const Table = Object.assign(({
|
|
|
49
49
|
manualPagination,
|
|
50
50
|
totalRowCount,
|
|
51
51
|
pageSizes,
|
|
52
|
-
paginationEnabled
|
|
52
|
+
paginationEnabled,
|
|
53
53
|
// row selection
|
|
54
54
|
rowSelection,
|
|
55
55
|
defaultRowSelection,
|
|
56
56
|
onRowSelectionChange,
|
|
57
57
|
rowSelectionMode,
|
|
58
|
-
getRowCanSelect
|
|
58
|
+
getRowCanSelect,
|
|
59
|
+
// row navigation
|
|
60
|
+
enableRowNavigation = false
|
|
59
61
|
}) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
defaultProp: defaultSorting,
|
|
64
|
-
onChange: onSortingChange
|
|
65
|
-
});
|
|
66
|
-
const [paginationState, setPaginationState] = index.useControllableState({
|
|
67
|
-
prop: pagination,
|
|
68
|
-
defaultProp: defaultPagination ?? DEFAULT_PAGINATION,
|
|
69
|
-
onChange: onPaginationChange
|
|
62
|
+
const clickableRowPluginData = ClickableRowPlugin.useClickableRowPlugin({
|
|
63
|
+
onRowClick: onRowClick && ((row) => onRowClick(row.original)),
|
|
64
|
+
shouldClickOnEnter: true
|
|
70
65
|
});
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
const sortingPluginData = SortingPlugin.useSortingPlugin({
|
|
67
|
+
enableSorting,
|
|
68
|
+
defaultSorting,
|
|
69
|
+
onSortingChange,
|
|
70
|
+
sorting,
|
|
71
|
+
manualSorting
|
|
75
72
|
});
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
onPaginationChange
|
|
73
|
+
const paginationPluginData = PaginationPlugin.usePaginationPlugin({
|
|
74
|
+
pagination,
|
|
75
|
+
defaultPagination,
|
|
76
|
+
onPaginationChange,
|
|
80
77
|
manualPagination,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const table = index$1.useReactTable({
|
|
85
|
-
data,
|
|
86
|
-
columns,
|
|
87
|
-
getRowId,
|
|
88
|
-
getCoreRowModel: index$2.getCoreRowModel(),
|
|
89
|
-
getSortedRowModel: index$2.getSortedRowModel(),
|
|
90
|
-
state: {
|
|
91
|
-
sorting: sortingState,
|
|
92
|
-
...paginationEnabled && {
|
|
93
|
-
pagination: paginationState
|
|
94
|
-
},
|
|
95
|
-
...rowSelectionMode && {
|
|
96
|
-
rowSelection: rowSelectionState
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
manualSorting,
|
|
100
|
-
onSortingChange: (value) => {
|
|
101
|
-
setSortingState(value);
|
|
102
|
-
setUserSorted(true);
|
|
103
|
-
},
|
|
104
|
-
getExpandedRowModel: isExpandable ? index$2.getExpandedRowModel() : void 0,
|
|
105
|
-
getRowCanExpand: isExpandable ? getIsRowExpandable && ((row) => getIsRowExpandable(row.original)) || getTrue : void 0,
|
|
106
|
-
...paginationEnabled && paginationSettings,
|
|
107
|
-
enableRowSelection: rowSelectionMode && (getRowCanSelect ?? true),
|
|
108
|
-
enableMultiRowSelection: rowSelectionMode === "multiple",
|
|
109
|
-
onRowSelectionChange: setRowSelectionState
|
|
78
|
+
totalRowCount,
|
|
79
|
+
pageSizes,
|
|
80
|
+
paginationEnabled
|
|
110
81
|
});
|
|
111
|
-
const {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
82
|
+
const expandableRowPluginData = ExpandableRowPlugin.useExpandableRowPlugin({
|
|
83
|
+
defaultExpanded,
|
|
84
|
+
expandRowOnClick,
|
|
85
|
+
getRowCanExpand: getIsRowExpandable && ((row) => {
|
|
86
|
+
var _a;
|
|
87
|
+
return getIsRowExpandable(row.original) && (!getSubRows || !!((_a = getSubRows(row.original, row.index)) == null ? void 0 : _a.length));
|
|
88
|
+
}),
|
|
89
|
+
renderExpandedRow,
|
|
90
|
+
expandedRowComponent,
|
|
91
|
+
getSubRows
|
|
92
|
+
});
|
|
93
|
+
const rowSelectionPluginData = RowSelectionPlugin.useRowSelectionPlugin({
|
|
94
|
+
rowSelection,
|
|
95
|
+
defaultRowSelection,
|
|
96
|
+
onRowSelectionChange,
|
|
97
|
+
rowSelectionMode,
|
|
98
|
+
getRowCanSelect
|
|
99
|
+
});
|
|
100
|
+
const rowNavigationPluginData = RowNavigationPlugin.useRowNavigationPlugin({
|
|
101
|
+
enableRowNavigation
|
|
102
|
+
});
|
|
103
|
+
return jsxRuntime.jsxRuntimeExports.jsx(Table.PluggableTable, {
|
|
104
|
+
...{
|
|
105
|
+
data,
|
|
106
|
+
columns,
|
|
107
|
+
maxHeight,
|
|
108
|
+
minWidth,
|
|
109
|
+
stripedRows,
|
|
110
|
+
caption,
|
|
111
|
+
emptyStateRender: emptyState
|
|
112
|
+
},
|
|
113
|
+
tableOptions: {
|
|
114
|
+
getRowId
|
|
124
115
|
},
|
|
125
|
-
|
|
126
|
-
children: [jsxRuntime.jsxRuntimeExports.jsxs(Table_style.Table, {
|
|
127
|
-
children: [caption && jsxRuntime.jsxRuntimeExports.jsx(index$3.VisuallyHidden, {
|
|
128
|
-
asChild: true,
|
|
129
|
-
children: jsxRuntime.jsxRuntimeExports.jsx("caption", {
|
|
130
|
-
children: caption
|
|
131
|
-
})
|
|
132
|
-
}), jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableHead, {
|
|
133
|
-
children: table.getHeaderGroups().map((headerGroup) => jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableHeaderRow, {
|
|
134
|
-
children: headerGroup.headers.map((header) => jsxRuntime.jsxRuntimeExports.jsx(TableHeaderCell.TableHeaderCell, {
|
|
135
|
-
header
|
|
136
|
-
}, header.id))
|
|
137
|
-
}, headerGroup.id))
|
|
138
|
-
}), jsxRuntime.jsxRuntimeExports.jsxs(Table_style.TableBody, {
|
|
139
|
-
maxHeight,
|
|
140
|
-
children: [!rows.length ? jsxRuntime.jsxRuntimeExports.jsx(EmptyStateRow.EmptyStateRow, {
|
|
141
|
-
table,
|
|
142
|
-
emptyState
|
|
143
|
-
}) : null, rows.map((row) => {
|
|
144
|
-
const isRowExpandable = isExpandable && row.getCanExpand();
|
|
145
|
-
const isRowExpanded = isRowExpandable && row.getIsExpanded();
|
|
146
|
-
const handleClick = () => {
|
|
147
|
-
isRowExpandable && expandRowOnClick && row.toggleExpanded();
|
|
148
|
-
onRowClick == null ? void 0 : onRowClick(row.original);
|
|
149
|
-
};
|
|
150
|
-
return jsxRuntime.jsxRuntimeExports.jsxs(React.Fragment, {
|
|
151
|
-
children: [jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyRow, {
|
|
152
|
-
tabIndex: 0,
|
|
153
|
-
"data-row-type": "regular",
|
|
154
|
-
...isRowExpandable ? {
|
|
155
|
-
"aria-expanded": isRowExpanded
|
|
156
|
-
} : null,
|
|
157
|
-
"$stripedRows": stripedRows,
|
|
158
|
-
"$hasOnClick": !!onRowClick || isRowExpandable,
|
|
159
|
-
onClick: handleClick,
|
|
160
|
-
onKeyDown: (event) => {
|
|
161
|
-
if (event.key === "Enter" && event.target === event.currentTarget) {
|
|
162
|
-
handleClick();
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
children: row.getVisibleCells().map((cell) => jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyCell, {
|
|
166
|
-
style: {
|
|
167
|
-
width: cell.column.getSize()
|
|
168
|
-
},
|
|
169
|
-
children: index$1.flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
170
|
-
}, cell.id))
|
|
171
|
-
}), isRowExpandable && // 2nd row is a custom 1 cell row for expanded part
|
|
172
|
-
jsxRuntime.jsxRuntimeExports.jsx(ExpandedRow, {
|
|
173
|
-
"data-row-type": "expanded",
|
|
174
|
-
"data-expanded": isRowExpanded,
|
|
175
|
-
expanded: isRowExpanded,
|
|
176
|
-
row,
|
|
177
|
-
renderExpandedRow
|
|
178
|
-
})]
|
|
179
|
-
}, row.id);
|
|
180
|
-
})]
|
|
181
|
-
})]
|
|
182
|
-
}), jsxRuntime.jsxRuntimeExports.jsx(TablePagination.default, {
|
|
183
|
-
pageSizes
|
|
184
|
-
})]
|
|
185
|
-
}), userSorted && jsxRuntime.jsxRuntimeExports.jsx(index$3.VisuallyHidden, {
|
|
186
|
-
"aria-live": "polite",
|
|
187
|
-
children: TableHeaderCell_utils.getTableSortLabel(table, TableHeaderCell_utils.formatTableSortNotification)
|
|
188
|
-
})]
|
|
116
|
+
pluginsData: [clickableRowPluginData, sortingPluginData, paginationPluginData, expandableRowPluginData, rowSelectionPluginData, rowNavigationPluginData]
|
|
189
117
|
});
|
|
190
118
|
}, {
|
|
191
119
|
ExpandRowButton: ExpandRowButton.ExpandRowButton,
|
|
120
|
+
ExpandAllRowsButton: ExpandAllRowsButton.ExpandAllRowsButton,
|
|
121
|
+
useExpanderColumn: useExpanderColumn.useExpanderColumn,
|
|
192
122
|
ExpandedRow: TableExpandedRow.TableExpandedRow,
|
|
193
123
|
AnimatedExpandedRow: TableAnimatedExpandedRow.TableAnimatedExpandedRow,
|
|
194
124
|
RowSelectionButton: RowSelectionButton.RowSelectionButton,
|
|
195
|
-
HeaderMultiRowSelectionButton: HeaderMultiRowSelectionButton.HeaderMultiRowSelectionButton
|
|
125
|
+
HeaderMultiRowSelectionButton: HeaderMultiRowSelectionButton.HeaderMultiRowSelectionButton,
|
|
126
|
+
useRowSelectionColumn: useRowSelectionColumn.useRowSelectionColumn,
|
|
127
|
+
ShowOnActiveRow: ShowOnRowHover_style.ShowOnRowHover,
|
|
128
|
+
// plugins
|
|
129
|
+
useClickableRowPlugin: ClickableRowPlugin.useClickableRowPlugin,
|
|
130
|
+
useSortingPlugin: SortingPlugin.useSortingPlugin,
|
|
131
|
+
usePaginationPlugin: PaginationPlugin.usePaginationPlugin,
|
|
132
|
+
useExpandableRowPlugin: ExpandableRowPlugin.useExpandableRowPlugin,
|
|
133
|
+
useRowSelectionPlugin: RowSelectionPlugin.useRowSelectionPlugin,
|
|
134
|
+
useRowNavigationPlugin: RowNavigationPlugin.useRowNavigationPlugin,
|
|
135
|
+
// contexts
|
|
136
|
+
useTableContext: Table_context.useTableContext,
|
|
137
|
+
useComposeContext: Table_context.useComposeContext,
|
|
138
|
+
useClickableRowContext: ClickableRowPlugin.useClickableRowContext,
|
|
139
|
+
useExpandableRowContext: ExpandableRowPlugin.useExpandableRowContext,
|
|
140
|
+
usePaginationContext: PaginationPlugin.usePaginationContext,
|
|
141
|
+
useSortingContext: SortingPlugin.useSortingContext,
|
|
142
|
+
// composition components
|
|
143
|
+
PluggableTable: PluggableTable.PluggableTable,
|
|
144
|
+
...compositionComponents.compositionComponents
|
|
196
145
|
});
|
|
197
146
|
exports.default = Table;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const TableContext = React.createContext(null);
|
|
5
|
+
const TableContextProvider = TableContext.Provider;
|
|
5
6
|
const useTableContext = () => {
|
|
6
7
|
const tableContext = React.useContext(TableContext);
|
|
7
8
|
if (!tableContext) {
|
|
@@ -9,5 +10,19 @@ const useTableContext = () => {
|
|
|
9
10
|
}
|
|
10
11
|
return tableContext;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
const usePluginContext = (pluginScope) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return (_a = useTableContext().plugins) == null ? void 0 : _a[pluginScope];
|
|
16
|
+
};
|
|
17
|
+
const useComposeContext = (defaults) => {
|
|
18
|
+
const context = useTableContext();
|
|
19
|
+
const entries = Object.keys(defaults).map((key) => {
|
|
20
|
+
var _a;
|
|
21
|
+
return [key, ((_a = context.components) == null ? void 0 : _a[key]) || defaults[key]];
|
|
22
|
+
});
|
|
23
|
+
return Object.fromEntries(entries);
|
|
24
|
+
};
|
|
25
|
+
exports.TableContextProvider = TableContextProvider;
|
|
26
|
+
exports.useComposeContext = useComposeContext;
|
|
27
|
+
exports.usePluginContext = usePluginContext;
|
|
13
28
|
exports.useTableContext = useTableContext;
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentProps, ComponentType } from 'react';
|
|
2
2
|
import { Table } from '@tanstack/react-table';
|
|
3
|
-
|
|
3
|
+
import type { TableHeaderRow } from './components/TableHeaderRow/TableHeaderRow';
|
|
4
|
+
import type { TableHeaderCell } from './components/TableHeaderCell/TableHeaderCell';
|
|
5
|
+
import type { TableBodyRow } from './components/TableBodyRow/TableBodyRow';
|
|
6
|
+
import type { TableBodyCell } from './components/TableBodyCell/TableBodyCell';
|
|
7
|
+
export type CompositionContextProps<T extends object> = {
|
|
8
|
+
TableHeaderRow: ComponentType<ComponentProps<typeof TableHeaderRow<T>>>;
|
|
9
|
+
TableHeaderCell: ComponentType<ComponentProps<typeof TableHeaderCell<T>>>;
|
|
10
|
+
TableBodyRow: ComponentType<ComponentProps<typeof TableBodyRow<T>>>;
|
|
11
|
+
TableBodyCell: ComponentType<ComponentProps<typeof TableBodyCell<T>>>;
|
|
12
|
+
};
|
|
13
|
+
export type TableMainContextProps = {
|
|
14
|
+
stripedRows?: boolean;
|
|
15
|
+
maxHeight?: string;
|
|
16
|
+
minWidth?: string;
|
|
17
|
+
};
|
|
18
|
+
export type TableContextProps<T extends object> = TableMainContextProps & {
|
|
4
19
|
table: Table<T>;
|
|
20
|
+
plugins?: Record<string, unknown>;
|
|
21
|
+
components?: Partial<CompositionContextProps<T>>;
|
|
5
22
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const useTableContext: () => TableContextProps<
|
|
23
|
+
export declare const TableContextProvider: import("react").Provider<TableContextProps<any> | null>;
|
|
24
|
+
export declare const useTableContext: <T extends object = object>() => TableContextProps<T>;
|
|
25
|
+
export declare const usePluginContext: <T>(pluginScope: string) => T | undefined;
|
|
26
|
+
export declare const useComposeContext: <T extends object, C extends CompositionContextProps<T> = CompositionContextProps<T>>(defaults: Partial<C>) => C;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
const TableContext = createContext(null);
|
|
3
|
+
const TableContextProvider = TableContext.Provider;
|
|
3
4
|
const useTableContext = () => {
|
|
4
5
|
const tableContext = useContext(TableContext);
|
|
5
6
|
if (!tableContext) {
|
|
@@ -7,7 +8,21 @@ const useTableContext = () => {
|
|
|
7
8
|
}
|
|
8
9
|
return tableContext;
|
|
9
10
|
};
|
|
11
|
+
const usePluginContext = (pluginScope) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return (_a = useTableContext().plugins) == null ? void 0 : _a[pluginScope];
|
|
14
|
+
};
|
|
15
|
+
const useComposeContext = (defaults) => {
|
|
16
|
+
const context = useTableContext();
|
|
17
|
+
const entries = Object.keys(defaults).map((key) => {
|
|
18
|
+
var _a;
|
|
19
|
+
return [key, ((_a = context.components) == null ? void 0 : _a[key]) || defaults[key]];
|
|
20
|
+
});
|
|
21
|
+
return Object.fromEntries(entries);
|
|
22
|
+
};
|
|
10
23
|
export {
|
|
11
|
-
|
|
24
|
+
TableContextProvider,
|
|
25
|
+
useComposeContext,
|
|
26
|
+
usePluginContext,
|
|
12
27
|
useTableContext
|
|
13
28
|
};
|
package/dist/Table/Table.d.ts
CHANGED
|
@@ -1,9 +1,92 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './tanStackExtendedTypes';
|
|
3
|
+
import type { Row } from '@tanstack/react-table';
|
|
1
4
|
import { TableProps } from './Table.types';
|
|
2
|
-
declare const Table: (<T extends object>({ columns, caption, onRowClick, data, getRowId, emptyState, maxHeight, stripedRows, defaultSorting, onSortingChange, sorting, manualSorting, getIsRowExpandable, renderExpandedRow, expandRowOnClick, expandedRowComponent
|
|
5
|
+
declare const Table: (<T extends object>({ columns, caption, onRowClick, data, getRowId, emptyState, maxHeight, minWidth, stripedRows, enableSorting, defaultSorting, onSortingChange, sorting, manualSorting, defaultExpanded, getIsRowExpandable, renderExpandedRow, expandRowOnClick, expandedRowComponent, getSubRows, pagination, defaultPagination, onPaginationChange, manualPagination, totalRowCount, pageSizes, paginationEnabled, rowSelection, defaultRowSelection, onRowSelectionChange, rowSelectionMode, getRowCanSelect, enableRowNavigation }: TableProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
|
+
Compose: <T_1 extends object>({ data, columns, pluginsData, tableOptions, components, maxHeight, minWidth, stripedRows, ...restProps }: import("./components/Compose/Compose").TableComposeProps<T_1>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Root: (props: import("react").HTMLAttributes<HTMLTableElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
SRCaption: ({ caption }: {
|
|
9
|
+
caption?: string | undefined;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
Header: (<T_2 extends object>(props: import("./components/TableHeader/TableHeader").RestTableHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
12
|
+
Compose: import("styled-components").StyledComponent<"thead", any, {}, never>;
|
|
13
|
+
Row: (<T_3 extends object>(props: import("./components/TableHeaderRow/TableHeaderRow").OwnTableHeaderRowProps<T_3> & import("./components/TableHeaderRow/TableHeaderRow").RestTableHeaderRowProps & import("react").RefAttributes<HTMLTableRowElement>) => import("react").ReactElement<any, any> | null) & {
|
|
14
|
+
Compose: import("styled-components").StyledComponent<"tr", any, {}, never>;
|
|
15
|
+
};
|
|
16
|
+
Cell: (<T_4 extends object>(props: import("./components/TableHeaderCell/TableHeaderCell").OwnTableHeaderCellProps<T_4> & import("./components/TableHeaderCell/TableHeaderCell").RestTableHeaderCellProps & import("react").RefAttributes<HTMLTableCellElement>) => import("react").ReactElement<any, any> | null) & {
|
|
17
|
+
Compose: <T_5 extends object>(props: import("./components/TableHeaderCell/components/Compose/Compose").OwnTableHeaderCellComposeProps<T_5> & import("@redislabsdev/redis-ui-components").ComposeChildrenProps & Omit<import("react").HTMLAttributes<HTMLTableCellElement>, "content" | "children"> & import("react").RefAttributes<HTMLTableCellElement>) => import("react").ReactElement<any, any> | null;
|
|
18
|
+
SortableHeading: (({ children, ...restProps }: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element) & {
|
|
19
|
+
Compose: ((props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
+
SortIndicator: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
21
|
+
};
|
|
22
|
+
SortIndicator: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
23
|
+
};
|
|
24
|
+
Heading: (props: import("./components/TableHeaderCell/components/Heading/Heading").RestTableHeaderCellHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
EmptyState: ({ emptyStateRender, ...restProps }: import("./components/EmptyState/EmptyState").EmptyStateProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
Body: (<T_6 extends object>(props: import("./components/TableBody/TableBody").RestTableBodyProps) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
29
|
+
Compose: (props: import("./components/TableBody/components/Compose/Compose").TableBodyComposeProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
Row: (<T_7 extends object>(props: import("./components/TableBodyRow/TableBodyRow").OwnTableBodyRowProps<T_7> & import("./components/TableBodyRow/TableBodyRow").RestTableBodyRowProps & import("react").RefAttributes<HTMLTableRowElement>) => import("react").ReactElement<any, any> | null) & {
|
|
31
|
+
Compose: (props: import("@redislabsdev/redis-ui-components").ComposeChildrenProps & Omit<import("react").HTMLAttributes<HTMLTableRowElement>, "content" | "children"> & import("react").RefAttributes<HTMLTableRowElement>) => import("react").ReactElement<any, any> | null;
|
|
32
|
+
useHandleClickableRow: <T_8 extends object>({ row, onClick, onKeyDown }: {
|
|
33
|
+
row: Row<T_8>;
|
|
34
|
+
onClick?: import("react").MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
35
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLTableRowElement> | undefined;
|
|
36
|
+
}) => {
|
|
37
|
+
onClick: import("react").MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
38
|
+
onKeyDown: ((event: import("react").KeyboardEvent<HTMLTableRowElement>) => void) | undefined;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
ExpandableRow: <T_9 extends object>(props: import("./components/TableBodyRow/TableBodyRow").OwnTableBodyRowProps<T_9> & import("./components/TableBodyRow/TableBodyRow").RestTableBodyRowProps & import("react").RefAttributes<HTMLTableRowElement>) => import("react").ReactElement<any, any> | null;
|
|
42
|
+
Cell: (<T_10 extends object>(props: import("./components/TableBodyCell/TableBodyCell").OwnTableBodyCellProps<T_10> & import("./components/TableBodyCell/TableBodyCell").RestTableBodyCellProps & import("react").RefAttributes<HTMLTableCellElement>) => import("react").ReactElement<any, any> | null) & {
|
|
43
|
+
Compose: <T_11 extends object>(props: import("@redislabsdev/redis-ui-components").ComposeChildrenProps & Omit<import("react").HTMLAttributes<HTMLTableCellElement>, "content" | "children"> & import("./components/TableBodyCell/components/Compose/Compose").OwnTableBodyCellComposeProps<T_11> & import("react").RefAttributes<HTMLTableCellElement>) => import("react").ReactElement<any, any> | null;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
Pagination: (() => import("react/jsx-runtime").JSX.Element | null) & {
|
|
47
|
+
Compose: ({ children }: import("@redislabsdev/redis-ui-components").ComposeChildrenProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
Bar: import("styled-components").StyledComponent<"nav", any, {
|
|
49
|
+
'aria-label': string;
|
|
50
|
+
} & {
|
|
51
|
+
'aria-label': string;
|
|
52
|
+
}, "aria-label">;
|
|
53
|
+
Split: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
54
|
+
InfoLabel: import("styled-components").StyledComponent<({ renderer, ...restProps }: import("@redislabsdev/redis-ui-components").PaginationInfoLabelProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
55
|
+
PageSelect: import("styled-components").StyledComponent<{
|
|
56
|
+
({ ...restProps }: import("@redislabsdev/redis-ui-components").PaginationPageSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
Label: ({ children, ...restProps }: import("@redislabsdev/redis-ui-components").TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
}, any, {}, never>;
|
|
59
|
+
PageSizeSelect: import("styled-components").StyledComponent<{
|
|
60
|
+
({ pageSizes, ...restProps }: import("@redislabsdev/redis-ui-components").PaginationPageSizeSelectProps): import("react/jsx-runtime").JSX.Element | null;
|
|
61
|
+
Label: ({ children, ...restProps }: import("@redislabsdev/redis-ui-components").TypographyBodyProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
62
|
+
}, any, {}, never>;
|
|
63
|
+
NavigationButton: import("styled-components").StyledComponent<({ navType, ...restProps }: import("@redislabsdev/redis-ui-components").PaginationNavigationButtonProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
64
|
+
PageSizeGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
65
|
+
PageNavGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
66
|
+
PageSelectGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
67
|
+
};
|
|
68
|
+
SRSortingNotification: typeof import("./components/TableHeaderCell/SRSortingNotification").SRSortingNotification;
|
|
3
69
|
ExpandRowButton: ({ row, expandedIcon, collapsedIcon, ...restProps }: import("./components/ExpandRowButton/ExpandRowButton").ExpandRowButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
70
|
+
ExpandAllRowsButton: ({ table, expandedIcon, collapsedIcon, ...restProps }: import("./components/ExpandRowButton/ExpandAllRowsButton").ExpandAllRowsButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
71
|
+
useExpanderColumn: <T_12 extends object>({ allowExpandAll, ...colDef }?: import("./components/ExpandRowButton/useExpanderColumn").UseExpanderColumnParams<T_12>) => import("@tanstack/react-table").ColumnDef<T_12, unknown>;
|
|
72
|
+
ExpandedRow: <T_13 extends object>({ row, keepInDom, rowRef, ...restProps }: import("./components/TableExpandedRow").TableExpandedRowProps<T_13>) => import("react/jsx-runtime").JSX.Element | null;
|
|
73
|
+
AnimatedExpandedRow: <T_14 extends object>({ rowRef, ...restProps }: import("./components/TableExpandedRow").TableExpandedRowProps<T_14>) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
RowSelectionButton: <T_15 extends object>({ row, ...restProps }: import("./components/RowSelection/RowSelectionButton").RowSelectionButtonProps<T_15>) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
HeaderMultiRowSelectionButton: <T_16 extends object>({ table, managePage, ...restProps }: import("./components/RowSelection/HeaderMultiRowSelectionButton").HeaderMultiRowSelectionButtonProps<T_16>) => import("react/jsx-runtime").JSX.Element | null;
|
|
76
|
+
useRowSelectionColumn: <T_17 extends object>({ disableSelectAll, managePage, ...colDef }?: import("./components/RowSelection/useRowSelectionColumn").UseRowSelectionColumnParams<T_17>) => import("@tanstack/react-table").ColumnDef<T_17, unknown>;
|
|
77
|
+
ShowOnActiveRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
78
|
+
useClickableRowPlugin: <T_18 extends object>({ getCanRowClick, onRowClick, shouldClickOnEnter }: Partial<import("./plugins/ClickableRowPlugin").TableClickableRowContext<T_18>>) => import(".").TablePluginData<T_18>;
|
|
79
|
+
useSortingPlugin: <T_19 extends object>({ defaultSorting, onSortingChange, sorting, manualSorting, enableSorting }?: import("./plugins/SortingPlugin").TableSortingParams) => import(".").TablePluginData<T_19>;
|
|
80
|
+
usePaginationPlugin: <T_20 extends object>({ pagination, defaultPagination, onPaginationChange, manualPagination, totalRowCount, pageSizes, paginationEnabled }: import("./plugins/PaginationPlugin").TablePaginationParams) => import(".").TablePluginData<T_20>;
|
|
81
|
+
useExpandableRowPlugin: <T_21 extends object>({ defaultExpanded, getRowCanExpand, renderExpandedRow, expandRowOnClick, expandedRowComponent, getSubRows }: import("./plugins/ExpandableRowPlugin").TableExpandableRowParams<T_21>) => import(".").TablePluginData<T_21>;
|
|
82
|
+
useRowSelectionPlugin: <T_22 extends object>({ rowSelection, defaultRowSelection, onRowSelectionChange, rowSelectionMode, getRowCanSelect }: import("./plugins/RowSelectionPlugin").TableRowSelectionParams<T_22>) => import(".").TablePluginData<T_22>;
|
|
83
|
+
useRowNavigationPlugin: <T_23 extends object>({ enableRowNavigation }: import("./plugins/RowNavigationPlugin").TableRowNavigationParams) => import(".").TablePluginData<T_23>;
|
|
84
|
+
useTableContext: <T_24 extends object = object>() => import("./Table.context").TableContextProps<T_24>;
|
|
85
|
+
useComposeContext: <T_25 extends object, C extends import("./Table.context").CompositionContextProps<T_25> = import("./Table.context").CompositionContextProps<T_25>>(defaults: Partial<C>) => C;
|
|
86
|
+
useClickableRowContext: <T_26 extends object>() => import("./plugins/ClickableRowPlugin").TableClickableRowContext<T_26> | undefined;
|
|
87
|
+
useExpandableRowContext: <T_27 extends object>() => import("./plugins/ExpandableRowPlugin").TableExpandableRowContext<T_27> | undefined;
|
|
88
|
+
usePaginationContext: () => import("./plugins/PaginationPlugin").TablePaginationContext | undefined;
|
|
89
|
+
useSortingContext: () => import("./plugins/SortingPlugin").TableSortingContext | undefined;
|
|
90
|
+
PluggableTable: <T_28 extends object>({ caption, emptyStateRender, ...restProps }: import("./components/PluggableTable/PluggableTable").PluggableTableProps<T_28>) => import("react/jsx-runtime").JSX.Element;
|
|
8
91
|
};
|
|
9
92
|
export default Table;
|