material-react-table 2.0.0-beta.1 → 2.0.0-beta.11

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 (571) hide show
  1. package/dist/index.d.ts +279 -261
  2. package/dist/{esm/material-react-table.esm.js → index.esm.js} +943 -921
  3. package/dist/index.esm.js.map +1 -0
  4. package/dist/{cjs/index.js → index.js} +948 -926
  5. package/dist/index.js.map +1 -0
  6. package/dist/types/MaterialReactTable.d.ts +7 -0
  7. package/dist/types/body/MRT_TableBody.d.ts +13 -0
  8. package/dist/types/body/MRT_TableBodyCell.d.ts +15 -0
  9. package/dist/types/body/MRT_TableBodyCellValue.d.ts +8 -0
  10. package/dist/types/body/MRT_TableBodyRow.d.ts +18 -0
  11. package/dist/types/body/MRT_TableBodyRowGrabHandle.d.ts +10 -0
  12. package/dist/types/body/MRT_TableBodyRowPinButton.d.ts +8 -0
  13. package/dist/types/body/MRT_TableDetailPanel.d.ts +13 -0
  14. package/dist/types/buttons/MRT_ColumnPinningButtons.d.ts +8 -0
  15. package/dist/types/buttons/MRT_CopyButton.d.ts +8 -0
  16. package/dist/types/buttons/MRT_EditActionButtons.d.ts +9 -0
  17. package/dist/types/buttons/MRT_ExpandAllButton.d.ts +7 -0
  18. package/dist/types/buttons/MRT_ExpandButton.d.ts +8 -0
  19. package/dist/{cjs/types → types}/buttons/MRT_GrabHandleButton.d.ts +3 -3
  20. package/dist/types/buttons/MRT_RowPinButton.d.ts +10 -0
  21. package/dist/types/buttons/MRT_ShowHideColumnsButton.d.ts +7 -0
  22. package/dist/types/buttons/MRT_ToggleDensePaddingButton.d.ts +7 -0
  23. package/dist/types/buttons/MRT_ToggleFiltersButton.d.ts +7 -0
  24. package/dist/types/buttons/MRT_ToggleFullScreenButton.d.ts +7 -0
  25. package/dist/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +7 -0
  26. package/dist/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +9 -0
  27. package/dist/types/column.utils.d.ts +119 -0
  28. package/dist/types/filterFns.d.ts +69 -0
  29. package/dist/types/footer/MRT_TableFooter.d.ts +11 -0
  30. package/dist/types/footer/MRT_TableFooterCell.d.ts +8 -0
  31. package/dist/types/footer/MRT_TableFooterRow.d.ts +12 -0
  32. package/dist/types/head/MRT_TableHead.d.ts +11 -0
  33. package/dist/types/head/MRT_TableHeadCell.d.ts +8 -0
  34. package/dist/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +8 -0
  35. package/dist/types/head/MRT_TableHeadCellFilterContainer.d.ts +8 -0
  36. package/dist/types/head/MRT_TableHeadCellFilterLabel.d.ts +8 -0
  37. package/dist/{cjs/types → types}/head/MRT_TableHeadCellGrabHandle.d.ts +4 -3
  38. package/dist/types/head/MRT_TableHeadCellResizeHandle.d.ts +8 -0
  39. package/dist/types/head/MRT_TableHeadCellSortLabel.d.ts +8 -0
  40. package/dist/types/head/MRT_TableHeadRow.d.ts +12 -0
  41. package/dist/types/hooks/useMRT_DisplayColumns.d.ts +9 -0
  42. package/dist/types/hooks/useMRT_Effects.d.ts +2 -0
  43. package/dist/types/hooks/useMRT_TableInstance.d.ts +2 -0
  44. package/dist/types/hooks/useMRT_TableOptions.d.ts +22 -0
  45. package/dist/{cjs/types → types}/index.d.ts +1 -0
  46. package/dist/types/inputs/MRT_EditCellTextField.d.ts +8 -0
  47. package/dist/types/inputs/MRT_FilterCheckbox.d.ts +8 -0
  48. package/dist/types/inputs/MRT_FilterRangeFields.d.ts +8 -0
  49. package/dist/types/inputs/MRT_FilterRangeSlider.d.ts +8 -0
  50. package/dist/types/inputs/MRT_FilterTextField.d.ts +9 -0
  51. package/dist/types/inputs/MRT_GlobalFilterTextField.d.ts +7 -0
  52. package/dist/types/inputs/MRT_SelectCheckbox.d.ts +9 -0
  53. package/dist/types/locales/az.d.ts +2 -0
  54. package/dist/{cjs/types → types}/locales/no.d.ts +1 -1
  55. package/dist/{esm/types → types}/menus/MRT_ColumnActionMenu.d.ts +4 -3
  56. package/dist/{esm/types → types}/menus/MRT_FilterOptionMenu.d.ts +4 -3
  57. package/dist/types/menus/MRT_RowActionMenu.d.ts +12 -0
  58. package/dist/types/menus/MRT_ShowHideColumnsMenu.d.ts +10 -0
  59. package/dist/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +12 -0
  60. package/dist/types/modals/MRT_EditRowModal.d.ts +8 -0
  61. package/dist/{esm/types → types}/sortingFns.d.ts +3 -3
  62. package/dist/types/style.utils.d.ts +32 -0
  63. package/dist/types/table/MRT_Table.d.ts +7 -0
  64. package/dist/types/table/MRT_TableContainer.d.ts +7 -0
  65. package/dist/types/table/MRT_TableLoadingOverlay.d.ts +7 -0
  66. package/dist/types/table/MRT_TablePaper.d.ts +7 -0
  67. package/dist/{cjs/types → types}/table/index.d.ts +1 -0
  68. package/dist/types/toolbar/MRT_BottomToolbar.d.ts +7 -0
  69. package/dist/types/toolbar/MRT_LinearProgressBar.d.ts +8 -0
  70. package/dist/types/toolbar/MRT_TablePagination.d.ts +11 -0
  71. package/dist/types/toolbar/MRT_ToolbarAlertBanner.d.ts +8 -0
  72. package/dist/types/toolbar/MRT_ToolbarDropZone.d.ts +7 -0
  73. package/dist/types/toolbar/MRT_ToolbarInternalButtons.d.ts +7 -0
  74. package/dist/types/toolbar/MRT_TopToolbar.d.ts +6 -0
  75. package/dist/{cjs/types → types}/types.d.ts +69 -50
  76. package/dist/types/useMaterialReactTable.d.ts +2 -0
  77. package/locales/ar.d.ts +1 -0
  78. package/locales/ar.js +0 -1
  79. package/locales/{ar.esm.js → ar.mjs} +0 -1
  80. package/locales/az.d.ts +3 -0
  81. package/locales/az.js +97 -0
  82. package/locales/az.mjs +93 -0
  83. package/locales/bg.d.ts +1 -0
  84. package/locales/bg.js +0 -1
  85. package/locales/{bg.esm.js → bg.mjs} +0 -1
  86. package/locales/cs.d.ts +1 -0
  87. package/locales/cs.js +0 -1
  88. package/locales/{cs.esm.js → cs.mjs} +0 -1
  89. package/locales/da.d.ts +1 -0
  90. package/locales/da.js +0 -1
  91. package/locales/{da.esm.js → da.mjs} +0 -1
  92. package/locales/de.d.ts +1 -0
  93. package/locales/de.js +0 -1
  94. package/locales/{de.esm.js → de.mjs} +0 -1
  95. package/locales/en.d.ts +1 -0
  96. package/locales/en.js +0 -1
  97. package/locales/{en.esm.js → en.mjs} +0 -1
  98. package/locales/es.d.ts +1 -0
  99. package/locales/es.js +0 -1
  100. package/locales/{es.esm.js → es.mjs} +0 -1
  101. package/locales/et.d.ts +1 -0
  102. package/locales/et.js +0 -1
  103. package/locales/{et.esm.js → et.mjs} +0 -1
  104. package/locales/fa.d.ts +1 -0
  105. package/locales/fa.js +0 -1
  106. package/locales/{fa.esm.js → fa.mjs} +0 -1
  107. package/locales/fi.d.ts +1 -0
  108. package/locales/fi.js +0 -1
  109. package/locales/{fi.esm.js → fi.mjs} +0 -1
  110. package/locales/fr.d.ts +1 -0
  111. package/locales/fr.js +0 -1
  112. package/locales/{fr.esm.js → fr.mjs} +0 -1
  113. package/locales/hu.d.ts +1 -0
  114. package/locales/hu.js +0 -1
  115. package/locales/{hu.esm.js → hu.mjs} +0 -1
  116. package/locales/hy.d.ts +1 -0
  117. package/locales/hy.js +0 -1
  118. package/locales/{hy.esm.js → hy.mjs} +0 -1
  119. package/locales/id.d.ts +1 -0
  120. package/locales/id.js +0 -1
  121. package/locales/{id.esm.js → id.mjs} +0 -1
  122. package/locales/it.d.ts +1 -0
  123. package/locales/it.js +0 -1
  124. package/locales/{it.esm.js → it.mjs} +0 -1
  125. package/locales/ja.d.ts +1 -0
  126. package/locales/ja.js +0 -1
  127. package/locales/{ja.esm.js → ja.mjs} +0 -1
  128. package/locales/ko.d.ts +1 -0
  129. package/locales/ko.js +0 -1
  130. package/locales/{ko.esm.js → ko.mjs} +0 -1
  131. package/locales/nl.d.ts +1 -0
  132. package/locales/nl.js +0 -1
  133. package/locales/{nl.esm.js → nl.mjs} +0 -1
  134. package/locales/no.d.ts +2 -1
  135. package/locales/no.js +0 -1
  136. package/locales/{no.esm.js → no.mjs} +0 -1
  137. package/locales/np.d.ts +1 -0
  138. package/locales/np.js +0 -1
  139. package/locales/{np.esm.js → np.mjs} +0 -1
  140. package/locales/pl.d.ts +1 -0
  141. package/locales/pl.js +0 -1
  142. package/locales/{pl.esm.js → pl.mjs} +0 -1
  143. package/locales/pt-BR.d.ts +1 -0
  144. package/locales/pt-BR.js +0 -1
  145. package/locales/{pt-BR.esm.js → pt-BR.mjs} +0 -1
  146. package/locales/pt.d.ts +1 -0
  147. package/locales/pt.js +0 -1
  148. package/locales/{pt.esm.js → pt.mjs} +0 -1
  149. package/locales/ro.d.ts +1 -0
  150. package/locales/ro.js +0 -1
  151. package/locales/{ro.esm.js → ro.mjs} +0 -1
  152. package/locales/ru.d.ts +1 -0
  153. package/locales/ru.js +0 -1
  154. package/locales/{ru.esm.js → ru.mjs} +0 -1
  155. package/locales/sk.d.ts +1 -0
  156. package/locales/sk.js +0 -1
  157. package/locales/{sk.esm.js → sk.mjs} +0 -1
  158. package/locales/sr-Cyrl-RS.d.ts +1 -0
  159. package/locales/sr-Cyrl-RS.js +0 -1
  160. package/locales/{sr-Cyrl-RS.esm.js → sr-Cyrl-RS.mjs} +0 -1
  161. package/locales/sr-Latn-RS.d.ts +1 -0
  162. package/locales/sr-Latn-RS.js +0 -1
  163. package/locales/{sr-Latn-RS.esm.js → sr-Latn-RS.mjs} +0 -1
  164. package/locales/sv.d.ts +1 -0
  165. package/locales/sv.js +0 -1
  166. package/locales/{sv.esm.js → sv.mjs} +0 -1
  167. package/locales/tr.d.ts +1 -0
  168. package/locales/tr.js +0 -1
  169. package/locales/{tr.esm.js → tr.mjs} +0 -1
  170. package/locales/uk.d.ts +1 -0
  171. package/locales/uk.js +0 -1
  172. package/locales/{uk.esm.js → uk.mjs} +0 -1
  173. package/locales/vi.d.ts +1 -0
  174. package/locales/vi.js +0 -1
  175. package/locales/{vi.esm.js → vi.mjs} +0 -1
  176. package/locales/zh-Hans.d.ts +1 -0
  177. package/locales/zh-Hans.js +17 -18
  178. package/locales/{zh-Hans.esm.js → zh-Hans.mjs} +17 -18
  179. package/locales/zh-Hant.d.ts +1 -0
  180. package/locales/zh-Hant.js +0 -1
  181. package/locales/{zh-Hant.esm.js → zh-Hant.mjs} +0 -1
  182. package/package.json +215 -31
  183. package/src/MaterialReactTable.tsx +5 -4
  184. package/src/body/MRT_TableBody.tsx +14 -8
  185. package/src/body/MRT_TableBodyCell.tsx +77 -70
  186. package/src/body/MRT_TableBodyCellValue.tsx +13 -9
  187. package/src/body/MRT_TableBodyRow.tsx +26 -15
  188. package/src/body/MRT_TableBodyRowGrabHandle.tsx +16 -7
  189. package/src/body/MRT_TableBodyRowPinButton.tsx +18 -7
  190. package/src/body/MRT_TableDetailPanel.tsx +19 -11
  191. package/src/buttons/MRT_ColumnPinningButtons.tsx +21 -8
  192. package/src/buttons/MRT_CopyButton.tsx +12 -11
  193. package/src/buttons/MRT_EditActionButtons.tsx +17 -7
  194. package/src/buttons/MRT_ExpandAllButton.tsx +13 -11
  195. package/src/buttons/MRT_ExpandButton.tsx +10 -8
  196. package/src/buttons/MRT_GrabHandleButton.tsx +10 -8
  197. package/src/buttons/MRT_RowPinButton.tsx +14 -7
  198. package/src/buttons/MRT_ShowHideColumnsButton.tsx +4 -4
  199. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +4 -6
  200. package/src/buttons/MRT_ToggleFiltersButton.tsx +4 -4
  201. package/src/buttons/MRT_ToggleFullScreenButton.tsx +3 -4
  202. package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +4 -6
  203. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +15 -9
  204. package/src/column.utils.ts +46 -141
  205. package/src/filterFns.ts +15 -14
  206. package/src/footer/MRT_TableFooter.tsx +11 -7
  207. package/src/footer/MRT_TableFooterCell.tsx +21 -16
  208. package/src/footer/MRT_TableFooterRow.tsx +14 -9
  209. package/src/head/MRT_TableHead.tsx +10 -6
  210. package/src/head/MRT_TableHeadCell.tsx +102 -91
  211. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +13 -12
  212. package/src/head/MRT_TableHeadCellFilterContainer.tsx +10 -6
  213. package/src/head/MRT_TableHeadCellFilterLabel.tsx +15 -9
  214. package/src/head/MRT_TableHeadCellGrabHandle.tsx +10 -3
  215. package/src/head/MRT_TableHeadCellResizeHandle.tsx +14 -9
  216. package/src/head/MRT_TableHeadCellSortLabel.tsx +38 -18
  217. package/src/head/MRT_TableHeadRow.tsx +15 -9
  218. package/src/hooks/useMRT_DisplayColumns.tsx +14 -10
  219. package/src/hooks/useMRT_Effects.ts +6 -2
  220. package/src/hooks/useMRT_TableInstance.ts +3 -2
  221. package/src/hooks/useMRT_TableOptions.ts +29 -4
  222. package/src/index.ts +1 -0
  223. package/src/inputs/MRT_EditCellTextField.tsx +18 -4
  224. package/src/inputs/MRT_FilterCheckbox.tsx +10 -5
  225. package/src/inputs/MRT_FilterRangeFields.tsx +19 -5
  226. package/src/inputs/MRT_FilterRangeSlider.tsx +10 -4
  227. package/src/inputs/MRT_FilterTextField.tsx +13 -5
  228. package/src/inputs/MRT_GlobalFilterTextField.tsx +27 -10
  229. package/src/inputs/MRT_SelectCheckbox.tsx +14 -7
  230. package/src/locales/az.ts +94 -0
  231. package/src/locales/no.ts +1 -1
  232. package/src/locales/zh-Hans.ts +17 -17
  233. package/src/menus/MRT_ColumnActionMenu.tsx +10 -4
  234. package/src/menus/MRT_FilterOptionMenu.tsx +6 -3
  235. package/src/menus/MRT_RowActionMenu.tsx +10 -4
  236. package/src/menus/MRT_ShowHideColumnsMenu.tsx +10 -4
  237. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +17 -10
  238. package/src/modals/MRT_EditRowModal.tsx +17 -11
  239. package/src/sortingFns.ts +3 -3
  240. package/src/style.utils.ts +149 -0
  241. package/src/table/MRT_Table.tsx +28 -34
  242. package/src/table/MRT_TableContainer.tsx +17 -46
  243. package/src/table/MRT_TableLoadingOverlay.tsx +54 -0
  244. package/src/table/MRT_TablePaper.tsx +13 -6
  245. package/src/table/index.ts +1 -0
  246. package/src/toolbar/MRT_BottomToolbar.tsx +16 -14
  247. package/src/toolbar/MRT_LinearProgressBar.tsx +16 -10
  248. package/src/toolbar/MRT_TablePagination.tsx +20 -10
  249. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +11 -7
  250. package/src/toolbar/MRT_ToolbarDropZone.tsx +8 -4
  251. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +10 -6
  252. package/src/toolbar/MRT_TopToolbar.tsx +11 -24
  253. package/src/types.ts +98 -56
  254. package/src/useMaterialReactTable.ts +8 -7
  255. package/dist/cjs/index.js.map +0 -1
  256. package/dist/cjs/types/MaterialReactTable.d.ts +0 -7
  257. package/dist/cjs/types/body/MRT_TableBody.d.ts +0 -12
  258. package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +0 -15
  259. package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +0 -7
  260. package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +0 -18
  261. package/dist/cjs/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -9
  262. package/dist/cjs/types/body/MRT_TableBodyRowPinButton.d.ts +0 -7
  263. package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +0 -12
  264. package/dist/cjs/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -7
  265. package/dist/cjs/types/buttons/MRT_CopyButton.d.ts +0 -9
  266. package/dist/cjs/types/buttons/MRT_EditActionButtons.d.ts +0 -8
  267. package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +0 -6
  268. package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +0 -7
  269. package/dist/cjs/types/buttons/MRT_RowPinButton.d.ts +0 -9
  270. package/dist/cjs/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
  271. package/dist/cjs/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
  272. package/dist/cjs/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
  273. package/dist/cjs/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
  274. package/dist/cjs/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
  275. package/dist/cjs/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -8
  276. package/dist/cjs/types/column.utils.d.ts +0 -148
  277. package/dist/cjs/types/filterFns.d.ts +0 -68
  278. package/dist/cjs/types/footer/MRT_TableFooter.d.ts +0 -10
  279. package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +0 -7
  280. package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +0 -11
  281. package/dist/cjs/types/head/MRT_TableHead.d.ts +0 -10
  282. package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +0 -7
  283. package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -7
  284. package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -7
  285. package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -7
  286. package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -7
  287. package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -9
  288. package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +0 -11
  289. package/dist/cjs/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
  290. package/dist/cjs/types/hooks/useMRT_Effects.d.ts +0 -2
  291. package/dist/cjs/types/hooks/useMRT_TableInstance.d.ts +0 -2
  292. package/dist/cjs/types/hooks/useMRT_TableOptions.d.ts +0 -2
  293. package/dist/cjs/types/inputs/MRT_EditCellTextField.d.ts +0 -7
  294. package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +0 -7
  295. package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +0 -7
  296. package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +0 -7
  297. package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +0 -8
  298. package/dist/cjs/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -6
  299. package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +0 -8
  300. package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +0 -19
  301. package/dist/cjs/types/menus/MRT_FilterOptionMenu.d.ts +0 -12
  302. package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +0 -11
  303. package/dist/cjs/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -9
  304. package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -11
  305. package/dist/cjs/types/modals/MRT_EditRowModal.d.ts +0 -7
  306. package/dist/cjs/types/sortingFns.d.ts +0 -12
  307. package/dist/cjs/types/table/MRT_Table.d.ts +0 -6
  308. package/dist/cjs/types/table/MRT_TableContainer.d.ts +0 -6
  309. package/dist/cjs/types/table/MRT_TablePaper.d.ts +0 -6
  310. package/dist/cjs/types/toolbar/MRT_BottomToolbar.d.ts +0 -6
  311. package/dist/cjs/types/toolbar/MRT_LinearProgressBar.d.ts +0 -7
  312. package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +0 -7
  313. package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -7
  314. package/dist/cjs/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -6
  315. package/dist/cjs/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -6
  316. package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +0 -21
  317. package/dist/cjs/types/useMaterialReactTable.d.ts +0 -2
  318. package/dist/esm/material-react-table.esm.js.map +0 -1
  319. package/dist/esm/types/MaterialReactTable.d.ts +0 -7
  320. package/dist/esm/types/aggregationFns.d.ts +0 -11
  321. package/dist/esm/types/body/MRT_TableBody.d.ts +0 -12
  322. package/dist/esm/types/body/MRT_TableBodyCell.d.ts +0 -15
  323. package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +0 -7
  324. package/dist/esm/types/body/MRT_TableBodyRow.d.ts +0 -18
  325. package/dist/esm/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -9
  326. package/dist/esm/types/body/MRT_TableBodyRowPinButton.d.ts +0 -7
  327. package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +0 -12
  328. package/dist/esm/types/body/index.d.ts +0 -7
  329. package/dist/esm/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -7
  330. package/dist/esm/types/buttons/MRT_CopyButton.d.ts +0 -9
  331. package/dist/esm/types/buttons/MRT_EditActionButtons.d.ts +0 -8
  332. package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +0 -6
  333. package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +0 -7
  334. package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
  335. package/dist/esm/types/buttons/MRT_RowPinButton.d.ts +0 -9
  336. package/dist/esm/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
  337. package/dist/esm/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
  338. package/dist/esm/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
  339. package/dist/esm/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
  340. package/dist/esm/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
  341. package/dist/esm/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -8
  342. package/dist/esm/types/buttons/index.d.ts +0 -13
  343. package/dist/esm/types/column.utils.d.ts +0 -148
  344. package/dist/esm/types/filterFns.d.ts +0 -68
  345. package/dist/esm/types/footer/MRT_TableFooter.d.ts +0 -10
  346. package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +0 -7
  347. package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +0 -11
  348. package/dist/esm/types/footer/index.d.ts +0 -3
  349. package/dist/esm/types/head/MRT_TableHead.d.ts +0 -10
  350. package/dist/esm/types/head/MRT_TableHeadCell.d.ts +0 -7
  351. package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -7
  352. package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -7
  353. package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -7
  354. package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -9
  355. package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -7
  356. package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -9
  357. package/dist/esm/types/head/MRT_TableHeadRow.d.ts +0 -11
  358. package/dist/esm/types/head/index.d.ts +0 -9
  359. package/dist/esm/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
  360. package/dist/esm/types/hooks/useMRT_Effects.d.ts +0 -2
  361. package/dist/esm/types/hooks/useMRT_TableInstance.d.ts +0 -2
  362. package/dist/esm/types/hooks/useMRT_TableOptions.d.ts +0 -2
  363. package/dist/esm/types/icons.d.ts +0 -36
  364. package/dist/esm/types/index.d.ts +0 -16
  365. package/dist/esm/types/inputs/MRT_EditCellTextField.d.ts +0 -7
  366. package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +0 -7
  367. package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +0 -7
  368. package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +0 -7
  369. package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +0 -8
  370. package/dist/esm/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -6
  371. package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +0 -8
  372. package/dist/esm/types/inputs/index.d.ts +0 -7
  373. package/dist/esm/types/locales/ar.d.ts +0 -2
  374. package/dist/esm/types/locales/bg.d.ts +0 -2
  375. package/dist/esm/types/locales/cs.d.ts +0 -2
  376. package/dist/esm/types/locales/da.d.ts +0 -2
  377. package/dist/esm/types/locales/de.d.ts +0 -2
  378. package/dist/esm/types/locales/en.d.ts +0 -2
  379. package/dist/esm/types/locales/es.d.ts +0 -2
  380. package/dist/esm/types/locales/et.d.ts +0 -2
  381. package/dist/esm/types/locales/fa.d.ts +0 -2
  382. package/dist/esm/types/locales/fi.d.ts +0 -2
  383. package/dist/esm/types/locales/fr.d.ts +0 -2
  384. package/dist/esm/types/locales/hu.d.ts +0 -2
  385. package/dist/esm/types/locales/hy.d.ts +0 -2
  386. package/dist/esm/types/locales/id.d.ts +0 -2
  387. package/dist/esm/types/locales/it.d.ts +0 -2
  388. package/dist/esm/types/locales/ja.d.ts +0 -2
  389. package/dist/esm/types/locales/ko.d.ts +0 -2
  390. package/dist/esm/types/locales/nl.d.ts +0 -2
  391. package/dist/esm/types/locales/no.d.ts +0 -2
  392. package/dist/esm/types/locales/np.d.ts +0 -2
  393. package/dist/esm/types/locales/pl.d.ts +0 -2
  394. package/dist/esm/types/locales/pt-BR.d.ts +0 -2
  395. package/dist/esm/types/locales/pt.d.ts +0 -2
  396. package/dist/esm/types/locales/ro.d.ts +0 -2
  397. package/dist/esm/types/locales/ru.d.ts +0 -2
  398. package/dist/esm/types/locales/sk.d.ts +0 -2
  399. package/dist/esm/types/locales/sr-Cyrl-RS.d.ts +0 -2
  400. package/dist/esm/types/locales/sr-Latn-RS.d.ts +0 -2
  401. package/dist/esm/types/locales/sv.d.ts +0 -2
  402. package/dist/esm/types/locales/tr.d.ts +0 -2
  403. package/dist/esm/types/locales/uk.d.ts +0 -2
  404. package/dist/esm/types/locales/vi.d.ts +0 -2
  405. package/dist/esm/types/locales/zh-Hans.d.ts +0 -2
  406. package/dist/esm/types/locales/zh-Hant.d.ts +0 -2
  407. package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +0 -11
  408. package/dist/esm/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -9
  409. package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -11
  410. package/dist/esm/types/menus/index.d.ts +0 -5
  411. package/dist/esm/types/modals/MRT_EditRowModal.d.ts +0 -7
  412. package/dist/esm/types/modals/index.d.ts +0 -1
  413. package/dist/esm/types/table/MRT_Table.d.ts +0 -6
  414. package/dist/esm/types/table/MRT_TableContainer.d.ts +0 -6
  415. package/dist/esm/types/table/MRT_TablePaper.d.ts +0 -6
  416. package/dist/esm/types/table/index.d.ts +0 -4
  417. package/dist/esm/types/toolbar/MRT_BottomToolbar.d.ts +0 -6
  418. package/dist/esm/types/toolbar/MRT_LinearProgressBar.d.ts +0 -7
  419. package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +0 -7
  420. package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -7
  421. package/dist/esm/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -6
  422. package/dist/esm/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -6
  423. package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +0 -21
  424. package/dist/esm/types/toolbar/index.d.ts +0 -7
  425. package/dist/esm/types/types.d.ts +0 -818
  426. package/dist/esm/types/useMaterialReactTable.d.ts +0 -2
  427. package/locales/ar.esm.d.ts +0 -2
  428. package/locales/ar.esm.js.map +0 -1
  429. package/locales/ar.js.map +0 -1
  430. package/locales/bg.esm.d.ts +0 -2
  431. package/locales/bg.esm.js.map +0 -1
  432. package/locales/bg.js.map +0 -1
  433. package/locales/cs.esm.d.ts +0 -2
  434. package/locales/cs.esm.js.map +0 -1
  435. package/locales/cs.js.map +0 -1
  436. package/locales/da.esm.d.ts +0 -2
  437. package/locales/da.esm.js.map +0 -1
  438. package/locales/da.js.map +0 -1
  439. package/locales/de.esm.d.ts +0 -2
  440. package/locales/de.esm.js.map +0 -1
  441. package/locales/de.js.map +0 -1
  442. package/locales/en.esm.d.ts +0 -2
  443. package/locales/en.esm.js.map +0 -1
  444. package/locales/en.js.map +0 -1
  445. package/locales/es.esm.d.ts +0 -2
  446. package/locales/es.esm.js.map +0 -1
  447. package/locales/es.js.map +0 -1
  448. package/locales/et.esm.d.ts +0 -2
  449. package/locales/et.esm.js.map +0 -1
  450. package/locales/et.js.map +0 -1
  451. package/locales/fa.esm.d.ts +0 -2
  452. package/locales/fa.esm.js.map +0 -1
  453. package/locales/fa.js.map +0 -1
  454. package/locales/fi.esm.d.ts +0 -2
  455. package/locales/fi.esm.js.map +0 -1
  456. package/locales/fi.js.map +0 -1
  457. package/locales/fr.esm.d.ts +0 -2
  458. package/locales/fr.esm.js.map +0 -1
  459. package/locales/fr.js.map +0 -1
  460. package/locales/hu.esm.d.ts +0 -2
  461. package/locales/hu.esm.js.map +0 -1
  462. package/locales/hu.js.map +0 -1
  463. package/locales/hy.esm.d.ts +0 -2
  464. package/locales/hy.esm.js.map +0 -1
  465. package/locales/hy.js.map +0 -1
  466. package/locales/id.esm.d.ts +0 -2
  467. package/locales/id.esm.js.map +0 -1
  468. package/locales/id.js.map +0 -1
  469. package/locales/it.esm.d.ts +0 -2
  470. package/locales/it.esm.js.map +0 -1
  471. package/locales/it.js.map +0 -1
  472. package/locales/ja.esm.d.ts +0 -2
  473. package/locales/ja.esm.js.map +0 -1
  474. package/locales/ja.js.map +0 -1
  475. package/locales/ko.esm.d.ts +0 -2
  476. package/locales/ko.esm.js.map +0 -1
  477. package/locales/ko.js.map +0 -1
  478. package/locales/nl.esm.d.ts +0 -2
  479. package/locales/nl.esm.js.map +0 -1
  480. package/locales/nl.js.map +0 -1
  481. package/locales/no.esm.d.ts +0 -2
  482. package/locales/no.esm.js.map +0 -1
  483. package/locales/no.js.map +0 -1
  484. package/locales/np.esm.d.ts +0 -2
  485. package/locales/np.esm.js.map +0 -1
  486. package/locales/np.js.map +0 -1
  487. package/locales/pl.esm.d.ts +0 -2
  488. package/locales/pl.esm.js.map +0 -1
  489. package/locales/pl.js.map +0 -1
  490. package/locales/pt-BR.esm.d.ts +0 -2
  491. package/locales/pt-BR.esm.js.map +0 -1
  492. package/locales/pt-BR.js.map +0 -1
  493. package/locales/pt.esm.d.ts +0 -2
  494. package/locales/pt.esm.js.map +0 -1
  495. package/locales/pt.js.map +0 -1
  496. package/locales/ro.esm.d.ts +0 -2
  497. package/locales/ro.esm.js.map +0 -1
  498. package/locales/ro.js.map +0 -1
  499. package/locales/ru.esm.d.ts +0 -2
  500. package/locales/ru.esm.js.map +0 -1
  501. package/locales/ru.js.map +0 -1
  502. package/locales/sk.esm.d.ts +0 -2
  503. package/locales/sk.esm.js.map +0 -1
  504. package/locales/sk.js.map +0 -1
  505. package/locales/sr-Cyrl-RS.esm.d.ts +0 -2
  506. package/locales/sr-Cyrl-RS.esm.js.map +0 -1
  507. package/locales/sr-Cyrl-RS.js.map +0 -1
  508. package/locales/sr-Latn-RS.esm.d.ts +0 -2
  509. package/locales/sr-Latn-RS.esm.js.map +0 -1
  510. package/locales/sr-Latn-RS.js.map +0 -1
  511. package/locales/sv.esm.d.ts +0 -2
  512. package/locales/sv.esm.js.map +0 -1
  513. package/locales/sv.js.map +0 -1
  514. package/locales/tr.esm.d.ts +0 -2
  515. package/locales/tr.esm.js.map +0 -1
  516. package/locales/tr.js.map +0 -1
  517. package/locales/uk.esm.d.ts +0 -2
  518. package/locales/uk.esm.js.map +0 -1
  519. package/locales/uk.js.map +0 -1
  520. package/locales/vi.esm.d.ts +0 -2
  521. package/locales/vi.esm.js.map +0 -1
  522. package/locales/vi.js.map +0 -1
  523. package/locales/zh-Hans.esm.d.ts +0 -2
  524. package/locales/zh-Hans.esm.js.map +0 -1
  525. package/locales/zh-Hans.js.map +0 -1
  526. package/locales/zh-Hant.esm.d.ts +0 -2
  527. package/locales/zh-Hant.esm.js.map +0 -1
  528. package/locales/zh-Hant.js.map +0 -1
  529. /package/dist/{cjs/types → types}/aggregationFns.d.ts +0 -0
  530. /package/dist/{cjs/types → types}/body/index.d.ts +0 -0
  531. /package/dist/{cjs/types → types}/buttons/index.d.ts +0 -0
  532. /package/dist/{cjs/types → types}/footer/index.d.ts +0 -0
  533. /package/dist/{cjs/types → types}/head/index.d.ts +0 -0
  534. /package/dist/{cjs/types → types}/icons.d.ts +0 -0
  535. /package/dist/{cjs/types → types}/inputs/index.d.ts +0 -0
  536. /package/dist/{cjs/types → types}/locales/ar.d.ts +0 -0
  537. /package/dist/{cjs/types → types}/locales/bg.d.ts +0 -0
  538. /package/dist/{cjs/types → types}/locales/cs.d.ts +0 -0
  539. /package/dist/{cjs/types → types}/locales/da.d.ts +0 -0
  540. /package/dist/{cjs/types → types}/locales/de.d.ts +0 -0
  541. /package/dist/{cjs/types → types}/locales/en.d.ts +0 -0
  542. /package/dist/{cjs/types → types}/locales/es.d.ts +0 -0
  543. /package/dist/{cjs/types → types}/locales/et.d.ts +0 -0
  544. /package/dist/{cjs/types → types}/locales/fa.d.ts +0 -0
  545. /package/dist/{cjs/types → types}/locales/fi.d.ts +0 -0
  546. /package/dist/{cjs/types → types}/locales/fr.d.ts +0 -0
  547. /package/dist/{cjs/types → types}/locales/hu.d.ts +0 -0
  548. /package/dist/{cjs/types → types}/locales/hy.d.ts +0 -0
  549. /package/dist/{cjs/types → types}/locales/id.d.ts +0 -0
  550. /package/dist/{cjs/types → types}/locales/it.d.ts +0 -0
  551. /package/dist/{cjs/types → types}/locales/ja.d.ts +0 -0
  552. /package/dist/{cjs/types → types}/locales/ko.d.ts +0 -0
  553. /package/dist/{cjs/types → types}/locales/nl.d.ts +0 -0
  554. /package/dist/{cjs/types → types}/locales/np.d.ts +0 -0
  555. /package/dist/{cjs/types → types}/locales/pl.d.ts +0 -0
  556. /package/dist/{cjs/types → types}/locales/pt-BR.d.ts +0 -0
  557. /package/dist/{cjs/types → types}/locales/pt.d.ts +0 -0
  558. /package/dist/{cjs/types → types}/locales/ro.d.ts +0 -0
  559. /package/dist/{cjs/types → types}/locales/ru.d.ts +0 -0
  560. /package/dist/{cjs/types → types}/locales/sk.d.ts +0 -0
  561. /package/dist/{cjs/types → types}/locales/sr-Cyrl-RS.d.ts +0 -0
  562. /package/dist/{cjs/types → types}/locales/sr-Latn-RS.d.ts +0 -0
  563. /package/dist/{cjs/types → types}/locales/sv.d.ts +0 -0
  564. /package/dist/{cjs/types → types}/locales/tr.d.ts +0 -0
  565. /package/dist/{cjs/types → types}/locales/uk.d.ts +0 -0
  566. /package/dist/{cjs/types → types}/locales/vi.d.ts +0 -0
  567. /package/dist/{cjs/types → types}/locales/zh-Hans.d.ts +0 -0
  568. /package/dist/{cjs/types → types}/locales/zh-Hant.d.ts +0 -0
  569. /package/dist/{cjs/types → types}/menus/index.d.ts +0 -0
  570. /package/dist/{cjs/types → types}/modals/index.d.ts +0 -0
  571. /package/dist/{cjs/types → types}/toolbar/index.d.ts +0 -0
@@ -5,21 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var Paper = require('@mui/material/Paper');
7
7
  var react = require('react');
8
- var Box = require('@mui/material/Box');
9
- var CircularProgress = require('@mui/material/CircularProgress');
10
8
  var TableContainer = require('@mui/material/TableContainer');
11
- var styles = require('@mui/material/styles');
12
9
  var reactVirtual = require('@tanstack/react-virtual');
13
10
  var Table = require('@mui/material/Table');
14
11
  var TableBody = require('@mui/material/TableBody');
15
12
  var Typography = require('@mui/material/Typography');
16
13
  var TableRow = require('@mui/material/TableRow');
14
+ var styles = require('@mui/material/styles');
17
15
  var Skeleton = require('@mui/material/Skeleton');
18
16
  var TableCell = require('@mui/material/TableCell');
17
+ var Box = require('@mui/material/Box');
18
+ var reactTable = require('@tanstack/react-table');
19
19
  var highlightWords = require('highlight-words');
20
20
  var IconButton = require('@mui/material/IconButton');
21
21
  var Tooltip = require('@mui/material/Tooltip');
22
- var reactTable = require('@tanstack/react-table');
23
22
  var Button = require('@mui/material/Button');
24
23
  var MenuItem = require('@mui/material/MenuItem');
25
24
  var TextField = require('@mui/material/TextField');
@@ -27,6 +26,7 @@ var Collapse = require('@mui/material/Collapse');
27
26
  var matchSorterUtils = require('@tanstack/match-sorter-utils');
28
27
  var TableFooter = require('@mui/material/TableFooter');
29
28
  var TableHead = require('@mui/material/TableHead');
29
+ var material = require('@mui/material');
30
30
  var ListItemIcon = require('@mui/material/ListItemIcon');
31
31
  var Menu = require('@mui/material/Menu');
32
32
  var Checkbox = require('@mui/material/Checkbox');
@@ -44,7 +44,6 @@ var Popover = require('@mui/material/Popover');
44
44
  var Divider = require('@mui/material/Divider');
45
45
  var Badge = require('@mui/material/Badge');
46
46
  var TableSortLabel = require('@mui/material/TableSortLabel');
47
- var Toolbar = require('@mui/material/Toolbar');
48
47
  var useMediaQuery = require('@mui/material/useMediaQuery');
49
48
  var LinearProgress = require('@mui/material/LinearProgress');
50
49
  var InputLabel = require('@mui/material/InputLabel');
@@ -56,6 +55,7 @@ var AlertTitle = require('@mui/material/AlertTitle');
56
55
  var Radio = require('@mui/material/Radio');
57
56
  var Fade = require('@mui/material/Fade');
58
57
  var Switch = require('@mui/material/Switch');
58
+ var CircularProgress = require('@mui/material/CircularProgress');
59
59
  var Dialog = require('@mui/material/Dialog');
60
60
  var DialogActions = require('@mui/material/DialogActions');
61
61
  var DialogContent = require('@mui/material/DialogContent');
@@ -97,8 +97,6 @@ var VisibilityOffIcon = require('@mui/icons-material/VisibilityOff');
97
97
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
98
98
 
99
99
  var Paper__default = /*#__PURE__*/_interopDefaultLegacy(Paper);
100
- var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
101
- var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
102
100
  var TableContainer__default = /*#__PURE__*/_interopDefaultLegacy(TableContainer);
103
101
  var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
104
102
  var TableBody__default = /*#__PURE__*/_interopDefaultLegacy(TableBody);
@@ -106,6 +104,7 @@ var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
106
104
  var TableRow__default = /*#__PURE__*/_interopDefaultLegacy(TableRow);
107
105
  var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
108
106
  var TableCell__default = /*#__PURE__*/_interopDefaultLegacy(TableCell);
107
+ var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
109
108
  var highlightWords__default = /*#__PURE__*/_interopDefaultLegacy(highlightWords);
110
109
  var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
111
110
  var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
@@ -130,7 +129,6 @@ var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
130
129
  var Divider__default = /*#__PURE__*/_interopDefaultLegacy(Divider);
131
130
  var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
132
131
  var TableSortLabel__default = /*#__PURE__*/_interopDefaultLegacy(TableSortLabel);
133
- var Toolbar__default = /*#__PURE__*/_interopDefaultLegacy(Toolbar);
134
132
  var useMediaQuery__default = /*#__PURE__*/_interopDefaultLegacy(useMediaQuery);
135
133
  var LinearProgress__default = /*#__PURE__*/_interopDefaultLegacy(LinearProgress);
136
134
  var InputLabel__default = /*#__PURE__*/_interopDefaultLegacy(InputLabel);
@@ -142,6 +140,7 @@ var AlertTitle__default = /*#__PURE__*/_interopDefaultLegacy(AlertTitle);
142
140
  var Radio__default = /*#__PURE__*/_interopDefaultLegacy(Radio);
143
141
  var Fade__default = /*#__PURE__*/_interopDefaultLegacy(Fade);
144
142
  var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
143
+ var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
145
144
  var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
146
145
  var DialogActions__default = /*#__PURE__*/_interopDefaultLegacy(DialogActions);
147
146
  var DialogContent__default = /*#__PURE__*/_interopDefaultLegacy(DialogContent);
@@ -180,73 +179,31 @@ var SyncAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(SyncAltIcon);
180
179
  var ViewColumnIcon__default = /*#__PURE__*/_interopDefaultLegacy(ViewColumnIcon);
181
180
  var VisibilityOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(VisibilityOffIcon);
182
181
 
183
- const allowedTypes = ['string', 'number'];
184
- const MRT_TableBodyCellValue = ({ cell, table, }) => {
185
- var _a, _b, _c;
186
- const { getState, options: { enableFilterMatchHighlighting }, } = table;
187
- const { column, row } = cell;
188
- const { columnDef } = column;
189
- const { globalFilter, globalFilterFn } = getState();
190
- const filterValue = column.getFilterValue();
191
- let renderedCellValue = cell.getIsAggregated() && columnDef.AggregatedCell
192
- ? columnDef.AggregatedCell({
193
- cell,
194
- column,
195
- row,
196
- table,
197
- })
198
- : row.getIsGrouped() && !cell.getIsGrouped()
199
- ? null
200
- : cell.getIsGrouped() && columnDef.GroupedCell
201
- ? columnDef.GroupedCell({
202
- cell,
203
- column,
204
- row,
205
- table,
206
- })
207
- : undefined;
208
- const isGroupedValue = renderedCellValue !== undefined;
209
- if (!isGroupedValue) {
210
- renderedCellValue = cell.renderValue();
211
- }
212
- if (enableFilterMatchHighlighting &&
213
- columnDef.enableFilterMatchHighlighting !== false &&
214
- renderedCellValue &&
215
- allowedTypes.includes(typeof renderedCellValue) &&
216
- ((filterValue &&
217
- allowedTypes.includes(typeof filterValue) &&
218
- columnDef.filterVariant === 'text') ||
219
- (globalFilter &&
220
- allowedTypes.includes(typeof globalFilter) &&
221
- column.getCanGlobalFilter()))) {
222
- const chunks = highlightWords__default["default"] === null || highlightWords__default["default"] === void 0 ? void 0 : highlightWords__default["default"]({
223
- matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
224
- query: ((_a = filterValue !== null && filterValue !== void 0 ? filterValue : globalFilter) !== null && _a !== void 0 ? _a : '').toString(),
225
- text: renderedCellValue === null || renderedCellValue === void 0 ? void 0 : renderedCellValue.toString(),
226
- });
227
- 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)) {
228
- renderedCellValue = (jsxRuntime.jsx("span", { "aria-label": renderedCellValue, role: "note", children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsxRuntime.jsx(Box__default["default"], { "aria-hidden": "true", component: "span", sx: match
229
- ? {
230
- backgroundColor: (theme) => theme.palette.mode === 'dark'
231
- ? styles.darken(theme.palette.warning.dark, 0.25)
232
- : styles.lighten(theme.palette.warning.light, 0.5),
233
- borderRadius: '2px',
234
- color: (theme) => theme.palette.mode === 'dark' ? 'white' : 'black',
235
- padding: '2px 1px',
236
- }
237
- : undefined, children: text }, key)))) !== null && _c !== void 0 ? _c : renderedCellValue }));
238
- }
239
- }
240
- if (columnDef.Cell && !isGroupedValue) {
241
- renderedCellValue = columnDef.Cell({
242
- cell,
243
- column,
244
- renderedCellValue,
245
- row,
246
- table,
247
- });
248
- }
249
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderedCellValue });
182
+ /******************************************************************************
183
+ Copyright (c) Microsoft Corporation.
184
+
185
+ Permission to use, copy, modify, and/or distribute this software for any
186
+ purpose with or without fee is hereby granted.
187
+
188
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
189
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
190
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
191
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
192
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
193
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
194
+ PERFORMANCE OF THIS SOFTWARE.
195
+ ***************************************************************************** */
196
+ function __rest(s, e) {
197
+ var t = {};
198
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
199
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
200
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
201
+ }
202
+ return t;
203
+ }
204
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
205
+ var e = new Error(message);
206
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
250
207
  };
251
208
 
252
209
  const getColumnId = (columnDef) => { var _a, _b, _c, _d; return (_d = (_a = columnDef.id) !== null && _a !== void 0 ? _a : (_c = (_b = columnDef.accessorKey) === null || _b === void 0 ? void 0 : _b.toString) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : columnDef.header; };
@@ -340,7 +297,6 @@ const getLeadingDisplayColumnIds = (props) => {
340
297
  'mrt-row-expand',
341
298
  props.enableRowSelection && 'mrt-row-select',
342
299
  props.enableRowNumbers && 'mrt-row-numbers',
343
- props.layoutMode === 'grid-no-grow' && 'mrt-row-spacer',
344
300
  ].filter(Boolean);
345
301
  };
346
302
  const getTrailingDisplayColumnIds = (props) => {
@@ -354,6 +310,7 @@ const getTrailingDisplayColumnIds = (props) => {
354
310
  props.positionExpandColumn === 'last' &&
355
311
  showExpandColumn(props) &&
356
312
  'mrt-row-expand',
313
+ props.layoutMode === 'grid-no-grow' && 'mrt-row-spacer',
357
314
  ].filter(Boolean);
358
315
  };
359
316
  const getDefaultColumnOrderIds = (props) => {
@@ -415,7 +372,41 @@ const getCanRankRows = (table) => {
415
372
  expanded !== true &&
416
373
  !Object.values(expanded).some(Boolean));
417
374
  };
418
- const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
375
+ const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
376
+ const flexRender = reactTable.flexRender;
377
+ const createRow = (table, originalRow) => reactTable.createRow(table, 'mrt-row-create', originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
378
+ [getColumnId(col)]: '',
379
+ }))), -1, 0);
380
+ const extraIndexRangeExtractor = (range, draggingIndex) => {
381
+ const newIndexes = reactVirtual.defaultRangeExtractor(range);
382
+ if (draggingIndex >= 0 &&
383
+ draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {
384
+ newIndexes.unshift(draggingIndex);
385
+ }
386
+ if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {
387
+ newIndexes.push(draggingIndex);
388
+ }
389
+ return newIndexes;
390
+ };
391
+ function createMRTColumnHelper() {
392
+ return {
393
+ accessor: (accessor, column) => {
394
+ return typeof accessor === 'function'
395
+ ? Object.assign(Object.assign({}, column), { accessorFn: accessor })
396
+ : Object.assign(Object.assign({}, column), { accessorKey: accessor });
397
+ },
398
+ display: (column) => column,
399
+ group: (column) => column,
400
+ };
401
+ }
402
+
403
+ const parseCSSVarId = (id) => id.replace(/[^a-zA-Z0-9]/g, '_');
404
+ const getMRTTheme = (table, theme) => (Object.assign({ baseBackgroundColor: theme.palette.mode === 'dark'
405
+ ? styles.lighten(theme.palette.background.default, 0.05)
406
+ : theme.palette.background.default, draggingBorderColor: theme.palette.primary.main, matchHighlightColor: theme.palette.mode === 'dark'
407
+ ? styles.darken(theme.palette.warning.dark, 0.25)
408
+ : styles.lighten(theme.palette.warning.light, 0.5), pinnedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.1), selectedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.2) }, parseFromValuesOrFunc(table.options.mrtTheme, theme)));
409
+ const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
419
410
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
420
411
  const { options: { layoutMode }, } = table;
421
412
  const widthStyles = {
@@ -429,11 +420,11 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
429
420
  widthStyles.flex = '0 0 auto';
430
421
  }
431
422
  return Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
432
- ? styles.alpha(styles.lighten(theme.palette.background.default, 0.04), 0.97)
423
+ ? styles.alpha(styles.darken(getMRTTheme(table, theme).baseBackgroundColor, theme.palette.mode === 'dark' ? 0.05 : 0.01), 0.97)
433
424
  : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
434
- ? `-4px 0 8px -6px ${styles.alpha(theme.palette.common.black, 0.2)} inset`
425
+ ? `-4px 0 8px -6px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
435
426
  : getIsFirstRightPinnedColumn(column)
436
- ? `4px 0 8px -6px ${styles.alpha(theme.palette.common.black, 0.2)} inset`
427
+ ? `4px 0 8px -6px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
437
428
  : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, left: column.getIsPinned() === 'left'
438
429
  ? `${column.getStart('left')}px`
439
430
  : undefined, ml: table.options.enableColumnVirtualization &&
@@ -458,65 +449,111 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
458
449
  ? 'none'
459
450
  : `padding 150ms ease-in-out` }, widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
460
451
  };
461
- const MRT_DefaultColumn = {
462
- filterVariant: 'text',
463
- maxSize: 1000,
464
- minSize: 40,
465
- size: 180,
466
- };
467
- const MRT_DefaultDisplayColumn = {
468
- columnDefType: 'display',
469
- enableClickToCopy: false,
470
- enableColumnActions: false,
471
- enableColumnDragging: false,
472
- enableColumnFilter: false,
473
- enableColumnOrdering: false,
474
- enableEditing: false,
475
- enableGlobalFilter: false,
476
- enableGrouping: false,
477
- enableHiding: false,
478
- enableResizing: false,
479
- enableSorting: false,
480
- };
481
- const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
482
- const parseCSSVarId = (id) => id.replace(/[^a-zA-Z0-9]/g, '_');
483
- const flexRender = reactTable.flexRender;
484
- const createRow = (table, originalRow) => reactTable.createRow(table, 'mrt-row-create', originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
485
- [getColumnId(col)]: '',
486
- }))), -1, 0);
487
- const extraIndexRangeExtractor = (range, draggingIndex) => {
488
- const newIndexs = reactVirtual.defaultRangeExtractor(range);
489
- if (draggingIndex >= 0 &&
490
- draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {
491
- newIndexs.unshift(draggingIndex);
452
+ const getCommonToolbarStyles = ({ table, theme, }) => ({
453
+ alignItems: 'flex-start',
454
+ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor,
455
+ display: 'grid',
456
+ flexWrap: 'wrap-reverse',
457
+ minHeight: '3.5rem',
458
+ overflow: 'hidden',
459
+ position: 'relative',
460
+ transition: 'all 150ms ease-in-out',
461
+ zIndex: 1,
462
+ });
463
+
464
+ const allowedTypes = ['string', 'number'];
465
+ const MRT_TableBodyCellValue = ({ cell, table, }) => {
466
+ var _a, _b, _c;
467
+ const { getState, options: { enableFilterMatchHighlighting }, } = table;
468
+ const { column, row } = cell;
469
+ const { columnDef } = column;
470
+ const { globalFilter, globalFilterFn } = getState();
471
+ const filterValue = column.getFilterValue();
472
+ let renderedCellValue = cell.getIsAggregated() && columnDef.AggregatedCell
473
+ ? columnDef.AggregatedCell({
474
+ cell,
475
+ column,
476
+ row,
477
+ table,
478
+ })
479
+ : row.getIsGrouped() && !cell.getIsGrouped()
480
+ ? null
481
+ : cell.getIsGrouped() && columnDef.GroupedCell
482
+ ? columnDef.GroupedCell({
483
+ cell,
484
+ column,
485
+ row,
486
+ table,
487
+ })
488
+ : undefined;
489
+ const isGroupedValue = renderedCellValue !== undefined;
490
+ if (!isGroupedValue) {
491
+ renderedCellValue = cell.renderValue();
492
492
  }
493
- if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {
494
- newIndexs.push(draggingIndex);
493
+ if (enableFilterMatchHighlighting &&
494
+ columnDef.enableFilterMatchHighlighting !== false &&
495
+ renderedCellValue &&
496
+ allowedTypes.includes(typeof renderedCellValue) &&
497
+ ((filterValue &&
498
+ allowedTypes.includes(typeof filterValue) &&
499
+ columnDef.filterVariant === 'text') ||
500
+ (globalFilter &&
501
+ allowedTypes.includes(typeof globalFilter) &&
502
+ column.getCanGlobalFilter()))) {
503
+ const chunks = highlightWords__default["default"] === null || highlightWords__default["default"] === void 0 ? void 0 : highlightWords__default["default"]({
504
+ matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
505
+ query: ((_a = filterValue !== null && filterValue !== void 0 ? filterValue : globalFilter) !== null && _a !== void 0 ? _a : '').toString(),
506
+ text: renderedCellValue === null || renderedCellValue === void 0 ? void 0 : renderedCellValue.toString(),
507
+ });
508
+ 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)) {
509
+ renderedCellValue = (jsxRuntime.jsx("span", { "aria-label": renderedCellValue, role: "note", children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsxRuntime.jsx(Box__default["default"], { "aria-hidden": "true", component: "span", sx: match
510
+ ? {
511
+ backgroundColor: (theme) => getMRTTheme(table, theme).matchHighlightColor,
512
+ borderRadius: '2px',
513
+ color: (theme) => theme.palette.mode === 'dark'
514
+ ? theme.palette.common.white
515
+ : theme.palette.common.black,
516
+ padding: '2px 1px',
517
+ }
518
+ : undefined, children: text }, key)))) !== null && _c !== void 0 ? _c : renderedCellValue }));
519
+ }
520
+ }
521
+ if (columnDef.Cell && !isGroupedValue) {
522
+ renderedCellValue = columnDef.Cell({
523
+ cell,
524
+ column,
525
+ renderedCellValue,
526
+ row,
527
+ table,
528
+ });
495
529
  }
496
- return newIndexs;
530
+ return renderedCellValue;
497
531
  };
498
532
 
499
- const MRT_GrabHandleButton = ({ iconButtonProps, location, onDragEnd, onDragStart, table, }) => {
500
- var _a;
533
+ const MRT_GrabHandleButton = (_a) => {
534
+ var _b;
535
+ var { iconButtonProps, location, onDragEnd, onDragStart, table } = _a, rest = __rest(_a, ["iconButtonProps", "location", "onDragEnd", "onDragStart", "table"]);
501
536
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
502
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.move, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ disableRipple: true, draggable: "true", size: "small" }, iconButtonProps, { onClick: (e) => {
537
+ const _iconButtonProps = Object.assign(Object.assign({}, iconButtonProps), rest);
538
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.move, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ disableRipple: true, draggable: "true", size: "small" }, _iconButtonProps, { onClick: (e) => {
503
539
  var _a;
504
540
  e.stopPropagation();
505
- (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, e);
541
+ (_a = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(_iconButtonProps, e);
506
542
  }, onDragEnd: onDragEnd, onDragStart: onDragStart, sx: (theme) => (Object.assign({ '&:active': {
507
543
  cursor: 'grabbing',
508
544
  }, '&:hover': {
509
545
  backgroundColor: 'transparent',
510
546
  opacity: 1,
511
- }, cursor: 'grab', m: '0 -0.1rem', opacity: location === 'row' ? 1 : 0.3, p: '2px', transition: 'all 150ms ease-in-out' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsxRuntime.jsx(DragHandleIcon, {}) })) }));
547
+ }, cursor: 'grab', m: '0 -0.1rem', opacity: location === 'row' ? 1 : 0.3, p: '2px', transition: 'all 150ms ease-in-out' }, parseFromValuesOrFunc(_iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.sx, theme))), title: undefined, children: jsxRuntime.jsx(DragHandleIcon, {}) })) }));
512
548
  };
513
549
 
514
- const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
550
+ const MRT_TableBodyRowGrabHandle = (_a) => {
551
+ var { row, rowRef, table } = _a, rest = __rest(_a, ["row", "rowRef", "table"]);
515
552
  const { options: { muiRowDragHandleProps }, } = table;
516
- const iconButtonProps = parseFromValuesOrFunc(muiRowDragHandleProps, {
553
+ const iconButtonProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiRowDragHandleProps, {
517
554
  row,
518
555
  table,
519
- });
556
+ })), rest);
520
557
  const handleDragStart = (event) => {
521
558
  var _a;
522
559
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onDragStart) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
@@ -532,8 +569,9 @@ const MRT_TableBodyRowGrabHandle = ({ row, rowRef, table, }) => {
532
569
  return (jsxRuntime.jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, location: "row", onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
533
570
  };
534
571
 
535
- const MRT_CopyButton = ({ cell, children, table, }) => {
536
- var _a;
572
+ const MRT_CopyButton = (_a) => {
573
+ var _b;
574
+ var { cell, table } = _a, rest = __rest(_a, ["cell", "table"]);
537
575
  const { options: { localization, muiCopyButtonProps }, } = table;
538
576
  const { column, row } = cell;
539
577
  const { columnDef } = column;
@@ -544,7 +582,7 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
544
582
  setCopied(true);
545
583
  setTimeout(() => setCopied(false), 4000);
546
584
  };
547
- const buttonProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiCopyButtonProps, {
585
+ const buttonProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiCopyButtonProps, {
548
586
  cell,
549
587
  column,
550
588
  row,
@@ -554,12 +592,13 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
554
592
  column,
555
593
  row,
556
594
  table,
557
- }));
558
- return (jsxRuntime.jsx(Tooltip__default["default"], { 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: jsxRuntime.jsx(Button__default["default"], 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' }, parseFromValuesOrFunc(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx, theme))), title: undefined, children: children })) }));
595
+ })), rest);
596
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _b !== void 0 ? _b : (copied ? localization.copiedToClipboard : localization.clickToCopy), children: jsxRuntime.jsx(Button__default["default"], 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' }, parseFromValuesOrFunc(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx, theme))), title: undefined })) }));
559
597
  };
560
598
 
561
- const MRT_EditCellTextField = ({ cell, table, }) => {
562
- var _a, _b, _c;
599
+ const MRT_EditCellTextField = (_a) => {
600
+ var _b, _c, _d;
601
+ var { cell, table } = _a, rest = __rest(_a, ["cell", "table"]);
563
602
  const { getState, options: { createDisplayMode, editDisplayMode, muiEditTextFieldProps }, refs: { editInputRefs }, setCreatingRow, setEditingCell, setEditingRow, } = table;
564
603
  const { column, row } = cell;
565
604
  const { columnDef } = column;
@@ -568,7 +607,7 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
568
607
  const isEditing = (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) === row.id;
569
608
  const isSelectEdit = columnDef.editVariant === 'select';
570
609
  const [value, setValue] = react.useState(() => cell.getValue());
571
- const textFieldProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditTextFieldProps, {
610
+ const textFieldProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditTextFieldProps, {
572
611
  cell,
573
612
  column,
574
613
  row,
@@ -578,7 +617,7 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
578
617
  column,
579
618
  row,
580
619
  table,
581
- }));
620
+ })), rest);
582
621
  const saveInputValueToRowCache = (newValue) => {
583
622
  //@ts-ignore
584
623
  row._valuesCache[column.id] = newValue;
@@ -611,7 +650,7 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
611
650
  }
612
651
  };
613
652
  if (columnDef.Edit) {
614
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: (_a = columnDef.Edit) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table }) });
653
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: (_b = columnDef.Edit) === null || _b === void 0 ? void 0 : _b.call(columnDef, { cell, column, row, table }) });
615
654
  }
616
655
  return (jsxRuntime.jsx(TextField__default["default"], Object.assign({ disabled: parseFromValuesOrFunc(columnDef.enableEditing, row) === false, fullWidth: true, inputRef: (inputRef) => {
617
656
  if (inputRef) {
@@ -620,15 +659,18 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
620
659
  textFieldProps.inputRef = inputRef;
621
660
  }
622
661
  }
623
- }, label: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
662
+ }, label: ['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
624
663
  ? columnDef.header
625
664
  : undefined, margin: "none", name: column.id, placeholder: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
626
665
  ? columnDef.header
627
- : undefined, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { InputProps: Object.assign({ disableUnderline: editDisplayMode === 'table' }, textFieldProps.InputProps), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
666
+ : undefined, select: isSelectEdit, size: "small", value: value, variant: "standard" }, textFieldProps, { InputProps: Object.assign(Object.assign({ disableUnderline: editDisplayMode === 'table' }, textFieldProps.InputProps), { sx: (theme) => {
667
+ var _a;
668
+ return (Object.assign({ mb: 0 }, parseFromValuesOrFunc((_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.sx, theme)));
669
+ } }), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
628
670
  var _a;
629
671
  e.stopPropagation();
630
672
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
631
- }, 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) => {
673
+ }, onKeyDown: handleEnterKeyDown, children: (_c = textFieldProps.children) !== null && _c !== void 0 ? _c : (_d = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _d === void 0 ? void 0 : _d.map((option) => {
632
674
  let value;
633
675
  let text;
634
676
  if (typeof option !== 'object') {
@@ -648,31 +690,24 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
648
690
  }) })));
649
691
  };
650
692
 
651
- const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualCell, }) => {
652
- var _a, _b, _c, _d;
693
+ const MRT_TableBodyCell = (_a) => {
694
+ var _b, _c, _d, _e, _f;
695
+ var { cell, measureElement, numRows, rowIndex, rowRef, table, virtualIndex } = _a, rest = __rest(_a, ["cell", "measureElement", "numRows", "rowIndex", "rowRef", "table", "virtualIndex"]);
653
696
  const theme = styles.useTheme();
654
697
  const { getState, options: { createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, enableRowNumbers, layoutMode, muiSkeletonProps, muiTableBodyCellProps, rowNumberMode, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
655
698
  const { columnSizingInfo, creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
656
699
  const { column, row } = cell;
657
700
  const { columnDef } = column;
658
701
  const { columnDefType } = columnDef;
659
- const tableCellProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableBodyCellProps, {
660
- cell,
661
- column,
662
- row,
663
- table,
664
- })), parseFromValuesOrFunc(columnDef.muiTableBodyCellProps, {
665
- cell,
666
- column,
667
- row,
668
- table,
669
- }));
702
+ const args = { cell, column, row, table };
703
+ const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableBodyCellProps, args)), parseFromValuesOrFunc(columnDef.muiTableBodyCellProps, args)), rest);
670
704
  const skeletonProps = parseFromValuesOrFunc(muiSkeletonProps, {
671
705
  cell,
672
706
  column,
673
707
  row,
674
708
  table,
675
709
  });
710
+ const { draggingBorderColor } = getMRTTheme(table, theme);
676
711
  const [skeletonWidth, setSkeletonWidth] = react.useState(100);
677
712
  react.useEffect(() => {
678
713
  if ((!isLoading && !showSkeletons) || skeletonWidth !== 100)
@@ -690,13 +725,15 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
690
725
  const isFirstColumn = getIsFirstColumn(column, table);
691
726
  const isLastColumn = getIsLastColumn(column, table);
692
727
  const isLastRow = numRows && rowIndex === numRows - 1;
693
- const borderStyle = isDraggingColumn || isDraggingRow
694
- ? `1px dashed ${theme.palette.text.secondary} !important`
695
- : isHoveredColumn ||
696
- isHoveredRow ||
697
- columnSizingInfo.isResizingColumn === column.id
698
- ? `2px dashed ${theme.palette.primary.main} !important`
699
- : undefined;
728
+ const borderStyle = columnSizingInfo.isResizingColumn === column.id
729
+ ? `2px solid ${draggingBorderColor} !important`
730
+ : isDraggingColumn || isDraggingRow
731
+ ? `1px dashed ${theme.palette.grey[500]} !important`
732
+ : isHoveredColumn ||
733
+ isHoveredRow ||
734
+ columnSizingInfo.isResizingColumn === column.id
735
+ ? `2px dashed ${draggingBorderColor} !important`
736
+ : undefined;
700
737
  if (columnSizingInfo.isResizingColumn === column.id) {
701
738
  return { borderRight: borderStyle };
702
739
  }
@@ -760,13 +797,13 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
760
797
  setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
761
798
  }
762
799
  };
763
- return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ "data-index": virtualCell === null || virtualCell === void 0 ? void 0 : virtualCell.index, ref: (node) => {
800
+ return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ "data-index": virtualIndex, ref: (node) => {
764
801
  if (node) {
765
802
  measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
766
803
  }
767
804
  } }, tableCellProps, { onDoubleClick: handleDoubleClick, onDragEnter: handleDragEnter, sx: (theme) => (Object.assign(Object.assign({ '&:hover': {
768
- outline: ['cell', 'table'].includes(editDisplayMode !== null && editDisplayMode !== void 0 ? editDisplayMode : '')
769
- ? `1px solid ${theme.palette.text.secondary}`
805
+ outline: ['cell', 'table'].includes(editDisplayMode !== null && editDisplayMode !== void 0 ? editDisplayMode : '') && isEditable
806
+ ? `1px solid ${theme.palette.grey[500]}`
770
807
  : undefined,
771
808
  outlineOffset: '-1px',
772
809
  textOverflow: 'clip',
@@ -782,35 +819,36 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
782
819
  : '1rem'
783
820
  : columnDefType === 'display'
784
821
  ? '1rem 1.25rem'
785
- : '1.5rem', pl: column.id === 'mrt-row-expand'
822
+ : '1.5rem', textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, [theme.direction === 'rtl' ? 'pr' : 'pl']: column.id === 'mrt-row-expand'
786
823
  ? `${row.depth +
787
824
  (density === 'compact'
788
825
  ? 0.5
789
826
  : density === 'comfortable'
790
827
  ? 0.75
791
828
  : 1.25)}rem`
792
- : undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 }, getCommonCellStyles({
829
+ : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 }, getCommonMRTCellStyles({
793
830
  column,
794
831
  table,
795
832
  tableCellProps,
796
833
  theme,
797
- })), draggingBorders)), children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [cell.getIsPlaceholder() ? ((_b = (_a = columnDef.PlaceholderCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) !== null && _b !== void 0 ? _b : null) : isLoading || showSkeletons ? (jsxRuntime.jsx(Skeleton__default["default"], Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
834
+ })), draggingBorders)), children: (_b = tableCellProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [cell.getIsPlaceholder() ? ((_d = (_c = columnDef.PlaceholderCell) === null || _c === void 0 ? void 0 : _c.call(columnDef, { cell, column, row, table })) !== null && _d !== void 0 ? _d : null) : showSkeletons !== false && (isLoading || showSkeletons) ? (jsxRuntime.jsx(Skeleton__default["default"], Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
798
835
  rowNumberMode === 'static' &&
799
836
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
800
837
  (column.id === 'mrt-row-select' ||
801
838
  column.id === 'mrt-row-expand' ||
802
- !row.getIsGrouped()) ? ((_c = columnDef.Cell) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
839
+ !row.getIsGrouped()) ? ((_e = columnDef.Cell) === null || _e === void 0 ? void 0 : _e.call(columnDef, {
803
840
  cell,
804
841
  column,
805
842
  renderedCellValue: cell.renderValue(),
806
843
  row,
807
844
  table,
808
845
  })) : isCreating || isEditing ? (jsxRuntime.jsx(MRT_EditCellTextField, { cell: cell, table: table })) : (enableClickToCopy || columnDef.enableClickToCopy) &&
809
- columnDef.enableClickToCopy !== false ? (jsxRuntime.jsx(MRT_CopyButton, { cell: cell, table: table, children: jsxRuntime.jsx(MRT_TableBodyCellValue, { cell: cell, table: table }) })) : (jsxRuntime.jsx(MRT_TableBodyCellValue, { cell: cell, table: table })), cell.getIsGrouped() && !columnDef.GroupedCell && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" (", (_d = row.subRows) === null || _d === void 0 ? void 0 : _d.length, ")"] }))] }) })));
846
+ columnDef.enableClickToCopy !== false ? (jsxRuntime.jsx(MRT_CopyButton, { cell: cell, table: table, children: jsxRuntime.jsx(MRT_TableBodyCellValue, { cell: cell, table: table }) })) : (jsxRuntime.jsx(MRT_TableBodyCellValue, { cell: cell, table: table })), cell.getIsGrouped() && !columnDef.GroupedCell && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" (", (_f = row.subRows) === null || _f === void 0 ? void 0 : _f.length, ")"] }))] })) })));
810
847
  };
811
848
  const Memo_MRT_TableBodyCell = react.memo(MRT_TableBodyCell, (prev, next) => next.cell === prev.cell);
812
849
 
813
- const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow, }) => {
850
+ const MRT_TableDetailPanel = (_a) => {
851
+ var { parentRowRef, row, rowIndex, table, virtualRow } = _a, rest = __rest(_a, ["parentRowRef", "row", "rowIndex", "table", "virtualRow"]);
814
852
  const { getState, getVisibleLeafColumns, options: { layoutMode, muiDetailPanelProps, muiTableBodyRowProps, renderDetailPanel, }, } = table;
815
853
  const { isLoading } = getState();
816
854
  const tableRowProps = parseFromValuesOrFunc(muiTableBodyRowProps, {
@@ -819,10 +857,10 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
819
857
  staticRowIndex: rowIndex,
820
858
  table,
821
859
  });
822
- const tableCellProps = parseFromValuesOrFunc(muiDetailPanelProps, {
860
+ const tableCellProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiDetailPanelProps, {
823
861
  row,
824
862
  table,
825
- });
863
+ })), rest);
826
864
  return (jsxRuntime.jsx(TableRow__default["default"], Object.assign({ className: "Mui-TableBodyCell-DetailPanel" }, tableRowProps, { sx: (theme) => {
827
865
  var _a, _b;
828
866
  return (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, position: virtualRow ? 'absolute' : undefined, top: virtualRow
@@ -831,8 +869,8 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
831
869
  ? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
832
870
  : undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme)));
833
871
  }, children: jsxRuntime.jsx(TableCell__default["default"], Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
834
- ? styles.lighten(theme.palette.background.default, 0.05)
835
- : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : 'table-cell', py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
872
+ ? getMRTTheme(table, theme).baseBackgroundColor
873
+ : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
836
874
  };
837
875
 
838
876
  const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
@@ -872,7 +910,8 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
872
910
  }
873
911
  };
874
912
  const rowRef = react.useRef(null);
875
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(TableRow__default["default"], Object.assign({ "data-index": virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.index, onDragEnter: handleDragEnter, ref: (node) => {
913
+ const { baseBackgroundColor, pinnedRowBackgroundColor, selectedRowBackgroundColor, } = getMRTTheme(table, theme);
914
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(TableRow__default["default"], Object.assign({ "data-index": virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.index, "data-pinned": !!isPinned || undefined, "data-selected": row.getIsSelected() || undefined, onDragEnter: handleDragEnter, ref: (node) => {
876
915
  if (node) {
877
916
  rowRef.current = node;
878
917
  measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
@@ -882,16 +921,16 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
882
921
  : undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td': {
883
922
  backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
884
923
  ? row.getIsSelected()
885
- ? `${styles.alpha(theme.palette.primary.main, 0.2)}`
924
+ ? `${styles.alpha(selectedRowBackgroundColor, 0.3)}`
886
925
  : theme.palette.mode === 'dark'
887
- ? `${styles.lighten(theme.palette.background.default, 0.12)}`
888
- : `${styles.darken(theme.palette.background.default, 0.05)}`
926
+ ? `${styles.lighten(baseBackgroundColor, 0.05)}`
927
+ : `${styles.darken(baseBackgroundColor, 0.05)}`
889
928
  : undefined,
890
- }, backgroundColor: `${styles.lighten(theme.palette.background.default, 0.05)} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isPinned
929
+ }, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isPinned
891
930
  ? `${bottomPinnedIndex * rowHeight +
892
931
  (enableStickyFooter ? tableFooterHeight - 1 : 0)}px`
893
932
  : undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity: isPinned
894
- ? 0.98
933
+ ? 0.97
895
934
  : (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id
896
935
  ? 0.5
897
936
  : 1, position: virtualRow
@@ -900,9 +939,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
900
939
  ? 'sticky'
901
940
  : undefined, td: {
902
941
  backgroundColor: row.getIsSelected()
903
- ? styles.alpha(theme.palette.primary.main, 0.2)
942
+ ? selectedRowBackgroundColor
904
943
  : isPinned
905
- ? styles.alpha(theme.palette.primary.main, 0.1)
944
+ ? pinnedRowBackgroundColor
906
945
  : undefined,
907
946
  }, top: virtualRow
908
947
  ? 0
@@ -922,8 +961,8 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
922
961
  rowIndex,
923
962
  rowRef,
924
963
  table,
925
- virtualCell: columnVirtualizer
926
- ? cellOrVirtualCell
964
+ virtualIndex: columnVirtualizer
965
+ ? cellOrVirtualCell.index
927
966
  : undefined,
928
967
  };
929
968
  return cell ? (memoMode === 'cells' &&
@@ -950,18 +989,19 @@ const MRT_SortingFns = Object.assign(Object.assign({}, reactTable.sortingFns), {
950
989
  const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFiltersMeta).map((v) => v.rank)) -
951
990
  Math.max(...Object.values(rowA.columnFiltersMeta).map((v) => v.rank));
952
991
 
953
- const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
954
- var _a, _b, _c, _d, _e, _f;
992
+ const MRT_TableBody = (_a) => {
993
+ var _b, _c, _d, _e, _f, _g;
994
+ var { columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["columnVirtualizer", "table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
955
995
  const { getBottomRows, getCenterRows, getIsSomeRowsPinned, getPrePaginationRowModel, getRowModel, getState, getTopRows, options: { createDisplayMode, enableGlobalFilterRankedResults, enablePagination, enableRowPinning, enableRowVirtualization, enableStickyFooter, enableStickyHeader, layoutMode, localization, manualExpanding, manualFiltering, manualGrouping, manualPagination, manualSorting, memoMode, muiTableBodyProps, renderEmptyRowsFallback, rowPinningDisplayMode, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef, tableFooterRef, tableHeadRef, tablePaperRef }, } = table;
956
996
  const { columnFilters, creatingRow, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
957
- const tableBodyProps = parseFromValuesOrFunc(muiTableBodyProps, { table });
997
+ const tableBodyProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableBodyProps, { table })), rest);
958
998
  const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
959
999
  table,
960
1000
  });
961
1001
  const tableHeadHeight = ((enableStickyHeader || isFullScreen) &&
962
- ((_a = tableHeadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight)) ||
1002
+ ((_b = tableHeadRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight)) ||
963
1003
  0;
964
- const tableFooterHeight = (enableStickyFooter && ((_b = tableFooterRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight)) || 0;
1004
+ const tableFooterHeight = (enableStickyFooter && ((_c = tableFooterRef.current) === null || _c === void 0 ? void 0 : _c.clientHeight)) || 0;
965
1005
  const shouldRankRows = react.useMemo(() => getCanRankRows(table) &&
966
1006
  !Object.values(sorting).some(Boolean) &&
967
1007
  globalFilter, [
@@ -1038,16 +1078,14 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
1038
1078
  return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1039
1079
  }) }))), jsxRuntime.jsxs(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
1040
1080
  ? `${rowVirtualizer.getTotalSize()}px`
1041
- : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: [creatingRow && createDisplayMode === 'row' && (jsxRuntime.jsx(MRT_TableBodyRow, { row: creatingRow, rowIndex: -1, table: table })), (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
1081
+ : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: [creatingRow && createDisplayMode === 'row' && (jsxRuntime.jsx(MRT_TableBodyRow, { row: creatingRow, rowIndex: -1, table: table })), (_d = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _d !== void 0 ? _d : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
1042
1082
  display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1043
1083
  }, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
1044
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
1045
- ? 'grid'
1046
- : 'table-cell',
1047
- }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1084
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1085
+ }, children: (_e = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _e !== void 0 ? _e : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1048
1086
  color: 'text.secondary',
1049
1087
  fontStyle: 'italic',
1050
- maxWidth: `min(100vw, ${(_f = (_e = tablePaperRef.current) === null || _e === void 0 ? void 0 : _e.clientWidth) !== null && _f !== void 0 ? _f : 360}px)`,
1088
+ maxWidth: `min(100vw, ${(_g = (_f = tablePaperRef.current) === null || _f === void 0 ? void 0 : _f.clientWidth) !== null && _g !== void 0 ? _g : 360}px)`,
1051
1089
  py: '2rem',
1052
1090
  textAlign: 'center',
1053
1091
  width: '100%',
@@ -1091,48 +1129,48 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
1091
1129
  };
1092
1130
  const Memo_MRT_TableBody = react.memo(MRT_TableBody, (prev, next) => prev.table.options.data === next.table.options.data);
1093
1131
 
1094
- const MRT_TableFooterCell = ({ footer, table, }) => {
1095
- var _a, _b;
1132
+ const MRT_TableFooterCell = (_a) => {
1133
+ var _b, _c, _d;
1134
+ var { footer, table } = _a, rest = __rest(_a, ["footer", "table"]);
1096
1135
  const { getState, options: { layoutMode, muiTableFooterCellProps }, } = table;
1097
1136
  const { density } = getState();
1098
1137
  const { column } = footer;
1099
1138
  const { columnDef } = column;
1100
1139
  const { columnDefType } = columnDef;
1101
- const tableCellProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterCellProps, { column, table })), parseFromValuesOrFunc(columnDef.muiTableFooterCellProps, {
1102
- column,
1103
- table,
1104
- }));
1105
- return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : 'table-cell', fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
1140
+ const args = { column, table };
1141
+ const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterCellProps, args)), parseFromValuesOrFunc(columnDef.muiTableFooterCellProps, args)), rest);
1142
+ return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
1106
1143
  ? '0.5rem'
1107
1144
  : density === 'comfortable'
1108
1145
  ? '1rem'
1109
- : '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonCellStyles({
1146
+ : '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonMRTCellStyles({
1110
1147
  column,
1111
1148
  table,
1112
1149
  tableCellProps,
1113
1150
  theme,
1114
- }))), children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: footer.isPlaceholder
1115
- ? null
1116
- : (_b = (_a = parseFromValuesOrFunc(columnDef.Footer, {
1117
- column,
1118
- footer,
1119
- table,
1120
- })) !== null && _a !== void 0 ? _a : columnDef.footer) !== null && _b !== void 0 ? _b : null }) })));
1151
+ })), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: (_b = tableCellProps.children) !== null && _b !== void 0 ? _b : (footer.isPlaceholder
1152
+ ? null
1153
+ : (_d = (_c = parseFromValuesOrFunc(columnDef.Footer, {
1154
+ column,
1155
+ footer,
1156
+ table,
1157
+ })) !== null && _c !== void 0 ? _c : columnDef.footer) !== null && _d !== void 0 ? _d : null) })));
1121
1158
  };
1122
1159
 
1123
- const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
1124
- var _a;
1160
+ const MRT_TableFooterRow = (_a) => {
1161
+ var _b;
1162
+ var { footerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["footerGroup", "table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
1125
1163
  const { options: { layoutMode, muiTableFooterRowProps }, } = table;
1126
1164
  // if no content in row, skip row
1127
- if (!((_a = footerGroup.headers) === null || _a === void 0 ? void 0 : _a.some((header) => (typeof header.column.columnDef.footer === 'string' &&
1165
+ if (!((_b = footerGroup.headers) === null || _b === void 0 ? void 0 : _b.some((header) => (typeof header.column.columnDef.footer === 'string' &&
1128
1166
  !!header.column.columnDef.footer) ||
1129
1167
  header.column.columnDef.Footer)))
1130
1168
  return null;
1131
- const tableRowProps = parseFromValuesOrFunc(muiTableFooterRowProps, {
1169
+ const tableRowProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterRowProps, {
1132
1170
  footerGroup,
1133
1171
  table,
1134
- });
1135
- return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.lighten(theme.palette.background.default, 0.05), display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
1172
+ })), rest);
1173
+ return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
1136
1174
  const footer = virtualColumns
1137
1175
  ? footerGroup.headers[footerOrVirtualFooter.index]
1138
1176
  : footerOrVirtualFooter;
@@ -1140,12 +1178,13 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
1140
1178
  }), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
1141
1179
  };
1142
1180
 
1143
- const MRT_TableFooter = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
1181
+ const MRT_TableFooter = (_a) => {
1182
+ var { table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
1144
1183
  const { getFooterGroups, getState, options: { enableStickyFooter, layoutMode, muiTableFooterProps }, refs: { tableFooterRef }, } = table;
1145
1184
  const { isFullScreen } = getState();
1146
- const tableFooterProps = parseFromValuesOrFunc(muiTableFooterProps, {
1185
+ const tableFooterProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterProps, {
1147
1186
  table,
1148
- });
1187
+ })), rest);
1149
1188
  const stickFooter = (isFullScreen || enableStickyFooter) && enableStickyFooter !== false;
1150
1189
  return (jsxRuntime.jsx(TableFooter__default["default"], Object.assign({}, tableFooterProps, { ref: (ref) => {
1151
1190
  tableFooterRef.current = ref;
@@ -1250,14 +1289,15 @@ const rangeModes = ['between', 'betweenInclusive', 'inNumberRange'];
1250
1289
  const emptyModes = ['empty', 'notEmpty'];
1251
1290
  const arrModes = ['arrIncludesSome', 'arrIncludesAll', 'arrIncludes'];
1252
1291
  const rangeVariants = ['range-slider', 'date-range', 'range'];
1253
- const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilterValue, table, }) => {
1254
- var _a, _b, _c, _d;
1292
+ const MRT_FilterOptionMenu = (_a) => {
1293
+ var _b, _c, _d, _e;
1294
+ var { anchorEl, header, onSelect, setAnchorEl, setFilterValue, table } = _a, rest = __rest(_a, ["anchorEl", "header", "onSelect", "setAnchorEl", "setFilterValue", "table"]);
1255
1295
  const { getState, options: { columnFilterModeOptions, globalFilterModeOptions, localization, renderColumnFilterModeMenuItems, renderGlobalFilterModeMenuItems, }, setColumnFilterFns, setGlobalFilterFn, } = table;
1256
1296
  const { density, globalFilterFn } = getState();
1257
1297
  const { column } = header !== null && header !== void 0 ? header : {};
1258
1298
  const { columnDef } = column !== null && column !== void 0 ? column : {};
1259
1299
  const currentFilterValue = column === null || column === void 0 ? void 0 : column.getFilterValue();
1260
- let allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
1300
+ let allowedColumnFilterOptions = (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _b !== void 0 ? _b : columnFilterModeOptions;
1261
1301
  if (rangeVariants.includes(columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant)) {
1262
1302
  allowedColumnFilterOptions = [
1263
1303
  ...rangeModes,
@@ -1331,15 +1371,15 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
1331
1371
  onSelect === null || onSelect === void 0 ? void 0 : onSelect();
1332
1372
  };
1333
1373
  const filterOption = !!header && columnDef ? columnDef._filterFn : globalFilterFn;
1334
- return (jsxRuntime.jsx(Menu__default["default"], { MenuListProps: {
1374
+ return (jsxRuntime.jsx(Menu__default["default"], Object.assign({ MenuListProps: {
1335
1375
  dense: density === 'compact',
1336
- }, anchorEl: anchorEl, anchorOrigin: { horizontal: 'right', vertical: 'center' }, onClose: () => setAnchorEl(null), open: !!anchorEl, children: (_d = (header && column && columnDef
1337
- ? (_c = (_b = columnDef.renderColumnFilterModeMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
1376
+ }, anchorEl: anchorEl, anchorOrigin: { horizontal: 'right', vertical: 'center' }, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_e = (header && column && columnDef
1377
+ ? (_d = (_c = columnDef.renderColumnFilterModeMenuItems) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
1338
1378
  column: column,
1339
1379
  internalFilterOptions,
1340
1380
  onSelectFilterMode: handleSelectFilterMode,
1341
1381
  table,
1342
- })) !== null && _c !== void 0 ? _c : renderColumnFilterModeMenuItems === null || renderColumnFilterModeMenuItems === void 0 ? void 0 : renderColumnFilterModeMenuItems({
1382
+ })) !== null && _d !== void 0 ? _d : renderColumnFilterModeMenuItems === null || renderColumnFilterModeMenuItems === void 0 ? void 0 : renderColumnFilterModeMenuItems({
1343
1383
  column: column,
1344
1384
  internalFilterOptions,
1345
1385
  onSelectFilterMode: handleSelectFilterMode,
@@ -1349,13 +1389,13 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
1349
1389
  internalFilterOptions,
1350
1390
  onSelectFilterMode: handleSelectFilterMode,
1351
1391
  table,
1352
- }))) !== null && _d !== void 0 ? _d : internalFilterOptions.map(({ divider, label, option, symbol }, index) => (jsxRuntime.jsxs(MenuItem__default["default"], { divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
1392
+ }))) !== null && _e !== void 0 ? _e : internalFilterOptions.map(({ divider, label, option, symbol }, index) => (jsxRuntime.jsxs(MenuItem__default["default"], { divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
1353
1393
  alignItems: 'center',
1354
1394
  display: 'flex',
1355
1395
  gap: '2ch',
1356
1396
  my: 0,
1357
1397
  py: '6px',
1358
- }, value: option, children: [jsxRuntime.jsx(Box__default["default"], { sx: { fontSize: '1.25rem', width: '2ch' }, children: symbol }), label] }, index))) }));
1398
+ }, value: option, children: [jsxRuntime.jsx(Box__default["default"], { sx: { fontSize: '1.25rem', width: '2ch' }, children: symbol }), label] }, index))) })));
1359
1399
  };
1360
1400
 
1361
1401
  const commonMenuItemStyles = {
@@ -1368,8 +1408,9 @@ const commonListItemStyles = {
1368
1408
  alignItems: 'center',
1369
1409
  display: 'flex',
1370
1410
  };
1371
- const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1372
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1411
+ const MRT_ColumnActionMenu = (_a) => {
1412
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1413
+ var { anchorEl, header, setAnchorEl, table } = _a, rest = __rest(_a, ["anchorEl", "header", "setAnchorEl", "table"]);
1373
1414
  const { getState, options: { columnFilterDisplayMode, columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnPinning, enableColumnResizing, enableGrouping, enableHiding, enableSorting, enableSortingRemoval, icons: { ArrowRightIcon, ClearAllIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, RestartAltIcon, SortIcon, ViewColumnIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setColumnOrder, setColumnSizingInfo, setShowColumnFilters, toggleAllColumnsVisible, } = table;
1374
1415
  const { column } = header;
1375
1416
  const { columnDef } = column;
@@ -1424,7 +1465,7 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1424
1465
  setFilterMenuAnchorEl(event.currentTarget);
1425
1466
  };
1426
1467
  const isSelectFilter = !!columnDef.filterSelectOptions;
1427
- const allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
1468
+ const allowedColumnFilterOptions = (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _b !== void 0 ? _b : columnFilterModeOptions;
1428
1469
  const showFilterModeSubMenu = enableColumnFilterModes &&
1429
1470
  columnDef.enableColumnFilterModes !== false &&
1430
1471
  !isSelectFilter &&
@@ -1434,8 +1475,8 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1434
1475
  ...(enableSorting && column.getCanSort()
1435
1476
  ? [
1436
1477
  enableSortingRemoval !== false && (jsxRuntime.jsx(MenuItem__default["default"], { disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(ClearAllIcon, {}) }), localization.clearSort] }) }, 0)),
1437
- jsxRuntime.jsx(MenuItem__default["default"], { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_b = localization.sortByColumnAsc) === null || _b === void 0 ? void 0 : _b.replace('{column}', String(columnDef.header))] }) }, 1),
1438
- jsxRuntime.jsx(MenuItem__default["default"], { disabled: column.getIsSorted() === 'desc', divider: enableColumnFilters || enableGrouping || enableHiding, onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(SortIcon, {}) }), (_c = localization.sortByColumnDesc) === null || _c === void 0 ? void 0 : _c.replace('{column}', String(columnDef.header))] }) }, 2),
1478
+ jsxRuntime.jsx(MenuItem__default["default"], { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_c = localization.sortByColumnAsc) === null || _c === void 0 ? void 0 : _c.replace('{column}', String(columnDef.header))] }) }, 1),
1479
+ jsxRuntime.jsx(MenuItem__default["default"], { disabled: column.getIsSorted() === 'desc', divider: enableColumnFilters || enableGrouping || enableHiding, onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(SortIcon, {}) }), (_d = localization.sortByColumnDesc) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }) }, 2),
1439
1480
  ]
1440
1481
  : []),
1441
1482
  ...(enableColumnFilters && column.getCanFilter()
@@ -1445,13 +1486,13 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1445
1486
  !columnFilterValue.filter((value) => value).length), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 3),
1446
1487
  columnFilterDisplayMode === 'subheader' && (jsxRuntime.jsxs(MenuItem__default["default"], { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
1447
1488
  ? handleOpenFilterModeMenu
1448
- : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(FilterListIcon, {}) }), (_d = localization.filterByColumn) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsxRuntime.jsx(IconButton__default["default"], { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsxRuntime.jsx(ArrowRightIcon, {}) }))] }, 4)),
1489
+ : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(FilterListIcon, {}) }), (_e = localization.filterByColumn) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsxRuntime.jsx(IconButton__default["default"], { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsxRuntime.jsx(ArrowRightIcon, {}) }))] }, 4)),
1449
1490
  showFilterModeSubMenu && (jsxRuntime.jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 5)),
1450
1491
  ].filter(Boolean)
1451
1492
  : []),
1452
1493
  ...(enableGrouping && column.getCanGroup()
1453
1494
  ? [
1454
- jsxRuntime.jsx(MenuItem__default["default"], { divider: enableColumnPinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(DynamicFeedIcon, {}) }), (_e = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }) }, 6),
1495
+ jsxRuntime.jsx(MenuItem__default["default"], { divider: enableColumnPinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(DynamicFeedIcon, {}) }), (_f = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 6),
1455
1496
  ]
1456
1497
  : []),
1457
1498
  ...(enableColumnPinning && column.getCanPin()
@@ -1468,30 +1509,31 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
1468
1509
  : []),
1469
1510
  ...(enableHiding
1470
1511
  ? [
1471
- jsxRuntime.jsx(MenuItem__default["default"], { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(VisibilityOffIcon, {}) }), (_f = localization.hideColumn) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 11),
1512
+ jsxRuntime.jsx(MenuItem__default["default"], { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(VisibilityOffIcon, {}) }), (_g = localization.hideColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }) }, 11),
1472
1513
  jsxRuntime.jsx(MenuItem__default["default"], { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
1473
- .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(ViewColumnIcon, {}) }), (_g = localization.showAllColumns) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }) }, 12),
1514
+ .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(ViewColumnIcon, {}) }), (_h = localization.showAllColumns) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] }) }, 12),
1474
1515
  ]
1475
1516
  : []),
1476
1517
  ].filter(Boolean);
1477
- return (jsxRuntime.jsx(Menu__default["default"], { MenuListProps: {
1518
+ return (jsxRuntime.jsx(Menu__default["default"], Object.assign({ MenuListProps: {
1478
1519
  dense: density === 'compact',
1479
- }, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl, children: (_k = (_j = (_h = columnDef.renderColumnActionsMenuItems) === null || _h === void 0 ? void 0 : _h.call(columnDef, {
1520
+ }, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_l = (_k = (_j = columnDef.renderColumnActionsMenuItems) === null || _j === void 0 ? void 0 : _j.call(columnDef, {
1480
1521
  closeMenu: () => setAnchorEl(null),
1481
1522
  column,
1482
1523
  internalColumnMenuItems,
1483
1524
  table,
1484
- })) !== null && _j !== void 0 ? _j : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
1525
+ })) !== null && _k !== void 0 ? _k : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
1485
1526
  closeMenu: () => setAnchorEl(null),
1486
1527
  column,
1487
1528
  internalColumnMenuItems,
1488
1529
  table,
1489
- })) !== null && _k !== void 0 ? _k : internalColumnMenuItems }));
1530
+ })) !== null && _l !== void 0 ? _l : internalColumnMenuItems })));
1490
1531
  };
1491
1532
 
1492
- const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1493
- var _a;
1494
- const { options: { columnFilterDisplayMode, icons: { MoreVertIcon }, localization, muiColumnActionsButtonProps, }, } = table;
1533
+ const MRT_TableHeadCellColumnActionsButton = (_a) => {
1534
+ var _b;
1535
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1536
+ const { options: { icons: { MoreVertIcon }, localization, muiColumnActionsButtonProps, }, } = table;
1495
1537
  const { column } = header;
1496
1538
  const { columnDef } = column;
1497
1539
  const [anchorEl, setAnchorEl] = react.useState(null);
@@ -1500,32 +1542,33 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1500
1542
  event.preventDefault();
1501
1543
  setAnchorEl(event.currentTarget);
1502
1544
  };
1503
- const iconButtonProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiColumnActionsButtonProps, {
1545
+ const iconButtonProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiColumnActionsButtonProps, {
1504
1546
  column,
1505
1547
  table,
1506
1548
  })), parseFromValuesOrFunc(columnDef.muiColumnActionsButtonProps, {
1507
1549
  column,
1508
1550
  table,
1509
- }));
1510
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ '&:hover': {
1551
+ })), rest);
1552
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.columnActions, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ '&:hover': {
1511
1553
  opacity: 1,
1512
- }, height: '2rem', m: '-4px', opacity: 0.3, transform: `scale(0.85) ${columnFilterDisplayMode !== 'popover' ? 'translateX(-4px)' : ''}`, transition: 'opacity 150ms', width: '2rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsxRuntime.jsx(MoreVertIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1554
+ }, height: '2rem', m: '-8px -4px', opacity: 0.3, transition: 'all 150ms', width: '2rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsxRuntime.jsx(MoreVertIcon, { style: { transform: 'scale(0.9)' } }) })) }), anchorEl && (jsxRuntime.jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
1513
1555
  };
1514
1556
 
1515
- const MRT_FilterCheckbox = ({ column, table, }) => {
1516
- var _a, _b, _c;
1557
+ const MRT_FilterCheckbox = (_a) => {
1558
+ var _b, _c, _d;
1559
+ var { column, table } = _a, rest = __rest(_a, ["column", "table"]);
1517
1560
  const { getState, options: { localization, muiFilterCheckboxProps }, } = table;
1518
1561
  const { density } = getState();
1519
1562
  const { columnDef } = column;
1520
- const checkboxProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterCheckboxProps, {
1563
+ const checkboxProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterCheckboxProps, {
1521
1564
  column,
1522
1565
  table,
1523
1566
  })), parseFromValuesOrFunc(columnDef.muiFilterCheckboxProps, {
1524
1567
  column,
1525
1568
  table,
1526
- }));
1527
- const filterLabel = (_a = localization.filterByColumn) === null || _a === void 0 ? void 0 : _a.replace('{column}', columnDef.header);
1528
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : filterLabel, children: jsxRuntime.jsx(FormControlLabel__default["default"], { control: jsxRuntime.jsx(Checkbox__default["default"], Object.assign({ checked: column.getFilterValue() === 'true', color: column.getFilterValue() === undefined ? 'default' : 'primary', indeterminate: column.getFilterValue() === undefined, size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onChange: (e, checked) => {
1569
+ })), rest);
1570
+ const filterLabel = (_b = localization.filterByColumn) === null || _b === void 0 ? void 0 : _b.replace('{column}', columnDef.header);
1571
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, title: (_c = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, children: jsxRuntime.jsx(FormControlLabel__default["default"], { control: jsxRuntime.jsx(Checkbox__default["default"], Object.assign({ checked: column.getFilterValue() === 'true', color: column.getFilterValue() === undefined ? 'default' : 'primary', indeterminate: column.getFilterValue() === undefined, size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onChange: (e, checked) => {
1529
1572
  var _a;
1530
1573
  column.setFilterValue(column.getFilterValue() === undefined
1531
1574
  ? 'true'
@@ -1537,19 +1580,20 @@ const MRT_FilterCheckbox = ({ column, table, }) => {
1537
1580
  var _a;
1538
1581
  e.stopPropagation();
1539
1582
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
1540
- }, sx: (theme) => (Object.assign({ height: '2.5rem', width: '2.5rem' }, parseFromValuesOrFunc(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx, theme))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', fontWeight: 'normal', mt: '-4px' }, title: undefined }) }));
1583
+ }, sx: (theme) => (Object.assign({ height: '2.5rem', width: '2.5rem' }, parseFromValuesOrFunc(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx, theme))) })), disableTypography: true, label: (_d = checkboxProps.title) !== null && _d !== void 0 ? _d : filterLabel, sx: { color: 'text.secondary', fontWeight: 'normal', mt: '-4px' }, title: undefined }) }));
1541
1584
  };
1542
1585
 
1543
- const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1544
- var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o;
1586
+ const MRT_FilterTextField = (_a) => {
1587
+ var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1588
+ var { header, rangeFilterIndex, table } = _a, rest = __rest(_a, ["header", "rangeFilterIndex", "table"]);
1545
1589
  const { options: { columnFilterModeOptions, enableColumnFilterModes, icons: { CloseIcon, FilterListIcon }, localization, manualFiltering, muiFilterAutocompleteProps, muiFilterDatePickerProps, muiFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
1546
1590
  const { column } = header;
1547
1591
  const { columnDef } = column;
1548
1592
  const { filterVariant } = columnDef;
1549
- const textFieldProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterTextFieldProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterTextFieldProps, {
1593
+ const textFieldProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterTextFieldProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterTextFieldProps, {
1550
1594
  column,
1551
1595
  table,
1552
- }));
1596
+ })), rest);
1553
1597
  const autocompleteProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterAutocompleteProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterAutocompleteProps, {
1554
1598
  column,
1555
1599
  table,
@@ -1568,17 +1612,17 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1568
1612
  const currentFilterOption = columnDef._filterFn;
1569
1613
  const filterChipLabel = ['empty', 'notEmpty'].includes(currentFilterOption)
1570
1614
  ? //@ts-ignore
1571
- localization[`filter${((_b = (_a = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt) === null || _a === void 0 ? void 0 : _a.call(currentFilterOption, 0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
1615
+ localization[`filter${((_c = (_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt) === null || _b === void 0 ? void 0 : _b.call(currentFilterOption, 0)) === null || _c === void 0 ? void 0 : _c.toUpperCase()) +
1572
1616
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]
1573
1617
  : '';
1574
1618
  const filterPlaceholder = !isRangeFilter
1575
- ? (_c = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.placeholder) !== null && _c !== void 0 ? _c : (_d = localization.filterByColumn) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))
1619
+ ? (_d = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.placeholder) !== null && _d !== void 0 ? _d : (_f = localization.filterByColumn) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))
1576
1620
  : rangeFilterIndex === 0
1577
1621
  ? localization.min
1578
1622
  : rangeFilterIndex === 1
1579
1623
  ? localization.max
1580
1624
  : '';
1581
- const allowedColumnFilterOptions = (_f = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _f !== void 0 ? _f : columnFilterModeOptions;
1625
+ const allowedColumnFilterOptions = (_g = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _g !== void 0 ? _g : columnFilterModeOptions;
1582
1626
  const showChangeModeButton = enableColumnFilterModes &&
1583
1627
  columnDef.enableColumnFilterModes !== false &&
1584
1628
  !rangeFilterIndex &&
@@ -1666,7 +1710,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1666
1710
  isMounted.current = true;
1667
1711
  }, [column.getFilterValue()]);
1668
1712
  if (columnDef.Filter) {
1669
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (_g = columnDef.Filter) === null || _g === void 0 ? void 0 : _g.call(columnDef, { column, header, rangeFilterIndex, table }) }));
1713
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (_h = columnDef.Filter) === null || _h === void 0 ? void 0 : _h.call(columnDef, { column, header, rangeFilterIndex, table }) }));
1670
1714
  }
1671
1715
  const dropdownOptions = react.useMemo(() => {
1672
1716
  var _a;
@@ -1682,12 +1726,12 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1682
1726
  isMultiSelectFilter,
1683
1727
  isSelectFilter,
1684
1728
  ]);
1685
- const endAdornment = !isAutocompleteFilter && !isDateFilter && !filterChipLabel ? (jsxRuntime.jsx(InputAdornment__default["default"], { position: "end", sx: { mr: isSelectFilter || isMultiSelectFilter ? '20px' : undefined }, children: jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "right", title: (_h = localization.clearFilter) !== null && _h !== void 0 ? _h : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "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: {
1729
+ const endAdornment = !isAutocompleteFilter && !isDateFilter && !filterChipLabel ? (jsxRuntime.jsx(InputAdornment__default["default"], { position: "end", sx: { mr: isSelectFilter || isMultiSelectFilter ? '20px' : undefined }, children: jsxRuntime.jsx(Tooltip__default["default"], { placement: "right", title: (_j = localization.clearFilter) !== null && _j !== void 0 ? _j : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.clearFilter, disabled: !((_k = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _k === void 0 ? void 0 : _k.length), onClick: handleClear, size: "small", sx: {
1686
1730
  height: '2rem',
1687
1731
  transform: 'scale(0.9)',
1688
1732
  width: '2rem',
1689
1733
  }, children: jsxRuntime.jsx(CloseIcon, {}) }) }) }) })) : null;
1690
- const startAdornment = showChangeModeButton ? (jsxRuntime.jsxs(InputAdornment__default["default"], { position: "start", children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.changeFilterMode, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(FilterListIcon, {}) }) }) }), filterChipLabel && (jsxRuntime.jsx(Chip__default["default"], { label: filterChipLabel, onDelete: handleClearEmptyFilterChip }))] })) : null;
1734
+ const startAdornment = showChangeModeButton ? (jsxRuntime.jsxs(InputAdornment__default["default"], { position: "start", children: [jsxRuntime.jsx(Tooltip__default["default"], { title: localization.changeFilterMode, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(FilterListIcon, {}) }) }) }), filterChipLabel && (jsxRuntime.jsx(Chip__default["default"], { label: filterChipLabel, onDelete: handleClearEmptyFilterChip }))] })) : null;
1691
1735
  const commonTextFieldProps = Object.assign(Object.assign({ FormHelperTextProps: {
1692
1736
  sx: {
1693
1737
  fontSize: '0.75rem',
@@ -1698,7 +1742,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1698
1742
  ? { endAdornment, startAdornment }
1699
1743
  : { startAdornment }, fullWidth: true, helperText: showChangeModeButton ? (jsxRuntime.jsx("label", { children: localization.filterMode.replace('{filterType}',
1700
1744
  // @ts-ignore
1701
- localization[`filter${((_k = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _k === void 0 ? void 0 : _k.toUpperCase()) +
1745
+ localization[`filter${((_l = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _l === void 0 ? void 0 : _l.toUpperCase()) +
1702
1746
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null, inputProps: {
1703
1747
  autoComplete: 'new-password',
1704
1748
  disabled: !!filterChipLabel,
@@ -1717,16 +1761,18 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1717
1761
  ? undefined
1718
1762
  : filterPlaceholder, variant: 'standard' }, textFieldProps), { sx: (theme) => (Object.assign({ minWidth: isDateFilter
1719
1763
  ? '160px'
1720
- : isRangeFilter
1721
- ? '100px'
1722
- : !filterChipLabel
1723
- ? '120px'
1724
- : 'auto', mx: '-2px', p: 0, width: 'calc(100% + 4px)' }, parseFromValuesOrFunc(textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx, theme))) });
1764
+ : enableColumnFilterModes && rangeFilterIndex === 0
1765
+ ? '110px'
1766
+ : isRangeFilter
1767
+ ? '100px'
1768
+ : !filterChipLabel
1769
+ ? '120px'
1770
+ : 'auto', mx: '-2px', p: 0, width: 'calc(100% + 4px)' }, parseFromValuesOrFunc(textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx, theme))) });
1725
1771
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isDateFilter ? (jsxRuntime.jsx(DatePicker.DatePicker, Object.assign({ onChange: (newDate) => {
1726
1772
  handleChange(newDate);
1727
1773
  }, value: filterValue || null }, datePickerProps, { slotProps: {
1728
- field: Object.assign({ clearable: true, onClear: () => handleClear() }, (_l = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _l === void 0 ? void 0 : _l.field),
1729
- textField: Object.assign(Object.assign({}, commonTextFieldProps), (_m = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _m === void 0 ? void 0 : _m.textField),
1774
+ field: Object.assign({ clearable: true, onClear: () => handleClear() }, (_m = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _m === void 0 ? void 0 : _m.field),
1775
+ textField: Object.assign(Object.assign({}, commonTextFieldProps), (_o = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _o === void 0 ? void 0 : _o.textField),
1730
1776
  } }))) : isAutocompleteFilter ? (jsxRuntime.jsx(Autocomplete__default["default"], Object.assign({ freeSolo: true, getOptionLabel: (option) => option, onChange: (_e, newValue) => handleChange(newValue), options: dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
1731
1777
  var _a;
1732
1778
  return (jsxRuntime.jsx(TextField__default["default"], Object.assign({}, builtinTextFieldProps, commonTextFieldProps, { InputProps: Object.assign(Object.assign({}, builtinTextFieldProps.InputProps), { startAdornment: (_a = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.startAdornment }), inputProps: Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.inputProps), onChange: handleTextFieldChange })));
@@ -1746,7 +1792,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1746
1792
  }, onChange: handleTextFieldChange, select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { value: filterValue !== null && filterValue !== void 0 ? filterValue : '', children: (isSelectFilter || isMultiSelectFilter) && [
1747
1793
  jsxRuntime.jsx(MenuItem__default["default"], { disabled: true, divider: true, hidden: true, value: "", children: jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder }) }, "p"),
1748
1794
  ...[
1749
- (_o = textFieldProps.children) !== null && _o !== void 0 ? _o : dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => {
1795
+ (_p = textFieldProps.children) !== null && _p !== void 0 ? _p : dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => {
1750
1796
  var _a;
1751
1797
  if (!option)
1752
1798
  return '';
@@ -1772,21 +1818,23 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1772
1818
  ] }))), jsxRuntime.jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, setFilterValue: setFilterValue, table: table })] }));
1773
1819
  };
1774
1820
 
1775
- const MRT_FilterRangeFields = ({ header, table, }) => {
1776
- return (jsxRuntime.jsxs(Box__default["default"], { sx: { display: 'grid', gap: '1rem', gridTemplateColumns: '1fr 1fr' }, children: [jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] }));
1821
+ const MRT_FilterRangeFields = (_a) => {
1822
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1823
+ return (jsxRuntime.jsxs(Box__default["default"], Object.assign({}, rest, { sx: (theme) => (Object.assign({ display: 'grid', gap: '1rem', gridTemplateColumns: '1fr 1fr' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: [jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] })));
1777
1824
  };
1778
1825
 
1779
- const MRT_FilterRangeSlider = ({ header, table, }) => {
1780
- var _a, _b;
1826
+ const MRT_FilterRangeSlider = (_a) => {
1827
+ var _b, _c;
1828
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1781
1829
  const { options: { enableColumnFilterModes, localization, muiFilterSliderProps }, refs: { filterInputRefs }, } = table;
1782
1830
  const { column } = header;
1783
1831
  const { columnDef } = column;
1784
1832
  const currentFilterOption = columnDef._filterFn;
1785
1833
  const showChangeModeButton = enableColumnFilterModes && columnDef.enableColumnFilterModes !== false;
1786
- const sliderProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterSliderProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterSliderProps, { column, table }));
1834
+ const sliderProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiFilterSliderProps, { column, table })), parseFromValuesOrFunc(columnDef.muiFilterSliderProps, { column, table })), rest);
1787
1835
  let [min, max] = sliderProps.min !== undefined && sliderProps.max !== undefined
1788
1836
  ? [sliderProps.min, sliderProps.max]
1789
- : (_a = column.getFacetedMinMaxValues()) !== null && _a !== void 0 ? _a : [0, 1];
1837
+ : (_b = column.getFacetedMinMaxValues()) !== null && _b !== void 0 ? _b : [0, 1];
1790
1838
  //fix potential TanStack Table bugs where min or max is an array
1791
1839
  if (Array.isArray(min))
1792
1840
  min = min[0];
@@ -1843,22 +1891,24 @@ const MRT_FilterRangeSlider = ({ header, table, }) => {
1843
1891
  whiteSpace: 'nowrap',
1844
1892
  }, children: localization.filterMode.replace('{filterType}',
1845
1893
  // @ts-ignore
1846
- localization[`filter${((_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
1894
+ localization[`filter${((_c = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _c === void 0 ? void 0 : _c.toUpperCase()) +
1847
1895
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null] }));
1848
1896
  };
1849
1897
 
1850
- const MRT_TableHeadCellFilterContainer = ({ header, table, }) => {
1851
- var _a;
1898
+ const MRT_TableHeadCellFilterContainer = (_a) => {
1899
+ var _b;
1900
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1852
1901
  const { getState, options: { columnFilterDisplayMode }, } = table;
1853
1902
  const { showColumnFilters } = getState();
1854
1903
  const { column } = header;
1855
1904
  const { columnDef } = column;
1856
- return (jsxRuntime.jsx(Collapse__default["default"], { in: showColumnFilters || columnFilterDisplayMode === 'popover', mountOnEnter: true, unmountOnExit: true, children: columnDef.filterVariant === 'checkbox' ? (jsxRuntime.jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range-slider' ? (jsxRuntime.jsx(MRT_FilterRangeSlider, { header: header, table: table })) : ((_a = columnDef.filterVariant) === null || _a === void 0 ? void 0 : _a.includes('range')) ||
1857
- ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsxRuntime.jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsxRuntime.jsx(MRT_FilterTextField, { header: header, table: table })) }));
1905
+ return (jsxRuntime.jsx(Collapse__default["default"], Object.assign({ in: showColumnFilters || columnFilterDisplayMode === 'popover', mountOnEnter: true, unmountOnExit: true }, rest, { children: columnDef.filterVariant === 'checkbox' ? (jsxRuntime.jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range-slider' ? (jsxRuntime.jsx(MRT_FilterRangeSlider, { header: header, table: table })) : ((_b = columnDef.filterVariant) === null || _b === void 0 ? void 0 : _b.includes('range')) ||
1906
+ ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsxRuntime.jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsxRuntime.jsx(MRT_FilterTextField, { header: header, table: table })) })));
1858
1907
  };
1859
1908
 
1860
- const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1861
- var _a, _b, _c;
1909
+ const MRT_TableHeadCellFilterLabel = (_a) => {
1910
+ var _b, _c, _d;
1911
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1862
1912
  const { options: { columnFilterDisplayMode, icons: { FilterAltIcon }, localization, }, refs: { filterInputRefs }, setShowColumnFilters, } = table;
1863
1913
  const { column } = header;
1864
1914
  const { columnDef } = column;
@@ -1866,16 +1916,16 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1866
1916
  const [anchorEl, setAnchorEl] = react.useState(null);
1867
1917
  const isFilterActive = (Array.isArray(filterValue) && filterValue.some(Boolean)) ||
1868
1918
  (!!filterValue && !Array.isArray(filterValue));
1869
- const isRangeFilter = ((_a = columnDef.filterVariant) === null || _a === void 0 ? void 0 : _a.includes('range')) ||
1919
+ const isRangeFilter = ((_b = columnDef.filterVariant) === null || _b === void 0 ? void 0 : _b.includes('range')) ||
1870
1920
  ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn);
1871
1921
  const currentFilterOption = columnDef._filterFn;
1872
1922
  const filterTooltip = columnFilterDisplayMode === 'popover' && !isFilterActive
1873
- ? (_b = localization.filterByColumn) === null || _b === void 0 ? void 0 : _b.replace('{column}', String(columnDef.header))
1923
+ ? (_c = localization.filterByColumn) === null || _c === void 0 ? void 0 : _c.replace('{column}', String(columnDef.header))
1874
1924
  : localization.filteringByColumn
1875
1925
  .replace('{column}', String(columnDef.header))
1876
1926
  .replace('{filterType}', currentFilterOption
1877
1927
  ? // @ts-ignore
1878
- localization[`filter${((_c = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _c === void 0 ? void 0 : _c.toUpperCase()) +
1928
+ localization[`filter${((_d = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _d === void 0 ? void 0 : _d.toUpperCase()) +
1879
1929
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]
1880
1930
  : '')
1881
1931
  .replace('{filterValue}', `"${Array.isArray(filterValue)
@@ -1885,7 +1935,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1885
1935
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Grow__default["default"], { in: columnFilterDisplayMode === 'popover' ||
1886
1936
  (!!filterValue && !isRangeFilter) ||
1887
1937
  (isRangeFilter && // @ts-ignore
1888
- (!!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[0]) || !!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[1]))), unmountOnExit: true, children: jsxRuntime.jsx(Box__default["default"], { component: "span", sx: { flex: '0 0' }, children: jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "top", title: filterTooltip, children: jsxRuntime.jsx(IconButton__default["default"], { disableRipple: true, onClick: (event) => {
1938
+ (!!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[0]) || !!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[1]))), unmountOnExit: true, children: jsxRuntime.jsx(Box__default["default"], { component: "span", sx: { flex: '0 0' }, children: jsxRuntime.jsx(Tooltip__default["default"], { placement: "top", title: filterTooltip, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ disableRipple: true, onClick: (event) => {
1889
1939
  if (columnFilterDisplayMode === 'popover') {
1890
1940
  setAnchorEl(event.currentTarget);
1891
1941
  }
@@ -1898,15 +1948,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1898
1948
  (_b = filterInputRefs.current[`${column.id}-0`]) === null || _b === void 0 ? void 0 : _b.select();
1899
1949
  });
1900
1950
  event.stopPropagation();
1901
- }, size: "small", sx: {
1902
- height: '16px',
1903
- ml: '4px',
1904
- opacity: isFilterActive ? 1 : 0.3,
1905
- p: '8px',
1906
- transform: 'scale(0.75)',
1907
- transition: 'all 150ms ease-in-out',
1908
- width: '16px',
1909
- }, children: jsxRuntime.jsx(FilterAltIcon, {}) }) }) }) }), jsxRuntime.jsx(Popover__default["default"], { anchorEl: anchorEl, anchorOrigin: {
1951
+ }, size: "small" }, rest, { sx: (theme) => (Object.assign({ height: '16px', ml: '4px', opacity: isFilterActive ? 1 : 0.3, p: '8px', transform: 'scale(0.75)', transition: 'all 150ms ease-in-out', width: '16px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsx(FilterAltIcon, {}) })) }) }) }), jsxRuntime.jsx(Popover__default["default"], { anchorEl: anchorEl, anchorOrigin: {
1910
1952
  horizontal: 'center',
1911
1953
  vertical: 'top',
1912
1954
  }, onClick: (event) => event.stopPropagation(), onClose: (event) => {
@@ -1919,14 +1961,15 @@ const MRT_TableHeadCellFilterLabel = ({ header, table, }) => {
1919
1961
  }, children: jsxRuntime.jsx(Box__default["default"], { sx: { p: '1rem' }, children: jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }) }) })] }));
1920
1962
  };
1921
1963
 
1922
- const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
1964
+ const MRT_TableHeadCellGrabHandle = (_a) => {
1965
+ var { column, table, tableHeadCellRef } = _a, rest = __rest(_a, ["column", "table", "tableHeadCellRef"]);
1923
1966
  const { getState, options: { enableColumnOrdering, muiColumnDragHandleProps }, setColumnOrder, setDraggingColumn, setHoveredColumn, } = table;
1924
1967
  const { columnDef } = column;
1925
1968
  const { columnOrder, draggingColumn, hoveredColumn } = getState();
1926
- const iconButtonProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiColumnDragHandleProps, { column, table })), parseFromValuesOrFunc(columnDef.muiColumnDragHandleProps, {
1969
+ const iconButtonProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiColumnDragHandleProps, { column, table })), parseFromValuesOrFunc(columnDef.muiColumnDragHandleProps, {
1927
1970
  column,
1928
1971
  table,
1929
- }));
1972
+ })), rest);
1930
1973
  const handleDragStart = (event) => {
1931
1974
  var _a;
1932
1975
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onDragStart) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
@@ -1950,8 +1993,9 @@ const MRT_TableHeadCellGrabHandle = ({ column, table, tableHeadCellRef, }) => {
1950
1993
  return (jsxRuntime.jsx(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table }));
1951
1994
  };
1952
1995
 
1953
- const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1954
- var _a;
1996
+ const MRT_TableHeadCellResizeHandle = (_a) => {
1997
+ var _b;
1998
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1955
1999
  const { getState, options: { columnResizeMode }, setColumnSizingInfo, } = table;
1956
2000
  const { density } = getState();
1957
2001
  const { column } = header;
@@ -1960,7 +2004,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1960
2004
  column.resetSize();
1961
2005
  }, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
1962
2006
  transform: column.getIsResizing() && columnResizeMode === 'onEnd'
1963
- ? `translateX(${(_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0}px)`
2007
+ ? `translateX(${(_b = getState().columnSizingInfo.deltaOffset) !== null && _b !== void 0 ? _b : 0}px)`
1964
2008
  : undefined,
1965
2009
  }, sx: (theme) => ({
1966
2010
  '&:active > hr': {
@@ -1975,59 +2019,57 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1975
2019
  : '-28px',
1976
2020
  position: 'absolute',
1977
2021
  px: '4px',
1978
- right: '0',
1979
- }), children: jsxRuntime.jsx(Divider__default["default"], { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1980
- borderRadius: '2px',
1981
- borderWidth: '2px',
1982
- height: '24px',
1983
- touchAction: 'none',
1984
- transition: column.getIsResizing()
2022
+ right: column.columnDef.columnDefType === 'display' ? '4px' : '0',
2023
+ }), children: jsxRuntime.jsx(Divider__default["default"], { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: (theme) => (Object.assign({ borderRadius: '2px', borderWidth: '2px', height: '24px', touchAction: 'none', transition: column.getIsResizing()
1985
2024
  ? undefined
1986
- : 'all 150ms ease-in-out',
1987
- userSelect: 'none',
1988
- zIndex: 4,
1989
- } }) }));
2025
+ : 'all 150ms ease-in-out', userSelect: 'none', zIndex: 4 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))) }) }));
1990
2026
  };
1991
2027
 
1992
- const MRT_TableHeadCellSortLabel = ({ header, table, }) => {
2028
+ const MRT_TableHeadCellSortLabel = (_a) => {
2029
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
1993
2030
  const { getState, options: { icons: { ArrowDownwardIcon, SyncAltIcon }, localization, }, } = table;
1994
2031
  const { column } = header;
1995
2032
  const { columnDef } = column;
1996
- const { sorting } = getState();
2033
+ const { isLoading, showSkeletons, sorting } = getState();
1997
2034
  const isSorted = !!column.getIsSorted();
1998
- const sortTooltip = column.getIsSorted()
1999
- ? column.getIsSorted() === 'desc'
2000
- ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
2001
- : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
2002
- : column.getNextSortingOrder() === 'desc'
2003
- ? localization.sortByColumnDesc.replace('{column}', columnDef.header)
2004
- : localization.sortByColumnAsc.replace('{column}', columnDef.header);
2005
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "top", title: sortTooltip, children: jsxRuntime.jsx(Badge__default["default"], { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsxRuntime.jsx(TableSortLabel__default["default"], { IconComponent: !isSorted
2006
- ? (props) => (jsxRuntime.jsx(SyncAltIcon, Object.assign({}, props, { style: { transform: 'rotate(-90deg) scaleX(0.8)' } })))
2035
+ const sortTooltip = isLoading || showSkeletons
2036
+ ? ''
2037
+ : column.getIsSorted()
2038
+ ? column.getIsSorted() === 'desc'
2039
+ ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
2040
+ : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
2041
+ : column.getNextSortingOrder() === 'desc'
2042
+ ? localization.sortByColumnDesc.replace('{column}', columnDef.header)
2043
+ : localization.sortByColumnAsc.replace('{column}', columnDef.header);
2044
+ return (jsxRuntime.jsx(Tooltip__default["default"], { placement: "top", title: sortTooltip, children: jsxRuntime.jsx(Badge__default["default"], { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsxRuntime.jsx(TableSortLabel__default["default"], Object.assign({ IconComponent: !isSorted
2045
+ ? (props) => (jsxRuntime.jsx(SyncAltIcon, Object.assign({}, props, { style: {
2046
+ transform: 'rotate(-90deg) scaleX(0.9) translateX(-1px)',
2047
+ } })))
2007
2048
  : ArrowDownwardIcon, active: true, "aria-label": sortTooltip, direction: isSorted ? column.getIsSorted() : undefined, onClick: (e) => {
2008
2049
  var _a;
2009
2050
  e.stopPropagation();
2010
2051
  (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(e);
2011
- }, sx: {
2012
- flex: '0 0',
2013
- opacity: isSorted ? 1 : 0.3,
2014
- transition: 'all 150ms ease-in-out',
2015
- width: '3ch',
2016
- } }) }) }));
2052
+ } }, rest, { sx: (theme) => (Object.assign({ '.MuiTableSortLabel-icon': {
2053
+ color: `${theme.palette.mode === 'dark'
2054
+ ? theme.palette.text.primary
2055
+ : theme.palette.text.secondary} !important`,
2056
+ }, flex: '0 0', opacity: isSorted ? 1 : 0.3, transition: 'all 150ms ease-in-out', width: '3ch' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))) })) }) }));
2017
2057
  };
2018
2058
 
2019
- const MRT_TableHeadCell = ({ header, table, }) => {
2020
- var _a, _b, _c, _d, _f;
2059
+ const MRT_TableHeadCell = (_a) => {
2060
+ var _b, _c, _d, _f, _g, _h;
2061
+ var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
2021
2062
  const theme = styles.useTheme();
2022
2063
  const { getState, options: { columnFilterDisplayMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
2023
2064
  const { columnSizingInfo, density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
2024
2065
  const { column } = header;
2025
2066
  const { columnDef } = column;
2026
2067
  const { columnDefType } = columnDef;
2027
- const tableCellProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadCellProps, { column, table })), parseFromValuesOrFunc(columnDef.muiTableHeadCellProps, {
2068
+ const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadCellProps, { column, table })), parseFromValuesOrFunc(columnDef.muiTableHeadCellProps, {
2028
2069
  column,
2029
2070
  table,
2030
- }));
2071
+ })), rest);
2072
+ const { draggingBorderColor } = getMRTTheme(table, theme);
2031
2073
  const showColumnActions = (enableColumnActions || columnDef.enableColumnActions) &&
2032
2074
  columnDef.enableColumnActions !== false;
2033
2075
  const showDragHandle = enableColumnDragging !== false &&
@@ -2050,11 +2092,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2050
2092
  const draggingBorders = react.useMemo(() => {
2051
2093
  const borderStyle = columnSizingInfo.isResizingColumn === column.id &&
2052
2094
  !header.subHeaders.length
2053
- ? `2px solid ${theme.palette.primary.main} !important`
2095
+ ? `2px solid ${draggingBorderColor} !important`
2054
2096
  : (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
2055
- ? `1px dashed ${theme.palette.text.secondary}`
2097
+ ? `1px dashed ${theme.palette.grey[500]}`
2056
2098
  : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2057
- ? `2px dashed ${theme.palette.primary.main}`
2099
+ ? `2px dashed ${draggingBorderColor}`
2058
2100
  : undefined;
2059
2101
  if (columnSizingInfo.isResizingColumn === column.id) {
2060
2102
  return { borderRight: borderStyle };
@@ -2076,11 +2118,11 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2076
2118
  setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
2077
2119
  }
2078
2120
  };
2079
- const headerElement = (_a = parseFromValuesOrFunc(columnDef.Header, {
2121
+ const headerElement = (_b = parseFromValuesOrFunc(columnDef.Header, {
2080
2122
  column,
2081
2123
  header,
2082
2124
  table,
2083
- })) !== null && _a !== void 0 ? _a : columnDef.header;
2125
+ })) !== null && _b !== void 0 ? _b : columnDef.header;
2084
2126
  return (jsxRuntime.jsxs(TableCell__default["default"], Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
2085
2127
  if (node) {
2086
2128
  tableHeadCellRefs.current[column.id] = node;
@@ -2109,54 +2151,60 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2109
2151
  ? 3
2110
2152
  : column.getIsPinned() && columnDefType !== 'group'
2111
2153
  ? 2
2112
- : 1 }, getCommonCellStyles({
2154
+ : 1 }, getCommonMRTCellStyles({
2113
2155
  column,
2114
2156
  header,
2115
2157
  table,
2116
2158
  tableCellProps,
2117
2159
  theme,
2118
- })), draggingBorders)), children: [header.isPlaceholder ? null : (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content", sx: {
2119
- alignItems: 'center',
2120
- display: 'flex',
2121
- flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2122
- justifyContent: columnDefType === 'group' || (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2123
- ? 'center'
2124
- : column.getCanResize()
2125
- ? 'space-between'
2126
- : 'flex-start',
2127
- position: 'relative',
2128
- width: '100%',
2129
- }, children: [jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
2130
- alignItems: 'center',
2131
- cursor: column.getCanSort() && columnDefType !== 'group'
2132
- ? 'pointer'
2133
- : undefined,
2134
- display: 'flex',
2135
- flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2136
- overflow: columnDefType === 'data' ? 'hidden' : undefined,
2137
- pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2138
- ? `${headerPL}rem`
2139
- : undefined,
2140
- }, children: [jsxRuntime.jsx(Box__default["default"], { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
2141
- '&:hover': {
2142
- textOverflow: 'clip',
2143
- },
2144
- minWidth: `${Math.min((_c = (_b = columnDef.header) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, 4)}ch`,
2145
- overflow: columnDefType === 'data' ? 'hidden' : undefined,
2146
- textOverflow: 'ellipsis',
2147
- whiteSpace: ((_f = (_d = columnDef.header) === null || _d === void 0 ? void 0 : _d.length) !== null && _f !== void 0 ? _f : 0) < 20 ? 'nowrap' : 'normal',
2148
- }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps }))] }), columnDefType !== 'group' && (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsxRuntime.jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2149
- current: tableHeadCellRefs.current[column.id],
2150
- } })), showColumnActions && (jsxRuntime.jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsxRuntime.jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2151
- };
2152
-
2153
- const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
2160
+ })), draggingBorders)), children: [header.isPlaceholder
2161
+ ? null
2162
+ : (_c = tableCellProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content", sx: {
2163
+ alignItems: 'center',
2164
+ display: 'flex',
2165
+ flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2166
+ justifyContent: columnDefType === 'group' ||
2167
+ (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2168
+ ? 'center'
2169
+ : column.getCanResize()
2170
+ ? 'space-between'
2171
+ : 'flex-start',
2172
+ position: 'relative',
2173
+ width: '100%',
2174
+ }, children: [jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
2175
+ alignItems: 'center',
2176
+ cursor: column.getCanSort() && columnDefType !== 'group'
2177
+ ? 'pointer'
2178
+ : undefined,
2179
+ display: 'flex',
2180
+ flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
2181
+ overflow: columnDefType === 'data' ? 'hidden' : undefined,
2182
+ pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
2183
+ ? `${headerPL}rem`
2184
+ : undefined,
2185
+ }, children: [jsxRuntime.jsx(Box__default["default"], { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
2186
+ '&:hover': {
2187
+ textOverflow: 'clip',
2188
+ },
2189
+ minWidth: `${Math.min((_f = (_d = columnDef.header) === null || _d === void 0 ? void 0 : _d.length) !== null && _f !== void 0 ? _f : 0, 4)}ch`,
2190
+ overflow: columnDefType === 'data' ? 'hidden' : undefined,
2191
+ textOverflow: 'ellipsis',
2192
+ whiteSpace: ((_h = (_g = columnDef.header) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0) < 20
2193
+ ? 'nowrap'
2194
+ : 'normal',
2195
+ }, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table }))] }), columnDefType !== 'group' && (jsxRuntime.jsxs(Box__default["default"], { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsxRuntime.jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
2196
+ current: tableHeadCellRefs.current[column.id],
2197
+ } })), showColumnActions && (jsxRuntime.jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsxRuntime.jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
2198
+ };
2199
+
2200
+ const MRT_TableHeadRow = (_a) => {
2201
+ var { headerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["headerGroup", "table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
2154
2202
  const { options: { layoutMode, muiTableHeadRowProps }, } = table;
2155
- const tableRowProps = parseFromValuesOrFunc(muiTableHeadRowProps, {
2203
+ const tableRowProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadRowProps, {
2156
2204
  headerGroup,
2157
2205
  table,
2158
- });
2159
- return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.lighten(theme.palette.background.default, 0.05), boxShadow: `4px 0 8px ${styles.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
2206
+ })), { rest });
2207
+ return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${material.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
2160
2208
  const header = virtualColumns
2161
2209
  ? headerGroup.headers[headerOrVirtualHeader.index]
2162
2210
  : headerOrVirtualHeader;
@@ -2164,14 +2212,15 @@ const MRT_TableHeadRow = ({ headerGroup, table, virtualColumns, virtualPaddingLe
2164
2212
  }), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
2165
2213
  };
2166
2214
 
2167
- const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
2215
+ const MRT_LinearProgressBar = (_a) => {
2216
+ var { isTopToolbar, table } = _a, rest = __rest(_a, ["isTopToolbar", "table"]);
2168
2217
  const { getState, options: { muiLinearProgressProps }, } = table;
2169
- const { showProgressBars } = getState();
2170
- const linearProgressProps = parseFromValuesOrFunc(muiLinearProgressProps, {
2218
+ const { isSaving, showProgressBars } = getState();
2219
+ const linearProgressProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiLinearProgressProps, {
2171
2220
  isTopToolbar,
2172
2221
  table,
2173
- });
2174
- return (jsxRuntime.jsx(Collapse__default["default"], { in: showProgressBars, mountOnEnter: true, sx: {
2222
+ })), rest);
2223
+ return (jsxRuntime.jsx(Collapse__default["default"], { in: showProgressBars !== false && (showProgressBars || isSaving), mountOnEnter: true, sx: {
2175
2224
  bottom: isTopToolbar ? 0 : undefined,
2176
2225
  position: 'absolute',
2177
2226
  top: !isTopToolbar ? 0 : undefined,
@@ -2179,46 +2228,20 @@ const MRT_LinearProgressBar = ({ isTopToolbar, table, }) => {
2179
2228
  }, unmountOnExit: true, children: jsxRuntime.jsx(LinearProgress__default["default"], Object.assign({ "aria-busy": "true", "aria-label": "Loading", sx: { position: 'relative' } }, linearProgressProps)) }));
2180
2229
  };
2181
2230
 
2182
- /******************************************************************************
2183
- Copyright (c) Microsoft Corporation.
2184
-
2185
- Permission to use, copy, modify, and/or distribute this software for any
2186
- purpose with or without fee is hereby granted.
2187
-
2188
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2189
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2190
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2191
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2192
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2193
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2194
- PERFORMANCE OF THIS SOFTWARE.
2195
- ***************************************************************************** */
2196
- function __rest(s, e) {
2197
- var t = {};
2198
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2199
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2200
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2201
- }
2202
- return t;
2203
- }
2204
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2205
- var e = new Error(message);
2206
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2207
- };
2208
-
2209
2231
  const defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100];
2210
- const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2232
+ const MRT_TablePagination = (_a) => {
2233
+ var { position = 'bottom', table } = _a, rest = __rest(_a, ["position", "table"]);
2211
2234
  const { getPrePaginationRowModel, getState, options: { enableToolbarInternalActions, icons: { ChevronLeftIcon, ChevronRightIcon, FirstPageIcon, LastPageIcon }, localization, muiPaginationProps, paginationDisplayMode, rowCount, }, setPageIndex, setPageSize, } = table;
2212
2235
  const { pagination: { pageIndex = 0, pageSize = 10 }, showGlobalFilter, } = getState();
2213
- const paginationProps = parseFromValuesOrFunc(muiPaginationProps, {
2236
+ const paginationProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiPaginationProps, {
2214
2237
  table,
2215
- });
2238
+ })), rest);
2216
2239
  const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length;
2217
2240
  const numberOfPages = Math.ceil(totalRowCount / pageSize);
2218
2241
  const showFirstLastPageButtons = numberOfPages > 2;
2219
2242
  const firstRowIndex = pageIndex * pageSize;
2220
2243
  const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
2221
- const _a = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _a, rest = __rest(_a, ["rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
2244
+ const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b, _rest = __rest(_b, ["rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
2222
2245
  return (jsxRuntime.jsxs(Box__default["default"], { sx: {
2223
2246
  alignItems: 'center',
2224
2247
  display: 'flex',
@@ -2232,7 +2255,7 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2232
2255
  ? '3rem'
2233
2256
  : undefined,
2234
2257
  position: 'relative',
2235
- px: '4px',
2258
+ px: '8px',
2236
2259
  py: '12px',
2237
2260
  zIndex: 2,
2238
2261
  }, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], { disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.map((value) => (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
@@ -2240,16 +2263,17 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2240
2263
  last: LastPageIcon,
2241
2264
  next: ChevronRightIcon,
2242
2265
  previous: ChevronLeftIcon,
2243
- } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", sx: { mb: 0, minWidth: '10ch', mx: '4px' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2266
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, _rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", sx: { mb: 0, minWidth: '8ch', mx: '4px' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2244
2267
  };
2245
2268
 
2246
- const MRT_GlobalFilterTextField = ({ table, }) => {
2247
- var _a;
2269
+ const MRT_GlobalFilterTextField = (_a) => {
2270
+ var _b;
2271
+ var { table } = _a, rest = __rest(_a, ["table"]);
2248
2272
  const { getState, options: { enableGlobalFilterModes, icons: { CloseIcon, SearchIcon }, localization, manualFiltering, muiSearchTextFieldProps, }, refs: { searchInputRef }, setGlobalFilter, } = table;
2249
2273
  const { globalFilter, showGlobalFilter } = getState();
2250
- const textFieldProps = parseFromValuesOrFunc(muiSearchTextFieldProps, {
2274
+ const textFieldProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiSearchTextFieldProps, {
2251
2275
  table,
2252
- });
2276
+ })), rest);
2253
2277
  const isMounted = react.useRef(false);
2254
2278
  const [anchorEl, setAnchorEl] = react.useState(null);
2255
2279
  const [searchValue, setSearchValue] = react.useState(globalFilter !== null && globalFilter !== void 0 ? globalFilter : '');
@@ -2279,10 +2303,10 @@ const MRT_GlobalFilterTextField = ({ table, }) => {
2279
2303
  }
2280
2304
  isMounted.current = true;
2281
2305
  }, [globalFilter]);
2282
- return (jsxRuntime.jsxs(Collapse__default["default"], { in: showGlobalFilter, mountOnEnter: true, orientation: "horizontal", unmountOnExit: true, children: [jsxRuntime.jsx(TextField__default["default"], Object.assign({ InputProps: {
2283
- endAdornment: (jsxRuntime.jsx(InputAdornment__default["default"], { position: "end", children: jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: (_a = localization.clearSearch) !== null && _a !== void 0 ? _a : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small", children: jsxRuntime.jsx(CloseIcon, {}) }) }) }) })),
2284
- startAdornment: enableGlobalFilterModes ? (jsxRuntime.jsx(InputAdornment__default["default"], { position: "start", children: jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.changeSearchMode, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(SearchIcon, {}) }) }) })) : (jsxRuntime.jsx(SearchIcon, { style: { marginRight: '4px' } })),
2285
- }, onChange: handleChange, placeholder: localization.search, value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "standard" }, textFieldProps, { inputRef: (inputRef) => {
2306
+ return (jsxRuntime.jsxs(Collapse__default["default"], { in: showGlobalFilter, mountOnEnter: true, orientation: "horizontal", unmountOnExit: true, children: [jsxRuntime.jsx(TextField__default["default"], Object.assign({ InputProps: Object.assign(Object.assign({ endAdornment: (jsxRuntime.jsx(InputAdornment__default["default"], { position: "end", children: jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = localization.clearSearch) !== null && _b !== void 0 ? _b : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small", children: jsxRuntime.jsx(CloseIcon, {}) }) }) }) })), startAdornment: enableGlobalFilterModes ? (jsxRuntime.jsx(InputAdornment__default["default"], { position: "start", children: jsxRuntime.jsx(Tooltip__default["default"], { title: localization.changeSearchMode, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(SearchIcon, {}) }) }) })) : (jsxRuntime.jsx(SearchIcon, { style: { marginRight: '4px' } })) }, textFieldProps.InputProps), { sx: (theme) => {
2307
+ var _a;
2308
+ return (Object.assign({ mb: 0 }, parseFromValuesOrFunc((_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.sx, theme)));
2309
+ } }), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onChange: handleChange, placeholder: localization.search, size: "small", value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "outlined" }, textFieldProps, { inputRef: (inputRef) => {
2286
2310
  searchInputRef.current = inputRef;
2287
2311
  if (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputRef) {
2288
2312
  textFieldProps.inputRef = inputRef;
@@ -2290,13 +2314,14 @@ const MRT_GlobalFilterTextField = ({ table, }) => {
2290
2314
  } })), jsxRuntime.jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, onSelect: handleClear, setAnchorEl: setAnchorEl, table: table })] }));
2291
2315
  };
2292
2316
 
2293
- const MRT_SelectCheckbox = ({ row, selectAll, table, }) => {
2294
- var _a;
2317
+ const MRT_SelectCheckbox = (_a) => {
2318
+ var _b;
2319
+ var { row, selectAll, table } = _a, rest = __rest(_a, ["row", "selectAll", "table"]);
2295
2320
  const { getState, options: { enableMultiRowSelection, enableRowPinning, localization, muiSelectAllCheckboxProps, muiSelectCheckboxProps, rowPinningDisplayMode, selectAllMode, }, } = table;
2296
2321
  const { density, isLoading } = getState();
2297
- const checkboxProps = !row
2322
+ const checkboxProps = Object.assign(Object.assign({}, (!row
2298
2323
  ? parseFromValuesOrFunc(muiSelectAllCheckboxProps, { table })
2299
- : parseFromValuesOrFunc(muiSelectCheckboxProps, { row, table });
2324
+ : parseFromValuesOrFunc(muiSelectCheckboxProps, { row, table }))), rest);
2300
2325
  const allRowsSelected = selectAll
2301
2326
  ? selectAllMode === 'page'
2302
2327
  ? table.getIsAllPageRowsSelected()
@@ -2330,25 +2355,26 @@ const MRT_SelectCheckbox = ({ row, selectAll, table, }) => {
2330
2355
  e.stopPropagation();
2331
2356
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
2332
2357
  }, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.5rem', m: density !== 'compact' ? '-0.4rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.5rem', zIndex: 0 }, parseFromValuesOrFunc(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx, theme))), title: undefined });
2333
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
2358
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : (selectAll
2334
2359
  ? localization.toggleSelectAll
2335
2360
  : localization.toggleSelectRow), children: enableMultiRowSelection === false ? (jsxRuntime.jsx(Radio__default["default"], Object.assign({}, commonProps))) : (jsxRuntime.jsx(Checkbox__default["default"], Object.assign({ indeterminate: selectAll
2336
2361
  ? table.getIsSomeRowsSelected() && !allRowsSelected
2337
2362
  : row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps))) }));
2338
2363
  };
2339
2364
 
2340
- const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
2341
- var _a, _b, _c;
2365
+ const MRT_ToolbarAlertBanner = (_a) => {
2366
+ var _b, _c, _d;
2367
+ var { stackAlertBanner, table } = _a, rest = __rest(_a, ["stackAlertBanner", "table"]);
2342
2368
  const { getPrePaginationRowModel, getSelectedRowModel, getState, options: { enableRowSelection, enableSelectAll, localization, muiToolbarAlertBannerChipProps, muiToolbarAlertBannerProps, positionToolbarAlertBanner, renderToolbarAlertBannerContent, rowCount, }, refs: { tablePaperRef }, } = table;
2343
2369
  const { density, grouping, showAlertBanner } = getState();
2344
- const alertProps = parseFromValuesOrFunc(muiToolbarAlertBannerProps, {
2370
+ const alertProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiToolbarAlertBannerProps, {
2345
2371
  table,
2346
- });
2372
+ })), rest);
2347
2373
  const chipProps = parseFromValuesOrFunc(muiToolbarAlertBannerChipProps, {
2348
2374
  table,
2349
2375
  });
2350
2376
  const selectedAlert = getSelectedRowModel().rows.length > 0
2351
- ? (_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())
2377
+ ? (_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) === null || _c === void 0 ? void 0 : _c.replace('{rowCount}', (rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length).toString())
2352
2378
  : null;
2353
2379
  const groupedAlert = grouping.length > 0 ? (jsxRuntime.jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxRuntime.jsxs(react.Fragment, { children: [index > 0 ? localization.thenBy : '', jsxRuntime.jsx(Chip__default["default"], Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index}-${columnId}`)))] })) : null;
2354
2380
  return (jsxRuntime.jsx(Collapse__default["default"], { in: showAlertBanner || !!selectedAlert || !!groupedAlert, timeout: stackAlertBanner ? 200 : 0, children: jsxRuntime.jsx(Alert__default["default"], Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => {
@@ -2361,11 +2387,11 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
2361
2387
  : positionToolbarAlertBanner === 'bottom'
2362
2388
  ? '-1rem'
2363
2389
  : undefined, p: 0, position: 'relative', right: 0, top: 0, width: '100%', zIndex: 2 }, parseFromValuesOrFunc(alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx, theme)));
2364
- }, children: (_c = renderToolbarAlertBannerContent === null || renderToolbarAlertBannerContent === void 0 ? void 0 : renderToolbarAlertBannerContent({
2390
+ }, children: (_d = renderToolbarAlertBannerContent === null || renderToolbarAlertBannerContent === void 0 ? void 0 : renderToolbarAlertBannerContent({
2365
2391
  groupedAlert,
2366
2392
  selectedAlert,
2367
2393
  table,
2368
- })) !== null && _c !== void 0 ? _c : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsxRuntime.jsx(AlertTitle__default["default"], { children: alertProps.title }), jsxRuntime.jsxs(Stack__default["default"], { sx: {
2394
+ })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsxRuntime.jsx(AlertTitle__default["default"], { children: alertProps.title }), jsxRuntime.jsxs(Stack__default["default"], { sx: {
2369
2395
  p: positionToolbarAlertBanner !== 'head-overlay'
2370
2396
  ? '0.5rem 1rem'
2371
2397
  : density === 'spacious'
@@ -2378,8 +2404,9 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
2378
2404
  positionToolbarAlertBanner === 'head-overlay' && (jsxRuntime.jsx(MRT_SelectCheckbox, { selectAll: true, table: table })), ' ', selectedAlert] }), selectedAlert && groupedAlert && jsxRuntime.jsx("br", {}), groupedAlert] })] })) })) }));
2379
2405
  };
2380
2406
 
2381
- const MRT_ToolbarDropZone = ({ table, }) => {
2382
- var _a, _b;
2407
+ const MRT_ToolbarDropZone = (_a) => {
2408
+ var _b, _c;
2409
+ var { table } = _a, rest = __rest(_a, ["table"]);
2383
2410
  const { getState, options: { enableGrouping, localization }, setHoveredColumn, setShowToolbarDropZone, } = table;
2384
2411
  const { draggingColumn, grouping, hoveredColumn, showToolbarDropZone } = getState();
2385
2412
  const handleDragEnter = (_event) => {
@@ -2394,35 +2421,57 @@ const MRT_ToolbarDropZone = ({ table, }) => {
2394
2421
  !grouping.includes(draggingColumn.id));
2395
2422
  }
2396
2423
  }, [enableGrouping, draggingColumn, grouping]);
2397
- return (jsxRuntime.jsx(Fade__default["default"], { in: showToolbarDropZone, children: jsxRuntime.jsx(Box__default["default"], { className: "Mui-ToolbarDropZone", onDragEnter: handleDragEnter, sx: (theme) => ({
2398
- alignItems: 'center',
2399
- backdropFilter: 'blur(4px)',
2400
- backgroundColor: styles.alpha(theme.palette.info.main, (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone' ? 0.2 : 0.1),
2401
- border: `dashed ${theme.palette.info.main} 2px`,
2402
- boxSizing: 'border-box',
2403
- display: 'flex',
2404
- height: '100%',
2405
- justifyContent: 'center',
2406
- position: 'absolute',
2407
- width: '100%',
2408
- zIndex: 4,
2409
- }), children: jsxRuntime.jsx(Typography__default["default"], { 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 : '') }) }) }));
2424
+ return (jsxRuntime.jsx(Fade__default["default"], { in: showToolbarDropZone, children: jsxRuntime.jsx(Box__default["default"], Object.assign({ className: "Mui-ToolbarDropZone", onDragEnter: handleDragEnter }, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', backdropFilter: 'blur(4px)', backgroundColor: styles.alpha(theme.palette.info.main, (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone' ? 0.2 : 0.1), border: `dashed ${theme.palette.info.main} 2px`, boxSizing: 'border-box', display: 'flex', height: '100%', justifyContent: 'center', position: 'absolute', width: '100%', zIndex: 4 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsx(Typography__default["default"], { fontStyle: "italic", children: localization.dropToGroupBy.replace('{column}', (_c = (_b = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _b === void 0 ? void 0 : _b.header) !== null && _c !== void 0 ? _c : '') }) })) }));
2425
+ };
2426
+
2427
+ const MRT_BottomToolbar = (_a) => {
2428
+ var { table } = _a, rest = __rest(_a, ["table"]);
2429
+ const { getState, options: { enablePagination, muiBottomToolbarProps, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderBottomToolbarCustomActions, }, refs: { bottomToolbarRef }, } = table;
2430
+ const { isFullScreen } = getState();
2431
+ const isMobile = useMediaQuery__default["default"]('(max-width:720px)');
2432
+ const toolbarProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiBottomToolbarProps, { table })), rest);
2433
+ const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
2434
+ return (jsxRuntime.jsxs(Box__default["default"], Object.assign({}, toolbarProps, { ref: (node) => {
2435
+ if (node) {
2436
+ bottomToolbarRef.current = node;
2437
+ if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
2438
+ // @ts-ignore
2439
+ toolbarProps.ref.current = node;
2440
+ }
2441
+ }
2442
+ }, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, getCommonToolbarStyles({ table, theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${material.alpha(theme.palette.grey[700], 0.5)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box__default["default"], { sx: {
2443
+ alignItems: 'center',
2444
+ boxSizing: 'border-box',
2445
+ display: 'flex',
2446
+ justifyContent: 'space-between',
2447
+ p: '0.5rem',
2448
+ width: '100%',
2449
+ }, children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsxRuntime.jsx("span", {})), jsxRuntime.jsx(Box__default["default"], { sx: {
2450
+ display: 'flex',
2451
+ justifyContent: 'flex-end',
2452
+ position: stackAlertBanner ? 'relative' : 'absolute',
2453
+ right: 0,
2454
+ top: 0,
2455
+ }, children: enablePagination &&
2456
+ ['both', 'bottom'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "bottom", table: table })) })] })] })));
2410
2457
  };
2411
2458
 
2412
- const MRT_ColumnPinningButtons = ({ column, table, }) => {
2459
+ const MRT_ColumnPinningButtons = (_a) => {
2460
+ var { column, table } = _a, rest = __rest(_a, ["column", "table"]);
2413
2461
  const { options: { icons: { PushPinIcon }, localization, }, } = table;
2414
2462
  const handlePinColumn = (pinDirection) => {
2415
2463
  column.pin(pinDirection);
2416
2464
  };
2417
- return (jsxRuntime.jsx(Box__default["default"], { sx: { minWidth: '70px', textAlign: 'center' }, children: column.getIsPinned() ? (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.unpin, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn(false), size: "small", children: jsxRuntime.jsx(PushPinIcon, {}) }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.pinToLeft, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn('left'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
2465
+ return (jsxRuntime.jsx(Box__default["default"], Object.assign({}, rest, { sx: (theme) => (Object.assign({ minWidth: '70px', textAlign: 'center' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: column.getIsPinned() ? (jsxRuntime.jsx(Tooltip__default["default"], { title: localization.unpin, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn(false), size: "small", children: jsxRuntime.jsx(PushPinIcon, {}) }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { title: localization.pinToLeft, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn('left'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
2418
2466
  transform: 'rotate(90deg)',
2419
- } }) }) }), jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.pinToRight, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn('right'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
2467
+ } }) }) }), jsxRuntime.jsx(Tooltip__default["default"], { title: localization.pinToRight, children: jsxRuntime.jsx(IconButton__default["default"], { onClick: () => handlePinColumn('right'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
2420
2468
  transform: 'rotate(-90deg)',
2421
- } }) }) })] })) }));
2469
+ } }) }) })] })) })));
2422
2470
  };
2423
2471
 
2424
- const MRT_ShowHideColumnsMenuItems = ({ allColumns, column, hoveredColumn, setHoveredColumn, table, }) => {
2425
- var _a;
2472
+ const MRT_ShowHideColumnsMenuItems = (_a) => {
2473
+ var _b;
2474
+ var { allColumns, column, hoveredColumn, setHoveredColumn, table } = _a, rest = __rest(_a, ["allColumns", "column", "hoveredColumn", "setHoveredColumn", "table"]);
2426
2475
  const { getState, options: { enableColumnOrdering, enableColumnPinning, enableHiding, localization, }, setColumnOrder, } = table;
2427
2476
  const { columnOrder } = getState();
2428
2477
  const { columnDef } = column;
@@ -2459,20 +2508,13 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, column, hoveredColumn, setHo
2459
2508
  setHoveredColumn(column);
2460
2509
  }
2461
2510
  };
2462
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuItem__default["default"], { disableRipple: true, onDragEnter: handleDragEnter, ref: menuItemRef, sx: (theme) => ({
2463
- alignItems: 'center',
2464
- justifyContent: 'flex-start',
2465
- my: 0,
2466
- opacity: isDragging ? 0.5 : 1,
2467
- outline: isDragging
2468
- ? `2px dashed ${theme.palette.divider}`
2511
+ if (!columnDef.header)
2512
+ return null;
2513
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuItem__default["default"], Object.assign({ disableRipple: true, onDragEnter: handleDragEnter, ref: menuItemRef }, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', justifyContent: 'flex-start', my: 0, opacity: isDragging ? 0.5 : 1, outline: isDragging
2514
+ ? `2px dashed ${theme.palette.grey[500]}`
2469
2515
  : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2470
- ? `2px dashed ${theme.palette.primary.main}`
2471
- : 'none',
2472
- outlineOffset: '-2px',
2473
- pl: `${(column.depth + 0.5) * 2}rem`,
2474
- py: '6px',
2475
- }), children: jsxRuntime.jsxs(Box__default["default"], { sx: {
2516
+ ? `2px dashed ${getMRTTheme(table, theme).draggingBorderColor}`
2517
+ : 'none', outlineOffset: '-2px', pl: `${(column.depth + 0.5) * 2}rem`, py: '6px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsxs(Box__default["default"], { sx: {
2476
2518
  display: 'flex',
2477
2519
  flexWrap: 'nowrap',
2478
2520
  gap: '8px',
@@ -2487,10 +2529,11 @@ const MRT_ShowHideColumnsMenuItems = ({ allColumns, column, hoveredColumn, setHo
2487
2529
  opacity: columnDefType !== 'display' ? 1 : 0.5,
2488
2530
  },
2489
2531
  },
2490
- }, control: jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility, children: jsxRuntime.jsx(Switch__default["default"], {}) }), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsxRuntime.jsx(Typography__default["default"], { sx: { alignSelf: 'center' }, children: columnDef.header }))] }) }), (_a = column.columns) === null || _a === void 0 ? void 0 : _a.map((c, i) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
2532
+ }, control: jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility, children: jsxRuntime.jsx(Switch__default["default"], {}) }), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsxRuntime.jsx(Typography__default["default"], { sx: { alignSelf: 'center' }, children: columnDef.header }))] }) })), (_b = column.columns) === null || _b === void 0 ? void 0 : _b.map((c, i) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
2491
2533
  };
2492
2534
 
2493
- const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
2535
+ const MRT_ShowHideColumnsMenu = (_a) => {
2536
+ var { anchorEl, setAnchorEl, table } = _a, rest = __rest(_a, ["anchorEl", "setAnchorEl", "table"]);
2494
2537
  const { getAllColumns, getAllLeafColumns, getCenterLeafColumns, getIsAllColumnsVisible, getIsSomeColumnsPinned, getIsSomeColumnsVisible, getLeftLeafColumns, getRightLeafColumns, getState, options: { enableColumnOrdering, enableColumnPinning, enableHiding, localization, }, toggleAllColumnsVisible, } = table;
2495
2538
  const { columnOrder, columnPinning, density } = getState();
2496
2539
  const hideAllColumns = () => {
@@ -2518,14 +2561,14 @@ const MRT_ShowHideColumnsMenu = ({ anchorEl, setAnchorEl, table, }) => {
2518
2561
  getRightLeafColumns(),
2519
2562
  ]);
2520
2563
  const [hoveredColumn, setHoveredColumn] = react.useState(null);
2521
- return (jsxRuntime.jsxs(Menu__default["default"], { MenuListProps: {
2564
+ return (jsxRuntime.jsxs(Menu__default["default"], Object.assign({ MenuListProps: {
2522
2565
  dense: density === 'compact',
2523
- }, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl, children: [jsxRuntime.jsxs(Box__default["default"], { sx: {
2566
+ }, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [jsxRuntime.jsxs(Box__default["default"], { sx: {
2524
2567
  display: 'flex',
2525
2568
  justifyContent: 'space-between',
2526
2569
  p: '0.5rem',
2527
2570
  pt: 0,
2528
- }, children: [enableHiding && (jsxRuntime.jsx(Button__default["default"], { disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns, children: localization.hideAll })), enableColumnOrdering && (jsxRuntime.jsx(Button__default["default"], { onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)), children: localization.resetOrder })), enableColumnPinning && (jsxRuntime.jsx(Button__default["default"], { disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true), children: localization.unpinAll })), enableHiding && (jsxRuntime.jsx(Button__default["default"], { disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true), children: localization.showAll }))] }), jsxRuntime.jsx(Divider__default["default"], {}), allColumns.map((column, index) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] }));
2571
+ }, children: [enableHiding && (jsxRuntime.jsx(Button__default["default"], { disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns, children: localization.hideAll })), enableColumnOrdering && (jsxRuntime.jsx(Button__default["default"], { onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)), children: localization.resetOrder })), enableColumnPinning && (jsxRuntime.jsx(Button__default["default"], { disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true), children: localization.unpinAll })), enableHiding && (jsxRuntime.jsx(Button__default["default"], { disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true), children: localization.showAll }))] }), jsxRuntime.jsx(Divider__default["default"], {}), allColumns.map((column, index) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] })));
2529
2572
  };
2530
2573
 
2531
2574
  const MRT_ShowHideColumnsButton = (_a) => {
@@ -2536,7 +2579,7 @@ const MRT_ShowHideColumnsButton = (_a) => {
2536
2579
  const handleClick = (event) => {
2537
2580
  setAnchorEl(event.currentTarget);
2538
2581
  };
2539
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined, children: jsxRuntime.jsx(ViewColumnIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
2582
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined, children: jsxRuntime.jsx(ViewColumnIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
2540
2583
  };
2541
2584
 
2542
2585
  const MRT_ToggleDensePaddingButton = (_a) => {
@@ -2552,7 +2595,7 @@ const MRT_ToggleDensePaddingButton = (_a) => {
2552
2595
  : 'comfortable';
2553
2596
  setDensity(nextDensity);
2554
2597
  };
2555
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined, children: density === 'compact' ? (jsxRuntime.jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsxRuntime.jsx(DensityMediumIcon, {})) : (jsxRuntime.jsx(DensityLargeIcon, {})) })) }));
2598
+ return (jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined, children: density === 'compact' ? (jsxRuntime.jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsxRuntime.jsx(DensityMediumIcon, {})) : (jsxRuntime.jsx(DensityLargeIcon, {})) })) }));
2556
2599
  };
2557
2600
 
2558
2601
  const MRT_ToggleFiltersButton = (_a) => {
@@ -2563,7 +2606,7 @@ const MRT_ToggleFiltersButton = (_a) => {
2563
2606
  const handleToggleShowFilters = () => {
2564
2607
  setShowColumnFilters(!showColumnFilters);
2565
2608
  };
2566
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined, children: showColumnFilters ? jsxRuntime.jsx(FilterListOffIcon, {}) : jsxRuntime.jsx(FilterListIcon, {}) })) }));
2609
+ return (jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined, children: showColumnFilters ? jsxRuntime.jsx(FilterListOffIcon, {}) : jsxRuntime.jsx(FilterListIcon, {}) })) }));
2567
2610
  };
2568
2611
 
2569
2612
  const MRT_ToggleFullScreenButton = (_a) => {
@@ -2576,7 +2619,7 @@ const MRT_ToggleFullScreenButton = (_a) => {
2576
2619
  setTooltipOpened(false);
2577
2620
  setIsFullScreen(!isFullScreen);
2578
2621
  };
2579
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, open: tooltipOpened, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.toggleFullScreen, onClick: handleToggleFullScreen, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false) }, rest, { title: undefined, children: isFullScreen ? jsxRuntime.jsx(FullscreenExitIcon, {}) : jsxRuntime.jsx(FullscreenIcon, {}) })) }));
2622
+ return (jsxRuntime.jsx(Tooltip__default["default"], { open: tooltipOpened, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.toggleFullScreen, onClick: handleToggleFullScreen, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false) }, rest, { title: undefined, children: isFullScreen ? jsxRuntime.jsx(FullscreenExitIcon, {}) : jsxRuntime.jsx(FullscreenIcon, {}) })) }));
2580
2623
  };
2581
2624
 
2582
2625
  const MRT_ToggleGlobalFilterButton = (_a) => {
@@ -2588,37 +2631,22 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
2588
2631
  setShowGlobalFilter(!showGlobalFilter);
2589
2632
  queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
2590
2633
  };
2591
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch, children: jsxRuntime.jsx(IconButton__default["default"], 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 ? jsxRuntime.jsx(SearchOffIcon, {}) : jsxRuntime.jsx(SearchIcon, {}) })) }));
2634
+ return (jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch, children: jsxRuntime.jsx(IconButton__default["default"], 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 ? jsxRuntime.jsx(SearchOffIcon, {}) : jsxRuntime.jsx(SearchIcon, {}) })) }));
2592
2635
  };
2593
2636
 
2594
- const MRT_ToolbarInternalButtons = ({ table, }) => {
2595
- var _a;
2637
+ const MRT_ToolbarInternalButtons = (_a) => {
2638
+ var _b;
2639
+ var { table } = _a, rest = __rest(_a, ["table"]);
2596
2640
  const { options: { columnFilterDisplayMode, enableColumnFilters, enableColumnOrdering, enableColumnPinning, enableDensityToggle, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableHiding, initialState, renderToolbarInternalActions, }, } = table;
2597
- return (jsxRuntime.jsx(Box__default["default"], { sx: {
2598
- alignItems: 'center',
2599
- display: 'flex',
2600
- zIndex: 3,
2601
- }, children: (_a = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
2641
+ return (jsxRuntime.jsx(Box__default["default"], Object.assign({}, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', display: 'flex', zIndex: 3 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: (_b = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
2602
2642
  table,
2603
- })) !== null && _a !== void 0 ? _a : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [enableFilters &&
2643
+ })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [enableFilters &&
2604
2644
  enableGlobalFilter &&
2605
2645
  !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (jsxRuntime.jsx(MRT_ToggleGlobalFilterButton, { table: table })), enableFilters &&
2606
2646
  enableColumnFilters &&
2607
- columnFilterDisplayMode !== 'popover' && (jsxRuntime.jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enableColumnPinning) && (jsxRuntime.jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsxRuntime.jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsxRuntime.jsx(MRT_ToggleFullScreenButton, { table: table }))] })) }));
2647
+ columnFilterDisplayMode !== 'popover' && (jsxRuntime.jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enableColumnPinning) && (jsxRuntime.jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsxRuntime.jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsxRuntime.jsx(MRT_ToggleFullScreenButton, { table: table }))] })) })));
2608
2648
  };
2609
2649
 
2610
- const commonToolbarStyles = ({ theme }) => ({
2611
- alignItems: 'flex-start',
2612
- backgroundColor: styles.lighten(theme.palette.background.default, 0.05),
2613
- backgroundImage: 'none',
2614
- display: 'grid',
2615
- flexWrap: 'wrap-reverse',
2616
- minHeight: '3.5rem',
2617
- overflow: 'hidden',
2618
- p: '0 !important',
2619
- transition: 'all 150ms ease-in-out',
2620
- zIndex: 1,
2621
- });
2622
2650
  const MRT_TopToolbar = ({ table, }) => {
2623
2651
  var _a;
2624
2652
  const { getState, options: { enableGlobalFilter, enablePagination, enableToolbarInternalActions, muiTopToolbarProps, positionGlobalFilter, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderTopToolbarCustomActions, }, refs: { topToolbarRef }, } = table;
@@ -2626,16 +2654,17 @@ const MRT_TopToolbar = ({ table, }) => {
2626
2654
  const isMobile = useMediaQuery__default["default"]('(max-width:720px)');
2627
2655
  const toolbarProps = parseFromValuesOrFunc(muiTopToolbarProps, { table });
2628
2656
  const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter;
2629
- return (jsxRuntime.jsxs(Toolbar__default["default"], Object.assign({ variant: "dense" }, toolbarProps, { ref: (ref) => {
2657
+ return (jsxRuntime.jsxs(Box__default["default"], Object.assign({}, toolbarProps, { ref: (ref) => {
2630
2658
  topToolbarRef.current = ref;
2631
2659
  if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
2632
2660
  // @ts-ignore
2633
2661
  toolbarProps.ref.current = ref;
2634
2662
  }
2635
- }, sx: (theme) => (Object.assign(Object.assign({ position: isFullScreen ? 'sticky' : undefined, top: isFullScreen ? '0' : undefined }, commonToolbarStyles({ theme })), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [positionToolbarAlertBanner === 'top' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box__default["default"], { sx: {
2663
+ }, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, getCommonToolbarStyles({ table, theme })), { position: isFullScreen ? 'sticky' : 'relative', top: isFullScreen ? '0' : undefined }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [positionToolbarAlertBanner === 'top' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box__default["default"], { sx: {
2636
2664
  alignItems: 'flex-start',
2637
2665
  boxSizing: 'border-box',
2638
2666
  display: 'flex',
2667
+ gap: '0.5rem',
2639
2668
  justifyContent: 'space-between',
2640
2669
  p: '0.5rem',
2641
2670
  position: stackAlertBanner ? 'relative' : 'absolute',
@@ -2643,49 +2672,21 @@ const MRT_TopToolbar = ({ table, }) => {
2643
2672
  top: 0,
2644
2673
  width: '100%',
2645
2674
  }, children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsxRuntime.jsx("span", {}), enableToolbarInternalActions ? (jsxRuntime.jsxs(Box__default["default"], { sx: {
2675
+ alignItems: 'center',
2646
2676
  display: 'flex',
2647
2677
  flexWrap: 'wrap-reverse',
2678
+ gap: '0.5rem',
2648
2679
  justifyContent: 'flex-end',
2649
2680
  }, children: [enableGlobalFilter && positionGlobalFilter === 'right' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })), jsxRuntime.jsx(MRT_ToolbarInternalButtons, { table: table })] })) : (enableGlobalFilter &&
2650
2681
  positionGlobalFilter === 'right' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })))] }), enablePagination &&
2651
2682
  ['both', 'top'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "top", table: table })), jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: true, table: table })] })));
2652
2683
  };
2653
2684
 
2654
- const MRT_BottomToolbar = ({ table, }) => {
2655
- const { getState, options: { enablePagination, muiBottomToolbarProps, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderBottomToolbarCustomActions, }, refs: { bottomToolbarRef }, } = table;
2656
- const { isFullScreen } = getState();
2657
- const isMobile = useMediaQuery__default["default"]('(max-width:720px)');
2658
- const toolbarProps = parseFromValuesOrFunc(muiBottomToolbarProps, { table });
2659
- const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
2660
- return (jsxRuntime.jsxs(Toolbar__default["default"], Object.assign({ variant: "dense" }, toolbarProps, { ref: (node) => {
2661
- if (node) {
2662
- bottomToolbarRef.current = node;
2663
- if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
2664
- // @ts-ignore
2665
- toolbarProps.ref.current = node;
2666
- }
2667
- }
2668
- }, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, commonToolbarStyles({ theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${styles.alpha(theme.palette.common.black, 0.1)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box__default["default"], { sx: {
2669
- alignItems: 'center',
2670
- boxSizing: 'border-box',
2671
- display: 'flex',
2672
- justifyContent: 'space-between',
2673
- p: '0.5rem',
2674
- width: '100%',
2675
- }, children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsxRuntime.jsx("span", {})), jsxRuntime.jsx(Box__default["default"], { sx: {
2676
- display: 'flex',
2677
- justifyContent: 'flex-end',
2678
- position: stackAlertBanner ? 'relative' : 'absolute',
2679
- right: 0,
2680
- top: 0,
2681
- }, children: enablePagination &&
2682
- ['both', 'bottom'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "bottom", table: table })) })] })] })));
2683
- };
2684
-
2685
- const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
2685
+ const MRT_TableHead = (_a) => {
2686
+ var { table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
2686
2687
  const { getHeaderGroups, getSelectedRowModel, getState, options: { enableStickyHeader, layoutMode, muiTableHeadProps, positionToolbarAlertBanner, }, refs: { tableHeadRef }, } = table;
2687
2688
  const { isFullScreen, showAlertBanner } = getState();
2688
- const tableHeadProps = parseFromValuesOrFunc(muiTableHeadProps, { table });
2689
+ const tableHeadProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadProps, { table })), rest);
2689
2690
  const stickyHeader = enableStickyHeader || isFullScreen;
2690
2691
  return (jsxRuntime.jsx(TableHead__default["default"], Object.assign({}, tableHeadProps, { ref: (ref) => {
2691
2692
  tableHeadRef.current = ref;
@@ -2697,16 +2698,17 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2697
2698
  (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (jsxRuntime.jsx("tr", { style: {
2698
2699
  display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
2699
2700
  }, children: jsxRuntime.jsx("th", { colSpan: table.getVisibleLeafColumns().length, style: {
2700
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : 'table-cell',
2701
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
2701
2702
  padding: 0,
2702
2703
  }, children: jsxRuntime.jsx(MRT_ToolbarAlertBanner, { table: table }) }) })) : (getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx(MRT_TableHeadRow, { headerGroup: headerGroup, table: table, virtualColumns: virtualColumns, virtualPaddingLeft: virtualPaddingLeft, virtualPaddingRight: virtualPaddingRight }, headerGroup.id)))) })));
2703
2704
  };
2704
2705
 
2705
- const MRT_Table = ({ table, }) => {
2706
- var _a, _b, _c, _d;
2707
- const { getFlatHeaders, getState, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, columns, enableColumnPinning, enableColumnResizing, enableColumnVirtualization, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, }, refs: { tableContainerRef }, } = table;
2706
+ const MRT_Table = (_a) => {
2707
+ var _b, _c, _d, _e;
2708
+ var { table } = _a, rest = __rest(_a, ["table"]);
2709
+ const { getFlatHeaders, getState, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, columns, enableColumnPinning, enableColumnVirtualization, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, }, refs: { tableContainerRef }, } = table;
2708
2710
  const { columnPinning, columnSizing, columnSizingInfo, columnVisibility, draggingColumn, isFullScreen, } = getState();
2709
- const tableProps = parseFromValuesOrFunc(muiTableProps, { table });
2711
+ const tableProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableProps, { table })), rest);
2710
2712
  const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, { table });
2711
2713
  const columnSizeVars = react.useMemo(() => {
2712
2714
  const headers = getFlatHeaders();
@@ -2761,10 +2763,10 @@ const MRT_Table = ({ table, }) => {
2761
2763
  let virtualPaddingLeft;
2762
2764
  let virtualPaddingRight;
2763
2765
  if (columnVirtualizer && (virtualColumns === null || virtualColumns === void 0 ? void 0 : virtualColumns.length)) {
2764
- virtualPaddingLeft = (_b = (_a = virtualColumns[leftPinnedIndexes.length]) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : 0;
2766
+ virtualPaddingLeft = (_c = (_b = virtualColumns[leftPinnedIndexes.length]) === null || _b === void 0 ? void 0 : _b.start) !== null && _c !== void 0 ? _c : 0;
2765
2767
  virtualPaddingRight =
2766
2768
  columnVirtualizer.getTotalSize() -
2767
- ((_d = (_c = virtualColumns[virtualColumns.length - 1 - rightPinnedIndexes.length]) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : 0);
2769
+ ((_e = (_d = virtualColumns[virtualColumns.length - 1 - rightPinnedIndexes.length]) === null || _d === void 0 ? void 0 : _d.end) !== null && _e !== void 0 ? _e : 0);
2768
2770
  }
2769
2771
  const props = {
2770
2772
  table,
@@ -2772,12 +2774,31 @@ const MRT_Table = ({ table, }) => {
2772
2774
  virtualPaddingLeft,
2773
2775
  virtualPaddingRight,
2774
2776
  };
2775
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, tableLayout: layoutMode === 'semantic' && enableColumnResizing
2776
- ? 'fixed'
2777
- : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, props))] })) }));
2777
+ return (jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, props))] })));
2778
+ };
2779
+
2780
+ const MRT_TableLoadingOverlay = (_a) => {
2781
+ var { table } = _a, rest = __rest(_a, ["table"]);
2782
+ const { options: { localization, muiCircularProgressProps }, } = table;
2783
+ const circularProgressProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiCircularProgressProps, { table })), rest);
2784
+ return (jsxRuntime.jsx(Box__default["default"], { sx: (theme) => ({
2785
+ alignItems: 'center',
2786
+ backgroundColor: styles.alpha(getMRTTheme(table, theme).baseBackgroundColor, 0.5),
2787
+ bottom: 0,
2788
+ display: 'flex',
2789
+ justifyContent: 'center',
2790
+ left: 0,
2791
+ maxHeight: '100vh',
2792
+ position: 'absolute',
2793
+ right: 0,
2794
+ top: 0,
2795
+ width: '100%',
2796
+ zIndex: 2,
2797
+ }), children: jsxRuntime.jsx(CircularProgress__default["default"], Object.assign({ "aria-label": localization.noRecordsToDisplay, id: "mrt-progress" }, circularProgressProps)) }));
2778
2798
  };
2779
2799
 
2780
- const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
2800
+ const MRT_EditActionButtons = (_a) => {
2801
+ var { row, table, variant = 'icon' } = _a, rest = __rest(_a, ["row", "table", "variant"]);
2781
2802
  const { getState, options: { icons: { CancelIcon, SaveIcon }, localization, onCreatingRowCancel, onCreatingRowSave, onEditingRowCancel, onEditingRowSave, }, refs: { editInputRefs }, setCreatingRow, setEditingRow, } = table;
2782
2803
  const { creatingRow, editingRow, isSaving } = getState();
2783
2804
  const isCreating = (creatingRow === null || creatingRow === void 0 ? void 0 : creatingRow.id) === row.id;
@@ -2820,16 +2841,17 @@ const MRT_EditActionButtons = ({ row, table, variant = 'icon', }) => {
2820
2841
  });
2821
2842
  }
2822
2843
  };
2823
- return (jsxRuntime.jsx(Box__default["default"], { onClick: (e) => e.stopPropagation(), sx: { display: 'flex', gap: '0.75rem' }, children: variant === 'icon' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.cancel, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.cancel, onClick: handleCancel, children: jsxRuntime.jsx(CancelIcon, {}) }) }), jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, title: localization.save, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.save, color: "info", onClick: handleSubmitRow, children: isSaving ? jsxRuntime.jsx(CircularProgress__default["default"], { size: 18 }) : jsxRuntime.jsx(SaveIcon, {}) }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button__default["default"], { onClick: handleCancel, sx: { minWidth: '100px' }, children: localization.cancel }), jsxRuntime.jsxs(Button__default["default"], { onClick: handleSubmitRow, sx: { minWidth: '100px' }, variant: "contained", children: [isSaving && jsxRuntime.jsx(CircularProgress__default["default"], { color: "inherit", size: 18 }), localization.save] })] })) }));
2844
+ return (jsxRuntime.jsx(Box__default["default"], { onClick: (e) => e.stopPropagation(), sx: (theme) => (Object.assign({ display: 'flex', gap: '0.75rem' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: variant === 'icon' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { title: localization.cancel, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.cancel, onClick: handleCancel, children: jsxRuntime.jsx(CancelIcon, {}) }) }), jsxRuntime.jsx(Tooltip__default["default"], { title: localization.save, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.save, color: "info", onClick: handleSubmitRow, children: isSaving ? jsxRuntime.jsx(CircularProgress__default["default"], { size: 18 }) : jsxRuntime.jsx(SaveIcon, {}) }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button__default["default"], { onClick: handleCancel, sx: { minWidth: '100px' }, children: localization.cancel }), jsxRuntime.jsxs(Button__default["default"], { onClick: handleSubmitRow, sx: { minWidth: '100px' }, variant: "contained", children: [isSaving && jsxRuntime.jsx(CircularProgress__default["default"], { color: "inherit", size: 18 }), localization.save] })] })) }));
2824
2845
  };
2825
2846
 
2826
- const MRT_EditRowModal = ({ open, table, }) => {
2827
- var _a;
2828
- const { getState, options: { localization, muiCreateRowModalProps, muiEditRowModalProps, onCreatingRowCancel, onEditingRowCancel, renderCreateRowModalContent, renderEditRowModalContent, }, setCreatingRow, setEditingRow, } = table;
2847
+ const MRT_EditRowModal = (_a) => {
2848
+ var _b;
2849
+ var { open, table } = _a, rest = __rest(_a, ["open", "table"]);
2850
+ const { getState, options: { localization, muiCreateRowModalProps, muiEditRowDialogProps, onCreatingRowCancel, onEditingRowCancel, renderCreateRowDialogContent, renderEditRowDialogContent, }, setCreatingRow, setEditingRow, } = table;
2829
2851
  const { creatingRow, editingRow } = getState();
2830
2852
  const row = (creatingRow !== null && creatingRow !== void 0 ? creatingRow : editingRow);
2831
- const dialogProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditRowModalProps, { row, table })), (creatingRow &&
2832
- parseFromValuesOrFunc(muiCreateRowModalProps, { row, table })));
2853
+ const dialogProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditRowDialogProps, { row, table })), (creatingRow &&
2854
+ parseFromValuesOrFunc(muiCreateRowModalProps, { row, table }))), rest);
2833
2855
  const internalEditComponents = row
2834
2856
  .getAllCells()
2835
2857
  .filter((cell) => cell.column.columnDef.columnDefType === 'data')
@@ -2846,33 +2868,33 @@ const MRT_EditRowModal = ({ open, table, }) => {
2846
2868
  }
2847
2869
  row._valuesCache = {}; //reset values cache
2848
2870
  (_a = dialogProps.onClose) === null || _a === void 0 ? void 0 : _a.call(dialogProps, event, reason);
2849
- }, open: open }, dialogProps, { children: (_a = ((creatingRow &&
2850
- (renderCreateRowModalContent === null || renderCreateRowModalContent === void 0 ? void 0 : renderCreateRowModalContent({
2871
+ }, open: open }, dialogProps, { children: (_b = ((creatingRow &&
2872
+ (renderCreateRowDialogContent === null || renderCreateRowDialogContent === void 0 ? void 0 : renderCreateRowDialogContent({
2851
2873
  internalEditComponents,
2852
2874
  row,
2853
2875
  table,
2854
2876
  }))) ||
2855
- (renderEditRowModalContent === null || renderEditRowModalContent === void 0 ? void 0 : renderEditRowModalContent({
2877
+ (renderEditRowDialogContent === null || renderEditRowDialogContent === void 0 ? void 0 : renderEditRowDialogContent({
2856
2878
  internalEditComponents,
2857
2879
  row,
2858
2880
  table,
2859
- })))) !== null && _a !== void 0 ? _a : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DialogTitle__default["default"], { sx: { textAlign: 'center' }, children: localization.edit }), jsxRuntime.jsx(DialogContent__default["default"], { children: jsxRuntime.jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsxRuntime.jsx(Stack__default["default"], { sx: {
2860
- gap: '24px',
2881
+ })))) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DialogTitle__default["default"], { sx: { textAlign: 'center' }, children: localization.edit }), jsxRuntime.jsx(DialogContent__default["default"], { children: jsxRuntime.jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsxRuntime.jsx(Stack__default["default"], { sx: {
2882
+ gap: '32px',
2861
2883
  paddingTop: '16px',
2862
2884
  width: '100%',
2863
2885
  }, children: internalEditComponents }) }) }), jsxRuntime.jsx(DialogActions__default["default"], { sx: { p: '1.25rem' }, children: jsxRuntime.jsx(MRT_EditActionButtons, { row: row, table: table, variant: "text" }) })] })) })));
2864
2886
  };
2865
2887
 
2866
2888
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
2867
- const MRT_TableContainer = ({ table, }) => {
2868
- const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, localization, muiCircularProgressProps, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2889
+ const MRT_TableContainer = (_a) => {
2890
+ var { table } = _a, rest = __rest(_a, ["table"]);
2891
+ const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, muiTableContainerProps, }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef }, } = table;
2869
2892
  const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay, } = getState();
2870
- const loading = (isLoading || showLoadingOverlay) && showLoadingOverlay !== false;
2893
+ const loading = showLoadingOverlay !== false && (isLoading || showLoadingOverlay);
2871
2894
  const [totalToolbarHeight, setTotalToolbarHeight] = react.useState(0);
2872
- const tableContainerProps = parseFromValuesOrFunc(muiTableContainerProps, {
2895
+ const tableContainerProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableContainerProps, {
2873
2896
  table,
2874
- });
2875
- const circularProgressProps = parseFromValuesOrFunc(muiCircularProgressProps, { table });
2897
+ })), rest);
2876
2898
  useIsomorphicLayoutEffect(() => {
2877
2899
  var _a, _b, _c, _d;
2878
2900
  const topToolbarHeight = typeof document !== 'undefined'
@@ -2885,7 +2907,7 @@ const MRT_TableContainer = ({ table, }) => {
2885
2907
  });
2886
2908
  const createModalOpen = createDisplayMode === 'modal' && creatingRow;
2887
2909
  const editModalOpen = editDisplayMode === 'modal' && editingRow;
2888
- return (jsxRuntime.jsxs(TableContainer__default["default"], Object.assign({ "aria-busy": loading, "aria-describedby": "mrt-progress" }, tableContainerProps, { ref: (node) => {
2910
+ return (jsxRuntime.jsxs(TableContainer__default["default"], Object.assign({ "aria-busy": loading, "aria-describedby": loading ? 'mrt-progress' : undefined }, tableContainerProps, { ref: (node) => {
2889
2911
  if (node) {
2890
2912
  tableContainerRef.current = node;
2891
2913
  if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
@@ -2897,27 +2919,15 @@ const MRT_TableContainer = ({ table, }) => {
2897
2919
  ? `calc(100vh - ${totalToolbarHeight}px)`
2898
2920
  : undefined }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.style), sx: (theme) => (Object.assign({ maxHeight: enableStickyHeader
2899
2921
  ? `clamp(350px, calc(100vh - ${totalToolbarHeight}px), 9999px)`
2900
- : undefined, maxWidth: '100%', overflow: 'auto', position: 'relative' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [loading ? (jsxRuntime.jsx(Box__default["default"], { sx: (theme) => ({
2901
- alignItems: 'center',
2902
- backgroundColor: styles.alpha(styles.lighten(theme.palette.background.paper, 0.05), 0.5),
2903
- bottom: 0,
2904
- display: 'flex',
2905
- justifyContent: 'center',
2906
- left: 0,
2907
- maxHeight: '100vh',
2908
- position: 'absolute',
2909
- right: 0,
2910
- top: 0,
2911
- width: '100%',
2912
- zIndex: 2,
2913
- }), children: jsxRuntime.jsx(CircularProgress__default["default"], Object.assign({ "aria-label": localization.noRecordsToDisplay, id: "mrt-progress" }, circularProgressProps)) })) : null, jsxRuntime.jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsxRuntime.jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2922
+ : undefined, maxWidth: '100%', overflow: 'auto', position: 'relative' }, parseFromValuesOrFunc(tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.sx, theme))), children: [loading ? jsxRuntime.jsx(MRT_TableLoadingOverlay, { table: table }) : null, jsxRuntime.jsx(MRT_Table, { table: table }), (createModalOpen || editModalOpen) && (jsxRuntime.jsx(MRT_EditRowModal, { open: true, table: table }))] })));
2914
2923
  };
2915
2924
 
2916
- const MRT_TablePaper = ({ table, }) => {
2917
- var _a, _b;
2925
+ const MRT_TablePaper = (_a) => {
2926
+ var _b, _c;
2927
+ var { table } = _a, rest = __rest(_a, ["table"]);
2918
2928
  const { getState, options: { enableBottomToolbar, enableTopToolbar, muiTablePaperProps, renderBottomToolbar, renderTopToolbar, }, refs: { tablePaperRef }, } = table;
2919
2929
  const { isFullScreen } = getState();
2920
- const tablePaperProps = parseFromValuesOrFunc(muiTablePaperProps, { table });
2930
+ const tablePaperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
2921
2931
  return (jsxRuntime.jsxs(Paper__default["default"], Object.assign({ elevation: 2 }, tablePaperProps, { ref: (ref) => {
2922
2932
  tablePaperRef.current = ref;
2923
2933
  if (tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.ref) {
@@ -2937,14 +2947,15 @@ const MRT_TablePaper = ({ table, }) => {
2937
2947
  right: 0,
2938
2948
  top: 0,
2939
2949
  width: '100vw',
2940
- zIndex: 9999,
2950
+ zIndex: 999,
2941
2951
  }
2942
- : {})), tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style), sx: (theme) => (Object.assign({ overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.sx, theme))), children: [enableTopToolbar &&
2943
- ((_a = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _a !== void 0 ? _a : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
2944
- ((_b = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_BottomToolbar, { table: table })))] })));
2952
+ : {})), tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style), sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, backgroundImage: 'unset', overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.sx, theme))), children: [enableTopToolbar &&
2953
+ ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
2954
+ ((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(MRT_BottomToolbar, { table: table })))] })));
2945
2955
  };
2946
2956
 
2947
- const MRT_RowPinButton = ({ pinningPosition, row, table, }) => {
2957
+ const MRT_RowPinButton = (_a) => {
2958
+ var { pinningPosition, row, table } = _a, rest = __rest(_a, ["pinningPosition", "row", "table"]);
2948
2959
  const { options: { icons: { CloseIcon, PushPinIcon }, localization, rowPinningDisplayMode, }, } = table;
2949
2960
  const isPinned = row.getIsPinned();
2950
2961
  const [tooltipOpened, setTooltipOpened] = react.useState(false);
@@ -2953,44 +2964,43 @@ const MRT_RowPinButton = ({ pinningPosition, row, table, }) => {
2953
2964
  event.stopPropagation();
2954
2965
  row.pin(isPinned ? false : pinningPosition);
2955
2966
  };
2956
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, open: tooltipOpened, title: isPinned ? localization.unpin : localization.pin, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.pin, onClick: handleTogglePin, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false), size: "small", sx: {
2957
- height: '24px',
2958
- width: '24px',
2959
- }, children: isPinned ? (jsxRuntime.jsx(CloseIcon, {})) : (jsxRuntime.jsx(PushPinIcon, { fontSize: "small", style: {
2967
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, open: tooltipOpened, title: isPinned ? localization.unpin : localization.pin, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.pin, onClick: handleTogglePin, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false), size: "small" }, rest, { sx: (theme) => (Object.assign({ height: '24px', width: '24px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: isPinned ? (jsxRuntime.jsx(CloseIcon, {})) : (jsxRuntime.jsx(PushPinIcon, { fontSize: "small", style: {
2960
2968
  transform: `rotate(${rowPinningDisplayMode === 'sticky'
2961
2969
  ? 135
2962
2970
  : pinningPosition === 'top'
2963
2971
  ? 180
2964
2972
  : 0}deg)`,
2965
- } })) }) }));
2973
+ } })) })) }));
2966
2974
  };
2967
2975
 
2968
- const MRT_TableBodyRowPinButton = ({ row, table, }) => {
2976
+ const MRT_TableBodyRowPinButton = (_a) => {
2977
+ var { row, table } = _a, rest = __rest(_a, ["row", "table"]);
2969
2978
  const { getState, options: { enableRowPinning, rowPinningDisplayMode }, } = table;
2970
2979
  const { density } = getState();
2971
2980
  const canPin = parseFromValuesOrFunc(enableRowPinning, row);
2972
2981
  if (!canPin)
2973
2982
  return null;
2983
+ const rowPinButtonProps = Object.assign({ row,
2984
+ table }, rest);
2974
2985
  if (rowPinningDisplayMode === 'top-and-bottom' && !row.getIsPinned()) {
2975
2986
  return (jsxRuntime.jsxs(Box__default["default"], { sx: {
2976
2987
  display: 'flex',
2977
2988
  flexDirection: density === 'compact' ? 'row' : 'column',
2978
- }, children: [jsxRuntime.jsx(MRT_RowPinButton, { pinningPosition: "top", row: row, table: table }), jsxRuntime.jsx(MRT_RowPinButton, { pinningPosition: "bottom", row: row, table: table })] }));
2989
+ }, children: [jsxRuntime.jsx(MRT_RowPinButton, Object.assign({ pinningPosition: "top" }, rowPinButtonProps)), jsxRuntime.jsx(MRT_RowPinButton, Object.assign({ pinningPosition: "bottom" }, rowPinButtonProps))] }));
2979
2990
  }
2980
- return (jsxRuntime.jsx(MRT_RowPinButton, { pinningPosition: rowPinningDisplayMode === 'bottom' ? 'bottom' : 'top', row: row, table: table }));
2991
+ return (jsxRuntime.jsx(MRT_RowPinButton, Object.assign({ pinningPosition: rowPinningDisplayMode === 'bottom' ? 'bottom' : 'top' }, rowPinButtonProps)));
2981
2992
  };
2982
2993
 
2983
- const MRT_ExpandAllButton = ({ table, }) => {
2984
- var _a, _b;
2994
+ const MRT_ExpandAllButton = (_a) => {
2995
+ var _b, _c;
2996
+ var { table } = _a, rest = __rest(_a, ["table"]);
2985
2997
  const { getCanSomeRowsExpand, getIsAllRowsExpanded, getIsSomeRowsExpanded, getState, options: { icons: { KeyboardDoubleArrowDownIcon }, localization, muiExpandAllButtonProps, renderDetailPanel, }, toggleAllRowsExpanded, } = table;
2986
2998
  const { density, isLoading } = getState();
2987
- const iconButtonProps = parseFromValuesOrFunc(muiExpandAllButtonProps, {
2999
+ const iconButtonProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiExpandAllButtonProps, {
2988
3000
  table,
2989
- });
3001
+ })), rest);
2990
3002
  const isAllRowsExpanded = getIsAllRowsExpanded();
2991
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isAllRowsExpanded)
2992
- ? localization.collapseAll
2993
- : localization.expandAll, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], 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', mt: density !== 'compact' ? '-0.25rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(KeyboardDoubleArrowDownIcon, { style: {
3003
+ return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, title: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _b !== void 0 ? _b : (isAllRowsExpanded ? localization.collapseAll : localization.expandAll), children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], 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', mt: density !== 'compact' ? '-0.25rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_c = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(KeyboardDoubleArrowDownIcon, { style: {
2994
3004
  transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
2995
3005
  transition: 'transform 150ms',
2996
3006
  } })) })) }) }));
@@ -3012,24 +3022,23 @@ const MRT_ExpandButton = ({ row, table, }) => {
3012
3022
  row.toggleExpanded();
3013
3023
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
3014
3024
  };
3015
- return (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: ((_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : isExpanded)
3016
- ? localization.collapse
3017
- : localization.expand, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', opacity: !canExpand && !renderDetailPanel ? 0.3 : 1, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(ExpandMoreIcon, { style: {
3025
+ return (jsxRuntime.jsx(Tooltip__default["default"], { disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : (isExpanded ? localization.collapse : localization.expand), children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', opacity: !canExpand && !renderDetailPanel ? 0.3 : 1, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(ExpandMoreIcon, { style: {
3018
3026
  transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
3019
3027
  transition: 'transform 150ms',
3020
3028
  } })) })) }) }));
3021
3029
  };
3022
3030
 
3023
- const MRT_RowActionMenu = ({ anchorEl, handleEdit, row, setAnchorEl, table, }) => {
3031
+ const MRT_RowActionMenu = (_a) => {
3032
+ var { anchorEl, handleEdit, row, setAnchorEl, table } = _a, rest = __rest(_a, ["anchorEl", "handleEdit", "row", "setAnchorEl", "table"]);
3024
3033
  const { getState, options: { enableEditing, icons: { EditIcon }, localization, renderRowActionMenuItems, }, } = table;
3025
3034
  const { density } = getState();
3026
- return (jsxRuntime.jsxs(Menu__default["default"], { MenuListProps: {
3035
+ return (jsxRuntime.jsxs(Menu__default["default"], Object.assign({ MenuListProps: {
3027
3036
  dense: density === 'compact',
3028
- }, anchorEl: anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl, children: [parseFromValuesOrFunc(enableEditing, row) && (jsxRuntime.jsx(MenuItem__default["default"], { onClick: handleEdit, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(EditIcon, {}) }), localization.edit] }) })), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
3037
+ }, anchorEl: anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [parseFromValuesOrFunc(enableEditing, row) && (jsxRuntime.jsx(MenuItem__default["default"], { onClick: handleEdit, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(EditIcon, {}) }), localization.edit] }) })), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
3029
3038
  closeMenu: () => setAnchorEl(null),
3030
3039
  row,
3031
3040
  table,
3032
- })] }));
3041
+ })] })));
3033
3042
  };
3034
3043
 
3035
3044
  const commonIconButtonStyles = {
@@ -3042,7 +3051,8 @@ const commonIconButtonStyles = {
3042
3051
  transition: 'opacity 150ms',
3043
3052
  width: '2rem',
3044
3053
  };
3045
- const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
3054
+ const MRT_ToggleRowActionMenuButton = (_a) => {
3055
+ var { cell, row, table } = _a, rest = __rest(_a, ["cell", "row", "table"]);
3046
3056
  const { getState, options: { createDisplayMode, editDisplayMode, enableEditing, icons: { EditIcon, MoreHorizIcon }, localization, renderRowActionMenuItems, renderRowActions, }, setEditingRow, } = table;
3047
3057
  const { creatingRow, editingRow } = getState();
3048
3058
  const isCreating = (creatingRow === null || creatingRow === void 0 ? void 0 : creatingRow.id) === row.id;
@@ -3061,317 +3071,11 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
3061
3071
  setAnchorEl(null);
3062
3072
  };
3063
3073
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderRowActions && !showEditActionButtons ? (renderRowActions({ cell, row, table })) : showEditActionButtons ? (jsxRuntime.jsx(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
3064
- parseFromValuesOrFunc(enableEditing, row) ? (jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, placement: "right", title: localization.edit, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.edit, onClick: handleStartEditMode, sx: commonIconButtonStyles, children: jsxRuntime.jsx(EditIcon, {}) }) })) : renderRowActionMenuItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles, children: jsxRuntime.jsx(MoreHorizIcon, {}) }) }), jsxRuntime.jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
3074
+ parseFromValuesOrFunc(enableEditing, row) &&
3075
+ ['modal', 'row'].includes(editDisplayMode) ? (jsxRuntime.jsx(Tooltip__default["default"], { placement: "right", title: localization.edit, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.edit, onClick: handleStartEditMode, sx: commonIconButtonStyles }, rest, { children: jsxRuntime.jsx(EditIcon, {}) })) })) : renderRowActionMenuItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles }, rest, { children: jsxRuntime.jsx(MoreHorizIcon, {}) })) }), jsxRuntime.jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
3065
3076
  };
3066
3077
 
3067
- const blankColProps = {
3068
- sx: {
3069
- flex: '1 0 auto',
3070
- minWidth: 0,
3071
- p: 0,
3072
- width: 0,
3073
- },
3074
- };
3075
- const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOptions, }) => {
3076
- var _a, _b;
3077
- return react.useMemo(() => {
3078
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
3079
- return [
3080
- ((_b = (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnOrder) !== null && _b !== void 0 ? _b : columnOrder).includes('mrt-row-pin') && Object.assign(Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_TableBodyRowPinButton, { row: row, table: table })), header: tableOptions.localization.pin, size: 60 }, tableOptions.defaultDisplayColumn), (_c = tableOptions.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-pin']), { id: 'mrt-row-pin' }),
3081
- ((_e = (_d = tableOptions.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ Cell: ({ row, rowRef, table }) => (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })), header: tableOptions.localization.move, size: 60 }, tableOptions.defaultDisplayColumn), (_f = tableOptions.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-drag']), { id: 'mrt-row-drag' }),
3082
- (((_h = (_g = tableOptions.state) === null || _g === void 0 ? void 0 : _g.columnOrder) !== null && _h !== void 0 ? _h : columnOrder).includes('mrt-row-actions') ||
3083
- (creatingRow && tableOptions.createDisplayMode === 'row')) && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row, table }) => (jsxRuntime.jsx(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: tableOptions.localization.actions, size: 70 }, tableOptions.defaultDisplayColumn), (_j = tableOptions.displayColumnDefOptions) === null || _j === void 0 ? void 0 : _j['mrt-row-actions']), { id: 'mrt-row-actions' }),
3084
- ((_l = (_k = tableOptions.state) === null || _k === void 0 ? void 0 : _k.columnOrder) !== null && _l !== void 0 ? _l : columnOrder).includes('mrt-row-expand') &&
3085
- showExpandColumn(tableOptions, (_o = (_m = tableOptions.state) === null || _m === void 0 ? void 0 : _m.grouping) !== null && _o !== void 0 ? _o : grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_ExpandButton, { row: row, table: table })), Header: tableOptions.enableExpandAll
3086
- ? ({ table }) => jsxRuntime.jsx(MRT_ExpandAllButton, { table: table })
3087
- : null, header: tableOptions.localization.expand, size: 60 }, tableOptions.defaultDisplayColumn), (_p = tableOptions.displayColumnDefOptions) === null || _p === void 0 ? void 0 : _p['mrt-row-expand']), { id: 'mrt-row-expand' }),
3088
- ((_r = (_q = tableOptions.state) === null || _q === void 0 ? void 0 : _q.columnOrder) !== null && _r !== void 0 ? _r : columnOrder).includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_SelectCheckbox, { row: row, table: table })), Header: tableOptions.enableSelectAll &&
3089
- tableOptions.enableMultiRowSelection
3090
- ? ({ table }) => jsxRuntime.jsx(MRT_SelectCheckbox, { selectAll: true, table: table })
3091
- : null, header: tableOptions.localization.select, size: 60 }, tableOptions.defaultDisplayColumn), (_s = tableOptions.displayColumnDefOptions) === null || _s === void 0 ? void 0 : _s['mrt-row-select']), { id: 'mrt-row-select' }),
3092
- ((_u = (_t = tableOptions.state) === null || _t === void 0 ? void 0 : _t.columnOrder) !== null && _u !== void 0 ? _u : columnOrder).includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => tableOptions.localization.rowNumber, header: tableOptions.localization.rowNumbers, size: 60 }, tableOptions.defaultDisplayColumn), (_v = tableOptions.displayColumnDefOptions) === null || _v === void 0 ? void 0 : _v['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
3093
- ((_x = (_w = tableOptions.state) === null || _w === void 0 ? void 0 : _w.columnOrder) !== null && _x !== void 0 ? _x : columnOrder).includes('mrt-row-spacer') && {
3094
- columnDefType: 'display',
3095
- header: '',
3096
- id: 'spacer',
3097
- muiTableBodyCellProps: blankColProps,
3098
- muiTableFooterCellProps: blankColProps,
3099
- muiTableHeadCellProps: blankColProps,
3100
- },
3101
- ].filter(Boolean);
3102
- }, [
3103
- columnOrder,
3104
- grouping,
3105
- tableOptions.displayColumnDefOptions,
3106
- tableOptions.editDisplayMode,
3107
- tableOptions.enableColumnDragging,
3108
- tableOptions.enableColumnFilterModes,
3109
- tableOptions.enableColumnOrdering,
3110
- tableOptions.enableEditing,
3111
- tableOptions.enableExpandAll,
3112
- tableOptions.enableExpanding,
3113
- tableOptions.enableGrouping,
3114
- tableOptions.enableRowActions,
3115
- tableOptions.enableRowDragging,
3116
- tableOptions.enableRowNumbers,
3117
- tableOptions.enableRowOrdering,
3118
- tableOptions.enableRowSelection,
3119
- tableOptions.enableSelectAll,
3120
- tableOptions.localization,
3121
- tableOptions.positionActionsColumn,
3122
- tableOptions.renderDetailPanel,
3123
- tableOptions.renderRowActionMenuItems,
3124
- tableOptions.renderRowActions,
3125
- (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnOrder,
3126
- (_b = tableOptions.state) === null || _b === void 0 ? void 0 : _b.grouping,
3127
- ]);
3128
- };
3129
-
3130
- const useMRT_Effects = (table) => {
3131
- const { getIsSomeRowsPinned, getState, options: { enablePagination, enableRowPinning, rowCount }, } = table;
3132
- const { density, globalFilter, isFullScreen, isLoading, pagination, showSkeletons, sorting, } = getState();
3133
- const rerender = react.useReducer(() => ({}), {})[1];
3134
- const isMounted = react.useRef(false);
3135
- const initialBodyHeight = react.useRef();
3136
- const previousTop = react.useRef();
3137
- react.useEffect(() => {
3138
- if (typeof window !== 'undefined') {
3139
- initialBodyHeight.current = document.body.style.height;
3140
- }
3141
- }, []);
3142
- react.useEffect(() => {
3143
- if (isMounted && typeof window !== 'undefined') {
3144
- if (isFullScreen) {
3145
- previousTop.current = document.body.getBoundingClientRect().top; //save scroll position
3146
- document.body.style.height = '100vh'; //hide page scrollbars when table is in full screen mode
3147
- }
3148
- else {
3149
- document.body.style.height = initialBodyHeight.current;
3150
- if (!previousTop.current)
3151
- return;
3152
- //restore scroll position
3153
- window.scrollTo({
3154
- behavior: 'instant',
3155
- top: -1 * previousTop.current,
3156
- });
3157
- }
3158
- }
3159
- isMounted.current = true;
3160
- }, [isFullScreen]);
3161
- //if page index is out of bounds, set it to the last page
3162
- react.useEffect(() => {
3163
- if (!enablePagination || isLoading || showSkeletons)
3164
- return;
3165
- const { pageIndex, pageSize } = pagination;
3166
- const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : table.getPrePaginationRowModel().rows.length;
3167
- const firstVisibleRowIndex = pageIndex * pageSize;
3168
- if (firstVisibleRowIndex > totalRowCount) {
3169
- table.setPageIndex(Math.floor(totalRowCount / pageSize));
3170
- }
3171
- }, [rowCount, table.getPrePaginationRowModel().rows.length]);
3172
- //turn off sort when global filter is looking for ranked results
3173
- const appliedSort = react.useRef(sorting);
3174
- react.useEffect(() => {
3175
- if (sorting.length) {
3176
- appliedSort.current = sorting;
3177
- }
3178
- }, [sorting]);
3179
- react.useEffect(() => {
3180
- if (!getCanRankRows(table))
3181
- return;
3182
- if (globalFilter) {
3183
- table.setSorting([]);
3184
- }
3185
- else {
3186
- table.setSorting(() => appliedSort.current || []);
3187
- }
3188
- }, [globalFilter]);
3189
- react.useEffect(() => {
3190
- if (enableRowPinning && getIsSomeRowsPinned()) {
3191
- setTimeout(() => {
3192
- rerender();
3193
- }, 150);
3194
- }
3195
- }, [density]);
3196
- };
3197
-
3198
- const useMRT_TableInstance = (tableOptions) => {
3199
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
3200
- const bottomToolbarRef = react.useRef(null);
3201
- const editInputRefs = react.useRef({});
3202
- const filterInputRefs = react.useRef({});
3203
- const searchInputRef = react.useRef(null);
3204
- const tableContainerRef = react.useRef(null);
3205
- const tableHeadCellRefs = react.useRef({});
3206
- const tablePaperRef = react.useRef(null);
3207
- const topToolbarRef = react.useRef(null);
3208
- const tableHeadRef = react.useRef(null);
3209
- const tableFooterRef = react.useRef(null);
3210
- const initialState = react.useMemo(() => {
3211
- var _a, _b, _c;
3212
- const initState = (_a = tableOptions.initialState) !== null && _a !== void 0 ? _a : {};
3213
- initState.columnOrder =
3214
- (_b = initState.columnOrder) !== null && _b !== void 0 ? _b : getDefaultColumnOrderIds(tableOptions);
3215
- initState.globalFilterFn = (_c = tableOptions.globalFilterFn) !== null && _c !== void 0 ? _c : 'fuzzy';
3216
- return initState;
3217
- }, []);
3218
- const [creatingRow, _setCreatingRow] = react.useState((_a = initialState.creatingRow) !== null && _a !== void 0 ? _a : null);
3219
- const [columnFilterFns, setColumnFilterFns] = react.useState(() => Object.assign({}, ...getAllLeafColumnDefs(tableOptions.columns).map((col) => {
3220
- var _a, _b, _c, _d;
3221
- return ({
3222
- [getColumnId(col)]: col.filterFn instanceof Function
3223
- ? (_a = col.filterFn.name) !== null && _a !== void 0 ? _a : 'custom'
3224
- : (_d = (_b = col.filterFn) !== null && _b !== void 0 ? _b : (_c = initialState === null || initialState === void 0 ? void 0 : initialState.columnFilterFns) === null || _c === void 0 ? void 0 : _c[getColumnId(col)]) !== null && _d !== void 0 ? _d : getDefaultColumnFilterFn(col),
3225
- });
3226
- })));
3227
- const [columnOrder, setColumnOrder] = react.useState((_b = initialState.columnOrder) !== null && _b !== void 0 ? _b : []);
3228
- const [density, setDensity] = react.useState((_c = initialState === null || initialState === void 0 ? void 0 : initialState.density) !== null && _c !== void 0 ? _c : 'comfortable');
3229
- const [draggingColumn, setDraggingColumn] = react.useState((_d = initialState.draggingColumn) !== null && _d !== void 0 ? _d : null);
3230
- const [draggingRow, setDraggingRow] = react.useState((_e = initialState.draggingRow) !== null && _e !== void 0 ? _e : null);
3231
- const [editingCell, setEditingCell] = react.useState((_f = initialState.editingCell) !== null && _f !== void 0 ? _f : null);
3232
- const [editingRow, setEditingRow] = react.useState((_g = initialState.editingRow) !== null && _g !== void 0 ? _g : null);
3233
- const [globalFilterFn, setGlobalFilterFn] = react.useState((_h = initialState.globalFilterFn) !== null && _h !== void 0 ? _h : 'fuzzy');
3234
- const [grouping, setGrouping] = react.useState((_j = initialState.grouping) !== null && _j !== void 0 ? _j : []);
3235
- const [hoveredColumn, setHoveredColumn] = react.useState((_k = initialState.hoveredColumn) !== null && _k !== void 0 ? _k : null);
3236
- const [hoveredRow, setHoveredRow] = react.useState((_l = initialState.hoveredRow) !== null && _l !== void 0 ? _l : null);
3237
- const [isFullScreen, setIsFullScreen] = react.useState((_m = initialState === null || initialState === void 0 ? void 0 : initialState.isFullScreen) !== null && _m !== void 0 ? _m : false);
3238
- const [showAlertBanner, setShowAlertBanner] = react.useState((_p = (_o = tableOptions.initialState) === null || _o === void 0 ? void 0 : _o.showAlertBanner) !== null && _p !== void 0 ? _p : false);
3239
- const [showColumnFilters, setShowColumnFilters] = react.useState((_q = initialState === null || initialState === void 0 ? void 0 : initialState.showColumnFilters) !== null && _q !== void 0 ? _q : false);
3240
- const [showGlobalFilter, setShowGlobalFilter] = react.useState((_r = initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) !== null && _r !== void 0 ? _r : false);
3241
- const [showToolbarDropZone, setShowToolbarDropZone] = react.useState((_s = initialState === null || initialState === void 0 ? void 0 : initialState.showToolbarDropZone) !== null && _s !== void 0 ? _s : false);
3242
- const displayColumns = useMRT_DisplayColumns({
3243
- columnOrder,
3244
- creatingRow,
3245
- grouping,
3246
- tableOptions,
3247
- });
3248
- const columnDefs = react.useMemo(() => {
3249
- var _a, _b, _c;
3250
- return prepareColumns({
3251
- aggregationFns: tableOptions.aggregationFns,
3252
- columnDefs: [...displayColumns, ...tableOptions.columns],
3253
- columnFilterFns: (_b = (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnFilterFns) !== null && _b !== void 0 ? _b : columnFilterFns,
3254
- defaultDisplayColumn: (_c = tableOptions.defaultDisplayColumn) !== null && _c !== void 0 ? _c : {},
3255
- filterFns: tableOptions.filterFns,
3256
- sortingFns: tableOptions.sortingFns,
3257
- });
3258
- }, [
3259
- columnFilterFns,
3260
- displayColumns,
3261
- tableOptions.columns,
3262
- (_t = tableOptions.state) === null || _t === void 0 ? void 0 : _t.columnFilterFns,
3263
- ]);
3264
- const data = react.useMemo(() => {
3265
- var _a, _b, _c, _d, _e;
3266
- return (((_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.isLoading) || ((_b = tableOptions.state) === null || _b === void 0 ? void 0 : _b.showSkeletons)) &&
3267
- !tableOptions.data.length
3268
- ? [
3269
- ...Array(((_d = (_c = tableOptions.state) === null || _c === void 0 ? void 0 : _c.pagination) === null || _d === void 0 ? void 0 : _d.pageSize) ||
3270
- ((_e = initialState === null || initialState === void 0 ? void 0 : initialState.pagination) === null || _e === void 0 ? void 0 : _e.pageSize) ||
3271
- 10).fill(null),
3272
- ].map(() => Object.assign({}, ...getAllLeafColumnDefs(tableOptions.columns).map((col) => ({
3273
- [getColumnId(col)]: null,
3274
- }))))
3275
- : tableOptions.data;
3276
- }, [
3277
- tableOptions.data,
3278
- (_u = tableOptions.state) === null || _u === void 0 ? void 0 : _u.isLoading,
3279
- (_v = tableOptions.state) === null || _v === void 0 ? void 0 : _v.showSkeletons,
3280
- ]);
3281
- //@ts-ignore
3282
- const table = reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: tableOptions.enableExpanding || tableOptions.enableGrouping
3283
- ? reactTable.getExpandedRowModel()
3284
- : undefined, getFacetedMinMaxValues: tableOptions.enableFacetedValues
3285
- ? reactTable.getFacetedMinMaxValues()
3286
- : undefined, getFacetedRowModel: tableOptions.enableFacetedValues
3287
- ? reactTable.getFacetedRowModel()
3288
- : undefined, getFacetedUniqueValues: tableOptions.enableFacetedValues
3289
- ? reactTable.getFacetedUniqueValues()
3290
- : undefined, getFilteredRowModel: tableOptions.enableColumnFilters ||
3291
- tableOptions.enableGlobalFilter ||
3292
- tableOptions.enableFilters
3293
- ? reactTable.getFilteredRowModel()
3294
- : undefined, getGroupedRowModel: tableOptions.enableGrouping
3295
- ? reactTable.getGroupedRowModel()
3296
- : undefined, getPaginationRowModel: tableOptions.enablePagination
3297
- ? reactTable.getPaginationRowModel()
3298
- : undefined, getSortedRowModel: tableOptions.enableSorting
3299
- ? reactTable.getSortedRowModel()
3300
- : undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping }, tableOptions), {
3301
- //@ts-ignore
3302
- columns: columnDefs, data, globalFilterFn: (_w = tableOptions.filterFns) === null || _w === void 0 ? void 0 : _w[globalFilterFn !== null && globalFilterFn !== void 0 ? globalFilterFn : 'fuzzy'], initialState, state: Object.assign({ columnFilterFns,
3303
- columnOrder,
3304
- creatingRow,
3305
- density,
3306
- draggingColumn,
3307
- draggingRow,
3308
- editingCell,
3309
- editingRow,
3310
- globalFilterFn,
3311
- grouping,
3312
- hoveredColumn,
3313
- hoveredRow,
3314
- isFullScreen,
3315
- showAlertBanner,
3316
- showColumnFilters,
3317
- showGlobalFilter,
3318
- showToolbarDropZone }, tableOptions.state) }));
3319
- // @ts-ignore
3320
- table.refs = {
3321
- // @ts-ignore
3322
- bottomToolbarRef,
3323
- editInputRefs,
3324
- filterInputRefs,
3325
- // @ts-ignore
3326
- searchInputRef,
3327
- // @ts-ignore
3328
- tableContainerRef,
3329
- // @ts-ignore
3330
- tableFooterRef,
3331
- tableHeadCellRefs,
3332
- // @ts-ignore
3333
- tableHeadRef,
3334
- // @ts-ignore
3335
- tablePaperRef,
3336
- // @ts-ignore
3337
- topToolbarRef,
3338
- };
3339
- const setCreatingRow = (row) => {
3340
- var _a, _b;
3341
- let _row = row;
3342
- if (row === true) {
3343
- _row = createRow(table);
3344
- }
3345
- (_b = (_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.onCreatingRowChange) === null || _a === void 0 ? void 0 : _a.call(tableOptions, _row)) !== null && _b !== void 0 ? _b : _setCreatingRow(_row);
3346
- };
3347
- table.setCreatingRow = setCreatingRow;
3348
- table.setColumnFilterFns =
3349
- (_x = tableOptions.onColumnFilterFnsChange) !== null && _x !== void 0 ? _x : setColumnFilterFns;
3350
- table.setDensity = (_y = tableOptions.onDensityChange) !== null && _y !== void 0 ? _y : setDensity;
3351
- table.setDraggingColumn =
3352
- (_z = tableOptions.onDraggingColumnChange) !== null && _z !== void 0 ? _z : setDraggingColumn;
3353
- table.setDraggingRow = (_0 = tableOptions.onDraggingRowChange) !== null && _0 !== void 0 ? _0 : setDraggingRow;
3354
- table.setEditingCell = (_1 = tableOptions.onEditingCellChange) !== null && _1 !== void 0 ? _1 : setEditingCell;
3355
- table.setEditingRow = (_2 = tableOptions.onEditingRowChange) !== null && _2 !== void 0 ? _2 : setEditingRow;
3356
- table.setGlobalFilterFn =
3357
- (_3 = tableOptions.onGlobalFilterFnChange) !== null && _3 !== void 0 ? _3 : setGlobalFilterFn;
3358
- table.setHoveredColumn =
3359
- (_4 = tableOptions.onHoveredColumnChange) !== null && _4 !== void 0 ? _4 : setHoveredColumn;
3360
- table.setHoveredRow = (_5 = tableOptions.onHoveredRowChange) !== null && _5 !== void 0 ? _5 : setHoveredRow;
3361
- table.setIsFullScreen = (_6 = tableOptions.onIsFullScreenChange) !== null && _6 !== void 0 ? _6 : setIsFullScreen;
3362
- table.setShowAlertBanner =
3363
- (_7 = tableOptions.onShowAlertBannerChange) !== null && _7 !== void 0 ? _7 : setShowAlertBanner;
3364
- table.setShowColumnFilters =
3365
- (_8 = tableOptions.onShowColumnFiltersChange) !== null && _8 !== void 0 ? _8 : setShowColumnFilters;
3366
- table.setShowGlobalFilter =
3367
- (_9 = tableOptions.onShowGlobalFilterChange) !== null && _9 !== void 0 ? _9 : setShowGlobalFilter;
3368
- table.setShowToolbarDropZone =
3369
- (_10 = tableOptions.onShowToolbarDropZoneChange) !== null && _10 !== void 0 ? _10 : setShowToolbarDropZone;
3370
- useMRT_Effects(table);
3371
- return table;
3372
- };
3373
-
3374
- const MRT_AggregationFns = Object.assign({}, reactTable.aggregationFns);
3078
+ const MRT_AggregationFns = Object.assign({}, reactTable.aggregationFns);
3375
3079
 
3376
3080
  const fuzzy = (row, columnId, filterValue, addMeta) => {
3377
3081
  const itemRank = matchSorterUtils.rankItem(row.getValue(columnId), filterValue, {
@@ -3585,6 +3289,26 @@ const MRT_Localization_EN = {
3585
3289
  unpinAll: 'Unpin all',
3586
3290
  };
3587
3291
 
3292
+ const MRT_DefaultColumn = {
3293
+ filterVariant: 'text',
3294
+ maxSize: 1000,
3295
+ minSize: 40,
3296
+ size: 180,
3297
+ };
3298
+ const MRT_DefaultDisplayColumn = {
3299
+ columnDefType: 'display',
3300
+ enableClickToCopy: false,
3301
+ enableColumnActions: false,
3302
+ enableColumnDragging: false,
3303
+ enableColumnFilter: false,
3304
+ enableColumnOrdering: false,
3305
+ enableEditing: false,
3306
+ enableGlobalFilter: false,
3307
+ enableGrouping: false,
3308
+ enableHiding: false,
3309
+ enableResizing: false,
3310
+ enableSorting: false,
3311
+ };
3588
3312
  const useMRT_TableOptions = (_a) => {
3589
3313
  var _b;
3590
3314
  var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
@@ -3662,11 +3386,308 @@ const useMRT_TableOptions = (_a) => {
3662
3386
  selectAllMode, sortingFns: _sortingFns }, rest);
3663
3387
  };
3664
3388
 
3665
- const useMaterialReactTable = (tableOptions) => {
3666
- const parsedTableOptions = useMRT_TableOptions(tableOptions);
3667
- const tableInstance = useMRT_TableInstance(parsedTableOptions);
3668
- return tableInstance;
3389
+ const blankColProps = {
3390
+ children: null,
3391
+ sx: {
3392
+ flex: '1 0 auto',
3393
+ minWidth: 0,
3394
+ p: 0,
3395
+ width: 0,
3396
+ },
3669
3397
  };
3398
+ const useMRT_DisplayColumns = ({ columnOrder, creatingRow, grouping, tableOptions, }) => {
3399
+ var _a, _b;
3400
+ return react.useMemo(() => {
3401
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
3402
+ return [
3403
+ ((_b = (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnOrder) !== null && _b !== void 0 ? _b : columnOrder).includes('mrt-row-pin') && Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_TableBodyRowPinButton, { row: row, table: table })), header: tableOptions.localization.pin, size: 60 }, (_c = tableOptions.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-pin']), { columnDefType: 'display', id: 'mrt-row-pin' }),
3404
+ ((_e = (_d = tableOptions.state) === null || _d === void 0 ? void 0 : _d.columnOrder) !== null && _e !== void 0 ? _e : columnOrder).includes('mrt-row-drag') && Object.assign(Object.assign({ Cell: ({ row, rowRef, table }) => (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })), header: tableOptions.localization.move, size: 60 }, (_f = tableOptions.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-drag']), { columnDefType: 'display', id: 'mrt-row-drag' }),
3405
+ (((_h = (_g = tableOptions.state) === null || _g === void 0 ? void 0 : _g.columnOrder) !== null && _h !== void 0 ? _h : columnOrder).includes('mrt-row-actions') ||
3406
+ (creatingRow && tableOptions.createDisplayMode === 'row')) && Object.assign(Object.assign({ Cell: ({ cell, row, table }) => (jsxRuntime.jsx(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: tableOptions.localization.actions, size: 70 }, (_j = tableOptions.displayColumnDefOptions) === null || _j === void 0 ? void 0 : _j['mrt-row-actions']), { columnDefType: 'display', id: 'mrt-row-actions' }),
3407
+ ((_l = (_k = tableOptions.state) === null || _k === void 0 ? void 0 : _k.columnOrder) !== null && _l !== void 0 ? _l : columnOrder).includes('mrt-row-expand') &&
3408
+ showExpandColumn(tableOptions, (_o = (_m = tableOptions.state) === null || _m === void 0 ? void 0 : _m.grouping) !== null && _o !== void 0 ? _o : grouping) && Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_ExpandButton, { row: row, table: table })), Header: tableOptions.enableExpandAll
3409
+ ? ({ table }) => jsxRuntime.jsx(MRT_ExpandAllButton, { table: table })
3410
+ : null, header: tableOptions.localization.expand, size: 60 }, (_p = tableOptions.displayColumnDefOptions) === null || _p === void 0 ? void 0 : _p['mrt-row-expand']), { columnDefType: 'display', id: 'mrt-row-expand' }),
3411
+ ((_r = (_q = tableOptions.state) === null || _q === void 0 ? void 0 : _q.columnOrder) !== null && _r !== void 0 ? _r : columnOrder).includes('mrt-row-select') && Object.assign(Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_SelectCheckbox, { row: row, table: table })), Header: tableOptions.enableSelectAll &&
3412
+ tableOptions.enableMultiRowSelection
3413
+ ? ({ table }) => jsxRuntime.jsx(MRT_SelectCheckbox, { selectAll: true, table: table })
3414
+ : null, header: tableOptions.localization.select, size: 60 }, (_s = tableOptions.displayColumnDefOptions) === null || _s === void 0 ? void 0 : _s['mrt-row-select']), { columnDefType: 'display', id: 'mrt-row-select' }),
3415
+ ((_u = (_t = tableOptions.state) === null || _t === void 0 ? void 0 : _t.columnOrder) !== null && _u !== void 0 ? _u : columnOrder).includes('mrt-row-numbers') && Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => tableOptions.localization.rowNumber, header: tableOptions.localization.rowNumbers, size: 60 }, (_v = tableOptions.displayColumnDefOptions) === null || _v === void 0 ? void 0 : _v['mrt-row-numbers']), { columnDefType: 'display', id: 'mrt-row-numbers' }),
3416
+ ((_x = (_w = tableOptions.state) === null || _w === void 0 ? void 0 : _w.columnOrder) !== null && _x !== void 0 ? _x : columnOrder).includes('mrt-row-spacer') && Object.assign(Object.assign(Object.assign({}, (_y = tableOptions.displayColumnDefOptions) === null || _y === void 0 ? void 0 : _y['mrt-row-spacer']), MRT_DefaultDisplayColumn), { columnDefType: 'display', header: '', id: 'mrt-row-spacer', muiTableBodyCellProps: blankColProps, muiTableFooterCellProps: blankColProps, muiTableHeadCellProps: blankColProps }),
3417
+ ].filter(Boolean);
3418
+ }, [
3419
+ columnOrder,
3420
+ grouping,
3421
+ tableOptions.displayColumnDefOptions,
3422
+ tableOptions.editDisplayMode,
3423
+ tableOptions.enableColumnDragging,
3424
+ tableOptions.enableColumnFilterModes,
3425
+ tableOptions.enableColumnOrdering,
3426
+ tableOptions.enableEditing,
3427
+ tableOptions.enableExpandAll,
3428
+ tableOptions.enableExpanding,
3429
+ tableOptions.enableGrouping,
3430
+ tableOptions.enableRowActions,
3431
+ tableOptions.enableRowDragging,
3432
+ tableOptions.enableRowNumbers,
3433
+ tableOptions.enableRowOrdering,
3434
+ tableOptions.enableRowSelection,
3435
+ tableOptions.enableSelectAll,
3436
+ tableOptions.localization,
3437
+ tableOptions.positionActionsColumn,
3438
+ tableOptions.renderDetailPanel,
3439
+ tableOptions.renderRowActionMenuItems,
3440
+ tableOptions.renderRowActions,
3441
+ (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnOrder,
3442
+ (_b = tableOptions.state) === null || _b === void 0 ? void 0 : _b.grouping,
3443
+ ]);
3444
+ };
3445
+
3446
+ const useMRT_Effects = (table) => {
3447
+ const { getIsSomeRowsPinned, getState, options: { enablePagination, enableRowPinning, rowCount }, } = table;
3448
+ const { density, globalFilter, isFullScreen, isLoading, pagination, showSkeletons, sorting, } = getState();
3449
+ const rerender = react.useReducer(() => ({}), {})[1];
3450
+ const isMounted = react.useRef(false);
3451
+ const initialBodyHeight = react.useRef();
3452
+ const previousTop = react.useRef();
3453
+ react.useEffect(() => {
3454
+ if (typeof window !== 'undefined') {
3455
+ initialBodyHeight.current = document.body.style.height;
3456
+ }
3457
+ }, []);
3458
+ react.useEffect(() => {
3459
+ if (isMounted && typeof window !== 'undefined') {
3460
+ if (isFullScreen) {
3461
+ previousTop.current = document.body.getBoundingClientRect().top; //save scroll position
3462
+ document.body.style.height = '100vh'; //hide page scrollbars when table is in full screen mode
3463
+ }
3464
+ else {
3465
+ document.body.style.height = initialBodyHeight.current;
3466
+ if (!previousTop.current)
3467
+ return;
3468
+ //restore scroll position
3469
+ window.scrollTo({
3470
+ behavior: 'instant',
3471
+ top: -1 * previousTop.current,
3472
+ });
3473
+ }
3474
+ }
3475
+ isMounted.current = true;
3476
+ }, [isFullScreen]);
3477
+ //if page index is out of bounds, set it to the last page
3478
+ react.useEffect(() => {
3479
+ if (!enablePagination || isLoading || showSkeletons)
3480
+ return;
3481
+ const { pageIndex, pageSize } = pagination;
3482
+ const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : table.getPrePaginationRowModel().rows.length;
3483
+ const firstVisibleRowIndex = pageIndex * pageSize;
3484
+ if (firstVisibleRowIndex > totalRowCount) {
3485
+ table.setPageIndex(Math.floor(totalRowCount / pageSize));
3486
+ }
3487
+ }, [rowCount, table.getPrePaginationRowModel().rows.length]);
3488
+ //turn off sort when global filter is looking for ranked results
3489
+ const appliedSort = react.useRef(sorting);
3490
+ react.useEffect(() => {
3491
+ if (sorting.length) {
3492
+ appliedSort.current = sorting;
3493
+ }
3494
+ }, [sorting]);
3495
+ react.useEffect(() => {
3496
+ if (!getCanRankRows(table))
3497
+ return;
3498
+ if (globalFilter) {
3499
+ table.setSorting([]);
3500
+ }
3501
+ else {
3502
+ table.setSorting(() => appliedSort.current || []);
3503
+ }
3504
+ }, [globalFilter]);
3505
+ react.useEffect(() => {
3506
+ if (enableRowPinning && getIsSomeRowsPinned()) {
3507
+ setTimeout(() => {
3508
+ rerender();
3509
+ }, 150);
3510
+ }
3511
+ }, [density]);
3512
+ };
3513
+
3514
+ const useMRT_TableInstance = (tableOptions) => {
3515
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
3516
+ const bottomToolbarRef = react.useRef(null);
3517
+ const editInputRefs = react.useRef({});
3518
+ const filterInputRefs = react.useRef({});
3519
+ const searchInputRef = react.useRef(null);
3520
+ const tableContainerRef = react.useRef(null);
3521
+ const tableHeadCellRefs = react.useRef({});
3522
+ const tablePaperRef = react.useRef(null);
3523
+ const topToolbarRef = react.useRef(null);
3524
+ const tableHeadRef = react.useRef(null);
3525
+ const tableFooterRef = react.useRef(null);
3526
+ const initialState = react.useMemo(() => {
3527
+ var _a, _b, _c;
3528
+ const initState = (_a = tableOptions.initialState) !== null && _a !== void 0 ? _a : {};
3529
+ initState.columnOrder =
3530
+ (_b = initState.columnOrder) !== null && _b !== void 0 ? _b : getDefaultColumnOrderIds(tableOptions);
3531
+ initState.globalFilterFn = (_c = tableOptions.globalFilterFn) !== null && _c !== void 0 ? _c : 'fuzzy';
3532
+ return initState;
3533
+ }, []);
3534
+ const [creatingRow, _setCreatingRow] = react.useState((_a = initialState.creatingRow) !== null && _a !== void 0 ? _a : null);
3535
+ const [columnFilterFns, setColumnFilterFns] = react.useState(() => Object.assign({}, ...getAllLeafColumnDefs(tableOptions.columns).map((col) => {
3536
+ var _a, _b, _c, _d;
3537
+ return ({
3538
+ [getColumnId(col)]: col.filterFn instanceof Function
3539
+ ? (_a = col.filterFn.name) !== null && _a !== void 0 ? _a : 'custom'
3540
+ : (_d = (_b = col.filterFn) !== null && _b !== void 0 ? _b : (_c = initialState === null || initialState === void 0 ? void 0 : initialState.columnFilterFns) === null || _c === void 0 ? void 0 : _c[getColumnId(col)]) !== null && _d !== void 0 ? _d : getDefaultColumnFilterFn(col),
3541
+ });
3542
+ })));
3543
+ const [columnOrder, setColumnOrder] = react.useState((_b = initialState.columnOrder) !== null && _b !== void 0 ? _b : []);
3544
+ const [density, setDensity] = react.useState((_c = initialState === null || initialState === void 0 ? void 0 : initialState.density) !== null && _c !== void 0 ? _c : 'comfortable');
3545
+ const [draggingColumn, setDraggingColumn] = react.useState((_d = initialState.draggingColumn) !== null && _d !== void 0 ? _d : null);
3546
+ const [draggingRow, setDraggingRow] = react.useState((_e = initialState.draggingRow) !== null && _e !== void 0 ? _e : null);
3547
+ const [editingCell, setEditingCell] = react.useState((_f = initialState.editingCell) !== null && _f !== void 0 ? _f : null);
3548
+ const [editingRow, setEditingRow] = react.useState((_g = initialState.editingRow) !== null && _g !== void 0 ? _g : null);
3549
+ const [globalFilterFn, setGlobalFilterFn] = react.useState((_h = initialState.globalFilterFn) !== null && _h !== void 0 ? _h : 'fuzzy');
3550
+ const [grouping, setGrouping] = react.useState((_j = initialState.grouping) !== null && _j !== void 0 ? _j : []);
3551
+ const [hoveredColumn, setHoveredColumn] = react.useState((_k = initialState.hoveredColumn) !== null && _k !== void 0 ? _k : null);
3552
+ const [hoveredRow, setHoveredRow] = react.useState((_l = initialState.hoveredRow) !== null && _l !== void 0 ? _l : null);
3553
+ const [isFullScreen, setIsFullScreen] = react.useState((_m = initialState === null || initialState === void 0 ? void 0 : initialState.isFullScreen) !== null && _m !== void 0 ? _m : false);
3554
+ const [showAlertBanner, setShowAlertBanner] = react.useState((_p = (_o = tableOptions.initialState) === null || _o === void 0 ? void 0 : _o.showAlertBanner) !== null && _p !== void 0 ? _p : false);
3555
+ const [showColumnFilters, setShowColumnFilters] = react.useState((_q = initialState === null || initialState === void 0 ? void 0 : initialState.showColumnFilters) !== null && _q !== void 0 ? _q : false);
3556
+ const [showGlobalFilter, setShowGlobalFilter] = react.useState((_r = initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) !== null && _r !== void 0 ? _r : false);
3557
+ const [showToolbarDropZone, setShowToolbarDropZone] = react.useState((_s = initialState === null || initialState === void 0 ? void 0 : initialState.showToolbarDropZone) !== null && _s !== void 0 ? _s : false);
3558
+ const displayColumns = useMRT_DisplayColumns({
3559
+ columnOrder,
3560
+ creatingRow,
3561
+ grouping,
3562
+ tableOptions,
3563
+ });
3564
+ const columnDefs = react.useMemo(() => {
3565
+ var _a, _b, _c;
3566
+ return prepareColumns({
3567
+ aggregationFns: tableOptions.aggregationFns,
3568
+ columnDefs: [...displayColumns, ...tableOptions.columns],
3569
+ columnFilterFns: (_b = (_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.columnFilterFns) !== null && _b !== void 0 ? _b : columnFilterFns,
3570
+ defaultDisplayColumn: (_c = tableOptions.defaultDisplayColumn) !== null && _c !== void 0 ? _c : {},
3571
+ filterFns: tableOptions.filterFns,
3572
+ sortingFns: tableOptions.sortingFns,
3573
+ });
3574
+ }, [
3575
+ columnFilterFns,
3576
+ displayColumns,
3577
+ tableOptions.columns,
3578
+ (_t = tableOptions.state) === null || _t === void 0 ? void 0 : _t.columnFilterFns,
3579
+ ]);
3580
+ const data = react.useMemo(() => {
3581
+ var _a, _b, _c, _d, _e;
3582
+ return (((_a = tableOptions.state) === null || _a === void 0 ? void 0 : _a.isLoading) || ((_b = tableOptions.state) === null || _b === void 0 ? void 0 : _b.showSkeletons)) &&
3583
+ !tableOptions.data.length
3584
+ ? [
3585
+ ...Array(((_d = (_c = tableOptions.state) === null || _c === void 0 ? void 0 : _c.pagination) === null || _d === void 0 ? void 0 : _d.pageSize) ||
3586
+ ((_e = initialState === null || initialState === void 0 ? void 0 : initialState.pagination) === null || _e === void 0 ? void 0 : _e.pageSize) ||
3587
+ 10).fill(null),
3588
+ ].map(() => Object.assign({}, ...getAllLeafColumnDefs(tableOptions.columns).map((col) => ({
3589
+ [getColumnId(col)]: null,
3590
+ }))))
3591
+ : tableOptions.data;
3592
+ }, [
3593
+ tableOptions.data,
3594
+ (_u = tableOptions.state) === null || _u === void 0 ? void 0 : _u.isLoading,
3595
+ (_v = tableOptions.state) === null || _v === void 0 ? void 0 : _v.showSkeletons,
3596
+ ]);
3597
+ //@ts-ignore
3598
+ const table = reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: tableOptions.enableExpanding || tableOptions.enableGrouping
3599
+ ? reactTable.getExpandedRowModel()
3600
+ : undefined, getFacetedMinMaxValues: tableOptions.enableFacetedValues
3601
+ ? reactTable.getFacetedMinMaxValues()
3602
+ : undefined, getFacetedRowModel: tableOptions.enableFacetedValues
3603
+ ? reactTable.getFacetedRowModel()
3604
+ : undefined, getFacetedUniqueValues: tableOptions.enableFacetedValues
3605
+ ? reactTable.getFacetedUniqueValues()
3606
+ : undefined, getFilteredRowModel: tableOptions.enableColumnFilters ||
3607
+ tableOptions.enableGlobalFilter ||
3608
+ tableOptions.enableFilters
3609
+ ? reactTable.getFilteredRowModel()
3610
+ : undefined, getGroupedRowModel: tableOptions.enableGrouping
3611
+ ? reactTable.getGroupedRowModel()
3612
+ : undefined, getPaginationRowModel: tableOptions.enablePagination
3613
+ ? reactTable.getPaginationRowModel()
3614
+ : undefined, getSortedRowModel: tableOptions.enableSorting
3615
+ ? reactTable.getSortedRowModel()
3616
+ : undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping }, tableOptions), {
3617
+ //@ts-ignore
3618
+ columns: columnDefs, data, globalFilterFn: (_w = tableOptions.filterFns) === null || _w === void 0 ? void 0 : _w[globalFilterFn !== null && globalFilterFn !== void 0 ? globalFilterFn : 'fuzzy'], initialState, state: Object.assign({ columnFilterFns,
3619
+ columnOrder,
3620
+ creatingRow,
3621
+ density,
3622
+ draggingColumn,
3623
+ draggingRow,
3624
+ editingCell,
3625
+ editingRow,
3626
+ globalFilterFn,
3627
+ grouping,
3628
+ hoveredColumn,
3629
+ hoveredRow,
3630
+ isFullScreen,
3631
+ showAlertBanner,
3632
+ showColumnFilters,
3633
+ showGlobalFilter,
3634
+ showToolbarDropZone }, tableOptions.state) }));
3635
+ // @ts-ignore
3636
+ table.refs = {
3637
+ // @ts-ignore
3638
+ bottomToolbarRef,
3639
+ editInputRefs,
3640
+ filterInputRefs,
3641
+ // @ts-ignore
3642
+ searchInputRef,
3643
+ // @ts-ignore
3644
+ tableContainerRef,
3645
+ // @ts-ignore
3646
+ tableFooterRef,
3647
+ tableHeadCellRefs,
3648
+ // @ts-ignore
3649
+ tableHeadRef,
3650
+ // @ts-ignore
3651
+ tablePaperRef,
3652
+ // @ts-ignore
3653
+ topToolbarRef,
3654
+ };
3655
+ const setCreatingRow = (row) => {
3656
+ var _a, _b;
3657
+ let _row = row;
3658
+ if (row === true) {
3659
+ _row = createRow(table);
3660
+ }
3661
+ (_b = (_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.onCreatingRowChange) === null || _a === void 0 ? void 0 : _a.call(tableOptions, _row)) !== null && _b !== void 0 ? _b : _setCreatingRow(_row);
3662
+ };
3663
+ table.setCreatingRow = setCreatingRow;
3664
+ table.setColumnFilterFns =
3665
+ (_x = tableOptions.onColumnFilterFnsChange) !== null && _x !== void 0 ? _x : setColumnFilterFns;
3666
+ table.setDensity = (_y = tableOptions.onDensityChange) !== null && _y !== void 0 ? _y : setDensity;
3667
+ table.setDraggingColumn =
3668
+ (_z = tableOptions.onDraggingColumnChange) !== null && _z !== void 0 ? _z : setDraggingColumn;
3669
+ table.setDraggingRow = (_0 = tableOptions.onDraggingRowChange) !== null && _0 !== void 0 ? _0 : setDraggingRow;
3670
+ table.setEditingCell = (_1 = tableOptions.onEditingCellChange) !== null && _1 !== void 0 ? _1 : setEditingCell;
3671
+ table.setEditingRow = (_2 = tableOptions.onEditingRowChange) !== null && _2 !== void 0 ? _2 : setEditingRow;
3672
+ table.setGlobalFilterFn =
3673
+ (_3 = tableOptions.onGlobalFilterFnChange) !== null && _3 !== void 0 ? _3 : setGlobalFilterFn;
3674
+ table.setHoveredColumn =
3675
+ (_4 = tableOptions.onHoveredColumnChange) !== null && _4 !== void 0 ? _4 : setHoveredColumn;
3676
+ table.setHoveredRow = (_5 = tableOptions.onHoveredRowChange) !== null && _5 !== void 0 ? _5 : setHoveredRow;
3677
+ table.setIsFullScreen = (_6 = tableOptions.onIsFullScreenChange) !== null && _6 !== void 0 ? _6 : setIsFullScreen;
3678
+ table.setShowAlertBanner =
3679
+ (_7 = tableOptions.onShowAlertBannerChange) !== null && _7 !== void 0 ? _7 : setShowAlertBanner;
3680
+ table.setShowColumnFilters =
3681
+ (_8 = tableOptions.onShowColumnFiltersChange) !== null && _8 !== void 0 ? _8 : setShowColumnFilters;
3682
+ table.setShowGlobalFilter =
3683
+ (_9 = tableOptions.onShowGlobalFilterChange) !== null && _9 !== void 0 ? _9 : setShowGlobalFilter;
3684
+ table.setShowToolbarDropZone =
3685
+ (_10 = tableOptions.onShowToolbarDropZoneChange) !== null && _10 !== void 0 ? _10 : setShowToolbarDropZone;
3686
+ useMRT_Effects(table);
3687
+ return table;
3688
+ };
3689
+
3690
+ const useMaterialReactTable = (tableOptions) => useMRT_TableInstance(useMRT_TableOptions(tableOptions));
3670
3691
 
3671
3692
  const isTableInstanceProp = (props) => props.table !== undefined;
3672
3693
  const MaterialReactTable = (props) => {
@@ -3685,8 +3706,6 @@ exports.MRT_BottomToolbar = MRT_BottomToolbar;
3685
3706
  exports.MRT_ColumnActionMenu = MRT_ColumnActionMenu;
3686
3707
  exports.MRT_ColumnPinningButtons = MRT_ColumnPinningButtons;
3687
3708
  exports.MRT_CopyButton = MRT_CopyButton;
3688
- exports.MRT_DefaultColumn = MRT_DefaultColumn;
3689
- exports.MRT_DefaultDisplayColumn = MRT_DefaultDisplayColumn;
3690
3709
  exports.MRT_EditActionButtons = MRT_EditActionButtons;
3691
3710
  exports.MRT_EditCellTextField = MRT_EditCellTextField;
3692
3711
  exports.MRT_EditRowModal = MRT_EditRowModal;
@@ -3729,6 +3748,7 @@ exports.MRT_TableHeadCellGrabHandle = MRT_TableHeadCellGrabHandle;
3729
3748
  exports.MRT_TableHeadCellResizeHandle = MRT_TableHeadCellResizeHandle;
3730
3749
  exports.MRT_TableHeadCellSortLabel = MRT_TableHeadCellSortLabel;
3731
3750
  exports.MRT_TableHeadRow = MRT_TableHeadRow;
3751
+ exports.MRT_TableLoadingOverlay = MRT_TableLoadingOverlay;
3732
3752
  exports.MRT_TablePagination = MRT_TablePagination;
3733
3753
  exports.MRT_TablePaper = MRT_TablePaper;
3734
3754
  exports.MRT_ToggleDensePaddingButton = MRT_ToggleDensePaddingButton;
@@ -3746,14 +3766,15 @@ exports.Memo_MRT_TableBodyCell = Memo_MRT_TableBodyCell;
3746
3766
  exports.Memo_MRT_TableBodyRow = Memo_MRT_TableBodyRow;
3747
3767
  exports.commonListItemStyles = commonListItemStyles;
3748
3768
  exports.commonMenuItemStyles = commonMenuItemStyles;
3749
- exports.commonToolbarStyles = commonToolbarStyles;
3769
+ exports.createMRTColumnHelper = createMRTColumnHelper;
3750
3770
  exports.createRow = createRow;
3751
3771
  exports.extraIndexRangeExtractor = extraIndexRangeExtractor;
3752
3772
  exports.flexRender = flexRender;
3753
3773
  exports.getAllLeafColumnDefs = getAllLeafColumnDefs;
3754
3774
  exports.getCanRankRows = getCanRankRows;
3755
3775
  exports.getColumnId = getColumnId;
3756
- exports.getCommonCellStyles = getCommonCellStyles;
3776
+ exports.getCommonMRTCellStyles = getCommonMRTCellStyles;
3777
+ exports.getCommonToolbarStyles = getCommonToolbarStyles;
3757
3778
  exports.getDefaultColumnFilterFn = getDefaultColumnFilterFn;
3758
3779
  exports.getDefaultColumnOrderIds = getDefaultColumnOrderIds;
3759
3780
  exports.getIsFirstColumn = getIsFirstColumn;
@@ -3761,6 +3782,7 @@ exports.getIsFirstRightPinnedColumn = getIsFirstRightPinnedColumn;
3761
3782
  exports.getIsLastColumn = getIsLastColumn;
3762
3783
  exports.getIsLastLeftPinnedColumn = getIsLastLeftPinnedColumn;
3763
3784
  exports.getLeadingDisplayColumnIds = getLeadingDisplayColumnIds;
3785
+ exports.getMRTTheme = getMRTTheme;
3764
3786
  exports.getTotalRight = getTotalRight;
3765
3787
  exports.getTrailingDisplayColumnIds = getTrailingDisplayColumnIds;
3766
3788
  exports.mrtFilterOptions = mrtFilterOptions;