material-react-table 2.0.0-alpha.6 → 2.0.0-beta.1

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 (211) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +184 -109
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +1 -1
  5. package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +1 -1
  6. package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +2 -1
  7. package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  8. package/dist/cjs/types/icons.d.ts +1 -0
  9. package/dist/cjs/types/types.d.ts +6 -1
  10. package/dist/esm/material-react-table.esm.js +181 -107
  11. package/dist/esm/material-react-table.esm.js.map +1 -1
  12. package/dist/esm/types/body/MRT_TableBodyCell.d.ts +1 -1
  13. package/dist/esm/types/body/MRT_TableBodyRow.d.ts +1 -1
  14. package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +2 -1
  15. package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  16. package/dist/esm/types/icons.d.ts +1 -0
  17. package/dist/esm/types/types.d.ts +6 -1
  18. package/dist/index.d.ts +12 -5
  19. package/locales/ar.esm.js +1 -0
  20. package/locales/ar.esm.js.map +1 -1
  21. package/locales/ar.js +1 -0
  22. package/locales/ar.js.map +1 -1
  23. package/locales/bg.esm.js +1 -0
  24. package/locales/bg.esm.js.map +1 -1
  25. package/locales/bg.js +1 -0
  26. package/locales/bg.js.map +1 -1
  27. package/locales/cs.esm.js +1 -0
  28. package/locales/cs.esm.js.map +1 -1
  29. package/locales/cs.js +1 -0
  30. package/locales/cs.js.map +1 -1
  31. package/locales/da.esm.js +1 -0
  32. package/locales/da.esm.js.map +1 -1
  33. package/locales/da.js +1 -0
  34. package/locales/da.js.map +1 -1
  35. package/locales/de.esm.js +1 -0
  36. package/locales/de.esm.js.map +1 -1
  37. package/locales/de.js +1 -0
  38. package/locales/de.js.map +1 -1
  39. package/locales/es.esm.js +1 -0
  40. package/locales/es.esm.js.map +1 -1
  41. package/locales/es.js +1 -0
  42. package/locales/es.js.map +1 -1
  43. package/locales/et.esm.js +1 -0
  44. package/locales/et.esm.js.map +1 -1
  45. package/locales/et.js +1 -0
  46. package/locales/et.js.map +1 -1
  47. package/locales/fa.esm.js +1 -0
  48. package/locales/fa.esm.js.map +1 -1
  49. package/locales/fa.js +1 -0
  50. package/locales/fa.js.map +1 -1
  51. package/locales/fi.esm.js +1 -0
  52. package/locales/fi.esm.js.map +1 -1
  53. package/locales/fi.js +1 -0
  54. package/locales/fi.js.map +1 -1
  55. package/locales/fr.esm.js +1 -0
  56. package/locales/fr.esm.js.map +1 -1
  57. package/locales/fr.js +1 -0
  58. package/locales/fr.js.map +1 -1
  59. package/locales/hu.esm.js +1 -0
  60. package/locales/hu.esm.js.map +1 -1
  61. package/locales/hu.js +1 -0
  62. package/locales/hu.js.map +1 -1
  63. package/locales/hy.esm.js +1 -0
  64. package/locales/hy.esm.js.map +1 -1
  65. package/locales/hy.js +1 -0
  66. package/locales/hy.js.map +1 -1
  67. package/locales/id.esm.js +1 -0
  68. package/locales/id.esm.js.map +1 -1
  69. package/locales/id.js +1 -0
  70. package/locales/id.js.map +1 -1
  71. package/locales/it.esm.js +1 -0
  72. package/locales/it.esm.js.map +1 -1
  73. package/locales/it.js +1 -0
  74. package/locales/it.js.map +1 -1
  75. package/locales/ja.esm.js +1 -0
  76. package/locales/ja.esm.js.map +1 -1
  77. package/locales/ja.js +1 -0
  78. package/locales/ja.js.map +1 -1
  79. package/locales/ko.esm.js +1 -0
  80. package/locales/ko.esm.js.map +1 -1
  81. package/locales/ko.js +1 -0
  82. package/locales/ko.js.map +1 -1
  83. package/locales/nl.esm.js +1 -0
  84. package/locales/nl.esm.js.map +1 -1
  85. package/locales/nl.js +1 -0
  86. package/locales/nl.js.map +1 -1
  87. package/locales/no.esm.js +1 -0
  88. package/locales/no.esm.js.map +1 -1
  89. package/locales/no.js +1 -0
  90. package/locales/no.js.map +1 -1
  91. package/locales/np.esm.js +1 -1
  92. package/locales/np.esm.js.map +1 -1
  93. package/locales/np.js +1 -1
  94. package/locales/np.js.map +1 -1
  95. package/locales/pl.esm.js +1 -0
  96. package/locales/pl.esm.js.map +1 -1
  97. package/locales/pl.js +1 -0
  98. package/locales/pl.js.map +1 -1
  99. package/locales/pt-BR.esm.js +1 -0
  100. package/locales/pt-BR.esm.js.map +1 -1
  101. package/locales/pt-BR.js +1 -0
  102. package/locales/pt-BR.js.map +1 -1
  103. package/locales/pt.esm.js +1 -0
  104. package/locales/pt.esm.js.map +1 -1
  105. package/locales/pt.js +1 -0
  106. package/locales/pt.js.map +1 -1
  107. package/locales/ro.esm.js +1 -0
  108. package/locales/ro.esm.js.map +1 -1
  109. package/locales/ro.js +1 -0
  110. package/locales/ro.js.map +1 -1
  111. package/locales/ru.esm.js +1 -0
  112. package/locales/ru.esm.js.map +1 -1
  113. package/locales/ru.js +1 -0
  114. package/locales/ru.js.map +1 -1
  115. package/locales/sk.esm.js +1 -0
  116. package/locales/sk.esm.js.map +1 -1
  117. package/locales/sk.js +1 -0
  118. package/locales/sk.js.map +1 -1
  119. package/locales/sr-Cyrl-RS.esm.js +1 -0
  120. package/locales/sr-Cyrl-RS.esm.js.map +1 -1
  121. package/locales/sr-Cyrl-RS.js +1 -0
  122. package/locales/sr-Cyrl-RS.js.map +1 -1
  123. package/locales/sr-Latn-RS.esm.js +1 -0
  124. package/locales/sr-Latn-RS.esm.js.map +1 -1
  125. package/locales/sr-Latn-RS.js +1 -0
  126. package/locales/sr-Latn-RS.js.map +1 -1
  127. package/locales/sv.esm.js +3 -2
  128. package/locales/sv.esm.js.map +1 -1
  129. package/locales/sv.js +3 -2
  130. package/locales/sv.js.map +1 -1
  131. package/locales/tr.esm.js +1 -0
  132. package/locales/tr.esm.js.map +1 -1
  133. package/locales/tr.js +1 -0
  134. package/locales/tr.js.map +1 -1
  135. package/locales/uk.esm.js +1 -0
  136. package/locales/uk.esm.js.map +1 -1
  137. package/locales/uk.js +1 -0
  138. package/locales/uk.js.map +1 -1
  139. package/locales/vi.esm.js +1 -0
  140. package/locales/vi.esm.js.map +1 -1
  141. package/locales/vi.js +1 -0
  142. package/locales/vi.js.map +1 -1
  143. package/locales/zh-Hans.esm.js +1 -0
  144. package/locales/zh-Hans.esm.js.map +1 -1
  145. package/locales/zh-Hans.js +1 -0
  146. package/locales/zh-Hans.js.map +1 -1
  147. package/locales/zh-Hant.esm.js +1 -0
  148. package/locales/zh-Hant.esm.js.map +1 -1
  149. package/locales/zh-Hant.js +1 -0
  150. package/locales/zh-Hant.js.map +1 -1
  151. package/package.json +11 -11
  152. package/src/body/MRT_TableBody.tsx +5 -0
  153. package/src/body/MRT_TableBodyCell.tsx +22 -7
  154. package/src/body/MRT_TableBodyRow.tsx +8 -6
  155. package/src/body/MRT_TableBodyRowGrabHandle.tsx +1 -0
  156. package/src/body/MRT_TableDetailPanel.tsx +1 -2
  157. package/src/body/index.ts +1 -1
  158. package/src/buttons/MRT_ExpandButton.tsx +1 -0
  159. package/src/buttons/MRT_GrabHandleButton.tsx +3 -1
  160. package/src/column.utils.ts +20 -19
  161. package/src/footer/MRT_TableFooterCell.tsx +5 -1
  162. package/src/footer/MRT_TableFooterRow.tsx +2 -2
  163. package/src/head/MRT_TableHead.tsx +5 -1
  164. package/src/head/MRT_TableHeadCell.tsx +32 -19
  165. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -2
  166. package/src/head/MRT_TableHeadCellFilterLabel.tsx +4 -1
  167. package/src/head/MRT_TableHeadCellResizeHandle.tsx +8 -3
  168. package/src/head/MRT_TableHeadCellSortLabel.tsx +18 -12
  169. package/src/head/MRT_TableHeadRow.tsx +2 -2
  170. package/src/hooks/useMRT_DisplayColumns.tsx +20 -0
  171. package/src/icons.ts +3 -0
  172. package/src/inputs/MRT_EditCellTextField.tsx +10 -2
  173. package/src/locales/ar.ts +1 -1
  174. package/src/locales/bg.ts +1 -0
  175. package/src/locales/cs.ts +1 -0
  176. package/src/locales/da.ts +1 -0
  177. package/src/locales/de.ts +1 -0
  178. package/src/locales/es.ts +1 -0
  179. package/src/locales/et.ts +1 -0
  180. package/src/locales/fa.ts +1 -0
  181. package/src/locales/fi.ts +1 -0
  182. package/src/locales/fr.ts +1 -0
  183. package/src/locales/hu.ts +1 -0
  184. package/src/locales/hy.ts +1 -0
  185. package/src/locales/id.ts +1 -0
  186. package/src/locales/it.ts +1 -0
  187. package/src/locales/ja.ts +1 -0
  188. package/src/locales/ko.ts +1 -0
  189. package/src/locales/nl.ts +1 -0
  190. package/src/locales/no.ts +1 -0
  191. package/src/locales/np.ts +3 -2
  192. package/src/locales/pl.ts +1 -0
  193. package/src/locales/pt-BR.ts +1 -0
  194. package/src/locales/pt.ts +1 -0
  195. package/src/locales/ro.ts +1 -0
  196. package/src/locales/ru.ts +1 -0
  197. package/src/locales/sk.ts +1 -0
  198. package/src/locales/sr-Cyrl-RS.ts +1 -0
  199. package/src/locales/sr-Latn-RS.ts +1 -0
  200. package/src/locales/sv.ts +3 -2
  201. package/src/locales/tr.ts +1 -0
  202. package/src/locales/uk.ts +1 -0
  203. package/src/locales/vi.ts +1 -0
  204. package/src/locales/zh-Hans.ts +1 -0
  205. package/src/locales/zh-Hant.ts +1 -0
  206. package/src/table/MRT_Table.tsx +5 -1
  207. package/src/table/MRT_TableContainer.tsx +50 -1
  208. package/src/table/MRT_TablePaper.tsx +1 -1
  209. package/src/toolbar/MRT_LinearProgressBar.tsx +2 -2
  210. package/src/toolbar/MRT_TablePagination.tsx +5 -2
  211. package/src/types.ts +6 -1
package/dist/cjs/index.js CHANGED
@@ -5,16 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var Paper = require('@mui/material/Paper');
7
7
  var react = require('react');
8
+ var Box = require('@mui/material/Box');
9
+ var CircularProgress = require('@mui/material/CircularProgress');
8
10
  var TableContainer = require('@mui/material/TableContainer');
11
+ var styles = require('@mui/material/styles');
9
12
  var reactVirtual = require('@tanstack/react-virtual');
10
13
  var Table = require('@mui/material/Table');
11
14
  var TableBody = require('@mui/material/TableBody');
12
15
  var Typography = require('@mui/material/Typography');
13
16
  var TableRow = require('@mui/material/TableRow');
14
- var styles = require('@mui/material/styles');
15
17
  var Skeleton = require('@mui/material/Skeleton');
16
18
  var TableCell = require('@mui/material/TableCell');
17
- var Box = require('@mui/material/Box');
18
19
  var highlightWords = require('highlight-words');
19
20
  var IconButton = require('@mui/material/IconButton');
20
21
  var Tooltip = require('@mui/material/Tooltip');
@@ -59,7 +60,6 @@ var Dialog = require('@mui/material/Dialog');
59
60
  var DialogActions = require('@mui/material/DialogActions');
60
61
  var DialogContent = require('@mui/material/DialogContent');
61
62
  var DialogTitle = require('@mui/material/DialogTitle');
62
- var CircularProgress = require('@mui/material/CircularProgress');
63
63
  var ArrowDownwardIcon = require('@mui/icons-material/ArrowDownward');
64
64
  var ArrowRightIcon = require('@mui/icons-material/ArrowRight');
65
65
  var CancelIcon = require('@mui/icons-material/Cancel');
@@ -90,12 +90,15 @@ var SaveIcon = require('@mui/icons-material/Save');
90
90
  var SearchIcon = require('@mui/icons-material/Search');
91
91
  var SearchOffIcon = require('@mui/icons-material/SearchOff');
92
92
  var SortIcon = require('@mui/icons-material/Sort');
93
+ var SyncAltIcon = require('@mui/icons-material/SyncAlt');
93
94
  var ViewColumnIcon = require('@mui/icons-material/ViewColumn');
94
95
  var VisibilityOffIcon = require('@mui/icons-material/VisibilityOff');
95
96
 
96
97
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
97
98
 
98
99
  var Paper__default = /*#__PURE__*/_interopDefaultLegacy(Paper);
100
+ var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
101
+ var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
99
102
  var TableContainer__default = /*#__PURE__*/_interopDefaultLegacy(TableContainer);
100
103
  var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
101
104
  var TableBody__default = /*#__PURE__*/_interopDefaultLegacy(TableBody);
@@ -103,7 +106,6 @@ var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
103
106
  var TableRow__default = /*#__PURE__*/_interopDefaultLegacy(TableRow);
104
107
  var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
105
108
  var TableCell__default = /*#__PURE__*/_interopDefaultLegacy(TableCell);
106
- var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
107
109
  var highlightWords__default = /*#__PURE__*/_interopDefaultLegacy(highlightWords);
108
110
  var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
109
111
  var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
@@ -144,7 +146,6 @@ var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
144
146
  var DialogActions__default = /*#__PURE__*/_interopDefaultLegacy(DialogActions);
145
147
  var DialogContent__default = /*#__PURE__*/_interopDefaultLegacy(DialogContent);
146
148
  var DialogTitle__default = /*#__PURE__*/_interopDefaultLegacy(DialogTitle);
147
- var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
148
149
  var ArrowDownwardIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDownwardIcon);
149
150
  var ArrowRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowRightIcon);
150
151
  var CancelIcon__default = /*#__PURE__*/_interopDefaultLegacy(CancelIcon);
@@ -175,6 +176,7 @@ var SaveIcon__default = /*#__PURE__*/_interopDefaultLegacy(SaveIcon);
175
176
  var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
176
177
  var SearchOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchOffIcon);
177
178
  var SortIcon__default = /*#__PURE__*/_interopDefaultLegacy(SortIcon);
179
+ var SyncAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(SyncAltIcon);
178
180
  var ViewColumnIcon__default = /*#__PURE__*/_interopDefaultLegacy(ViewColumnIcon);
179
181
  var VisibilityOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(VisibilityOffIcon);
180
182
 
@@ -338,6 +340,7 @@ const getLeadingDisplayColumnIds = (props) => {
338
340
  'mrt-row-expand',
339
341
  props.enableRowSelection && 'mrt-row-select',
340
342
  props.enableRowNumbers && 'mrt-row-numbers',
343
+ props.layoutMode === 'grid-no-grow' && 'mrt-row-spacer',
341
344
  ].filter(Boolean);
342
345
  };
343
346
  const getTrailingDisplayColumnIds = (props) => {
@@ -425,7 +428,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
425
428
  else if (layoutMode === 'grid-no-grow') {
426
429
  widthStyles.flex = '0 0 auto';
427
430
  }
428
- return Object.assign(Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
431
+ return Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
429
432
  ? styles.alpha(styles.lighten(theme.palette.background.default, 0.04), 0.97)
430
433
  : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
431
434
  ? `-4px 0 8px -6px ${styles.alpha(theme.palette.common.black, 0.2)} inset`
@@ -453,7 +456,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
453
456
  ? `${getTotalRight(table, column)}px`
454
457
  : undefined, transition: table.options.enableColumnVirtualization
455
458
  ? 'none'
456
- : `padding 150ms ease-in-out` }, (!table.options.enableColumnResizing && widthStyles)), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme)), (table.options.enableColumnResizing && widthStyles));
459
+ : `padding 150ms ease-in-out` }, widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
457
460
  };
458
461
  const MRT_DefaultColumn = {
459
462
  filterVariant: 'text',
@@ -493,7 +496,7 @@ const extraIndexRangeExtractor = (range, draggingIndex) => {
493
496
  return newIndexs;
494
497
  };
495
498
 
496
- const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
499
+ const MRT_GrabHandleButton = ({ iconButtonProps, location, onDragEnd, onDragStart, table, }) => {
497
500
  var _a;
498
501
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
499
502
  return (jsxRuntime.jsx(Tooltip__default["default"], { 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: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
@@ -505,7 +508,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
505
508
  }, '&:hover': {
506
509
  backgroundColor: 'transparent',
507
510
  opacity: 1,
508
- }, 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: jsxRuntime.jsx(DragHandleIcon, {}) })) }));
511
+ }, 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: jsxRuntime.jsx(DragHandleIcon, {}) })) }));
509
512
  };
510
513
 
511
514
  const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
@@ -526,7 +529,7 @@ const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
526
529
  table.setDraggingRow(null);
527
530
  table.setHoveredRow(null);
528
531
  };
529
- return (jsxRuntime.jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
532
+ return (jsxRuntime.jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, location: "row", onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
530
533
  };
531
534
 
532
535
  const MRT_CopyButton = ({ cell, children, table, }) => {
@@ -617,11 +620,11 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
617
620
  textFieldProps.inputRef = inputRef;
618
621
  }
619
622
  }
620
- }, label: ['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
621
- ? column.columnDef.header
623
+ }, label: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
624
+ ? columnDef.header
622
625
  : undefined, margin: "none", name: column.id, placeholder: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
623
626
  ? columnDef.header
624
- : undefined, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
627
+ : undefined, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { InputProps: Object.assign({ disableUnderline: editDisplayMode === 'table' }, textFieldProps.InputProps), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
625
628
  var _a;
626
629
  e.stopPropagation();
627
630
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
@@ -649,7 +652,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
649
652
  var _a, _b, _c, _d;
650
653
  const theme = styles.useTheme();
651
654
  const { getState, options: { createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, enableRowNumbers, layoutMode, muiSkeletonProps, muiTableBodyCellProps, rowNumberMode, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
652
- const { creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
655
+ const { columnSizingInfo, creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
653
656
  const { column, row } = cell;
654
657
  const { columnDef } = column;
655
658
  const { columnDefType } = columnDef;
@@ -686,12 +689,17 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
686
689
  const isHoveredRow = (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id;
687
690
  const isFirstColumn = getIsFirstColumn(column, table);
688
691
  const isLastColumn = getIsLastColumn(column, table);
689
- const isLastRow = rowIndex === numRows - 1;
692
+ const isLastRow = numRows && rowIndex === numRows - 1;
690
693
  const borderStyle = isDraggingColumn || isDraggingRow
691
694
  ? `1px dashed ${theme.palette.text.secondary} !important`
692
- : isHoveredColumn || isHoveredRow
695
+ : isHoveredColumn ||
696
+ isHoveredRow ||
697
+ columnSizingInfo.isResizingColumn === column.id
693
698
  ? `2px dashed ${theme.palette.primary.main} !important`
694
699
  : undefined;
700
+ if (columnSizingInfo.isResizingColumn === column.id) {
701
+ return { borderRight: borderStyle };
702
+ }
695
703
  return borderStyle
696
704
  ? {
697
705
  borderBottom: isDraggingRow || isHoveredRow || isLastRow
@@ -710,7 +718,14 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
710
718
  borderTop: isDraggingRow || isHoveredRow ? borderStyle : undefined,
711
719
  }
712
720
  : undefined;
713
- }, [draggingColumn, draggingRow, hoveredColumn, hoveredRow, rowIndex]);
721
+ }, [
722
+ columnSizingInfo.isResizingColumn,
723
+ draggingColumn,
724
+ draggingRow,
725
+ hoveredColumn,
726
+ hoveredRow,
727
+ rowIndex,
728
+ ]);
714
729
  const isEditable = parseFromValuesOrFunc(enableEditing, row) &&
715
730
  parseFromValuesOrFunc(columnDef.enableEditing, row) !== false;
716
731
  const isEditing = isEditable &&
@@ -755,7 +770,9 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
755
770
  : undefined,
756
771
  outlineOffset: '-1px',
757
772
  textOverflow: 'clip',
758
- }, 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'
773
+ }, 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'))
774
+ ? tableCellProps.align
775
+ : undefined, overflow: 'hidden', p: density === 'compact'
759
776
  ? columnDefType === 'display'
760
777
  ? '0 0.5rem'
761
778
  : '0.5rem'
@@ -777,7 +794,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
777
794
  table,
778
795
  tableCellProps,
779
796
  theme,
780
- })), draggingBorders)), children: jsxRuntime.jsxs(jsxRuntime.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 ? (jsxRuntime.jsx(Skeleton__default["default"], Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
797
+ })), draggingBorders)), children: jsxRuntime.jsxs(jsxRuntime.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 ? (jsxRuntime.jsx(Skeleton__default["default"], Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
781
798
  rowNumberMode === 'static' &&
782
799
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
783
800
  (column.id === 'mrt-row-select' ||
@@ -815,7 +832,7 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
815
832
  : undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme)));
816
833
  }, children: jsxRuntime.jsx(TableCell__default["default"], Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
817
834
  ? styles.lighten(theme.palette.background.default, 0.05)
818
- : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : 'table-cell', pb: row.getIsExpanded() ? '1rem' : 0, pt: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
835
+ : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : 'table-cell', py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
819
836
  };
820
837
 
821
838
  const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
@@ -909,12 +926,12 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
909
926
  ? cellOrVirtualCell
910
927
  : undefined,
911
928
  };
912
- return memoMode === 'cells' &&
929
+ return cell ? (memoMode === 'cells' &&
913
930
  cell.column.columnDef.columnDefType === 'data' &&
914
931
  !draggingColumn &&
915
932
  !draggingRow &&
916
933
  (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
917
- (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsxRuntime.jsx(Memo_MRT_TableBodyCell, Object.assign({}, props), cell.id)) : (jsxRuntime.jsx(MRT_TableBodyCell, Object.assign({}, props), cell.id));
934
+ (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsxRuntime.jsx(Memo_MRT_TableBodyCell, Object.assign({}, props), cell.id)) : (jsxRuntime.jsx(MRT_TableBodyCell, Object.assign({}, props), cell.id))) : null;
918
935
  }), virtualPaddingRight ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })), renderDetailPanel && !row.getIsGrouped() && (jsxRuntime.jsx(MRT_TableDetailPanel, { parentRowRef: rowRef, row: row, rowIndex: rowIndex, table: table, virtualRow: virtualRow }))] }));
919
936
  };
920
937
  const Memo_MRT_TableBodyRow = react.memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row && prev.rowIndex === next.rowIndex);
@@ -935,8 +952,8 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
935
952
 
936
953
  const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
937
954
  var _a, _b, _c, _d, _e, _f;
938
- 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;
939
- const { columnFilters, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
955
+ const { getBottomRows, getCenterRows, getIsSomeRowsPinned, getPrePaginationRowModel, getRowModel, getState, getTopRows, options: { createDisplayMode, 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;
956
+ const { columnFilters, creatingRow, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
940
957
  const tableBodyProps = parseFromValuesOrFunc(muiTableBodyProps, { table });
941
958
  const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
942
959
  table,
@@ -1019,44 +1036,44 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
1019
1036
  virtualPaddingRight,
1020
1037
  };
1021
1038
  return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1022
- }) }))), jsxRuntime.jsx(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
1039
+ }) }))), jsxRuntime.jsxs(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
1023
1040
  ? `${rowVirtualizer.getTotalSize()}px`
1024
- : '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 ? (jsxRuntime.jsx("tr", { style: {
1025
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1026
- }, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
1027
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
1028
- ? 'grid'
1029
- : 'table-cell',
1030
- }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1031
- color: 'text.secondary',
1032
- fontStyle: 'italic',
1033
- maxWidth: `min(100vw, ${(_f = (_e = tablePaperRef.current) === null || _e === void 0 ? void 0 : _e.clientWidth) !== null && _f !== void 0 ? _f : 360}px)`,
1034
- py: '2rem',
1035
- textAlign: 'center',
1036
- width: '100%',
1037
- }, children: globalFilter || columnFilters.length
1038
- ? localization.noResultsFound
1039
- : localization.noRecordsToDisplay })) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
1040
- const row = rowVirtualizer
1041
- ? rows[rowOrVirtualRow.index]
1042
- : rowOrVirtualRow;
1043
- const props = {
1044
- columnVirtualizer,
1045
- measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
1046
- numRows: rows.length,
1047
- pinnedRowIds,
1048
- row,
1049
- rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
1050
- table,
1051
- virtualColumns,
1052
- virtualPaddingLeft,
1053
- virtualPaddingRight,
1054
- virtualRow: rowVirtualizer
1055
- ? rowOrVirtualRow
1056
- : undefined,
1057
- };
1058
- return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1059
- }) }))) })), !(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
1041
+ : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: [creatingRow && createDisplayMode === 'row' && (jsxRuntime.jsx(MRT_TableBodyRow, { row: creatingRow, rowIndex: -1, table: table })), (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
1042
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1043
+ }, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
1044
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
1045
+ ? 'grid'
1046
+ : 'table-cell',
1047
+ }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1048
+ color: 'text.secondary',
1049
+ fontStyle: 'italic',
1050
+ maxWidth: `min(100vw, ${(_f = (_e = tablePaperRef.current) === null || _e === void 0 ? void 0 : _e.clientWidth) !== null && _f !== void 0 ? _f : 360}px)`,
1051
+ py: '2rem',
1052
+ textAlign: 'center',
1053
+ width: '100%',
1054
+ }, children: globalFilter || columnFilters.length
1055
+ ? localization.noResultsFound
1056
+ : localization.noRecordsToDisplay })) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
1057
+ const row = rowVirtualizer
1058
+ ? rows[rowOrVirtualRow.index]
1059
+ : rowOrVirtualRow;
1060
+ const props = {
1061
+ columnVirtualizer,
1062
+ measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
1063
+ numRows: rows.length,
1064
+ pinnedRowIds,
1065
+ row,
1066
+ rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
1067
+ table,
1068
+ virtualColumns,
1069
+ virtualPaddingLeft,
1070
+ virtualPaddingRight,
1071
+ virtualRow: rowVirtualizer
1072
+ ? rowOrVirtualRow
1073
+ : undefined,
1074
+ };
1075
+ return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1076
+ }) })))] })), !(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
1060
1077
  getIsSomeRowsPinned('bottom') && (jsxRuntime.jsx(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ bottom: tableFooterHeight - 1, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, position: 'sticky', zIndex: 1 }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: getBottomRows().map((row, rowIndex) => {
1061
1078
  const props = {
1062
1079
  columnVirtualizer,
@@ -1096,7 +1113,11 @@ const MRT_TableFooterCell = ({ footer, table, }) => {
1096
1113
  theme,
1097
1114
  }))), children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: footer.isPlaceholder
1098
1115
  ? null
1099
- : (_b = (_a = parseFromValuesOrFunc(columnDef.Footer, { column, footer, table })) !== null && _a !== void 0 ? _a : columnDef.footer) !== null && _b !== void 0 ? _b : null }) })));
1116
+ : (_b = (_a = parseFromValuesOrFunc(columnDef.Footer, {
1117
+ column,
1118
+ footer,
1119
+ table,
1120
+ })) !== null && _a !== void 0 ? _a : columnDef.footer) !== null && _b !== void 0 ? _b : null }) })));
1100
1121
  };
1101
1122
 
1102
1123
  const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -1115,7 +1136,7 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
1115
1136
  const footer = virtualColumns
1116
1137
  ? footerGroup.headers[footerOrVirtualFooter.index]
1117
1138
  : footerOrVirtualFooter;
1118
- return (jsxRuntime.jsx(MRT_TableFooterCell, { footer: footer, table: table }, footer.id));
1139
+ return footer ? (jsxRuntime.jsx(MRT_TableFooterCell, { footer: footer, table: table }, footer.id)) : null;
1119
1140
  }), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
1120
1141
  };
1121
1142
 
@@ -1488,7 +1509,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1488
1509
  }));
1489
1510
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { 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: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ '&:hover': {
1490
1511
  opacity: 1,
1491
- }, 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: jsxRuntime.jsx(MoreVertIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1512
+ }, 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: jsxRuntime.jsx(MoreVertIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1492
1513
  };
1493
1514
 
1494
1515
  const MRT_FilterCheckbox = ({ column, table, }) => {
@@ -1877,11 +1898,13 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1877
1898
  (_b = filterInputRefs.current[`${column.id}-0`]) === null || _b === void 0 ? void 0 : _b.select();
1878
1899
  });
1879
1900
  event.stopPropagation();
1880
- }, sx: {
1901
+ }, size: "small", sx: {
1881
1902
  height: '16px',
1882
- opacity: 0.8,
1903
+ ml: '4px',
1904
+ opacity: isFilterActive ? 1 : 0.3,
1883
1905
  p: '8px',
1884
1906
  transform: 'scale(0.75)',
1907
+ transition: 'all 150ms ease-in-out',
1885
1908
  width: '16px',
1886
1909
  }, children: jsxRuntime.jsx(FilterAltIcon, {}) }) }) }) }), jsxRuntime.jsx(Popover__default["default"], { anchorEl: anchorEl, anchorOrigin: {
1887
1910
  horizontal: 'center',
@@ -1942,13 +1965,17 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1942
1965
  }, sx: (theme) => ({
1943
1966
  '&:active > hr': {
1944
1967
  backgroundColor: theme.palette.info.main,
1945
- opacity: 1,
1968
+ opacity: header.subHeaders.length ? 1 : 0,
1946
1969
  },
1947
1970
  cursor: 'col-resize',
1948
- mr: density === 'compact' ? '-0.75rem' : '-1rem',
1971
+ mr: density === 'compact'
1972
+ ? '-12px'
1973
+ : density === 'comfortable'
1974
+ ? '-20px'
1975
+ : '-28px',
1949
1976
  position: 'absolute',
1950
1977
  px: '4px',
1951
- right: '4px',
1978
+ right: '0',
1952
1979
  }), children: jsxRuntime.jsx(Divider__default["default"], { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1953
1980
  borderRadius: '2px',
1954
1981
  borderWidth: '2px',
@@ -1962,11 +1989,12 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1962
1989
  } }) }));
1963
1990
  };
1964
1991
 
1965
- const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1966
- const { getState, options: { icons: { ArrowDownwardIcon }, localization, }, } = table;
1992
+ const MRT_TableHeadCellSortLabel = ({ header, table, }) => {
1993
+ const { getState, options: { icons: { ArrowDownwardIcon, SyncAltIcon }, localization, }, } = table;
1967
1994
  const { column } = header;
1968
1995
  const { columnDef } = column;
1969
1996
  const { sorting } = getState();
1997
+ const isSorted = !!column.getIsSorted();
1970
1998
  const sortTooltip = column.getIsSorted()
1971
1999
  ? column.getIsSorted() === 'desc'
1972
2000
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
@@ -1974,18 +2002,17 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1974
2002
  : column.getNextSortingOrder() === 'desc'
1975
2003
  ? localization.sortByColumnDesc.replace('{column}', columnDef.header)
1976
2004
  : localization.sortByColumnAsc.replace('{column}', columnDef.header);
1977
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "top", title: sortTooltip, children: jsxRuntime.jsx(Badge__default["default"], { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsxRuntime.jsx(TableSortLabel__default["default"], { IconComponent: ArrowDownwardIcon, active: !!column.getIsSorted(), "aria-label": sortTooltip, direction: column.getIsSorted()
1978
- ? column.getIsSorted()
1979
- : undefined, onClick: (e) => {
2005
+ return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "top", title: sortTooltip, children: jsxRuntime.jsx(Badge__default["default"], { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsxRuntime.jsx(TableSortLabel__default["default"], { IconComponent: !isSorted
2006
+ ? (props) => (jsxRuntime.jsx(SyncAltIcon, Object.assign({}, props, { style: { transform: 'rotate(-90deg) scaleX(0.8)' } })))
2007
+ : ArrowDownwardIcon, active: true, "aria-label": sortTooltip, direction: isSorted ? column.getIsSorted() : undefined, onClick: (e) => {
1980
2008
  var _a;
1981
2009
  e.stopPropagation();
1982
2010
  (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(e);
1983
2011
  }, sx: {
1984
2012
  flex: '0 0',
1985
- transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
1986
- ? 'translateX(-0.5ch)'
1987
- : undefined,
1988
- width: '2.4ch',
2013
+ opacity: isSorted ? 1 : 0.3,
2014
+ transition: 'all 150ms ease-in-out',
2015
+ width: '3ch',
1989
2016
  } }) }) }));
1990
2017
  };
1991
2018
 
@@ -1993,7 +2020,7 @@ const MRT_TableHeadCell = ({ header, table, }) => {
1993
2020
  var _a, _b, _c, _d, _f;
1994
2021
  const theme = styles.useTheme();
1995
2022
  const { getState, options: { columnFilterDisplayMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
1996
- const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
2023
+ const { columnSizingInfo, density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
1997
2024
  const { column } = header;
1998
2025
  const { columnDef } = column;
1999
2026
  const { columnDefType } = columnDef;
@@ -2013,25 +2040,34 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2013
2040
  const headerPL = react.useMemo(() => {
2014
2041
  let pl = 0;
2015
2042
  if (column.getCanSort())
2016
- pl++;
2043
+ pl += 1;
2017
2044
  if (showColumnActions)
2018
2045
  pl += 1.75;
2019
2046
  if (showDragHandle)
2020
- pl += 1.25;
2047
+ pl += 1.5;
2021
2048
  return pl;
2022
2049
  }, [showColumnActions, showDragHandle]);
2023
- const draggingBorder = react.useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
2024
- ? `1px dashed ${theme.palette.text.secondary}`
2025
- : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2026
- ? `2px dashed ${theme.palette.primary.main}`
2027
- : undefined, [draggingColumn, hoveredColumn]);
2028
- const draggingBorders = draggingBorder
2029
- ? {
2030
- borderLeft: draggingBorder,
2031
- borderRight: draggingBorder,
2032
- borderTop: draggingBorder,
2050
+ const draggingBorders = react.useMemo(() => {
2051
+ const borderStyle = columnSizingInfo.isResizingColumn === column.id &&
2052
+ !header.subHeaders.length
2053
+ ? `2px solid ${theme.palette.primary.main} !important`
2054
+ : (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
2055
+ ? `1px dashed ${theme.palette.text.secondary}`
2056
+ : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2057
+ ? `2px dashed ${theme.palette.primary.main}`
2058
+ : undefined;
2059
+ if (columnSizingInfo.isResizingColumn === column.id) {
2060
+ return { borderRight: borderStyle };
2033
2061
  }
2034
- : undefined;
2062
+ const draggingBorders = borderStyle
2063
+ ? {
2064
+ borderLeft: borderStyle,
2065
+ borderRight: borderStyle,
2066
+ borderTop: borderStyle,
2067
+ }
2068
+ : undefined;
2069
+ return draggingBorders;
2070
+ }, [draggingColumn, hoveredColumn, columnSizingInfo.isResizingColumn]);
2035
2071
  const handleDragEnter = (_e) => {
2036
2072
  if (enableGrouping && (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone') {
2037
2073
  setHoveredColumn(null);
@@ -2049,7 +2085,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2049
2085
  if (node) {
2050
2086
  tableHeadCellRefs.current[column.id] = node;
2051
2087
  }
2052
- } }, 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'
2088
+ } }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ '& :hover': {
2089
+ '.MuiButtonBase-root': {
2090
+ opacity: 1,
2091
+ },
2092
+ }, flexDirection: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'column' : undefined, fontWeight: 'bold', overflow: 'visible', p: density === 'compact'
2053
2093
  ? '0.5rem'
2054
2094
  : density === 'comfortable'
2055
2095
  ? columnDefType === 'display'
@@ -2101,11 +2141,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2101
2141
  '&:hover': {
2102
2142
  textOverflow: 'clip',
2103
2143
  },
2104
- minWidth: `${Math.min((_c = (_b = columnDef.header) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, 5)}ch`,
2144
+ minWidth: `${Math.min((_c = (_b = columnDef.header) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, 4)}ch`,
2105
2145
  overflow: columnDefType === 'data' ? 'hidden' : undefined,
2106
2146
  textOverflow: 'ellipsis',
2107
2147
  whiteSpace: ((_f = (_d = columnDef.header) === null || _d === void 0 ? void 0 : _d.length) !== null && _f !== void 0 ? _f : 0) < 20 ? 'nowrap' : 'normal',
2108
- }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table }))] }), columnDefType !== 'group' && (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsxRuntime.jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2148
+ }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps }))] }), columnDefType !== 'group' && (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsxRuntime.jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2109
2149
  current: tableHeadCellRefs.current[column.id],
2110
2150
  } })), showColumnActions && (jsxRuntime.jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsxRuntime.jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2111
2151
  };
@@ -2120,18 +2160,18 @@ const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLe
2120
2160
  const header = virtualColumns
2121
2161
  ? headerGroup.headers[headerOrVirtualHeader.index]
2122
2162
  : headerOrVirtualHeader;
2123
- return (jsxRuntime.jsx(MRT_TableHeadCell, { header: header, table: table }, header.id));
2163
+ return header ? (jsxRuntime.jsx(MRT_TableHeadCell, { header: header, table: table }, header.id)) : null;
2124
2164
  }), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
2125
2165
  };
2126
2166
 
2127
2167
  const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
2128
2168
  const { getState, options: { muiLinearProgressProps }, } = table;
2129
- const { isLoading, showProgressBars } = getState();
2169
+ const { showProgressBars } = getState();
2130
2170
  const linearProgressProps = parseFromValuesOrFunc(muiLinearProgressProps, {
2131
2171
  isTopToolbar,
2132
2172
  table,
2133
2173
  });
2134
- return (jsxRuntime.jsx(Collapse__default["default"], { in: isLoading || showProgressBars, mountOnEnter: true, sx: {
2174
+ return (jsxRuntime.jsx(Collapse__default["default"], { in: showProgressBars, mountOnEnter: true, sx: {
2135
2175
  bottom: isTopToolbar ? 0 : undefined,
2136
2176
  position: 'absolute',
2137
2177
  top: !isTopToolbar ? 0 : undefined,
@@ -2182,8 +2222,9 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2182
2222
  return (jsxRuntime.jsxs(Box__default["default"], { sx: {
2183
2223
  alignItems: 'center',
2184
2224
  display: 'flex',
2225
+ flexWrap: 'wrap',
2185
2226
  gap: '8px',
2186
- justifyContent: 'space-between',
2227
+ justifyContent: { md: 'space-between', sm: 'center' },
2187
2228
  justifySelf: 'flex-end',
2188
2229
  mt: position === 'top' &&
2189
2230
  enableToolbarInternalActions &&
@@ -2194,12 +2235,12 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2194
2235
  px: '4px',
2195
2236
  py: '12px',
2196
2237
  zIndex: 2,
2197
- }, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], { 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) => (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
2238
+ }, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], { disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.map((value) => (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
2198
2239
  first: FirstPageIcon,
2199
2240
  last: LastPageIcon,
2200
2241
  next: ChevronRightIcon,
2201
2242
  previous: ChevronLeftIcon,
2202
- } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { sx: { mb: 0, minWidth: '10ch', mx: '4px' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2243
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", sx: { mb: 0, minWidth: '10ch', mx: '4px' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2203
2244
  };
2204
2245
 
2205
2246
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -2653,7 +2694,9 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2653
2694
  tableHeadProps.ref.current = ref;
2654
2695
  }
2655
2696
  }, 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' &&
2656
- (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (jsxRuntime.jsx("tr", { style: { display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, children: jsxRuntime.jsx("th", { colSpan: table.getVisibleLeafColumns().length, style: {
2697
+ (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (jsxRuntime.jsx("tr", { style: {
2698
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
2699
+ }, children: jsxRuntime.jsx("th", { colSpan: table.getVisibleLeafColumns().length, style: {
2657
2700
  display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : 'table-cell',
2658
2701
  padding: 0,
2659
2702
  }, children: jsxRuntime.jsx(MRT_ToolbarAlertBanner, { table: table }) }) })) : (getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id)))) })));
@@ -2822,12 +2865,14 @@ const MRT_EditRowModal = ({ open, table, }) => {
2822
2865
 
2823
2866
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
2824
2867
  const MRT_TableContainer = ({ table, }) => {
2825
- const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2826
- const { creatingRow, editingRow, isFullScreen } = getState();
2868
+ const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, localization, muiCircularProgressProps, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2869
+ const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay, } = getState();
2870
+ const loading = (isLoading || showLoadingOverlay) && showLoadingOverlay !== false;
2827
2871
  const [totalToolbarHeight, setTotalToolbarHeight] = react.useState(0);
2828
2872
  const tableContainerProps = parseFromValuesOrFunc(muiTableContainerProps, {
2829
2873
  table,
2830
2874
  });
2875
+ const circularProgressProps = parseFromValuesOrFunc(muiCircularProgressProps, { table });
2831
2876
  useIsomorphicLayoutEffect(() => {
2832
2877
  var _a, _b, _c, _d;
2833
2878
  const topToolbarHeight = typeof document !== 'undefined'
@@ -2840,7 +2885,7 @@ const MRT_TableContainer = ({ table, }) => {
2840
2885
  });
2841
2886
  const createModalOpen = createDisplayMode === 'modal' && creatingRow;
2842
2887
  const editModalOpen = editDisplayMode === 'modal' && editingRow;
2843
- return (jsxRuntime.jsxs(TableContainer__default["default"], Object.assign({}, tableContainerProps, { ref: (node) => {
2888
+ return (jsxRuntime.jsxs(TableContainer__default["default"], Object.assign({ "aria-busy": loading, "aria-describedby": "mrt-progress" }, tableContainerProps, { ref: (node) => {
2844
2889
  if (node) {
2845
2890
  tableContainerRef.current = node;
2846
2891
  if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
@@ -2852,7 +2897,20 @@ const MRT_TableContainer = ({ table, }) => {
2852
2897
  ? `calc(100vh - ${totalToolbarHeight}px)`
2853
2898
  : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style), sx: (theme) => (Object.assign({ maxHeight: enableStickyHeader
2854
2899
  ? `clamp(350px, calc(100vh - ${totalToolbarHeight}px), 9999px)`
2855
- : undefined, maxWidth: '100%', overflow: 'auto' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [jsxRuntime.jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsxRuntime.jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2900
+ : undefined, maxWidth: '100%', overflow: 'auto', position: 'relative' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [loading ? (jsxRuntime.jsx(Box__default["default"], { sx: (theme) => ({
2901
+ alignItems: 'center',
2902
+ backgroundColor: styles.alpha(styles.lighten(theme.palette.background.paper, 0.05), 0.5),
2903
+ bottom: 0,
2904
+ display: 'flex',
2905
+ justifyContent: 'center',
2906
+ left: 0,
2907
+ maxHeight: '100vh',
2908
+ position: 'absolute',
2909
+ right: 0,
2910
+ top: 0,
2911
+ width: '100%',
2912
+ zIndex: 2,
2913
+ }), children: jsxRuntime.jsx(CircularProgress__default["default"], Object.assign({ "aria-label": localization.noRecordsToDisplay, id: "mrt-progress" }, circularProgressProps)) })) : null, jsxRuntime.jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsxRuntime.jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2856
2914
  };
2857
2915
 
2858
2916
  const MRT_TablePaper = ({ table, }) => {
@@ -2879,7 +2937,7 @@ const MRT_TablePaper = ({ table, }) => {
2879
2937
  right: 0,
2880
2938
  top: 0,
2881
2939
  width: '100vw',
2882
- zIndex: 10,
2940
+ zIndex: 9999,
2883
2941
  }
2884
2942
  : {})), tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style), sx: (theme) => (Object.assign({ overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.sx, theme))), children: [enableTopToolbar &&
2885
2943
  ((_a = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _a !== void 0 ? _a : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
@@ -2956,7 +3014,7 @@ const MRT_ExpandButton = ({ row, table, }) => {
2956
3014
  };
2957
3015
  return (jsxRuntime.jsx(Tooltip__default["default"], { 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)
2958
3016
  ? localization.collapse
2959
- : localization.expand, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], 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 : (jsxRuntime.jsx(ExpandMoreIcon, { style: {
3017
+ : localization.expand, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], 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 : (jsxRuntime.jsx(ExpandMoreIcon, { style: {
2960
3018
  transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
2961
3019
  transition: 'transform 150ms',
2962
3020
  } })) })) }) }));
@@ -3006,10 +3064,18 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
3006
3064
  parseFromValuesOrFunc(enableEditing, row) ? (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "right", title: localization.edit, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.edit, onClick: handleStartEditMode, sx: commonIconButtonStyles, children: jsxRuntime.jsx(EditIcon, {}) }) })) : renderRowActionMenuItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles, children: jsxRuntime.jsx(MoreHorizIcon, {}) }) }), jsxRuntime.jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
3007
3065
  };
3008
3066
 
3067
+ const blankColProps = {
3068
+ sx: {
3069
+ flex: '1 0 auto',
3070
+ minWidth: 0,
3071
+ p: 0,
3072
+ width: 0,
3073
+ },
3074
+ };
3009
3075
  const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOptions, }) => {
3010
3076
  var _a, _b;
3011
3077
  return react.useMemo(() => {
3012
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
3078
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
3013
3079
  return [
3014
3080
  ((_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 }) => (jsxRuntime.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' }),
3015
3081
  ((_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 }) => (jsxRuntime.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' }),
@@ -3024,6 +3090,14 @@ const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOption
3024
3090
  ? ({ table }) => jsxRuntime.jsx(MRT_SelectCheckbox, { selectAll: true, table: table })
3025
3091
  : 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' }),
3026
3092
  ((_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' }),
3093
+ ((_x = (_w = tableOptions.state) === null || _w === void 0 ? void 0 : _w.columnOrder) !== null && _x !== void 0 ? _x : columnOrder).includes('mrt-row-spacer') && {
3094
+ columnDefType: 'display',
3095
+ header: '',
3096
+ id: 'spacer',
3097
+ muiTableBodyCellProps: blankColProps,
3098
+ muiTableFooterCellProps: blankColProps,
3099
+ muiTableHeadCellProps: blankColProps,
3100
+ },
3027
3101
  ].filter(Boolean);
3028
3102
  }, [
3029
3103
  columnOrder,
@@ -3414,6 +3488,7 @@ const MRT_Default_Icons = {
3414
3488
  SearchIcon: SearchIcon__default["default"],
3415
3489
  SearchOffIcon: SearchOffIcon__default["default"],
3416
3490
  SortIcon: SortIcon__default["default"],
3491
+ SyncAltIcon: SyncAltIcon__default["default"],
3417
3492
  ViewColumnIcon: ViewColumnIcon__default["default"],
3418
3493
  VisibilityOffIcon: VisibilityOffIcon__default["default"],
3419
3494
  };