material-react-table 1.11.3 → 1.11.5

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 (232) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +590 -817
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/MaterialReactTable.d.ts +4 -5
  5. package/dist/cjs/types/_locales/hu.d.ts +2 -0
  6. package/dist/cjs/types/body/MRT_EditRowModal.d.ts +1 -2
  7. package/dist/cjs/types/body/MRT_TableBody.d.ts +3 -3
  8. package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +3 -3
  9. package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +1 -2
  10. package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +3 -3
  11. package/dist/cjs/types/body/MRT_TableBodyRowGrabHandle.d.ts +1 -1
  12. package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +2 -2
  13. package/dist/cjs/types/buttons/MRT_ColumnPinningButtons.d.ts +1 -2
  14. package/dist/cjs/types/buttons/MRT_CopyButton.d.ts +1 -1
  15. package/dist/cjs/types/buttons/MRT_EditActionButtons.d.ts +1 -2
  16. package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +1 -2
  17. package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +1 -2
  18. package/dist/cjs/types/buttons/MRT_FullScreenToggleButton.d.ts +1 -2
  19. package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +1 -1
  20. package/dist/cjs/types/buttons/MRT_ShowHideColumnsButton.d.ts +1 -2
  21. package/dist/cjs/types/buttons/MRT_ToggleDensePaddingButton.d.ts +1 -2
  22. package/dist/cjs/types/buttons/MRT_ToggleFiltersButton.d.ts +1 -2
  23. package/dist/cjs/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +1 -2
  24. package/dist/cjs/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +1 -2
  25. package/dist/cjs/types/footer/MRT_TableFooter.d.ts +1 -2
  26. package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +1 -2
  27. package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +1 -2
  28. package/dist/cjs/types/head/MRT_TableHead.d.ts +1 -2
  29. package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +1 -2
  30. package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +1 -2
  31. package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +1 -2
  32. package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +1 -2
  33. package/dist/cjs/types/head/MRT_TableHeadCellGrabHandle.d.ts +1 -1
  34. package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +1 -2
  35. package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -2
  36. package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +1 -2
  37. package/dist/cjs/types/index.d.ts +3 -2
  38. package/dist/cjs/types/inputs/MRT_EditCellTextField.d.ts +1 -2
  39. package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +1 -2
  40. package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +1 -2
  41. package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +1 -2
  42. package/dist/cjs/types/inputs/MRT_GlobalFilterTextField.d.ts +1 -2
  43. package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +1 -2
  44. package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +1 -2
  45. package/dist/cjs/types/menus/MRT_FilterOptionMenu.d.ts +1 -2
  46. package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +1 -1
  47. package/dist/cjs/types/menus/MRT_ShowHideColumnsMenu.d.ts +1 -2
  48. package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +1 -1
  49. package/dist/cjs/types/table/MRT_Table.d.ts +1 -2
  50. package/dist/cjs/types/table/MRT_TableContainer.d.ts +1 -2
  51. package/dist/cjs/types/table/MRT_TablePaper.d.ts +1 -2
  52. package/dist/cjs/types/toolbar/MRT_BottomToolbar.d.ts +1 -2
  53. package/dist/cjs/types/toolbar/MRT_LinearProgressBar.d.ts +1 -2
  54. package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +1 -2
  55. package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -2
  56. package/dist/cjs/types/toolbar/MRT_ToolbarDropZone.d.ts +1 -2
  57. package/dist/cjs/types/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -2
  58. package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +1 -2
  59. package/dist/esm/material-react-table.esm.js +511 -738
  60. package/dist/esm/material-react-table.esm.js.map +1 -1
  61. package/dist/esm/types/MaterialReactTable.d.ts +4 -5
  62. package/dist/esm/types/_locales/hu.d.ts +2 -0
  63. package/dist/esm/types/body/MRT_EditRowModal.d.ts +1 -2
  64. package/dist/esm/types/body/MRT_TableBody.d.ts +3 -3
  65. package/dist/esm/types/body/MRT_TableBodyCell.d.ts +3 -3
  66. package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +1 -2
  67. package/dist/esm/types/body/MRT_TableBodyRow.d.ts +3 -3
  68. package/dist/esm/types/body/MRT_TableBodyRowGrabHandle.d.ts +1 -1
  69. package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +2 -2
  70. package/dist/esm/types/buttons/MRT_ColumnPinningButtons.d.ts +1 -2
  71. package/dist/esm/types/buttons/MRT_CopyButton.d.ts +1 -1
  72. package/dist/esm/types/buttons/MRT_EditActionButtons.d.ts +1 -2
  73. package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +1 -2
  74. package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +1 -2
  75. package/dist/esm/types/buttons/MRT_FullScreenToggleButton.d.ts +1 -2
  76. package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +1 -1
  77. package/dist/esm/types/buttons/MRT_ShowHideColumnsButton.d.ts +1 -2
  78. package/dist/esm/types/buttons/MRT_ToggleDensePaddingButton.d.ts +1 -2
  79. package/dist/esm/types/buttons/MRT_ToggleFiltersButton.d.ts +1 -2
  80. package/dist/esm/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +1 -2
  81. package/dist/esm/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +1 -2
  82. package/dist/esm/types/footer/MRT_TableFooter.d.ts +1 -2
  83. package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +1 -2
  84. package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +1 -2
  85. package/dist/esm/types/head/MRT_TableHead.d.ts +1 -2
  86. package/dist/esm/types/head/MRT_TableHeadCell.d.ts +1 -2
  87. package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +1 -2
  88. package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +1 -2
  89. package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +1 -2
  90. package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +1 -1
  91. package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +1 -2
  92. package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -2
  93. package/dist/esm/types/head/MRT_TableHeadRow.d.ts +1 -2
  94. package/dist/esm/types/index.d.ts +3 -2
  95. package/dist/esm/types/inputs/MRT_EditCellTextField.d.ts +1 -2
  96. package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +1 -2
  97. package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +1 -2
  98. package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +1 -2
  99. package/dist/esm/types/inputs/MRT_GlobalFilterTextField.d.ts +1 -2
  100. package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +1 -2
  101. package/dist/esm/types/menus/MRT_ColumnActionMenu.d.ts +1 -2
  102. package/dist/esm/types/menus/MRT_FilterOptionMenu.d.ts +1 -2
  103. package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +1 -1
  104. package/dist/esm/types/menus/MRT_ShowHideColumnsMenu.d.ts +1 -2
  105. package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +1 -1
  106. package/dist/esm/types/table/MRT_Table.d.ts +1 -2
  107. package/dist/esm/types/table/MRT_TableContainer.d.ts +1 -2
  108. package/dist/esm/types/table/MRT_TablePaper.d.ts +1 -2
  109. package/dist/esm/types/toolbar/MRT_BottomToolbar.d.ts +1 -2
  110. package/dist/esm/types/toolbar/MRT_LinearProgressBar.d.ts +1 -2
  111. package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +1 -2
  112. package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -2
  113. package/dist/esm/types/toolbar/MRT_ToolbarDropZone.d.ts +1 -2
  114. package/dist/esm/types/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -2
  115. package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +1 -2
  116. package/dist/index.d.ts +39 -34
  117. package/locales/cs.esm.js +91 -89
  118. package/locales/cs.js +91 -89
  119. package/locales/da.esm.js +90 -89
  120. package/locales/da.js +90 -89
  121. package/locales/de.esm.js +90 -89
  122. package/locales/de.js +90 -89
  123. package/locales/en.esm.js +90 -89
  124. package/locales/en.js +90 -89
  125. package/locales/es.esm.js +90 -89
  126. package/locales/es.js +90 -89
  127. package/locales/fa.esm.js +90 -89
  128. package/locales/fa.js +90 -89
  129. package/locales/fi.esm.js +91 -89
  130. package/locales/fi.js +91 -89
  131. package/locales/fr.esm.js +90 -89
  132. package/locales/fr.js +90 -89
  133. package/locales/hu.d.ts +2 -0
  134. package/locales/hu.esm.d.ts +2 -0
  135. package/locales/hu.esm.js +95 -0
  136. package/locales/hu.esm.js.map +1 -0
  137. package/locales/hu.js +99 -0
  138. package/locales/hu.js.map +1 -0
  139. package/locales/id.esm.js +91 -89
  140. package/locales/id.js +91 -89
  141. package/locales/it.esm.js +90 -89
  142. package/locales/it.js +90 -89
  143. package/locales/ja.esm.js +90 -89
  144. package/locales/ja.js +90 -89
  145. package/locales/nl.esm.js +90 -89
  146. package/locales/nl.js +90 -89
  147. package/locales/pl.esm.js +90 -89
  148. package/locales/pl.js +90 -89
  149. package/locales/pt-BR.esm.js +90 -89
  150. package/locales/pt-BR.js +90 -89
  151. package/locales/pt.esm.js +90 -89
  152. package/locales/pt.js +90 -89
  153. package/locales/ro.esm.js +90 -89
  154. package/locales/ro.js +90 -89
  155. package/locales/ru.esm.js +90 -89
  156. package/locales/ru.js +90 -89
  157. package/locales/sk.esm.js +91 -89
  158. package/locales/sk.js +91 -89
  159. package/locales/sr-Cyrl-RS.esm.js +90 -89
  160. package/locales/sr-Cyrl-RS.js +90 -89
  161. package/locales/sr-Latn-RS.esm.js +90 -89
  162. package/locales/sr-Latn-RS.js +90 -89
  163. package/locales/sv.esm.js +90 -89
  164. package/locales/sv.js +90 -89
  165. package/locales/tr.esm.js +90 -89
  166. package/locales/tr.js +90 -89
  167. package/locales/uk.esm.js +90 -89
  168. package/locales/uk.js +90 -89
  169. package/locales/vi.esm.js +90 -89
  170. package/locales/vi.js +90 -89
  171. package/locales/zh-Hans.esm.js +89 -89
  172. package/locales/zh-Hans.js +89 -89
  173. package/locales/zh-Hant.esm.js +89 -89
  174. package/locales/zh-Hant.js +89 -89
  175. package/package.json +33 -15
  176. package/src/MaterialReactTable.tsx +5 -5
  177. package/src/_locales/hu.ts +94 -0
  178. package/src/body/MRT_EditRowModal.tsx +0 -1
  179. package/src/body/MRT_TableBody.tsx +6 -1
  180. package/src/body/MRT_TableBodyCell.tsx +1 -1
  181. package/src/body/MRT_TableBodyCellValue.tsx +1 -1
  182. package/src/body/MRT_TableBodyRow.tsx +1 -1
  183. package/src/body/MRT_TableBodyRowGrabHandle.tsx +1 -1
  184. package/src/body/MRT_TableDetailPanel.tsx +1 -1
  185. package/src/buttons/MRT_ColumnPinningButtons.tsx +0 -1
  186. package/src/buttons/MRT_CopyButton.tsx +1 -1
  187. package/src/buttons/MRT_EditActionButtons.tsx +0 -1
  188. package/src/buttons/MRT_ExpandAllButton.tsx +0 -1
  189. package/src/buttons/MRT_ExpandButton.tsx +1 -1
  190. package/src/buttons/MRT_FullScreenToggleButton.tsx +0 -1
  191. package/src/buttons/MRT_GrabHandleButton.tsx +1 -1
  192. package/src/buttons/MRT_ShowHideColumnsButton.tsx +1 -1
  193. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +0 -1
  194. package/src/buttons/MRT_ToggleFiltersButton.tsx +0 -1
  195. package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +0 -1
  196. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +1 -1
  197. package/src/column.utils.ts +9 -7
  198. package/src/footer/MRT_TableFooter.tsx +0 -1
  199. package/src/footer/MRT_TableFooterCell.tsx +0 -1
  200. package/src/footer/MRT_TableFooterRow.tsx +0 -1
  201. package/src/head/MRT_TableHead.tsx +0 -1
  202. package/src/head/MRT_TableHeadCell.tsx +1 -1
  203. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
  204. package/src/head/MRT_TableHeadCellFilterContainer.tsx +0 -1
  205. package/src/head/MRT_TableHeadCellFilterLabel.tsx +1 -1
  206. package/src/head/MRT_TableHeadCellGrabHandle.tsx +1 -1
  207. package/src/head/MRT_TableHeadCellResizeHandle.tsx +0 -1
  208. package/src/head/MRT_TableHeadCellSortLabel.tsx +0 -1
  209. package/src/head/MRT_TableHeadRow.tsx +0 -1
  210. package/src/index.tsx +4 -2
  211. package/src/inputs/MRT_EditCellTextField.tsx +1 -1
  212. package/src/inputs/MRT_FilterCheckbox.tsx +0 -1
  213. package/src/inputs/MRT_FilterRangeFields.tsx +0 -1
  214. package/src/inputs/MRT_FilterTextField.tsx +1 -1
  215. package/src/inputs/MRT_GlobalFilterTextField.tsx +1 -1
  216. package/src/inputs/MRT_SelectCheckbox.tsx +1 -1
  217. package/src/menus/MRT_ColumnActionMenu.tsx +21 -16
  218. package/src/menus/MRT_FilterOptionMenu.tsx +1 -1
  219. package/src/menus/MRT_RowActionMenu.tsx +1 -1
  220. package/src/menus/MRT_ShowHideColumnsMenu.tsx +1 -1
  221. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +1 -7
  222. package/src/table/MRT_Table.tsx +1 -1
  223. package/src/table/MRT_TableContainer.tsx +1 -1
  224. package/src/table/MRT_TablePaper.tsx +0 -1
  225. package/src/table/MRT_TableRoot.tsx +16 -16
  226. package/src/toolbar/MRT_BottomToolbar.tsx +0 -1
  227. package/src/toolbar/MRT_LinearProgressBar.tsx +0 -1
  228. package/src/toolbar/MRT_TablePagination.tsx +1 -1
  229. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +1 -1
  230. package/src/toolbar/MRT_ToolbarDropZone.tsx +1 -1
  231. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +0 -1
  232. package/src/toolbar/MRT_TopToolbar.tsx +0 -1
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useState, useRef, useCallback, useEffect, Fragment, memo, useLayoutEffect } from 'react';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { useMemo, useState, useRef, useCallback, useEffect, Fragment as Fragment$1, memo, useLayoutEffect } from 'react';
2
3
  import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedRowModel, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
3
4
  import { alpha, lighten, useTheme, darken } from '@mui/material/styles';
4
5
  import { rankItem, rankings, compareItems } from '@tanstack/match-sorter-utils';
@@ -167,8 +168,9 @@ const reorderColumn = (draggedColumn, targetColumn, columnOrder) => {
167
168
  if (draggedColumn.getCanPin()) {
168
169
  draggedColumn.pin(targetColumn.getIsPinned());
169
170
  }
170
- columnOrder.splice(columnOrder.indexOf(targetColumn.id), 0, columnOrder.splice(columnOrder.indexOf(draggedColumn.id), 1)[0]);
171
- return [...columnOrder];
171
+ let newColumnOrder = [...columnOrder];
172
+ newColumnOrder.splice(newColumnOrder.indexOf(targetColumn.id), 0, newColumnOrder.splice(newColumnOrder.indexOf(draggedColumn.id), 1)[0]);
173
+ return newColumnOrder;
172
174
  };
173
175
  const showExpandColumn = (props, grouping) => !!(props.enableExpanding ||
174
176
  (props.enableGrouping && (grouping === undefined || (grouping === null || grouping === void 0 ? void 0 : grouping.length))) ||
@@ -236,7 +238,10 @@ const getIsFirstRightPinnedColumn = (column) => {
236
238
  return column.getIsPinned() === 'right' && column.getPinnedIndex() === 0;
237
239
  };
238
240
  const getTotalRight = (table, column) => {
239
- return ((table.getRightLeafHeaders().length - 1 - column.getPinnedIndex()) * 200);
241
+ return table
242
+ .getRightLeafHeaders()
243
+ .slice(column.getPinnedIndex() + 1)
244
+ .reduce((acc, col) => acc + col.getSize(), 0);
240
245
  };
241
246
  const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
242
247
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
@@ -437,16 +442,14 @@ const MRT_ExpandAllButton = ({ table }) => {
437
442
  ? muiExpandAllButtonProps({ table })
438
443
  : muiExpandAllButtonProps;
439
444
  const isAllRowsExpanded = getIsAllRowsExpanded();
440
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isAllRowsExpanded)
445
+ return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isAllRowsExpanded)
441
446
  ? localization.collapseAll
442
- : localization.expandAll },
443
- React.createElement("span", null,
444
- React.createElement(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: isLoading || (!renderDetailPanel && !getCanSomeRowsExpand()), onClick: () => toggleAllRowsExpanded(!isAllRowsExpanded) }, iconButtonProps, { sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
447
+ : localization.expandAll }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: isLoading || (!renderDetailPanel && !getCanSomeRowsExpand()), onClick: () => toggleAllRowsExpanded(!isAllRowsExpanded) }, iconButtonProps, { sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
445
448
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
446
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }), (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (React.createElement(KeyboardDoubleArrowDownIcon, { style: {
447
- transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
448
- transition: 'transform 150ms',
449
- } }))))));
449
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(KeyboardDoubleArrowDownIcon, { style: {
450
+ transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
451
+ transition: 'transform 150ms',
452
+ } })) })) }) })));
450
453
  };
451
454
 
452
455
  const MRT_ExpandButton = ({ row, table, }) => {
@@ -464,16 +467,14 @@ const MRT_ExpandButton = ({ row, table, }) => {
464
467
  row.toggleExpanded();
465
468
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
466
469
  };
467
- return (React.createElement(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)
470
+ return (jsx(Tooltip, Object.assign({ arrow: true, disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isExpanded)
468
471
  ? localization.collapse
469
- : localization.expand },
470
- React.createElement("span", null,
471
- React.createElement(IconButton, Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem' }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
472
+ : localization.expand }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem' }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
472
473
  ? iconButtonProps.sx(theme)
473
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }), (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (React.createElement(ExpandMoreIcon, { style: {
474
- transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
475
- transition: 'transform 150ms',
476
- } }))))));
474
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsx(ExpandMoreIcon, { style: {
475
+ transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
476
+ transition: 'transform 150ms',
477
+ } })) })) }) })));
477
478
  };
478
479
 
479
480
  const mrtFilterOptions = (localization) => [
@@ -640,33 +641,31 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
640
641
  onSelect === null || onSelect === void 0 ? void 0 : onSelect();
641
642
  };
642
643
  const filterOption = !!header && columnDef ? columnDef._filterFn : globalFilterFn;
643
- return (React.createElement(Menu, { anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, onClose: () => setAnchorEl(null), open: !!anchorEl, MenuListProps: {
644
+ return (jsx(Menu, Object.assign({ anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, onClose: () => setAnchorEl(null), open: !!anchorEl, MenuListProps: {
644
645
  dense: density === 'compact',
645
- } }, (_d = (header && column && columnDef
646
- ? (_c = (_b = columnDef.renderColumnFilterModeMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
647
- column: column,
648
- internalFilterOptions,
649
- onSelectFilterMode: handleSelectFilterMode,
650
- table,
651
- })) !== null && _c !== void 0 ? _c : renderColumnFilterModeMenuItems === null || renderColumnFilterModeMenuItems === void 0 ? void 0 : renderColumnFilterModeMenuItems({
652
- column: column,
653
- internalFilterOptions,
654
- onSelectFilterMode: handleSelectFilterMode,
655
- table,
656
- })
657
- : renderGlobalFilterModeMenuItems === null || renderGlobalFilterModeMenuItems === void 0 ? void 0 : renderGlobalFilterModeMenuItems({
658
- internalFilterOptions,
659
- onSelectFilterMode: handleSelectFilterMode,
660
- table,
661
- }))) !== null && _d !== void 0 ? _d : internalFilterOptions.map(({ option, label, divider, symbol }, index) => (React.createElement(MenuItem, { divider: divider, key: index, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
662
- alignItems: 'center',
663
- display: 'flex',
664
- gap: '2ch',
665
- my: 0,
666
- py: '6px',
667
- }, value: option },
668
- React.createElement(Box, { sx: { fontSize: '1.25rem', width: '2ch' } }, symbol),
669
- label)))));
646
+ } }, { children: (_d = (header && column && columnDef
647
+ ? (_c = (_b = columnDef.renderColumnFilterModeMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
648
+ column: column,
649
+ internalFilterOptions,
650
+ onSelectFilterMode: handleSelectFilterMode,
651
+ table,
652
+ })) !== null && _c !== void 0 ? _c : renderColumnFilterModeMenuItems === null || renderColumnFilterModeMenuItems === void 0 ? void 0 : renderColumnFilterModeMenuItems({
653
+ column: column,
654
+ internalFilterOptions,
655
+ onSelectFilterMode: handleSelectFilterMode,
656
+ table,
657
+ })
658
+ : renderGlobalFilterModeMenuItems === null || renderGlobalFilterModeMenuItems === void 0 ? void 0 : renderGlobalFilterModeMenuItems({
659
+ internalFilterOptions,
660
+ onSelectFilterMode: handleSelectFilterMode,
661
+ table,
662
+ }))) !== null && _d !== void 0 ? _d : internalFilterOptions.map(({ option, label, divider, symbol }, index) => (jsxs(MenuItem, Object.assign({ divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
663
+ alignItems: 'center',
664
+ display: 'flex',
665
+ gap: '2ch',
666
+ my: 0,
667
+ py: '6px',
668
+ }, value: option }, { children: [jsx(Box, Object.assign({ sx: { fontSize: '1.25rem', width: '2ch' } }, { children: symbol })), label] }), index))) })));
670
669
  };
671
670
 
672
671
  const commonMenuItemStyles = {
@@ -681,7 +680,7 @@ const commonListItemStyles = {
681
680
  };
682
681
  const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
683
682
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
684
- const { getState, toggleAllColumnsVisible, setColumnOrder, options: { columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnResizing, enableGrouping, enableHiding, enablePinning, enableSorting, icons: { ArrowRightIcon, ClearAllIcon, ViewColumnIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, SortIcon, RestartAltIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setColumnSizingInfo, setShowColumnFilters, } = table;
683
+ const { getState, toggleAllColumnsVisible, setColumnOrder, options: { columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnResizing, enableGrouping, enableHiding, enablePinning, enableSorting, enableSortingRemoval, icons: { ArrowRightIcon, ClearAllIcon, ViewColumnIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, SortIcon, RestartAltIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setColumnSizingInfo, setShowColumnFilters, } = table;
685
684
  const { column } = header;
686
685
  const { columnDef } = column;
687
686
  const { columnSizing, columnVisibility, density, showColumnFilters } = getState();
@@ -740,120 +739,60 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
740
739
  !isSelectFilter &&
741
740
  (allowedColumnFilterOptions === undefined ||
742
741
  !!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
743
- return (React.createElement(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
742
+ return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
744
743
  dense: density === 'compact',
745
- } }, (_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
746
- closeMenu: () => setAnchorEl(null),
747
- column,
748
- table,
749
- })) !== null && _c !== void 0 ? _c : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
750
- closeMenu: () => setAnchorEl(null),
751
- column,
752
- table,
753
- })) !== null && _d !== void 0 ? _d : (enableSorting &&
754
- column.getCanSort() && [
755
- React.createElement(MenuItem, { disabled: !column.getIsSorted(), key: 0, onClick: handleClearSort, sx: commonMenuItemStyles },
756
- React.createElement(Box, { sx: commonListItemStyles },
757
- React.createElement(ListItemIcon, null,
758
- React.createElement(ClearAllIcon, null)),
759
- localization.clearSort)),
760
- React.createElement(MenuItem, { disabled: column.getIsSorted() === 'asc', key: 1, onClick: handleSortAsc, sx: commonMenuItemStyles },
761
- React.createElement(Box, { sx: commonListItemStyles },
762
- React.createElement(ListItemIcon, null,
763
- React.createElement(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } })), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 :
764
- _e.replace('{column}', String(columnDef.header)))),
765
- React.createElement(MenuItem, { divider: enableColumnFilters || enableGrouping || enableHiding, key: 2, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles },
766
- React.createElement(Box, { sx: commonListItemStyles },
767
- React.createElement(ListItemIcon, null,
768
- React.createElement(SortIcon, null)), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 :
769
- _f.replace('{column}', String(columnDef.header)))),
770
- ]),
771
- enableColumnFilters &&
772
- column.getCanFilter() &&
773
- [
774
- React.createElement(MenuItem, { disabled: !column.getFilterValue(), key: 0, onClick: handleClearFilter, sx: commonMenuItemStyles },
775
- React.createElement(Box, { sx: commonListItemStyles },
776
- React.createElement(ListItemIcon, null,
777
- React.createElement(FilterListOffIcon, null)),
778
- localization.clearFilter)),
779
- React.createElement(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, key: 1, onClick: showColumnFilters
780
- ? handleOpenFilterModeMenu
781
- : handleFilterByColumn, sx: commonMenuItemStyles },
782
- React.createElement(Box, { sx: commonListItemStyles },
783
- React.createElement(ListItemIcon, null,
784
- React.createElement(FilterListIcon, null)), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 :
785
- _g.replace('{column}', String(columnDef.header))),
786
- showFilterModeSubMenu && (React.createElement(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 } },
787
- React.createElement(ArrowRightIcon, null)))),
788
- showFilterModeSubMenu && (React.createElement(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, key: 2, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table })),
789
- ].filter(Boolean),
790
- enableGrouping &&
791
- column.getCanGroup() && [
792
- React.createElement(MenuItem, { divider: enablePinning, key: 0, onClick: handleGroupByColumn, sx: commonMenuItemStyles },
793
- React.createElement(Box, { sx: commonListItemStyles },
794
- React.createElement(ListItemIcon, null,
795
- React.createElement(DynamicFeedIcon, null)), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 :
796
- _h.replace('{column}', String(columnDef.header)))),
797
- ],
798
- enablePinning &&
799
- column.getCanPin() && [
800
- React.createElement(MenuItem, { disabled: column.getIsPinned() === 'left' || !column.getCanPin(), key: 0, onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles },
801
- React.createElement(Box, { sx: commonListItemStyles },
802
- React.createElement(ListItemIcon, null,
803
- React.createElement(PushPinIcon, { style: { transform: 'rotate(90deg)' } })),
804
- localization.pinToLeft)),
805
- React.createElement(MenuItem, { disabled: column.getIsPinned() === 'right' || !column.getCanPin(), key: 1, onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles },
806
- React.createElement(Box, { sx: commonListItemStyles },
807
- React.createElement(ListItemIcon, null,
808
- React.createElement(PushPinIcon, { style: { transform: 'rotate(-90deg)' } })),
809
- localization.pinToRight)),
810
- React.createElement(MenuItem, { disabled: !column.getIsPinned(), divider: enableHiding, key: 2, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles },
811
- React.createElement(Box, { sx: commonListItemStyles },
812
- React.createElement(ListItemIcon, null,
813
- React.createElement(PushPinIcon, null)),
814
- localization.unpin)),
815
- ],
816
- enableColumnResizing &&
817
- column.getCanResize() && [
818
- React.createElement(MenuItem, { disabled: !columnSizing[column.id], key: 0, onClick: handleResetColumnSize, sx: commonMenuItemStyles },
819
- React.createElement(Box, { sx: commonListItemStyles },
820
- React.createElement(ListItemIcon, null,
821
- React.createElement(RestartAltIcon, null)),
822
- localization.resetColumnSize)),
823
- ],
824
- enableHiding && [
825
- React.createElement(MenuItem, { disabled: !column.getCanHide(), key: 0, onClick: handleHideColumn, sx: commonMenuItemStyles },
826
- React.createElement(Box, { sx: commonListItemStyles },
827
- React.createElement(ListItemIcon, null,
828
- React.createElement(VisibilityOffIcon, null)), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 :
829
- _j.replace('{column}', String(columnDef.header)))),
830
- React.createElement(MenuItem, { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
831
- .length, key: 1, onClick: handleShowAllColumns, sx: commonMenuItemStyles },
832
- React.createElement(Box, { sx: commonListItemStyles },
833
- React.createElement(ListItemIcon, null,
834
- React.createElement(ViewColumnIcon, null)), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 :
835
- _k.replace('{column}', String(columnDef.header)))),
836
- ]));
744
+ } }, { children: [(_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
745
+ closeMenu: () => setAnchorEl(null),
746
+ column,
747
+ table,
748
+ })) !== null && _c !== void 0 ? _c : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
749
+ closeMenu: () => setAnchorEl(null),
750
+ column,
751
+ table,
752
+ })) !== null && _d !== void 0 ? _d : (enableSorting &&
753
+ column.getCanSort() &&
754
+ [
755
+ enableSortingRemoval !== false && (jsx(MenuItem, Object.assign({ disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(ClearAllIcon, {}) }), localization.clearSort] })) }), 0)),
756
+ jsx(MenuItem, Object.assign({ disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] })) }), 1),
757
+ jsx(MenuItem, Object.assign({ divider: enableColumnFilters || enableGrouping || enableHiding, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(SortIcon, {}) }), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] })) }), 2),
758
+ ].filter(Boolean)), enableColumnFilters &&
759
+ column.getCanFilter() &&
760
+ [
761
+ jsx(MenuItem, Object.assign({ disabled: !column.getFilterValue(), onClick: handleClearFilter, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] })) }), 0),
762
+ jsxs(MenuItem, Object.assign({ disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
763
+ ? handleOpenFilterModeMenu
764
+ : handleFilterByColumn, sx: commonMenuItemStyles }, { children: [jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] })), showFilterModeSubMenu && (jsx(IconButton, Object.assign({ onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 } }, { children: jsx(ArrowRightIcon, {}) })))] }), 1),
765
+ showFilterModeSubMenu && (jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 2)),
766
+ ].filter(Boolean), enableGrouping &&
767
+ column.getCanGroup() && [
768
+ jsx(MenuItem, Object.assign({ divider: enablePinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(DynamicFeedIcon, {}) }), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] })) }), 0),
769
+ ], enablePinning &&
770
+ column.getCanPin() && [
771
+ jsx(MenuItem, Object.assign({ disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] })) }), 0),
772
+ jsx(MenuItem, Object.assign({ disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] })) }), 1),
773
+ jsx(MenuItem, Object.assign({ disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, {}) }), localization.unpin] })) }), 2),
774
+ ], enableColumnResizing &&
775
+ column.getCanResize() && [
776
+ jsx(MenuItem, Object.assign({ disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(RestartAltIcon, {}) }), localization.resetColumnSize] })) }), 0),
777
+ ], enableHiding && [
778
+ jsx(MenuItem, Object.assign({ disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(VisibilityOffIcon, {}) }), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 : _j.replace('{column}', String(columnDef.header))] })) }), 0),
779
+ jsx(MenuItem, Object.assign({ disabled: !Object.values(columnVisibility).filter((visible) => !visible)
780
+ .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(ViewColumnIcon, {}) }), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 : _k.replace('{column}', String(columnDef.header))] })) }), 1),
781
+ ]] })));
837
782
  };
838
783
 
839
784
  const MRT_RowActionMenu = ({ anchorEl, handleEdit, row, setAnchorEl, table, }) => {
840
785
  const { getState, options: { icons: { EditIcon }, enableEditing, localization, renderRowActionMenuItems, }, } = table;
841
786
  const { density } = getState();
842
- return (React.createElement(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), MenuListProps: {
787
+ return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), MenuListProps: {
843
788
  dense: density === 'compact',
844
- } },
845
- enableEditing instanceof Function
846
- ? enableEditing(row)
847
- : enableEditing && (React.createElement(MenuItem, { onClick: handleEdit, sx: commonMenuItemStyles },
848
- React.createElement(Box, { sx: commonListItemStyles },
849
- React.createElement(ListItemIcon, null,
850
- React.createElement(EditIcon, null)),
851
- localization.edit))), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 :
852
- renderRowActionMenuItems({
853
- row,
854
- table,
855
- closeMenu: () => setAnchorEl(null),
856
- })));
789
+ } }, { children: [enableEditing instanceof Function
790
+ ? enableEditing(row)
791
+ : enableEditing && (jsx(MenuItem, Object.assign({ onClick: handleEdit, sx: commonMenuItemStyles }, { children: jsxs(Box, Object.assign({ sx: commonListItemStyles }, { children: [jsx(ListItemIcon, { children: jsx(EditIcon, {}) }), localization.edit] })) }))), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
792
+ row,
793
+ table,
794
+ closeMenu: () => setAnchorEl(null),
795
+ })] })));
857
796
  };
858
797
 
859
798
  const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
@@ -880,15 +819,7 @@ const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
880
819
  values: (_b = editingRow === null || editingRow === void 0 ? void 0 : editingRow._valuesCache) !== null && _b !== void 0 ? _b : Object.assign({}, row.original),
881
820
  });
882
821
  };
883
- return (React.createElement(Box, { onClick: (e) => e.stopPropagation(), sx: { display: 'flex', gap: '0.75rem' } }, variant === 'icon' ? (React.createElement(React.Fragment, null,
884
- React.createElement(Tooltip, { arrow: true, title: localization.cancel },
885
- React.createElement(IconButton, { "aria-label": localization.cancel, onClick: handleCancel },
886
- React.createElement(CancelIcon, null))),
887
- React.createElement(Tooltip, { arrow: true, title: localization.save },
888
- React.createElement(IconButton, { "aria-label": localization.save, color: "info", onClick: handleSave },
889
- React.createElement(SaveIcon, null))))) : (React.createElement(React.Fragment, null,
890
- React.createElement(Button, { onClick: handleCancel }, localization.cancel),
891
- React.createElement(Button, { onClick: handleSave, variant: "contained" }, localization.save)))));
822
+ return (jsx(Box, Object.assign({ onClick: (e) => e.stopPropagation(), sx: { display: 'flex', gap: '0.75rem' } }, { children: variant === 'icon' ? (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.cancel }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.cancel, onClick: handleCancel }, { children: jsx(CancelIcon, {}) })) })), jsx(Tooltip, Object.assign({ arrow: true, title: localization.save }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.save, color: "info", onClick: handleSave }, { children: jsx(SaveIcon, {}) })) }))] })) : (jsxs(Fragment, { children: [jsx(Button, Object.assign({ onClick: handleCancel }, { children: localization.cancel })), jsx(Button, Object.assign({ onClick: handleSave, variant: "contained" }, { children: localization.save }))] })) })));
892
823
  };
893
824
 
894
825
  const commonIconButtonStyles = {
@@ -915,16 +846,10 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
915
846
  setEditingRow(Object.assign({}, row));
916
847
  setAnchorEl(null);
917
848
  };
918
- return (React.createElement(React.Fragment, null, renderRowActions ? (renderRowActions({ cell, row, table })) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (React.createElement(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
919
- (enableEditing instanceof Function
920
- ? enableEditing(row)
921
- : enableEditing) ? (React.createElement(Tooltip, { placement: "right", arrow: true, title: localization.edit },
922
- React.createElement(IconButton, { "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode },
923
- React.createElement(EditIcon, null)))) : renderRowActionMenuItems ? (React.createElement(React.Fragment, null,
924
- React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions },
925
- React.createElement(IconButton, { "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles },
926
- React.createElement(MoreHorizIcon, null))),
927
- React.createElement(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table }))) : null));
849
+ return (jsx(Fragment, { children: renderRowActions ? (renderRowActions({ cell, row, table })) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (jsx(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
850
+ (enableEditing instanceof Function
851
+ ? enableEditing(row)
852
+ : enableEditing) ? (jsx(Tooltip, Object.assign({ placement: "right", arrow: true, title: localization.edit }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode }, { children: jsx(EditIcon, {}) })) }))) : renderRowActionMenuItems ? (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles }, { children: jsx(MoreHorizIcon, {}) })) })), jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
928
853
  };
929
854
 
930
855
  const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
@@ -958,11 +883,11 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
958
883
  }, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.5rem', width: density === 'compact' ? '1.75rem' : '2.5rem', m: density !== 'compact' ? '-0.4rem' : undefined }, ((checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx) instanceof Function
959
884
  ? checkboxProps.sx(theme)
960
885
  : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))), title: undefined });
961
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
886
+ return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
962
887
  ? localization.toggleSelectAll
963
- : localization.toggleSelectRow) }, enableMultiRowSelection === false ? (React.createElement(Radio, Object.assign({}, commonProps))) : (React.createElement(Checkbox, Object.assign({ indeterminate: selectAll
964
- ? table.getIsSomeRowsSelected() && !allRowsSelected
965
- : row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps)))));
888
+ : localization.toggleSelectRow) }, { children: enableMultiRowSelection === false ? (jsx(Radio, Object.assign({}, commonProps))) : (jsx(Checkbox, Object.assign({ indeterminate: selectAll
889
+ ? table.getIsSomeRowsSelected() && !allRowsSelected
890
+ : row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps))) })));
966
891
  };
967
892
 
968
893
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -1001,24 +926,15 @@ const MRT_GlobalFilterTextField = ({ table, }) => {
1001
926
  }
1002
927
  isMounted.current = true;
1003
928
  }, [globalFilter]);
1004
- return (React.createElement(Collapse, { in: showGlobalFilter, orientation: "horizontal", unmountOnExit: true, mountOnEnter: true },
1005
- React.createElement(TextField, Object.assign({ placeholder: localization.search, onChange: handleChange, value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "standard", InputProps: {
1006
- startAdornment: enableGlobalFilterModes ? (React.createElement(InputAdornment, { position: "start" },
1007
- React.createElement(Tooltip, { arrow: true, title: localization.changeSearchMode },
1008
- React.createElement(IconButton, { "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } },
1009
- React.createElement(SearchIcon, null))))) : (React.createElement(SearchIcon, { style: { marginRight: '4px' } })),
1010
- endAdornment: (React.createElement(InputAdornment, { position: "end" },
1011
- React.createElement(Tooltip, { arrow: true, title: (_a = localization.clearSearch) !== null && _a !== void 0 ? _a : '' },
1012
- React.createElement("span", null,
1013
- React.createElement(IconButton, { "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small" },
1014
- React.createElement(CloseIcon, null)))))),
1015
- } }, textFieldProps, { inputRef: (inputRef) => {
1016
- searchInputRef.current = inputRef;
1017
- if (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputRef) {
1018
- textFieldProps.inputRef = inputRef;
1019
- }
1020
- } })),
1021
- React.createElement(MRT_FilterOptionMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table, onSelect: handleClear })));
929
+ return (jsxs(Collapse, Object.assign({ in: showGlobalFilter, orientation: "horizontal", unmountOnExit: true, mountOnEnter: true }, { children: [jsx(TextField, Object.assign({ placeholder: localization.search, onChange: handleChange, value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "standard", InputProps: {
930
+ startAdornment: enableGlobalFilterModes ? (jsx(InputAdornment, Object.assign({ position: "start" }, { children: jsx(Tooltip, Object.assign({ arrow: true, title: localization.changeSearchMode }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } }, { children: jsx(SearchIcon, {}) })) })) }))) : (jsx(SearchIcon, { style: { marginRight: '4px' } })),
931
+ endAdornment: (jsx(InputAdornment, Object.assign({ position: "end" }, { children: jsx(Tooltip, Object.assign({ arrow: true, title: (_a = localization.clearSearch) !== null && _a !== void 0 ? _a : '' }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small" }, { children: jsx(CloseIcon, {}) })) }) })) }))),
932
+ } }, textFieldProps, { inputRef: (inputRef) => {
933
+ searchInputRef.current = inputRef;
934
+ if (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputRef) {
935
+ textFieldProps.inputRef = inputRef;
936
+ }
937
+ } })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table, onSelect: handleClear })] })));
1022
938
  };
1023
939
 
1024
940
  const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
@@ -1027,13 +943,12 @@ const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
1027
943
  const linearProgressProps = muiLinearProgressProps instanceof Function
1028
944
  ? muiLinearProgressProps({ isTopToolbar, table })
1029
945
  : muiLinearProgressProps;
1030
- return (React.createElement(Collapse, { in: isLoading || showProgressBars, mountOnEnter: true, unmountOnExit: true, sx: {
946
+ return (jsx(Collapse, Object.assign({ in: isLoading || showProgressBars, mountOnEnter: true, unmountOnExit: true, sx: {
1031
947
  bottom: isTopToolbar ? 0 : undefined,
1032
948
  position: 'absolute',
1033
949
  top: !isTopToolbar ? 0 : undefined,
1034
950
  width: '100%',
1035
- } },
1036
- React.createElement(LinearProgress, Object.assign({ "aria-label": "Loading", "aria-busy": "true", sx: { position: 'relative' } }, linearProgressProps))));
951
+ } }, { children: jsx(LinearProgress, Object.assign({ "aria-label": "Loading", "aria-busy": "true", sx: { position: 'relative' } }, linearProgressProps)) })));
1037
952
  };
1038
953
 
1039
954
  const MRT_TablePagination = ({ table, position = 'bottom', }) => {
@@ -1047,7 +962,7 @@ const MRT_TablePagination = ({ table, position = 'bottom', }) => {
1047
962
  const handleChangeRowsPerPage = (event) => {
1048
963
  setPageSize(+event.target.value);
1049
964
  };
1050
- return (React.createElement(TablePagination, Object.assign({ component: "div", count: totalRowCount, getItemAriaLabel: (type) => type === 'first'
965
+ return (jsx(TablePagination, Object.assign({ component: "div", count: totalRowCount, getItemAriaLabel: (type) => type === 'first'
1051
966
  ? localization.goToFirstPage
1052
967
  : type === 'last'
1053
968
  ? localization.goToLastPage
@@ -1088,27 +1003,14 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
1088
1003
  const selectMessage = getSelectedRowModel().rows.length > 0
1089
1004
  ? (_b = (_a = localization.selectedCountOfRowCountRowsSelected) === null || _a === void 0 ? void 0 : _a.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) === null || _b === void 0 ? void 0 : _b.replace('{rowCount}', (rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length).toString())
1090
1005
  : null;
1091
- const groupedByMessage = grouping.length > 0 ? (React.createElement("span", null,
1092
- localization.groupedBy,
1093
- ' ',
1094
- grouping.map((columnId, index) => (React.createElement(Fragment, { key: `${index}-${columnId}` },
1095
- index > 0 ? localization.thenBy : '',
1096
- React.createElement(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))))))) : null;
1097
- return (React.createElement(Collapse, { in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0 },
1098
- React.createElement(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', mb: stackAlertBanner
1006
+ const groupedByMessage = grouping.length > 0 ? (jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxs(Fragment$1, { children: [index > 0 ? localization.thenBy : '', jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index}-${columnId}`)))] })) : null;
1007
+ return (jsx(Collapse, Object.assign({ in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0 }, { children: jsxs(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', mb: stackAlertBanner
1099
1008
  ? 0
1100
1009
  : positionToolbarAlertBanner === 'bottom'
1101
1010
  ? '-1rem'
1102
1011
  : undefined, right: 0, top: 0, width: '100%', zIndex: 2 }, ((alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx) instanceof Function
1103
1012
  ? alertProps.sx(theme)
1104
- : alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx))) }),
1105
- (alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && React.createElement(AlertTitle, null, alertProps.title),
1106
- React.createElement(Box, { sx: { p: '0.5rem 1rem' } }, alertProps === null || alertProps === void 0 ? void 0 :
1107
- alertProps.children,
1108
- (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectMessage || groupedByMessage) && (React.createElement("br", null)),
1109
- selectMessage,
1110
- selectMessage && groupedByMessage && React.createElement("br", null),
1111
- groupedByMessage))));
1013
+ : alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx))) }, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsx(AlertTitle, { children: alertProps.title }), jsxs(Box, Object.assign({ sx: { p: '0.5rem 1rem' } }, { children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectMessage || groupedByMessage) && (jsx("br", {})), selectMessage, selectMessage && groupedByMessage && jsx("br", {}), groupedByMessage] }))] })) })));
1112
1014
  };
1113
1015
 
1114
1016
  const MRT_FullScreenToggleButton = (_a) => {
@@ -1119,8 +1021,7 @@ const MRT_FullScreenToggleButton = (_a) => {
1119
1021
  const handleToggleFullScreen = () => {
1120
1022
  setIsFullScreen(!isFullScreen);
1121
1023
  };
1122
- return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen },
1123
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined }), isFullScreen ? React.createElement(FullscreenExitIcon, null) : React.createElement(FullscreenIcon, null))));
1024
+ return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined }, { children: isFullScreen ? jsx(FullscreenExitIcon, {}) : jsx(FullscreenIcon, {}) })) })));
1124
1025
  };
1125
1026
 
1126
1027
  const MRT_ColumnPinningButtons = ({ column, table, }) => {
@@ -1128,26 +1029,17 @@ const MRT_ColumnPinningButtons = ({ column, table, }) => {
1128
1029
  const handlePinColumn = (pinDirection) => {
1129
1030
  column.pin(pinDirection);
1130
1031
  };
1131
- return (React.createElement(Box, { sx: { minWidth: '70px', textAlign: 'center' } }, column.getIsPinned() ? (React.createElement(Tooltip, { arrow: true, title: localization.unpin },
1132
- React.createElement(IconButton, { onClick: () => handlePinColumn(false), size: "small" },
1133
- React.createElement(PushPinIcon, null)))) : (React.createElement(React.Fragment, null,
1134
- React.createElement(Tooltip, { arrow: true, title: localization.pinToLeft },
1135
- React.createElement(IconButton, { onClick: () => handlePinColumn('left'), size: "small" },
1136
- React.createElement(PushPinIcon, { style: {
1137
- transform: 'rotate(90deg)',
1138
- } }))),
1139
- React.createElement(Tooltip, { arrow: true, title: localization.pinToRight },
1140
- React.createElement(IconButton, { onClick: () => handlePinColumn('right'), size: "small" },
1141
- React.createElement(PushPinIcon, { style: {
1142
- transform: 'rotate(-90deg)',
1143
- } })))))));
1032
+ return (jsx(Box, Object.assign({ sx: { minWidth: '70px', textAlign: 'center' } }, { children: column.getIsPinned() ? (jsx(Tooltip, Object.assign({ arrow: true, title: localization.unpin }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn(false), size: "small" }, { children: jsx(PushPinIcon, {}) })) }))) : (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.pinToLeft }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn('left'), size: "small" }, { children: jsx(PushPinIcon, { style: {
1033
+ transform: 'rotate(90deg)',
1034
+ } }) })) })), jsx(Tooltip, Object.assign({ arrow: true, title: localization.pinToRight }, { children: jsx(IconButton, Object.assign({ onClick: () => handlePinColumn('right'), size: "small" }, { children: jsx(PushPinIcon, { style: {
1035
+ transform: 'rotate(-90deg)',
1036
+ } }) })) }))] })) })));
1144
1037
  };
1145
1038
 
1146
1039
  const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
1147
1040
  var _a;
1148
1041
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
1149
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.move },
1150
- React.createElement(IconButton, Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
1042
+ return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.move }, { children: jsx(IconButton, Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
1151
1043
  var _a;
1152
1044
  e.stopPropagation();
1153
1045
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, e);
@@ -1158,8 +1050,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
1158
1050
  cursor: 'grabbing',
1159
1051
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1160
1052
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
1161
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
1162
- React.createElement(DragHandleIcon, null))));
1053
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: jsx(DragHandleIcon, {}) })) })));
1163
1054
  };
1164
1055
 
1165
1056
  const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredColumn, column, table, }) => {
@@ -1200,42 +1091,35 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredCol
1200
1091
  setHoveredColumn(column);
1201
1092
  }
1202
1093
  };
1203
- return (React.createElement(React.Fragment, null,
1204
- React.createElement(MenuItem, { disableRipple: true, ref: menuItemRef, onDragEnter: handleDragEnter, sx: (theme) => ({
1205
- alignItems: 'center',
1206
- justifyContent: 'flex-start',
1207
- my: 0,
1208
- opacity: isDragging ? 0.5 : 1,
1209
- outlineOffset: '-2px',
1210
- outline: isDragging
1211
- ? `2px dashed ${theme.palette.divider}`
1212
- : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
1213
- ? `2px dashed ${theme.palette.primary.main}`
1214
- : 'none',
1215
- pl: `${(column.depth + 0.5) * 2}rem`,
1216
- py: '6px',
1217
- }) },
1218
- React.createElement(Box, { sx: {
1219
- display: 'flex',
1220
- flexWrap: 'nowrap',
1221
- gap: '8px',
1222
- } },
1223
- columnDefType !== 'group' &&
1224
- enableColumnOrdering &&
1225
- !allColumns.some((col) => col.columnDef.columnDefType === 'group') &&
1226
- (columnDef.enableColumnOrdering !== false ? (React.createElement(MRT_GrabHandleButton, { onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table })) : (React.createElement(Box, { sx: { width: '28px' } }))),
1227
- enablePinning &&
1228
- (column.getCanPin() ? (React.createElement(MRT_ColumnPinningButtons, { column: column, table: table })) : (React.createElement(Box, { sx: { width: '70px' } }))),
1229
- enableHiding ? (React.createElement(FormControlLabel, { componentsProps: {
1230
- typography: {
1231
- sx: {
1232
- mb: 0,
1233
- opacity: columnDefType !== 'display' ? 1 : 0.5,
1234
- },
1235
- },
1236
- }, checked: switchChecked, control: React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility },
1237
- React.createElement(Switch, null)), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (React.createElement(Typography, { sx: { alignSelf: 'center' } }, columnDef.header)))), (_a = column.columns) === null || _a === void 0 ? void 0 :
1238
- _a.map((c, i) => (React.createElement(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, key: `${i}-${c.id}`, setHoveredColumn: setHoveredColumn, table: table })))));
1094
+ return (jsxs(Fragment, { children: [jsx(MenuItem, Object.assign({ disableRipple: true, ref: menuItemRef, onDragEnter: handleDragEnter, sx: (theme) => ({
1095
+ alignItems: 'center',
1096
+ justifyContent: 'flex-start',
1097
+ my: 0,
1098
+ opacity: isDragging ? 0.5 : 1,
1099
+ outlineOffset: '-2px',
1100
+ outline: isDragging
1101
+ ? `2px dashed ${theme.palette.divider}`
1102
+ : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
1103
+ ? `2px dashed ${theme.palette.primary.main}`
1104
+ : 'none',
1105
+ pl: `${(column.depth + 0.5) * 2}rem`,
1106
+ py: '6px',
1107
+ }) }, { children: jsxs(Box, Object.assign({ sx: {
1108
+ display: 'flex',
1109
+ flexWrap: 'nowrap',
1110
+ gap: '8px',
1111
+ } }, { children: [columnDefType !== 'group' &&
1112
+ enableColumnOrdering &&
1113
+ !allColumns.some((col) => col.columnDef.columnDefType === 'group') &&
1114
+ (columnDef.enableColumnOrdering !== false ? (jsx(MRT_GrabHandleButton, { onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table })) : (jsx(Box, { sx: { width: '28px' } }))), enablePinning &&
1115
+ (column.getCanPin() ? (jsx(MRT_ColumnPinningButtons, { column: column, table: table })) : (jsx(Box, { sx: { width: '70px' } }))), enableHiding ? (jsx(FormControlLabel, { componentsProps: {
1116
+ typography: {
1117
+ sx: {
1118
+ mb: 0,
1119
+ opacity: columnDefType !== 'display' ? 1 : 0.5,
1120
+ },
1121
+ },
1122
+ }, checked: switchChecked, control: jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility }, { children: jsx(Switch, {}) })), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsx(Typography, Object.assign({ sx: { alignSelf: 'center' } }, { children: columnDef.header })))] })) })), (_a = column.columns) === null || _a === void 0 ? void 0 : _a.map((c, i) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
1239
1123
  };
1240
1124
 
1241
1125
  const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
@@ -1266,21 +1150,14 @@ const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
1266
1150
  getRightLeafColumns(),
1267
1151
  ]);
1268
1152
  const [hoveredColumn, setHoveredColumn] = useState(null);
1269
- return (React.createElement(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
1153
+ return (jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
1270
1154
  dense: density === 'compact',
1271
- } },
1272
- React.createElement(Box, { sx: {
1273
- display: 'flex',
1274
- justifyContent: 'space-between',
1275
- p: '0.5rem',
1276
- pt: 0,
1277
- } },
1278
- enableHiding && (React.createElement(Button, { disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns }, localization.hideAll)),
1279
- enableColumnOrdering && (React.createElement(Button, { onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)) }, localization.resetOrder)),
1280
- enablePinning && (React.createElement(Button, { disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true) }, localization.unpinAll)),
1281
- enableHiding && (React.createElement(Button, { disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true) }, localization.showAll))),
1282
- React.createElement(Divider, null),
1283
- allColumns.map((column, index) => (React.createElement(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, key: `${index}-${column.id}`, setHoveredColumn: setHoveredColumn, table: table })))));
1155
+ } }, { children: [jsxs(Box, Object.assign({ sx: {
1156
+ display: 'flex',
1157
+ justifyContent: 'space-between',
1158
+ p: '0.5rem',
1159
+ pt: 0,
1160
+ } }, { children: [enableHiding && (jsx(Button, Object.assign({ disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns }, { children: localization.hideAll }))), enableColumnOrdering && (jsx(Button, Object.assign({ onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)) }, { children: localization.resetOrder }))), enablePinning && (jsx(Button, Object.assign({ disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true) }, { children: localization.unpinAll }))), enableHiding && (jsx(Button, Object.assign({ disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true) }, { children: localization.showAll })))] })), jsx(Divider, {}), allColumns.map((column, index) => (jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] })));
1284
1161
  };
1285
1162
 
1286
1163
  const MRT_ShowHideColumnsButton = (_a) => {
@@ -1291,11 +1168,7 @@ const MRT_ShowHideColumnsButton = (_a) => {
1291
1168
  const handleClick = (event) => {
1292
1169
  setAnchorEl(event.currentTarget);
1293
1170
  };
1294
- return (React.createElement(React.Fragment, null,
1295
- React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns },
1296
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined }),
1297
- React.createElement(ViewColumnIcon, null))),
1298
- anchorEl && (React.createElement(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))));
1171
+ return (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined }, { children: jsx(ViewColumnIcon, {}) })) })), anchorEl && (jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
1299
1172
  };
1300
1173
 
1301
1174
  const MRT_ToggleDensePaddingButton = (_a) => {
@@ -1311,8 +1184,7 @@ const MRT_ToggleDensePaddingButton = (_a) => {
1311
1184
  : 'comfortable';
1312
1185
  setDensity(nextDensity);
1313
1186
  };
1314
- return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity },
1315
- React.createElement(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined }), density === 'compact' ? (React.createElement(DensitySmallIcon, null)) : density === 'comfortable' ? (React.createElement(DensityMediumIcon, null)) : (React.createElement(DensityLargeIcon, null)))));
1187
+ return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined }, { children: density === 'compact' ? (jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsx(DensityMediumIcon, {})) : (jsx(DensityLargeIcon, {})) })) })));
1316
1188
  };
1317
1189
 
1318
1190
  const MRT_ToggleFiltersButton = (_a) => {
@@ -1323,8 +1195,7 @@ const MRT_ToggleFiltersButton = (_a) => {
1323
1195
  const handleToggleShowFilters = () => {
1324
1196
  setShowColumnFilters(!showColumnFilters);
1325
1197
  };
1326
- return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters },
1327
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined }), showColumnFilters ? React.createElement(FilterListOffIcon, null) : React.createElement(FilterListIcon, null))));
1198
+ return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined }, { children: showColumnFilters ? jsx(FilterListOffIcon, {}) : jsx(FilterListIcon, {}) })) })));
1328
1199
  };
1329
1200
 
1330
1201
  const MRT_ToggleGlobalFilterButton = (_a) => {
@@ -1336,27 +1207,21 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
1336
1207
  setShowGlobalFilter(!showGlobalFilter);
1337
1208
  queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
1338
1209
  };
1339
- return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch },
1340
- React.createElement(IconButton, Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined }), showGlobalFilter ? React.createElement(SearchOffIcon, null) : React.createElement(SearchIcon, null))));
1210
+ return (jsx(Tooltip, Object.assign({ arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch }, { children: jsx(IconButton, Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined }, { children: showGlobalFilter ? jsx(SearchOffIcon, {}) : jsx(SearchIcon, {}) })) })));
1341
1211
  };
1342
1212
 
1343
1213
  const MRT_ToolbarInternalButtons = ({ table, }) => {
1344
1214
  var _a;
1345
1215
  const { options: { enableColumnFilters, enableColumnOrdering, enableDensityToggle, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableHiding, enablePinning, initialState, renderToolbarInternalActions, }, } = table;
1346
- return (React.createElement(Box, { sx: {
1216
+ return (jsx(Box, Object.assign({ sx: {
1347
1217
  alignItems: 'center',
1348
1218
  display: 'flex',
1349
1219
  zIndex: 3,
1350
- } }, (_a = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
1351
- table,
1352
- })) !== null && _a !== void 0 ? _a : (React.createElement(React.Fragment, null,
1353
- enableFilters &&
1354
- enableGlobalFilter &&
1355
- !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (React.createElement(MRT_ToggleGlobalFilterButton, { table: table })),
1356
- enableFilters && enableColumnFilters && (React.createElement(MRT_ToggleFiltersButton, { table: table })),
1357
- (enableHiding || enableColumnOrdering || enablePinning) && (React.createElement(MRT_ShowHideColumnsButton, { table: table })),
1358
- enableDensityToggle && (React.createElement(MRT_ToggleDensePaddingButton, { table: table })),
1359
- enableFullScreenToggle && (React.createElement(MRT_FullScreenToggleButton, { table: table }))))));
1220
+ } }, { children: (_a = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
1221
+ table,
1222
+ })) !== null && _a !== void 0 ? _a : (jsxs(Fragment, { children: [enableFilters &&
1223
+ enableGlobalFilter &&
1224
+ !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (jsx(MRT_ToggleGlobalFilterButton, { table: table })), enableFilters && enableColumnFilters && (jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enablePinning) && (jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsx(MRT_FullScreenToggleButton, { table: table }))] })) })));
1360
1225
  };
1361
1226
 
1362
1227
  const MRT_ToolbarDropZone = ({ table, }) => {
@@ -1375,8 +1240,7 @@ const MRT_ToolbarDropZone = ({ table, }) => {
1375
1240
  !grouping.includes(draggingColumn.id));
1376
1241
  }
1377
1242
  }, [enableGrouping, draggingColumn, grouping]);
1378
- return (React.createElement(Fade, { in: showToolbarDropZone },
1379
- React.createElement(Box, { className: "Mui-ToolbarDropZone", sx: (theme) => ({
1243
+ return (jsx(Fade, Object.assign({ in: showToolbarDropZone }, { children: jsx(Box, Object.assign({ className: "Mui-ToolbarDropZone", sx: (theme) => ({
1380
1244
  alignItems: 'center',
1381
1245
  backgroundColor: alpha(theme.palette.info.main, (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone' ? 0.2 : 0.1),
1382
1246
  backdropFilter: 'blur(4px)',
@@ -1388,8 +1252,7 @@ const MRT_ToolbarDropZone = ({ table, }) => {
1388
1252
  position: 'absolute',
1389
1253
  width: '100%',
1390
1254
  zIndex: 4,
1391
- }), onDragEnter: handleDragEnter },
1392
- React.createElement(Typography, { fontStyle: "italic" }, localization.dropToGroupBy.replace('{column}', (_b = (_a = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _a === void 0 ? void 0 : _a.header) !== null && _b !== void 0 ? _b : '')))));
1255
+ }), onDragEnter: handleDragEnter }, { children: jsx(Typography, Object.assign({ fontStyle: "italic" }, { children: localization.dropToGroupBy.replace('{column}', (_b = (_a = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _a === void 0 ? void 0 : _a.header) !== null && _b !== void 0 ? _b : '') })) })) })));
1393
1256
  };
1394
1257
 
1395
1258
  const commonToolbarStyles = ({ theme }) => ({
@@ -1413,7 +1276,7 @@ const MRT_TopToolbar = ({ table, }) => {
1413
1276
  ? muiTopToolbarProps({ table })
1414
1277
  : muiTopToolbarProps;
1415
1278
  const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter;
1416
- return (React.createElement(Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (ref) => {
1279
+ return (jsxs(Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (ref) => {
1417
1280
  topToolbarRef.current = ref;
1418
1281
  if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
1419
1282
  // @ts-ignore
@@ -1421,32 +1284,23 @@ const MRT_TopToolbar = ({ table, }) => {
1421
1284
  }
1422
1285
  }, sx: (theme) => (Object.assign(Object.assign({ position: isFullScreen ? 'sticky' : undefined, top: isFullScreen ? '0' : undefined }, commonToolbarStyles({ theme })), ((toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx) instanceof Function
1423
1286
  ? toolbarProps.sx(theme)
1424
- : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }),
1425
- positionToolbarAlertBanner === 'top' && (React.createElement(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })),
1426
- ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (React.createElement(MRT_ToolbarDropZone, { table: table })),
1427
- React.createElement(Box, { sx: {
1428
- alignItems: 'flex-start',
1429
- boxSizing: 'border-box',
1430
- display: 'flex',
1431
- justifyContent: 'space-between',
1432
- p: '0.5rem',
1433
- position: stackAlertBanner ? 'relative' : 'absolute',
1434
- right: 0,
1435
- top: 0,
1436
- width: '100%',
1437
- } },
1438
- enableGlobalFilter && positionGlobalFilter === 'left' && (React.createElement(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : React.createElement("span", null),
1439
- enableToolbarInternalActions ? (React.createElement(Box, { sx: {
1287
+ : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }, { children: [positionToolbarAlertBanner === 'top' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, Object.assign({ sx: {
1288
+ alignItems: 'flex-start',
1289
+ boxSizing: 'border-box',
1440
1290
  display: 'flex',
1441
- flexWrap: 'wrap-reverse',
1442
- justifyContent: 'flex-end',
1443
- } },
1444
- enableGlobalFilter && positionGlobalFilter === 'right' && (React.createElement(MRT_GlobalFilterTextField, { table: table })),
1445
- React.createElement(MRT_ToolbarInternalButtons, { table: table }))) : (enableGlobalFilter &&
1446
- positionGlobalFilter === 'right' && (React.createElement(MRT_GlobalFilterTextField, { table: table })))),
1447
- enablePagination &&
1448
- ['top', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (React.createElement(MRT_TablePagination, { table: table, position: "top" })),
1449
- React.createElement(MRT_LinearProgressBar, { isTopToolbar: true, table: table })));
1291
+ justifyContent: 'space-between',
1292
+ p: '0.5rem',
1293
+ position: stackAlertBanner ? 'relative' : 'absolute',
1294
+ right: 0,
1295
+ top: 0,
1296
+ width: '100%',
1297
+ } }, { children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsx("span", {}), enableToolbarInternalActions ? (jsxs(Box, Object.assign({ sx: {
1298
+ display: 'flex',
1299
+ flexWrap: 'wrap-reverse',
1300
+ justifyContent: 'flex-end',
1301
+ } }, { children: [enableGlobalFilter && positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })), jsx(MRT_ToolbarInternalButtons, { table: table })] }))) : (enableGlobalFilter &&
1302
+ positionGlobalFilter === 'right' && (jsx(MRT_GlobalFilterTextField, { table: table })))] })), enablePagination &&
1303
+ ['top', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsx(MRT_TablePagination, { table: table, position: "top" })), jsx(MRT_LinearProgressBar, { isTopToolbar: true, table: table })] })));
1450
1304
  };
1451
1305
 
1452
1306
  const MRT_BottomToolbar = ({ table, }) => {
@@ -1457,7 +1311,7 @@ const MRT_BottomToolbar = ({ table, }) => {
1457
1311
  ? muiBottomToolbarProps({ table })
1458
1312
  : muiBottomToolbarProps;
1459
1313
  const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
1460
- return (React.createElement(Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (node) => {
1314
+ return (jsxs(Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (node) => {
1461
1315
  if (node) {
1462
1316
  bottomToolbarRef.current = node;
1463
1317
  if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
@@ -1467,27 +1321,21 @@ const MRT_BottomToolbar = ({ table, }) => {
1467
1321
  }
1468
1322
  }, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, commonToolbarStyles({ theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${alpha(theme.palette.common.black, 0.1)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), ((toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx) instanceof Function
1469
1323
  ? toolbarProps.sx(theme)
1470
- : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }),
1471
- React.createElement(MRT_LinearProgressBar, { isTopToolbar: false, table: table }),
1472
- positionToolbarAlertBanner === 'bottom' && (React.createElement(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })),
1473
- ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (React.createElement(MRT_ToolbarDropZone, { table: table })),
1474
- React.createElement(Box, { sx: {
1475
- alignItems: 'center',
1476
- boxSizing: 'border-box',
1477
- display: 'flex',
1478
- justifyContent: 'space-between',
1479
- p: '0.5rem',
1480
- width: '100%',
1481
- } },
1482
- renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (React.createElement("span", null)),
1483
- React.createElement(Box, { sx: {
1324
+ : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }, { children: [jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsx(MRT_ToolbarDropZone, { table: table })), jsxs(Box, Object.assign({ sx: {
1325
+ alignItems: 'center',
1326
+ boxSizing: 'border-box',
1484
1327
  display: 'flex',
1485
- justifyContent: 'flex-end',
1486
- position: stackAlertBanner ? 'relative' : 'absolute',
1487
- right: 0,
1488
- top: 0,
1489
- } }, enablePagination &&
1490
- ['bottom', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (React.createElement(MRT_TablePagination, { table: table, position: "bottom" }))))));
1328
+ justifyContent: 'space-between',
1329
+ p: '0.5rem',
1330
+ width: '100%',
1331
+ } }, { children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsx("span", {})), jsx(Box, Object.assign({ sx: {
1332
+ display: 'flex',
1333
+ justifyContent: 'flex-end',
1334
+ position: stackAlertBanner ? 'relative' : 'absolute',
1335
+ right: 0,
1336
+ top: 0,
1337
+ } }, { children: enablePagination &&
1338
+ ['bottom', 'both'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsx(MRT_TablePagination, { table: table, position: "bottom" })) }))] }))] })));
1491
1339
  };
1492
1340
 
1493
1341
  const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
@@ -1511,15 +1359,11 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1511
1359
  })
1512
1360
  : columnDef.muiTableHeadCellColumnActionsButtonProps;
1513
1361
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1514
- return (React.createElement(React.Fragment, null,
1515
- React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions },
1516
- React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-8px -4px', opacity: 0.5, transform: 'scale(0.85) translateX(-4px)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1517
- opacity: 1,
1518
- } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1519
- ? iconButtonProps.sx(theme)
1520
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
1521
- React.createElement(MoreVertIcon, null))),
1522
- anchorEl && (React.createElement(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))));
1362
+ return (jsxs(Fragment, { children: [jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions }, { children: jsx(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-8px -4px', opacity: 0.5, transform: 'scale(0.85) translateX(-4px)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1363
+ opacity: 1,
1364
+ } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1365
+ ? iconButtonProps.sx(theme)
1366
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }, { children: jsx(MoreVertIcon, {}) })) })), anchorEl && (jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1523
1367
  };
1524
1368
 
1525
1369
  const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
@@ -1642,100 +1486,83 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1642
1486
  isMounted.current = true;
1643
1487
  }, [column.getFilterValue()]);
1644
1488
  if (columnDef.Filter) {
1645
- return (React.createElement(React.Fragment, null, (_f = columnDef.Filter) === null || _f === void 0 ? void 0 : _f.call(columnDef, { column, header, rangeFilterIndex, table })));
1489
+ return (jsx(Fragment, { children: (_f = columnDef.Filter) === null || _f === void 0 ? void 0 : _f.call(columnDef, { column, header, rangeFilterIndex, table }) }));
1646
1490
  }
1647
- return (React.createElement(React.Fragment, null,
1648
- React.createElement(TextField, Object.assign({ fullWidth: true, inputProps: {
1649
- disabled: !!filterChipLabel,
1650
- sx: {
1651
- textOverflow: 'ellipsis',
1652
- width: filterChipLabel ? 0 : undefined,
1653
- },
1654
- title: filterPlaceholder,
1655
- }, helperText: showChangeModeButton ? (React.createElement("label", null, localization.filterMode.replace('{filterType}',
1656
- // @ts-ignore
1657
- localization[`filter${((_g = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _g === void 0 ? void 0 : _g.toUpperCase()) +
1658
- (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]))) : null, FormHelperTextProps: {
1659
- sx: {
1660
- fontSize: '0.75rem',
1661
- lineHeight: '0.8rem',
1662
- whiteSpace: 'nowrap',
1663
- },
1664
- }, margin: "none", placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1665
- ? undefined
1666
- : filterPlaceholder, onChange: handleChange, onClick: (e) => e.stopPropagation(), select: isSelectFilter || isMultiSelectFilter, value: filterValue !== null && filterValue !== void 0 ? filterValue : '', variant: "standard", InputProps: {
1667
- startAdornment: showChangeModeButton ? (React.createElement(InputAdornment, { position: "start" },
1668
- React.createElement(Tooltip, { arrow: true, title: localization.changeFilterMode },
1669
- React.createElement("span", null,
1670
- React.createElement(IconButton, { "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } },
1671
- React.createElement(FilterListIcon, null)))),
1672
- filterChipLabel && (React.createElement(Chip, { onDelete: handleClearEmptyFilterChip, label: filterChipLabel })))) : null,
1673
- endAdornment: !filterChipLabel && (React.createElement(InputAdornment, { position: "end" },
1674
- React.createElement(Tooltip, { arrow: true, placement: "right", title: (_h = localization.clearFilter) !== null && _h !== void 0 ? _h : '' },
1675
- React.createElement("span", null,
1676
- React.createElement(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: {
1677
- height: '1.75rem',
1678
- width: '1.75rem',
1679
- } },
1680
- React.createElement(CloseIcon, null)))))),
1681
- }, SelectProps: {
1682
- displayEmpty: true,
1683
- multiple: isMultiSelectFilter,
1684
- renderValue: isMultiSelectFilter
1685
- ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (React.createElement(Box, { sx: { opacity: 0.5 } }, filterPlaceholder)) : (React.createElement(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, selected === null || selected === void 0 ? void 0 : selected.map((value) => {
1491
+ return (jsxs(Fragment, { children: [jsxs(TextField, Object.assign({ fullWidth: true, inputProps: {
1492
+ disabled: !!filterChipLabel,
1493
+ sx: {
1494
+ textOverflow: 'ellipsis',
1495
+ width: filterChipLabel ? 0 : undefined,
1496
+ },
1497
+ title: filterPlaceholder,
1498
+ }, helperText: showChangeModeButton ? (jsx("label", { children: localization.filterMode.replace('{filterType}',
1499
+ // @ts-ignore
1500
+ localization[`filter${((_g = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _g === void 0 ? void 0 : _g.toUpperCase()) +
1501
+ (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null, FormHelperTextProps: {
1502
+ sx: {
1503
+ fontSize: '0.75rem',
1504
+ lineHeight: '0.8rem',
1505
+ whiteSpace: 'nowrap',
1506
+ },
1507
+ }, margin: "none", placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1508
+ ? undefined
1509
+ : filterPlaceholder, onChange: handleChange, onClick: (e) => e.stopPropagation(), select: isSelectFilter || isMultiSelectFilter, value: filterValue !== null && filterValue !== void 0 ? filterValue : '', variant: "standard", InputProps: {
1510
+ startAdornment: showChangeModeButton ? (jsxs(InputAdornment, Object.assign({ position: "start" }, { children: [jsx(Tooltip, Object.assign({ arrow: true, title: localization.changeFilterMode }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' } }, { children: jsx(FilterListIcon, {}) })) }) })), filterChipLabel && (jsx(Chip, { onDelete: handleClearEmptyFilterChip, label: filterChipLabel }))] }))) : null,
1511
+ endAdornment: !filterChipLabel && (jsx(InputAdornment, Object.assign({ position: "end" }, { children: jsx(Tooltip, Object.assign({ arrow: true, placement: "right", title: (_h = localization.clearFilter) !== null && _h !== void 0 ? _h : '' }, { children: jsx("span", { children: jsx(IconButton, Object.assign({ "aria-label": localization.clearFilter, disabled: !((_j = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _j === void 0 ? void 0 : _j.length), onClick: handleClear, size: "small", sx: {
1512
+ height: '1.75rem',
1513
+ width: '1.75rem',
1514
+ } }, { children: jsx(CloseIcon, {}) })) }) })) }))),
1515
+ }, SelectProps: {
1516
+ displayEmpty: true,
1517
+ multiple: isMultiSelectFilter,
1518
+ renderValue: isMultiSelectFilter
1519
+ ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsx(Box, Object.assign({ sx: { opacity: 0.5 } }, { children: filterPlaceholder }))) : (jsx(Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, { children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
1520
+ var _a;
1521
+ const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
1522
+ ? option.value === value
1523
+ : option === value);
1524
+ return (jsx(Chip, { label: selectedValue instanceof Object
1525
+ ? selectedValue.text
1526
+ : selectedValue }, value));
1527
+ }) })))
1528
+ : undefined,
1529
+ } }, textFieldProps, { inputRef: (inputRef) => {
1530
+ filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
1531
+ inputRef;
1532
+ if (textFieldProps.inputRef) {
1533
+ textFieldProps.inputRef = inputRef;
1534
+ }
1535
+ }, sx: (theme) => (Object.assign({ p: 0, minWidth: isRangeFilter
1536
+ ? '100px'
1537
+ : !filterChipLabel
1538
+ ? '120px'
1539
+ : 'auto', width: 'calc(100% + 4px)', mx: '-2px', '& .MuiSelect-icon': {
1540
+ mr: '1.5rem',
1541
+ } }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
1542
+ ? textFieldProps.sx(theme)
1543
+ : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))) }, { children: [(isSelectFilter || isMultiSelectFilter) && (jsx(MenuItem, Object.assign({ divider: true, disabled: true, hidden: true, value: "" }, { children: jsx(Box, Object.assign({ sx: { opacity: 0.5 } }, { children: filterPlaceholder })) }))), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : (_l = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null || _l === void 0 ? void 0 : _l.map((option) => {
1686
1544
  var _a;
1687
- const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
1688
- ? option.value === value
1689
- : option === value);
1690
- return (React.createElement(Chip, { key: value, label: selectedValue instanceof Object
1691
- ? selectedValue.text
1692
- : selectedValue }));
1693
- })))
1694
- : undefined,
1695
- } }, textFieldProps, { inputRef: (inputRef) => {
1696
- filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
1697
- inputRef;
1698
- if (textFieldProps.inputRef) {
1699
- textFieldProps.inputRef = inputRef;
1700
- }
1701
- }, sx: (theme) => (Object.assign({ p: 0, minWidth: isRangeFilter
1702
- ? '100px'
1703
- : !filterChipLabel
1704
- ? '120px'
1705
- : 'auto', width: 'calc(100% + 4px)', mx: '-2px', '& .MuiSelect-icon': {
1706
- mr: '1.5rem',
1707
- } }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
1708
- ? textFieldProps.sx(theme)
1709
- : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))) }),
1710
- (isSelectFilter || isMultiSelectFilter) && (React.createElement(MenuItem, { divider: true, disabled: true, hidden: true, value: "" },
1711
- React.createElement(Box, { sx: { opacity: 0.5 } }, filterPlaceholder))), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : (_l = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null || _l === void 0 ? void 0 : _l.map((option) => {
1712
- var _a;
1713
- let value;
1714
- let text;
1715
- if (typeof option !== 'object') {
1716
- value = option;
1717
- text = option;
1718
- }
1719
- else {
1720
- value = option.value;
1721
- text = option.text;
1722
- }
1723
- return (React.createElement(MenuItem, { key: value, sx: {
1724
- display: 'flex',
1725
- m: 0,
1726
- alignItems: 'center',
1727
- gap: '0.5rem',
1728
- }, value: value },
1729
- isMultiSelectFilter && (React.createElement(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })),
1730
- text));
1731
- })),
1732
- React.createElement(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })));
1545
+ let value;
1546
+ let text;
1547
+ if (typeof option !== 'object') {
1548
+ value = option;
1549
+ text = option;
1550
+ }
1551
+ else {
1552
+ value = option.value;
1553
+ text = option.text;
1554
+ }
1555
+ return (jsxs(MenuItem, Object.assign({ sx: {
1556
+ display: 'flex',
1557
+ m: 0,
1558
+ alignItems: 'center',
1559
+ gap: '0.5rem',
1560
+ }, value: value }, { children: [isMultiSelectFilter && (jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text] }), value));
1561
+ })] })), jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })] }));
1733
1562
  };
1734
1563
 
1735
1564
  const MRT_FilterRangeFields = ({ header, table }) => {
1736
- return (React.createElement(Box, { sx: { display: 'grid', gridTemplateColumns: '6fr 6fr', gap: '1rem' } },
1737
- React.createElement(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }),
1738
- React.createElement(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })));
1565
+ return (jsxs(Box, Object.assign({ sx: { display: 'grid', gridTemplateColumns: '6fr 6fr', gap: '1rem' } }, { children: [jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] })));
1739
1566
  };
1740
1567
 
1741
1568
  const MRT_FilterCheckbox = ({ column, table }) => {
@@ -1757,8 +1584,7 @@ const MRT_FilterCheckbox = ({ column, table }) => {
1757
1584
  : columnDef.muiTableHeadCellFilterCheckboxProps;
1758
1585
  const checkboxProps = Object.assign(Object.assign({}, mTableHeadCellFilterCheckboxProps), mcTableHeadCellFilterCheckboxProps);
1759
1586
  const filterLabel = (_a = localization.filterByColumn) === null || _a === void 0 ? void 0 : _a.replace('{column}', columnDef.header);
1760
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : filterLabel },
1761
- React.createElement(FormControlLabel, { control: React.createElement(Checkbox, Object.assign({ checked: column.getFilterValue() === 'true', indeterminate: column.getFilterValue() === undefined, color: column.getFilterValue() === undefined ? 'default' : 'primary', size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onClick: (e) => {
1587
+ return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : filterLabel }, { children: jsx(FormControlLabel, { control: jsx(Checkbox, Object.assign({ checked: column.getFilterValue() === 'true', indeterminate: column.getFilterValue() === undefined, color: column.getFilterValue() === undefined ? 'default' : 'primary', size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onClick: (e) => {
1762
1588
  var _a;
1763
1589
  e.stopPropagation();
1764
1590
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
@@ -1772,7 +1598,7 @@ const MRT_FilterCheckbox = ({ column, table }) => {
1772
1598
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e, checked);
1773
1599
  }, sx: (theme) => (Object.assign({ height: '2.5rem', width: '2.5rem' }, ((checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx) instanceof Function
1774
1600
  ? checkboxProps.sx(theme)
1775
- : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', mt: '-4px', fontWeight: 'normal' }, title: undefined })));
1601
+ : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', mt: '-4px', fontWeight: 'normal' }, title: undefined }) })));
1776
1602
  };
1777
1603
 
1778
1604
  const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
@@ -1780,8 +1606,8 @@ const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
1780
1606
  const { showColumnFilters } = getState();
1781
1607
  const { column } = header;
1782
1608
  const { columnDef } = column;
1783
- return (React.createElement(Collapse, { in: showColumnFilters, mountOnEnter: true, unmountOnExit: true }, columnDef.filterVariant === 'checkbox' ? (React.createElement(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range' ||
1784
- ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (React.createElement(MRT_FilterRangeFields, { header: header, table: table })) : (React.createElement(MRT_FilterTextField, { header: header, table: table }))));
1609
+ return (jsx(Collapse, Object.assign({ in: showColumnFilters, mountOnEnter: true, unmountOnExit: true }, { children: columnDef.filterVariant === 'checkbox' ? (jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range' ||
1610
+ ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsx(MRT_FilterTextField, { header: header, table: table })) })));
1785
1611
  };
1786
1612
 
1787
1613
  const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
@@ -1802,12 +1628,9 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1802
1628
  ? column.getFilterValue().join(`" ${isRangeFilter ? localization.and : localization.or} "`)
1803
1629
  : column.getFilterValue()}"`)
1804
1630
  .replace('" "', '');
1805
- return (React.createElement(Grow, { unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
1631
+ return (jsx(Grow, Object.assign({ unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
1806
1632
  (isRangeFilter && // @ts-ignore
1807
- (!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))) },
1808
- React.createElement(Box, { component: "span", sx: { flex: '0 0' } },
1809
- React.createElement(Tooltip, { arrow: true, placement: "top", title: filterTooltip },
1810
- React.createElement(IconButton, { disableRipple: true, onClick: (event) => {
1633
+ (!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))) }, { children: jsx(Box, Object.assign({ component: "span", sx: { flex: '0 0' } }, { children: jsx(Tooltip, Object.assign({ arrow: true, placement: "top", title: filterTooltip }, { children: jsx(IconButton, Object.assign({ disableRipple: true, onClick: (event) => {
1811
1634
  setShowColumnFilters(true);
1812
1635
  queueMicrotask(() => {
1813
1636
  var _a, _b;
@@ -1822,8 +1645,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1822
1645
  p: '2px',
1823
1646
  transform: 'scale(0.66)',
1824
1647
  width: '12px',
1825
- } },
1826
- React.createElement(FilterAltIcon, null))))));
1648
+ } }, { children: jsx(FilterAltIcon, {}) })) })) })) })));
1827
1649
  };
1828
1650
 
1829
1651
  const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
@@ -1857,7 +1679,7 @@ const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
1857
1679
  setDraggingColumn(null);
1858
1680
  setHoveredColumn(null);
1859
1681
  };
1860
- return (React.createElement(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragStart: handleDragStart, onDragEnd: handleDragEnd, table: table }));
1682
+ return (jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragStart: handleDragStart, onDragEnd: handleDragEnd, table: table }));
1861
1683
  };
1862
1684
 
1863
1685
  const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
@@ -1865,7 +1687,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1865
1687
  const { getState, options: { columnResizeMode }, setColumnSizingInfo, } = table;
1866
1688
  const { density } = getState();
1867
1689
  const { column } = header;
1868
- return (React.createElement(Box, { className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
1690
+ return (jsx(Box, Object.assign({ className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
1869
1691
  setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
1870
1692
  column.resetSize();
1871
1693
  }, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), sx: (theme) => ({
@@ -1882,8 +1704,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1882
1704
  transform: column.getIsResizing() && columnResizeMode === 'onEnd'
1883
1705
  ? `translateX(${(_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0}px)`
1884
1706
  : undefined,
1885
- } },
1886
- React.createElement(Divider, { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1707
+ } }, { children: jsx(Divider, { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1887
1708
  borderRadius: '2px',
1888
1709
  borderWidth: '2px',
1889
1710
  height: '24px',
@@ -1893,7 +1714,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1893
1714
  : 'all 150ms ease-in-out',
1894
1715
  userSelect: 'none',
1895
1716
  zIndex: 4,
1896
- } })));
1717
+ } }) })));
1897
1718
  };
1898
1719
 
1899
1720
  const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
@@ -1906,9 +1727,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1906
1727
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
1907
1728
  : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
1908
1729
  : localization.unsorted;
1909
- return (React.createElement(Tooltip, { arrow: true, placement: "top", title: sortTooltip },
1910
- React.createElement(Badge, { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular" },
1911
- React.createElement(TableSortLabel, { "aria-label": sortTooltip, active: !!column.getIsSorted(), direction: column.getIsSorted()
1730
+ return (jsx(Tooltip, Object.assign({ arrow: true, placement: "top", title: sortTooltip }, { children: jsx(Badge, Object.assign({ badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular" }, { children: jsx(TableSortLabel, { "aria-label": sortTooltip, active: !!column.getIsSorted(), direction: column.getIsSorted()
1912
1731
  ? column.getIsSorted()
1913
1732
  : undefined, sx: {
1914
1733
  flex: '0 0',
@@ -1920,7 +1739,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1920
1739
  var _a;
1921
1740
  e.stopPropagation();
1922
1741
  (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(e);
1923
- } }))));
1742
+ } }) })) })));
1924
1743
  };
1925
1744
 
1926
1745
  const MRT_TableHeadCell = ({ header, table }) => {
@@ -1984,7 +1803,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
1984
1803
  table,
1985
1804
  })
1986
1805
  : (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header) !== null && _b !== void 0 ? _b : columnDef.header;
1987
- return (React.createElement(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
1806
+ return (jsxs(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
1988
1807
  if (node) {
1989
1808
  tableHeadCellRefs.current[column.id] = node;
1990
1809
  }
@@ -2014,49 +1833,39 @@ const MRT_TableHeadCell = ({ header, table }) => {
2014
1833
  table,
2015
1834
  tableCellProps,
2016
1835
  theme,
2017
- })), draggingBorders)) }),
2018
- header.isPlaceholder ? null : (React.createElement(Box, { className: "Mui-TableHeadCell-Content", sx: {
2019
- alignItems: 'center',
2020
- display: 'flex',
2021
- flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2022
- justifyContent: columnDefType === 'group' || (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2023
- ? 'center'
2024
- : column.getCanResize()
2025
- ? 'space-between'
2026
- : 'flex-start',
2027
- position: 'relative',
2028
- width: '100%',
2029
- } },
2030
- React.createElement(Box, { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
1836
+ })), draggingBorders)) }, { children: [header.isPlaceholder ? null : (jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content", sx: {
2031
1837
  alignItems: 'center',
2032
- cursor: column.getCanSort() && columnDefType !== 'group'
2033
- ? 'pointer'
2034
- : undefined,
2035
1838
  display: 'flex',
2036
1839
  flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2037
- overflow: columnDefType === 'data' ? 'hidden' : undefined,
2038
- pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2039
- ? `${headerPL}rem`
2040
- : undefined,
2041
- } },
2042
- React.createElement(Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
2043
- minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
2044
- overflow: columnDefType === 'data' ? 'hidden' : undefined,
2045
- textOverflow: 'ellipsis',
2046
- whiteSpace: ((_g = (_f = columnDef.header) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) < 20 ? 'nowrap' : 'normal',
2047
- '&:hover': {
2048
- textOverflow: 'clip',
2049
- },
2050
- }, title: columnDefType === 'data' ? columnDef.header : undefined }, headerElement),
2051
- column.getCanSort() && (React.createElement(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })),
2052
- column.getCanFilter() && (React.createElement(MRT_TableHeadCellFilterLabel, { header: header, table: table }))),
2053
- columnDefType !== 'group' && (React.createElement(Box, { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' } },
2054
- showDragHandle && (React.createElement(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2055
- current: tableHeadCellRefs.current[column.id],
2056
- } })),
2057
- showColumnActions && (React.createElement(MRT_TableHeadCellColumnActionsButton, { header: header, table: table })))),
2058
- column.getCanResize() && (React.createElement(MRT_TableHeadCellResizeHandle, { header: header, table: table })))),
2059
- column.getCanFilter() && (React.createElement(MRT_TableHeadCellFilterContainer, { header: header, table: table }))));
1840
+ justifyContent: columnDefType === 'group' || (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
1841
+ ? 'center'
1842
+ : column.getCanResize()
1843
+ ? 'space-between'
1844
+ : 'flex-start',
1845
+ position: 'relative',
1846
+ width: '100%',
1847
+ } }, { children: [jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
1848
+ alignItems: 'center',
1849
+ cursor: column.getCanSort() && columnDefType !== 'group'
1850
+ ? 'pointer'
1851
+ : undefined,
1852
+ display: 'flex',
1853
+ flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
1854
+ overflow: columnDefType === 'data' ? 'hidden' : undefined,
1855
+ pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
1856
+ ? `${headerPL}rem`
1857
+ : undefined,
1858
+ } }, { children: [jsx(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Wrapper", sx: {
1859
+ minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
1860
+ overflow: columnDefType === 'data' ? 'hidden' : undefined,
1861
+ textOverflow: 'ellipsis',
1862
+ whiteSpace: ((_g = (_f = columnDef.header) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) < 20 ? 'nowrap' : 'normal',
1863
+ '&:hover': {
1864
+ textOverflow: 'clip',
1865
+ },
1866
+ }, title: columnDefType === 'data' ? columnDef.header : undefined }, { children: headerElement })), column.getCanSort() && (jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table }))] })), columnDefType !== 'group' && (jsxs(Box, Object.assign({ className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' } }, { children: [showDragHandle && (jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
1867
+ current: tableHeadCellRefs.current[column.id],
1868
+ } })), showColumnActions && (jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] }))), column.getCanResize() && (jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] }))), column.getCanFilter() && (jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2060
1869
  };
2061
1870
 
2062
1871
  const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -2064,17 +1873,14 @@ const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLe
2064
1873
  const tableRowProps = muiTableHeadRowProps instanceof Function
2065
1874
  ? muiTableHeadRowProps({ headerGroup, table })
2066
1875
  : muiTableHeadRowProps;
2067
- return (React.createElement(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), boxShadow: `4px 0 8px ${alpha(theme.palette.common.black, 0.1)}`, display: layoutMode === 'grid' ? 'flex' : 'table-row', top: 0 }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
1876
+ return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), boxShadow: `4px 0 8px ${alpha(theme.palette.common.black, 0.1)}`, display: layoutMode === 'grid' ? 'flex' : 'table-row', top: 0 }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2068
1877
  ? tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx(theme)
2069
- : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }),
2070
- virtualPaddingLeft ? (React.createElement("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
2071
- (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
2072
- const header = virtualColumns
2073
- ? headerGroup.headers[headerOrVirtualHeader.index]
2074
- : headerOrVirtualHeader;
2075
- return (React.createElement(MRT_TableHeadCell, { header: header, key: header.id, table: table }));
2076
- }),
2077
- virtualPaddingRight ? (React.createElement("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null));
1878
+ : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }, { children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
1879
+ const header = virtualColumns
1880
+ ? headerGroup.headers[headerOrVirtualHeader.index]
1881
+ : headerOrVirtualHeader;
1882
+ return (jsx(MRT_TableHeadCell, { header: header, table: table }, header.id));
1883
+ }), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
2078
1884
  };
2079
1885
 
2080
1886
  const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -2084,9 +1890,9 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2084
1890
  ? muiTableHeadProps({ table })
2085
1891
  : muiTableHeadProps;
2086
1892
  const stickyHeader = enableStickyHeader || isFullScreen;
2087
- return (React.createElement(TableHead, Object.assign({}, tableHeadProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: 0.97, position: stickyHeader ? 'sticky' : 'relative', top: stickyHeader && layoutMode === 'grid' ? 0 : undefined, zIndex: stickyHeader ? 2 : undefined }, ((tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx) instanceof Function
1893
+ return (jsx(TableHead, Object.assign({}, tableHeadProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: 0.97, position: stickyHeader ? 'sticky' : 'relative', top: stickyHeader && layoutMode === 'grid' ? 0 : undefined, zIndex: stickyHeader ? 2 : undefined }, ((tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx) instanceof Function
2088
1894
  ? tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx(theme)
2089
- : tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx))) }), getHeaderGroups().map((headerGroup) => (React.createElement(MRT_TableHeadRow, { headerGroup: headerGroup, key: headerGroup.id, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight })))));
1895
+ : tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.sx))) }, { children: getHeaderGroups().map((headerGroup) => (jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id))) })));
2090
1896
  };
2091
1897
 
2092
1898
  const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
@@ -2136,9 +1942,9 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2136
1942
  }
2137
1943
  };
2138
1944
  if (columnDef.Edit) {
2139
- return React.createElement(React.Fragment, null, (_a = columnDef.Edit) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table }));
1945
+ return jsx(Fragment, { children: (_a = columnDef.Edit) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table }) });
2140
1946
  }
2141
- return (React.createElement(TextField, Object.assign({ disabled: (columnDef.enableEditing instanceof Function
1947
+ return (jsx(TextField, Object.assign({ disabled: (columnDef.enableEditing instanceof Function
2142
1948
  ? columnDef.enableEditing(row)
2143
1949
  : columnDef.enableEditing) === false, fullWidth: true, inputRef: (inputRef) => {
2144
1950
  if (inputRef) {
@@ -2151,24 +1957,24 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2151
1957
  var _a;
2152
1958
  e.stopPropagation();
2153
1959
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
2154
- }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }), (_b = textFieldProps.children) !== null && _b !== void 0 ? _b : (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _c === void 0 ? void 0 : _c.map((option) => {
2155
- let value;
2156
- let text;
2157
- if (typeof option !== 'object') {
2158
- value = option;
2159
- text = option;
2160
- }
2161
- else {
2162
- value = option.value;
2163
- text = option.text;
2164
- }
2165
- return (React.createElement(MenuItem, { key: value, sx: {
2166
- display: 'flex',
2167
- m: 0,
2168
- alignItems: 'center',
2169
- gap: '0.5rem',
2170
- }, value: value }, text));
2171
- })));
1960
+ }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }, { children: (_b = textFieldProps.children) !== null && _b !== void 0 ? _b : (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _c === void 0 ? void 0 : _c.map((option) => {
1961
+ let value;
1962
+ let text;
1963
+ if (typeof option !== 'object') {
1964
+ value = option;
1965
+ text = option;
1966
+ }
1967
+ else {
1968
+ value = option.value;
1969
+ text = option.text;
1970
+ }
1971
+ return (jsx(MenuItem, Object.assign({ sx: {
1972
+ display: 'flex',
1973
+ m: 0,
1974
+ alignItems: 'center',
1975
+ gap: '0.5rem',
1976
+ }, value: value }, { children: text }), value));
1977
+ }) })));
2172
1978
  };
2173
1979
 
2174
1980
  const MRT_CopyButton = ({ cell, children, table, }) => {
@@ -2195,10 +2001,9 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
2195
2001
  })
2196
2002
  : columnDef.muiTableBodyCellCopyButtonProps;
2197
2003
  const buttonProps = Object.assign(Object.assign({}, mTableBodyCellCopyButtonProps), mcTableBodyCellCopyButtonProps);
2198
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _a !== void 0 ? _a : (copied ? localization.copiedToClipboard : localization.clickToCopy) },
2199
- React.createElement(Button, Object.assign({ onClick: (e) => handleCopy(e, cell.getValue()), size: "small", type: "button", variant: "text" }, buttonProps, { sx: (theme) => (Object.assign({ backgroundColor: 'transparent', border: 'none', color: 'inherit', cursor: 'copy', fontFamily: 'inherit', fontSize: 'inherit', letterSpacing: 'inherit', m: '-0.25rem', minWidth: 'unset', textAlign: 'inherit', textTransform: 'inherit' }, ((buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx) instanceof Function
2004
+ return (jsx(Tooltip, Object.assign({ arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _a !== void 0 ? _a : (copied ? localization.copiedToClipboard : localization.clickToCopy) }, { children: jsx(Button, Object.assign({ onClick: (e) => handleCopy(e, cell.getValue()), size: "small", type: "button", variant: "text" }, buttonProps, { sx: (theme) => (Object.assign({ backgroundColor: 'transparent', border: 'none', color: 'inherit', cursor: 'copy', fontFamily: 'inherit', fontSize: 'inherit', letterSpacing: 'inherit', m: '-0.25rem', minWidth: 'unset', textAlign: 'inherit', textTransform: 'inherit' }, ((buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx) instanceof Function
2200
2005
  ? buttonProps.sx(theme)
2201
- : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined }), children)));
2006
+ : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined }, { children: children })) })));
2202
2007
  };
2203
2008
 
2204
2009
  const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table }) => {
@@ -2219,7 +2024,7 @@ const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table }) => {
2219
2024
  table.setDraggingRow(null);
2220
2025
  table.setHoveredRow(null);
2221
2026
  };
2222
- return (React.createElement(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragStart: handleDragStart, onDragEnd: handleDragEnd, table: table }));
2027
+ return (jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragStart: handleDragStart, onDragEnd: handleDragEnd, table: table }));
2223
2028
  };
2224
2029
 
2225
2030
  const allowedTypes = ['string', 'number'];
@@ -2267,16 +2072,16 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2267
2072
  matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
2268
2073
  });
2269
2074
  if ((chunks === null || chunks === void 0 ? void 0 : chunks.length) > 1 || ((_b = chunks === null || chunks === void 0 ? void 0 : chunks[0]) === null || _b === void 0 ? void 0 : _b.match)) {
2270
- renderedCellValue = (React.createElement("span", { "aria-label": renderedCellValue, role: "note" }, (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (React.createElement(Box, { "aria-hidden": "true", component: "span", key: key, sx: match
2271
- ? {
2272
- backgroundColor: (theme) => theme.palette.mode === 'dark'
2273
- ? darken(theme.palette.warning.dark, 0.25)
2274
- : lighten(theme.palette.warning.light, 0.5),
2275
- borderRadius: '2px',
2276
- color: (theme) => theme.palette.mode === 'dark' ? 'white' : 'black',
2277
- padding: '2px 1px',
2278
- }
2279
- : undefined }, text)))) !== null && _c !== void 0 ? _c : renderedCellValue));
2075
+ renderedCellValue = (jsx("span", Object.assign({ "aria-label": renderedCellValue, role: "note" }, { children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsx(Box, Object.assign({ "aria-hidden": "true", component: "span", sx: match
2076
+ ? {
2077
+ backgroundColor: (theme) => theme.palette.mode === 'dark'
2078
+ ? darken(theme.palette.warning.dark, 0.25)
2079
+ : lighten(theme.palette.warning.light, 0.5),
2080
+ borderRadius: '2px',
2081
+ color: (theme) => theme.palette.mode === 'dark' ? 'white' : 'black',
2082
+ padding: '2px 1px',
2083
+ }
2084
+ : undefined }, { children: text }), key)))) !== null && _c !== void 0 ? _c : renderedCellValue })));
2280
2085
  }
2281
2086
  }
2282
2087
  if (columnDef.Cell && !isGroupedValue) {
@@ -2288,7 +2093,7 @@ const MRT_TableBodyCellValue = ({ cell, table }) => {
2288
2093
  table,
2289
2094
  });
2290
2095
  }
2291
- return React.createElement(React.Fragment, null, renderedCellValue);
2096
+ return jsx(Fragment, { children: renderedCellValue });
2292
2097
  };
2293
2098
 
2294
2099
  const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualCell, }) => {
@@ -2383,7 +2188,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
2383
2188
  setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
2384
2189
  }
2385
2190
  };
2386
- return (React.createElement(TableCell, Object.assign({ "data-index": virtualCell === null || virtualCell === void 0 ? void 0 : virtualCell.index, ref: (node) => {
2191
+ return (jsx(TableCell, Object.assign({ "data-index": virtualCell === null || virtualCell === void 0 ? void 0 : virtualCell.index, ref: (node) => {
2387
2192
  if (node) {
2388
2193
  measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
2389
2194
  }
@@ -2415,26 +2220,19 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
2415
2220
  table,
2416
2221
  theme,
2417
2222
  tableCellProps,
2418
- })), draggingBorders)) }),
2419
- React.createElement(React.Fragment, null,
2420
- cell.getIsPlaceholder() ? ((_b = (_a = columnDef.PlaceholderCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) !== null && _b !== void 0 ? _b : null) : isLoading || showSkeletons ? (React.createElement(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2421
- rowNumberMode === 'static' &&
2422
- column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (React.createElement(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
2423
- (column.id === 'mrt-row-select' ||
2424
- column.id === 'mrt-row-expand' ||
2425
- !row.getIsGrouped()) ? ((_c = columnDef.Cell) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
2426
- cell,
2427
- renderedCellValue: cell.renderValue(),
2428
- column,
2429
- row,
2430
- table,
2431
- })) : isEditing ? (React.createElement(MRT_EditCellTextField, { cell: cell, table: table })) : (enableClickToCopy || columnDef.enableClickToCopy) &&
2432
- columnDef.enableClickToCopy !== false ? (React.createElement(MRT_CopyButton, { cell: cell, table: table },
2433
- React.createElement(MRT_TableBodyCellValue, { cell: cell, table: table }))) : (React.createElement(MRT_TableBodyCellValue, { cell: cell, table: table })),
2434
- cell.getIsGrouped() && !columnDef.GroupedCell && (React.createElement(React.Fragment, null,
2435
- " (", (_d = row.subRows) === null || _d === void 0 ? void 0 :
2436
- _d.length,
2437
- ")")))));
2223
+ })), 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 &&
2224
+ rowNumberMode === 'static' &&
2225
+ column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsx(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
2226
+ (column.id === 'mrt-row-select' ||
2227
+ column.id === 'mrt-row-expand' ||
2228
+ !row.getIsGrouped()) ? ((_c = columnDef.Cell) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
2229
+ cell,
2230
+ renderedCellValue: cell.renderValue(),
2231
+ column,
2232
+ row,
2233
+ table,
2234
+ })) : isEditing ? (jsx(MRT_EditCellTextField, { cell: cell, table: table })) : (enableClickToCopy || columnDef.enableClickToCopy) &&
2235
+ columnDef.enableClickToCopy !== false ? (jsx(MRT_CopyButton, Object.assign({ cell: cell, table: table }, { children: jsx(MRT_TableBodyCellValue, { cell: cell, table: table }) }))) : (jsx(MRT_TableBodyCellValue, { cell: cell, table: table })), cell.getIsGrouped() && !columnDef.GroupedCell && (jsxs(Fragment, { children: [" (", (_d = row.subRows) === null || _d === void 0 ? void 0 : _d.length, ")"] }))] }) })));
2438
2236
  };
2439
2237
  const Memo_MRT_TableBodyCell = memo(MRT_TableBodyCell, (prev, next) => next.cell === prev.cell);
2440
2238
 
@@ -2452,7 +2250,7 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
2452
2250
  const tableCellProps = muiTableDetailPanelProps instanceof Function
2453
2251
  ? muiTableDetailPanelProps({ row, table })
2454
2252
  : muiTableDetailPanelProps;
2455
- return (React.createElement(TableRow, Object.assign({ className: "Mui-TableBodyCell-DetailPanel" }, tableRowProps, { sx: (theme) => {
2253
+ return (jsx(TableRow, Object.assign({ className: "Mui-TableBodyCell-DetailPanel" }, tableRowProps, { sx: (theme) => {
2456
2254
  var _a, _b;
2457
2255
  return (Object.assign({ display: layoutMode === 'grid' ? 'flex' : 'table-row', position: virtualRow ? 'absolute' : undefined, top: virtualRow
2458
2256
  ? `${(_b = (_a = parentRowRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height}px`
@@ -2461,12 +2259,11 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
2461
2259
  : undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2462
2260
  ? tableRowProps.sx(theme)
2463
2261
  : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)));
2464
- } }),
2465
- React.createElement(TableCell, Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
2262
+ } }, { children: jsx(TableCell, Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
2466
2263
  ? lighten(theme.palette.background.default, 0.06)
2467
2264
  : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: layoutMode === 'grid' ? 'flex' : 'table-cell', pb: row.getIsExpanded() ? '1rem' : 0, pt: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
2468
2265
  ? tableCellProps.sx(theme)
2469
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx))) }), renderDetailPanel && (React.createElement(Collapse, { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true }, !isLoading && renderDetailPanel({ row, table }))))));
2266
+ : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx))) }, { children: renderDetailPanel && (jsx(Collapse, Object.assign({ in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true }, { children: !isLoading && renderDetailPanel({ row, table }) }))) })) })));
2470
2267
  };
2471
2268
 
2472
2269
  const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
@@ -2481,51 +2278,46 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
2481
2278
  }
2482
2279
  };
2483
2280
  const rowRef = useRef(null);
2484
- return (React.createElement(React.Fragment, null,
2485
- React.createElement(TableRow, Object.assign({ "data-index": virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.index, onDragEnter: handleDragEnter, selected: row.getIsSelected(), ref: (node) => {
2486
- if (node) {
2487
- rowRef.current = node;
2488
- measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
2489
- }
2490
- } }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), boxSizing: 'border-box', display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', top: virtualRow ? 0 : undefined, width: '100%', '&:hover td': {
2491
- backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
2492
- ? row.getIsSelected()
2493
- ? `${alpha(theme.palette.primary.main, 0.2)}`
2494
- : theme.palette.mode === 'dark'
2495
- ? `${lighten(theme.palette.background.default, 0.12)}`
2496
- : `${darken(theme.palette.background.default, 0.05)}`
2497
- : undefined,
2498
- } }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2499
- ? tableRowProps.sx(theme)
2500
- : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
2501
- ? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
2502
- : undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }),
2503
- virtualPaddingLeft ? (React.createElement("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
2504
- (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
2505
- const cell = columnVirtualizer
2506
- ? row.getVisibleCells()[cellOrVirtualCell.index]
2507
- : cellOrVirtualCell;
2508
- const props = {
2509
- cell,
2510
- key: cell.id,
2511
- measureElement: columnVirtualizer === null || columnVirtualizer === void 0 ? void 0 : columnVirtualizer.measureElement,
2512
- numRows,
2513
- rowIndex,
2514
- rowRef,
2515
- table,
2516
- virtualCell: columnVirtualizer
2517
- ? cellOrVirtualCell
2518
- : undefined,
2519
- };
2520
- return memoMode === 'cells' &&
2521
- cell.column.columnDef.columnDefType === 'data' &&
2522
- !draggingColumn &&
2523
- !draggingRow &&
2524
- (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
2525
- (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (React.createElement(Memo_MRT_TableBodyCell, Object.assign({}, props))) : (React.createElement(MRT_TableBodyCell, Object.assign({}, props)));
2526
- }),
2527
- virtualPaddingRight ? (React.createElement("td", { style: { display: 'flex', width: virtualPaddingRight } })) : null),
2528
- renderDetailPanel && !row.getIsGrouped() && (React.createElement(MRT_TableDetailPanel, { parentRowRef: rowRef, row: row, rowIndex: rowIndex, table: table, virtualRow: virtualRow }))));
2281
+ return (jsxs(Fragment, { children: [jsxs(TableRow, Object.assign({ "data-index": virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.index, onDragEnter: handleDragEnter, selected: row.getIsSelected(), ref: (node) => {
2282
+ if (node) {
2283
+ rowRef.current = node;
2284
+ measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
2285
+ }
2286
+ } }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), boxSizing: 'border-box', display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', top: virtualRow ? 0 : undefined, width: '100%', '&:hover td': {
2287
+ backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
2288
+ ? row.getIsSelected()
2289
+ ? `${alpha(theme.palette.primary.main, 0.2)}`
2290
+ : theme.palette.mode === 'dark'
2291
+ ? `${lighten(theme.palette.background.default, 0.12)}`
2292
+ : `${darken(theme.palette.background.default, 0.05)}`
2293
+ : undefined,
2294
+ } }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2295
+ ? tableRowProps.sx(theme)
2296
+ : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
2297
+ ? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
2298
+ : undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }, { children: [virtualPaddingLeft ? (jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
2299
+ const cell = columnVirtualizer
2300
+ ? row.getVisibleCells()[cellOrVirtualCell.index]
2301
+ : cellOrVirtualCell;
2302
+ const props = {
2303
+ cell,
2304
+ key: cell.id,
2305
+ measureElement: columnVirtualizer === null || columnVirtualizer === void 0 ? void 0 : columnVirtualizer.measureElement,
2306
+ numRows,
2307
+ rowIndex,
2308
+ rowRef,
2309
+ table,
2310
+ virtualCell: columnVirtualizer
2311
+ ? cellOrVirtualCell
2312
+ : undefined,
2313
+ };
2314
+ return memoMode === 'cells' &&
2315
+ cell.column.columnDef.columnDefType === 'data' &&
2316
+ !draggingColumn &&
2317
+ !draggingRow &&
2318
+ (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
2319
+ (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsx(Memo_MRT_TableBodyCell, Object.assign({}, props))) : (jsx(MRT_TableBodyCell, Object.assign({}, props)));
2320
+ }), 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 }))] }));
2529
2321
  };
2530
2322
  const Memo_MRT_TableBodyRow = memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row && prev.rowIndex === next.rowIndex);
2531
2323
 
@@ -2577,7 +2369,10 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
2577
2369
  pagination.pageSize,
2578
2370
  ]);
2579
2371
  const rowVirtualizer = enableRowVirtualization
2580
- ? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, overscan: 4 }, vProps_old), vProps))
2372
+ ? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, measureElement: typeof window !== 'undefined' &&
2373
+ navigator.userAgent.indexOf('Firefox') === -1
2374
+ ? (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height
2375
+ : undefined, overscan: 4 }, vProps_old), vProps))
2581
2376
  : undefined;
2582
2377
  if (rowVirtualizerInstanceRef && rowVirtualizer) {
2583
2378
  rowVirtualizerInstanceRef.current = rowVirtualizer;
@@ -2589,43 +2384,42 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
2589
2384
  const virtualRows = rowVirtualizer
2590
2385
  ? rowVirtualizer.getVirtualItems()
2591
2386
  : undefined;
2592
- return (React.createElement(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-row-group', height: rowVirtualizer
2387
+ return (jsx(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-row-group', height: rowVirtualizer
2593
2388
  ? `${rowVirtualizer.getTotalSize()}px`
2594
2389
  : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, ((tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx) instanceof Function
2595
2390
  ? tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx(theme)
2596
- : tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx))) }), (_a = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _a !== void 0 ? _a : (!rows.length ? (React.createElement("tr", { style: { display: layoutMode === 'grid' ? 'grid' : 'table-row' } },
2597
- React.createElement("td", { colSpan: table.getVisibleLeafColumns().length, style: {
2598
- display: layoutMode === 'grid' ? 'grid' : 'table-cell',
2599
- } }, (_b = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _b !== void 0 ? _b : (React.createElement(Typography, { sx: {
2600
- color: 'text.secondary',
2601
- fontStyle: 'italic',
2602
- maxWidth: `min(100vw, ${(_d = (_c = tablePaperRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 360}px)`,
2603
- py: '2rem',
2604
- textAlign: 'center',
2605
- width: '100%',
2606
- } }, globalFilter || columnFilters.length
2607
- ? localization.noResultsFound
2608
- : localization.noRecordsToDisplay))))) : (React.createElement(React.Fragment, null, (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
2609
- const row = rowVirtualizer
2610
- ? rows[rowOrVirtualRow.index]
2611
- : rowOrVirtualRow;
2612
- const props = {
2613
- columnVirtualizer,
2614
- key: row.id,
2615
- measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
2616
- numRows: rows.length,
2617
- row,
2618
- rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
2619
- table,
2620
- virtualColumns,
2621
- virtualPaddingLeft,
2622
- virtualPaddingRight,
2623
- virtualRow: rowVirtualizer
2624
- ? rowOrVirtualRow
2625
- : undefined,
2626
- };
2627
- return memoMode === 'rows' ? (React.createElement(Memo_MRT_TableBodyRow, Object.assign({}, props))) : (React.createElement(MRT_TableBodyRow, Object.assign({}, props)));
2628
- }))))));
2391
+ : tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx))) }, { children: (_a = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _a !== void 0 ? _a : (!rows.length ? (jsx("tr", Object.assign({ style: { display: layoutMode === 'grid' ? 'grid' : 'table-row' } }, { children: jsx("td", Object.assign({ colSpan: table.getVisibleLeafColumns().length, style: {
2392
+ display: layoutMode === 'grid' ? 'grid' : 'table-cell',
2393
+ } }, { children: (_b = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _b !== void 0 ? _b : (jsx(Typography, Object.assign({ sx: {
2394
+ color: 'text.secondary',
2395
+ fontStyle: 'italic',
2396
+ maxWidth: `min(100vw, ${(_d = (_c = tablePaperRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 360}px)`,
2397
+ py: '2rem',
2398
+ textAlign: 'center',
2399
+ width: '100%',
2400
+ } }, { children: globalFilter || columnFilters.length
2401
+ ? localization.noResultsFound
2402
+ : localization.noRecordsToDisplay }))) })) }))) : (jsx(Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
2403
+ const row = rowVirtualizer
2404
+ ? rows[rowOrVirtualRow.index]
2405
+ : rowOrVirtualRow;
2406
+ const props = {
2407
+ columnVirtualizer,
2408
+ key: row.id,
2409
+ measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
2410
+ numRows: rows.length,
2411
+ row,
2412
+ rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
2413
+ table,
2414
+ virtualColumns,
2415
+ virtualPaddingLeft,
2416
+ virtualPaddingRight,
2417
+ virtualRow: rowVirtualizer
2418
+ ? rowOrVirtualRow
2419
+ : undefined,
2420
+ };
2421
+ return memoMode === 'rows' ? (jsx(Memo_MRT_TableBodyRow, Object.assign({}, props))) : (jsx(MRT_TableBodyRow, Object.assign({}, props)));
2422
+ }) }))) })));
2629
2423
  };
2630
2424
  const Memo_MRT_TableBody = memo(MRT_TableBody, (prev, next) => prev.table.options.data === next.table.options.data);
2631
2425
 
@@ -2643,7 +2437,7 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2643
2437
  ? columnDef.muiTableFooterCellProps({ column, table })
2644
2438
  : columnDef.muiTableFooterCellProps;
2645
2439
  const tableCellProps = Object.assign(Object.assign({}, mTableFooterCellProps), mcTableFooterCellProps);
2646
- return (React.createElement(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-cell', fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
2440
+ return (jsx(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table-cell', fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
2647
2441
  ? '0.5rem'
2648
2442
  : density === 'comfortable'
2649
2443
  ? '1rem'
@@ -2652,16 +2446,15 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2652
2446
  table,
2653
2447
  theme,
2654
2448
  tableCellProps,
2655
- }))) }),
2656
- React.createElement(React.Fragment, null, footer.isPlaceholder
2657
- ? null
2658
- : (_c = (_b = (columnDef.Footer instanceof Function
2659
- ? (_a = columnDef.Footer) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
2660
- column,
2661
- footer,
2662
- table,
2663
- })
2664
- : columnDef.Footer)) !== null && _b !== void 0 ? _b : columnDef.footer) !== null && _c !== void 0 ? _c : null)));
2449
+ }))) }, { children: jsx(Fragment, { children: footer.isPlaceholder
2450
+ ? null
2451
+ : (_c = (_b = (columnDef.Footer instanceof Function
2452
+ ? (_a = columnDef.Footer) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
2453
+ column,
2454
+ footer,
2455
+ table,
2456
+ })
2457
+ : columnDef.Footer)) !== null && _b !== void 0 ? _b : columnDef.footer) !== null && _c !== void 0 ? _c : null }) })));
2665
2458
  };
2666
2459
 
2667
2460
  const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -2675,17 +2468,14 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
2675
2468
  const tableRowProps = muiTableFooterRowProps instanceof Function
2676
2469
  ? muiTableFooterRowProps({ footerGroup, table })
2677
2470
  : muiTableFooterRowProps;
2678
- return (React.createElement(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), display: layoutMode === 'grid' ? 'flex' : 'table-row', width: '100%' }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2471
+ return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), display: layoutMode === 'grid' ? 'flex' : 'table-row', width: '100%' }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2679
2472
  ? tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx(theme)
2680
- : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }),
2681
- virtualPaddingLeft ? (React.createElement("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
2682
- (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
2683
- const footer = virtualColumns
2684
- ? footerGroup.headers[footerOrVirtualFooter.index]
2685
- : footerOrVirtualFooter;
2686
- return (React.createElement(MRT_TableFooterCell, { footer: footer, key: footer.id, table: table }));
2687
- }),
2688
- virtualPaddingRight ? (React.createElement("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null));
2473
+ : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }, { children: [virtualPaddingLeft ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
2474
+ const footer = virtualColumns
2475
+ ? footerGroup.headers[footerOrVirtualFooter.index]
2476
+ : footerOrVirtualFooter;
2477
+ return (jsx(MRT_TableFooterCell, { footer: footer, table: table }, footer.id));
2478
+ }), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
2689
2479
  };
2690
2480
 
2691
2481
  const MRT_TableFooter = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
@@ -2695,13 +2485,13 @@ const MRT_TableFooter = ({ table, virtualColumns, virtualPaddingLeft, virtualPad
2695
2485
  ? muiTableFooterProps({ table })
2696
2486
  : muiTableFooterProps;
2697
2487
  const stickFooter = (isFullScreen || enableStickyFooter) && enableStickyFooter !== false;
2698
- return (React.createElement(TableFooter, Object.assign({}, tableFooterProps, { sx: (theme) => (Object.assign({ bottom: stickFooter ? 0 : undefined, display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: stickFooter ? 0.97 : undefined, outline: stickFooter
2488
+ return (jsx(TableFooter, Object.assign({}, tableFooterProps, { sx: (theme) => (Object.assign({ bottom: stickFooter ? 0 : undefined, display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: stickFooter ? 0.97 : undefined, outline: stickFooter
2699
2489
  ? theme.palette.mode === 'light'
2700
2490
  ? `1px solid ${theme.palette.grey[300]}`
2701
2491
  : `1px solid ${theme.palette.grey[700]}`
2702
2492
  : undefined, position: stickFooter ? 'sticky' : undefined, zIndex: stickFooter ? 1 : undefined }, ((tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx) instanceof Function
2703
2493
  ? tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx(theme)
2704
- : tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx))) }), getFooterGroups().map((footerGroup) => (React.createElement(MRT_TableFooterRow, { footerGroup: footerGroup, key: footerGroup.id, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight })))));
2494
+ : tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx))) }, { children: getFooterGroups().map((footerGroup) => (jsx(MRT_TableFooterRow, { footerGroup: footerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, footerGroup.id))) })));
2705
2495
  };
2706
2496
 
2707
2497
  const MRT_Table = ({ table }) => {
@@ -2772,12 +2562,9 @@ const MRT_Table = ({ table }) => {
2772
2562
  virtualPaddingLeft,
2773
2563
  virtualPaddingRight,
2774
2564
  };
2775
- return (React.createElement(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: layoutMode === 'grid' ? 'grid' : 'table', tableLayout: layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined }, ((tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) instanceof Function
2565
+ return (jsxs(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: layoutMode === 'grid' ? 'grid' : 'table', tableLayout: layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined }, ((tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) instanceof Function
2776
2566
  ? tableProps.sx(theme)
2777
- : tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx))), style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style) }),
2778
- enableTableHead && React.createElement(MRT_TableHead, Object.assign({}, props)),
2779
- memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (React.createElement(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (React.createElement(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))),
2780
- enableTableFooter && React.createElement(MRT_TableFooter, Object.assign({}, props))));
2567
+ : tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx))), style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style) }, { children: [enableTableHead && jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsx(MRT_TableFooter, Object.assign({}, props))] })));
2781
2568
  };
2782
2569
 
2783
2570
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
@@ -2798,7 +2585,7 @@ const MRT_TableContainer = ({ table }) => {
2798
2585
  : 0;
2799
2586
  setTotalToolbarHeight(topToolbarHeight + bottomToolbarHeight);
2800
2587
  });
2801
- return (React.createElement(TableContainer, Object.assign({}, tableContainerProps, { ref: (node) => {
2588
+ return (jsx(TableContainer, Object.assign({}, tableContainerProps, { ref: (node) => {
2802
2589
  if (node) {
2803
2590
  tableContainerRef.current = node;
2804
2591
  if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
@@ -2812,8 +2599,7 @@ const MRT_TableContainer = ({ table }) => {
2812
2599
  ? tableContainerProps.sx(theme)
2813
2600
  : tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx))), style: Object.assign({ maxHeight: isFullScreen
2814
2601
  ? `calc(100vh - ${totalToolbarHeight}px)`
2815
- : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style) }),
2816
- React.createElement(MRT_Table, { table: table })));
2602
+ : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style) }, { children: jsx(MRT_Table, { table: table }) })));
2817
2603
  };
2818
2604
 
2819
2605
  const MRT_TablePaper = ({ table }) => {
@@ -2822,7 +2608,7 @@ const MRT_TablePaper = ({ table }) => {
2822
2608
  const tablePaperProps = muiTablePaperProps instanceof Function
2823
2609
  ? muiTablePaperProps({ table })
2824
2610
  : muiTablePaperProps;
2825
- return (React.createElement(Paper, Object.assign({ elevation: 2 }, tablePaperProps, { ref: (ref) => {
2611
+ return (jsxs(Paper, Object.assign({ elevation: 2 }, tablePaperProps, { ref: (ref) => {
2826
2612
  tablePaperRef.current = ref;
2827
2613
  if (tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.ref) {
2828
2614
  //@ts-ignore
@@ -2839,35 +2625,26 @@ const MRT_TablePaper = ({ table }) => {
2839
2625
  padding: 0,
2840
2626
  width: '100vw',
2841
2627
  }
2842
- : {})) }),
2843
- enableTopToolbar &&
2844
- (renderTopToolbar instanceof Function
2845
- ? renderTopToolbar({ table })
2846
- : renderTopToolbar !== null && renderTopToolbar !== void 0 ? renderTopToolbar : React.createElement(MRT_TopToolbar, { table: table })),
2847
- React.createElement(MRT_TableContainer, { table: table }),
2848
- enableBottomToolbar &&
2849
- (renderBottomToolbar instanceof Function
2850
- ? renderBottomToolbar({ table })
2851
- : renderBottomToolbar !== null && renderBottomToolbar !== void 0 ? renderBottomToolbar : React.createElement(MRT_BottomToolbar, { table: table }))));
2628
+ : {})) }, { children: [enableTopToolbar &&
2629
+ (renderTopToolbar instanceof Function
2630
+ ? renderTopToolbar({ table })
2631
+ : renderTopToolbar !== null && renderTopToolbar !== void 0 ? renderTopToolbar : jsx(MRT_TopToolbar, { table: table })), jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
2632
+ (renderBottomToolbar instanceof Function
2633
+ ? renderBottomToolbar({ table })
2634
+ : renderBottomToolbar !== null && renderBottomToolbar !== void 0 ? renderBottomToolbar : jsx(MRT_BottomToolbar, { table: table }))] })));
2852
2635
  };
2853
2636
 
2854
2637
  const MRT_EditRowModal = ({ open, row, table, }) => {
2855
2638
  const { options: { localization }, } = table;
2856
- return (React.createElement(Dialog, { open: open },
2857
- React.createElement(DialogTitle, { textAlign: "center" }, localization.edit),
2858
- React.createElement(DialogContent, null,
2859
- React.createElement("form", { onSubmit: (e) => e.preventDefault() },
2860
- React.createElement(Stack, { sx: {
2861
- gap: '1.5rem',
2862
- minWidth: { xs: '300px', sm: '360px', md: '400px' },
2863
- pt: '1rem',
2864
- width: '100%',
2865
- } }, row
2866
- .getAllCells()
2867
- .filter((cell) => cell.column.columnDef.columnDefType === 'data')
2868
- .map((cell) => (React.createElement(MRT_EditCellTextField, { cell: cell, key: cell.id, showLabel: true, table: table })))))),
2869
- React.createElement(DialogActions, { sx: { p: '1.25rem' } },
2870
- React.createElement(MRT_EditActionButtons, { row: row, table: table, variant: "text" }))));
2639
+ return (jsxs(Dialog, Object.assign({ open: open }, { children: [jsx(DialogTitle, Object.assign({ textAlign: "center" }, { children: localization.edit })), jsx(DialogContent, { children: jsx("form", Object.assign({ onSubmit: (e) => e.preventDefault() }, { children: jsx(Stack, Object.assign({ sx: {
2640
+ gap: '1.5rem',
2641
+ minWidth: { xs: '300px', sm: '360px', md: '400px' },
2642
+ pt: '1rem',
2643
+ width: '100%',
2644
+ } }, { children: row
2645
+ .getAllCells()
2646
+ .filter((cell) => cell.column.columnDef.columnDefType === 'data')
2647
+ .map((cell) => (jsx(MRT_EditCellTextField, { cell: cell, showLabel: true, table: table }, cell.id))) })) })) }), jsx(DialogActions, Object.assign({ sx: { p: '1.25rem' } }, { children: jsx(MRT_EditActionButtons, { row: row, table: table, variant: "text" }) }))] })));
2871
2648
  };
2872
2649
 
2873
2650
  const MRT_TableRoot = (props) => {
@@ -2915,13 +2692,13 @@ const MRT_TableRoot = (props) => {
2915
2692
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2916
2693
  return [
2917
2694
  ((_b = (_a = props.state) === null || _a === void 0 ? void 0 : _a.columnOrder) !== null && _b !== void 0 ? _b : columnOrder).includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: props.localization.move, size: 60 }, props.defaultDisplayColumn), (_c = props.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-drag']), { id: 'mrt-row-drag' }),
2918
- ((_e = (_d = props.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React.createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: props.localization.actions, size: 70 }, props.defaultDisplayColumn), (_f = props.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-actions']), { id: 'mrt-row-actions' }),
2695
+ ((_e = (_d = props.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (jsx(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: props.localization.actions, size: 70 }, props.defaultDisplayColumn), (_f = props.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-actions']), { id: 'mrt-row-actions' }),
2919
2696
  ((_h = (_g = props.state) === null || _g === void 0 ? void 0 : _g.columnOrder) !== null && _h !== void 0 ? _h : columnOrder).includes('mrt-row-expand') &&
2920
- showExpandColumn(props, (_k = (_j = props.state) === null || _j === void 0 ? void 0 : _j.grouping) !== null && _k !== void 0 ? _k : grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_ExpandButton, { row: row, table: table })), Header: props.enableExpandAll
2921
- ? () => React.createElement(MRT_ExpandAllButton, { table: table })
2697
+ showExpandColumn(props, (_k = (_j = props.state) === null || _j === void 0 ? void 0 : _j.grouping) !== null && _k !== void 0 ? _k : grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (jsx(MRT_ExpandButton, { row: row, table: table })), Header: props.enableExpandAll
2698
+ ? () => jsx(MRT_ExpandAllButton, { table: table })
2922
2699
  : null, header: props.localization.expand, size: 60 }, props.defaultDisplayColumn), (_l = props.displayColumnDefOptions) === null || _l === void 0 ? void 0 : _l['mrt-row-expand']), { id: 'mrt-row-expand' }),
2923
- ((_o = (_m = props.state) === null || _m === void 0 ? void 0 : _m.columnOrder) !== null && _o !== void 0 ? _o : columnOrder).includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React.createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: props.enableSelectAll && props.enableMultiRowSelection
2924
- ? () => React.createElement(MRT_SelectCheckbox, { selectAll: true, table: table })
2700
+ ((_o = (_m = props.state) === null || _m === void 0 ? void 0 : _m.columnOrder) !== null && _o !== void 0 ? _o : columnOrder).includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (jsx(MRT_SelectCheckbox, { row: row, table: table })), Header: props.enableSelectAll && props.enableMultiRowSelection
2701
+ ? () => jsx(MRT_SelectCheckbox, { selectAll: true, table: table })
2925
2702
  : null, header: props.localization.select, size: 60 }, props.defaultDisplayColumn), (_p = props.displayColumnDefOptions) === null || _p === void 0 ? void 0 : _p['mrt-row-select']), { id: 'mrt-row-select' }),
2926
2703
  ((_r = (_q = props.state) === null || _q === void 0 ? void 0 : _q.columnOrder) !== null && _r !== void 0 ? _r : columnOrder).includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => props.localization.rowNumber, header: props.localization.rowNumbers, size: 60 }, props.defaultDisplayColumn), (_s = props.displayColumnDefOptions) === null || _s === void 0 ? void 0 : _s['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
2927
2704
  ].filter(Boolean);
@@ -3042,11 +2819,7 @@ const MRT_TableRoot = (props) => {
3042
2819
  table.setPageIndex(Math.floor(totalRowCount / pageSize));
3043
2820
  }
3044
2821
  }, [props.rowCount, table.getPrePaginationRowModel().rows.length]);
3045
- return (React.createElement(React.Fragment, null,
3046
- React.createElement(Dialog, { PaperComponent: Box, TransitionComponent: !props.enableRowVirtualization ? Grow : undefined, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => table.setIsFullScreen(false), open: table.getState().isFullScreen, transitionDuration: 400 },
3047
- React.createElement(MRT_TablePaper, { table: table })),
3048
- !table.getState().isFullScreen && (React.createElement(MRT_TablePaper, { table: table })),
3049
- editingRow && props.editingMode === 'modal' && (React.createElement(MRT_EditRowModal, { row: editingRow, table: table, open: true }))));
2822
+ return (jsxs(Fragment, { children: [jsx(Dialog, Object.assign({ PaperComponent: Box, TransitionComponent: !props.enableRowVirtualization ? Grow : undefined, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => table.setIsFullScreen(false), open: table.getState().isFullScreen, transitionDuration: 400 }, { children: jsx(MRT_TablePaper, { table: table }) })), !table.getState().isFullScreen && (jsx(MRT_TablePaper, { table: table })), editingRow && props.editingMode === 'modal' && (jsx(MRT_EditRowModal, { row: editingRow, table: table, open: true }))] }));
3050
2823
  };
3051
2824
 
3052
2825
  const MRT_Localization_EN = {
@@ -3166,8 +2939,8 @@ const MaterialReactTable = (_a) => {
3166
2939
  manualPagination = true;
3167
2940
  manualSorting = true;
3168
2941
  }
3169
- return (React.createElement(MRT_TableRoot, Object.assign({ aggregationFns: _aggregationFns, autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: _defaultColumn, defaultDisplayColumn: _defaultDisplayColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilterMatchHighlighting: enableFilterMatchHighlighting, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, enableGlobalFilterRankedResults: enableGlobalFilterRankedResults, enableGrouping: enableGrouping, enableHiding: enableHiding, enableMultiRowSelection: enableMultiRowSelection, enableMultiSort: enableMultiSort, enablePagination: enablePagination, enablePinning: enablePinning, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, enableSorting: enableSorting, enableStickyHeader: enableStickyHeader, enableTableFooter: enableTableFooter, enableTableHead: enableTableHead, enableToolbarInternalActions: enableToolbarInternalActions, enableTopToolbar: enableTopToolbar, filterFns: _filterFns, icons: _icons, layoutMode: layoutMode, localization: _localization, manualFiltering: manualFiltering, manualGrouping: manualGrouping, manualPagination: manualPagination, manualSorting: manualSorting, positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: _sortingFns }, rest)));
2942
+ return (jsx(MRT_TableRoot, Object.assign({ aggregationFns: _aggregationFns, autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: _defaultColumn, defaultDisplayColumn: _defaultDisplayColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilterMatchHighlighting: enableFilterMatchHighlighting, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, enableGlobalFilterRankedResults: enableGlobalFilterRankedResults, enableGrouping: enableGrouping, enableHiding: enableHiding, enableMultiRowSelection: enableMultiRowSelection, enableMultiSort: enableMultiSort, enablePagination: enablePagination, enablePinning: enablePinning, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, enableSorting: enableSorting, enableStickyHeader: enableStickyHeader, enableTableFooter: enableTableFooter, enableTableHead: enableTableHead, enableToolbarInternalActions: enableToolbarInternalActions, enableTopToolbar: enableTopToolbar, filterFns: _filterFns, icons: _icons, layoutMode: layoutMode, localization: _localization, manualFiltering: manualFiltering, manualGrouping: manualGrouping, manualPagination: manualPagination, manualSorting: manualSorting, positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: _sortingFns }, rest)));
3170
2943
  };
3171
2944
 
3172
- export { MRT_AggregationFns, MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_ExpandButton, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_ShowHideColumnsButton, MRT_SortingFns, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable as default };
2945
+ export { MRT_AggregationFns, MRT_BottomToolbar, MRT_CopyButton, MRT_EditActionButtons, MRT_ExpandButton, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_ShowHideColumnsButton, MRT_SortingFns, MRT_TableHeadCellFilterContainer, MRT_TablePagination, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable as default };
3173
2946
  //# sourceMappingURL=material-react-table.esm.js.map