@careharmony/mantine-react-table-ng 0.0.0-stage → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +217 -3
  3. package/dist/index.cjs +4023 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +1488 -0
  6. package/dist/index.esm.d.mts +1488 -0
  7. package/dist/index.esm.mjs +3909 -0
  8. package/dist/index.esm.mjs.map +1 -0
  9. package/locales/ar/index.cjs +97 -0
  10. package/locales/ar/index.d.cts +3 -0
  11. package/locales/ar/index.esm.d.mts +3 -0
  12. package/locales/ar/index.esm.mjs +95 -0
  13. package/locales/ar/package.json +19 -0
  14. package/locales/az/index.cjs +97 -0
  15. package/locales/az/index.d.cts +3 -0
  16. package/locales/az/index.esm.d.mts +3 -0
  17. package/locales/az/index.esm.mjs +95 -0
  18. package/locales/az/package.json +19 -0
  19. package/locales/bg/index.cjs +97 -0
  20. package/locales/bg/index.d.cts +3 -0
  21. package/locales/bg/index.esm.d.mts +3 -0
  22. package/locales/bg/index.esm.mjs +95 -0
  23. package/locales/bg/package.json +19 -0
  24. package/locales/cs/index.cjs +97 -0
  25. package/locales/cs/index.d.cts +3 -0
  26. package/locales/cs/index.esm.d.mts +3 -0
  27. package/locales/cs/index.esm.mjs +95 -0
  28. package/locales/cs/package.json +19 -0
  29. package/locales/da/index.cjs +97 -0
  30. package/locales/da/index.d.cts +3 -0
  31. package/locales/da/index.esm.d.mts +3 -0
  32. package/locales/da/index.esm.mjs +95 -0
  33. package/locales/da/package.json +19 -0
  34. package/locales/de/index.cjs +97 -0
  35. package/locales/de/index.d.cts +3 -0
  36. package/locales/de/index.esm.d.mts +3 -0
  37. package/locales/de/index.esm.mjs +95 -0
  38. package/locales/de/package.json +19 -0
  39. package/locales/el/index.cjs +97 -0
  40. package/locales/el/index.d.cts +3 -0
  41. package/locales/el/index.esm.d.mts +3 -0
  42. package/locales/el/index.esm.mjs +95 -0
  43. package/locales/el/package.json +19 -0
  44. package/locales/en/index.cjs +97 -0
  45. package/locales/en/index.d.cts +3 -0
  46. package/locales/en/index.esm.d.mts +3 -0
  47. package/locales/en/index.esm.mjs +95 -0
  48. package/locales/en/package.json +19 -0
  49. package/locales/es/index.cjs +97 -0
  50. package/locales/es/index.d.cts +3 -0
  51. package/locales/es/index.esm.d.mts +3 -0
  52. package/locales/es/index.esm.mjs +95 -0
  53. package/locales/es/package.json +19 -0
  54. package/locales/et/index.cjs +97 -0
  55. package/locales/et/index.d.cts +3 -0
  56. package/locales/et/index.esm.d.mts +3 -0
  57. package/locales/et/index.esm.mjs +95 -0
  58. package/locales/et/package.json +19 -0
  59. package/locales/fa/index.cjs +97 -0
  60. package/locales/fa/index.d.cts +3 -0
  61. package/locales/fa/index.esm.d.mts +3 -0
  62. package/locales/fa/index.esm.mjs +95 -0
  63. package/locales/fa/package.json +19 -0
  64. package/locales/fi/index.cjs +97 -0
  65. package/locales/fi/index.d.cts +3 -0
  66. package/locales/fi/index.esm.d.mts +3 -0
  67. package/locales/fi/index.esm.mjs +95 -0
  68. package/locales/fi/package.json +19 -0
  69. package/locales/fr/index.cjs +97 -0
  70. package/locales/fr/index.d.cts +3 -0
  71. package/locales/fr/index.esm.d.mts +3 -0
  72. package/locales/fr/index.esm.mjs +95 -0
  73. package/locales/fr/package.json +19 -0
  74. package/locales/he/index.cjs +97 -0
  75. package/locales/he/index.d.cts +3 -0
  76. package/locales/he/index.esm.d.mts +3 -0
  77. package/locales/he/index.esm.mjs +95 -0
  78. package/locales/he/package.json +19 -0
  79. package/locales/hr/index.cjs +97 -0
  80. package/locales/hr/index.d.cts +3 -0
  81. package/locales/hr/index.esm.d.mts +3 -0
  82. package/locales/hr/index.esm.mjs +95 -0
  83. package/locales/hr/package.json +19 -0
  84. package/locales/hu/index.cjs +97 -0
  85. package/locales/hu/index.d.cts +3 -0
  86. package/locales/hu/index.esm.d.mts +3 -0
  87. package/locales/hu/index.esm.mjs +95 -0
  88. package/locales/hu/package.json +19 -0
  89. package/locales/hy/index.cjs +97 -0
  90. package/locales/hy/index.d.cts +3 -0
  91. package/locales/hy/index.esm.d.mts +3 -0
  92. package/locales/hy/index.esm.mjs +95 -0
  93. package/locales/hy/package.json +19 -0
  94. package/locales/id/index.cjs +97 -0
  95. package/locales/id/index.d.cts +3 -0
  96. package/locales/id/index.esm.d.mts +3 -0
  97. package/locales/id/index.esm.mjs +95 -0
  98. package/locales/id/package.json +19 -0
  99. package/locales/it/index.cjs +97 -0
  100. package/locales/it/index.d.cts +3 -0
  101. package/locales/it/index.esm.d.mts +3 -0
  102. package/locales/it/index.esm.mjs +95 -0
  103. package/locales/it/package.json +19 -0
  104. package/locales/ja/index.cjs +97 -0
  105. package/locales/ja/index.d.cts +3 -0
  106. package/locales/ja/index.esm.d.mts +3 -0
  107. package/locales/ja/index.esm.mjs +95 -0
  108. package/locales/ja/package.json +19 -0
  109. package/locales/ko/index.cjs +97 -0
  110. package/locales/ko/index.d.cts +3 -0
  111. package/locales/ko/index.esm.d.mts +3 -0
  112. package/locales/ko/index.esm.mjs +95 -0
  113. package/locales/ko/package.json +19 -0
  114. package/locales/nl/index.cjs +97 -0
  115. package/locales/nl/index.d.cts +3 -0
  116. package/locales/nl/index.esm.d.mts +3 -0
  117. package/locales/nl/index.esm.mjs +95 -0
  118. package/locales/nl/package.json +19 -0
  119. package/locales/no/index.cjs +97 -0
  120. package/locales/no/index.d.cts +3 -0
  121. package/locales/no/index.esm.d.mts +3 -0
  122. package/locales/no/index.esm.mjs +95 -0
  123. package/locales/no/package.json +19 -0
  124. package/locales/np/index.cjs +97 -0
  125. package/locales/np/index.d.cts +3 -0
  126. package/locales/np/index.esm.d.mts +3 -0
  127. package/locales/np/index.esm.mjs +95 -0
  128. package/locales/np/package.json +19 -0
  129. package/locales/pl/index.cjs +97 -0
  130. package/locales/pl/index.d.cts +3 -0
  131. package/locales/pl/index.esm.d.mts +3 -0
  132. package/locales/pl/index.esm.mjs +95 -0
  133. package/locales/pl/package.json +19 -0
  134. package/locales/pt/index.cjs +97 -0
  135. package/locales/pt/index.d.cts +3 -0
  136. package/locales/pt/index.esm.d.mts +3 -0
  137. package/locales/pt/index.esm.mjs +95 -0
  138. package/locales/pt/package.json +19 -0
  139. package/locales/pt-BR/index.cjs +97 -0
  140. package/locales/pt-BR/index.d.cts +3 -0
  141. package/locales/pt-BR/index.esm.d.mts +3 -0
  142. package/locales/pt-BR/index.esm.mjs +95 -0
  143. package/locales/pt-BR/package.json +19 -0
  144. package/locales/ro/index.cjs +97 -0
  145. package/locales/ro/index.d.cts +3 -0
  146. package/locales/ro/index.esm.d.mts +3 -0
  147. package/locales/ro/index.esm.mjs +95 -0
  148. package/locales/ro/package.json +19 -0
  149. package/locales/ru/index.cjs +97 -0
  150. package/locales/ru/index.d.cts +3 -0
  151. package/locales/ru/index.esm.d.mts +3 -0
  152. package/locales/ru/index.esm.mjs +95 -0
  153. package/locales/ru/package.json +19 -0
  154. package/locales/sk/index.cjs +97 -0
  155. package/locales/sk/index.d.cts +3 -0
  156. package/locales/sk/index.esm.d.mts +3 -0
  157. package/locales/sk/index.esm.mjs +95 -0
  158. package/locales/sk/package.json +19 -0
  159. package/locales/sr-Cyrl-RS/index.cjs +97 -0
  160. package/locales/sr-Cyrl-RS/index.d.cts +3 -0
  161. package/locales/sr-Cyrl-RS/index.esm.d.mts +3 -0
  162. package/locales/sr-Cyrl-RS/index.esm.mjs +95 -0
  163. package/locales/sr-Cyrl-RS/package.json +19 -0
  164. package/locales/sr-Latn-RS/index.cjs +97 -0
  165. package/locales/sr-Latn-RS/index.d.cts +3 -0
  166. package/locales/sr-Latn-RS/index.esm.d.mts +3 -0
  167. package/locales/sr-Latn-RS/index.esm.mjs +95 -0
  168. package/locales/sr-Latn-RS/package.json +19 -0
  169. package/locales/sv/index.cjs +97 -0
  170. package/locales/sv/index.d.cts +3 -0
  171. package/locales/sv/index.esm.d.mts +3 -0
  172. package/locales/sv/index.esm.mjs +95 -0
  173. package/locales/sv/package.json +19 -0
  174. package/locales/th/index.cjs +97 -0
  175. package/locales/th/index.d.cts +3 -0
  176. package/locales/th/index.esm.d.mts +3 -0
  177. package/locales/th/index.esm.mjs +95 -0
  178. package/locales/th/package.json +19 -0
  179. package/locales/tr/index.cjs +97 -0
  180. package/locales/tr/index.d.cts +3 -0
  181. package/locales/tr/index.esm.d.mts +3 -0
  182. package/locales/tr/index.esm.mjs +95 -0
  183. package/locales/tr/package.json +19 -0
  184. package/locales/uk/index.cjs +97 -0
  185. package/locales/uk/index.d.cts +3 -0
  186. package/locales/uk/index.esm.d.mts +3 -0
  187. package/locales/uk/index.esm.mjs +95 -0
  188. package/locales/uk/package.json +19 -0
  189. package/locales/vi/index.cjs +97 -0
  190. package/locales/vi/index.d.cts +3 -0
  191. package/locales/vi/index.esm.d.mts +3 -0
  192. package/locales/vi/index.esm.mjs +95 -0
  193. package/locales/vi/package.json +19 -0
  194. package/locales/zh-Hans/index.cjs +97 -0
  195. package/locales/zh-Hans/index.d.cts +3 -0
  196. package/locales/zh-Hans/index.esm.d.mts +3 -0
  197. package/locales/zh-Hans/index.esm.mjs +95 -0
  198. package/locales/zh-Hans/package.json +19 -0
  199. package/locales/zh-Hant/index.cjs +97 -0
  200. package/locales/zh-Hant/index.d.cts +3 -0
  201. package/locales/zh-Hant/index.esm.d.mts +3 -0
  202. package/locales/zh-Hant/index.esm.mjs +95 -0
  203. package/locales/zh-Hant/package.json +19 -0
  204. package/package.json +184 -4
  205. package/src/components/MantineReactTable.tsx +38 -0
  206. package/src/components/body/MRT_TableBody.module.css +42 -0
  207. package/src/components/body/MRT_TableBody.tsx +214 -0
  208. package/src/components/body/MRT_TableBodyCell.module.css +107 -0
  209. package/src/components/body/MRT_TableBodyCell.tsx +355 -0
  210. package/src/components/body/MRT_TableBodyCellValue.tsx +114 -0
  211. package/src/components/body/MRT_TableBodyEmptyRow.tsx +89 -0
  212. package/src/components/body/MRT_TableBodyRow.module.css +261 -0
  213. package/src/components/body/MRT_TableBodyRow.tsx +278 -0
  214. package/src/components/body/MRT_TableBodyRowGrabHandle.tsx +59 -0
  215. package/src/components/body/MRT_TableBodyRowPinButton.tsx +59 -0
  216. package/src/components/body/MRT_TableDetailPanel.module.css +35 -0
  217. package/src/components/body/MRT_TableDetailPanel.tsx +132 -0
  218. package/src/components/buttons/MRT_ColumnPinningButtons.module.css +11 -0
  219. package/src/components/buttons/MRT_ColumnPinningButtons.tsx +69 -0
  220. package/src/components/buttons/MRT_CopyButton.module.css +27 -0
  221. package/src/components/buttons/MRT_CopyButton.tsx +84 -0
  222. package/src/components/buttons/MRT_EditActionButtons.module.css +4 -0
  223. package/src/components/buttons/MRT_EditActionButtons.tsx +139 -0
  224. package/src/components/buttons/MRT_ExpandAllButton.module.css +26 -0
  225. package/src/components/buttons/MRT_ExpandAllButton.tsx +84 -0
  226. package/src/components/buttons/MRT_ExpandButton.module.css +37 -0
  227. package/src/components/buttons/MRT_ExpandButton.tsx +121 -0
  228. package/src/components/buttons/MRT_GrabHandleButton.module.css +6 -0
  229. package/src/components/buttons/MRT_GrabHandleButton.tsx +65 -0
  230. package/src/components/buttons/MRT_RowPinButton.tsx +84 -0
  231. package/src/components/buttons/MRT_ShowHideColumnsButton.tsx +46 -0
  232. package/src/components/buttons/MRT_ToggleDensePaddingButton.tsx +66 -0
  233. package/src/components/buttons/MRT_ToggleFiltersButton.tsx +45 -0
  234. package/src/components/buttons/MRT_ToggleFullScreenButton.tsx +59 -0
  235. package/src/components/buttons/MRT_ToggleGlobalFilterButton.tsx +52 -0
  236. package/src/components/buttons/MRT_ToggleRowActionMenuButton.tsx +87 -0
  237. package/src/components/footer/MRT_TableFooter.module.css +17 -0
  238. package/src/components/footer/MRT_TableFooter.tsx +70 -0
  239. package/src/components/footer/MRT_TableFooterCell.module.css +59 -0
  240. package/src/components/footer/MRT_TableFooterCell.tsx +126 -0
  241. package/src/components/footer/MRT_TableFooterRow.module.css +10 -0
  242. package/src/components/footer/MRT_TableFooterRow.tsx +111 -0
  243. package/src/components/head/MRT_TableHead.module.css +32 -0
  244. package/src/components/head/MRT_TableHead.tsx +106 -0
  245. package/src/components/head/MRT_TableHeadCell.module.css +172 -0
  246. package/src/components/head/MRT_TableHeadCell.tsx +317 -0
  247. package/src/components/head/MRT_TableHeadCellFilterContainer.module.css +5 -0
  248. package/src/components/head/MRT_TableHeadCellFilterContainer.tsx +123 -0
  249. package/src/components/head/MRT_TableHeadCellFilterLabel.module.css +14 -0
  250. package/src/components/head/MRT_TableHeadCellFilterLabel.tsx +176 -0
  251. package/src/components/head/MRT_TableHeadCellGrabHandle.tsx +82 -0
  252. package/src/components/head/MRT_TableHeadCellResizeHandle.module.css +44 -0
  253. package/src/components/head/MRT_TableHeadCellResizeHandle.tsx +68 -0
  254. package/src/components/head/MRT_TableHeadCellSortLabel.module.css +22 -0
  255. package/src/components/head/MRT_TableHeadCellSortLabel.tsx +90 -0
  256. package/src/components/head/MRT_TableHeadRow.module.css +12 -0
  257. package/src/components/head/MRT_TableHeadRow.tsx +105 -0
  258. package/src/components/inputs/MRT_EditCellTextInput.tsx +214 -0
  259. package/src/components/inputs/MRT_FilterCheckBox.module.css +4 -0
  260. package/src/components/inputs/MRT_FilterCheckbox.tsx +80 -0
  261. package/src/components/inputs/MRT_FilterRangeFields.module.css +5 -0
  262. package/src/components/inputs/MRT_FilterRangeFields.tsx +36 -0
  263. package/src/components/inputs/MRT_FilterRangeSlider.module.css +6 -0
  264. package/src/components/inputs/MRT_FilterRangeSlider.tsx +107 -0
  265. package/src/components/inputs/MRT_FilterTextInput.module.css +27 -0
  266. package/src/components/inputs/MRT_FilterTextInput.tsx +418 -0
  267. package/src/components/inputs/MRT_GlobalFilterTextInput.module.css +11 -0
  268. package/src/components/inputs/MRT_GlobalFilterTextInput.tsx +142 -0
  269. package/src/components/inputs/MRT_SelectCheckbox.tsx +138 -0
  270. package/src/components/menus/MRT_ColumnActionMenu.module.css +7 -0
  271. package/src/components/menus/MRT_ColumnActionMenu.tsx +288 -0
  272. package/src/components/menus/MRT_FilterOptionMenu.module.css +6 -0
  273. package/src/components/menus/MRT_FilterOptionMenu.tsx +279 -0
  274. package/src/components/menus/MRT_RowActionMenu.tsx +75 -0
  275. package/src/components/menus/MRT_ShowHideColumnsMenu.module.css +10 -0
  276. package/src/components/menus/MRT_ShowHideColumnsMenu.tsx +136 -0
  277. package/src/components/menus/MRT_ShowHideColumnsMenuItems.module.css +35 -0
  278. package/src/components/menus/MRT_ShowHideColumnsMenuItems.tsx +171 -0
  279. package/src/components/modals/MRT_EditRowModal.tsx +98 -0
  280. package/src/components/table/MRT_Table.module.css +7 -0
  281. package/src/components/table/MRT_Table.tsx +155 -0
  282. package/src/components/table/MRT_TableContainer.module.css +32 -0
  283. package/src/components/table/MRT_TableContainer.tsx +124 -0
  284. package/src/components/table/MRT_TablePaper.module.css +88 -0
  285. package/src/components/table/MRT_TablePaper.tsx +91 -0
  286. package/src/components/toolbar/MRT_BottomToolbar.module.css +40 -0
  287. package/src/components/toolbar/MRT_BottomToolbar.tsx +99 -0
  288. package/src/components/toolbar/MRT_ProgressBar.module.css +10 -0
  289. package/src/components/toolbar/MRT_ProgressBar.tsx +54 -0
  290. package/src/components/toolbar/MRT_TablePagination.module.css +20 -0
  291. package/src/components/toolbar/MRT_TablePagination.tsx +175 -0
  292. package/src/components/toolbar/MRT_ToolbarAlertBanner.module.css +37 -0
  293. package/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +169 -0
  294. package/src/components/toolbar/MRT_ToolbarDropZone.module.css +23 -0
  295. package/src/components/toolbar/MRT_ToolbarDropZone.tsx +68 -0
  296. package/src/components/toolbar/MRT_ToolbarInternalButtons.module.css +6 -0
  297. package/src/components/toolbar/MRT_ToolbarInternalButtons.tsx +74 -0
  298. package/src/components/toolbar/MRT_TopToolbar.module.css +24 -0
  299. package/src/components/toolbar/MRT_TopToolbar.tsx +127 -0
  300. package/src/components/toolbar/common.styles.module.css +10 -0
  301. package/src/fns/aggregationFns.ts +3 -0
  302. package/src/fns/filterFns.ts +243 -0
  303. package/src/fns/sortingFns.ts +34 -0
  304. package/src/hooks/display-columns/getMRT_RowActionsColumnDef.tsx +25 -0
  305. package/src/hooks/display-columns/getMRT_RowDragColumnDef.tsx +32 -0
  306. package/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx +94 -0
  307. package/src/hooks/display-columns/getMRT_RowNumbersColumnDef.tsx +32 -0
  308. package/src/hooks/display-columns/getMRT_RowPinningColumnDef.tsx +26 -0
  309. package/src/hooks/display-columns/getMRT_RowSelectColumnDef.tsx +36 -0
  310. package/src/hooks/display-columns/getMRT_RowSpacerColumnDef.tsx +36 -0
  311. package/src/hooks/useMRT_ColumnVirtualizer.ts +135 -0
  312. package/src/hooks/useMRT_Effects.ts +109 -0
  313. package/src/hooks/useMRT_RowVirtualizer.ts +101 -0
  314. package/src/hooks/useMRT_Rows.ts +47 -0
  315. package/src/hooks/useMRT_TableInstance.ts +320 -0
  316. package/src/hooks/useMRT_TableOptions.ts +300 -0
  317. package/src/hooks/useMRT_TableSnapshot.ts +134 -0
  318. package/src/hooks/useMRT_VirtualizerScrollElement.ts +31 -0
  319. package/src/hooks/useMantineReactTable.ts +23 -0
  320. package/src/icons.ts +108 -0
  321. package/src/index.ts +91 -0
  322. package/src/locales/ar.ts +96 -0
  323. package/src/locales/az.ts +96 -0
  324. package/src/locales/bg.ts +96 -0
  325. package/src/locales/cs.ts +97 -0
  326. package/src/locales/da.ts +96 -0
  327. package/src/locales/de.ts +96 -0
  328. package/src/locales/el.ts +96 -0
  329. package/src/locales/en.ts +96 -0
  330. package/src/locales/es.ts +96 -0
  331. package/src/locales/et.ts +97 -0
  332. package/src/locales/fa.ts +96 -0
  333. package/src/locales/fi.ts +97 -0
  334. package/src/locales/fr.ts +96 -0
  335. package/src/locales/he.ts +96 -0
  336. package/src/locales/hr.ts +96 -0
  337. package/src/locales/hu.ts +96 -0
  338. package/src/locales/hy.ts +96 -0
  339. package/src/locales/id.ts +97 -0
  340. package/src/locales/it.ts +96 -0
  341. package/src/locales/ja.ts +96 -0
  342. package/src/locales/ko.ts +96 -0
  343. package/src/locales/nl.ts +96 -0
  344. package/src/locales/no.ts +97 -0
  345. package/src/locales/np.ts +97 -0
  346. package/src/locales/pl.ts +96 -0
  347. package/src/locales/pt-BR.ts +96 -0
  348. package/src/locales/pt.ts +96 -0
  349. package/src/locales/ro.ts +96 -0
  350. package/src/locales/ru.ts +96 -0
  351. package/src/locales/sk.ts +97 -0
  352. package/src/locales/sr-Cyrl-RS.ts +96 -0
  353. package/src/locales/sr-Latn-RS.ts +96 -0
  354. package/src/locales/sv.ts +96 -0
  355. package/src/locales/th.ts +97 -0
  356. package/src/locales/tr.ts +96 -0
  357. package/src/locales/uk.ts +96 -0
  358. package/src/locales/vi.ts +96 -0
  359. package/src/locales/zh-Hans.ts +95 -0
  360. package/src/locales/zh-Hant.ts +95 -0
  361. package/src/types.ts +1299 -0
  362. package/src/typings.d.ts +1 -0
  363. package/src/utils/column.utils.ts +157 -0
  364. package/src/utils/displayColumn.utils.ts +153 -0
  365. package/src/utils/row.utils.ts +263 -0
  366. package/src/utils/snapshot.utils.ts +97 -0
  367. package/src/utils/style.utils.ts +32 -0
  368. package/src/utils/tanstack.helpers.ts +66 -0
  369. package/src/utils/utils.ts +15 -0
  370. package/src/utils/virtualization.utils.ts +85 -0
  371. package/styles.css +1381 -0
package/src/types.ts ADDED
@@ -0,0 +1,1299 @@
1
+ import {
2
+ type Dispatch,
3
+ type HTMLProps,
4
+ type ReactNode,
5
+ type Ref,
6
+ type RefObject,
7
+ type SetStateAction,
8
+ } from 'react';
9
+
10
+ import {
11
+ type AccessorFn,
12
+ type AggregationFn,
13
+ type Cell,
14
+ type Column,
15
+ type ColumnDef,
16
+ type ColumnFiltersState,
17
+ type ColumnOrderState,
18
+ type ColumnPinningState,
19
+ type ColumnSizingInfoState,
20
+ type ColumnSizingState,
21
+ type DeepKeys,
22
+ type DeepValue,
23
+ type ExpandedState,
24
+ type FilterFn,
25
+ type GroupingState,
26
+ type Header,
27
+ type HeaderGroup,
28
+ type OnChangeFn,
29
+ type PaginationState,
30
+ type Row,
31
+ type RowSelectionState,
32
+ type SortingFn,
33
+ type SortingState,
34
+ type Table,
35
+ type TableOptions,
36
+ type TableState,
37
+ type Updater,
38
+ type VisibilityState,
39
+ } from '@tanstack/react-table';
40
+ import {
41
+ type VirtualItem,
42
+ type Virtualizer,
43
+ type VirtualizerOptions,
44
+ } from '@tanstack/react-virtual';
45
+
46
+ import {
47
+ type ActionIconProps,
48
+ type AlertProps,
49
+ type AutocompleteProps,
50
+ type BadgeProps,
51
+ type BoxProps,
52
+ type CheckboxProps,
53
+ type HighlightProps,
54
+ type LoadingOverlayProps,
55
+ type ModalProps,
56
+ type MultiSelectProps,
57
+ type PaginationProps,
58
+ type PaperProps,
59
+ type ProgressProps,
60
+ type RadioProps,
61
+ type RangeSliderProps,
62
+ type ScrollAreaProps,
63
+ type SelectProps,
64
+ type SkeletonProps,
65
+ type SwitchProps,
66
+ type TableProps,
67
+ type TableScrollContainerProps,
68
+ type TableTbodyProps,
69
+ type TableTdProps,
70
+ type TableTfootProps,
71
+ type TableTheadProps,
72
+ type TableThProps,
73
+ type TableTrProps,
74
+ type TextInputProps,
75
+ type UnstyledButtonProps,
76
+ } from '@mantine/core';
77
+ import { type DateInputProps } from '@mantine/dates';
78
+
79
+ import { type MRT_AggregationFns } from './fns/aggregationFns';
80
+ import { type MRT_FilterFns } from './fns/filterFns';
81
+ import { type MRT_SortingFns } from './fns/sortingFns';
82
+ import { type MRT_Icons } from './icons';
83
+
84
+ export type { MRT_Icons };
85
+
86
+ export type LiteralUnion<T extends U, U = string> =
87
+ | (Record<never, never> & U)
88
+ | T;
89
+
90
+ export type Prettify<T> = { [K in keyof T]: T[K] } & unknown;
91
+
92
+ export type Xor<A, B> =
93
+ | Prettify<{ [k in keyof A]?: never } & B>
94
+ | Prettify<{ [k in keyof B]?: never } & A>;
95
+
96
+ //object literals do not accept `data-*` keys unless the type declares them
97
+ export type HTMLDataAttributes = { [key: `data-${string}`]: unknown };
98
+
99
+ export type HTMLPropsRef<T extends HTMLElement> = {
100
+ ref?: null | Ref<T>;
101
+ } & HTMLDataAttributes &
102
+ Omit<
103
+ HTMLProps<T>,
104
+ 'color' | 'data' | 'label' | 'ref' | 'size' | 'style' | 'type'
105
+ >;
106
+
107
+ //the HTML `title` attribute is a string, the Mantine Modal `title` is a ReactNode
108
+ export type MRT_ModalProps = Omit<HTMLPropsRef<HTMLDivElement>, 'title'> &
109
+ Partial<ModalProps>;
110
+
111
+ export type MantineShade = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
112
+
113
+ export type MRT_PaginationProps = {
114
+ rowsPerPageOptions?: string[];
115
+ showRowsPerPage?: boolean;
116
+ } & Partial<PaginationProps>;
117
+
118
+ export type MRT_DensityState = 'lg' | 'md' | 'sm' | 'xl' | 'xs';
119
+
120
+ export type MRT_ColumnFilterFnsState = Record<string, MRT_FilterOption>;
121
+
122
+ export type MRT_RowData = Record<string, any>;
123
+
124
+ export type MRT_CellValue = unknown;
125
+
126
+ export type MRT_ColumnFiltersState = ColumnFiltersState;
127
+ export type MRT_ColumnOrderState = ColumnOrderState;
128
+ export type MRT_ColumnPinningState = ColumnPinningState;
129
+ export type MRT_ColumnSizingInfoState = ColumnSizingInfoState;
130
+ export type MRT_ColumnSizingState = ColumnSizingState;
131
+ export type MRT_ExpandedState = ExpandedState;
132
+ export type MRT_GroupingState = GroupingState;
133
+ export type MRT_PaginationState = PaginationState;
134
+ export type MRT_RowSelectionState = RowSelectionState;
135
+ export type MRT_SortingState = SortingState;
136
+ export type MRT_Updater<T> = Updater<T>;
137
+ export type MRT_VirtualItem = VirtualItem;
138
+ export type MRT_VisibilityState = VisibilityState;
139
+
140
+ export type MRT_VirtualizerOptions<
141
+ TScrollElement extends Element | Window = Element | Window,
142
+ TItemElement extends Element = Element,
143
+ > = VirtualizerOptions<TScrollElement, TItemElement>;
144
+
145
+ export type MRT_ColumnVirtualizer<
146
+ TScrollElement extends Element | Window = HTMLDivElement,
147
+ TItemElement extends Element = HTMLTableCellElement,
148
+ > = {
149
+ virtualColumns: MRT_VirtualItem[];
150
+ virtualPaddingLeft?: number;
151
+ virtualPaddingRight?: number;
152
+ } & Virtualizer<TScrollElement, TItemElement>;
153
+
154
+ export type MRT_RowVirtualizer<
155
+ TScrollElement extends Element | Window = HTMLDivElement,
156
+ TItemElement extends Element = HTMLTableRowElement,
157
+ > = {
158
+ virtualRows: MRT_VirtualItem[];
159
+ } & Virtualizer<TScrollElement, TItemElement>;
160
+
161
+ export type MRT_ColumnHelper<TData extends MRT_RowData> = {
162
+ accessor: <
163
+ TAccessor extends AccessorFn<TData> | DeepKeys<TData>,
164
+ TValue extends TAccessor extends AccessorFn<TData, infer TReturn>
165
+ ? TReturn
166
+ : TAccessor extends DeepKeys<TData>
167
+ ? DeepValue<TData, TAccessor>
168
+ : never,
169
+ >(
170
+ accessor: TAccessor,
171
+ column: MRT_DisplayColumnDef<TData, TValue>,
172
+ ) => MRT_ColumnDef<TData, TValue>;
173
+ display: (column: MRT_DisplayColumnDef<TData>) => MRT_ColumnDef<TData>;
174
+ group: (column: MRT_GroupColumnDef<TData>) => MRT_ColumnDef<TData>;
175
+ };
176
+
177
+ export interface MRT_Localization {
178
+ actions: string;
179
+ and: string;
180
+ cancel: string;
181
+ changeFilterMode: string;
182
+ changeSearchMode: string;
183
+ clearFilter: string;
184
+ clearSearch: string;
185
+ clearSelection: string;
186
+ clearSort: string;
187
+ clickToCopy: string;
188
+ collapse: string;
189
+ collapseAll: string;
190
+ columnActions: string;
191
+ copiedToClipboard: string;
192
+ copy: string;
193
+ dropToGroupBy: string;
194
+ edit: string;
195
+ expand: string;
196
+ expandAll: string;
197
+ filterArrIncludes: string;
198
+ filterArrIncludesAll: string;
199
+ filterArrIncludesSome: string;
200
+ filterBetween: string;
201
+ filterBetweenInclusive: string;
202
+ filterByColumn: string;
203
+ filterContains: string;
204
+ filterEmpty: string;
205
+ filterEndsWith: string;
206
+ filterEquals: string;
207
+ filterEqualsString: string;
208
+ filterFuzzy: string;
209
+ filterGreaterThan: string;
210
+ filterGreaterThanOrEqualTo: string;
211
+ filterIncludesString: string;
212
+ filterIncludesStringSensitive: string;
213
+ filteringByColumn: string;
214
+ filterInNumberRange: string;
215
+ filterLessThan: string;
216
+ filterLessThanOrEqualTo: string;
217
+ filterMode: string;
218
+ filterNotEmpty: string;
219
+ filterNotEquals: string;
220
+ filterStartsWith: string;
221
+ filterWeakEquals: string;
222
+ goToFirstPage: string;
223
+ goToLastPage: string;
224
+ goToNextPage: string;
225
+ goToPreviousPage: string;
226
+ grab: string;
227
+ groupByColumn: string;
228
+ groupedBy: string;
229
+ hideAll: string;
230
+ hideColumn: string;
231
+ max: string;
232
+ min: string;
233
+ move: string;
234
+ noRecordsToDisplay: string;
235
+ noResultsFound: string;
236
+ of: string;
237
+ or: string;
238
+ pin: string;
239
+ pinToLeft: string;
240
+ pinToRight: string;
241
+ resetColumnSize: string;
242
+ resetOrder: string;
243
+ rowActions: string;
244
+ rowNumber: string;
245
+ rowNumbers: string;
246
+ rowsPerPage: string;
247
+ save: string;
248
+ search: string;
249
+ select: string;
250
+ selectedCountOfRowCountRowsSelected: string;
251
+ showAll: string;
252
+ showAllColumns: string;
253
+ showHideColumns: string;
254
+ showHideFilters: string;
255
+ showHideSearch: string;
256
+ sortByColumnAsc: string;
257
+ sortByColumnDesc: string;
258
+ sortedByColumnAsc: string;
259
+ sortedByColumnDesc: string;
260
+ thenBy: string;
261
+ toggleDensity: string;
262
+ toggleFullScreen: string;
263
+ toggleSelectAll: string;
264
+ toggleSelectRow: string;
265
+ toggleVisibility: string;
266
+ ungroupByColumn: string;
267
+ unpin: string;
268
+ unpinAll: string;
269
+ }
270
+
271
+ export interface MRT_RowModel<TData extends MRT_RowData> {
272
+ flatRows: MRT_Row<TData>[];
273
+ rows: MRT_Row<TData>[];
274
+ rowsById: { [key: string]: MRT_Row<TData> };
275
+ }
276
+
277
+ export type MRT_TableInstance<TData extends MRT_RowData> = {
278
+ getAllColumns: () => MRT_Column<TData>[];
279
+ getAllFlatColumns: () => MRT_Column<TData>[];
280
+ getAllLeafColumns: () => MRT_Column<TData>[];
281
+ getBottomRows: () => MRT_Row<TData>[];
282
+ getCenterLeafColumns: () => MRT_Column<TData>[];
283
+ getCenterRows: () => MRT_Row<TData>[];
284
+ getColumn: (columnId: string) => MRT_Column<TData>;
285
+ getExpandedRowModel: () => MRT_RowModel<TData>;
286
+ getFilteredSelectedRowModel: () => MRT_RowModel<TData>;
287
+ getFlatHeaders: () => MRT_Header<TData>[];
288
+ getHeaderGroups: () => MRT_HeaderGroup<TData>[];
289
+ getLeftLeafColumns: () => MRT_Column<TData>[];
290
+ getPaginationRowModel: () => MRT_RowModel<TData>;
291
+ getPreFilteredRowModel: () => MRT_RowModel<TData>;
292
+ getPrePaginationRowModel: () => MRT_RowModel<TData>;
293
+ getRightLeafColumns: () => MRT_Column<TData>[];
294
+ getRowModel: () => MRT_RowModel<TData>;
295
+ getSelectedRowModel: () => MRT_RowModel<TData>;
296
+ getState: () => MRT_TableState<TData>;
297
+ getTopRows: () => MRT_Row<TData>[];
298
+ options: MRT_StatefulTableOptions<TData>;
299
+ refs: {
300
+ bottomToolbarRef: RefObject<HTMLDivElement | null>;
301
+ editInputRefs: RefObject<Record<string, HTMLInputElement>>;
302
+ filterInputRefs: RefObject<Record<string, HTMLInputElement>>;
303
+ lastSelectedRowId: RefObject<null | string>;
304
+ scrollAreaViewportRef: RefObject<HTMLDivElement | null>;
305
+ searchInputRef: RefObject<HTMLInputElement | null>;
306
+ tableContainerRef: RefObject<HTMLDivElement | null>;
307
+ tableFooterRef: RefObject<HTMLTableSectionElement | null>;
308
+ tableHeadCellRefs: RefObject<Record<string, HTMLTableCellElement>>;
309
+ tableHeadRef: RefObject<HTMLTableSectionElement | null>;
310
+ tablePaperRef: RefObject<HTMLDivElement | null>;
311
+ topToolbarRef: RefObject<HTMLDivElement | null>;
312
+ };
313
+ setColumnFilterFns: Dispatch<SetStateAction<MRT_ColumnFilterFnsState>>;
314
+ setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
315
+ setDensity: Dispatch<SetStateAction<MRT_DensityState>>;
316
+ setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
317
+ setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
318
+ setEditingCell: Dispatch<SetStateAction<MRT_Cell<TData> | null>>;
319
+ setEditingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
320
+ setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
321
+ setHoveredColumn: Dispatch<SetStateAction<null | Partial<MRT_Column<TData>>>>;
322
+ setHoveredRow: Dispatch<SetStateAction<null | Partial<MRT_Row<TData>>>>;
323
+ setIsFullScreen: Dispatch<SetStateAction<boolean>>;
324
+ setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
325
+ setShowColumnFilters: Dispatch<SetStateAction<boolean>>;
326
+ setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
327
+ setShowToolbarDropZone: Dispatch<SetStateAction<boolean>>;
328
+ } & Omit<
329
+ Table<TData>,
330
+ | 'getAllColumns'
331
+ | 'getAllFlatColumns'
332
+ | 'getAllLeafColumns'
333
+ | 'getBottomRows'
334
+ | 'getCenterLeafColumns'
335
+ | 'getCenterRows'
336
+ | 'getColumn'
337
+ | 'getExpandedRowModel'
338
+ | 'getFlatHeaders'
339
+ | 'getHeaderGroups'
340
+ | 'getLeftLeafColumns'
341
+ | 'getPaginationRowModel'
342
+ | 'getPreFilteredRowModel'
343
+ | 'getPrePaginationRowModel'
344
+ | 'getRightLeafColumns'
345
+ | 'getRowModel'
346
+ | 'getSelectedRowModel'
347
+ | 'getState'
348
+ | 'getTopRows'
349
+ | 'options'
350
+ >;
351
+
352
+ export type MRT_DefinedTableOptions<TData extends MRT_RowData> = {
353
+ icons: MRT_Icons;
354
+ localization: MRT_Localization;
355
+ } & Omit<MRT_TableOptions<TData>, 'icons' | 'localization'>;
356
+
357
+ export type MRT_StatefulTableOptions<TData extends MRT_RowData> = {
358
+ state: Pick<
359
+ MRT_TableState<TData>,
360
+ | 'columnFilterFns'
361
+ | 'columnOrder'
362
+ | 'columnSizingInfo'
363
+ | 'creatingRow'
364
+ | 'density'
365
+ | 'draggingColumn'
366
+ | 'draggingRow'
367
+ | 'editingCell'
368
+ | 'editingRow'
369
+ | 'globalFilterFn'
370
+ | 'grouping'
371
+ | 'hoveredColumn'
372
+ | 'hoveredRow'
373
+ | 'isFullScreen'
374
+ | 'pagination'
375
+ | 'showAlertBanner'
376
+ | 'showColumnFilters'
377
+ | 'showGlobalFilter'
378
+ | 'showToolbarDropZone'
379
+ >;
380
+ } & MRT_DefinedTableOptions<TData>;
381
+
382
+ export type MRT_TableState<TData extends MRT_RowData> = Prettify<
383
+ {
384
+ columnFilterFns: MRT_ColumnFilterFnsState;
385
+ creatingRow: MRT_Row<TData> | null;
386
+ density: MRT_DensityState;
387
+ draggingColumn: MRT_Column<TData> | null;
388
+ draggingRow: MRT_Row<TData> | null;
389
+ editingCell: MRT_Cell<TData> | null;
390
+ editingRow: MRT_Row<TData> | null;
391
+ globalFilterFn: MRT_FilterOption;
392
+ hoveredColumn: null | Partial<MRT_Column<TData>>;
393
+ hoveredRow: null | Partial<MRT_Row<TData>>;
394
+ isFullScreen: boolean;
395
+ isLoading: boolean;
396
+ isSaving: boolean;
397
+ showAlertBanner: boolean;
398
+ showColumnFilters: boolean;
399
+ showGlobalFilter: boolean;
400
+ showLoadingOverlay: boolean;
401
+ showProgressBars: boolean;
402
+ showSkeletons: boolean;
403
+ showToolbarDropZone: boolean;
404
+ } & TableState
405
+ >;
406
+
407
+ export type MRT_ColumnDef<TData extends MRT_RowData, TValue = unknown> = {
408
+ /**
409
+ * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
410
+ * Specify a function here to point to the correct property in the data object.
411
+ *
412
+ * @example accessorFn: (row) => row.username
413
+ */
414
+ accessorFn?: (originalRow: TData) => any;
415
+ /**
416
+ * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
417
+ * Specify which key in the row this column should use to access the correct data.
418
+ * Also supports Deep Key Dot Notation.
419
+ *
420
+ * @example accessorKey: 'username' //simple
421
+ * @example accessorKey: 'name.firstName' //deep key dot notation
422
+ */
423
+ accessorKey?: ({} & string) | DeepKeys<TData>;
424
+ AggregatedCell?: (props: {
425
+ cell: MRT_Cell<TData, TValue>;
426
+ column: MRT_Column<TData, TValue>;
427
+ row: MRT_Row<TData>;
428
+ table: MRT_TableInstance<TData>;
429
+ }) => ReactNode;
430
+ aggregationFn?: Array<MRT_AggregationFn<TData>> | MRT_AggregationFn<TData>;
431
+ Cell?: (props: {
432
+ cell: MRT_Cell<TData, TValue>;
433
+ column: MRT_Column<TData, TValue>;
434
+ renderedCellValue: number | ReactNode | string;
435
+ renderedColumnIndex?: number;
436
+ renderedRowIndex?: number;
437
+ row: MRT_Row<TData>;
438
+ rowRef?: RefObject<HTMLTableRowElement | null>;
439
+ table: MRT_TableInstance<TData>;
440
+ }) => ReactNode;
441
+ /**
442
+ * Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
443
+ * Leave this blank if you are just creating a normal data column.
444
+ *
445
+ * @default 'data'
446
+ *
447
+ * @example columnDefType: 'display'
448
+ */
449
+ columnDefType?: 'data' | 'display' | 'group';
450
+ columnFilterModeOptions?: Array<
451
+ LiteralUnion<MRT_FilterOption & string>
452
+ > | null;
453
+ columns?: MRT_ColumnDef<TData>[];
454
+ Edit?: (props: {
455
+ cell: MRT_Cell<TData, TValue>;
456
+ column: MRT_Column<TData, TValue>;
457
+ row: MRT_Row<TData>;
458
+ table: MRT_TableInstance<TData>;
459
+ }) => ReactNode;
460
+ editVariant?: 'multi-select' | 'select' | 'text';
461
+ enableCellHoverReveal?: boolean;
462
+ enableClickToCopy?: ((cell: MRT_Cell<TData>) => boolean) | boolean;
463
+ enableColumnActions?: boolean;
464
+ enableColumnDragging?: boolean;
465
+ enableColumnFilterModes?: boolean;
466
+ enableColumnOrdering?: boolean;
467
+ enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
468
+ enableFilterMatchHighlighting?: boolean;
469
+ Filter?: (props: {
470
+ column: MRT_Column<TData, TValue>;
471
+ header: MRT_Header<TData>;
472
+ rangeFilterIndex?: number;
473
+ table: MRT_TableInstance<TData>;
474
+ }) => ReactNode;
475
+ filterFn?: MRT_FilterFn<TData>;
476
+ filterTooltipValueFn?: MRT_FilterTooltipValueFn;
477
+ filterVariant?:
478
+ | 'autocomplete'
479
+ | 'checkbox'
480
+ | 'date'
481
+ | 'date-range'
482
+ | 'multi-select'
483
+ | 'range'
484
+ | 'range-slider'
485
+ | 'select'
486
+ | 'text';
487
+ Footer?:
488
+ | ((props: {
489
+ column: MRT_Column<TData, TValue>;
490
+ footer: MRT_Header<TData>;
491
+ table: MRT_TableInstance<TData>;
492
+ }) => ReactNode)
493
+ | ReactNode;
494
+ /**
495
+ * footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
496
+ */
497
+ footer?: string;
498
+ GroupedCell?: (props: {
499
+ cell: MRT_Cell<TData, TValue>;
500
+ column: MRT_Column<TData, TValue>;
501
+ row: MRT_Row<TData>;
502
+ table: MRT_TableInstance<TData>;
503
+ }) => ReactNode;
504
+ /**
505
+ * If `layoutMode` is `'grid'` or `'grid-no-grow'`, you can specify the flex grow value for individual columns to still grow and take up remaining space, or set to `false`/0 to not grow.
506
+ */
507
+ grow?: boolean | number;
508
+ Header?:
509
+ | ((props: {
510
+ column: MRT_Column<TData, TValue>;
511
+ header: MRT_Header<TData>;
512
+ table: MRT_TableInstance<TData>;
513
+ }) => ReactNode)
514
+ | ReactNode;
515
+ /**
516
+ * header must be a string. If you want custom JSX to render the header, you can also specify a `Header` option. (Capital H)
517
+ */
518
+ header: string;
519
+ /**
520
+ * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
521
+ *
522
+ * If you have also specified an `accessorFn`, MRT still needs to have a valid `id` to be able to identify the column uniquely.
523
+ *
524
+ * `id` defaults to the `accessorKey` or `header` if not specified.
525
+ *
526
+ * @default gets set to the same value as `accessorKey` by default
527
+ */
528
+ id?: LiteralUnion<keyof TData & string>;
529
+ mantineColumnActionsButtonProps?:
530
+ | ((props: {
531
+ column: MRT_Column<TData, TValue>;
532
+ table: MRT_TableInstance<TData>;
533
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
534
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
535
+ mantineColumnDragHandleProps?:
536
+ | ((props: {
537
+ column: MRT_Column<TData, TValue>;
538
+ table: MRT_TableInstance<TData>;
539
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
540
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
541
+ mantineCopyButtonProps?:
542
+ | ((props: {
543
+ cell: MRT_Cell<TData, TValue>;
544
+ column: MRT_Column<TData, TValue>;
545
+ row: MRT_Row<TData>;
546
+ table: MRT_TableInstance<TData>;
547
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>)
548
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>);
549
+ mantineEditSelectProps?:
550
+ | ((props: {
551
+ cell: MRT_Cell<TData, TValue>;
552
+ column: MRT_Column<TData, TValue>;
553
+ row: MRT_Row<TData>;
554
+ table: MRT_TableInstance<TData>;
555
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>)
556
+ | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
557
+ mantineEditTextInputProps?:
558
+ | ((props: {
559
+ cell: MRT_Cell<TData, TValue>;
560
+ column: MRT_Column<TData, TValue>;
561
+ row: MRT_Row<TData>;
562
+ table: MRT_TableInstance<TData>;
563
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>)
564
+ | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
565
+ mantineFilterAutocompleteProps?:
566
+ | ((props: {
567
+ column: MRT_Column<TData, TValue>;
568
+ rangeFilterIndex?: number;
569
+ table: MRT_TableInstance<TData>;
570
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>)
571
+ | (HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>);
572
+ mantineFilterCheckboxProps?:
573
+ | ((props: {
574
+ column: MRT_Column<TData, TValue>;
575
+ table: MRT_TableInstance<TData>;
576
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>)
577
+ | (HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>);
578
+ mantineFilterDateInputProps?:
579
+ | ((props: {
580
+ column: MRT_Column<TData, TValue>;
581
+ rangeFilterIndex?: number;
582
+ table: MRT_TableInstance<TData>;
583
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>)
584
+ | (HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>);
585
+ mantineFilterMultiSelectProps?:
586
+ | ((props: {
587
+ column: MRT_Column<TData, TValue>;
588
+ rangeFilterIndex?: number;
589
+ table: MRT_TableInstance<TData>;
590
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>)
591
+ | (HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>);
592
+ mantineFilterRangeSliderProps?:
593
+ | ((props: {
594
+ column: MRT_Column<TData, TValue>;
595
+ rangeFilterIndex?: number;
596
+ table: MRT_TableInstance<TData>;
597
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>)
598
+ | (HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>);
599
+ mantineFilterSelectProps?:
600
+ | ((props: {
601
+ column: MRT_Column<TData, TValue>;
602
+ rangeFilterIndex?: number;
603
+ table: MRT_TableInstance<TData>;
604
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>)
605
+ | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
606
+ mantineFilterTextInputProps?:
607
+ | ((props: {
608
+ column: MRT_Column<TData, TValue>;
609
+ rangeFilterIndex?: number;
610
+ table: MRT_TableInstance<TData>;
611
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>)
612
+ | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
613
+ mantineTableBodyCellProps?:
614
+ | ((props: {
615
+ cell: MRT_Cell<TData, TValue>;
616
+ column: MRT_Column<TData, TValue>;
617
+ renderedRowIndex?: number;
618
+ row: MRT_Row<TData>;
619
+ table: MRT_TableInstance<TData>;
620
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableTdProps)
621
+ | (HTMLPropsRef<HTMLTableCellElement> & TableTdProps);
622
+ mantineTableFooterCellProps?:
623
+ | ((props: {
624
+ column: MRT_Column<TData, TValue>;
625
+ table: MRT_TableInstance<TData>;
626
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableThProps)
627
+ | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
628
+ mantineTableHeadCellProps?:
629
+ | ((props: {
630
+ column: MRT_Column<TData, TValue>;
631
+ table: MRT_TableInstance<TData>;
632
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableThProps)
633
+ | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
634
+ PlaceholderCell?: (props: {
635
+ cell: MRT_Cell<TData, TValue>;
636
+ column: MRT_Column<TData, TValue>;
637
+ row: MRT_Row<TData>;
638
+ table: MRT_TableInstance<TData>;
639
+ }) => ReactNode;
640
+ renderColumnActionsMenuItems?: (props: {
641
+ column: MRT_Column<TData, TValue>;
642
+ internalColumnMenuItems: ReactNode;
643
+ table: MRT_TableInstance<TData>;
644
+ }) => ReactNode;
645
+ renderColumnFilterModeMenuItems?: (props: {
646
+ column: MRT_Column<TData, TValue>;
647
+ internalFilterOptions: MRT_InternalFilterOption[];
648
+ onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
649
+ table: MRT_TableInstance<TData>;
650
+ }) => ReactNode;
651
+ sortingFn?: MRT_SortingFn<TData>;
652
+ visibleInShowHideMenu?: boolean;
653
+ } & Omit<
654
+ ColumnDef<TData, TValue>,
655
+ | 'accessorKey'
656
+ | 'aggregatedCell'
657
+ | 'aggregationFn'
658
+ | 'cell'
659
+ | 'columns'
660
+ | 'filterFn'
661
+ | 'footer'
662
+ | 'header'
663
+ | 'id'
664
+ | 'sortingFn'
665
+ >;
666
+
667
+ export type MRT_DisplayColumnDef<
668
+ TData extends MRT_RowData,
669
+ TValue = unknown,
670
+ > = Omit<MRT_ColumnDef<TData, TValue>, 'accessorFn' | 'accessorKey'>;
671
+
672
+ export type MRT_GroupColumnDef<TData extends MRT_RowData> = {
673
+ columns: MRT_ColumnDef<TData>[];
674
+ } & MRT_DisplayColumnDef<TData, any>;
675
+
676
+ export type MRT_DefinedColumnDef<
677
+ TData extends MRT_RowData,
678
+ TValue = unknown,
679
+ > = {
680
+ _filterFn: MRT_FilterOption;
681
+ defaultDisplayColumn: Partial<MRT_ColumnDef<TData, TValue>>;
682
+ id: string;
683
+ } & Omit<MRT_ColumnDef<TData, TValue>, 'defaultDisplayColumn' | 'id'>;
684
+
685
+ export type MRT_Column<TData extends MRT_RowData, TValue = unknown> = {
686
+ columnDef: MRT_DefinedColumnDef<TData, TValue>;
687
+ columns?: MRT_Column<TData>[];
688
+ filterFn?: MRT_FilterFn<TData>;
689
+ footer: string;
690
+ header: string;
691
+ } & Omit<
692
+ Column<TData, MRT_CellValue>,
693
+ 'columnDef' | 'columns' | 'filterFn' | 'footer' | 'header'
694
+ >;
695
+
696
+ export type MRT_Header<TData extends MRT_RowData, TValue = unknown> = {
697
+ column: MRT_Column<TData, TValue>;
698
+ } & Omit<Header<TData, MRT_CellValue>, 'column'>;
699
+
700
+ export type MRT_HeaderGroup<TData extends MRT_RowData> = {
701
+ headers: MRT_Header<TData>[];
702
+ } & Omit<HeaderGroup<TData>, 'headers'>;
703
+
704
+ export type MRT_Row<TData extends MRT_RowData> = {
705
+ _valuesCache: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
706
+ getAllCells: () => MRT_Cell<TData>[];
707
+ getVisibleCells: () => MRT_Cell<TData>[];
708
+ subRows?: MRT_Row<TData>[];
709
+ } & Omit<
710
+ Row<TData>,
711
+ '_valuesCache' | 'getAllCells' | 'getVisibleCells' | 'subRows'
712
+ >;
713
+
714
+ export type MRT_Cell<TData extends MRT_RowData, TValue = unknown> = {
715
+ column: MRT_Column<TData, TValue>;
716
+ row: MRT_Row<TData>;
717
+ } & Omit<Cell<TData, TValue>, 'column' | 'row'>;
718
+
719
+ export type MRT_AggregationOption = keyof typeof MRT_AggregationFns & string;
720
+
721
+ export type MRT_AggregationFn<TData extends MRT_RowData> =
722
+ | AggregationFn<TData>
723
+ | MRT_AggregationOption;
724
+
725
+ export type MRT_SortingOption = LiteralUnion<
726
+ keyof typeof MRT_SortingFns & string
727
+ >;
728
+
729
+ export type MRT_SortingFn<TData extends MRT_RowData> =
730
+ | MRT_SortingOption
731
+ | SortingFn<TData>;
732
+
733
+ export type MRT_FilterOption = LiteralUnion<
734
+ keyof typeof MRT_FilterFns & string
735
+ >;
736
+
737
+ export type MRT_FilterFn<TData extends MRT_RowData> =
738
+ | FilterFn<TData>
739
+ | MRT_FilterOption;
740
+
741
+ export type MRT_FilterTooltipValueFn<TValue = any> = (value: TValue) => string;
742
+
743
+ export type MRT_InternalFilterOption = {
744
+ divider: boolean;
745
+ label: string;
746
+ option: string;
747
+ symbol: string;
748
+ };
749
+
750
+ export type MRT_DisplayColumnIds =
751
+ | 'mrt-row-actions'
752
+ | 'mrt-row-drag'
753
+ | 'mrt-row-expand'
754
+ | 'mrt-row-numbers'
755
+ | 'mrt-row-pin'
756
+ | 'mrt-row-select'
757
+ | 'mrt-row-spacer';
758
+
759
+ export type MRT_CreateTableFeature<
760
+ TData extends MRT_RowData,
761
+ TFeature = any,
762
+ > = (table: MRT_TableInstance<TData>) => TFeature;
763
+
764
+ /**
765
+ * `columns` and `data` props are the only required props, but there are over 150 other optional props.
766
+ *
767
+ * See more info on creating columns and data on the official docs site:
768
+ * @link https://www.mantine-react-table.com/docs/getting-started/usage
769
+ *
770
+ * See the full props list on the official docs site:
771
+ * @link https://www.mantine-react-table.com/docs/api/table-options
772
+ */
773
+ /**
774
+ * Props for the optional `Table.ScrollContainer` wrapper (`withScrollArea`).
775
+ * Extra `ScrollArea` props pass through to the underlying Mantine `ScrollArea`.
776
+ */
777
+ export type MRT_ScrollAreaProps = HTMLPropsRef<HTMLDivElement> &
778
+ Partial<Omit<ScrollAreaProps, 'type'>> &
779
+ Partial<TableScrollContainerProps>;
780
+
781
+ export type MRT_TableOptions<TData extends MRT_RowData> = {
782
+ columnFilterDisplayMode?: 'custom' | 'popover' | 'subheader';
783
+ columnFilterModeOptions?: Array<
784
+ LiteralUnion<MRT_FilterOption & string>
785
+ > | null;
786
+ /**
787
+ * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
788
+ *
789
+ * See more info on creating columns on the official docs site:
790
+ * @link https://www.mantine-react-table.com/docs/guides/data-columns
791
+ * @link https://www.mantine-react-table.com/docs/guides/display-columns
792
+ *
793
+ * See all Columns Options on the official docs site:
794
+ * @link https://www.mantine-react-table.com/docs/api/column-options
795
+ */
796
+ columns: MRT_ColumnDef<TData>[];
797
+ columnVirtualizerInstanceRef?: RefObject<null | Virtualizer<
798
+ HTMLDivElement,
799
+ HTMLTableCellElement
800
+ >>;
801
+ columnVirtualizerOptions?:
802
+ | ((props: {
803
+ table: MRT_TableInstance<TData>;
804
+ }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>)
805
+ | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
806
+ createDisplayMode?: 'custom' | 'modal' | 'row';
807
+ /**
808
+ * Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
809
+ *
810
+ * See the usage guide for more info on creating columns and data:
811
+ * @link https://www.mantine-react-table.com/docs/getting-started/usage
812
+ */
813
+ data: TData[];
814
+ /**
815
+ * Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
816
+ */
817
+ defaultColumn?: Partial<MRT_ColumnDef<TData>>;
818
+ /**
819
+ * Change the default options for display columns.
820
+ */
821
+ defaultDisplayColumn?: Partial<MRT_DisplayColumnDef<TData>>;
822
+ displayColumnDefOptions?: Partial<{
823
+ [key in MRT_DisplayColumnIds]: Partial<MRT_DisplayColumnDef<TData>>;
824
+ }>;
825
+ editDisplayMode?: 'cell' | 'custom' | 'modal' | 'row' | 'table';
826
+ enableBatchRowSelection?: boolean;
827
+ enableBottomToolbar?: boolean;
828
+ enableClickToCopy?: ((cell: MRT_Cell<TData>) => boolean) | boolean;
829
+ enableColumnActions?: boolean;
830
+ enableColumnDragging?: boolean;
831
+ enableColumnFilterModes?: boolean;
832
+ enableColumnOrdering?: boolean;
833
+ enableColumnVirtualization?: boolean;
834
+ enableDensityToggle?: boolean;
835
+ enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
836
+ enableExpandAll?: boolean;
837
+ enableFacetedValues?: boolean;
838
+ enableFilterMatchHighlighting?: boolean;
839
+ enableFullScreenToggle?: boolean;
840
+ enableGlobalFilterModes?: boolean;
841
+ enableGlobalFilterRankedResults?: boolean;
842
+ enableHeaderActionsHoverReveal?: boolean;
843
+ enablePagination?: boolean;
844
+ enableRowActions?: boolean;
845
+ enableRowDragging?: boolean;
846
+ enableRowNumbers?: boolean;
847
+ enableRowOrdering?: boolean;
848
+ enableRowSelection?: ((row: MRT_Row<TData>) => boolean) | boolean;
849
+ enableRowVirtualization?: boolean;
850
+ enableSelectAll?: boolean;
851
+ enableStickyFooter?: boolean;
852
+ enableStickyHeader?: boolean;
853
+ enableTableFooter?: boolean;
854
+ enableTableHead?: boolean;
855
+ enableToolbarInternalActions?: boolean;
856
+ enableTopToolbar?: boolean;
857
+ expandRowsFn?: (dataRow: TData) => TData[];
858
+ getRowId?: (
859
+ originalRow: TData,
860
+ index: number,
861
+ parentRow: MRT_Row<TData>,
862
+ ) => string | undefined;
863
+ globalFilterFn?: MRT_FilterOption;
864
+ globalFilterModeOptions?: MRT_FilterOption[] | null;
865
+ icons?: Partial<MRT_Icons>;
866
+ initialState?: Partial<MRT_TableState<TData>>;
867
+ /**
868
+ * Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
869
+ */
870
+ layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
871
+ /**
872
+ * Pass in either a locale imported from `mantine-react-table/locales/*` or a custom locale object.
873
+ *
874
+ * See the localization (i18n) guide for more info:
875
+ * @link https://www.mantine-react-table.com/docs/guides/localization
876
+ */
877
+ localization?: Partial<MRT_Localization>;
878
+ mantineBottomToolbarProps?:
879
+ | ((props: {
880
+ table: MRT_TableInstance<TData>;
881
+ }) => BoxProps & HTMLPropsRef<HTMLDivElement>)
882
+ | (BoxProps & HTMLPropsRef<HTMLDivElement>);
883
+ mantineColumnActionsButtonProps?:
884
+ | ((props: {
885
+ column: MRT_Column<TData, MRT_CellValue>;
886
+ table: MRT_TableInstance<TData>;
887
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
888
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
889
+ mantineColumnDragHandleProps?:
890
+ | ((props: {
891
+ column: MRT_Column<TData, MRT_CellValue>;
892
+ table: MRT_TableInstance<TData>;
893
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
894
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
895
+ mantineCopyButtonProps?:
896
+ | ((props: {
897
+ cell: MRT_Cell<TData, MRT_CellValue>;
898
+ column: MRT_Column<TData, MRT_CellValue>;
899
+ row: MRT_Row<TData>;
900
+ table: MRT_TableInstance<TData>;
901
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>)
902
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>);
903
+ mantineCreateRowModalProps?:
904
+ | ((props: {
905
+ row: MRT_Row<TData>;
906
+ table: MRT_TableInstance<TData>;
907
+ }) => MRT_ModalProps)
908
+ | MRT_ModalProps;
909
+ mantineDetailPanelProps?:
910
+ | ((props: {
911
+ row: MRT_Row<TData>;
912
+ table: MRT_TableInstance<TData>;
913
+ }) => BoxProps & HTMLPropsRef<HTMLTableCellElement>)
914
+ | (BoxProps & HTMLPropsRef<HTMLTableCellElement>);
915
+ mantineEditRowModalProps?:
916
+ | ((props: {
917
+ row: MRT_Row<TData>;
918
+ table: MRT_TableInstance<TData>;
919
+ }) => MRT_ModalProps)
920
+ | MRT_ModalProps;
921
+ mantineEditSelectProps?:
922
+ | ((props: {
923
+ cell: MRT_Cell<TData, MRT_CellValue>;
924
+ column: MRT_Column<TData, MRT_CellValue>;
925
+ row: MRT_Row<TData>;
926
+ table: MRT_TableInstance<TData>;
927
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>)
928
+ | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
929
+ mantineEditTextInputProps?:
930
+ | ((props: {
931
+ cell: MRT_Cell<TData, MRT_CellValue>;
932
+ column: MRT_Column<TData, MRT_CellValue>;
933
+ row: MRT_Row<TData>;
934
+ table: MRT_TableInstance<TData>;
935
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>)
936
+ | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
937
+ mantineExpandAllButtonProps?:
938
+ | ((props: {
939
+ table: MRT_TableInstance<TData>;
940
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
941
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
942
+ mantineExpandButtonProps?:
943
+ | ((props: {
944
+ renderedRowIndex?: number;
945
+ row: MRT_Row<TData>;
946
+ table: MRT_TableInstance<TData>;
947
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
948
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
949
+ mantineFilterAutocompleteProps?:
950
+ | ((props: {
951
+ column: MRT_Column<TData, MRT_CellValue>;
952
+ rangeFilterIndex?: number;
953
+ table: MRT_TableInstance<TData>;
954
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>)
955
+ | (HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>);
956
+ mantineFilterCheckboxProps?:
957
+ | ((props: {
958
+ column: MRT_Column<TData, MRT_CellValue>;
959
+ table: MRT_TableInstance<TData>;
960
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>)
961
+ | (HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>);
962
+ mantineFilterDateInputProps?:
963
+ | ((props: {
964
+ column: MRT_Column<TData, MRT_CellValue>;
965
+ rangeFilterIndex?: number;
966
+ table: MRT_TableInstance<TData>;
967
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>)
968
+ | (HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>);
969
+ mantineFilterMultiSelectProps?:
970
+ | ((props: {
971
+ column: MRT_Column<TData, MRT_CellValue>;
972
+ rangeFilterIndex?: number;
973
+ table: MRT_TableInstance<TData>;
974
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>)
975
+ | (HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>);
976
+ mantineFilterRangeSliderProps?:
977
+ | ((props: {
978
+ column: MRT_Column<TData, MRT_CellValue>;
979
+ rangeFilterIndex?: number;
980
+ table: MRT_TableInstance<TData>;
981
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>)
982
+ | (HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>);
983
+ mantineFilterSelectProps?:
984
+ | ((props: {
985
+ column: MRT_Column<TData, MRT_CellValue>;
986
+ rangeFilterIndex?: number;
987
+ table: MRT_TableInstance<TData>;
988
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>)
989
+ | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
990
+ mantineFilterTextInputProps?:
991
+ | ((props: {
992
+ column: MRT_Column<TData, MRT_CellValue>;
993
+ rangeFilterIndex?: number;
994
+ table: MRT_TableInstance<TData>;
995
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>)
996
+ | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
997
+ mantineHighlightProps?:
998
+ | ((props: {
999
+ cell: MRT_Cell<TData, MRT_CellValue>;
1000
+ column: MRT_Column<TData, MRT_CellValue>;
1001
+ row: MRT_Row<TData>;
1002
+ table: MRT_TableInstance<TData>;
1003
+ }) => HTMLPropsRef<HTMLSpanElement> & Partial<HighlightProps>)
1004
+ | (HTMLPropsRef<HTMLSpanElement> & Partial<HighlightProps>);
1005
+ mantineLoadingOverlayProps?:
1006
+ | ((props: {
1007
+ table: MRT_TableInstance<TData>;
1008
+ }) => HTMLPropsRef<HTMLDivElement> & Partial<LoadingOverlayProps>)
1009
+ | (HTMLPropsRef<HTMLDivElement> & Partial<LoadingOverlayProps>);
1010
+ mantinePaginationProps?:
1011
+ | ((props: {
1012
+ table: MRT_TableInstance<TData>;
1013
+ }) => Partial<HTMLPropsRef<HTMLDivElement> & MRT_PaginationProps>)
1014
+ | Partial<HTMLPropsRef<HTMLDivElement> & MRT_PaginationProps>;
1015
+ mantinePaperProps?:
1016
+ | ((props: {
1017
+ table: MRT_TableInstance<TData>;
1018
+ }) => HTMLPropsRef<HTMLDivElement> & PaperProps)
1019
+ | (HTMLPropsRef<HTMLDivElement> & PaperProps);
1020
+ mantineProgressProps?:
1021
+ | ((props: {
1022
+ isTopToolbar: boolean;
1023
+ table: MRT_TableInstance<TData>;
1024
+ }) => HTMLPropsRef<HTMLDivElement> & Partial<ProgressProps>)
1025
+ | (HTMLPropsRef<HTMLDivElement> & Partial<ProgressProps>);
1026
+ mantineRowDragHandleProps?:
1027
+ | ((props: {
1028
+ row: MRT_Row<TData>;
1029
+ table: MRT_TableInstance<TData>;
1030
+ }) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>)
1031
+ | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
1032
+ mantineScrollAreaProps?:
1033
+ | ((props: { table: MRT_TableInstance<TData> }) => MRT_ScrollAreaProps)
1034
+ | MRT_ScrollAreaProps;
1035
+ mantineSearchTextInputProps?:
1036
+ | ((props: {
1037
+ table: MRT_TableInstance<TData>;
1038
+ }) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>)
1039
+ | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
1040
+ mantineSelectAllCheckboxProps?:
1041
+ | ((CheckboxProps | RadioProps | SwitchProps) &
1042
+ HTMLPropsRef<HTMLInputElement>)
1043
+ | ((props: {
1044
+ table: MRT_TableInstance<TData>;
1045
+ }) => (CheckboxProps | RadioProps | SwitchProps) &
1046
+ HTMLPropsRef<HTMLInputElement>);
1047
+ mantineSelectCheckboxProps?:
1048
+ | ((CheckboxProps | RadioProps | SwitchProps) &
1049
+ HTMLPropsRef<HTMLInputElement>)
1050
+ | ((props: {
1051
+ renderedRowIndex?: number;
1052
+ row: MRT_Row<TData>;
1053
+ table: MRT_TableInstance<TData>;
1054
+ }) => (CheckboxProps | RadioProps | SwitchProps) &
1055
+ HTMLPropsRef<HTMLInputElement>);
1056
+ mantineSkeletonProps?:
1057
+ | ((props: {
1058
+ cell: MRT_Cell<TData, MRT_CellValue>;
1059
+ column: MRT_Column<TData, MRT_CellValue>;
1060
+ row: MRT_Row<TData>;
1061
+ table: MRT_TableInstance<TData>;
1062
+ }) => HTMLPropsRef<HTMLDivElement> & SkeletonProps)
1063
+ | (HTMLPropsRef<HTMLDivElement> & SkeletonProps);
1064
+ mantineTableBodyCellProps?:
1065
+ | ((props: {
1066
+ cell: MRT_Cell<TData, MRT_CellValue>;
1067
+ column: MRT_Column<TData, MRT_CellValue>;
1068
+ renderedColumnIndex?: number;
1069
+ renderedRowIndex?: number;
1070
+ row: MRT_Row<TData>;
1071
+ table: MRT_TableInstance<TData>;
1072
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableTdProps)
1073
+ | (HTMLPropsRef<HTMLTableCellElement> & TableTdProps);
1074
+ mantineTableBodyProps?:
1075
+ | ((props: {
1076
+ table: MRT_TableInstance<TData>;
1077
+ }) => HTMLPropsRef<HTMLTableSectionElement> & TableTbodyProps)
1078
+ | (HTMLPropsRef<HTMLTableSectionElement> & TableTbodyProps);
1079
+ mantineTableBodyRowProps?:
1080
+ | ((props: {
1081
+ isDetailPanel?: boolean;
1082
+ renderedRowIndex?: number;
1083
+ row: MRT_Row<TData>;
1084
+ table: MRT_TableInstance<TData>;
1085
+ }) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps)
1086
+ | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
1087
+ mantineTableContainerProps?:
1088
+ | ((props: {
1089
+ table: MRT_TableInstance<TData>;
1090
+ }) => BoxProps & HTMLPropsRef<HTMLDivElement>)
1091
+ | (BoxProps & HTMLPropsRef<HTMLDivElement>);
1092
+ mantineTableFooterCellProps?:
1093
+ | ((props: {
1094
+ column: MRT_Column<TData, MRT_CellValue>;
1095
+ table: MRT_TableInstance<TData>;
1096
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableThProps)
1097
+ | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
1098
+ mantineTableFooterProps?:
1099
+ | ((props: {
1100
+ table: MRT_TableInstance<TData>;
1101
+ }) => HTMLPropsRef<HTMLTableSectionElement> & TableTfootProps)
1102
+ | (HTMLPropsRef<HTMLTableSectionElement> & TableTfootProps);
1103
+ mantineTableFooterRowProps?:
1104
+ | ((props: {
1105
+ footerGroup: MRT_HeaderGroup<TData>;
1106
+ table: MRT_TableInstance<TData>;
1107
+ }) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps)
1108
+ | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
1109
+ mantineTableHeadCellProps?:
1110
+ | ((props: {
1111
+ column: MRT_Column<TData, MRT_CellValue>;
1112
+ table: MRT_TableInstance<TData>;
1113
+ }) => HTMLPropsRef<HTMLTableCellElement> & TableThProps)
1114
+ | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
1115
+ mantineTableHeadProps?:
1116
+ | ((props: {
1117
+ table: MRT_TableInstance<TData>;
1118
+ }) => HTMLPropsRef<HTMLTableSectionElement> & TableTheadProps)
1119
+ | (HTMLPropsRef<HTMLTableSectionElement> & TableTheadProps);
1120
+ mantineTableHeadRowProps?:
1121
+ | ((props: {
1122
+ headerGroup: MRT_HeaderGroup<TData>;
1123
+ table: MRT_TableInstance<TData>;
1124
+ }) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps)
1125
+ | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
1126
+ mantineTableProps?:
1127
+ | ((props: {
1128
+ table: MRT_TableInstance<TData>;
1129
+ }) => HTMLPropsRef<HTMLTableElement> & TableProps)
1130
+ | (HTMLPropsRef<HTMLTableElement> & TableProps);
1131
+ mantineToolbarAlertBannerBadgeProps?:
1132
+ | ((props: {
1133
+ table: MRT_TableInstance<TData>;
1134
+ }) => HTMLPropsRef<HTMLDivElement> & Partial<BadgeProps>)
1135
+ | (HTMLPropsRef<HTMLDivElement> & Partial<BadgeProps>);
1136
+ mantineToolbarAlertBannerProps?:
1137
+ | ((props: {
1138
+ table: MRT_TableInstance<TData>;
1139
+ }) => HTMLPropsRef<HTMLDivElement> & Partial<AlertProps>)
1140
+ | (HTMLPropsRef<HTMLDivElement> & Partial<AlertProps>);
1141
+ mantineTopToolbarProps?:
1142
+ | ((props: {
1143
+ table: MRT_TableInstance<TData>;
1144
+ }) => BoxProps & HTMLPropsRef<HTMLDivElement>)
1145
+ | (BoxProps & HTMLPropsRef<HTMLDivElement>);
1146
+ /**
1147
+ * Memoize cells, rows, or the entire table body to potentially improve render performance.
1148
+ *
1149
+ * @warning This will break some dynamic rendering features. See the memoization guide for more info:
1150
+ * @link https://www.mantine-react-table.com/docs/guides/memoize-components
1151
+ */
1152
+ memoMode?: 'cells' | 'rows' | 'table-body';
1153
+ onColumnFilterFnsChange?: OnChangeFn<{ [key: string]: MRT_FilterOption }>;
1154
+ onCreatingRowCancel?: (props: {
1155
+ row: MRT_Row<TData>;
1156
+ table: MRT_TableInstance<TData>;
1157
+ }) => void;
1158
+ onCreatingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
1159
+ onCreatingRowSave?: (props: {
1160
+ exitCreatingMode: () => void;
1161
+ row: MRT_Row<TData>;
1162
+ table: MRT_TableInstance<TData>;
1163
+ values: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
1164
+ }) => void;
1165
+ onDensityChange?: OnChangeFn<MRT_DensityState>;
1166
+ onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
1167
+ onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
1168
+ onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
1169
+ onEditingRowCancel?: (props: {
1170
+ row: MRT_Row<TData>;
1171
+ table: MRT_TableInstance<TData>;
1172
+ }) => void;
1173
+ onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
1174
+ onEditingRowSave?: (props: {
1175
+ exitEditingMode: () => void;
1176
+ row: MRT_Row<TData>;
1177
+ table: MRT_TableInstance<TData>;
1178
+ values: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
1179
+ }) => Promise<void> | void;
1180
+ onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
1181
+ onHoveredColumnChange?: OnChangeFn<null | Partial<MRT_Column<TData>>>;
1182
+ onHoveredRowChange?: OnChangeFn<null | Partial<MRT_Row<TData>>>;
1183
+ onIsFullScreenChange?: OnChangeFn<boolean>;
1184
+ onShowAlertBannerChange?: OnChangeFn<boolean>;
1185
+ onShowColumnFiltersChange?: OnChangeFn<boolean>;
1186
+ onShowGlobalFilterChange?: OnChangeFn<boolean>;
1187
+ onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
1188
+ paginationDisplayMode?: 'custom' | 'default' | 'pages';
1189
+ positionActionsColumn?: 'first' | 'last';
1190
+ positionCreatingRow?: 'bottom' | 'top' | number;
1191
+ positionExpandColumn?: 'first' | 'last';
1192
+ positionGlobalFilter?: 'left' | 'none' | 'right';
1193
+ positionPagination?: 'both' | 'bottom' | 'none' | 'top';
1194
+ positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
1195
+ positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
1196
+ renderBottomToolbar?:
1197
+ | ((props: { table: MRT_TableInstance<TData> }) => ReactNode)
1198
+ | ReactNode;
1199
+ renderBottomToolbarCustomActions?: (props: {
1200
+ table: MRT_TableInstance<TData>;
1201
+ }) => ReactNode;
1202
+ renderColumnActionsMenuItems?: (props: {
1203
+ column: MRT_Column<TData, MRT_CellValue>;
1204
+ internalColumnMenuItems: ReactNode;
1205
+ table: MRT_TableInstance<TData>;
1206
+ }) => ReactNode;
1207
+ renderColumnFilterModeMenuItems?: (props: {
1208
+ column: MRT_Column<TData, MRT_CellValue>;
1209
+ internalFilterOptions: MRT_InternalFilterOption[];
1210
+ onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
1211
+ table: MRT_TableInstance<TData>;
1212
+ }) => ReactNode;
1213
+ renderCreateRowModalContent?: (props: {
1214
+ internalEditComponents: ReactNode[];
1215
+ row: MRT_Row<TData>;
1216
+ table: MRT_TableInstance<TData>;
1217
+ }) => ReactNode;
1218
+ renderDetailPanel?: (props: {
1219
+ internalEditComponents: ReactNode[];
1220
+ row: MRT_Row<TData>;
1221
+ table: MRT_TableInstance<TData>;
1222
+ }) => ReactNode;
1223
+ renderEditRowModalContent?: (props: {
1224
+ internalEditComponents: ReactNode[];
1225
+ row: MRT_Row<TData>;
1226
+ table: MRT_TableInstance<TData>;
1227
+ }) => ReactNode;
1228
+ renderEmptyRowsFallback?: (props: {
1229
+ table: MRT_TableInstance<TData>;
1230
+ }) => ReactNode;
1231
+ renderGlobalFilterModeMenuItems?: (props: {
1232
+ internalFilterOptions: MRT_InternalFilterOption[];
1233
+ onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
1234
+ table: MRT_TableInstance<TData>;
1235
+ }) => ReactNode;
1236
+ renderRowActionMenuItems?: (props: {
1237
+ renderedRowIndex?: number;
1238
+ row: MRT_Row<TData>;
1239
+ table: MRT_TableInstance<TData>;
1240
+ }) => ReactNode;
1241
+ renderRowActions?: (props: {
1242
+ cell: MRT_Cell<TData, MRT_CellValue>;
1243
+ renderedRowIndex?: number;
1244
+ row: MRT_Row<TData>;
1245
+ table: MRT_TableInstance<TData>;
1246
+ }) => ReactNode;
1247
+ renderToolbarAlertBannerContent?: (props: {
1248
+ groupedAlert: null | ReactNode;
1249
+ selectedAlert: null | ReactNode;
1250
+ table: MRT_TableInstance<TData>;
1251
+ }) => ReactNode;
1252
+ renderToolbarInternalActions?: (props: {
1253
+ table: MRT_TableInstance<TData>;
1254
+ }) => ReactNode;
1255
+ renderTopToolbar?:
1256
+ | ((props: { table: MRT_TableInstance<TData> }) => ReactNode)
1257
+ | ReactNode;
1258
+ renderTopToolbarCustomActions?: (props: {
1259
+ table: MRT_TableInstance<TData>;
1260
+ }) => ReactNode;
1261
+ rowCount?: number;
1262
+ rowNumberDisplayMode?: 'original' | 'static';
1263
+ rowPinningDisplayMode?:
1264
+ | 'bottom'
1265
+ | 'select-bottom'
1266
+ | 'select-sticky'
1267
+ | 'select-top'
1268
+ | 'sticky'
1269
+ | 'top'
1270
+ | 'top-and-bottom';
1271
+ rowVirtualizerInstanceRef?: RefObject<null | Virtualizer<
1272
+ HTMLDivElement,
1273
+ HTMLTableRowElement
1274
+ >>;
1275
+ rowVirtualizerOptions?:
1276
+ | ((props: {
1277
+ table: MRT_TableInstance<TData>;
1278
+ }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>)
1279
+ | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>;
1280
+ selectAllMode?: 'all' | 'page';
1281
+ selectDisplayMode?: 'checkbox' | 'radio' | 'switch';
1282
+ /**
1283
+ * Manage state externally any way you want, then pass it back into MRT.
1284
+ */
1285
+ state?: Partial<MRT_TableState<TData>>;
1286
+ withScrollArea?: boolean;
1287
+ } & Omit<
1288
+ Partial<TableOptions<TData>>,
1289
+ | 'columns'
1290
+ | 'data'
1291
+ | 'defaultColumn'
1292
+ | 'enableRowSelection'
1293
+ | 'expandRowsFn'
1294
+ | 'getRowId'
1295
+ | 'globalFilterFn'
1296
+ | 'initialState'
1297
+ | 'onStateChange'
1298
+ | 'state'
1299
+ >;