material-react-table 1.12.0 → 1.13.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 (77) hide show
  1. package/dist/cjs/index.js +264 -161
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/MaterialReactTable.d.ts +1 -1
  4. package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +7 -0
  5. package/dist/cjs/types/types.d.ts +12 -2
  6. package/dist/esm/material-react-table.esm.js +268 -167
  7. package/dist/esm/material-react-table.esm.js.map +1 -1
  8. package/dist/esm/types/MaterialReactTable.d.ts +1 -1
  9. package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +7 -0
  10. package/dist/esm/types/types.d.ts +12 -2
  11. package/dist/index.d.ts +14 -10
  12. package/locales/cs.esm.js +89 -91
  13. package/locales/cs.js +89 -91
  14. package/locales/da.esm.js +89 -90
  15. package/locales/da.js +89 -90
  16. package/locales/de.esm.js +89 -90
  17. package/locales/de.js +89 -90
  18. package/locales/en.esm.js +89 -90
  19. package/locales/en.js +89 -90
  20. package/locales/es.esm.js +89 -90
  21. package/locales/es.js +89 -90
  22. package/locales/fa.esm.js +89 -90
  23. package/locales/fa.js +89 -90
  24. package/locales/fi.esm.js +89 -91
  25. package/locales/fi.js +89 -91
  26. package/locales/fr.esm.js +89 -90
  27. package/locales/fr.js +89 -90
  28. package/locales/hu.esm.js +89 -90
  29. package/locales/hu.js +89 -90
  30. package/locales/id.esm.js +89 -91
  31. package/locales/id.js +89 -91
  32. package/locales/it.esm.js +89 -90
  33. package/locales/it.js +89 -90
  34. package/locales/ja.esm.js +89 -90
  35. package/locales/ja.js +89 -90
  36. package/locales/nl.esm.js +89 -90
  37. package/locales/nl.js +89 -90
  38. package/locales/pl.esm.js +89 -90
  39. package/locales/pl.js +89 -90
  40. package/locales/pt-BR.esm.js +89 -90
  41. package/locales/pt-BR.js +89 -90
  42. package/locales/pt.esm.js +89 -90
  43. package/locales/pt.js +89 -90
  44. package/locales/ro.esm.js +89 -90
  45. package/locales/ro.js +89 -90
  46. package/locales/ru.esm.js +89 -90
  47. package/locales/ru.js +89 -90
  48. package/locales/sk.esm.js +89 -91
  49. package/locales/sk.js +89 -91
  50. package/locales/sr-Cyrl-RS.esm.js +89 -90
  51. package/locales/sr-Cyrl-RS.js +89 -90
  52. package/locales/sr-Latn-RS.esm.js +89 -90
  53. package/locales/sr-Latn-RS.js +89 -90
  54. package/locales/sv.esm.js +89 -90
  55. package/locales/sv.js +89 -90
  56. package/locales/tr.esm.js +89 -90
  57. package/locales/tr.js +89 -90
  58. package/locales/uk.esm.js +89 -90
  59. package/locales/uk.js +89 -90
  60. package/locales/vi.esm.js +89 -90
  61. package/locales/vi.js +89 -90
  62. package/locales/zh-Hans.esm.js +89 -89
  63. package/locales/zh-Hans.js +89 -89
  64. package/locales/zh-Hant.esm.js +89 -89
  65. package/locales/zh-Hant.js +89 -89
  66. package/package.json +23 -23
  67. package/src/MaterialReactTable.tsx +2 -0
  68. package/src/body/MRT_TableBody.tsx +2 -3
  69. package/src/body/MRT_TableBodyRow.tsx +2 -3
  70. package/src/column.utils.ts +5 -1
  71. package/src/head/MRT_TableHeadCellFilterContainer.tsx +4 -1
  72. package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
  73. package/src/inputs/MRT_FilterRangeSlider.tsx +134 -0
  74. package/src/inputs/MRT_FilterTextField.tsx +24 -3
  75. package/src/menus/MRT_FilterOptionMenu.tsx +8 -1
  76. package/src/table/MRT_TableRoot.tsx +28 -6
  77. package/src/types.ts +22 -2
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useMemo, useState, useRef, useCallback, useEffect, Fragment as Fragment$1, memo, useLayoutEffect } from 'react';
3
- import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedRowModel, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
3
+ import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
4
4
  import { rankItem, rankings, compareItems } from '@tanstack/match-sorter-utils';
5
5
  import { alpha, lighten, useTheme, darken } from '@mui/material/styles';
6
6
  import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
@@ -65,6 +65,7 @@ import Table from '@mui/material/Table';
65
65
  import TableHead from '@mui/material/TableHead';
66
66
  import TableRow from '@mui/material/TableRow';
67
67
  import TableCell from '@mui/material/TableCell';
68
+ import { Stack, Slider, FormHelperText } from '@mui/material';
68
69
  import Badge from '@mui/material/Badge';
69
70
  import TableSortLabel from '@mui/material/TableSortLabel';
70
71
  import TableBody from '@mui/material/TableBody';
@@ -74,21 +75,21 @@ import TableFooter from '@mui/material/TableFooter';
74
75
  import DialogActions from '@mui/material/DialogActions';
75
76
  import DialogContent from '@mui/material/DialogContent';
76
77
  import DialogTitle from '@mui/material/DialogTitle';
77
- import Stack from '@mui/material/Stack';
78
-
79
- /******************************************************************************
80
- Copyright (c) Microsoft Corporation.
81
-
82
- Permission to use, copy, modify, and/or distribute this software for any
83
- purpose with or without fee is hereby granted.
84
-
85
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
86
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
87
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
88
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
89
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
90
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
91
- PERFORMANCE OF THIS SOFTWARE.
78
+ import Stack$1 from '@mui/material/Stack';
79
+
80
+ /******************************************************************************
81
+ Copyright (c) Microsoft Corporation.
82
+
83
+ Permission to use, copy, modify, and/or distribute this software for any
84
+ purpose with or without fee is hereby granted.
85
+
86
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
87
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
88
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
89
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
90
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
91
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
92
+ PERFORMANCE OF THIS SOFTWARE.
92
93
  ***************************************************************************** */
93
94
  function __rest(s, e) {
94
95
  var t = {};
@@ -314,7 +315,8 @@ const getDefaultColumnOrderIds = (props) => {
314
315
  const getDefaultColumnFilterFn = (columnDef) => {
315
316
  if (columnDef.filterVariant === 'multi-select')
316
317
  return 'arrIncludesSome';
317
- if (columnDef.filterVariant === 'range')
318
+ if (columnDef.filterVariant === 'range' ||
319
+ columnDef.filterVariant === 'range-slider')
318
320
  return 'betweenInclusive';
319
321
  if (columnDef.filterVariant === 'select' ||
320
322
  columnDef.filterVariant === 'checkbox')
@@ -534,14 +536,14 @@ const MRT_ExpandAllButton = ({ table }) => {
534
536
  ? muiExpandAllButtonProps({ table })
535
537
  : muiExpandAllButtonProps;
536
538
  const isAllRowsExpanded = getIsAllRowsExpanded();
537
- return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isAllRowsExpanded)
539
+ return (jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isAllRowsExpanded)
538
540
  ? localization.collapseAll
539
- : localization.expandAll }, { children: jsx("span", { children: jsx(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
541
+ : localization.expandAll, children: jsx("span", { children: jsx(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
540
542
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
541
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(KeyboardDoubleArrowDownIcon, { style: {
543
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(KeyboardDoubleArrowDownIcon, { style: {
542
544
  transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
543
545
  transition: 'transform 150ms',
544
- } })) })) }) })));
546
+ } })) })) }) }));
545
547
  };
546
548
 
547
549
  const MRT_ExpandButton = ({ row, table, }) => {
@@ -559,14 +561,14 @@ const MRT_ExpandButton = ({ row, table, }) => {
559
561
  row.toggleExpanded();
560
562
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
561
563
  };
562
- return (jsx(Tooltip, Object.assign({ arrow: true, disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isExpanded)
564
+ return (jsx(Tooltip, { arrow: true, disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isExpanded)
563
565
  ? localization.collapse
564
- : localization.expand }, { children: jsx("span", { children: jsx(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
566
+ : localization.expand, children: jsx("span", { children: jsx(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
565
567
  ? iconButtonProps.sx(theme)
566
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(ExpandMoreIcon, { style: {
568
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(ExpandMoreIcon, { style: {
567
569
  transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
568
570
  transition: 'transform 150ms',
569
- } })) })) }) })));
571
+ } })) })) }) }));
570
572
  };
571
573
 
572
574
  const mrtFilterOptions = (localization) => [
@@ -665,7 +667,13 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
665
667
  const { column } = header !== null && header !== void 0 ? header : {};
666
668
  const { columnDef } = column !== null && column !== void 0 ? column : {};
667
669
  const currentFilterValue = column === null || column === void 0 ? void 0 : column.getFilterValue();
668
- const allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
670
+ let allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
671
+ if ((columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === 'range-slider') {
672
+ allowedColumnFilterOptions = [
673
+ ...rangeModes,
674
+ ...(allowedColumnFilterOptions !== null && allowedColumnFilterOptions !== void 0 ? allowedColumnFilterOptions : []),
675
+ ].filter((option) => rangeModes.includes(option));
676
+ }
669
677
  const internalFilterOptions = useMemo(() => mrtFilterOptions(localization).filter((filterOption) => columnDef
670
678
  ? allowedColumnFilterOptions === undefined ||
671
679
  (allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.includes(filterOption.option))
@@ -733,9 +741,9 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
733
741
  onSelect === null || onSelect === void 0 ? void 0 : onSelect();
734
742
  };
735
743
  const filterOption = !!header && columnDef ? columnDef._filterFn : globalFilterFn;
736
- return (jsx(Menu, Object.assign({ anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, onClose: () => setAnchorEl(null), open: !!anchorEl, MenuListProps: {
744
+ return (jsx(Menu, { anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, onClose: () => setAnchorEl(null), open: !!anchorEl, MenuListProps: {
737
745
  dense: density === 'compact',
738
- } }, { children: (_d = (header && column && columnDef
746
+ }, children: (_d = (header && column && columnDef
739
747
  ? (_c = (_b = columnDef.renderColumnFilterModeMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
740
748
  column: column,
741
749
  internalFilterOptions,
@@ -751,13 +759,13 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
751
759
  internalFilterOptions,
752
760
  onSelectFilterMode: handleSelectFilterMode,
753
761
  table,
754
- }))) !== null && _d !== void 0 ? _d : internalFilterOptions.map(({ option, label, divider, symbol }, index) => (jsxs(MenuItem, Object.assign({ divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
762
+ }))) !== null && _d !== void 0 ? _d : internalFilterOptions.map(({ option, label, divider, symbol }, index) => (jsxs(MenuItem, { divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
755
763
  alignItems: 'center',
756
764
  display: 'flex',
757
765
  gap: '2ch',
758
766
  my: 0,
759
767
  py: '6px',
760
- }, value: option }, { children: [jsx(Box, Object.assign({ sx: { fontSize: '1.25rem', width: '2ch' } }, { children: symbol })), label] }), index))) })));
768
+ }, value: option, children: [jsx(Box, { sx: { fontSize: '1.25rem', width: '2ch' }, children: symbol }), label] }, index))) }));
761
769
  };
762
770
 
763
771
  const commonMenuItemStyles = {
@@ -831,9 +839,9 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
831
839
  !isSelectFilter &&
832
840
  (allowedColumnFilterOptions === undefined ||
833
841
  !!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
834
- return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
842
+ return (jsxs(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
835
843
  dense: density === 'compact',
836
- } }, { children: [(_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
844
+ }, children: [(_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
837
845
  closeMenu: () => setAnchorEl(null),
838
846
  column,
839
847
  table,
@@ -844,47 +852,47 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
844
852
  })) !== null && _d !== void 0 ? _d : (enableSorting &&
845
853
  column.getCanSort() &&
846
854
  [
847
- enableSortingRemoval !== false && (jsx(MenuItem, Object.assign({ disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(ClearAllIcon, {}) }), localization.clearSort] })) }), 0)),
848
- jsx(MenuItem, Object.assign({ disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] })) }), 1),
849
- jsx(MenuItem, Object.assign({ divider: enableColumnFilters || enableGrouping || enableHiding, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(SortIcon, {}) }), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] })) }), 2),
855
+ enableSortingRemoval !== false && (jsx(MenuItem, { disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ClearAllIcon, {}) }), localization.clearSort] }) }, 0)),
856
+ jsx(MenuItem, { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }) }, 1),
857
+ jsx(MenuItem, { divider: enableColumnFilters || enableGrouping || enableHiding, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, {}) }), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 2),
850
858
  ].filter(Boolean)), enableColumnFilters &&
851
859
  column.getCanFilter() &&
852
860
  [
853
- jsx(MenuItem, Object.assign({ disabled: !column.getFilterValue(), onClick: handleClearFilter, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] })) }), 0),
854
- jsxs(MenuItem, Object.assign({ disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
861
+ jsx(MenuItem, { disabled: !column.getFilterValue(), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 0),
862
+ jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
855
863
  ? handleOpenFilterModeMenu
856
- : handleFilterByColumn, sx: commonMenuItemStyles }, { children: [jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] })), showFilterModeSubMenu && (jsx(IconButton, Object.assign({ onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 } }, { children: jsx(ArrowRightIcon, {}) })))] }), 1),
864
+ : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsx(ArrowRightIcon, {}) }))] }, 1),
857
865
  showFilterModeSubMenu && (jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 2)),
858
866
  ].filter(Boolean), enableGrouping &&
859
867
  column.getCanGroup() && [
860
- jsx(MenuItem, Object.assign({ divider: enablePinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(DynamicFeedIcon, {}) }), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] })) }), 0),
868
+ jsx(MenuItem, { divider: enablePinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(DynamicFeedIcon, {}) }), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] }) }, 0),
861
869
  ], enablePinning &&
862
870
  column.getCanPin() && [
863
- jsx(MenuItem, Object.assign({ disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] })) }), 0),
864
- jsx(MenuItem, Object.assign({ disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] })) }), 1),
865
- jsx(MenuItem, Object.assign({ disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, {}) }), localization.unpin] })) }), 2),
871
+ jsx(MenuItem, { disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] }) }, 0),
872
+ jsx(MenuItem, { disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] }) }, 1),
873
+ jsx(MenuItem, { disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, {}) }), localization.unpin] }) }, 2),
866
874
  ], enableColumnResizing &&
867
875
  column.getCanResize() && [
868
- jsx(MenuItem, Object.assign({ disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(RestartAltIcon, {}) }), localization.resetColumnSize] })) }), 0),
876
+ jsx(MenuItem, { disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(RestartAltIcon, {}) }), localization.resetColumnSize] }) }, 0),
869
877
  ], enableHiding && [
870
- jsx(MenuItem, Object.assign({ disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(VisibilityOffIcon, {}) }), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 : _j.replace('{column}', String(columnDef.header))] })) }), 0),
871
- jsx(MenuItem, Object.assign({ disabled: !Object.values(columnVisibility).filter((visible) => !visible)
872
- .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(ViewColumnIcon, {}) }), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 : _k.replace('{column}', String(columnDef.header))] })) }), 1),
873
- ]] })));
878
+ jsx(MenuItem, { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(VisibilityOffIcon, {}) }), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 : _j.replace('{column}', String(columnDef.header))] }) }, 0),
879
+ jsx(MenuItem, { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
880
+ .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ViewColumnIcon, {}) }), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 : _k.replace('{column}', String(columnDef.header))] }) }, 1),
881
+ ]] }));
874
882
  };
875
883
 
876
884
  const MRT_RowActionMenu = ({ anchorEl, handleEdit, row, setAnchorEl, table, }) => {
877
885
  const { getState, options: { icons: { EditIcon }, enableEditing, localization, renderRowActionMenuItems, }, } = table;
878
886
  const { density } = getState();
879
- return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), MenuListProps: {
887
+ return (jsxs(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), MenuListProps: {
880
888
  dense: density === 'compact',
881
- } }, { children: [enableEditing instanceof Function
889
+ }, children: [enableEditing instanceof Function
882
890
  ? enableEditing(row)
883
- : enableEditing && (jsx(MenuItem, Object.assign({ onClick: handleEdit, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(EditIcon, {}) }), localization.edit] })) }))), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
891
+ : enableEditing && (jsx(MenuItem, { onClick: handleEdit, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(EditIcon, {}) }), localization.edit] }) })), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
884
892
  row,
885
893
  table,
886
894
  closeMenu: () => setAnchorEl(null),
887
- })] })));
895
+ })] }));
888
896
  };
889
897
 
890
898
  const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
@@ -911,7 +919,7 @@ const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
911
919
  values: (_b = editingRow === null || editingRow === void 0 ? void 0 : editingRow._valuesCache) !== null && _b !== void 0 ? _b : Object.assign({}, row.original),
912
920
  });
913
921
  };
914
- return (jsx(Box, Object.assign({ onClick: (e) => e.stopPropagation(), sx: { display: 'flex', gap: '0.75rem' } }, { children: variant === 'icon' ? (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.cancel }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.cancel, onClick: handleCancel }, { children: jsx(CancelIcon, {}) })) })), jsx(Tooltip, Object.assign({ arrow: true, title: localization.save }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.save, color: "info", onClick: handleSave }, { children: jsx(SaveIcon, {}) })) }))] })) : (jsxs(Fragment, { children: [jsx(Button, Object.assign({ onClick: handleCancel }, { children: localization.cancel })), jsx(Button, Object.assign({ onClick: handleSave, variant: "contained" }, { children: localization.save }))] })) })));
922
+ return (jsx(Box, { onClick: (e) => e.stopPropagation(), sx: { display: 'flex', gap: '0.75rem' }, children: variant === 'icon' ? (jsxs(Fragment, { children: [jsx(Tooltip, { arrow: true, title: localization.cancel, children: jsx(IconButton, { "aria-label": localization.cancel, onClick: handleCancel, children: jsx(CancelIcon, {}) }) }), jsx(Tooltip, { arrow: true, title: localization.save, children: jsx(IconButton, { "aria-label": localization.save, color: "info", onClick: handleSave, children: jsx(SaveIcon, {}) }) })] })) : (jsxs(Fragment, { children: [jsx(Button, { onClick: handleCancel, children: localization.cancel }), jsx(Button, { onClick: handleSave, variant: "contained", children: localization.save })] })) }));
915
923
  };
916
924
 
917
925
  const commonIconButtonStyles = {
@@ -941,7 +949,7 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
941
949
  return (jsx(Fragment, { children: renderRowActions ? (renderRowActions({ cell, row, table })) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (jsx(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
942
950
  (enableEditing instanceof Function
943
951
  ? enableEditing(row)
944
- : enableEditing) ? (jsx(Tooltip, Object.assign({ placement: "right", arrow: true, title: localization.edit }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode }, { children: jsx(EditIcon, {}) })) }))) : renderRowActionMenuItems ? (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles }, { children: jsx(MoreHorizIcon, {}) })) })), jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
952
+ : enableEditing) ? (jsx(Tooltip, { placement: "right", arrow: true, title: localization.edit, children: jsx(IconButton, { "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode, children: jsx(EditIcon, {}) }) })) : renderRowActionMenuItems ? (jsxs(Fragment, { children: [jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions, children: jsx(IconButton, { "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles, children: jsx(MoreHorizIcon, {}) }) }), jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
945
953
  };
946
954
 
947
955
  const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
@@ -975,11 +983,11 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
975
983
  }, 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
976
984
  ? checkboxProps.sx(theme)
977
985
  : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))), title: undefined });
978
- return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
986
+ return (jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
979
987
  ? localization.toggleSelectAll
980
- : localization.toggleSelectRow) }, { children: enableMultiRowSelection === false ? (jsx(Radio, Object.assign({}, commonProps))) : (jsx(Checkbox, Object.assign({ indeterminate: selectAll
988
+ : localization.toggleSelectRow), children: enableMultiRowSelection === false ? (jsx(Radio, Object.assign({}, commonProps))) : (jsx(Checkbox, Object.assign({ indeterminate: selectAll
981
989
  ? table.getIsSomeRowsSelected() && !allRowsSelected
982
- : row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps))) })));
990
+ : row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps))) }));
983
991
  };
984
992
 
985
993
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -1018,15 +1026,15 @@ const MRT_GlobalFilterTextField = ({ table, }) => {
1018
1026
  }
1019
1027
  isMounted.current = true;
1020
1028
  }, [globalFilter]);
1021
- return (jsxs(Collapse, Object.assign({ in: showGlobalFilter, orientation: "horizontal", unmountOnExit: true, mountOnEnter: true }, { children: [jsx(TextField, Object.assign({ placeholder: localization.search, onChange: handleChange, value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "standard", InputProps: {
1022
- startAdornment: enableGlobalFilterModes ? (jsx(InputAdornment, Object.assign({ position: "start" }, { children: jsx(Tooltip, Object.assign({ arrow: true, title: localization.changeSearchMode }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } }, { children: jsx(SearchIcon, {}) })) })) }))) : (jsx(SearchIcon, { style: { marginRight: '4px' } })),
1023
- endAdornment: (jsx(InputAdornment, Object.assign({ position: "end" }, { children: jsx(Tooltip, Object.assign({ arrow: true, title: (_a = localization.clearSearch) !== null && _a !== void 0 ? _a : '' }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small" }, { children: jsx(CloseIcon, {}) })) }) })) }))),
1029
+ return (jsxs(Collapse, { in: showGlobalFilter, orientation: "horizontal", unmountOnExit: true, mountOnEnter: true, children: [jsx(TextField, Object.assign({ placeholder: localization.search, onChange: handleChange, value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "standard", InputProps: {
1030
+ startAdornment: enableGlobalFilterModes ? (jsx(InputAdornment, { position: "start", children: jsx(Tooltip, { arrow: true, title: localization.changeSearchMode, children: jsx(IconButton, { "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsx(SearchIcon, {}) }) }) })) : (jsx(SearchIcon, { style: { marginRight: '4px' } })),
1031
+ endAdornment: (jsx(InputAdornment, { position: "end", children: jsx(Tooltip, { arrow: true, title: (_a = localization.clearSearch) !== null && _a !== void 0 ? _a : '', children: jsx("span", { children: jsx(IconButton, { "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small", children: jsx(CloseIcon, {}) }) }) }) })),
1024
1032
  } }, textFieldProps, { inputRef: (inputRef) => {
1025
1033
  searchInputRef.current = inputRef;
1026
1034
  if (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputRef) {
1027
1035
  textFieldProps.inputRef = inputRef;
1028
1036
  }
1029
- } })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table, onSelect: handleClear })] })));
1037
+ } })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table, onSelect: handleClear })] }));
1030
1038
  };
1031
1039
 
1032
1040
  const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
@@ -1035,12 +1043,12 @@ const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
1035
1043
  const linearProgressProps = muiLinearProgressProps instanceof Function
1036
1044
  ? muiLinearProgressProps({ isTopToolbar, table })
1037
1045
  : muiLinearProgressProps;
1038
- return (jsx(Collapse, Object.assign({ in: isLoading || showProgressBars, mountOnEnter: true, unmountOnExit: true, sx: {
1046
+ return (jsx(Collapse, { in: isLoading || showProgressBars, mountOnEnter: true, unmountOnExit: true, sx: {
1039
1047
  bottom: isTopToolbar ? 0 : undefined,
1040
1048
  position: 'absolute',
1041
1049
  top: !isTopToolbar ? 0 : undefined,
1042
1050
  width: '100%',
1043
- } }, { children: jsx(LinearProgress, Object.assign({ "aria-label": "Loading", "aria-busy": "true", sx: { position: 'relative' } }, linearProgressProps)) })));
1051
+ }, children: jsx(LinearProgress, Object.assign({ "aria-label": "Loading", "aria-busy": "true", sx: { position: 'relative' } }, linearProgressProps)) }));
1044
1052
  };
1045
1053
 
1046
1054
  const MRT_TablePagination = ({ table, position = 'bottom', }) => {
@@ -1096,13 +1104,13 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
1096
1104
  ? (_b = (_a = localization.selectedCountOfRowCountRowsSelected) === null || _a === void 0 ? void 0 : _a.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) === null || _b === void 0 ? void 0 : _b.replace('{rowCount}', (rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length).toString())
1097
1105
  : null;
1098
1106
  const groupedByMessage = grouping.length > 0 ? (jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxs(Fragment$1, { children: [index > 0 ? localization.thenBy : '', jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index}-${columnId}`)))] })) : null;
1099
- return (jsx(Collapse, Object.assign({ in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0 }, { children: jsxs(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', mb: stackAlertBanner
1107
+ return (jsx(Collapse, { in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0, children: jsxs(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', mb: stackAlertBanner
1100
1108
  ? 0
1101
1109
  : positionToolbarAlertBanner === 'bottom'
1102
1110
  ? '-1rem'
1103
1111
  : undefined, right: 0, top: 0, width: '100%', zIndex: 2 }, ((alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx) instanceof Function
1104
1112
  ? alertProps.sx(theme)
1105
- : alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx))) }, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsx(AlertTitle, { children: alertProps.title }), jsxs(Box, Object.assign({ sx: { p: '0.5rem 1rem' } }, { children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectMessage || groupedByMessage) && (jsx("br", {})), selectMessage, selectMessage && groupedByMessage && jsx("br", {}), groupedByMessage] }))] })) })));
1113
+ : alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx))), children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsx(AlertTitle, { children: alertProps.title }), jsxs(Box, { sx: { p: '0.5rem 1rem' }, children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectMessage || groupedByMessage) && (jsx("br", {})), selectMessage, selectMessage && groupedByMessage && jsx("br", {}), groupedByMessage] })] })) }));
1106
1114
  };
1107
1115
 
1108
1116
  const MRT_FullScreenToggleButton = (_a) => {
@@ -1113,7 +1121,7 @@ const MRT_FullScreenToggleButton = (_a) => {
1113
1121
  const handleToggleFullScreen = () => {
1114
1122
  setIsFullScreen(!isFullScreen);
1115
1123
  };
1116
- return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined }, { children: isFullScreen ? jsx(FullscreenExitIcon, {}) : jsx(FullscreenIcon, {}) })) })));
1124
+ return (jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen, children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined, children: isFullScreen ? jsx(FullscreenExitIcon, {}) : jsx(FullscreenIcon, {}) })) }));
1117
1125
  };
1118
1126
 
1119
1127
  const MRT_ColumnPinningButtons = ({ column, table, }) => {
@@ -1121,17 +1129,17 @@ const MRT_ColumnPinningButtons = ({ column, table, }) => {
1121
1129
  const handlePinColumn = (pinDirection) => {
1122
1130
  column.pin(pinDirection);
1123
1131
  };
1124
- return (jsx(Box, Object.assign({ sx: { minWidth: '70px', textAlign: 'center' } }, { children: column.getIsPinned() ? (jsx(Tooltip, Object.assign({ arrow: true, title: localization.unpin }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn(false), size: "small" }, { children: jsx(PushPinIcon, {}) })) }))) : (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.pinToLeft }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn('left'), size: "small" }, { children: jsx(PushPinIcon, { style: {
1132
+ return (jsx(Box, { sx: { minWidth: '70px', textAlign: 'center' }, children: column.getIsPinned() ? (jsx(Tooltip, { arrow: true, title: localization.unpin, children: jsx(IconButton, { onClick: () => handlePinColumn(false), size: "small", children: jsx(PushPinIcon, {}) }) })) : (jsxs(Fragment, { children: [jsx(Tooltip, { arrow: true, title: localization.pinToLeft, children: jsx(IconButton, { onClick: () => handlePinColumn('left'), size: "small", children: jsx(PushPinIcon, { style: {
1125
1133
  transform: 'rotate(90deg)',
1126
- } }) })) })), jsx(Tooltip, Object.assign({ arrow: true, title: localization.pinToRight }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn('right'), size: "small" }, { children: jsx(PushPinIcon, { style: {
1134
+ } }) }) }), jsx(Tooltip, { arrow: true, title: localization.pinToRight, children: jsx(IconButton, { onClick: () => handlePinColumn('right'), size: "small", children: jsx(PushPinIcon, { style: {
1127
1135
  transform: 'rotate(-90deg)',
1128
- } }) })) }))] })) })));
1136
+ } }) }) })] })) }));
1129
1137
  };
1130
1138
 
1131
1139
  const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
1132
1140
  var _a;
1133
1141
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
1134
- return (jsx(Tooltip, Object.assign({ 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 }, { children: jsx(IconButton, Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
1142
+ return (jsx(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, children: jsx(IconButton, Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
1135
1143
  var _a;
1136
1144
  e.stopPropagation();
1137
1145
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, e);
@@ -1142,7 +1150,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
1142
1150
  cursor: 'grabbing',
1143
1151
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1144
1152
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
1145
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: jsx(DragHandleIcon, {}) })) })));
1153
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined, children: jsx(DragHandleIcon, {}) })) }));
1146
1154
  };
1147
1155
 
1148
1156
  const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredColumn, column, table, }) => {
@@ -1183,7 +1191,7 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredCol
1183
1191
  setHoveredColumn(column);
1184
1192
  }
1185
1193
  };
1186
- return (jsxs(Fragment, { children: [jsx(MenuItem, Object.assign({ disableRipple: true, ref: menuItemRef, onDragEnter: handleDragEnter, sx: (theme) => ({
1194
+ return (jsxs(Fragment, { children: [jsx(MenuItem, { disableRipple: true, ref: menuItemRef, onDragEnter: handleDragEnter, sx: (theme) => ({
1187
1195
  alignItems: 'center',
1188
1196
  justifyContent: 'flex-start',
1189
1197
  my: 0,
@@ -1196,11 +1204,11 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredCol
1196
1204
  : 'none',
1197
1205
  pl: `${(column.depth + 0.5) * 2}rem`,
1198
1206
  py: '6px',
1199
- }) }, { children: jsxs(Box, Object.assign({ sx: {
1207
+ }), children: jsxs(Box, { sx: {
1200
1208
  display: 'flex',
1201
1209
  flexWrap: 'nowrap',
1202
1210
  gap: '8px',
1203
- } }, { children: [columnDefType !== 'group' &&
1211
+ }, children: [columnDefType !== 'group' &&
1204
1212
  enableColumnOrdering &&
1205
1213
  !allColumns.some((col) => col.columnDef.columnDefType === 'group') &&
1206
1214
  (columnDef.enableColumnOrdering !== false ? (jsx(MRT_GrabHandleButton, { onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table })) : (jsx(Box, { sx: { width: '28px' } }))), enablePinning &&
@@ -1211,7 +1219,7 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredCol
1211
1219
  opacity: columnDefType !== 'display' ? 1 : 0.5,
1212
1220
  },
1213
1221
  },
1214
- }, checked: switchChecked, control: jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility }, { children: jsx(Switch, {}) })), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsx(Typography, Object.assign({ sx: { alignSelf: 'center' } }, { children: columnDef.header })))] })) })), (_a = column.columns) === null || _a === void 0 ? void 0 : _a.map((c, i) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
1222
+ }, checked: switchChecked, control: jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility, children: jsx(Switch, {}) }), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsx(Typography, { sx: { alignSelf: 'center' }, children: columnDef.header }))] }) }), (_a = column.columns) === null || _a === void 0 ? void 0 : _a.map((c, i) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
1215
1223
  };
1216
1224
 
1217
1225
  const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
@@ -1242,14 +1250,14 @@ const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
1242
1250
  getRightLeafColumns(),
1243
1251
  ]);
1244
1252
  const [hoveredColumn, setHoveredColumn] = useState(null);
1245
- return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
1253
+ return (jsxs(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
1246
1254
  dense: density === 'compact',
1247
- } }, { children: [jsxs(Box, Object.assign({ sx: {
1255
+ }, children: [jsxs(Box, { sx: {
1248
1256
  display: 'flex',
1249
1257
  justifyContent: 'space-between',
1250
1258
  p: '0.5rem',
1251
1259
  pt: 0,
1252
- } }, { children: [enableHiding && (jsx(Button, Object.assign({ disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns }, { children: localization.hideAll }))), enableColumnOrdering && (jsx(Button, Object.assign({ onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)) }, { children: localization.resetOrder }))), enablePinning && (jsx(Button, Object.assign({ disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true) }, { children: localization.unpinAll }))), enableHiding && (jsx(Button, Object.assign({ disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true) }, { children: localization.showAll })))] })), jsx(Divider, {}), allColumns.map((column, index) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] })));
1260
+ }, children: [enableHiding && (jsx(Button, { disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns, children: localization.hideAll })), enableColumnOrdering && (jsx(Button, { onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)), children: localization.resetOrder })), enablePinning && (jsx(Button, { disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true), children: localization.unpinAll })), enableHiding && (jsx(Button, { disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true), children: localization.showAll }))] }), jsx(Divider, {}), allColumns.map((column, index) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] }));
1253
1261
  };
1254
1262
 
1255
1263
  const MRT_ShowHideColumnsButton = (_a) => {
@@ -1260,7 +1268,7 @@ const MRT_ShowHideColumnsButton = (_a) => {
1260
1268
  const handleClick = (event) => {
1261
1269
  setAnchorEl(event.currentTarget);
1262
1270
  };
1263
- return (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined }, { children: jsx(ViewColumnIcon, {}) })) })), anchorEl && (jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
1271
+ return (jsxs(Fragment, { children: [jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns, children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined, children: jsx(ViewColumnIcon, {}) })) }), anchorEl && (jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
1264
1272
  };
1265
1273
 
1266
1274
  const MRT_ToggleDensePaddingButton = (_a) => {
@@ -1276,7 +1284,7 @@ const MRT_ToggleDensePaddingButton = (_a) => {
1276
1284
  : 'comfortable';
1277
1285
  setDensity(nextDensity);
1278
1286
  };
1279
- return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined }, { children: density === 'compact' ? (jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsx(DensityMediumIcon, {})) : (jsx(DensityLargeIcon, {})) })) })));
1287
+ return (jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity, children: jsx(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined, children: density === 'compact' ? (jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsx(DensityMediumIcon, {})) : (jsx(DensityLargeIcon, {})) })) }));
1280
1288
  };
1281
1289
 
1282
1290
  const MRT_ToggleFiltersButton = (_a) => {
@@ -1287,7 +1295,7 @@ const MRT_ToggleFiltersButton = (_a) => {
1287
1295
  const handleToggleShowFilters = () => {
1288
1296
  setShowColumnFilters(!showColumnFilters);
1289
1297
  };
1290
- return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined }, { children: showColumnFilters ? jsx(FilterListOffIcon, {}) : jsx(FilterListIcon, {}) })) })));
1298
+ return (jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters, children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined, children: showColumnFilters ? jsx(FilterListOffIcon, {}) : jsx(FilterListIcon, {}) })) }));
1291
1299
  };
1292
1300
 
1293
1301
  const MRT_ToggleGlobalFilterButton = (_a) => {
@@ -1299,21 +1307,21 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
1299
1307
  setShowGlobalFilter(!showGlobalFilter);
1300
1308
  queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
1301
1309
  };
1302
- return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch }, { children: jsx(IconButton, Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined }, { children: showGlobalFilter ? jsx(SearchOffIcon, {}) : jsx(SearchIcon, {}) })) })));
1310
+ return (jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch, children: jsx(IconButton, Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined, children: showGlobalFilter ? jsx(SearchOffIcon, {}) : jsx(SearchIcon, {}) })) }));
1303
1311
  };
1304
1312
 
1305
1313
  const MRT_ToolbarInternalButtons = ({ table, }) => {
1306
1314
  var _a;
1307
1315
  const { options: { enableColumnFilters, enableColumnOrdering, enableDensityToggle, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableHiding, enablePinning, initialState, renderToolbarInternalActions, }, } = table;
1308
- return (jsx(Box, Object.assign({ sx: {
1316
+ return (jsx(Box, { sx: {
1309
1317
  alignItems: 'center',
1310
1318
  display: 'flex',
1311
1319
  zIndex: 3,
1312
- } }, { children: (_a = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
1320
+ }, children: (_a = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
1313
1321
  table,
1314
1322
  })) !== null && _a !== void 0 ? _a : (jsxs(Fragment, { children: [enableFilters &&
1315
1323
  enableGlobalFilter &&
1316
- !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (jsx(MRT_ToggleGlobalFilterButton, { table: table })), enableFilters && enableColumnFilters && (jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enablePinning) && (jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsx(MRT_FullScreenToggleButton, { table: table }))] })) })));
1324
+ !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (jsx(MRT_ToggleGlobalFilterButton, { table: table })), enableFilters && enableColumnFilters && (jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enablePinning) && (jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsx(MRT_FullScreenToggleButton, { table: table }))] })) }));
1317
1325
  };
1318
1326
 
1319
1327
  const MRT_ToolbarDropZone = ({ table, }) => {
@@ -1332,7 +1340,7 @@ const MRT_ToolbarDropZone = ({ table, }) => {
1332
1340
  !grouping.includes(draggingColumn.id));
1333
1341
  }
1334
1342
  }, [enableGrouping, draggingColumn, grouping]);
1335
- return (jsx(Fade, Object.assign({ in: showToolbarDropZone }, { children: jsx(Box, Object.assign({ className: "Mui-ToolbarDropZone", sx: (theme) => ({
1343
+ return (jsx(Fade, { in: showToolbarDropZone, children: jsx(Box, { className: "Mui-ToolbarDropZone", sx: (theme) => ({
1336
1344
  alignItems: 'center',
1337
1345
  backgroundColor: alpha(theme.palette.info.main, (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone' ? 0.2 : 0.1),
1338
1346
  backdropFilter: 'blur(4px)',
@@ -1344,7 +1352,7 @@ const MRT_ToolbarDropZone = ({ table, }) => {
1344
1352
  position: 'absolute',
1345
1353
  width: '100%',
1346
1354
  zIndex: 4,
1347
- }), onDragEnter: handleDragEnter }, { children: jsx(Typography, Object.assign({ fontStyle: "italic" }, { children: localization.dropToGroupBy.replace('{column}', (_b = (_a = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _a === void 0 ? void 0 : _a.header) !== null && _b !== void 0 ? _b : '') })) })) })));
1355
+ }), onDragEnter: handleDragEnter, children: jsx(Typography, { fontStyle: "italic", children: localization.dropToGroupBy.replace('{column}', (_b = (_a = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _a === void 0 ? void 0 : _a.header) !== null && _b !== void 0 ? _b : '') }) }) }));
1348
1356
  };
1349
1357
 
1350
1358
  const commonToolbarStyles = ({ theme }) => ({
@@ -1376,7 +1384,7 @@ const MRT_TopToolbar = ({ table, }) => {
1376
1384
  }
1377
1385
  }, sx: (theme) => (Object.assign(Object.assign({ position: isFullScreen ? 'sticky' : undefined, top: isFullScreen ? '0' : undefined }, commonToolbarStyles({ theme })), ((toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx) instanceof Function
1378
1386
  ? toolbarProps.sx(theme)
1379
- : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }, { children: [positionToolbarAlertBanner === 'top' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, Object.assign({ sx: {
1387
+ : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))), children: [positionToolbarAlertBanner === 'top' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, { sx: {
1380
1388
  alignItems: 'flex-start',
1381
1389
  boxSizing: 'border-box',
1382
1390
  display: 'flex',
@@ -1386,12 +1394,12 @@ const MRT_TopToolbar = ({ table, }) => {
1386
1394
  right: 0,
1387
1395
  top: 0,
1388
1396
  width: '100%',
1389
- } }, { children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsx("span", {}), enableToolbarInternalActions ? (jsxs(Box, Object.assign({ sx: {
1397
+ }, children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsx("span", {}), enableToolbarInternalActions ? (jsxs(Box, { sx: {
1390
1398
  display: 'flex',
1391
1399
  flexWrap: 'wrap-reverse',
1392
1400
  justifyContent: 'flex-end',
1393
- } }, { children: [enableGlobalFilter && positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })), jsx(MRT_ToolbarInternalButtons, { table: table })] }))) : (enableGlobalFilter &&
1394
- positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })))] })), enablePagination &&
1401
+ }, children: [enableGlobalFilter && positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })), jsx(MRT_ToolbarInternalButtons, { table: table })] })) : (enableGlobalFilter &&
1402
+ positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })))] }), enablePagination &&
1395
1403
  ['top', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsx(MRT_TablePagination, { table: table, position: "top" })), jsx(MRT_LinearProgressBar, { isTopToolbar: true, table: table })] })));
1396
1404
  };
1397
1405
 
@@ -1413,21 +1421,21 @@ const MRT_BottomToolbar = ({ table, }) => {
1413
1421
  }
1414
1422
  }, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, commonToolbarStyles({ theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${alpha(theme.palette.common.black, 0.1)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), ((toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx) instanceof Function
1415
1423
  ? toolbarProps.sx(theme)
1416
- : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }, { children: [jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, Object.assign({ sx: {
1424
+ : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))), children: [jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, { sx: {
1417
1425
  alignItems: 'center',
1418
1426
  boxSizing: 'border-box',
1419
1427
  display: 'flex',
1420
1428
  justifyContent: 'space-between',
1421
1429
  p: '0.5rem',
1422
1430
  width: '100%',
1423
- } }, { children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsx("span", {})), jsx(Box, Object.assign({ sx: {
1431
+ }, children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsx("span", {})), jsx(Box, { sx: {
1424
1432
  display: 'flex',
1425
1433
  justifyContent: 'flex-end',
1426
1434
  position: stackAlertBanner ? 'relative' : 'absolute',
1427
1435
  right: 0,
1428
1436
  top: 0,
1429
- } }, { children: enablePagination &&
1430
- ['bottom', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsx(MRT_TablePagination, { table: table, position: "bottom" })) }))] }))] })));
1437
+ }, children: enablePagination &&
1438
+ ['bottom', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsx(MRT_TablePagination, { table: table, position: "bottom" })) })] })] })));
1431
1439
  };
1432
1440
 
1433
1441
  const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
@@ -1451,15 +1459,15 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1451
1459
  })
1452
1460
  : columnDef.muiTableHeadCellColumnActionsButtonProps;
1453
1461
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1454
- return (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ 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 }, { children: jsx(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': {
1462
+ return (jsxs(Fragment, { children: [jsx(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, children: jsx(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': {
1455
1463
  opacity: 1,
1456
1464
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1457
1465
  ? iconButtonProps.sx(theme)
1458
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: jsx(MoreVertIcon, {}) })) })), anchorEl && (jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1466
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined, children: jsx(MoreVertIcon, {}) })) }), anchorEl && (jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1459
1467
  };
1460
1468
 
1461
1469
  const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1462
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1470
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1463
1471
  const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, manualFiltering, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
1464
1472
  const { column } = header;
1465
1473
  const { columnDef } = column;
@@ -1502,6 +1510,18 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1502
1510
  !rangeFilterIndex &&
1503
1511
  (allowedColumnFilterOptions === undefined ||
1504
1512
  !!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
1513
+ const facetedUniqueValues = column.getFacetedUniqueValues();
1514
+ const filterSelectOptions = useMemo(() => {
1515
+ var _a;
1516
+ return (_a = columnDef.filterSelectOptions) !== null && _a !== void 0 ? _a : ((isSelectFilter || isMultiSelectFilter) && facetedUniqueValues
1517
+ ? Array.from(facetedUniqueValues.keys()).sort((a, b) => a.localeCompare(b))
1518
+ : undefined);
1519
+ }, [
1520
+ columnDef.filterSelectOptions,
1521
+ facetedUniqueValues,
1522
+ isMultiSelectFilter,
1523
+ isSelectFilter,
1524
+ ]);
1505
1525
  const [anchorEl, setAnchorEl] = useState(null);
1506
1526
  const [filterValue, setFilterValue] = useState(() => {
1507
1527
  var _a, _b;
@@ -1599,24 +1619,23 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1599
1619
  }, margin: "none", placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1600
1620
  ? undefined
1601
1621
  : filterPlaceholder, onChange: handleChange, onClick: (e) => e.stopPropagation(), select: isSelectFilter || isMultiSelectFilter, value: filterValue !== null && filterValue !== void 0 ? filterValue : '', variant: "standard", InputProps: {
1602
- startAdornment: showChangeModeButton ? (jsxs(InputAdornment, Object.assign({ position: "start" }, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.changeFilterMode }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } }, { children: jsx(FilterListIcon, {}) })) }) })), filterChipLabel && (jsx(Chip, { onDelete: handleClearEmptyFilterChip, label: filterChipLabel }))] }))) : null,
1603
- endAdornment: !filterChipLabel && (jsx(InputAdornment, Object.assign({ position: "end" }, { children: jsx(Tooltip, Object.assign({ arrow: true, placement: "right", title: (_h = localization.clearFilter) !== null && _h !== void 0 ? _h : '' }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.clearFilter, disabled: !((_j = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _j === void 0 ? void 0 : _j.length), onClick: handleClear, size: "small", sx: {
1622
+ startAdornment: showChangeModeButton ? (jsxs(InputAdornment, { position: "start", children: [jsx(Tooltip, { arrow: true, title: localization.changeFilterMode, children: jsx("span", { children: jsx(IconButton, { "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsx(FilterListIcon, {}) }) }) }), filterChipLabel && (jsx(Chip, { onDelete: handleClearEmptyFilterChip, label: filterChipLabel }))] })) : null,
1623
+ endAdornment: !filterChipLabel && (jsx(InputAdornment, { position: "end", children: jsx(Tooltip, { arrow: true, placement: "right", title: (_h = localization.clearFilter) !== null && _h !== void 0 ? _h : '', children: jsx("span", { children: jsx(IconButton, { "aria-label": localization.clearFilter, disabled: !((_j = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _j === void 0 ? void 0 : _j.length), onClick: handleClear, size: "small", sx: {
1604
1624
  height: '1.75rem',
1605
1625
  width: '1.75rem',
1606
- } }, { children: jsx(CloseIcon, {}) })) }) })) }))),
1626
+ }, children: jsx(CloseIcon, {}) }) }) }) })),
1607
1627
  }, SelectProps: {
1608
1628
  displayEmpty: true,
1609
1629
  multiple: isMultiSelectFilter,
1610
1630
  renderValue: isMultiSelectFilter
1611
- ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsx(Box, Object.assign({ sx: { opacity: 0.5 } }, { children: filterPlaceholder }))) : (jsx(Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, { children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
1612
- var _a;
1613
- const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
1631
+ ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder })) : (jsx(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' }, children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
1632
+ const selectedValue = filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.find((option) => option instanceof Object
1614
1633
  ? option.value === value
1615
1634
  : option === value);
1616
1635
  return (jsx(Chip, { label: selectedValue instanceof Object
1617
1636
  ? selectedValue.text
1618
1637
  : selectedValue }, value));
1619
- }) })))
1638
+ }) }))
1620
1639
  : undefined,
1621
1640
  } }, textFieldProps, { inputRef: (inputRef) => {
1622
1641
  filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
@@ -1632,7 +1651,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1632
1651
  mr: '1.5rem',
1633
1652
  } }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
1634
1653
  ? textFieldProps.sx(theme)
1635
- : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))) }, { children: [(isSelectFilter || isMultiSelectFilter) && (jsx(MenuItem, Object.assign({ divider: true, disabled: true, hidden: true, value: "" }, { children: jsx(Box, Object.assign({ sx: { opacity: 0.5 } }, { children: filterPlaceholder })) }))), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : (_l = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null || _l === void 0 ? void 0 : _l.map((option) => {
1654
+ : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))), children: [(isSelectFilter || isMultiSelectFilter) && (jsx(MenuItem, { divider: true, disabled: true, hidden: true, value: "", children: jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder }) })), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.map((option) => {
1636
1655
  var _a;
1637
1656
  let value;
1638
1657
  let text;
@@ -1644,17 +1663,18 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1644
1663
  value = option.value;
1645
1664
  text = option.text;
1646
1665
  }
1647
- return (jsxs(MenuItem, Object.assign({ sx: {
1666
+ return (jsxs(MenuItem, { sx: {
1648
1667
  display: 'flex',
1649
1668
  m: 0,
1650
1669
  alignItems: 'center',
1651
1670
  gap: '0.5rem',
1652
- }, value: value }, { children: [isMultiSelectFilter && (jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text] }), value));
1671
+ }, value: value, children: [isMultiSelectFilter && (jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text, ' ', !columnDef.filterSelectOptions &&
1672
+ `(${facetedUniqueValues.get(value)})`] }, value));
1653
1673
  })] })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })] }));
1654
1674
  };
1655
1675
 
1656
1676
  const MRT_FilterRangeFields = ({ header, table }) => {
1657
- return (jsxs(Box, Object.assign({ sx: { display: 'grid', gridTemplateColumns: '6fr 6fr', gap: '1rem' } }, { children: [jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] })));
1677
+ return (jsxs(Box, { sx: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem' }, children: [jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] }));
1658
1678
  };
1659
1679
 
1660
1680
  const MRT_FilterCheckbox = ({ column, table }) => {
@@ -1676,7 +1696,7 @@ const MRT_FilterCheckbox = ({ column, table }) => {
1676
1696
  : columnDef.muiTableHeadCellFilterCheckboxProps;
1677
1697
  const checkboxProps = Object.assign(Object.assign({}, mTableHeadCellFilterCheckboxProps), mcTableHeadCellFilterCheckboxProps);
1678
1698
  const filterLabel = (_a = localization.filterByColumn) === null || _a === void 0 ? void 0 : _a.replace('{column}', columnDef.header);
1679
- return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : filterLabel }, { children: jsx(FormControlLabel, { control: jsx(Checkbox, Object.assign({ checked: column.getFilterValue() === 'true', indeterminate: column.getFilterValue() === undefined, color: column.getFilterValue() === undefined ? 'default' : 'primary', size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onClick: (e) => {
1699
+ return (jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : filterLabel, children: jsx(FormControlLabel, { control: jsx(Checkbox, Object.assign({ checked: column.getFilterValue() === 'true', indeterminate: column.getFilterValue() === undefined, color: column.getFilterValue() === undefined ? 'default' : 'primary', size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onClick: (e) => {
1680
1700
  var _a;
1681
1701
  e.stopPropagation();
1682
1702
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
@@ -1690,7 +1710,80 @@ const MRT_FilterCheckbox = ({ column, table }) => {
1690
1710
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e, checked);
1691
1711
  }, sx: (theme) => (Object.assign({ height: '2.5rem', width: '2.5rem' }, ((checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx) instanceof Function
1692
1712
  ? checkboxProps.sx(theme)
1693
- : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', mt: '-4px', fontWeight: 'normal' }, title: undefined }) })));
1713
+ : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', mt: '-4px', fontWeight: 'normal' }, title: undefined }) }));
1714
+ };
1715
+
1716
+ const MRT_FilterRangeSlider = ({ header, table }) => {
1717
+ var _a, _b;
1718
+ const { options: { localization, muiTableHeadCellFilterSliderProps, enableColumnFilterModes, }, refs: { filterInputRefs }, } = table;
1719
+ const { column } = header;
1720
+ const { columnDef } = column;
1721
+ const currentFilterOption = columnDef._filterFn;
1722
+ const showChangeModeButton = enableColumnFilterModes && columnDef.enableColumnFilterModes !== false;
1723
+ const mTableHeadCellFilterTextFieldProps = muiTableHeadCellFilterSliderProps instanceof Function
1724
+ ? muiTableHeadCellFilterSliderProps({
1725
+ column,
1726
+ table,
1727
+ })
1728
+ : muiTableHeadCellFilterSliderProps;
1729
+ const mcTableHeadCellFilterTextFieldProps = columnDef.muiTableHeadCellFilterSliderProps instanceof Function
1730
+ ? columnDef.muiTableHeadCellFilterSliderProps({
1731
+ column,
1732
+ table,
1733
+ })
1734
+ : columnDef.muiTableHeadCellFilterSliderProps;
1735
+ const sliderProps = Object.assign(Object.assign({}, mTableHeadCellFilterTextFieldProps), mcTableHeadCellFilterTextFieldProps);
1736
+ const [min, max] = sliderProps.min !== undefined && sliderProps.max !== undefined
1737
+ ? [sliderProps.min, sliderProps.max]
1738
+ : (_a = column.getFacetedMinMaxValues()) !== null && _a !== void 0 ? _a : [0, 0];
1739
+ const [filterValues, setFilterValues] = useState([min, max]);
1740
+ const columnFilterValue = column.getFilterValue();
1741
+ const isMounted = useRef(false);
1742
+ useEffect(() => {
1743
+ if (isMounted.current) {
1744
+ if (columnFilterValue === undefined) {
1745
+ setFilterValues([min, max]);
1746
+ }
1747
+ else if (Array.isArray(columnFilterValue)) {
1748
+ if (columnFilterValue[0] <= min && columnFilterValue[1] >= max) {
1749
+ column.setFilterValue(undefined);
1750
+ }
1751
+ else {
1752
+ setFilterValues(columnFilterValue);
1753
+ }
1754
+ }
1755
+ }
1756
+ isMounted.current = true;
1757
+ }, [column.getFilterValue()]);
1758
+ return (jsxs(Stack, { children: [jsx(Slider, Object.assign({ disableSwap: true, min: min, max: max, onChange: (_event, value) => {
1759
+ setFilterValues(value);
1760
+ }, onChangeCommitted: (_event, value) => {
1761
+ column.setFilterValue(value);
1762
+ }, value: filterValues, valueLabelDisplay: "auto" }, sliderProps, { slotProps: {
1763
+ input: {
1764
+ ref: (node) => {
1765
+ var _a, _b;
1766
+ if (node) {
1767
+ filterInputRefs.current[`${column.id}-0`] = node;
1768
+ // @ts-ignore
1769
+ if ((_b = (_a = sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.slotProps) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.ref) {
1770
+ //@ts-ignore
1771
+ sliderProps.slotProps.input.ref = node;
1772
+ }
1773
+ }
1774
+ },
1775
+ },
1776
+ }, sx: (theme) => (Object.assign({ m: 'auto', mt: !showChangeModeButton ? '10px' : '6px', px: '4px', width: 'calc(100% - 8px)' }, ((sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx) instanceof Function
1777
+ ? sliderProps.sx(theme)
1778
+ : sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx))) })), showChangeModeButton ? (jsx(FormHelperText, { sx: {
1779
+ m: '-3px -6px',
1780
+ fontSize: '0.75rem',
1781
+ lineHeight: '0.8rem',
1782
+ whiteSpace: 'nowrap',
1783
+ }, children: localization.filterMode.replace('{filterType}',
1784
+ // @ts-ignore
1785
+ localization[`filter${((_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
1786
+ (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null] }));
1694
1787
  };
1695
1788
 
1696
1789
  const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
@@ -1698,8 +1791,8 @@ const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
1698
1791
  const { showColumnFilters } = getState();
1699
1792
  const { column } = header;
1700
1793
  const { columnDef } = column;
1701
- return (jsx(Collapse, Object.assign({ in: showColumnFilters, mountOnEnter: true, unmountOnExit: true }, { children: columnDef.filterVariant === 'checkbox' ? (jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range' ||
1702
- ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsx(MRT_FilterTextField, { header: header, table: table })) })));
1794
+ return (jsx(Collapse, { in: showColumnFilters, mountOnEnter: true, unmountOnExit: true, children: columnDef.filterVariant === 'checkbox' ? (jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range-slider' ? (jsx(MRT_FilterRangeSlider, { header: header, table: table })) : columnDef.filterVariant === 'range' ||
1795
+ ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsx(MRT_FilterTextField, { header: header, table: table })) }));
1703
1796
  };
1704
1797
 
1705
1798
  const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
@@ -1720,9 +1813,9 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1720
1813
  ? column.getFilterValue().join(`" ${isRangeFilter ? localization.and : localization.or} "`)
1721
1814
  : column.getFilterValue()}"`)
1722
1815
  .replace('" "', '');
1723
- return (jsx(Grow, Object.assign({ unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
1816
+ return (jsx(Grow, { unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
1724
1817
  (isRangeFilter && // @ts-ignore
1725
- (!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))) }, { children: jsx(Box, Object.assign({ component: "span", sx: { flex: '0 0' } }, { children: jsx(Tooltip, Object.assign({ arrow: true, placement: "top", title: filterTooltip }, { children: jsx(IconButton, Object.assign({ disableRipple: true, onClick: (event) => {
1818
+ (!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))), children: jsx(Box, { component: "span", sx: { flex: '0 0' }, children: jsx(Tooltip, { arrow: true, placement: "top", title: filterTooltip, children: jsx(IconButton, { disableRipple: true, onClick: (event) => {
1726
1819
  setShowColumnFilters(true);
1727
1820
  queueMicrotask(() => {
1728
1821
  var _a, _b;
@@ -1737,7 +1830,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1737
1830
  p: '2px',
1738
1831
  transform: 'scale(0.66)',
1739
1832
  width: '12px',
1740
- } }, { children: jsx(FilterAltIcon, {}) })) })) })) })));
1833
+ }, children: jsx(FilterAltIcon, {}) }) }) }) }));
1741
1834
  };
1742
1835
 
1743
1836
  const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
@@ -1779,7 +1872,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1779
1872
  const { getState, options: { columnResizeMode }, setColumnSizingInfo, } = table;
1780
1873
  const { density } = getState();
1781
1874
  const { column } = header;
1782
- return (jsx(Box, Object.assign({ className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
1875
+ return (jsx(Box, { className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
1783
1876
  setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
1784
1877
  column.resetSize();
1785
1878
  }, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), sx: (theme) => ({
@@ -1796,7 +1889,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1796
1889
  transform: column.getIsResizing() && columnResizeMode === 'onEnd'
1797
1890
  ? `translateX(${(_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0}px)`
1798
1891
  : undefined,
1799
- } }, { children: jsx(Divider, { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1892
+ }, children: jsx(Divider, { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1800
1893
  borderRadius: '2px',
1801
1894
  borderWidth: '2px',
1802
1895
  height: '24px',
@@ -1806,7 +1899,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1806
1899
  : 'all 150ms ease-in-out',
1807
1900
  userSelect: 'none',
1808
1901
  zIndex: 4,
1809
- } }) })));
1902
+ } }) }));
1810
1903
  };
1811
1904
 
1812
1905
  const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
@@ -1819,7 +1912,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1819
1912
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
1820
1913
  : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
1821
1914
  : localization.unsorted;
1822
- return (jsx(Tooltip, Object.assign({ arrow: true, placement: "top", title: sortTooltip }, { children: jsx(Badge, Object.assign({ badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular" }, { children: jsx(TableSortLabel, { "aria-label": sortTooltip, active: !!column.getIsSorted(), direction: column.getIsSorted()
1915
+ return (jsx(Tooltip, { arrow: true, placement: "top", title: sortTooltip, children: jsx(Badge, { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsx(TableSortLabel, { "aria-label": sortTooltip, active: !!column.getIsSorted(), direction: column.getIsSorted()
1823
1916
  ? column.getIsSorted()
1824
1917
  : undefined, sx: {
1825
1918
  flex: '0 0',
@@ -1831,7 +1924,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1831
1924
  var _a;
1832
1925
  e.stopPropagation();
1833
1926
  (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(e);
1834
- } }) })) })));
1927
+ } }) }) }));
1835
1928
  };
1836
1929
 
1837
1930
  const MRT_TableHeadCell = ({ header, table }) => {
@@ -1925,7 +2018,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
1925
2018
  table,
1926
2019
  tableCellProps,
1927
2020
  theme,
1928
- })), draggingBorders)) }, { children: [header.isPlaceholder ? null : (jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content", sx: {
2021
+ })), draggingBorders)), children: [header.isPlaceholder ? null : (jsxs(Box, { className: "Mui-TableHeadCell-Content", sx: {
1929
2022
  alignItems: 'center',
1930
2023
  display: 'flex',
1931
2024
  flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
@@ -1936,7 +2029,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
1936
2029
  : 'flex-start',
1937
2030
  position: 'relative',
1938
2031
  width: '100%',
1939
- } }, { children: [jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
2032
+ }, children: [jsxs(Box, { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
1940
2033
  alignItems: 'center',
1941
2034
  cursor: column.getCanSort() && columnDefType !== 'group'
1942
2035
  ? 'pointer'
@@ -1947,7 +2040,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
1947
2040
  pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
1948
2041
  ? `${headerPL}rem`
1949
2042
  : undefined,
1950
- } }, { children: [jsx(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Wrapper", sx: {
2043
+ }, children: [jsx(Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
1951
2044
  minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
1952
2045
  overflow: columnDefType === 'data' ? 'hidden' : undefined,
1953
2046
  textOverflow: 'ellipsis',
@@ -1955,9 +2048,9 @@ const MRT_TableHeadCell = ({ header, table }) => {
1955
2048
  '&:hover': {
1956
2049
  textOverflow: 'clip',
1957
2050
  },
1958
- }, title: columnDefType === 'data' ? columnDef.header : undefined }, { children: headerElement })), column.getCanSort() && (jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table }))] })), columnDefType !== 'group' && (jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' } }, { children: [showDragHandle && (jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2051
+ }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanSort() && (jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table }))] }), columnDefType !== 'group' && (jsxs(Box, { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
1959
2052
  current: tableHeadCellRefs.current[column.id],
1960
- } })), showColumnActions && (jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] }))), column.getCanResize() && (jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] }))), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2053
+ } })), showColumnActions && (jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
1961
2054
  };
1962
2055
 
1963
2056
  const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -1967,7 +2060,7 @@ const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLe
1967
2060
  : muiTableHeadRowProps;
1968
2061
  return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), boxShadow: `4px 0 8px ${alpha(theme.palette.common.black, 0.1)}`, display: layoutMode === 'grid' ? 'flex' : 'table-row', top: 0 }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
1969
2062
  ? tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx(theme)
1970
- : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }, { children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
2063
+ : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
1971
2064
  const header = virtualColumns
1972
2065
  ? headerGroup.headers[headerOrVirtualHeader.index]
1973
2066
  : headerOrVirtualHeader;
@@ -1984,7 +2077,7 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
1984
2077
  const stickyHeader = enableStickyHeader || isFullScreen;
1985
2078
  return (jsx(TableHead, Object.assign({}, tableHeadProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: 0.97, position: stickyHeader ? 'sticky' : 'relative', top: stickyHeader && layoutMode === 'grid' ? 0 : undefined, zIndex: stickyHeader ? 2 : undefined }, ((tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx) instanceof Function
1986
2079
  ? tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx(theme)
1987
- : tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx))) }, { children: getHeaderGroups().map((headerGroup) => (jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id))) })));
2080
+ : tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx))), children: getHeaderGroups().map((headerGroup) => (jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id))) })));
1988
2081
  };
1989
2082
 
1990
2083
  const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
@@ -2049,7 +2142,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2049
2142
  var _a;
2050
2143
  e.stopPropagation();
2051
2144
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
2052
- }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }, { children: (_b = textFieldProps.children) !== null && _b !== void 0 ? _b : (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _c === void 0 ? void 0 : _c.map((option) => {
2145
+ }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown, children: (_b = textFieldProps.children) !== null && _b !== void 0 ? _b : (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _c === void 0 ? void 0 : _c.map((option) => {
2053
2146
  let value;
2054
2147
  let text;
2055
2148
  if (typeof option !== 'object') {
@@ -2060,12 +2153,12 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2060
2153
  value = option.value;
2061
2154
  text = option.text;
2062
2155
  }
2063
- return (jsx(MenuItem, Object.assign({ sx: {
2156
+ return (jsx(MenuItem, { sx: {
2064
2157
  display: 'flex',
2065
2158
  m: 0,
2066
2159
  alignItems: 'center',
2067
2160
  gap: '0.5rem',
2068
- }, value: value }, { children: text }), value));
2161
+ }, value: value, children: text }, value));
2069
2162
  }) })));
2070
2163
  };
2071
2164
 
@@ -2093,9 +2186,9 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
2093
2186
  })
2094
2187
  : columnDef.muiTableBodyCellCopyButtonProps;
2095
2188
  const buttonProps = Object.assign(Object.assign({}, mTableBodyCellCopyButtonProps), mcTableBodyCellCopyButtonProps);
2096
- return (jsx(Tooltip, Object.assign({ 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) }, { children: jsx(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
2189
+ return (jsx(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), children: jsx(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
2097
2190
  ? buttonProps.sx(theme)
2098
- : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined }, { children: children })) })));
2191
+ : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined, children: children })) }));
2099
2192
  };
2100
2193
 
2101
2194
  const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table }) => {
@@ -2164,7 +2257,7 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2164
2257
  matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
2165
2258
  });
2166
2259
  if ((chunks === null || chunks === void 0 ? void 0 : chunks.length) > 1 || ((_b = chunks === null || chunks === void 0 ? void 0 : chunks[0]) === null || _b === void 0 ? void 0 : _b.match)) {
2167
- renderedCellValue = (jsx("span", Object.assign({ "aria-label": renderedCellValue, role: "note" }, { children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsx(Box, Object.assign({ "aria-hidden": "true", component: "span", sx: match
2260
+ renderedCellValue = (jsx("span", { "aria-label": renderedCellValue, role: "note", children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsx(Box, { "aria-hidden": "true", component: "span", sx: match
2168
2261
  ? {
2169
2262
  backgroundColor: (theme) => theme.palette.mode === 'dark'
2170
2263
  ? darken(theme.palette.warning.dark, 0.25)
@@ -2173,7 +2266,7 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2173
2266
  color: (theme) => theme.palette.mode === 'dark' ? 'white' : 'black',
2174
2267
  padding: '2px 1px',
2175
2268
  }
2176
- : undefined }, { children: text }), key)))) !== null && _c !== void 0 ? _c : renderedCellValue })));
2269
+ : undefined, children: text }, key)))) !== null && _c !== void 0 ? _c : renderedCellValue }));
2177
2270
  }
2178
2271
  }
2179
2272
  if (columnDef.Cell && !isGroupedValue) {
@@ -2312,7 +2405,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
2312
2405
  table,
2313
2406
  theme,
2314
2407
  tableCellProps,
2315
- })), draggingBorders)) }, { children: jsxs(Fragment, { children: [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 ? (jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2408
+ })), draggingBorders)), children: jsxs(Fragment, { children: [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 ? (jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2316
2409
  rowNumberMode === 'static' &&
2317
2410
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsx(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
2318
2411
  (column.id === 'mrt-row-select' ||
@@ -2324,7 +2417,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
2324
2417
  row,
2325
2418
  table,
2326
2419
  })) : isEditing ? (jsx(MRT_EditCellTextField, { cell: cell, table: table })) : (enableClickToCopy || columnDef.enableClickToCopy) &&
2327
- columnDef.enableClickToCopy !== false ? (jsx(MRT_CopyButton, Object.assign({ cell: cell, table: table }, { children: jsx(MRT_TableBodyCellValue, { cell: cell, table: table }) }))) : (jsx(MRT_TableBodyCellValue, { cell: cell, table: table })), cell.getIsGrouped() && !columnDef.GroupedCell && (jsxs(Fragment, { children: [" (", (_d = row.subRows) === null || _d === void 0 ? void 0 : _d.length, ")"] }))] }) })));
2420
+ columnDef.enableClickToCopy !== false ? (jsx(MRT_CopyButton, { cell: cell, table: table, children: jsx(MRT_TableBodyCellValue, { cell: cell, table: table }) })) : (jsx(MRT_TableBodyCellValue, { cell: cell, table: table })), cell.getIsGrouped() && !columnDef.GroupedCell && (jsxs(Fragment, { children: [" (", (_d = row.subRows) === null || _d === void 0 ? void 0 : _d.length, ")"] }))] }) })));
2328
2421
  };
2329
2422
  const Memo_MRT_TableBodyCell = memo(MRT_TableBodyCell, (prev, next) => next.cell === prev.cell);
2330
2423
 
@@ -2351,11 +2444,11 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
2351
2444
  : undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2352
2445
  ? tableRowProps.sx(theme)
2353
2446
  : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)));
2354
- } }, { children: jsx(TableCell, Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
2447
+ }, children: jsx(TableCell, Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
2355
2448
  ? lighten(theme.palette.background.default, 0.06)
2356
2449
  : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: layoutMode === 'grid' ? 'flex' : 'table-cell', pb: row.getIsExpanded() ? '1rem' : 0, pt: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
2357
2450
  ? tableCellProps.sx(theme)
2358
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx))) }, { children: renderDetailPanel && (jsx(Collapse, Object.assign({ in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true }, { children: !isLoading && renderDetailPanel({ row, table }) }))) })) })));
2451
+ : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx))), children: renderDetailPanel && (jsx(Collapse, { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
2359
2452
  };
2360
2453
 
2361
2454
  const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
@@ -2387,13 +2480,12 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
2387
2480
  ? tableRowProps.sx(theme)
2388
2481
  : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
2389
2482
  ? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
2390
- : undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }, { children: [virtualPaddingLeft ? (jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
2483
+ : undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), children: [virtualPaddingLeft ? (jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
2391
2484
  const cell = columnVirtualizer
2392
2485
  ? row.getVisibleCells()[cellOrVirtualCell.index]
2393
2486
  : cellOrVirtualCell;
2394
2487
  const props = {
2395
2488
  cell,
2396
- key: cell.id,
2397
2489
  measureElement: columnVirtualizer === null || columnVirtualizer === void 0 ? void 0 : columnVirtualizer.measureElement,
2398
2490
  numRows,
2399
2491
  rowIndex,
@@ -2408,7 +2500,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
2408
2500
  !draggingColumn &&
2409
2501
  !draggingRow &&
2410
2502
  (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
2411
- (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsx(Memo_MRT_TableBodyCell, Object.assign({}, props))) : (jsx(MRT_TableBodyCell, Object.assign({}, props)));
2503
+ (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsx(Memo_MRT_TableBodyCell, Object.assign({}, props), cell.id)) : (jsx(MRT_TableBodyCell, Object.assign({}, props), cell.id));
2412
2504
  }), virtualPaddingRight ? (jsx("td", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })), renderDetailPanel && !row.getIsGrouped() && (jsx(MRT_TableDetailPanel, { parentRowRef: rowRef, row: row, rowIndex: rowIndex, table: table, virtualRow: virtualRow }))] }));
2413
2505
  };
2414
2506
  const Memo_MRT_TableBodyRow = memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row && prev.rowIndex === next.rowIndex);
@@ -2480,24 +2572,23 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
2480
2572
  ? `${rowVirtualizer.getTotalSize()}px`
2481
2573
  : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, ((tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx) instanceof Function
2482
2574
  ? tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx(theme)
2483
- : tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx))) }, { children: (_a = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _a !== void 0 ? _a : (!rows.length ? (jsx("tr", Object.assign({ style: { display: layoutMode === 'grid' ? 'grid' : 'table-row' } }, { children: jsx("td", Object.assign({ colSpan: table.getVisibleLeafColumns().length, style: {
2575
+ : tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx))), children: (_a = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _a !== void 0 ? _a : (!rows.length ? (jsx("tr", { style: { display: layoutMode === 'grid' ? 'grid' : 'table-row' }, children: jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
2484
2576
  display: layoutMode === 'grid' ? 'grid' : 'table-cell',
2485
- } }, { children: (_b = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _b !== void 0 ? _b : (jsx(Typography, Object.assign({ sx: {
2577
+ }, children: (_b = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _b !== void 0 ? _b : (jsx(Typography, { sx: {
2486
2578
  color: 'text.secondary',
2487
2579
  fontStyle: 'italic',
2488
2580
  maxWidth: `min(100vw, ${(_d = (_c = tablePaperRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 360}px)`,
2489
2581
  py: '2rem',
2490
2582
  textAlign: 'center',
2491
2583
  width: '100%',
2492
- } }, { children: globalFilter || columnFilters.length
2584
+ }, children: globalFilter || columnFilters.length
2493
2585
  ? localization.noResultsFound
2494
- : localization.noRecordsToDisplay }))) })) }))) : (jsx(Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
2586
+ : localization.noRecordsToDisplay })) }) })) : (jsx(Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
2495
2587
  const row = rowVirtualizer
2496
2588
  ? rows[rowOrVirtualRow.index]
2497
2589
  : rowOrVirtualRow;
2498
2590
  const props = {
2499
2591
  columnVirtualizer,
2500
- key: row.id,
2501
2592
  measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
2502
2593
  numRows: rows.length,
2503
2594
  row,
@@ -2510,7 +2601,7 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
2510
2601
  ? rowOrVirtualRow
2511
2602
  : undefined,
2512
2603
  };
2513
- return memoMode === 'rows' ? (jsx(Memo_MRT_TableBodyRow, Object.assign({}, props))) : (jsx(MRT_TableBodyRow, Object.assign({}, props)));
2604
+ return memoMode === 'rows' ? (jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
2514
2605
  }) }))) })));
2515
2606
  };
2516
2607
  const Memo_MRT_TableBody = memo(MRT_TableBody, (prev, next) => prev.table.options.data === next.table.options.data);
@@ -2538,7 +2629,7 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2538
2629
  table,
2539
2630
  theme,
2540
2631
  tableCellProps,
2541
- }))) }, { children: jsx(Fragment, { children: footer.isPlaceholder
2632
+ }))), children: jsx(Fragment, { children: footer.isPlaceholder
2542
2633
  ? null
2543
2634
  : (_c = (_b = (columnDef.Footer instanceof Function
2544
2635
  ? (_a = columnDef.Footer) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
@@ -2562,7 +2653,7 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
2562
2653
  : muiTableFooterRowProps;
2563
2654
  return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), display: layoutMode === 'grid' ? 'flex' : 'table-row', width: '100%' }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2564
2655
  ? tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx(theme)
2565
- : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }, { children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
2656
+ : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
2566
2657
  const footer = virtualColumns
2567
2658
  ? footerGroup.headers[footerOrVirtualFooter.index]
2568
2659
  : footerOrVirtualFooter;
@@ -2583,7 +2674,7 @@ const MRT_TableFooter = ({ table, virtualColumns, virtualPaddingLeft, virtualPad
2583
2674
  : `1px solid ${theme.palette.grey[700]}`
2584
2675
  : undefined, position: stickFooter ? 'sticky' : undefined, zIndex: stickFooter ? 1 : undefined }, ((tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx) instanceof Function
2585
2676
  ? tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx(theme)
2586
- : tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx))) }, { children: getFooterGroups().map((footerGroup) => (jsx(MRT_TableFooterRow, { footerGroup: footerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, footerGroup.id))) })));
2677
+ : tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx))), children: getFooterGroups().map((footerGroup) => (jsx(MRT_TableFooterRow, { footerGroup: footerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, footerGroup.id))) })));
2587
2678
  };
2588
2679
 
2589
2680
  const MRT_Table = ({ table }) => {
@@ -2656,7 +2747,7 @@ const MRT_Table = ({ table }) => {
2656
2747
  };
2657
2748
  return (jsxs(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: layoutMode === 'grid' ? 'grid' : 'table', tableLayout: layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined }, ((tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) instanceof Function
2658
2749
  ? tableProps.sx(theme)
2659
- : tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx))), style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style) }, { children: [enableTableHead && jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsx(MRT_TableFooter, Object.assign({}, props))] })));
2750
+ : tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx))), style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), children: [enableTableHead && jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsx(MRT_TableFooter, Object.assign({}, props))] })));
2660
2751
  };
2661
2752
 
2662
2753
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
@@ -2691,7 +2782,7 @@ const MRT_TableContainer = ({ table }) => {
2691
2782
  ? tableContainerProps.sx(theme)
2692
2783
  : tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx))), style: Object.assign({ maxHeight: isFullScreen
2693
2784
  ? `calc(100vh - ${totalToolbarHeight}px)`
2694
- : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style) }, { children: jsx(MRT_Table, { table: table }) })));
2785
+ : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style), children: jsx(MRT_Table, { table: table }) })));
2695
2786
  };
2696
2787
 
2697
2788
  const MRT_TablePaper = ({ table }) => {
@@ -2717,7 +2808,7 @@ const MRT_TablePaper = ({ table }) => {
2717
2808
  padding: 0,
2718
2809
  width: '100vw',
2719
2810
  }
2720
- : {})) }, { children: [enableTopToolbar &&
2811
+ : {})), children: [enableTopToolbar &&
2721
2812
  (renderTopToolbar instanceof Function
2722
2813
  ? renderTopToolbar({ table })
2723
2814
  : renderTopToolbar !== null && renderTopToolbar !== void 0 ? renderTopToolbar : jsx(MRT_TopToolbar, { table: table })), jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
@@ -2728,15 +2819,15 @@ const MRT_TablePaper = ({ table }) => {
2728
2819
 
2729
2820
  const MRT_EditRowModal = ({ open, row, table, }) => {
2730
2821
  const { options: { localization }, } = table;
2731
- return (jsxs(Dialog, Object.assign({ open: open }, { children: [jsx(DialogTitle, Object.assign({ textAlign: "center" }, { children: localization.edit })), jsx(DialogContent, { children: jsx("form", Object.assign({ onSubmit: (e) => e.preventDefault() }, { children: jsx(Stack, Object.assign({ sx: {
2822
+ return (jsxs(Dialog, { open: open, children: [jsx(DialogTitle, { textAlign: "center", children: localization.edit }), jsx(DialogContent, { children: jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsx(Stack$1, { sx: {
2732
2823
  gap: '1.5rem',
2733
2824
  minWidth: { xs: '300px', sm: '360px', md: '400px' },
2734
2825
  pt: '1rem',
2735
2826
  width: '100%',
2736
- } }, { children: row
2827
+ }, children: row
2737
2828
  .getAllCells()
2738
2829
  .filter((cell) => cell.column.columnDef.columnDefType === 'data')
2739
- .map((cell) => (jsx(MRT_EditCellTextField, { cell: cell, showLabel: true, table: table }, cell.id))) })) })) }), jsx(DialogActions, Object.assign({ sx: { p: '1.25rem' } }, { children: jsx(MRT_EditActionButtons, { row: row, table: table, variant: "text" }) }))] })));
2830
+ .map((cell) => (jsx(MRT_EditCellTextField, { cell: cell, showLabel: true, table: table }, cell.id))) }) }) }), jsx(DialogActions, { sx: { p: '1.25rem' }, children: jsx(MRT_EditActionButtons, { row: row, table: table, variant: "text" }) })] }));
2740
2831
  };
2741
2832
 
2742
2833
  const MRT_TableRoot = (props) => {
@@ -2850,7 +2941,23 @@ const MRT_TableRoot = (props) => {
2850
2941
  : props.data;
2851
2942
  }, [props.data, (_v = props.state) === null || _v === void 0 ? void 0 : _v.isLoading, (_w = props.state) === null || _w === void 0 ? void 0 : _w.showSkeletons]);
2852
2943
  //@ts-ignore
2853
- 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), {
2944
+ const table = Object.assign(Object.assign({}, useReactTable(Object.assign(Object.assign({ getCoreRowModel: getCoreRowModel(), getExpandedRowModel: props.enableExpanding || props.enableGrouping
2945
+ ? getExpandedRowModel()
2946
+ : undefined, getFacetedMinMaxValues: props.enableFacetedValues
2947
+ ? getFacetedMinMaxValues()
2948
+ : undefined, getFacetedRowModel: props.enableFacetedValues
2949
+ ? getFacetedRowModel()
2950
+ : undefined, getFacetedUniqueValues: props.enableFacetedValues
2951
+ ? getFacetedUniqueValues()
2952
+ : undefined, getFilteredRowModel: props.enableColumnFilters ||
2953
+ props.enableGlobalFilter ||
2954
+ props.enableFilters
2955
+ ? getFilteredRowModel()
2956
+ : undefined, getGroupedRowModel: props.enableGrouping
2957
+ ? getGroupedRowModel()
2958
+ : undefined, getPaginationRowModel: props.enablePagination
2959
+ ? getPaginationRowModel()
2960
+ : undefined, getSortedRowModel: props.enableSorting ? getSortedRowModel() : undefined, onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
2854
2961
  //@ts-ignore
2855
2962
  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,
2856
2963
  columnOrder,
@@ -2911,12 +3018,12 @@ const MRT_TableRoot = (props) => {
2911
3018
  table.setPageIndex(Math.floor(totalRowCount / pageSize));
2912
3019
  }
2913
3020
  }, [props.rowCount, table.getPrePaginationRowModel().rows.length]);
2914
- return (jsxs(Fragment, { children: [jsx(Dialog, Object.assign({ PaperComponent: Box, TransitionComponent: !props.enableRowVirtualization ? Grow : undefined, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => table.setIsFullScreen(false), open: table.getState().isFullScreen, transitionDuration: 400 }, { children: jsx(MRT_TablePaper, { table: table }) })), !table.getState().isFullScreen && (jsx(MRT_TablePaper, { table: table })), editingRow && props.editingMode === 'modal' && (jsx(MRT_EditRowModal, { row: editingRow, table: table, open: true }))] }));
3021
+ return (jsxs(Fragment, { children: [jsx(Dialog, { PaperComponent: Box, TransitionComponent: !props.enableRowVirtualization ? Grow : undefined, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => table.setIsFullScreen(false), open: table.getState().isFullScreen, transitionDuration: 400, children: jsx(MRT_TablePaper, { table: table }) }), !table.getState().isFullScreen && (jsx(MRT_TablePaper, { table: table })), editingRow && props.editingMode === 'modal' && (jsx(MRT_EditRowModal, { row: editingRow, table: table, open: true }))] }));
2915
3022
  };
2916
3023
 
2917
3024
  const MaterialReactTable = (_a) => {
2918
3025
  var _b;
2919
- var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onChange', defaultColumn, defaultDisplayColumn, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableFilterMatchHighlighting = 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, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "defaultDisplayColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
3026
+ var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onChange', defaultColumn, defaultDisplayColumn, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = 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, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "defaultDisplayColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
2920
3027
  const _icons = useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
2921
3028
  const _localization = useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
2922
3029
  const _aggregationFns = useMemo(() => (Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns)), []);
@@ -2939,14 +3046,8 @@ const MaterialReactTable = (_a) => {
2939
3046
  manualPagination = true;
2940
3047
  manualSorting = true;
2941
3048
  }
2942
- return (jsx(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)));
3049
+ return (jsx(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, enableExpanding: enableExpanding, 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)));
2943
3050
  };
2944
3051
 
2945
- export { MRT_AggregationFns, MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_ExpandButton, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_ShowHideColumnsButton, MRT_SortingFns, MRT_TableHeadCellFilterContainer, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable };
3052
+ export { MRT_AggregationFns, MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_ExpandButton, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_ShowHideColumnsButton, MRT_SortingFns, MRT_TableHeadCellFilterContainer, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, MaterialReactTable as default };
2946
3053
  //# sourceMappingURL=material-react-table.esm.js.map
2947
-
2948
- /**
2949
- * @deprecated Use `import { MaterialReactTable } from 'material-react-table';` instead
2950
- */
2951
- const _defaultExport = MaterialReactTable;
2952
- export { _defaultExport as default };