material-react-table 2.0.0-alpha.5 → 2.0.0-beta.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 (207) hide show
  1. package/dist/cjs/index.js +141 -68
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +2 -1
  4. package/dist/cjs/types/column.utils.d.ts +2 -0
  5. package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  6. package/dist/cjs/types/icons.d.ts +1 -0
  7. package/dist/cjs/types/types.d.ts +12 -19
  8. package/dist/esm/material-react-table.esm.js +139 -68
  9. package/dist/esm/material-react-table.esm.js.map +1 -1
  10. package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +2 -1
  11. package/dist/esm/types/column.utils.d.ts +2 -0
  12. package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  13. package/dist/esm/types/icons.d.ts +1 -0
  14. package/dist/esm/types/types.d.ts +12 -19
  15. package/dist/index.d.ts +19 -23
  16. package/locales/ar.esm.js +1 -0
  17. package/locales/ar.esm.js.map +1 -1
  18. package/locales/ar.js +1 -0
  19. package/locales/ar.js.map +1 -1
  20. package/locales/bg.esm.js +1 -0
  21. package/locales/bg.esm.js.map +1 -1
  22. package/locales/bg.js +1 -0
  23. package/locales/bg.js.map +1 -1
  24. package/locales/cs.esm.js +1 -0
  25. package/locales/cs.esm.js.map +1 -1
  26. package/locales/cs.js +1 -0
  27. package/locales/cs.js.map +1 -1
  28. package/locales/da.esm.js +1 -0
  29. package/locales/da.esm.js.map +1 -1
  30. package/locales/da.js +1 -0
  31. package/locales/da.js.map +1 -1
  32. package/locales/de.esm.js +1 -0
  33. package/locales/de.esm.js.map +1 -1
  34. package/locales/de.js +1 -0
  35. package/locales/de.js.map +1 -1
  36. package/locales/es.esm.js +1 -0
  37. package/locales/es.esm.js.map +1 -1
  38. package/locales/es.js +1 -0
  39. package/locales/es.js.map +1 -1
  40. package/locales/et.esm.js +1 -0
  41. package/locales/et.esm.js.map +1 -1
  42. package/locales/et.js +1 -0
  43. package/locales/et.js.map +1 -1
  44. package/locales/fa.esm.js +1 -0
  45. package/locales/fa.esm.js.map +1 -1
  46. package/locales/fa.js +1 -0
  47. package/locales/fa.js.map +1 -1
  48. package/locales/fi.esm.js +1 -0
  49. package/locales/fi.esm.js.map +1 -1
  50. package/locales/fi.js +1 -0
  51. package/locales/fi.js.map +1 -1
  52. package/locales/fr.esm.js +1 -0
  53. package/locales/fr.esm.js.map +1 -1
  54. package/locales/fr.js +1 -0
  55. package/locales/fr.js.map +1 -1
  56. package/locales/hu.esm.js +1 -0
  57. package/locales/hu.esm.js.map +1 -1
  58. package/locales/hu.js +1 -0
  59. package/locales/hu.js.map +1 -1
  60. package/locales/hy.esm.js +1 -0
  61. package/locales/hy.esm.js.map +1 -1
  62. package/locales/hy.js +1 -0
  63. package/locales/hy.js.map +1 -1
  64. package/locales/id.esm.js +1 -0
  65. package/locales/id.esm.js.map +1 -1
  66. package/locales/id.js +1 -0
  67. package/locales/id.js.map +1 -1
  68. package/locales/it.esm.js +1 -0
  69. package/locales/it.esm.js.map +1 -1
  70. package/locales/it.js +1 -0
  71. package/locales/it.js.map +1 -1
  72. package/locales/ja.esm.js +1 -0
  73. package/locales/ja.esm.js.map +1 -1
  74. package/locales/ja.js +1 -0
  75. package/locales/ja.js.map +1 -1
  76. package/locales/ko.esm.js +1 -0
  77. package/locales/ko.esm.js.map +1 -1
  78. package/locales/ko.js +1 -0
  79. package/locales/ko.js.map +1 -1
  80. package/locales/nl.esm.js +1 -0
  81. package/locales/nl.esm.js.map +1 -1
  82. package/locales/nl.js +1 -0
  83. package/locales/nl.js.map +1 -1
  84. package/locales/no.esm.js +1 -0
  85. package/locales/no.esm.js.map +1 -1
  86. package/locales/no.js +1 -0
  87. package/locales/no.js.map +1 -1
  88. package/locales/np.esm.js +1 -1
  89. package/locales/np.esm.js.map +1 -1
  90. package/locales/np.js +1 -1
  91. package/locales/np.js.map +1 -1
  92. package/locales/pl.esm.js +1 -0
  93. package/locales/pl.esm.js.map +1 -1
  94. package/locales/pl.js +1 -0
  95. package/locales/pl.js.map +1 -1
  96. package/locales/pt-BR.esm.js +1 -0
  97. package/locales/pt-BR.esm.js.map +1 -1
  98. package/locales/pt-BR.js +1 -0
  99. package/locales/pt-BR.js.map +1 -1
  100. package/locales/pt.esm.js +1 -0
  101. package/locales/pt.esm.js.map +1 -1
  102. package/locales/pt.js +1 -0
  103. package/locales/pt.js.map +1 -1
  104. package/locales/ro.esm.js +1 -0
  105. package/locales/ro.esm.js.map +1 -1
  106. package/locales/ro.js +1 -0
  107. package/locales/ro.js.map +1 -1
  108. package/locales/ru.esm.js +1 -0
  109. package/locales/ru.esm.js.map +1 -1
  110. package/locales/ru.js +1 -0
  111. package/locales/ru.js.map +1 -1
  112. package/locales/sk.esm.js +1 -0
  113. package/locales/sk.esm.js.map +1 -1
  114. package/locales/sk.js +1 -0
  115. package/locales/sk.js.map +1 -1
  116. package/locales/sr-Cyrl-RS.esm.js +1 -0
  117. package/locales/sr-Cyrl-RS.esm.js.map +1 -1
  118. package/locales/sr-Cyrl-RS.js +1 -0
  119. package/locales/sr-Cyrl-RS.js.map +1 -1
  120. package/locales/sr-Latn-RS.esm.js +1 -0
  121. package/locales/sr-Latn-RS.esm.js.map +1 -1
  122. package/locales/sr-Latn-RS.js +1 -0
  123. package/locales/sr-Latn-RS.js.map +1 -1
  124. package/locales/sv.esm.js +3 -2
  125. package/locales/sv.esm.js.map +1 -1
  126. package/locales/sv.js +3 -2
  127. package/locales/sv.js.map +1 -1
  128. package/locales/tr.esm.js +1 -0
  129. package/locales/tr.esm.js.map +1 -1
  130. package/locales/tr.js +1 -0
  131. package/locales/tr.js.map +1 -1
  132. package/locales/uk.esm.js +1 -0
  133. package/locales/uk.esm.js.map +1 -1
  134. package/locales/uk.js +1 -0
  135. package/locales/uk.js.map +1 -1
  136. package/locales/vi.esm.js +1 -0
  137. package/locales/vi.esm.js.map +1 -1
  138. package/locales/vi.js +1 -0
  139. package/locales/vi.js.map +1 -1
  140. package/locales/zh-Hans.esm.js +1 -0
  141. package/locales/zh-Hans.esm.js.map +1 -1
  142. package/locales/zh-Hans.js +1 -0
  143. package/locales/zh-Hans.js.map +1 -1
  144. package/locales/zh-Hant.esm.js +1 -0
  145. package/locales/zh-Hant.esm.js.map +1 -1
  146. package/locales/zh-Hant.js +1 -0
  147. package/locales/zh-Hant.js.map +1 -1
  148. package/package.json +11 -11
  149. package/src/body/MRT_TableBody.tsx +20 -4
  150. package/src/body/MRT_TableBodyCell.tsx +4 -3
  151. package/src/body/MRT_TableBodyRow.tsx +7 -5
  152. package/src/body/MRT_TableBodyRowGrabHandle.tsx +1 -0
  153. package/src/body/index.ts +1 -1
  154. package/src/buttons/MRT_ExpandButton.tsx +1 -0
  155. package/src/buttons/MRT_GrabHandleButton.tsx +3 -1
  156. package/src/column.utils.ts +22 -2
  157. package/src/filterFns.ts +3 -3
  158. package/src/footer/MRT_TableFooterCell.tsx +5 -1
  159. package/src/footer/MRT_TableFooterRow.tsx +2 -2
  160. package/src/head/MRT_TableHead.tsx +5 -1
  161. package/src/head/MRT_TableHeadCell.tsx +11 -6
  162. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -2
  163. package/src/head/MRT_TableHeadCellFilterLabel.tsx +6 -1
  164. package/src/head/MRT_TableHeadCellSortLabel.tsx +18 -12
  165. package/src/head/MRT_TableHeadRow.tsx +2 -2
  166. package/src/hooks/useMRT_DisplayColumns.tsx +20 -0
  167. package/src/hooks/useMRT_TableInstance.ts +6 -6
  168. package/src/icons.ts +3 -0
  169. package/src/inputs/MRT_FilterTextField.tsx +4 -3
  170. package/src/locales/ar.ts +1 -1
  171. package/src/locales/bg.ts +1 -0
  172. package/src/locales/cs.ts +1 -0
  173. package/src/locales/da.ts +1 -0
  174. package/src/locales/de.ts +1 -0
  175. package/src/locales/es.ts +1 -0
  176. package/src/locales/et.ts +1 -0
  177. package/src/locales/fa.ts +1 -0
  178. package/src/locales/fi.ts +1 -0
  179. package/src/locales/fr.ts +1 -0
  180. package/src/locales/hu.ts +1 -0
  181. package/src/locales/hy.ts +1 -0
  182. package/src/locales/id.ts +1 -0
  183. package/src/locales/it.ts +1 -0
  184. package/src/locales/ja.ts +1 -0
  185. package/src/locales/ko.ts +1 -0
  186. package/src/locales/nl.ts +1 -0
  187. package/src/locales/no.ts +1 -0
  188. package/src/locales/np.ts +3 -2
  189. package/src/locales/pl.ts +1 -0
  190. package/src/locales/pt-BR.ts +1 -0
  191. package/src/locales/pt.ts +1 -0
  192. package/src/locales/ro.ts +1 -0
  193. package/src/locales/ru.ts +1 -0
  194. package/src/locales/sk.ts +1 -0
  195. package/src/locales/sr-Cyrl-RS.ts +1 -0
  196. package/src/locales/sr-Latn-RS.ts +1 -0
  197. package/src/locales/sv.ts +3 -2
  198. package/src/locales/tr.ts +1 -0
  199. package/src/locales/uk.ts +1 -0
  200. package/src/locales/vi.ts +1 -0
  201. package/src/locales/zh-Hans.ts +1 -0
  202. package/src/locales/zh-Hant.ts +1 -0
  203. package/src/table/MRT_Table.tsx +24 -10
  204. package/src/table/MRT_TableContainer.tsx +50 -1
  205. package/src/toolbar/MRT_LinearProgressBar.tsx +2 -2
  206. package/src/toolbar/MRT_TablePagination.tsx +3 -4
  207. package/src/types.ts +12 -11
@@ -1,16 +1,17 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import Paper from '@mui/material/Paper';
3
3
  import { useState, memo, useEffect, useMemo, useRef, useCallback, Fragment as Fragment$1, useLayoutEffect, useReducer } from 'react';
4
+ import Box from '@mui/material/Box';
5
+ import CircularProgress from '@mui/material/CircularProgress';
4
6
  import TableContainer from '@mui/material/TableContainer';
5
- import { useVirtualizer, defaultRangeExtractor } from '@tanstack/react-virtual';
7
+ import { darken, lighten, alpha, useTheme } from '@mui/material/styles';
8
+ import { defaultRangeExtractor, useVirtualizer } from '@tanstack/react-virtual';
6
9
  import Table from '@mui/material/Table';
7
10
  import TableBody from '@mui/material/TableBody';
8
11
  import Typography from '@mui/material/Typography';
9
12
  import TableRow from '@mui/material/TableRow';
10
- import { darken, lighten, alpha, useTheme } from '@mui/material/styles';
11
13
  import Skeleton from '@mui/material/Skeleton';
12
14
  import TableCell from '@mui/material/TableCell';
13
- import Box from '@mui/material/Box';
14
15
  import highlightWords from 'highlight-words';
15
16
  import IconButton from '@mui/material/IconButton';
16
17
  import Tooltip from '@mui/material/Tooltip';
@@ -55,7 +56,6 @@ import Dialog from '@mui/material/Dialog';
55
56
  import DialogActions from '@mui/material/DialogActions';
56
57
  import DialogContent from '@mui/material/DialogContent';
57
58
  import DialogTitle from '@mui/material/DialogTitle';
58
- import CircularProgress from '@mui/material/CircularProgress';
59
59
  import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
60
60
  import ArrowRightIcon from '@mui/icons-material/ArrowRight';
61
61
  import CancelIcon from '@mui/icons-material/Cancel';
@@ -86,6 +86,7 @@ import SaveIcon from '@mui/icons-material/Save';
86
86
  import SearchIcon from '@mui/icons-material/Search';
87
87
  import SearchOffIcon from '@mui/icons-material/SearchOff';
88
88
  import SortIcon from '@mui/icons-material/Sort';
89
+ import SyncAltIcon from '@mui/icons-material/SyncAlt';
89
90
  import ViewColumnIcon from '@mui/icons-material/ViewColumn';
90
91
  import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
91
92
 
@@ -249,6 +250,7 @@ const getLeadingDisplayColumnIds = (props) => {
249
250
  'mrt-row-expand',
250
251
  props.enableRowSelection && 'mrt-row-select',
251
252
  props.enableRowNumbers && 'mrt-row-numbers',
253
+ props.layoutMode === 'grid-no-grow' && 'mrt-row-spacer',
252
254
  ].filter(Boolean);
253
255
  };
254
256
  const getTrailingDisplayColumnIds = (props) => {
@@ -336,7 +338,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
336
338
  else if (layoutMode === 'grid-no-grow') {
337
339
  widthStyles.flex = '0 0 auto';
338
340
  }
339
- return Object.assign(Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
341
+ return Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
340
342
  ? alpha(lighten(theme.palette.background.default, 0.04), 0.97)
341
343
  : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
342
344
  ? `-4px 0 8px -6px ${alpha(theme.palette.common.black, 0.2)} inset`
@@ -364,7 +366,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
364
366
  ? `${getTotalRight(table, column)}px`
365
367
  : undefined, transition: table.options.enableColumnVirtualization
366
368
  ? 'none'
367
- : `padding 150ms ease-in-out` }, (!table.options.enableColumnResizing && widthStyles)), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme)), (table.options.enableColumnResizing && widthStyles));
369
+ : `padding 150ms ease-in-out` }, widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
368
370
  };
369
371
  const MRT_DefaultColumn = {
370
372
  filterVariant: 'text',
@@ -392,8 +394,19 @@ const flexRender = flexRender$1;
392
394
  const createRow = (table, originalRow) => createRow$1(table, 'mrt-row-create', originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
393
395
  [getColumnId(col)]: '',
394
396
  }))), -1, 0);
397
+ const extraIndexRangeExtractor = (range, draggingIndex) => {
398
+ const newIndexs = defaultRangeExtractor(range);
399
+ if (draggingIndex >= 0 &&
400
+ draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {
401
+ newIndexs.unshift(draggingIndex);
402
+ }
403
+ if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {
404
+ newIndexs.push(draggingIndex);
405
+ }
406
+ return newIndexs;
407
+ };
395
408
 
396
- const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
409
+ const MRT_GrabHandleButton = ({ iconButtonProps, location, onDragEnd, onDragStart, table, }) => {
397
410
  var _a;
398
411
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
399
412
  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) => {
@@ -405,7 +418,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
405
418
  }, '&:hover': {
406
419
  backgroundColor: 'transparent',
407
420
  opacity: 1,
408
- }, cursor: 'grab', m: '0 -0.1rem', opacity: 0.5, p: '2px', transition: 'all 150ms ease-in-out' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsx(DragHandleIcon, {}) })) }));
421
+ }, cursor: 'grab', m: '0 -0.1rem', opacity: location === 'row' ? 1 : 0.3, p: '2px', transition: 'all 150ms ease-in-out' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsx(DragHandleIcon, {}) })) }));
409
422
  };
410
423
 
411
424
  const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
@@ -426,7 +439,7 @@ const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
426
439
  table.setDraggingRow(null);
427
440
  table.setHoveredRow(null);
428
441
  };
429
- return (jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
442
+ return (jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, location: "row", onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
430
443
  };
431
444
 
432
445
  const MRT_CopyButton = ({ cell, children, table, }) => {
@@ -655,7 +668,9 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
655
668
  : undefined,
656
669
  outlineOffset: '-1px',
657
670
  textOverflow: 'clip',
658
- }, alignItems: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'center' : undefined, cursor: isEditable && editDisplayMode === 'cell' ? 'pointer' : 'inherit', justifyContent: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? tableCellProps.align : undefined, overflow: 'hidden', p: density === 'compact'
671
+ }, alignItems: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'center' : undefined, cursor: isEditable && editDisplayMode === 'cell' ? 'pointer' : 'inherit', justifyContent: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
672
+ ? tableCellProps.align
673
+ : undefined, overflow: 'hidden', p: density === 'compact'
659
674
  ? columnDefType === 'display'
660
675
  ? '0 0.5rem'
661
676
  : '0.5rem'
@@ -677,7 +692,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
677
692
  table,
678
693
  tableCellProps,
679
694
  theme,
680
- })), 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) && cell.getValue() === null ? (jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
695
+ })), 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 &&
681
696
  rowNumberMode === 'static' &&
682
697
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
683
698
  (column.id === 'mrt-row-select' ||
@@ -809,12 +824,12 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
809
824
  ? cellOrVirtualCell
810
825
  : undefined,
811
826
  };
812
- return memoMode === 'cells' &&
827
+ return cell ? (memoMode === 'cells' &&
813
828
  cell.column.columnDef.columnDefType === 'data' &&
814
829
  !draggingColumn &&
815
830
  !draggingRow &&
816
831
  (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
817
- (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));
832
+ (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))) : null;
818
833
  }), 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 }))] }));
819
834
  };
820
835
  const Memo_MRT_TableBodyRow = memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row && prev.rowIndex === next.rowIndex);
@@ -836,7 +851,7 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
836
851
  const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
837
852
  var _a, _b, _c, _d, _e, _f;
838
853
  const { getBottomRows, getCenterRows, getIsSomeRowsPinned, getPrePaginationRowModel, getRowModel, getState, getTopRows, options: { enableGlobalFilterRankedResults, enablePagination, enableRowPinning, enableRowVirtualization, enableStickyFooter, enableStickyHeader, layoutMode, localization, manualExpanding, manualFiltering, manualGrouping, manualPagination, manualSorting, memoMode, muiTableBodyProps, renderEmptyRowsFallback, rowPinningDisplayMode, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef, tableFooterRef, tableHeadRef, tablePaperRef }, } = table;
839
- const { columnFilters, density, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
854
+ const { columnFilters, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
840
855
  const tableBodyProps = parseFromValuesOrFunc(muiTableBodyProps, { table });
841
856
  const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
842
857
  table,
@@ -894,7 +909,10 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
894
909
  ? useVirtualizer(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, measureElement: typeof window !== 'undefined' &&
895
910
  navigator.userAgent.indexOf('Firefox') === -1
896
911
  ? (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height
897
- : undefined, overscan: 4 }, rowVirtualizerProps))
912
+ : undefined, overscan: 4, rangeExtractor: useCallback((range) => {
913
+ var _a;
914
+ return extraIndexRangeExtractor(range, (_a = draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.index) !== null && _a !== void 0 ? _a : 0);
915
+ }, [draggingRow]) }, rowVirtualizerProps))
898
916
  : undefined;
899
917
  if (rowVirtualizerInstanceRef && rowVirtualizer) {
900
918
  rowVirtualizerInstanceRef.current = rowVirtualizer;
@@ -918,8 +936,12 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
918
936
  return memoMode === 'rows' ? (jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
919
937
  }) }))), jsx(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
920
938
  ? `${rowVirtualizer.getTotalSize()}px`
921
- : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsx("tr", { style: { display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, children: jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
922
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : 'table-cell',
939
+ : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsx("tr", { style: {
940
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
941
+ }, children: jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
942
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
943
+ ? 'grid'
944
+ : 'table-cell',
923
945
  }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsx(Typography, { sx: {
924
946
  color: 'text.secondary',
925
947
  fontStyle: 'italic',
@@ -989,7 +1011,11 @@ const MRT_TableFooterCell = ({ footer, table, }) => {
989
1011
  theme,
990
1012
  }))), children: jsx(Fragment, { children: footer.isPlaceholder
991
1013
  ? null
992
- : (_b = (_a = parseFromValuesOrFunc(columnDef.Footer, { column, footer, table })) !== null && _a !== void 0 ? _a : columnDef.footer) !== null && _b !== void 0 ? _b : null }) })));
1014
+ : (_b = (_a = parseFromValuesOrFunc(columnDef.Footer, {
1015
+ column,
1016
+ footer,
1017
+ table,
1018
+ })) !== null && _a !== void 0 ? _a : columnDef.footer) !== null && _b !== void 0 ? _b : null }) })));
993
1019
  };
994
1020
 
995
1021
  const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -1008,7 +1034,7 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
1008
1034
  const footer = virtualColumns
1009
1035
  ? footerGroup.headers[footerOrVirtualFooter.index]
1010
1036
  : footerOrVirtualFooter;
1011
- return (jsx(MRT_TableFooterCell, { footer: footer, table: table }, footer.id));
1037
+ return footer ? (jsx(MRT_TableFooterCell, { footer: footer, table: table }, footer.id)) : null;
1012
1038
  }), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
1013
1039
  };
1014
1040
 
@@ -1381,7 +1407,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1381
1407
  }));
1382
1408
  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({ '&:hover': {
1383
1409
  opacity: 1,
1384
- }, height: '2rem', m: '-8px -4px', opacity: 0.5, transform: `scale(0.85) ${columnFilterDisplayMode !== 'popover' ? 'translateX(-4px)' : ''}`, transition: 'opacity 150ms', width: '2rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsx(MoreVertIcon, {}) })) }), anchorEl && (jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1410
+ }, height: '2rem', m: '-4px', opacity: 0.3, transform: `scale(0.85) ${columnFilterDisplayMode !== 'popover' ? 'translateX(-4px)' : ''}`, transition: 'opacity 150ms', width: '2rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsx(MoreVertIcon, {}) })) }), anchorEl && (jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1385
1411
  };
1386
1412
 
1387
1413
  const MRT_FilterCheckbox = ({ column, table, }) => {
@@ -1470,7 +1496,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1470
1496
  if (isRangeFilter) {
1471
1497
  column.setFilterValue((old) => {
1472
1498
  const newFilterValues = old !== null && old !== void 0 ? old : ['', ''];
1473
- newFilterValues[rangeFilterIndex] = newValue;
1499
+ newFilterValues[rangeFilterIndex] = newValue !== null && newValue !== void 0 ? newValue : undefined;
1474
1500
  return newFilterValues;
1475
1501
  });
1476
1502
  }
@@ -1479,8 +1505,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1479
1505
  }
1480
1506
  }, isTextboxFilter ? (manualFiltering ? 400 : 200) : 1), []);
1481
1507
  const handleChange = (newValue) => {
1482
- var _a;
1483
- setFilterValue((_a = newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== null && _a !== void 0 ? _a : '');
1508
+ setFilterValue(newValue !== null && newValue !== void 0 ? newValue : '');
1484
1509
  handleChangeDebounced(newValue);
1485
1510
  };
1486
1511
  const handleTextFieldChange = (event) => {
@@ -1558,7 +1583,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1558
1583
  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: {
1559
1584
  height: '2rem',
1560
1585
  transform: 'scale(0.9)',
1561
- width: '2rem'
1586
+ width: '2rem',
1562
1587
  }, children: jsx(CloseIcon, {}) }) }) }) })) : null;
1563
1588
  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;
1564
1589
  const commonTextFieldProps = Object.assign(Object.assign({ FormHelperTextProps: {
@@ -1600,7 +1625,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1600
1625
  }, value: filterValue || null }, datePickerProps, { slotProps: {
1601
1626
  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),
1602
1627
  textField: Object.assign(Object.assign({}, commonTextFieldProps), (_m = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _m === void 0 ? void 0 : _m.textField),
1603
- } }))) : isAutocompleteFilter ? (jsx(Autocomplete, Object.assign({ getOptionLabel: (option) => option, onChange: (_e, newValue) => handleChange(newValue), options: dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
1628
+ } }))) : isAutocompleteFilter ? (jsx(Autocomplete, Object.assign({ freeSolo: true, getOptionLabel: (option) => option, onChange: (_e, newValue) => handleChange(newValue), options: dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
1604
1629
  var _a;
1605
1630
  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 })));
1606
1631
  }, value: filterValue }))) : (jsx(TextField, Object.assign({ SelectProps: {
@@ -1771,20 +1796,22 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1771
1796
  (_b = filterInputRefs.current[`${column.id}-0`]) === null || _b === void 0 ? void 0 : _b.select();
1772
1797
  });
1773
1798
  event.stopPropagation();
1774
- }, sx: {
1799
+ }, size: "small", sx: {
1775
1800
  height: '16px',
1776
- opacity: 0.8,
1801
+ ml: '4px',
1802
+ opacity: isFilterActive ? 1 : 0.3,
1777
1803
  p: '8px',
1778
1804
  transform: 'scale(0.75)',
1805
+ transition: 'all 150ms ease-in-out',
1779
1806
  width: '16px',
1780
1807
  }, children: jsx(FilterAltIcon, {}) }) }) }) }), jsx(Popover, { anchorEl: anchorEl, anchorOrigin: {
1781
1808
  horizontal: 'center',
1782
1809
  vertical: 'top',
1783
- }, onClose: (event) => {
1810
+ }, onClick: (event) => event.stopPropagation(), onClose: (event) => {
1784
1811
  //@ts-ignore
1785
1812
  event.stopPropagation();
1786
1813
  setAnchorEl(null);
1787
- }, open: !!anchorEl, transformOrigin: {
1814
+ }, onKeyDown: (event) => event.key === 'Enter' && setAnchorEl(null), open: !!anchorEl, transformOrigin: {
1788
1815
  horizontal: 'center',
1789
1816
  vertical: 'bottom',
1790
1817
  }, children: jsx(Box, { sx: { p: '1rem' }, children: jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }) }) })] }));
@@ -1856,11 +1883,12 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1856
1883
  } }) }));
1857
1884
  };
1858
1885
 
1859
- const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1860
- const { getState, options: { icons: { ArrowDownwardIcon }, localization, }, } = table;
1886
+ const MRT_TableHeadCellSortLabel = ({ header, table, }) => {
1887
+ const { getState, options: { icons: { ArrowDownwardIcon, SyncAltIcon }, localization, }, } = table;
1861
1888
  const { column } = header;
1862
1889
  const { columnDef } = column;
1863
1890
  const { sorting } = getState();
1891
+ const isSorted = !!column.getIsSorted();
1864
1892
  const sortTooltip = column.getIsSorted()
1865
1893
  ? column.getIsSorted() === 'desc'
1866
1894
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
@@ -1868,18 +1896,17 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1868
1896
  : column.getNextSortingOrder() === 'desc'
1869
1897
  ? localization.sortByColumnDesc.replace('{column}', columnDef.header)
1870
1898
  : localization.sortByColumnAsc.replace('{column}', columnDef.header);
1871
- 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, { IconComponent: ArrowDownwardIcon, active: !!column.getIsSorted(), "aria-label": sortTooltip, direction: column.getIsSorted()
1872
- ? column.getIsSorted()
1873
- : undefined, onClick: (e) => {
1899
+ 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, { IconComponent: !isSorted
1900
+ ? (props) => (jsx(SyncAltIcon, Object.assign({}, props, { style: { transform: 'rotate(-90deg) scaleX(0.8)' } })))
1901
+ : ArrowDownwardIcon, active: true, "aria-label": sortTooltip, direction: isSorted ? column.getIsSorted() : undefined, onClick: (e) => {
1874
1902
  var _a;
1875
1903
  e.stopPropagation();
1876
1904
  (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(e);
1877
1905
  }, sx: {
1878
1906
  flex: '0 0',
1879
- transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
1880
- ? 'translateX(-0.5ch)'
1881
- : undefined,
1882
- width: '2.4ch',
1907
+ opacity: isSorted ? 1 : 0.3,
1908
+ transition: 'all 150ms ease-in-out',
1909
+ width: '3ch',
1883
1910
  } }) }) }));
1884
1911
  };
1885
1912
 
@@ -1907,11 +1934,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
1907
1934
  const headerPL = useMemo(() => {
1908
1935
  let pl = 0;
1909
1936
  if (column.getCanSort())
1910
- pl++;
1937
+ pl += 1;
1911
1938
  if (showColumnActions)
1912
1939
  pl += 1.75;
1913
1940
  if (showDragHandle)
1914
- pl += 1.25;
1941
+ pl += 1.5;
1915
1942
  return pl;
1916
1943
  }, [showColumnActions, showDragHandle]);
1917
1944
  const draggingBorder = useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
@@ -1943,7 +1970,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
1943
1970
  if (node) {
1944
1971
  tableHeadCellRefs.current[column.id] = node;
1945
1972
  }
1946
- } }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ flexDirection: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'column' : undefined, fontWeight: 'bold', overflow: 'visible', p: density === 'compact'
1973
+ } }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ '& :hover': {
1974
+ '.MuiButtonBase-root': {
1975
+ opacity: 1,
1976
+ },
1977
+ }, flexDirection: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'column' : undefined, fontWeight: 'bold', overflow: 'visible', p: density === 'compact'
1947
1978
  ? '0.5rem'
1948
1979
  : density === 'comfortable'
1949
1980
  ? columnDefType === 'display'
@@ -1995,11 +2026,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
1995
2026
  '&:hover': {
1996
2027
  textOverflow: 'clip',
1997
2028
  },
1998
- minWidth: `${Math.min((_c = (_b = columnDef.header) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, 5)}ch`,
2029
+ minWidth: `${Math.min((_c = (_b = columnDef.header) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, 4)}ch`,
1999
2030
  overflow: columnDefType === 'data' ? 'hidden' : undefined,
2000
2031
  textOverflow: 'ellipsis',
2001
2032
  whiteSpace: ((_f = (_d = columnDef.header) === null || _d === void 0 ? void 0 : _d.length) !== null && _f !== void 0 ? _f : 0) < 20 ? 'nowrap' : 'normal',
2002
- }, 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: {
2033
+ }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps }))] }), columnDefType !== 'group' && (jsxs(Box, { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2003
2034
  current: tableHeadCellRefs.current[column.id],
2004
2035
  } })), showColumnActions && (jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2005
2036
  };
@@ -2014,18 +2045,18 @@ const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLe
2014
2045
  const header = virtualColumns
2015
2046
  ? headerGroup.headers[headerOrVirtualHeader.index]
2016
2047
  : headerOrVirtualHeader;
2017
- return (jsx(MRT_TableHeadCell, { header: header, table: table }, header.id));
2048
+ return header ? (jsx(MRT_TableHeadCell, { header: header, table: table }, header.id)) : null;
2018
2049
  }), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
2019
2050
  };
2020
2051
 
2021
2052
  const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
2022
2053
  const { getState, options: { muiLinearProgressProps }, } = table;
2023
- const { isLoading, showProgressBars } = getState();
2054
+ const { showProgressBars } = getState();
2024
2055
  const linearProgressProps = parseFromValuesOrFunc(muiLinearProgressProps, {
2025
2056
  isTopToolbar,
2026
2057
  table,
2027
2058
  });
2028
- return (jsx(Collapse, { in: isLoading || showProgressBars, mountOnEnter: true, sx: {
2059
+ return (jsx(Collapse, { in: showProgressBars, mountOnEnter: true, sx: {
2029
2060
  bottom: isTopToolbar ? 0 : undefined,
2030
2061
  position: 'absolute',
2031
2062
  top: !isTopToolbar ? 0 : undefined,
@@ -2072,7 +2103,7 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2072
2103
  const showFirstLastPageButtons = numberOfPages > 2;
2073
2104
  const firstRowIndex = pageIndex * pageSize;
2074
2105
  const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
2075
- const _a = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { showRowsPerPage = true, rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons } = _a, rest = __rest(_a, ["showRowsPerPage", "rowsPerPageOptions", "showFirstButton", "showLastButton"]);
2106
+ const _a = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _a, rest = __rest(_a, ["rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
2076
2107
  return (jsxs(Box, { sx: {
2077
2108
  alignItems: 'center',
2078
2109
  display: 'flex',
@@ -2088,12 +2119,12 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2088
2119
  px: '4px',
2089
2120
  py: '12px',
2090
2121
  zIndex: 2,
2091
- }, children: [showRowsPerPage && (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, { inputProps: { 'aria-label': localization.rowsPerPage }, 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: rowsPerPageOptions.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: {
2122
+ }, children: [showRowsPerPage && (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", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { '&::before': { border: 'none' }, mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.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: {
2092
2123
  first: FirstPageIcon,
2093
2124
  last: LastPageIcon,
2094
2125
  next: ChevronRightIcon,
2095
2126
  previous: ChevronLeftIcon,
2096
- } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxs(Fragment, { children: [jsx(Typography, { sx: { mb: 0, mx: '4px', minWidth: '10ch' }, 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(ChevronLeftIcon, {}) }), 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] }));
2127
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxs(Fragment, { children: [jsx(Typography, { sx: { mb: 0, minWidth: '10ch', mx: '4px' }, 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(ChevronLeftIcon, {}) }), 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] }));
2097
2128
  };
2098
2129
 
2099
2130
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -2547,7 +2578,9 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2547
2578
  tableHeadProps.ref.current = ref;
2548
2579
  }
2549
2580
  }, sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, opacity: 0.97, position: stickyHeader ? 'sticky' : 'relative', top: stickyHeader && (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 0 : undefined, zIndex: stickyHeader ? 2 : undefined }, parseFromValuesOrFunc(tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx, theme))), children: positionToolbarAlertBanner === 'head-overlay' &&
2550
- (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (jsx("tr", { style: { display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, children: jsx("th", { colSpan: table.getVisibleLeafColumns().length, style: {
2581
+ (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (jsx("tr", { style: {
2582
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
2583
+ }, children: jsx("th", { colSpan: table.getVisibleLeafColumns().length, style: {
2551
2584
  display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : 'table-cell',
2552
2585
  padding: 0,
2553
2586
  }, children: jsx(MRT_ToolbarAlertBanner, { table: table }) }) })) : (getHeaderGroups().map((headerGroup) => (jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id)))) })));
@@ -2556,7 +2589,7 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2556
2589
  const MRT_Table = ({ table, }) => {
2557
2590
  var _a, _b, _c, _d;
2558
2591
  const { getFlatHeaders, getState, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, columns, enableColumnPinning, enableColumnResizing, enableColumnVirtualization, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, }, refs: { tableContainerRef }, } = table;
2559
- const { columnPinning, columnSizing, columnSizingInfo, columnVisibility, isFullScreen, } = getState();
2592
+ const { columnPinning, columnSizing, columnSizingInfo, columnVisibility, draggingColumn, isFullScreen, } = getState();
2560
2593
  const tableProps = parseFromValuesOrFunc(muiTableProps, { table });
2561
2594
  const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, { table });
2562
2595
  const columnSizeVars = useMemo(() => {
@@ -2588,14 +2621,20 @@ const MRT_Table = ({ table, }) => {
2588
2621
  .map((c) => table.getVisibleLeafColumns().length - c.getPinnedIndex() - 1),
2589
2622
  ]
2590
2623
  : [[], []], [columnPinning, enableColumnVirtualization, enableColumnPinning]);
2624
+ const draggingColumnIndex = table
2625
+ .getVisibleLeafColumns()
2626
+ .findIndex((c) => c.id === (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id));
2591
2627
  const columnVirtualizer = enableColumnVirtualization
2592
- ? useVirtualizer(Object.assign({ count: table.getVisibleLeafColumns().length, estimateSize: () => averageColumnWidth, getScrollElement: () => tableContainerRef.current, horizontal: true, overscan: 3, rangeExtractor: useCallback((range) => [
2593
- ...new Set([
2594
- ...leftPinnedIndexes,
2595
- ...defaultRangeExtractor(range),
2596
- ...rightPinnedIndexes,
2597
- ]),
2598
- ], [leftPinnedIndexes, rightPinnedIndexes]) }, columnVirtualizerProps))
2628
+ ? useVirtualizer(Object.assign({ count: table.getVisibleLeafColumns().length, estimateSize: () => averageColumnWidth, getScrollElement: () => tableContainerRef.current, horizontal: true, overscan: 3, rangeExtractor: useCallback((range) => {
2629
+ const newIndexs = extraIndexRangeExtractor(range, draggingColumnIndex);
2630
+ return [
2631
+ ...new Set([
2632
+ ...leftPinnedIndexes,
2633
+ ...newIndexs,
2634
+ ...rightPinnedIndexes,
2635
+ ]),
2636
+ ];
2637
+ }, [leftPinnedIndexes, rightPinnedIndexes, draggingColumnIndex]) }, columnVirtualizerProps))
2599
2638
  : undefined;
2600
2639
  if (columnVirtualizerInstanceRef && columnVirtualizer) {
2601
2640
  columnVirtualizerInstanceRef.current = columnVirtualizer;
@@ -2710,12 +2749,14 @@ const MRT_EditRowModal = ({ open, table, }) => {
2710
2749
 
2711
2750
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
2712
2751
  const MRT_TableContainer = ({ table, }) => {
2713
- const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2714
- const { creatingRow, editingRow, isFullScreen } = getState();
2752
+ const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, localization, muiCircularProgressProps, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2753
+ const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay, } = getState();
2754
+ const loading = (isLoading || showLoadingOverlay) && showLoadingOverlay !== false;
2715
2755
  const [totalToolbarHeight, setTotalToolbarHeight] = useState(0);
2716
2756
  const tableContainerProps = parseFromValuesOrFunc(muiTableContainerProps, {
2717
2757
  table,
2718
2758
  });
2759
+ const circularProgressProps = parseFromValuesOrFunc(muiCircularProgressProps, { table });
2719
2760
  useIsomorphicLayoutEffect(() => {
2720
2761
  var _a, _b, _c, _d;
2721
2762
  const topToolbarHeight = typeof document !== 'undefined'
@@ -2728,7 +2769,7 @@ const MRT_TableContainer = ({ table, }) => {
2728
2769
  });
2729
2770
  const createModalOpen = createDisplayMode === 'modal' && creatingRow;
2730
2771
  const editModalOpen = editDisplayMode === 'modal' && editingRow;
2731
- return (jsxs(TableContainer, Object.assign({}, tableContainerProps, { ref: (node) => {
2772
+ return (jsxs(TableContainer, Object.assign({ "aria-busy": loading, "aria-describedby": "mrt-progress" }, tableContainerProps, { ref: (node) => {
2732
2773
  if (node) {
2733
2774
  tableContainerRef.current = node;
2734
2775
  if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
@@ -2740,7 +2781,20 @@ const MRT_TableContainer = ({ table, }) => {
2740
2781
  ? `calc(100vh - ${totalToolbarHeight}px)`
2741
2782
  : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style), sx: (theme) => (Object.assign({ maxHeight: enableStickyHeader
2742
2783
  ? `clamp(350px, calc(100vh - ${totalToolbarHeight}px), 9999px)`
2743
- : undefined, maxWidth: '100%', overflow: 'auto' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2784
+ : undefined, maxWidth: '100%', overflow: 'auto', position: 'relative' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [loading ? (jsx(Box, { sx: (theme) => ({
2785
+ alignItems: 'center',
2786
+ backgroundColor: alpha(lighten(theme.palette.background.paper, 0.05), 0.5),
2787
+ bottom: 0,
2788
+ display: 'flex',
2789
+ justifyContent: 'center',
2790
+ left: 0,
2791
+ maxHeight: '100vh',
2792
+ position: 'absolute',
2793
+ right: 0,
2794
+ top: 0,
2795
+ width: '100%',
2796
+ zIndex: 2,
2797
+ }), children: jsx(CircularProgress, Object.assign({ "aria-label": localization.noRecordsToDisplay, id: "mrt-progress" }, circularProgressProps)) })) : null, jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2744
2798
  };
2745
2799
 
2746
2800
  const MRT_TablePaper = ({ table, }) => {
@@ -2844,7 +2898,7 @@ const MRT_ExpandButton = ({ row, table, }) => {
2844
2898
  };
2845
2899
  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)
2846
2900
  ? localization.collapse
2847
- : 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' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(ExpandMoreIcon, { style: {
2901
+ : 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', opacity: !canExpand && !renderDetailPanel ? 0.3 : 1, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(ExpandMoreIcon, { style: {
2848
2902
  transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
2849
2903
  transition: 'transform 150ms',
2850
2904
  } })) })) }) }));
@@ -2894,10 +2948,18 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
2894
2948
  parseFromValuesOrFunc(enableEditing, row) ? (jsx(Tooltip, { arrow: true, placement: "right", title: localization.edit, children: jsx(IconButton, { "aria-label": localization.edit, onClick: handleStartEditMode, sx: commonIconButtonStyles, 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 }));
2895
2949
  };
2896
2950
 
2951
+ const blankColProps = {
2952
+ sx: {
2953
+ flex: '1 0 auto',
2954
+ minWidth: 0,
2955
+ p: 0,
2956
+ width: 0,
2957
+ },
2958
+ };
2897
2959
  const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOptions, }) => {
2898
2960
  var _a, _b;
2899
2961
  return useMemo(() => {
2900
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
2962
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
2901
2963
  return [
2902
2964
  ((_b = (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnOrder) !== null && _b !== void 0 ? _b : columnOrder).includes('mrt-row-pin') && Object.assign(Object.assign(Object.assign({ Cell: ({ row, table }) => (jsx(MRT_TableBodyRowPinButton, { row: row, table: table })), header: tableOptions.localization.pin, size: 60 }, tableOptions.defaultDisplayColumn), (_c = tableOptions.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-pin']), { id: 'mrt-row-pin' }),
2903
2965
  ((_e = (_d = tableOptions.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ Cell: ({ row, rowRef, table }) => (jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })), header: tableOptions.localization.move, size: 60 }, tableOptions.defaultDisplayColumn), (_f = tableOptions.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-drag']), { id: 'mrt-row-drag' }),
@@ -2912,6 +2974,14 @@ const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOption
2912
2974
  ? ({ table }) => jsx(MRT_SelectCheckbox, { selectAll: true, table: table })
2913
2975
  : null, header: tableOptions.localization.select, size: 60 }, tableOptions.defaultDisplayColumn), (_s = tableOptions.displayColumnDefOptions) === null || _s === void 0 ? void 0 : _s['mrt-row-select']), { id: 'mrt-row-select' }),
2914
2976
  ((_u = (_t = tableOptions.state) === null || _t === void 0 ? void 0 : _t.columnOrder) !== null && _u !== void 0 ? _u : columnOrder).includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => tableOptions.localization.rowNumber, header: tableOptions.localization.rowNumbers, size: 60 }, tableOptions.defaultDisplayColumn), (_v = tableOptions.displayColumnDefOptions) === null || _v === void 0 ? void 0 : _v['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
2977
+ ((_x = (_w = tableOptions.state) === null || _w === void 0 ? void 0 : _w.columnOrder) !== null && _x !== void 0 ? _x : columnOrder).includes('mrt-row-spacer') && {
2978
+ columnDefType: 'display',
2979
+ header: '',
2980
+ id: 'spacer',
2981
+ muiTableBodyCellProps: blankColProps,
2982
+ muiTableFooterCellProps: blankColProps,
2983
+ muiTableHeadCellProps: blankColProps,
2984
+ },
2915
2985
  ].filter(Boolean);
2916
2986
  }, [
2917
2987
  columnOrder,
@@ -3217,7 +3287,7 @@ const endsWith = (row, id, filterValue) => row
3217
3287
  .endsWith(filterValue.toString().toLowerCase().trim());
3218
3288
  endsWith.autoRemove = (val) => !val;
3219
3289
  const equals = (row, id, filterValue) => row.getValue(id).toString().toLowerCase().trim() ===
3220
- filterValue.toString().toLowerCase().trim();
3290
+ (filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString().toLowerCase().trim());
3221
3291
  equals.autoRemove = (val) => !val;
3222
3292
  const notEquals = (row, id, filterValue) => row.getValue(id).toString().toLowerCase().trim() !==
3223
3293
  filterValue.toString().toLowerCase().trim();
@@ -3225,14 +3295,14 @@ notEquals.autoRemove = (val) => !val;
3225
3295
  const greaterThan = (row, id, filterValue) => !isNaN(+filterValue) && !isNaN(+row.getValue(id))
3226
3296
  ? +row.getValue(id) > +filterValue
3227
3297
  : row.getValue(id).toString().toLowerCase().trim() >
3228
- filterValue.toString().toLowerCase().trim();
3298
+ (filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString().toLowerCase().trim());
3229
3299
  greaterThan.autoRemove = (val) => !val;
3230
3300
  const greaterThanOrEqualTo = (row, id, filterValue) => equals(row, id, filterValue) || greaterThan(row, id, filterValue);
3231
3301
  greaterThanOrEqualTo.autoRemove = (val) => !val;
3232
3302
  const lessThan = (row, id, filterValue) => !isNaN(+filterValue) && !isNaN(+row.getValue(id))
3233
3303
  ? +row.getValue(id) < +filterValue
3234
3304
  : row.getValue(id).toString().toLowerCase().trim() <
3235
- filterValue.toString().toLowerCase().trim();
3305
+ (filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString().toLowerCase().trim());
3236
3306
  lessThan.autoRemove = (val) => !val;
3237
3307
  const lessThanOrEqualTo = (row, id, filterValue) => equals(row, id, filterValue) || lessThan(row, id, filterValue);
3238
3308
  lessThanOrEqualTo.autoRemove = (val) => !val;
@@ -3302,6 +3372,7 @@ const MRT_Default_Icons = {
3302
3372
  SearchIcon,
3303
3373
  SearchOffIcon,
3304
3374
  SortIcon,
3375
+ SyncAltIcon,
3305
3376
  ViewColumnIcon,
3306
3377
  VisibilityOffIcon,
3307
3378
  };
@@ -3493,5 +3564,5 @@ const MaterialReactTable = (props) => {
3493
3564
  return jsx(MRT_TablePaper, { table: table });
3494
3565
  };
3495
3566
 
3496
- export { MRT_AggregationFns, MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_LinearProgressBar, MRT_RowActionMenu, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortingFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, commonListItemStyles, commonMenuItemStyles, commonToolbarStyles, createRow, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getCommonCellStyles, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getLeadingDisplayColumnIds, getTotalRight, getTrailingDisplayColumnIds, mrtFilterOptions, parseCSSVarId, parseFromValuesOrFunc, prepareColumns, rankGlobalFuzzy, reorderColumn, showExpandColumn, useMaterialReactTable };
3567
+ export { MRT_AggregationFns, MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_LinearProgressBar, MRT_RowActionMenu, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortingFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, commonListItemStyles, commonMenuItemStyles, commonToolbarStyles, createRow, extraIndexRangeExtractor, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getCommonCellStyles, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getLeadingDisplayColumnIds, getTotalRight, getTrailingDisplayColumnIds, mrtFilterOptions, parseCSSVarId, parseFromValuesOrFunc, prepareColumns, rankGlobalFuzzy, reorderColumn, showExpandColumn, useMaterialReactTable };
3497
3568
  //# sourceMappingURL=material-react-table.esm.js.map