material-react-table 2.0.0-alpha.2 → 2.0.0-alpha.4

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import Paper from '@mui/material/Paper';
3
- import { useState, memo, useEffect, useMemo, useRef, useCallback, useLayoutEffect, Fragment as Fragment$1 } from 'react';
3
+ import { useState, memo, useEffect, useMemo, useRef, useCallback, useLayoutEffect, Fragment as Fragment$1, useReducer } from 'react';
4
4
  import TableContainer from '@mui/material/TableContainer';
5
5
  import { useVirtualizer, defaultRangeExtractor } from '@tanstack/react-virtual';
6
6
  import Table from '@mui/material/Table';
@@ -26,9 +26,11 @@ import ListItemIcon from '@mui/material/ListItemIcon';
26
26
  import Menu from '@mui/material/Menu';
27
27
  import Checkbox from '@mui/material/Checkbox';
28
28
  import FormControlLabel from '@mui/material/FormControlLabel';
29
+ import Autocomplete from '@mui/material/Autocomplete';
29
30
  import Chip from '@mui/material/Chip';
30
31
  import InputAdornment from '@mui/material/InputAdornment';
31
32
  import { debounce } from '@mui/material/utils';
33
+ import { DatePicker } from '@mui/x-date-pickers/DatePicker';
32
34
  import FormHelperText from '@mui/material/FormHelperText';
33
35
  import Slider from '@mui/material/Slider';
34
36
  import Stack from '@mui/material/Stack';
@@ -45,7 +47,10 @@ import CircularProgress from '@mui/material/CircularProgress';
45
47
  import Toolbar from '@mui/material/Toolbar';
46
48
  import useMediaQuery from '@mui/material/useMediaQuery';
47
49
  import LinearProgress from '@mui/material/LinearProgress';
48
- import TablePagination from '@mui/material/TablePagination';
50
+ import InputLabel from '@mui/material/InputLabel';
51
+ import Pagination from '@mui/material/Pagination';
52
+ import PaginationItem from '@mui/material/PaginationItem';
53
+ import Select from '@mui/material/Select';
49
54
  import Alert from '@mui/material/Alert';
50
55
  import AlertTitle from '@mui/material/AlertTitle';
51
56
  import Fade from '@mui/material/Fade';
@@ -54,6 +59,8 @@ import Radio from '@mui/material/Radio';
54
59
  import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
55
60
  import ArrowRightIcon from '@mui/icons-material/ArrowRight';
56
61
  import CancelIcon from '@mui/icons-material/Cancel';
62
+ import ChevronLefIcon from '@mui/icons-material/ChevronLeft';
63
+ import ChevronRightIcon from '@mui/icons-material/ChevronRight';
57
64
  import ClearAllIcon from '@mui/icons-material/ClearAll';
58
65
  import CloseIcon from '@mui/icons-material/Close';
59
66
  import DensityLargeIcon from '@mui/icons-material/DensityLarge';
@@ -66,9 +73,11 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
66
73
  import FilterAltIcon from '@mui/icons-material/FilterAlt';
67
74
  import FilterListIcon from '@mui/icons-material/FilterList';
68
75
  import FilterListOffIcon from '@mui/icons-material/FilterListOff';
76
+ import FirstPageIcon from '@mui/icons-material/FirstPage';
69
77
  import FullscreenIcon from '@mui/icons-material/Fullscreen';
70
78
  import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
71
79
  import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
80
+ import LastPageIcon from '@mui/icons-material/LastPage';
72
81
  import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
73
82
  import MoreVertIcon from '@mui/icons-material/MoreVert';
74
83
  import PushPinIcon from '@mui/icons-material/PushPin';
@@ -265,10 +274,10 @@ const getDefaultColumnOrderIds = (props) => {
265
274
  return [...leadingDisplayCols, ...allLeafColumnDefs, ...trailingDisplayCols];
266
275
  };
267
276
  const getDefaultColumnFilterFn = (columnDef) => {
277
+ var _a;
268
278
  if (columnDef.filterVariant === 'multi-select')
269
279
  return 'arrIncludesSome';
270
- if (columnDef.filterVariant === 'range' ||
271
- columnDef.filterVariant === 'range-slider')
280
+ if ((_a = columnDef.filterVariant) === null || _a === void 0 ? void 0 : _a.includes('range'))
272
281
  return 'betweenInclusive';
273
282
  if (columnDef.filterVariant === 'select' ||
274
283
  columnDef.filterVariant === 'checkbox')
@@ -1136,7 +1145,7 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
1136
1145
  globalFilterModeOptions.includes(filterOption.option)) &&
1137
1146
  ['contains', 'fuzzy', 'startsWith'].includes(filterOption.option)), []);
1138
1147
  const handleSelectFilterMode = (option) => {
1139
- var _a;
1148
+ var _a, _b;
1140
1149
  const prevFilterMode = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef._filterFn) !== null && _a !== void 0 ? _a : '';
1141
1150
  if (!header || !column) {
1142
1151
  // global filter mode
@@ -1168,7 +1177,7 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
1168
1177
  column.setFilterValue(currentFilterValue); // perform new filter render
1169
1178
  }
1170
1179
  }
1171
- else if ((columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === 'range' ||
1180
+ else if (((_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === null || _b === void 0 ? void 0 : _b.includes('range')) ||
1172
1181
  rangeModes.includes(option)) {
1173
1182
  // will now be range filter mode
1174
1183
  if (!Array.isArray(currentFilterValue) ||
@@ -1235,7 +1244,7 @@ const commonListItemStyles = {
1235
1244
  };
1236
1245
  const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1237
1246
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1238
- const { getState, options: { columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnPinning, enableColumnResizing, enableGrouping, enableHiding, enableSorting, enableSortingRemoval, icons: { ArrowRightIcon, ClearAllIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, RestartAltIcon, SortIcon, ViewColumnIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setColumnOrder, setColumnSizingInfo, setShowColumnFilters, toggleAllColumnsVisible, } = table;
1247
+ const { getState, options: { columnFilterDisplayMode, columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnPinning, enableColumnResizing, enableGrouping, enableHiding, enableSorting, enableSortingRemoval, icons: { ArrowRightIcon, ClearAllIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, RestartAltIcon, SortIcon, ViewColumnIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setColumnOrder, setColumnSizingInfo, setShowColumnFilters, toggleAllColumnsVisible, } = table;
1239
1248
  const { column } = header;
1240
1249
  const { columnDef } = column;
1241
1250
  const { columnSizing, columnVisibility, density, showColumnFilters } = getState();
@@ -1308,11 +1317,11 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1308
1317
  jsx(MenuItem, { disabled: !columnFilterValue ||
1309
1318
  (Array.isArray(columnFilterValue) &&
1310
1319
  !columnFilterValue.filter((value) => value).length), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 3),
1311
- jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
1320
+ columnFilterDisplayMode === 'subheader' && (jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
1312
1321
  ? handleOpenFilterModeMenu
1313
- : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_d = localization.filterByColumn) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsx(ArrowRightIcon, {}) }))] }, 4),
1322
+ : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_d = localization.filterByColumn) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsx(ArrowRightIcon, {}) }))] }, 4)),
1314
1323
  showFilterModeSubMenu && (jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 5)),
1315
- ]
1324
+ ].filter(Boolean)
1316
1325
  : []),
1317
1326
  ...(enableGrouping && column.getCanGroup()
1318
1327
  ? [
@@ -1406,18 +1415,29 @@ const MRT_FilterCheckbox = ({ column, table, }) => {
1406
1415
  };
1407
1416
 
1408
1417
  const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1409
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1410
- const { options: { columnFilterModeOptions, enableColumnFilterModes, icons: { CloseIcon, FilterListIcon }, localization, manualFiltering, muiFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
1418
+ var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o;
1419
+ const { options: { columnFilterModeOptions, enableColumnFilterModes, icons: { CloseIcon, FilterListIcon }, localization, manualFiltering, muiFilterAutocompleteProps, muiFilterDatePickerProps, muiFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
1411
1420
  const { column } = header;
1412
1421
  const { columnDef } = column;
1422
+ const { filterVariant } = columnDef;
1413
1423
  const textFieldProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterTextFieldProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterTextFieldProps, {
1414
1424
  column,
1415
1425
  table,
1416
1426
  }));
1417
- const isRangeFilter = columnDef.filterVariant === 'range' || rangeFilterIndex !== undefined;
1418
- const isSelectFilter = columnDef.filterVariant === 'select';
1419
- const isMultiSelectFilter = columnDef.filterVariant === 'multi-select';
1420
- const isTextboxFilter = columnDef.filterVariant === 'text' ||
1427
+ const autocompleteProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterAutocompleteProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterAutocompleteProps, {
1428
+ column,
1429
+ table,
1430
+ }));
1431
+ const datePickerProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterDatePickerProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterDatePickerProps, {
1432
+ column,
1433
+ table,
1434
+ }));
1435
+ const isDateFilter = filterVariant === null || filterVariant === void 0 ? void 0 : filterVariant.startsWith('date');
1436
+ const isAutocompleteFilter = filterVariant === 'autocomplete';
1437
+ const isRangeFilter = (filterVariant === null || filterVariant === void 0 ? void 0 : filterVariant.includes('range')) || rangeFilterIndex !== undefined;
1438
+ const isSelectFilter = filterVariant === 'select';
1439
+ const isMultiSelectFilter = filterVariant === 'multi-select';
1440
+ const isTextboxFilter = ['autocomplete', 'text'].includes(filterVariant) ||
1421
1441
  (!isSelectFilter && !isMultiSelectFilter);
1422
1442
  const currentFilterOption = columnDef._filterFn;
1423
1443
  const filterChipLabel = ['empty', 'notEmpty'].includes(currentFilterOption)
@@ -1432,55 +1452,48 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1432
1452
  : rangeFilterIndex === 1
1433
1453
  ? localization.max
1434
1454
  : '';
1435
- const allowedColumnFilterOptions = (_e = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _e !== void 0 ? _e : columnFilterModeOptions;
1455
+ const allowedColumnFilterOptions = (_f = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _f !== void 0 ? _f : columnFilterModeOptions;
1436
1456
  const showChangeModeButton = enableColumnFilterModes &&
1437
1457
  columnDef.enableColumnFilterModes !== false &&
1438
1458
  !rangeFilterIndex &&
1439
1459
  (allowedColumnFilterOptions === undefined ||
1440
1460
  !!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
1441
1461
  const facetedUniqueValues = column.getFacetedUniqueValues();
1442
- const filterSelectOptions = useMemo(() => {
1443
- var _a;
1444
- return (_a = columnDef.filterSelectOptions) !== null && _a !== void 0 ? _a : ((isSelectFilter || isMultiSelectFilter) && facetedUniqueValues
1445
- ? Array.from(facetedUniqueValues.keys())
1446
- .filter((value) => value !== null && value !== undefined)
1447
- .sort((a, b) => a.localeCompare(b))
1448
- : undefined);
1449
- }, [
1450
- columnDef.filterSelectOptions,
1451
- facetedUniqueValues,
1452
- isMultiSelectFilter,
1453
- isSelectFilter,
1454
- ]);
1455
1462
  const [anchorEl, setAnchorEl] = useState(null);
1456
1463
  const [filterValue, setFilterValue] = useState(() => {
1457
1464
  var _a, _b;
1458
1465
  return isMultiSelectFilter
1459
1466
  ? column.getFilterValue() || []
1460
1467
  : isRangeFilter
1461
- ? ((_a = column.getFilterValue()) === null || _a === void 0 ? void 0 : _a[rangeFilterIndex]) || []
1468
+ ? ((_a = column.getFilterValue()) === null || _a === void 0 ? void 0 : _a[rangeFilterIndex]) || ''
1462
1469
  : (_b = column.getFilterValue()) !== null && _b !== void 0 ? _b : '';
1463
1470
  });
1464
- const handleChangeDebounced = useCallback(debounce((event) => {
1465
- const value = textFieldProps.type === 'date'
1466
- ? event.target.valueAsDate
1467
- : textFieldProps.type === 'number'
1468
- ? event.target.valueAsNumber
1469
- : event.target.value;
1471
+ const handleChangeDebounced = useCallback(debounce((newValue) => {
1470
1472
  if (isRangeFilter) {
1471
1473
  column.setFilterValue((old) => {
1472
1474
  const newFilterValues = old !== null && old !== void 0 ? old : ['', ''];
1473
- newFilterValues[rangeFilterIndex] = value;
1475
+ newFilterValues[rangeFilterIndex] = newValue;
1474
1476
  return newFilterValues;
1475
1477
  });
1476
1478
  }
1477
1479
  else {
1478
- column.setFilterValue(value !== null && value !== void 0 ? value : undefined);
1480
+ column.setFilterValue(newValue !== null && newValue !== void 0 ? newValue : undefined);
1479
1481
  }
1480
1482
  }, isTextboxFilter ? (manualFiltering ? 400 : 200) : 1), []);
1481
- const handleChange = (event) => {
1482
- setFilterValue(event.target.value);
1483
- handleChangeDebounced(event);
1483
+ const handleChange = (newValue) => {
1484
+ var _a;
1485
+ setFilterValue((_a = newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== null && _a !== void 0 ? _a : '');
1486
+ handleChangeDebounced(newValue);
1487
+ };
1488
+ const handleTextFieldChange = (event) => {
1489
+ var _a;
1490
+ const newValue = textFieldProps.type === 'date'
1491
+ ? event.target.valueAsDate
1492
+ : textFieldProps.type === 'number'
1493
+ ? event.target.valueAsNumber
1494
+ : event.target.value;
1495
+ handleChange(newValue);
1496
+ (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onChange) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, event);
1484
1497
  };
1485
1498
  const handleClear = () => {
1486
1499
  if (isMultiSelectFilter) {
@@ -1528,26 +1541,76 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1528
1541
  isMounted.current = true;
1529
1542
  }, [column.getFilterValue()]);
1530
1543
  if (columnDef.Filter) {
1531
- return (jsx(Fragment, { children: (_f = columnDef.Filter) === null || _f === void 0 ? void 0 : _f.call(columnDef, { column, header, rangeFilterIndex, table }) }));
1544
+ return (jsx(Fragment, { children: (_g = columnDef.Filter) === null || _g === void 0 ? void 0 : _g.call(columnDef, { column, header, rangeFilterIndex, table }) }));
1532
1545
  }
1533
- return (jsxs(Fragment, { children: [jsxs(TextField, Object.assign({ FormHelperTextProps: {
1534
- sx: {
1535
- fontSize: '0.75rem',
1536
- lineHeight: '0.8rem',
1537
- whiteSpace: 'nowrap',
1538
- },
1539
- }, InputProps: {
1540
- endAdornment: !filterChipLabel && (jsx(InputAdornment, { position: "end", children: jsx(Tooltip, { arrow: true, placement: "right", title: (_g = localization.clearFilter) !== null && _g !== void 0 ? _g : '', children: jsx("span", { children: jsx(IconButton, { "aria-label": localization.clearFilter, disabled: !((_h = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _h === void 0 ? void 0 : _h.length), onClick: handleClear, size: "small", sx: {
1541
- height: '1.75rem',
1542
- width: '1.75rem',
1543
- }, children: jsx(CloseIcon, {}) }) }) }) })),
1544
- 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, { label: filterChipLabel, onDelete: handleClearEmptyFilterChip }))] })) : null,
1545
- }, SelectProps: {
1546
+ const dropdownOptions = useMemo(() => {
1547
+ var _a;
1548
+ return (_a = columnDef.filterSelectOptions) !== null && _a !== void 0 ? _a : ((isSelectFilter || isMultiSelectFilter || isAutocompleteFilter) &&
1549
+ facetedUniqueValues
1550
+ ? Array.from(facetedUniqueValues.keys())
1551
+ .filter((value) => value !== null && value !== undefined)
1552
+ .sort((a, b) => a.localeCompare(b))
1553
+ : undefined);
1554
+ }, [
1555
+ columnDef.filterSelectOptions,
1556
+ facetedUniqueValues,
1557
+ isMultiSelectFilter,
1558
+ isSelectFilter,
1559
+ ]);
1560
+ const endAdornment = !isAutocompleteFilter && !isDateFilter && !filterChipLabel ? (jsx(InputAdornment, { position: "end", sx: { mr: isSelectFilter || isMultiSelectFilter ? '20px' : undefined }, 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: {
1561
+ height: '2rem',
1562
+ transform: 'scale(0.9)',
1563
+ width: '2rem'
1564
+ }, children: jsx(CloseIcon, {}) }) }) }) })) : null;
1565
+ const 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, { label: filterChipLabel, onDelete: handleClearEmptyFilterChip }))] })) : null;
1566
+ const commonTextFieldProps = Object.assign(Object.assign({ FormHelperTextProps: {
1567
+ sx: {
1568
+ fontSize: '0.75rem',
1569
+ lineHeight: '0.8rem',
1570
+ whiteSpace: 'nowrap',
1571
+ },
1572
+ }, InputProps: endAdornment //hack because mui looks for presense of endAdornment key instead of undefined
1573
+ ? { endAdornment, startAdornment }
1574
+ : { startAdornment }, fullWidth: true, helperText: showChangeModeButton ? (jsx("label", { children: localization.filterMode.replace('{filterType}',
1575
+ // @ts-ignore
1576
+ localization[`filter${((_k = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _k === void 0 ? void 0 : _k.toUpperCase()) +
1577
+ (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null, inputProps: {
1578
+ autoComplete: 'new-password',
1579
+ disabled: !!filterChipLabel,
1580
+ sx: {
1581
+ textOverflow: 'ellipsis',
1582
+ width: filterChipLabel ? 0 : undefined,
1583
+ },
1584
+ title: filterPlaceholder,
1585
+ }, inputRef: (inputRef) => {
1586
+ filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
1587
+ inputRef;
1588
+ if (textFieldProps.inputRef) {
1589
+ textFieldProps.inputRef = inputRef;
1590
+ }
1591
+ }, margin: 'none', onClick: (e) => e.stopPropagation(), placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1592
+ ? undefined
1593
+ : filterPlaceholder, variant: 'standard' }, textFieldProps), { sx: (theme) => (Object.assign({ minWidth: isDateFilter
1594
+ ? '160px'
1595
+ : isRangeFilter
1596
+ ? '100px'
1597
+ : !filterChipLabel
1598
+ ? '120px'
1599
+ : 'auto', mx: '-2px', p: 0, width: 'calc(100% + 4px)' }, parseFromValuesOrFunc(textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx, theme))) });
1600
+ return (jsxs(Fragment, { children: [isDateFilter ? (jsx(DatePicker, Object.assign({ onChange: (newDate) => {
1601
+ handleChange(newDate);
1602
+ }, value: filterValue || null }, datePickerProps, { slotProps: {
1603
+ field: Object.assign({ clearable: true, onClear: () => handleClear() }, (_l = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _l === void 0 ? void 0 : _l.field),
1604
+ textField: Object.assign(Object.assign({}, commonTextFieldProps), (_m = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _m === void 0 ? void 0 : _m.textField),
1605
+ } }))) : isAutocompleteFilter ? (jsx(Autocomplete, Object.assign({ getOptionLabel: (option) => option, onChange: (_e, newValue) => handleChange(newValue), options: dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
1606
+ var _a;
1607
+ return (jsx(TextField, Object.assign({}, builtinTextFieldProps, commonTextFieldProps, { InputProps: Object.assign(Object.assign({}, builtinTextFieldProps.InputProps), { startAdornment: (_a = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.startAdornment }), inputProps: Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.inputProps), onChange: handleTextFieldChange })));
1608
+ }, value: filterValue }))) : (jsx(TextField, Object.assign({ SelectProps: {
1546
1609
  displayEmpty: true,
1547
1610
  multiple: isMultiSelectFilter,
1548
1611
  renderValue: isMultiSelectFilter
1549
1612
  ? (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) => {
1550
- const selectedValue = filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.find((option) => option instanceof Object
1613
+ const selectedValue = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.find((option) => option instanceof Object
1551
1614
  ? option.value === value
1552
1615
  : option === value);
1553
1616
  return (jsx(Chip, { label: selectedValue instanceof Object
@@ -1555,52 +1618,33 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1555
1618
  : selectedValue }, value));
1556
1619
  }) }))
1557
1620
  : undefined,
1558
- }, fullWidth: true, helperText: showChangeModeButton ? (jsx("label", { children: localization.filterMode.replace('{filterType}',
1559
- // @ts-ignore
1560
- localization[`filter${((_j = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _j === void 0 ? void 0 : _j.toUpperCase()) +
1561
- (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null, inputProps: {
1562
- disabled: !!filterChipLabel,
1563
- sx: {
1564
- textOverflow: 'ellipsis',
1565
- width: filterChipLabel ? 0 : undefined,
1566
- },
1567
- title: filterPlaceholder,
1568
- }, margin: "none", onChange: handleChange, onClick: (e) => e.stopPropagation(), placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1569
- ? undefined
1570
- : filterPlaceholder, select: isSelectFilter || isMultiSelectFilter, value: filterValue !== null && filterValue !== void 0 ? filterValue : '', variant: "standard" }, textFieldProps, { inputRef: (inputRef) => {
1571
- filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
1572
- inputRef;
1573
- if (textFieldProps.inputRef) {
1574
- textFieldProps.inputRef = inputRef;
1575
- }
1576
- }, sx: (theme) => (Object.assign({ '& .MuiSelect-icon': {
1577
- mr: '1.5rem',
1578
- }, minWidth: isRangeFilter
1579
- ? '100px'
1580
- : !filterChipLabel
1581
- ? '120px'
1582
- : 'auto', mx: '-2px', p: 0, width: 'calc(100% + 4px)' }, parseFromValuesOrFunc(textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx, theme))), children: [(isSelectFilter || isMultiSelectFilter) && (jsx(MenuItem, { disabled: true, divider: 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) => {
1583
- var _a;
1584
- if (!option)
1585
- return '';
1586
- let value;
1587
- let text;
1588
- if (typeof option !== 'object') {
1589
- value = option;
1590
- text = option;
1591
- }
1592
- else {
1593
- value = option.value;
1594
- text = option.text;
1595
- }
1596
- return (jsxs(MenuItem, { sx: {
1597
- alignItems: 'center',
1598
- display: 'flex',
1599
- gap: '0.5rem',
1600
- m: 0,
1601
- }, value: value, children: [isMultiSelectFilter && (jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text, ' ', !columnDef.filterSelectOptions &&
1602
- `(${facetedUniqueValues.get(value)})`] }, value));
1603
- })] })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, setFilterValue: setFilterValue, table: table })] }));
1621
+ }, onChange: handleTextFieldChange, select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { value: filterValue !== null && filterValue !== void 0 ? filterValue : '', children: (isSelectFilter || isMultiSelectFilter) && [
1622
+ jsx(MenuItem, { disabled: true, divider: true, hidden: true, value: "", children: jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder }) }, "p"),
1623
+ ...[
1624
+ (_o = textFieldProps.children) !== null && _o !== void 0 ? _o : dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => {
1625
+ var _a;
1626
+ if (!option)
1627
+ return '';
1628
+ let value;
1629
+ let text;
1630
+ if (typeof option !== 'object') {
1631
+ value = option;
1632
+ text = option;
1633
+ }
1634
+ else {
1635
+ value = option.value;
1636
+ text = option.text;
1637
+ }
1638
+ return (jsxs(MenuItem, { sx: {
1639
+ alignItems: 'center',
1640
+ display: 'flex',
1641
+ gap: '0.5rem',
1642
+ m: 0,
1643
+ }, value: value, children: [isMultiSelectFilter && (jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text, ' ', !columnDef.filterSelectOptions &&
1644
+ `(${facetedUniqueValues.get(value)})`] }, `${index}-${value}`));
1645
+ }),
1646
+ ],
1647
+ ] }))), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, setFilterValue: setFilterValue, table: table })] }));
1604
1648
  };
1605
1649
 
1606
1650
  const MRT_FilterRangeFields = ({ header, table, }) => {
@@ -1679,16 +1723,17 @@ const MRT_FilterRangeSlider = ({ header, table, }) => {
1679
1723
  };
1680
1724
 
1681
1725
  const MRT_TableHeadCellFilterContainer = ({ header, table, }) => {
1726
+ var _a;
1682
1727
  const { getState, options: { columnFilterDisplayMode }, } = table;
1683
1728
  const { showColumnFilters } = getState();
1684
1729
  const { column } = header;
1685
1730
  const { columnDef } = column;
1686
- return (jsx(Collapse, { in: showColumnFilters || columnFilterDisplayMode === 'popover', 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' ||
1731
+ return (jsx(Collapse, { in: showColumnFilters || columnFilterDisplayMode === 'popover', 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 })) : ((_a = columnDef.filterVariant) === null || _a === void 0 ? void 0 : _a.includes('range')) ||
1687
1732
  ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsx(MRT_FilterTextField, { header: header, table: table })) }));
1688
1733
  };
1689
1734
 
1690
1735
  const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1691
- var _a, _b, _c, _d;
1736
+ var _a, _b, _c;
1692
1737
  const { options: { columnFilterDisplayMode, icons: { FilterAltIcon }, localization, }, refs: { filterInputRefs }, setShowColumnFilters, } = table;
1693
1738
  const { column } = header;
1694
1739
  const { columnDef } = column;
@@ -1696,26 +1741,26 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1696
1741
  const [anchorEl, setAnchorEl] = useState(null);
1697
1742
  const isFilterActive = (Array.isArray(filterValue) && filterValue.some(Boolean)) ||
1698
1743
  (!!filterValue && !Array.isArray(filterValue));
1699
- const isRangeFilter = columnDef.filterVariant === 'range' ||
1744
+ const isRangeFilter = ((_a = columnDef.filterVariant) === null || _a === void 0 ? void 0 : _a.includes('range')) ||
1700
1745
  ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn);
1701
1746
  const currentFilterOption = columnDef._filterFn;
1702
1747
  const filterTooltip = columnFilterDisplayMode === 'popover' && !isFilterActive
1703
- ? (_a = localization.filterByColumn) === null || _a === void 0 ? void 0 : _a.replace('{column}', String(columnDef.header))
1748
+ ? (_b = localization.filterByColumn) === null || _b === void 0 ? void 0 : _b.replace('{column}', String(columnDef.header))
1704
1749
  : localization.filteringByColumn
1705
1750
  .replace('{column}', String(columnDef.header))
1706
1751
  .replace('{filterType}', currentFilterOption
1707
1752
  ? // @ts-ignore
1708
- localization[`filter${((_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
1753
+ localization[`filter${((_c = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _c === void 0 ? void 0 : _c.toUpperCase()) +
1709
1754
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]
1710
1755
  : '')
1711
- .replace('{filterValue}', `"${Array.isArray(column.getFilterValue())
1712
- ? column.getFilterValue().join(`" ${isRangeFilter ? localization.and : localization.or} "`)
1713
- : column.getFilterValue()}"`)
1756
+ .replace('{filterValue}', `"${Array.isArray(filterValue)
1757
+ ? filterValue.join(`" ${isRangeFilter ? localization.and : localization.or} "`)
1758
+ : filterValue}"`)
1714
1759
  .replace('" "', '');
1715
1760
  return (jsxs(Fragment, { children: [jsx(Grow, { in: columnFilterDisplayMode === 'popover' ||
1716
- (!!column.getFilterValue() && !isRangeFilter) ||
1761
+ (!!filterValue && !isRangeFilter) ||
1717
1762
  (isRangeFilter && // @ts-ignore
1718
- (!!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[0]) || !!((_d = column.getFilterValue()) === null || _d === void 0 ? void 0 : _d[1]))), unmountOnExit: true, 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) => {
1763
+ (!!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[0]) || !!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[1]))), unmountOnExit: true, 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) => {
1719
1764
  if (columnFilterDisplayMode === 'popover') {
1720
1765
  setAnchorEl(event.currentTarget);
1721
1766
  }
@@ -2192,41 +2237,40 @@ const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
2192
2237
  }, unmountOnExit: true, children: jsx(LinearProgress, Object.assign({ "aria-busy": "true", "aria-label": "Loading", sx: { position: 'relative' } }, linearProgressProps)) }));
2193
2238
  };
2194
2239
 
2240
+ const defaultPageSizeOptions = [5, 10, 15, 20, 25, 30, 50, 100];
2195
2241
  const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2196
- const { getPrePaginationRowModel, getState, options: { enableToolbarInternalActions, localization, muiTablePaginationProps, rowCount, }, setPageIndex, setPageSize, } = table;
2242
+ const { getPrePaginationRowModel, getState, options: { enableToolbarInternalActions, icons: { ChevronLefIcon, ChevronRightIcon, FirstPageIcon, LastPageIcon }, localization, muiTablePaginationProps, paginationDisplayMode, rowCount, }, setPageIndex, setPageSize, } = table;
2197
2243
  const { pagination: { pageIndex = 0, pageSize = 10 }, showGlobalFilter, } = getState();
2198
- const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length;
2199
- const showFirstLastPageButtons = totalRowCount / pageSize > 2;
2200
- const tablePaginationProps = parseFromValuesOrFunc(muiTablePaginationProps, {
2244
+ const paginationProps = parseFromValuesOrFunc(muiTablePaginationProps, {
2201
2245
  table,
2202
2246
  });
2203
- const handleChangeRowsPerPage = (event) => {
2204
- setPageSize(+event.target.value);
2205
- };
2206
- return (jsx(TablePagination, Object.assign({ component: "div", count: totalRowCount, getItemAriaLabel: (type) => type === 'first'
2207
- ? localization.goToFirstPage
2208
- : type === 'last'
2209
- ? localization.goToLastPage
2210
- : type === 'next'
2211
- ? localization.goToNextPage
2212
- : localization.goToPreviousPage, labelDisplayedRows: ({ count, from, to }) => `${from}-${to} ${localization.of} ${count}`, labelRowsPerPage: localization.rowsPerPage, onPageChange: (_, newPage) => setPageIndex(newPage), onRowsPerPageChange: handleChangeRowsPerPage, page: Math.max(Math.min(pageIndex, Math.ceil(totalRowCount / pageSize) - 1), 0), rowsPerPage: pageSize, rowsPerPageOptions: [5, 10, 15, 20, 25, 30, 50, 100], showFirstButton: showFirstLastPageButtons, showLastButton: showFirstLastPageButtons }, tablePaginationProps, { SelectProps: Object.assign({ MenuProps: { MenuListProps: { disablePadding: true }, sx: { m: 0 } }, sx: { m: '0 1rem 0 1ch' } }, tablePaginationProps === null || tablePaginationProps === void 0 ? void 0 : tablePaginationProps.SelectProps), sx: (theme) => (Object.assign({ '& . MuiTablePagination-select': {
2213
- m: '0 1px',
2214
- }, '& .MuiTablePagination-actions': {
2215
- m: '0 1px',
2216
- }, '& .MuiTablePagination-displayedRows': {
2217
- m: '0 1px',
2218
- }, '& .MuiTablePagination-selectLabel': {
2219
- m: '0 -1px',
2220
- }, '& .MuiTablePagination-toolbar': {
2221
- alignItems: 'center',
2222
- display: 'flex',
2223
- }, '&. MuiInputBase-root': {
2224
- m: '0 1px',
2225
- }, mt: position === 'top' &&
2247
+ const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length;
2248
+ const numberOfPages = Math.ceil(totalRowCount / pageSize);
2249
+ const showFirstLastPageButtons = numberOfPages > 2;
2250
+ const showFirstButton = showFirstLastPageButtons && (paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.showFirstButton) !== false;
2251
+ const showLastButton = showFirstLastPageButtons && (paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.showLastButton) !== false;
2252
+ const firstRowIndex = pageIndex * pageSize;
2253
+ const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
2254
+ return (jsxs(Box, { sx: {
2255
+ alignItems: 'center',
2256
+ display: 'flex',
2257
+ gap: '8px',
2258
+ justifyContent: 'space-between',
2259
+ mt: position === 'top' &&
2226
2260
  enableToolbarInternalActions &&
2227
2261
  !showGlobalFilter
2228
- ? '3.5rem'
2229
- : undefined, position: 'relative', zIndex: 2 }, parseFromValuesOrFunc(tablePaginationProps === null || tablePaginationProps === void 0 ? void 0 : tablePaginationProps.sx, theme))) })));
2262
+ ? '3rem'
2263
+ : undefined,
2264
+ position: 'relative',
2265
+ px: '4px',
2266
+ py: '12px',
2267
+ zIndex: 2,
2268
+ }, children: [(paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.showRowsPerPage) !== false && (jsxs(Box, { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsx(InputLabel, { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsx(Select, { id: "mrt-rows-per-page", label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { '&::before': { border: 'none' }, mb: 0 }, value: pageSize, variant: "standard", children: defaultPageSizeOptions.map((value) => (jsx(MenuItem, { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsx(Pagination, Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsx(PaginationItem, Object.assign({ slots: {
2269
+ first: FirstPageIcon,
2270
+ last: LastPageIcon,
2271
+ next: ChevronRightIcon,
2272
+ previous: ChevronLefIcon,
2273
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, paginationProps))) : paginationDisplayMode === 'default' ? (jsxs(Fragment, { children: [jsx(Typography, { mb: "0", mx: "8px", variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxs(Box, { gap: "xs", children: [showFirstButton && (jsx(IconButton, { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsx(FirstPageIcon, {}) })), jsx(IconButton, { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsx(ChevronLefIcon, {}) }), jsx(IconButton, { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsx(ChevronRightIcon, {}) }), showLastButton && (jsx(IconButton, { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsx(LastPageIcon, {}) }))] })] })) : null] }));
2230
2274
  };
2231
2275
 
2232
2276
  const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
@@ -2874,8 +2918,9 @@ const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOption
2874
2918
  };
2875
2919
 
2876
2920
  const useMRT_Effects = (table) => {
2877
- const { getState, options: { enablePagination, rowCount }, } = table;
2878
- const { globalFilter, isFullScreen, isLoading, pagination, showSkeletons, sorting, } = getState();
2921
+ const { getIsSomeRowsPinned, getState, options: { enablePagination, enableRowPinning, rowCount }, } = table;
2922
+ const { density, globalFilter, isFullScreen, isLoading, pagination, showSkeletons, sorting, } = getState();
2923
+ const rerender = useReducer(() => ({}), {})[1];
2879
2924
  const isMounted = useRef(false);
2880
2925
  const initialBodyHeight = useRef();
2881
2926
  const previousTop = useRef();
@@ -2931,6 +2976,13 @@ const useMRT_Effects = (table) => {
2931
2976
  table.setSorting(() => appliedSort.current || []);
2932
2977
  }
2933
2978
  }, [globalFilter]);
2979
+ useEffect(() => {
2980
+ if (enableRowPinning && getIsSomeRowsPinned()) {
2981
+ setTimeout(() => {
2982
+ rerender();
2983
+ }, 150);
2984
+ }
2985
+ }, [density]);
2934
2986
  };
2935
2987
 
2936
2988
  const useMRT_TableInstance = (tableOptions) => {
@@ -3199,6 +3251,8 @@ const MRT_Default_Icons = {
3199
3251
  ArrowDownwardIcon,
3200
3252
  ArrowRightIcon,
3201
3253
  CancelIcon,
3254
+ ChevronLefIcon,
3255
+ ChevronRightIcon,
3202
3256
  ClearAllIcon,
3203
3257
  CloseIcon,
3204
3258
  DensityLargeIcon,
@@ -3211,9 +3265,11 @@ const MRT_Default_Icons = {
3211
3265
  FilterAltIcon,
3212
3266
  FilterListIcon,
3213
3267
  FilterListOffIcon,
3268
+ FirstPageIcon,
3214
3269
  FullscreenExitIcon,
3215
3270
  FullscreenIcon,
3216
3271
  KeyboardDoubleArrowDownIcon,
3272
+ LastPageIcon,
3217
3273
  MoreHorizIcon,
3218
3274
  MoreVertIcon,
3219
3275
  PushPinIcon,