material-react-table 0.40.9 → 0.40.12
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/README.md +15 -13
- package/dist/cjs/MaterialReactTable.d.ts +8 -4
- package/dist/cjs/column.utils.d.ts +81 -76
- package/dist/cjs/index.js +81 -52
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/MaterialReactTable.d.ts +8 -4
- package/dist/esm/column.utils.d.ts +81 -76
- package/dist/esm/material-react-table.esm.js +81 -52
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/package.json +4 -4
- package/src/MaterialReactTable.tsx +24 -2
- package/src/buttons/MRT_CopyButton.tsx +7 -1
- package/src/buttons/MRT_ExpandAllButton.tsx +2 -1
- package/src/buttons/MRT_ExpandButton.tsx +2 -1
- package/src/buttons/MRT_FullScreenToggleButton.tsx +2 -1
- package/src/buttons/MRT_GrabHandleButton.tsx +2 -1
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +2 -1
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -1
- package/src/buttons/MRT_ToggleFiltersButton.tsx +2 -1
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +2 -2
- package/src/column.utils.ts +18 -25
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -1
- package/src/inputs/MRT_FilterTextField.tsx +18 -3
- package/src/inputs/MRT_SelectCheckbox.tsx +5 -1
- package/src/table/MRT_TableRoot.tsx +18 -13
package/dist/cjs/index.js
CHANGED
|
@@ -256,16 +256,17 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
|
|
|
256
256
|
Math.max(...Object.values(rowA.columnFiltersMeta).map((v) => v.rank));
|
|
257
257
|
|
|
258
258
|
const MRT_ExpandAllButton = ({ table }) => {
|
|
259
|
+
var _a;
|
|
259
260
|
const { getIsAllRowsExpanded, getIsSomeRowsExpanded, getCanSomeRowsExpand, getState, options: { icons: { KeyboardDoubleArrowDownIcon }, localization, muiExpandAllButtonProps, renderDetailPanel, }, toggleAllRowsExpanded, } = table;
|
|
260
261
|
const { density } = getState();
|
|
261
262
|
const iconButtonProps = muiExpandAllButtonProps instanceof Function
|
|
262
263
|
? muiExpandAllButtonProps({ table })
|
|
263
264
|
: muiExpandAllButtonProps;
|
|
264
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.expandAll },
|
|
265
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.expandAll },
|
|
265
266
|
React__default["default"].createElement("span", null,
|
|
266
267
|
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: !getCanSomeRowsExpand() && !renderDetailPanel, onClick: () => toggleAllRowsExpanded(!getIsAllRowsExpanded()) }, iconButtonProps, { sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
267
268
|
? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
|
|
268
|
-
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
|
|
269
|
+
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
|
|
269
270
|
React__default["default"].createElement(KeyboardDoubleArrowDownIcon, { style: {
|
|
270
271
|
transform: `rotate(${getIsAllRowsExpanded()
|
|
271
272
|
? -180
|
|
@@ -277,6 +278,7 @@ const MRT_ExpandAllButton = ({ table }) => {
|
|
|
277
278
|
};
|
|
278
279
|
|
|
279
280
|
const MRT_ExpandButton = ({ row, table }) => {
|
|
281
|
+
var _a;
|
|
280
282
|
const { getState, options: { icons: { ExpandMoreIcon }, localization, muiExpandButtonProps, renderDetailPanel, }, } = table;
|
|
281
283
|
const { density } = getState();
|
|
282
284
|
const iconButtonProps = muiExpandButtonProps instanceof Function
|
|
@@ -288,11 +290,11 @@ const MRT_ExpandButton = ({ row, table }) => {
|
|
|
288
290
|
row.toggleExpanded();
|
|
289
291
|
(_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
|
|
290
292
|
};
|
|
291
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.expand },
|
|
293
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.expand },
|
|
292
294
|
React__default["default"].createElement("span", null,
|
|
293
295
|
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.expand, disabled: !row.getCanExpand() && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem' }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
294
296
|
? iconButtonProps.sx(theme)
|
|
295
|
-
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
|
|
297
|
+
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
|
|
296
298
|
React__default["default"].createElement(ExpandMoreIcon, { style: {
|
|
297
299
|
transform: `rotate(${!row.getCanExpand() && !renderDetailPanel
|
|
298
300
|
? -90
|
|
@@ -472,8 +474,9 @@ const MRT_ColumnPinningButtons = ({ column, table, }) => {
|
|
|
472
474
|
};
|
|
473
475
|
|
|
474
476
|
const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
|
|
477
|
+
var _a;
|
|
475
478
|
const { options: { icons: { DragHandleIcon }, localization, }, } = table;
|
|
476
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: localization.move },
|
|
479
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.move },
|
|
477
480
|
React__default["default"].createElement(material.IconButton, Object.assign({ disableRipple: true, draggable: "true", onDragStart: onDragStart, onDragEnd: onDragEnd, size: "small" }, iconButtonProps, { onClick: (e) => {
|
|
478
481
|
var _a;
|
|
479
482
|
e.stopPropagation();
|
|
@@ -485,24 +488,10 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
|
|
|
485
488
|
cursor: 'grabbing',
|
|
486
489
|
} }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
487
490
|
? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
|
|
488
|
-
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
|
|
491
|
+
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
|
|
489
492
|
React__default["default"].createElement(DragHandleIcon, null))));
|
|
490
493
|
};
|
|
491
494
|
|
|
492
|
-
const defaultDisplayColumnDefOptions = {
|
|
493
|
-
columnDefType: 'display',
|
|
494
|
-
enableClickToCopy: false,
|
|
495
|
-
enableColumnActions: false,
|
|
496
|
-
enableColumnDragging: false,
|
|
497
|
-
enableColumnFilter: false,
|
|
498
|
-
enableColumnOrdering: false,
|
|
499
|
-
enableEditing: false,
|
|
500
|
-
enableGlobalFilter: false,
|
|
501
|
-
enableGrouping: false,
|
|
502
|
-
enableHiding: false,
|
|
503
|
-
enableResizing: false,
|
|
504
|
-
enableSorting: false,
|
|
505
|
-
};
|
|
506
495
|
const getColumnId = (columnDef) => { var _a, _b, _c, _d; return (_d = (_a = columnDef.id) !== null && _a !== void 0 ? _a : (_c = (_b = columnDef.accessorKey) === null || _b === void 0 ? void 0 : _b.toString) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : columnDef.header; };
|
|
507
496
|
const getAllLeafColumnDefs = (columns) => {
|
|
508
497
|
let lowestLevelColumns = columns;
|
|
@@ -519,7 +508,7 @@ const getAllLeafColumnDefs = (columns) => {
|
|
|
519
508
|
}
|
|
520
509
|
return lowestLevelColumns.filter((col) => !col.columns);
|
|
521
510
|
};
|
|
522
|
-
const prepareColumns = (columnDefs, columnFilterFns, filterFns, sortingFns) => columnDefs.map((columnDef) => {
|
|
511
|
+
const prepareColumns = ({ columnDefs, columnFilterFns, defaultDisplayColumn, filterFns, sortingFns, }) => columnDefs.map((columnDef) => {
|
|
523
512
|
var _a, _b;
|
|
524
513
|
if (!columnDef.id)
|
|
525
514
|
columnDef.id = getColumnId(columnDef);
|
|
@@ -530,7 +519,13 @@ const prepareColumns = (columnDefs, columnFilterFns, filterFns, sortingFns) => c
|
|
|
530
519
|
columnDef.columnDefType = 'data';
|
|
531
520
|
if (!!((_a = columnDef.columns) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
532
521
|
columnDef.columnDefType = 'group';
|
|
533
|
-
columnDef.columns = prepareColumns(
|
|
522
|
+
columnDef.columns = prepareColumns({
|
|
523
|
+
columnDefs: columnDef.columns,
|
|
524
|
+
columnFilterFns,
|
|
525
|
+
defaultDisplayColumn,
|
|
526
|
+
filterFns,
|
|
527
|
+
sortingFns,
|
|
528
|
+
});
|
|
534
529
|
}
|
|
535
530
|
else if (columnDef.columnDefType === 'data') {
|
|
536
531
|
if (Object.keys(filterFns).includes(columnFilterFns[columnDef.id])) {
|
|
@@ -545,7 +540,7 @@ const prepareColumns = (columnDefs, columnFilterFns, filterFns, sortingFns) => c
|
|
|
545
540
|
}
|
|
546
541
|
}
|
|
547
542
|
else if (columnDef.columnDefType === 'display') {
|
|
548
|
-
columnDef = Object.assign(Object.assign({},
|
|
543
|
+
columnDef = Object.assign(Object.assign({}, defaultDisplayColumn), columnDef);
|
|
549
544
|
}
|
|
550
545
|
return columnDef;
|
|
551
546
|
});
|
|
@@ -981,6 +976,7 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
|
|
|
981
976
|
};
|
|
982
977
|
|
|
983
978
|
const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
979
|
+
var _a;
|
|
984
980
|
const { getState, options: { localization, muiSelectCheckboxProps, muiSelectAllCheckboxProps, selectAllMode, }, } = table;
|
|
985
981
|
const { density } = getState();
|
|
986
982
|
const checkboxProps = !row
|
|
@@ -990,7 +986,9 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
|
990
986
|
: muiSelectCheckboxProps instanceof Function
|
|
991
987
|
? muiSelectCheckboxProps({ row, table })
|
|
992
988
|
: muiSelectCheckboxProps;
|
|
993
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title:
|
|
989
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
|
|
990
|
+
? localization.toggleSelectAll
|
|
991
|
+
: localization.toggleSelectRow) },
|
|
994
992
|
React__default["default"].createElement(material.Checkbox, Object.assign({ checked: selectAll ? table.getIsAllRowsSelected() : row === null || row === void 0 ? void 0 : row.getIsSelected(), indeterminate: selectAll ? table.getIsSomeRowsSelected() : row === null || row === void 0 ? void 0 : row.getIsSomeSelected(), inputProps: {
|
|
995
993
|
'aria-label': selectAll
|
|
996
994
|
? localization.toggleSelectAll
|
|
@@ -1005,7 +1003,7 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
|
1005
1003
|
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
|
|
1006
1004
|
}, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.5rem', width: density === 'compact' ? '1.75rem' : '2.5rem', m: density !== 'compact' ? '-0.4rem' : undefined }, ((checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx) instanceof Function
|
|
1007
1005
|
? checkboxProps.sx(theme)
|
|
1008
|
-
: checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) }))));
|
|
1006
|
+
: checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))), title: undefined }))));
|
|
1009
1007
|
};
|
|
1010
1008
|
|
|
1011
1009
|
const MRT_GlobalFilterTextField = ({ table, }) => {
|
|
@@ -1123,17 +1121,19 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
|
|
|
1123
1121
|
};
|
|
1124
1122
|
|
|
1125
1123
|
const MRT_FullScreenToggleButton = (_a) => {
|
|
1124
|
+
var _b;
|
|
1126
1125
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
1127
1126
|
const { getState, options: { icons: { FullscreenExitIcon, FullscreenIcon }, localization, }, setIsFullScreen, } = table;
|
|
1128
1127
|
const { isFullScreen } = getState();
|
|
1129
1128
|
const handleToggleFullScreen = () => {
|
|
1130
1129
|
setIsFullScreen(!isFullScreen);
|
|
1131
1130
|
};
|
|
1132
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: localization.toggleFullScreen },
|
|
1133
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest), isFullScreen ? React__default["default"].createElement(FullscreenExitIcon, null) : React__default["default"].createElement(FullscreenIcon, null))));
|
|
1131
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen },
|
|
1132
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined }), isFullScreen ? React__default["default"].createElement(FullscreenExitIcon, null) : React__default["default"].createElement(FullscreenIcon, null))));
|
|
1134
1133
|
};
|
|
1135
1134
|
|
|
1136
1135
|
const MRT_ShowHideColumnsButton = (_a) => {
|
|
1136
|
+
var _b;
|
|
1137
1137
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
1138
1138
|
const { options: { icons: { ViewColumnIcon }, localization, }, } = table;
|
|
1139
1139
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
@@ -1141,13 +1141,14 @@ const MRT_ShowHideColumnsButton = (_a) => {
|
|
|
1141
1141
|
setAnchorEl(event.currentTarget);
|
|
1142
1142
|
};
|
|
1143
1143
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1144
|
-
React__default["default"].createElement(material.Tooltip, { arrow: true, title: localization.showHideColumns },
|
|
1145
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest),
|
|
1144
|
+
React__default["default"].createElement(material.Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns },
|
|
1145
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined }),
|
|
1146
1146
|
React__default["default"].createElement(ViewColumnIcon, null))),
|
|
1147
1147
|
React__default["default"].createElement(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table })));
|
|
1148
1148
|
};
|
|
1149
1149
|
|
|
1150
1150
|
const MRT_ToggleDensePaddingButton = (_a) => {
|
|
1151
|
+
var _b;
|
|
1151
1152
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
1152
1153
|
const { getState, options: { icons: { DensityLargeIcon, DensityMediumIcon, DensitySmallIcon }, localization, }, setDensity, } = table;
|
|
1153
1154
|
const { density } = getState();
|
|
@@ -1159,22 +1160,24 @@ const MRT_ToggleDensePaddingButton = (_a) => {
|
|
|
1159
1160
|
: 'comfortable';
|
|
1160
1161
|
setDensity(nextDensity);
|
|
1161
1162
|
};
|
|
1162
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: localization.toggleDensity },
|
|
1163
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest), density === 'compact' ? (React__default["default"].createElement(DensitySmallIcon, null)) : density === 'comfortable' ? (React__default["default"].createElement(DensityMediumIcon, null)) : (React__default["default"].createElement(DensityLargeIcon, null)))));
|
|
1163
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity },
|
|
1164
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined }), density === 'compact' ? (React__default["default"].createElement(DensitySmallIcon, null)) : density === 'comfortable' ? (React__default["default"].createElement(DensityMediumIcon, null)) : (React__default["default"].createElement(DensityLargeIcon, null)))));
|
|
1164
1165
|
};
|
|
1165
1166
|
|
|
1166
1167
|
const MRT_ToggleFiltersButton = (_a) => {
|
|
1168
|
+
var _b;
|
|
1167
1169
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
1168
1170
|
const { getState, options: { icons: { FilterListIcon, FilterListOffIcon }, localization, }, setShowFilters, } = table;
|
|
1169
1171
|
const { showColumnFilters } = getState();
|
|
1170
1172
|
const handleToggleShowFilters = () => {
|
|
1171
1173
|
setShowFilters(!showColumnFilters);
|
|
1172
1174
|
};
|
|
1173
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: localization.showHideFilters },
|
|
1174
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest), showColumnFilters ? React__default["default"].createElement(FilterListOffIcon, null) : React__default["default"].createElement(FilterListIcon, null))));
|
|
1175
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters },
|
|
1176
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined }), showColumnFilters ? React__default["default"].createElement(FilterListOffIcon, null) : React__default["default"].createElement(FilterListIcon, null))));
|
|
1175
1177
|
};
|
|
1176
1178
|
|
|
1177
1179
|
const MRT_ToggleGlobalFilterButton = (_a) => {
|
|
1180
|
+
var _b;
|
|
1178
1181
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
1179
1182
|
const { getState, options: { icons: { SearchIcon, SearchOffIcon }, localization, }, refs: { searchInputRef }, setShowGlobalFilter, } = table;
|
|
1180
1183
|
const { showGlobalFilter } = getState();
|
|
@@ -1182,8 +1185,8 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
|
|
|
1182
1185
|
setShowGlobalFilter(!showGlobalFilter);
|
|
1183
1186
|
queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
|
|
1184
1187
|
};
|
|
1185
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: localization.showHideSearch },
|
|
1186
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ onClick: handleToggleSearch }, rest), showGlobalFilter ? React__default["default"].createElement(SearchOffIcon, null) : React__default["default"].createElement(SearchIcon, null))));
|
|
1188
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch },
|
|
1189
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ onClick: handleToggleSearch }, rest, { title: undefined }), showGlobalFilter ? React__default["default"].createElement(SearchOffIcon, null) : React__default["default"].createElement(SearchIcon, null))));
|
|
1187
1190
|
};
|
|
1188
1191
|
|
|
1189
1192
|
const MRT_ToolbarInternalButtons = ({ table }) => {
|
|
@@ -1315,6 +1318,7 @@ const MRT_BottomToolbar = ({ table }) => {
|
|
|
1315
1318
|
};
|
|
1316
1319
|
|
|
1317
1320
|
const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
1321
|
+
var _a;
|
|
1318
1322
|
const { options: { icons: { MoreVertIcon }, localization, muiTableHeadCellColumnActionsButtonProps, }, } = table;
|
|
1319
1323
|
const { column } = header;
|
|
1320
1324
|
const { columnDef } = column;
|
|
@@ -1335,12 +1339,12 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
|
1335
1339
|
: columnDef.muiTableHeadCellColumnActionsButtonProps;
|
|
1336
1340
|
const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
|
|
1337
1341
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1338
|
-
React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: localization.columnActions },
|
|
1342
|
+
React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions },
|
|
1339
1343
|
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', mt: '-0.2rem', opacity: 0.5, transition: 'opacity 0.2s', width: '2rem', '&:hover': {
|
|
1340
1344
|
opacity: 1,
|
|
1341
1345
|
} }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
1342
1346
|
? iconButtonProps.sx(theme)
|
|
1343
|
-
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
|
|
1347
|
+
: iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
|
|
1344
1348
|
React__default["default"].createElement(MoreVertIcon, null))),
|
|
1345
1349
|
React__default["default"].createElement(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table })));
|
|
1346
1350
|
};
|
|
@@ -1484,7 +1488,15 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
|
1484
1488
|
displayEmpty: true,
|
|
1485
1489
|
multiple: isMultiSelectFilter,
|
|
1486
1490
|
renderValue: isMultiSelectFilter
|
|
1487
|
-
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (React__default["default"].createElement(material.Box, { sx: { opacity: 0.5 } }, filterPlaceholder)) : (React__default["default"].createElement(material.Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, selected === null || selected === void 0 ? void 0 : selected.map((value) =>
|
|
1491
|
+
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (React__default["default"].createElement(material.Box, { sx: { opacity: 0.5 } }, filterPlaceholder)) : (React__default["default"].createElement(material.Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, selected === null || selected === void 0 ? void 0 : selected.map((value) => {
|
|
1492
|
+
var _a;
|
|
1493
|
+
const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
|
|
1494
|
+
? option.value === value
|
|
1495
|
+
: option === value);
|
|
1496
|
+
return (React__default["default"].createElement(material.Chip, { key: value, label: selectedValue instanceof Object
|
|
1497
|
+
? selectedValue.text
|
|
1498
|
+
: selectedValue }));
|
|
1499
|
+
})))
|
|
1488
1500
|
: undefined,
|
|
1489
1501
|
} }, textFieldProps, { inputRef: (inputRef) => {
|
|
1490
1502
|
filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
|
|
@@ -1875,6 +1887,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
|
|
|
1875
1887
|
};
|
|
1876
1888
|
|
|
1877
1889
|
const MRT_CopyButton = ({ cell, children, table, }) => {
|
|
1890
|
+
var _a;
|
|
1878
1891
|
const { options: { localization, muiTableBodyCellCopyButtonProps }, } = table;
|
|
1879
1892
|
const { column, row } = cell;
|
|
1880
1893
|
const { columnDef } = column;
|
|
@@ -1891,14 +1904,16 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
|
|
|
1891
1904
|
const mcTableBodyCellCopyButtonProps = columnDef.muiTableBodyCellCopyButtonProps instanceof Function
|
|
1892
1905
|
? columnDef.muiTableBodyCellCopyButtonProps({
|
|
1893
1906
|
cell,
|
|
1907
|
+
column,
|
|
1908
|
+
row,
|
|
1894
1909
|
table,
|
|
1895
1910
|
})
|
|
1896
1911
|
: columnDef.muiTableBodyCellCopyButtonProps;
|
|
1897
1912
|
const buttonProps = Object.assign(Object.assign({}, mTableBodyCellCopyButtonProps), mcTableBodyCellCopyButtonProps);
|
|
1898
|
-
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: copied ? localization.copiedToClipboard : localization.clickToCopy },
|
|
1913
|
+
return (React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _a !== void 0 ? _a : (copied ? localization.copiedToClipboard : localization.clickToCopy) },
|
|
1899
1914
|
React__default["default"].createElement(material.Button, Object.assign({ onClick: (e) => handleCopy(e, cell.getValue()), size: "small", type: "button", variant: "text" }, buttonProps, { sx: (theme) => (Object.assign({ backgroundColor: 'transparent', border: 'none', color: 'inherit', cursor: 'copy', fontFamily: 'inherit', fontSize: 'inherit', letterSpacing: 'inherit', m: '-0.25rem', minWidth: 'unset', textAlign: 'inherit', textTransform: 'inherit' }, ((buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx) instanceof Function
|
|
1900
1915
|
? buttonProps.sx(theme)
|
|
1901
|
-
: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))) }), children)));
|
|
1916
|
+
: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined }), children)));
|
|
1902
1917
|
};
|
|
1903
1918
|
|
|
1904
1919
|
const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table, }) => {
|
|
@@ -2378,7 +2393,7 @@ const MRT_EditRowModal = ({ open, row, table, }) => {
|
|
|
2378
2393
|
};
|
|
2379
2394
|
|
|
2380
2395
|
const MRT_TableRoot = (props) => {
|
|
2381
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
2396
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
2382
2397
|
const bottomToolbarRef = React.useRef(null);
|
|
2383
2398
|
const editInputRefs = React.useRef({});
|
|
2384
2399
|
const filterInputRefs = React.useRef({});
|
|
@@ -2421,12 +2436,12 @@ const MRT_TableRoot = (props) => {
|
|
|
2421
2436
|
const displayColumns = React.useMemo(() => {
|
|
2422
2437
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2423
2438
|
return [
|
|
2424
|
-
columnOrder.includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: (_a = props.localization) === null || _a === void 0 ? void 0 : _a.move, size: 60 },
|
|
2425
|
-
columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React__default["default"].createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: (_c = props.localization) === null || _c === void 0 ? void 0 : _c.actions, size: 70 },
|
|
2439
|
+
columnOrder.includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: (_a = props.localization) === null || _a === void 0 ? void 0 : _a.move, size: 60 }, props.defaultDisplayColumn), (_b = props.displayColumnDefOptions) === null || _b === void 0 ? void 0 : _b['mrt-row-drag']), { id: 'mrt-row-drag' }),
|
|
2440
|
+
columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React__default["default"].createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: (_c = props.localization) === null || _c === void 0 ? void 0 : _c.actions, size: 70 }, props.defaultDisplayColumn), (_d = props.displayColumnDefOptions) === null || _d === void 0 ? void 0 : _d['mrt-row-actions']), { id: 'mrt-row-actions' }),
|
|
2426
2441
|
columnOrder.includes('mrt-row-expand') &&
|
|
2427
|
-
showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ExpandButton, { row: row, table: table })), Header: () => props.enableExpandAll ? (React__default["default"].createElement(MRT_ExpandAllButton, { table: table })) : null, header: (_e = props.localization) === null || _e === void 0 ? void 0 : _e.expand, size: 60 },
|
|
2428
|
-
columnOrder.includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: () => props.enableSelectAll ? (React__default["default"].createElement(MRT_SelectCheckbox, { selectAll: true, table: table })) : null, header: (_g = props.localization) === null || _g === void 0 ? void 0 : _g.select, size: 60 },
|
|
2429
|
-
columnOrder.includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => { var _a; return (_a = props.localization) === null || _a === void 0 ? void 0 : _a.rowNumber; }, header: (_j = props.localization) === null || _j === void 0 ? void 0 : _j.rowNumbers, size: 60 },
|
|
2442
|
+
showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ExpandButton, { row: row, table: table })), Header: () => props.enableExpandAll ? (React__default["default"].createElement(MRT_ExpandAllButton, { table: table })) : null, header: (_e = props.localization) === null || _e === void 0 ? void 0 : _e.expand, size: 60 }, props.defaultDisplayColumn), (_f = props.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-expand']), { id: 'mrt-row-expand' }),
|
|
2443
|
+
columnOrder.includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: () => props.enableSelectAll ? (React__default["default"].createElement(MRT_SelectCheckbox, { selectAll: true, table: table })) : null, header: (_g = props.localization) === null || _g === void 0 ? void 0 : _g.select, size: 60 }, props.defaultDisplayColumn), (_h = props.displayColumnDefOptions) === null || _h === void 0 ? void 0 : _h['mrt-row-select']), { id: 'mrt-row-select' }),
|
|
2444
|
+
columnOrder.includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => { var _a; return (_a = props.localization) === null || _a === void 0 ? void 0 : _a.rowNumber; }, header: (_j = props.localization) === null || _j === void 0 ? void 0 : _j.rowNumbers, size: 60 }, props.defaultDisplayColumn), (_k = props.displayColumnDefOptions) === null || _k === void 0 ? void 0 : _k['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
|
|
2430
2445
|
].filter(Boolean);
|
|
2431
2446
|
}, [
|
|
2432
2447
|
columnOrder,
|
|
@@ -2450,7 +2465,21 @@ const MRT_TableRoot = (props) => {
|
|
|
2450
2465
|
props.positionActionsColumn,
|
|
2451
2466
|
props.renderDetailPanel,
|
|
2452
2467
|
]);
|
|
2453
|
-
const columnDefs = React.useMemo(() =>
|
|
2468
|
+
const columnDefs = React.useMemo(() => {
|
|
2469
|
+
var _a, _b, _c;
|
|
2470
|
+
return prepareColumns({
|
|
2471
|
+
columnDefs: [...displayColumns, ...props.columns],
|
|
2472
|
+
columnFilterFns: (_b = (_a = props.state) === null || _a === void 0 ? void 0 : _a.columnFilterFns) !== null && _b !== void 0 ? _b : columnFilterFns,
|
|
2473
|
+
defaultDisplayColumn: (_c = props.defaultDisplayColumn) !== null && _c !== void 0 ? _c : {},
|
|
2474
|
+
filterFns: props.filterFns,
|
|
2475
|
+
sortingFns: props.sortingFns,
|
|
2476
|
+
});
|
|
2477
|
+
}, [
|
|
2478
|
+
columnFilterFns,
|
|
2479
|
+
displayColumns,
|
|
2480
|
+
props.columns,
|
|
2481
|
+
(_r = props.state) === null || _r === void 0 ? void 0 : _r.columnFilterFns,
|
|
2482
|
+
]);
|
|
2454
2483
|
const data = React.useMemo(() => {
|
|
2455
2484
|
var _a, _b, _c, _d, _e;
|
|
2456
2485
|
return (((_a = props.state) === null || _a === void 0 ? void 0 : _a.isLoading) || ((_b = props.state) === null || _b === void 0 ? void 0 : _b.showSkeletons)) &&
|
|
@@ -2466,11 +2495,11 @@ const MRT_TableRoot = (props) => {
|
|
|
2466
2495
|
});
|
|
2467
2496
|
})))
|
|
2468
2497
|
: props.data;
|
|
2469
|
-
}, [props.data, (
|
|
2498
|
+
}, [props.data, (_s = props.state) === null || _s === void 0 ? void 0 : _s.isLoading, (_t = props.state) === null || _t === void 0 ? void 0 : _t.showSkeletons]);
|
|
2470
2499
|
//@ts-ignore
|
|
2471
2500
|
const table = Object.assign(Object.assign({}, reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: reactTable.getExpandedRowModel(), getFacetedRowModel: reactTable.getFacetedRowModel(), getFilteredRowModel: reactTable.getFilteredRowModel(), getGroupedRowModel: reactTable.getGroupedRowModel(), getPaginationRowModel: reactTable.getPaginationRowModel(), getSortedRowModel: reactTable.getSortedRowModel(), onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
|
|
2472
2501
|
//@ts-ignore
|
|
2473
|
-
columns: columnDefs, data, globalFilterFn: (
|
|
2502
|
+
columns: columnDefs, data, globalFilterFn: (_v = (_u = props.filterFns) === null || _u === void 0 ? void 0 : _u[globalFilterFn]) !== null && _v !== void 0 ? _v : (_w = props.filterFns) === null || _w === void 0 ? void 0 : _w.fuzzy, initialState, state: Object.assign({ columnFilterFns,
|
|
2474
2503
|
columnOrder,
|
|
2475
2504
|
density,
|
|
2476
2505
|
draggingColumn,
|
|
@@ -2491,7 +2520,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2491
2520
|
searchInputRef,
|
|
2492
2521
|
tableContainerRef,
|
|
2493
2522
|
topToolbarRef,
|
|
2494
|
-
}, setColumnFilterFns: (
|
|
2523
|
+
}, setColumnFilterFns: (_x = props.onFilterFnsChange) !== null && _x !== void 0 ? _x : setColumnFilterFns, setDensity: (_y = props.onDensityChange) !== null && _y !== void 0 ? _y : setDensity, setDraggingColumn: (_z = props.onDraggingColumnChange) !== null && _z !== void 0 ? _z : setDraggingColumn, setDraggingRow: (_0 = props.onDraggingRowChange) !== null && _0 !== void 0 ? _0 : setDraggingRow, setEditingCell: (_1 = props.onEditingCellChange) !== null && _1 !== void 0 ? _1 : setEditingCell, setEditingRow: (_2 = props.onEditingRowChange) !== null && _2 !== void 0 ? _2 : setEditingRow, setGlobalFilterFn: (_3 = props.onGlobalFilterFnChange) !== null && _3 !== void 0 ? _3 : setGlobalFilterFn, setHoveredColumn: (_4 = props.onHoveredColumnChange) !== null && _4 !== void 0 ? _4 : setHoveredColumn, setHoveredRow: (_5 = props.onHoveredRowChange) !== null && _5 !== void 0 ? _5 : setHoveredRow, setIsFullScreen: (_6 = props.onIsFullScreenChange) !== null && _6 !== void 0 ? _6 : setIsFullScreen, setShowAlertBanner: (_7 = props.onShowAlertBannerChange) !== null && _7 !== void 0 ? _7 : setShowAlertBanner, setShowFilters: (_8 = props.onShowFiltersChange) !== null && _8 !== void 0 ? _8 : setShowFilters, setShowGlobalFilter: (_9 = props.onShowGlobalFilterChange) !== null && _9 !== void 0 ? _9 : setShowGlobalFilter });
|
|
2495
2524
|
if (props.tableInstanceRef) {
|
|
2496
2525
|
props.tableInstanceRef.current = table;
|
|
2497
2526
|
}
|
|
@@ -2503,8 +2532,8 @@ const MRT_TableRoot = (props) => {
|
|
|
2503
2532
|
};
|
|
2504
2533
|
|
|
2505
2534
|
var MaterialReactTable = (_a) => {
|
|
2506
|
-
var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onEnd', defaultColumn = { minSize: 40, maxSize: 1000, size: 180 }, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enablePinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, localization, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'all', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "localization", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
|
|
2507
|
-
return (React__default["default"].createElement(MRT_TableRoot, Object.assign({ aggregationFns: Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns), autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: defaultColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, enableGlobalFilterRankedResults: enableGlobalFilterRankedResults, enableGrouping: enableGrouping, enableHiding: enableHiding, enableMultiRowSelection: enableMultiRowSelection, enableMultiSort: enableMultiSort, enablePagination: enablePagination, enablePinning: enablePinning, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, enableSorting: enableSorting, enableStickyHeader: enableStickyHeader, enableTableFooter: enableTableFooter, enableTableHead: enableTableHead, enableToolbarInternalActions: enableToolbarInternalActions, enableTopToolbar: enableTopToolbar, filterFns: Object.assign(Object.assign({}, MRT_FilterFns), filterFns), icons: Object.assign(Object.assign({}, MRT_Default_Icons), icons), localization: Object.assign(Object.assign({}, MRT_DefaultLocalization_EN), localization), positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: Object.assign(Object.assign({}, MRT_SortingFns), sortingFns) }, rest)));
|
|
2535
|
+
var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onEnd', defaultColumn = { minSize: 40, maxSize: 1000, size: 180 }, defaultDisplayColumn, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enablePinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, localization, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'all', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "defaultDisplayColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "localization", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
|
|
2536
|
+
return (React__default["default"].createElement(MRT_TableRoot, Object.assign({ aggregationFns: Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns), autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: defaultColumn, defaultDisplayColumn: Object.assign({ columnDefType: 'display', enableClickToCopy: false, enableColumnActions: false, enableColumnDragging: false, enableColumnFilter: false, enableColumnOrdering: false, enableEditing: false, enableGlobalFilter: false, enableGrouping: false, enableHiding: false, enableResizing: false, enableSorting: false }, defaultDisplayColumn), editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, enableGlobalFilterRankedResults: enableGlobalFilterRankedResults, enableGrouping: enableGrouping, enableHiding: enableHiding, enableMultiRowSelection: enableMultiRowSelection, enableMultiSort: enableMultiSort, enablePagination: enablePagination, enablePinning: enablePinning, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, enableSorting: enableSorting, enableStickyHeader: enableStickyHeader, enableTableFooter: enableTableFooter, enableTableHead: enableTableHead, enableToolbarInternalActions: enableToolbarInternalActions, enableTopToolbar: enableTopToolbar, filterFns: Object.assign(Object.assign({}, MRT_FilterFns), filterFns), icons: Object.assign(Object.assign({}, MRT_Default_Icons), icons), localization: Object.assign(Object.assign({}, MRT_DefaultLocalization_EN), localization), positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: Object.assign(Object.assign({}, MRT_SortingFns), sortingFns) }, rest)));
|
|
2508
2537
|
};
|
|
2509
2538
|
|
|
2510
2539
|
exports.MRT_CopyButton = MRT_CopyButton;
|