material-react-table 1.7.3 → 1.8.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.
Files changed (54) hide show
  1. package/README.md +5 -13
  2. package/dist/cjs/index.js +110 -72
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/MaterialReactTable.d.ts +22 -8
  5. package/dist/cjs/types/body/MRT_TableBody.d.ts +3 -4
  6. package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +2 -3
  7. package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +4 -5
  8. package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +2 -3
  9. package/dist/cjs/types/column.utils.d.ts +3 -2
  10. package/dist/cjs/types/footer/MRT_TableFooter.d.ts +2 -3
  11. package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +2 -3
  12. package/dist/cjs/types/head/MRT_TableHead.d.ts +2 -3
  13. package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +2 -3
  14. package/dist/cjs/types/icons.d.ts +0 -1
  15. package/dist/cjs/types/table/MRT_TableRoot.d.ts +1 -272
  16. package/dist/esm/material-react-table.esm.js +108 -72
  17. package/dist/esm/material-react-table.esm.js.map +1 -1
  18. package/dist/esm/types/MaterialReactTable.d.ts +22 -8
  19. package/dist/esm/types/body/MRT_TableBody.d.ts +3 -4
  20. package/dist/esm/types/body/MRT_TableBodyCell.d.ts +2 -3
  21. package/dist/esm/types/body/MRT_TableBodyRow.d.ts +4 -5
  22. package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +2 -3
  23. package/dist/esm/types/column.utils.d.ts +3 -2
  24. package/dist/esm/types/footer/MRT_TableFooter.d.ts +2 -3
  25. package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +2 -3
  26. package/dist/esm/types/head/MRT_TableHead.d.ts +2 -3
  27. package/dist/esm/types/head/MRT_TableHeadRow.d.ts +2 -3
  28. package/dist/esm/types/icons.d.ts +0 -1
  29. package/dist/esm/types/table/MRT_TableRoot.d.ts +1 -272
  30. package/dist/index.d.ts +22 -8
  31. package/package.json +13 -14
  32. package/src/MaterialReactTable.tsx +50 -7
  33. package/src/body/MRT_TableBody.tsx +11 -10
  34. package/src/body/MRT_TableBodyCell.tsx +11 -13
  35. package/src/body/MRT_TableBodyCellValue.tsx +1 -0
  36. package/src/body/MRT_TableBodyRow.tsx +14 -7
  37. package/src/body/MRT_TableDetailPanel.tsx +2 -3
  38. package/src/buttons/MRT_ExpandAllButton.tsx +10 -8
  39. package/src/buttons/MRT_ExpandButton.tsx +10 -8
  40. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +4 -1
  41. package/src/column.utils.ts +16 -6
  42. package/src/footer/MRT_TableFooter.tsx +2 -3
  43. package/src/footer/MRT_TableFooterRow.tsx +7 -3
  44. package/src/head/MRT_TableHead.tsx +2 -3
  45. package/src/head/MRT_TableHeadCell.tsx +1 -0
  46. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
  47. package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -5
  48. package/src/head/MRT_TableHeadRow.tsx +7 -3
  49. package/src/icons.ts +0 -3
  50. package/src/inputs/MRT_EditCellTextField.tsx +38 -2
  51. package/src/menus/MRT_FilterOptionMenu.tsx +14 -5
  52. package/src/menus/MRT_RowActionMenu.tsx +12 -10
  53. package/src/table/MRT_Table.tsx +6 -5
  54. package/src/table/MRT_TableRoot.tsx +33 -19
@@ -13,7 +13,6 @@ import DensitySmallIcon from '@mui/icons-material/DensitySmall';
13
13
  import DragHandleIcon from '@mui/icons-material/DragHandle';
14
14
  import DynamicFeedIcon from '@mui/icons-material/DynamicFeed';
15
15
  import EditIcon from '@mui/icons-material/Edit';
16
- import ExpandLessIcon from '@mui/icons-material/ExpandLess';
17
16
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
18
17
  import FilterAltIcon from '@mui/icons-material/FilterAlt';
19
18
  import FilterListIcon from '@mui/icons-material/FilterList';
@@ -234,8 +233,8 @@ const getIsFirstRightPinnedColumn = (column) => {
234
233
  const getTotalRight = (table, column) => {
235
234
  return ((table.getRightLeafHeaders().length - 1 - column.getPinnedIndex()) * 200);
236
235
  };
237
- const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
238
- var _a, _b, _c, _d, _e, _f, _g;
236
+ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
237
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
239
238
  return (Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
240
239
  ? alpha(lighten(theme.palette.background.default, 0.04), 0.97)
241
240
  : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
@@ -243,21 +242,21 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
243
242
  : getIsFirstRightPinnedColumn(column)
244
243
  ? `4px 0 8px -6px ${alpha(theme.palette.common.black, 0.2)} inset`
245
244
  : undefined, display: table.options.layoutMode === 'grid' ? 'flex' : 'table-cell', flex: table.options.layoutMode === 'grid'
246
- ? `var(--col-${parseCSSVarId(column.id)}-size) 0 auto`
245
+ ? `var(--col-${parseCSSVarId((_a = header === null || header === void 0 ? void 0 : header.id) !== null && _a !== void 0 ? _a : column.id)}-size) 0 auto`
247
246
  : undefined, left: column.getIsPinned() === 'left'
248
247
  ? `${column.getStart('left')}px`
249
248
  : undefined, ml: table.options.enableColumnVirtualization &&
250
249
  column.getIsPinned() === 'left' &&
251
250
  column.getPinnedIndex() === 0
252
- ? `-${column.getSize() * ((_b = (_a = table.getState().columnPinning.left) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 1)}px`
251
+ ? `-${column.getSize() * ((_c = (_b = table.getState().columnPinning.left) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 1)}px`
253
252
  : undefined, mr: table.options.enableColumnVirtualization &&
254
253
  column.getIsPinned() === 'right' &&
255
254
  column.getPinnedIndex() === table.getVisibleLeafColumns().length - 1
256
255
  ? `-${column.getSize() *
257
- ((_d = (_c = table.getState().columnPinning.right) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 1) *
256
+ ((_e = (_d = table.getState().columnPinning.right) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 1) *
258
257
  1.2}px`
259
- : undefined, opacity: ((_e = table.getState().draggingColumn) === null || _e === void 0 ? void 0 : _e.id) === column.id ||
260
- ((_f = table.getState().hoveredColumn) === null || _f === void 0 ? void 0 : _f.id) === column.id
258
+ : undefined, opacity: ((_f = table.getState().draggingColumn) === null || _f === void 0 ? void 0 : _f.id) === column.id ||
259
+ ((_g = table.getState().hoveredColumn) === null || _g === void 0 ? void 0 : _g.id) === column.id
261
260
  ? 0.5
262
261
  : 1, position: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
263
262
  ? 'sticky'
@@ -267,7 +266,7 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
267
266
  ? 'none'
268
267
  : `padding 150ms ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
269
268
  ? tableCellProps.sx(theme)
270
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${parseCSSVarId(column.id)}-size) * 1px), ${(_g = column.columnDef.minSize) !== null && _g !== void 0 ? _g : 30}px)`, width: `calc(var(--col-${parseCSSVarId(column.id)}-size) * 1px)` }));
269
+ : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${parseCSSVarId((_h = header === null || header === void 0 ? void 0 : header.id) !== null && _h !== void 0 ? _h : column.id)}-size) * 1px), ${(_j = column.columnDef.minSize) !== null && _j !== void 0 ? _j : 30}px)`, width: `calc(var(--col-${parseCSSVarId((_k = header === null || header === void 0 ? void 0 : header.id) !== null && _k !== void 0 ? _k : column.id)}-size) * 1px)` }));
271
270
  };
272
271
  const MRT_DefaultColumn = {
273
272
  filterVariant: 'text',
@@ -289,7 +288,12 @@ const MRT_DefaultDisplayColumn = {
289
288
  enableResizing: false,
290
289
  enableSorting: false,
291
290
  };
292
- const parseCSSVarId = (id) => id.replaceAll('.', '_').replaceAll(' ', '_').replaceAll('+', '_');
291
+ const parseCSSVarId = (id) => id
292
+ .replaceAll('.', '_')
293
+ .replaceAll(' ', '_')
294
+ .replaceAll('+', '_')
295
+ .replaceAll('(', '_')
296
+ .replaceAll(')', '_');
293
297
 
294
298
  const fuzzy$1 = (row, columnId, filterValue, addMeta) => {
295
299
  const itemRank = rankItem(row.getValue(columnId), filterValue, {
@@ -387,7 +391,6 @@ const MRT_Default_Icons = {
387
391
  DragHandleIcon,
388
392
  DynamicFeedIcon,
389
393
  EditIcon,
390
- ExpandLessIcon,
391
394
  ExpandMoreIcon,
392
395
  FilterAltIcon,
393
396
  FilterListIcon,
@@ -422,7 +425,7 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
422
425
  Math.max(...Object.values(rowA.columnFiltersMeta).map((v) => v.rank));
423
426
 
424
427
  const MRT_ExpandAllButton = ({ table }) => {
425
- var _a;
428
+ var _a, _b;
426
429
  const { getIsAllRowsExpanded, getIsSomeRowsExpanded, getCanSomeRowsExpand, getState, options: { icons: { KeyboardDoubleArrowDownIcon }, localization, muiExpandAllButtonProps, renderDetailPanel, }, toggleAllRowsExpanded, } = table;
427
430
  const { density, isLoading } = getState();
428
431
  const iconButtonProps = muiExpandAllButtonProps instanceof Function
@@ -435,15 +438,14 @@ const MRT_ExpandAllButton = ({ table }) => {
435
438
  React.createElement("span", null,
436
439
  React.createElement(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: isLoading || (!renderDetailPanel && !getCanSomeRowsExpand()), onClick: () => toggleAllRowsExpanded(!isAllRowsExpanded) }, 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
437
440
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
438
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
439
- React.createElement(KeyboardDoubleArrowDownIcon, { style: {
440
- transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
441
- transition: 'transform 150ms',
442
- } })))));
441
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }), (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (React.createElement(KeyboardDoubleArrowDownIcon, { style: {
442
+ transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
443
+ transition: 'transform 150ms',
444
+ } }))))));
443
445
  };
444
446
 
445
447
  const MRT_ExpandButton = ({ row, table }) => {
446
- var _a;
448
+ var _a, _b;
447
449
  const { getState, options: { icons: { ExpandMoreIcon }, localization, muiExpandButtonProps, renderDetailPanel, }, } = table;
448
450
  const { density } = getState();
449
451
  const iconButtonProps = muiExpandButtonProps instanceof Function
@@ -463,11 +465,10 @@ const MRT_ExpandButton = ({ row, table }) => {
463
465
  React.createElement("span", null,
464
466
  React.createElement(IconButton, Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !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
465
467
  ? iconButtonProps.sx(theme)
466
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
467
- React.createElement(ExpandMoreIcon, { style: {
468
- transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
469
- transition: 'transform 150ms',
470
- } })))));
468
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }), (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (React.createElement(ExpandMoreIcon, { style: {
469
+ transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
470
+ transition: 'transform 150ms',
471
+ } }))))));
471
472
  };
472
473
 
473
474
  const mrtFilterOptions = (localization) => [
@@ -562,6 +563,7 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
562
563
  const { globalFilterFn, density } = getState();
563
564
  const { column } = header !== null && header !== void 0 ? header : {};
564
565
  const { columnDef } = column !== null && column !== void 0 ? column : {};
566
+ const currentFilterValue = column === null || column === void 0 ? void 0 : column.getFilterValue();
565
567
  const allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
566
568
  const internalFilterOptions = useMemo(() => mrtFilterOptions(localization).filter((filterOption) => columnDef
567
569
  ? allowedColumnFilterOptions === undefined ||
@@ -573,12 +575,16 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
573
575
  if (header && column) {
574
576
  setColumnFilterFns((prev) => (Object.assign(Object.assign({}, prev), { [header.id]: option })));
575
577
  if (['empty', 'notEmpty'].includes(option)) {
576
- column.setFilterValue(' ');
578
+ if (currentFilterValue !== ' ') {
579
+ column.setFilterValue(' ');
580
+ }
577
581
  }
578
582
  else if ((columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === 'multi-select' ||
579
583
  ['arrIncludesSome', 'arrIncludesAll', 'arrIncludes'].includes(option)) {
580
- column.setFilterValue([]);
581
- setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue([]);
584
+ if (currentFilterValue === null || currentFilterValue === void 0 ? void 0 : currentFilterValue.length) {
585
+ column.setFilterValue([]);
586
+ setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue([]);
587
+ }
582
588
  }
583
589
  else if ((columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === 'range' ||
584
590
  ['between', 'betweenInclusive', 'inNumberRange'].includes(option)) {
@@ -586,8 +592,10 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
586
592
  setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue('');
587
593
  }
588
594
  else {
589
- column.setFilterValue('');
590
- setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue('');
595
+ if (!['', undefined].includes(currentFilterValue)) {
596
+ column.setFilterValue('');
597
+ setFilterValue === null || setFilterValue === void 0 ? void 0 : setFilterValue('');
598
+ }
591
599
  }
592
600
  }
593
601
  else {
@@ -966,11 +974,13 @@ const MRT_RowActionMenu = ({ anchorEl, handleEdit, row, setAnchorEl, table, }) =
966
974
  return (React.createElement(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
967
975
  dense: density === 'compact',
968
976
  } },
969
- enableEditing && (React.createElement(MenuItem, { onClick: handleEdit, sx: commonMenuItemStyles },
970
- React.createElement(Box, { sx: commonListItemStyles },
971
- React.createElement(ListItemIcon, null,
972
- React.createElement(EditIcon, null)),
973
- localization.edit))), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 :
977
+ enableEditing instanceof Function
978
+ ? enableEditing(row)
979
+ : enableEditing && (React.createElement(MenuItem, { onClick: handleEdit, sx: commonMenuItemStyles },
980
+ React.createElement(Box, { sx: commonListItemStyles },
981
+ React.createElement(ListItemIcon, null,
982
+ React.createElement(EditIcon, null)),
983
+ localization.edit))), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 :
974
984
  renderRowActionMenuItems({
975
985
  row,
976
986
  table,
@@ -1037,7 +1047,10 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
1037
1047
  setEditingRow(Object.assign({}, row));
1038
1048
  setAnchorEl(null);
1039
1049
  };
1040
- return (React.createElement(React.Fragment, null, renderRowActions ? (React.createElement(React.Fragment, null, renderRowActions({ cell, row, table }))) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (React.createElement(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems && enableEditing ? (React.createElement(Tooltip, { placement: "right", arrow: true, title: localization.edit },
1050
+ return (React.createElement(React.Fragment, null, renderRowActions ? (React.createElement(React.Fragment, null, renderRowActions({ cell, row, table }))) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (React.createElement(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
1051
+ (enableEditing instanceof Function
1052
+ ? enableEditing(row)
1053
+ : enableEditing) ? (React.createElement(Tooltip, { placement: "right", arrow: true, title: localization.edit },
1041
1054
  React.createElement(IconButton, { "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode },
1042
1055
  React.createElement(EditIcon, null)))) : renderRowActionMenuItems ? (React.createElement(React.Fragment, null,
1043
1056
  React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions },
@@ -1464,7 +1477,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1464
1477
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1465
1478
  return (React.createElement(React.Fragment, null,
1466
1479
  React.createElement(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 },
1467
- React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-8px -4px', opacity: 0.5, transform: 'scale(0.85)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1480
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-8px -4px', opacity: 0.5, transform: 'scale(0.85) translateX(-4px)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1468
1481
  opacity: 1,
1469
1482
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1470
1483
  ? iconButtonProps.sx(theme)
@@ -1815,10 +1828,8 @@ const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
1815
1828
  const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1816
1829
  var _a;
1817
1830
  const { getState, options: { columnResizeMode }, setColumnSizingInfo, } = table;
1818
- const { density, showColumnFilters } = getState();
1831
+ const { density } = getState();
1819
1832
  const { column } = header;
1820
- const { columnDef } = column;
1821
- const { columnDefType } = columnDef;
1822
1833
  return (React.createElement(Box, { onDoubleClick: () => {
1823
1834
  setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
1824
1835
  column.resetSize();
@@ -1840,7 +1851,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1840
1851
  React.createElement(Divider, { flexItem: true, orientation: "vertical", sx: {
1841
1852
  borderRadius: '2px',
1842
1853
  borderWidth: '2px',
1843
- height: showColumnFilters && columnDefType === 'data' ? '3.5rem' : '1.5rem',
1854
+ height: '24px',
1844
1855
  touchAction: 'none',
1845
1856
  transition: column.getIsResizing()
1846
1857
  ? undefined
@@ -1958,6 +1969,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
1958
1969
  ? 2
1959
1970
  : 1 }, getCommonCellStyles({
1960
1971
  column,
1972
+ header,
1961
1973
  table,
1962
1974
  tableCellProps,
1963
1975
  theme,
@@ -2033,7 +2045,7 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2033
2045
  };
2034
2046
 
2035
2047
  const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2036
- var _a;
2048
+ var _a, _b;
2037
2049
  const { getState, options: { muiTableBodyCellEditTextFieldProps }, refs: { editInputRefs }, setEditingCell, setEditingRow, } = table;
2038
2050
  const { column, row } = cell;
2039
2051
  const { columnDef } = column;
@@ -2051,6 +2063,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2051
2063
  })
2052
2064
  : columnDef.muiTableBodyCellEditTextFieldProps;
2053
2065
  const textFieldProps = Object.assign(Object.assign({}, mTableBodyCellEditTextFieldProps), mcTableBodyCellEditTextFieldProps);
2066
+ const isSelectEdit = columnDef.editVariant === 'select';
2054
2067
  const saveRow = (newValue) => {
2055
2068
  if (editingRow) {
2056
2069
  setEditingRow(Object.assign(Object.assign({}, editingRow), { _valuesCache: Object.assign(Object.assign({}, editingRow._valuesCache), { [column.id]: newValue }) }));
@@ -2080,18 +2093,37 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2080
2093
  if (columnDef.Edit) {
2081
2094
  return React.createElement(React.Fragment, null, (_a = columnDef.Edit) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table }));
2082
2095
  }
2083
- return (React.createElement(TextField, Object.assign({ disabled: columnDef.enableEditing === false, fullWidth: true, inputRef: (inputRef) => {
2096
+ return (React.createElement(TextField, Object.assign({ disabled: (columnDef.enableEditing instanceof Function
2097
+ ? columnDef.enableEditing(row)
2098
+ : columnDef.enableEditing) === false, fullWidth: true, inputRef: (inputRef) => {
2084
2099
  if (inputRef) {
2085
2100
  editInputRefs.current[column.id] = inputRef;
2086
2101
  if (textFieldProps.inputRef) {
2087
2102
  textFieldProps.inputRef = inputRef;
2088
2103
  }
2089
2104
  }
2090
- }, label: showLabel ? column.columnDef.header : undefined, margin: "none", name: column.id, placeholder: columnDef.header, value: value, variant: "standard" }, textFieldProps, { onClick: (e) => {
2105
+ }, label: showLabel ? column.columnDef.header : undefined, margin: "none", name: column.id, placeholder: columnDef.header, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { onClick: (e) => {
2091
2106
  var _a;
2092
2107
  e.stopPropagation();
2093
2108
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
2094
- }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown })));
2109
+ }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }), (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _b === void 0 ? void 0 : _b.map((option) => {
2110
+ let value;
2111
+ let text;
2112
+ if (typeof option !== 'object') {
2113
+ value = option;
2114
+ text = option;
2115
+ }
2116
+ else {
2117
+ value = option.value;
2118
+ text = option.text;
2119
+ }
2120
+ return (React.createElement(MenuItem, { key: value, sx: {
2121
+ display: 'flex',
2122
+ m: 0,
2123
+ alignItems: 'center',
2124
+ gap: '0.5rem',
2125
+ }, value: value }, text));
2126
+ })));
2095
2127
  };
2096
2128
 
2097
2129
  const MRT_CopyButton = ({ cell, children, table, }) => {
@@ -2175,6 +2207,7 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2175
2207
  renderedCellValue = cell.renderValue();
2176
2208
  }
2177
2209
  if (enableFilterMatchHighlighting &&
2210
+ columnDef.enableFilterMatchHighlighting !== false &&
2178
2211
  renderedCellValue &&
2179
2212
  allowedTypes.includes(typeof renderedCellValue) &&
2180
2213
  ((filterValue &&
@@ -2211,7 +2244,7 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2211
2244
  };
2212
2245
 
2213
2246
  const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowIndex, rowRef, table, virtualCell, }) => {
2214
- var _a, _b;
2247
+ var _a, _b, _c, _d;
2215
2248
  const theme = useTheme();
2216
2249
  const { getState, options: { editingMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, enableRowNumbers, layoutMode, muiTableBodyCellProps, muiTableBodyCellSkeletonProps, rowNumberMode, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
2217
2250
  const { draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, density, isLoading, showSkeletons, } = getState();
@@ -2267,8 +2300,10 @@ const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowInde
2267
2300
  }
2268
2301
  : undefined;
2269
2302
  }, [draggingColumn, draggingRow, hoveredColumn, hoveredRow, rowIndex]);
2270
- const isEditable = (enableEditing || columnDef.enableEditing) &&
2271
- columnDef.enableEditing !== false;
2303
+ const isEditable = (enableEditing instanceof Function ? enableEditing(row) : enableEditing) &&
2304
+ (columnDef.enableEditing instanceof Function
2305
+ ? columnDef.enableEditing(row)
2306
+ : columnDef.enableEditing) !== false;
2272
2307
  const isEditing = isEditable &&
2273
2308
  editingMode !== 'modal' &&
2274
2309
  (editingMode === 'table' ||
@@ -2278,9 +2313,7 @@ const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowInde
2278
2313
  const handleDoubleClick = (event) => {
2279
2314
  var _a;
2280
2315
  (_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, event);
2281
- if ((enableEditing || columnDef.enableEditing) &&
2282
- columnDef.enableEditing !== false &&
2283
- editingMode === 'cell') {
2316
+ if (isEditable && editingMode === 'cell') {
2284
2317
  setEditingCell(cell);
2285
2318
  queueMicrotask(() => {
2286
2319
  var _a;
@@ -2325,8 +2358,7 @@ const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowInde
2325
2358
  : 1.25)}rem`
2326
2359
  : undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0, '&:hover': {
2327
2360
  backgroundColor: enableHover &&
2328
- enableEditing &&
2329
- columnDef.enableEditing !== false &&
2361
+ isEditable &&
2330
2362
  ['table', 'cell'].includes(editingMode !== null && editingMode !== void 0 ? editingMode : '')
2331
2363
  ? theme.palette.mode === 'dark'
2332
2364
  ? `${lighten(theme.palette.background.default, 0.2)} !important`
@@ -2338,12 +2370,12 @@ const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowInde
2338
2370
  theme,
2339
2371
  tableCellProps,
2340
2372
  })), draggingBorders)) }),
2341
- React.createElement(React.Fragment, null, cell.getIsPlaceholder() ? null : isLoading || showSkeletons ? (React.createElement(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2373
+ React.createElement(React.Fragment, null, cell.getIsPlaceholder() ? ((_b = (_a = columnDef.PlaceholderCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) !== null && _b !== void 0 ? _b : null) : isLoading || showSkeletons ? (React.createElement(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2342
2374
  rowNumberMode === 'static' &&
2343
2375
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (React.createElement(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
2344
2376
  (column.id === 'mrt-row-select' ||
2345
2377
  column.id === 'mrt-row-expand' ||
2346
- !row.getIsGrouped()) ? ((_a = columnDef.Cell) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
2378
+ !row.getIsGrouped()) ? ((_c = columnDef.Cell) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
2347
2379
  cell,
2348
2380
  renderedCellValue: cell.renderValue(),
2349
2381
  column,
@@ -2353,8 +2385,8 @@ const MRT_TableBodyCell = ({ cell, enableHover, measureElement, numRows, rowInde
2353
2385
  columnDef.enableClickToCopy !== false ? (React.createElement(MRT_CopyButton, { cell: cell, table: table },
2354
2386
  React.createElement(MRT_TableBodyCellValue, { cell: cell, table: table }))) : (React.createElement(MRT_TableBodyCellValue, { cell: cell, table: table }))),
2355
2387
  cell.getIsGrouped() && !columnDef.GroupedCell && (React.createElement(React.Fragment, null,
2356
- " (", (_b = row.subRows) === null || _b === void 0 ? void 0 :
2357
- _b.length,
2388
+ " (", (_d = row.subRows) === null || _d === void 0 ? void 0 :
2389
+ _d.length,
2358
2390
  ")"))));
2359
2391
  };
2360
2392
  const Memo_MRT_TableBodyCell = memo(MRT_TableBodyCell, (prev, next) => next.cell === prev.cell);
@@ -2632,8 +2664,10 @@ const MRT_Table = ({ table }) => {
2632
2664
  const headers = getFlatHeaders();
2633
2665
  const colSizes = {};
2634
2666
  for (let i = 0; i < headers.length; i++) {
2635
- const h = headers[i];
2636
- colSizes[`--col-${parseCSSVarId(h.column.id)}-size`] = h.getSize();
2667
+ const header = headers[i];
2668
+ const colSize = header.getSize();
2669
+ colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize;
2670
+ colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize;
2637
2671
  }
2638
2672
  return colSizes;
2639
2673
  }, [columns, columnSizing, columnSizingInfo]);
@@ -2783,7 +2817,7 @@ const MRT_EditRowModal = ({ open, row, table, }) => {
2783
2817
  };
2784
2818
 
2785
2819
  const MRT_TableRoot = (props) => {
2786
- 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, _10, _11;
2820
+ 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, _10, _11, _12, _13;
2787
2821
  const bottomToolbarRef = useRef(null);
2788
2822
  const editInputRefs = useRef({});
2789
2823
  const filterInputRefs = useRef({});
@@ -2824,18 +2858,18 @@ const MRT_TableRoot = (props) => {
2824
2858
  const [showGlobalFilter, setShowGlobalFilter] = useState((_q = initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) !== null && _q !== void 0 ? _q : false);
2825
2859
  const [showToolbarDropZone, setShowToolbarDropZone] = useState((_r = initialState === null || initialState === void 0 ? void 0 : initialState.showToolbarDropZone) !== null && _r !== void 0 ? _r : false);
2826
2860
  const displayColumns = useMemo(() => {
2827
- var _a, _b, _c, _d, _e;
2861
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2828
2862
  return [
2829
- columnOrder.includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: props.localization.move, size: 60 }, props.defaultDisplayColumn), (_a = props.displayColumnDefOptions) === null || _a === void 0 ? void 0 : _a['mrt-row-drag']), { id: 'mrt-row-drag' }),
2830
- columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React.createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: props.localization.actions, size: 70 }, props.defaultDisplayColumn), (_b = props.displayColumnDefOptions) === null || _b === void 0 ? void 0 : _b['mrt-row-actions']), { id: 'mrt-row-actions' }),
2831
- columnOrder.includes('mrt-row-expand') &&
2832
- showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_ExpandButton, { row: row, table: table })), Header: props.enableExpandAll
2863
+ ((_b = (_a = props.state) === null || _a === void 0 ? void 0 : _a.columnOrder) !== null && _b !== void 0 ? _b : columnOrder).includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: props.localization.move, size: 60 }, props.defaultDisplayColumn), (_c = props.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-drag']), { id: 'mrt-row-drag' }),
2864
+ ((_e = (_d = props.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React.createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: props.localization.actions, size: 70 }, props.defaultDisplayColumn), (_f = props.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-actions']), { id: 'mrt-row-actions' }),
2865
+ ((_h = (_g = props.state) === null || _g === void 0 ? void 0 : _g.columnOrder) !== null && _h !== void 0 ? _h : columnOrder).includes('mrt-row-expand') &&
2866
+ showExpandColumn(props, (_k = (_j = props.state) === null || _j === void 0 ? void 0 : _j.grouping) !== null && _k !== void 0 ? _k : grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_ExpandButton, { row: row, table: table })), Header: props.enableExpandAll
2833
2867
  ? () => React.createElement(MRT_ExpandAllButton, { table: table })
2834
- : null, header: props.localization.expand, size: 60 }, props.defaultDisplayColumn), (_c = props.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-expand']), { id: 'mrt-row-expand' }),
2835
- columnOrder.includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: props.enableSelectAll && props.enableMultiRowSelection
2868
+ : null, header: props.localization.expand, size: 60 }, props.defaultDisplayColumn), (_l = props.displayColumnDefOptions) === null || _l === void 0 ? void 0 : _l['mrt-row-expand']), { id: 'mrt-row-expand' }),
2869
+ ((_o = (_m = props.state) === null || _m === void 0 ? void 0 : _m.columnOrder) !== null && _o !== void 0 ? _o : columnOrder).includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: props.enableSelectAll && props.enableMultiRowSelection
2836
2870
  ? () => React.createElement(MRT_SelectCheckbox, { selectAll: true, table: table })
2837
- : null, header: props.localization.select, size: 60 }, props.defaultDisplayColumn), (_d = props.displayColumnDefOptions) === null || _d === void 0 ? void 0 : _d['mrt-row-select']), { id: 'mrt-row-select' }),
2838
- columnOrder.includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => props.localization.rowNumber, header: props.localization.rowNumbers, size: 60 }, props.defaultDisplayColumn), (_e = props.displayColumnDefOptions) === null || _e === void 0 ? void 0 : _e['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
2871
+ : null, header: props.localization.select, size: 60 }, props.defaultDisplayColumn), (_p = props.displayColumnDefOptions) === null || _p === void 0 ? void 0 : _p['mrt-row-select']), { id: 'mrt-row-select' }),
2872
+ ((_r = (_q = props.state) === null || _q === void 0 ? void 0 : _q.columnOrder) !== null && _r !== void 0 ? _r : columnOrder).includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => props.localization.rowNumber, header: props.localization.rowNumbers, size: 60 }, props.defaultDisplayColumn), (_s = props.displayColumnDefOptions) === null || _s === void 0 ? void 0 : _s['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
2839
2873
  ].filter(Boolean);
2840
2874
  }, [
2841
2875
  columnOrder,
@@ -2858,6 +2892,8 @@ const MRT_TableRoot = (props) => {
2858
2892
  props.localization,
2859
2893
  props.positionActionsColumn,
2860
2894
  props.renderDetailPanel,
2895
+ (_s = props.state) === null || _s === void 0 ? void 0 : _s.columnOrder,
2896
+ (_t = props.state) === null || _t === void 0 ? void 0 : _t.grouping,
2861
2897
  ]);
2862
2898
  const columnDefs = useMemo(() => {
2863
2899
  var _a, _b, _c;
@@ -2873,7 +2909,7 @@ const MRT_TableRoot = (props) => {
2873
2909
  columnFilterFns,
2874
2910
  displayColumns,
2875
2911
  props.columns,
2876
- (_s = props.state) === null || _s === void 0 ? void 0 : _s.columnFilterFns,
2912
+ (_u = props.state) === null || _u === void 0 ? void 0 : _u.columnFilterFns,
2877
2913
  ]);
2878
2914
  const data = useMemo(() => {
2879
2915
  var _a, _b, _c, _d, _e;
@@ -2887,11 +2923,11 @@ const MRT_TableRoot = (props) => {
2887
2923
  [getColumnId(col)]: null,
2888
2924
  }))))
2889
2925
  : props.data;
2890
- }, [props.data, (_t = props.state) === null || _t === void 0 ? void 0 : _t.isLoading, (_u = props.state) === null || _u === void 0 ? void 0 : _u.showSkeletons]);
2926
+ }, [props.data, (_v = props.state) === null || _v === void 0 ? void 0 : _v.isLoading, (_w = props.state) === null || _w === void 0 ? void 0 : _w.showSkeletons]);
2891
2927
  //@ts-ignore
2892
2928
  const table = Object.assign(Object.assign({}, useReactTable(Object.assign(Object.assign({ getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel(), getFacetedRowModel: getFacetedRowModel(), getFilteredRowModel: getFilteredRowModel(), getGroupedRowModel: getGroupedRowModel(), getPaginationRowModel: getPaginationRowModel(), getSortedRowModel: getSortedRowModel(), onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
2893
2929
  //@ts-ignore
2894
- columns: columnDefs, data, globalFilterFn: (_w = (_v = props.filterFns) === null || _v === void 0 ? void 0 : _v[globalFilterFn]) !== null && _w !== void 0 ? _w : (_x = props.filterFns) === null || _x === void 0 ? void 0 : _x.fuzzy, initialState, state: Object.assign({ columnFilterFns,
2930
+ columns: columnDefs, data, globalFilterFn: (_y = (_x = props.filterFns) === null || _x === void 0 ? void 0 : _x[globalFilterFn]) !== null && _y !== void 0 ? _y : (_z = props.filterFns) === null || _z === void 0 ? void 0 : _z.fuzzy, initialState, state: Object.assign({ columnFilterFns,
2895
2931
  columnOrder,
2896
2932
  density,
2897
2933
  draggingColumn,
@@ -2915,7 +2951,7 @@ const MRT_TableRoot = (props) => {
2915
2951
  tableHeadCellRefs,
2916
2952
  tablePaperRef,
2917
2953
  topToolbarRef,
2918
- }, setColumnFilterFns: (_y = props.onColumnFilterFnsChange) !== null && _y !== void 0 ? _y : setColumnFilterFns, setDensity: (_z = props.onDensityChange) !== null && _z !== void 0 ? _z : setDensity, setDraggingColumn: (_0 = props.onDraggingColumnChange) !== null && _0 !== void 0 ? _0 : setDraggingColumn, setDraggingRow: (_1 = props.onDraggingRowChange) !== null && _1 !== void 0 ? _1 : setDraggingRow, setEditingCell: (_2 = props.onEditingCellChange) !== null && _2 !== void 0 ? _2 : setEditingCell, setEditingRow: (_3 = props.onEditingRowChange) !== null && _3 !== void 0 ? _3 : setEditingRow, setGlobalFilterFn: (_4 = props.onGlobalFilterFnChange) !== null && _4 !== void 0 ? _4 : setGlobalFilterFn, setHoveredColumn: (_5 = props.onHoveredColumnChange) !== null && _5 !== void 0 ? _5 : setHoveredColumn, setHoveredRow: (_6 = props.onHoveredRowChange) !== null && _6 !== void 0 ? _6 : setHoveredRow, setIsFullScreen: (_7 = props.onIsFullScreenChange) !== null && _7 !== void 0 ? _7 : setIsFullScreen, setShowAlertBanner: (_8 = props.onShowAlertBannerChange) !== null && _8 !== void 0 ? _8 : setShowAlertBanner, setShowFilters: (_9 = props.onShowFiltersChange) !== null && _9 !== void 0 ? _9 : setShowFilters, setShowGlobalFilter: (_10 = props.onShowGlobalFilterChange) !== null && _10 !== void 0 ? _10 : setShowGlobalFilter, setShowToolbarDropZone: (_11 = props.onShowToolbarDropZoneChange) !== null && _11 !== void 0 ? _11 : setShowToolbarDropZone });
2954
+ }, setColumnFilterFns: (_0 = props.onColumnFilterFnsChange) !== null && _0 !== void 0 ? _0 : setColumnFilterFns, setDensity: (_1 = props.onDensityChange) !== null && _1 !== void 0 ? _1 : setDensity, setDraggingColumn: (_2 = props.onDraggingColumnChange) !== null && _2 !== void 0 ? _2 : setDraggingColumn, setDraggingRow: (_3 = props.onDraggingRowChange) !== null && _3 !== void 0 ? _3 : setDraggingRow, setEditingCell: (_4 = props.onEditingCellChange) !== null && _4 !== void 0 ? _4 : setEditingCell, setEditingRow: (_5 = props.onEditingRowChange) !== null && _5 !== void 0 ? _5 : setEditingRow, setGlobalFilterFn: (_6 = props.onGlobalFilterFnChange) !== null && _6 !== void 0 ? _6 : setGlobalFilterFn, setHoveredColumn: (_7 = props.onHoveredColumnChange) !== null && _7 !== void 0 ? _7 : setHoveredColumn, setHoveredRow: (_8 = props.onHoveredRowChange) !== null && _8 !== void 0 ? _8 : setHoveredRow, setIsFullScreen: (_9 = props.onIsFullScreenChange) !== null && _9 !== void 0 ? _9 : setIsFullScreen, setShowAlertBanner: (_10 = props.onShowAlertBannerChange) !== null && _10 !== void 0 ? _10 : setShowAlertBanner, setShowFilters: (_11 = props.onShowFiltersChange) !== null && _11 !== void 0 ? _11 : setShowFilters, setShowGlobalFilter: (_12 = props.onShowGlobalFilterChange) !== null && _12 !== void 0 ? _12 : setShowGlobalFilter, setShowToolbarDropZone: (_13 = props.onShowToolbarDropZoneChange) !== null && _13 !== void 0 ? _13 : setShowToolbarDropZone });
2919
2955
  if (props.tableInstanceRef) {
2920
2956
  props.tableInstanceRef.current = table;
2921
2957
  }
@@ -3062,5 +3098,5 @@ const MaterialReactTable = (_a) => {
3062
3098
  return (React.createElement(MRT_TableRoot, Object.assign({ aggregationFns: _aggregationFns, autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: _defaultColumn, defaultDisplayColumn: _defaultDisplayColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilterMatchHighlighting: enableFilterMatchHighlighting, 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: _filterFns, icons: _icons, layoutMode: layoutMode, localization: _localization, manualFiltering: manualFiltering, manualGrouping: manualGrouping, manualPagination: manualPagination, manualSorting: manualSorting, positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: _sortingFns }, rest)));
3063
3099
  };
3064
3100
 
3065
- export { MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_ShowHideColumnsButton, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable as default };
3101
+ export { MRT_AggregationFns, MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_ShowHideColumnsButton, MRT_SortingFns, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable as default };
3066
3102
  //# sourceMappingURL=material-react-table.esm.js.map