@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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Kevin Vandy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,217 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Mantine React Table NG
2
+
3
+ `@careharmony/mantine-react-table-ng` is a maintained fork of [Mantine React Table](https://github.com/KevinVandy/mantine-react-table) for **React 19**, **Mantine 9** and the **React Compiler**.
4
+
5
+ <a href="https://npmjs.com/package/@careharmony/mantine-react-table-ng" target="_blank">
6
+ <img alt="" src="https://badgen.net/npm/v/@careharmony/mantine-react-table-ng?color=blue" />
7
+ </a>
8
+ <a href="https://github.com/CareHarmony/mantine-react-table/blob/v4/LICENSE" target="_blank">
9
+ <img alt="" src="https://badgen.net/github/license/CareHarmony/mantine-react-table?color=blue" />
10
+ </a>
11
+
12
+ ## About
13
+
14
+ ### _Quickly Create React Data Tables with Mantine_
15
+
16
+ ### __Built with [Mantine <sup>V9</sup>](https://mantine.dev/) and [TanStack Table <sup>V8</sup>](https://tanstack.com/table/v8)__
17
+
18
+ ## Compatibility
19
+
20
+ | Package | Supported versions |
21
+ | --- | --- |
22
+ | `react`, `react-dom` | `>=19.2.0` |
23
+ | `@mantine/core`, `@mantine/dates`, `@mantine/hooks` | `>=9.0.0` |
24
+ | `@tabler/icons-react` | `>=2.23.0` |
25
+ | `dayjs` | `>=1.11` |
26
+ | `clsx` | `>=2` |
27
+
28
+ Use the original [`mantine-react-table`](https://npmjs.com/package/mantine-react-table) for Mantine 7 or React 18.
29
+
30
+ ## Migrating from `mantine-react-table` v2
31
+
32
+ 1. Replace the dependency: `npm uninstall mantine-react-table && npm install @careharmony/mantine-react-table-ng`.
33
+ 2. Replace the import specifier `mantine-react-table` with `@careharmony/mantine-react-table-ng`, including `/styles.css` and `/locales/*`.
34
+ 3. Remove every `'use no memo'` directive that was added only for Mantine React Table.
35
+
36
+ Behavior changes from `2.0.0-beta.9`:
37
+
38
+ - `useMantineReactTable` returns a new `table` reference whenever table state or table options change. Every reference reads the same live table, so an old reference is never stale. An effect that lists `table` as a dependency now runs on those changes.
39
+ - `memoMode: 'rows'` re-renders rows when table state changes. The old comparator ignored row selection.
40
+ - The empty-table placeholder row no longer renders an expand button or a detail panel. Use `renderEmptyRowsFallback` for empty-state content.
41
+ - `globalFilterModeOptions` replaces the default global filter mode list.
42
+ - A column takes part in the global filter when any row has a string or number value. TanStack Table only checked the first row.
43
+ - Pinned columns use logical CSS offsets, so pinning follows `dir="rtl"`.
44
+
45
+ ## React Compiler
46
+
47
+ Application code that uses this package can be compiled by the [React Compiler](https://react.dev/learn/react-compiler) without `'use no memo'`.
48
+
49
+ - The `table` reference changes when table state or options change, so compiled components and memoized JSX see the update.
50
+ - Read table data through the table: `table.getState()`, `table.getSelectedRowModel()`, `table.getRowModel()`.
51
+ - The package opts its own source and bundles out of the compiler with `'use no memo'`, because TanStack Table v8 rows, cells and columns are mutable instances.
52
+ - A compiled component that receives only a `row`, `cell` or `column` and stores a method result in `useMemo` keyed on that object can hold a stale value. Pass `table` to that component and include it in the dependency list.
53
+
54
+ The test suite runs in four modes: no compiler, compiler on consumer code, compiler on library source, and compiler on the built bundle.
55
+
56
+ ```bash
57
+ pnpm test:all
58
+ ```
59
+
60
+ ## Learn More
61
+
62
+ - Join the [Discord](https://discord.gg/5wqyRx6fnm) server to join in on the development discussion or ask questions
63
+ - View the [Docs Website](https://www.mantine-react-table.com/)
64
+ - See all [Props, Options, and APIs](https://www.mantine-react-table.com/docs/api)
65
+
66
+ ### Quick Examples
67
+
68
+ - [Basic Table](https://www.mantine-react-table.com/docs/examples/basic/) (See Default Features)
69
+ - [Minimal Table](https://www.mantine-react-table.com/docs/examples/minimal/) (Turn off Features like Pagination, Sorting, Filtering, and Toolbars)
70
+ - [Advanced Table](https://www.mantine-react-table.com/docs/examples/advanced/) (See some of the Advanced Features)
71
+ - [Aggregation/Grouping](https://www.mantine-react-table.com/docs/examples/aggregation-and-grouping/) (Aggregation features such as Sum, Average, Count, etc.)
72
+ - [Data Export Table](https://www.mantine-react-table.com/docs/examples/data-export/) (Export to CSV, Excel, etc.)
73
+ - [Editing CRUD Table](https://www.mantine-react-table.com/docs/examples/editing-crud/) (Create, Edit, and Delete Rows)
74
+ - [Remote Data](https://www.mantine-react-table.com/docs/examples/remote/) (Server-side Pagination, Sorting, and Filtering)
75
+ - [React Query](https://www.mantine-react-table.com/docs/examples/react-query/) (Server-side Pagination, Sorting, and Filtering, simplified)
76
+ - [Virtualized Rows](https://www.mantine-react-table.com/docs/examples/virtualized/) (10,000 rows at once!)
77
+ - [Infinite Scrolling](https://www.mantine-react-table.com/docs/examples/infinite-scrolling/) (Fetch data as you scroll)
78
+ - [Localization (i18n)](https://www.mantine-react-table.com/docs/guides/localization#built-in-locale-examples) (Over a dozen languages built-in)
79
+
80
+ View additional [storybook examples](https://www.mantine-react-table.dev/)
81
+
82
+ ## Features
83
+
84
+ _All features can easily be enabled/disabled_
85
+
86
+ _**Fully Fleshed out [Docs](https://www.mantine-react-table.com/docs/guides#guides) are available for all features**_
87
+
88
+ - [x] < 44kb gzipped - [Bundlephobia](https://bundlephobia.com/package/mantine-react-table)
89
+ - [x] Advanced TypeScript Generics Support (TypeScript Optional)
90
+ - [x] Aggregation and Grouping (Sum, Average, Count, etc.)
91
+ - [x] Click To Copy Cell Values
92
+ - [x] Column Action Dropdown Menu
93
+ - [x] Column Hiding
94
+ - [x] Column Ordering via Drag'n'Drop
95
+ - [x] Column Pinning (Freeze Columns)
96
+ - [x] Column Resizing
97
+ - [x] Customize Icons
98
+ - [x] Customize Styling of internal Mantine Components
99
+ - [x] Data Editing (4 different editing modes)
100
+ - [x] Density Toggle
101
+ - [x] Detail Panels (Expansion)
102
+ - [x] Filtering (supports client-side and server-side)
103
+ - [x] Filter Match Highlighting
104
+ - [x] Full Screen Mode
105
+ - [x] Global Filtering (Search across all columns, rank by best match)
106
+ - [x] Header Groups & Footers
107
+ - [x] Localization (i18n) support
108
+ - [x] Manage your own state or let the table manage it internally for you
109
+ - [x] Pagination (supports client-side and server-side)
110
+ - [x] Row Actions (Your Custom Action Buttons)
111
+ - [x] Row Numbers
112
+ - [x] Row Ordering via Drag'n'Drop
113
+ - [x] Row Selection (Checkboxes)
114
+ - [x] SSR compatible
115
+ - [x] Sorting (supports client-side and server-side)
116
+ - [x] Theming (Respects your Mantine Theme)
117
+ - [x] Toolbars (Add your own action buttons)
118
+ - [x] Tree Data / Expanding Sub-rows
119
+ - [x] Virtualization (@tanstack/react-virtual)
120
+
121
+ ## Getting Started
122
+
123
+ ### Installation
124
+
125
+ View the full [Installation Docs](https://www.mantine-react-table.com/docs/getting-started/install)
126
+
127
+ 1. Ensure that you have React 19.2 or later installed
128
+
129
+ 2. Install Peer Dependencies (Mantine V9 and Tabler Icons)
130
+
131
+ ```bash
132
+ npm install @mantine/core @mantine/hooks @mantine/dates @tabler/icons-react dayjs clsx
133
+ ```
134
+
135
+ 3. Install @careharmony/mantine-react-table-ng
136
+
137
+ ```bash
138
+ npm install @careharmony/mantine-react-table-ng
139
+ ```
140
+
141
+ > _`@tanstack/react-table`, `@tanstack/react-virtual`, `@tanstack/match-sorter-utils`,_ are internal dependencies, so you do NOT need to install them yourself.
142
+
143
+ ### Usage
144
+
145
+ > Read the full usage docs [here](https://www.mantine-react-table.com/docs/getting-started/usage/)
146
+
147
+ ```jsx
148
+ import { useMemo, useState, useEffect } from 'react';
149
+ import '@mantine/core/styles.css';
150
+ import '@mantine/dates/styles.css';
151
+ import '@careharmony/mantine-react-table-ng/styles.css';
152
+ import { MantineReactTable, useMantineReactTable } from '@careharmony/mantine-react-table-ng';
153
+
154
+ const data = [
155
+ {
156
+ name: 'John',
157
+ age: 30,
158
+ },
159
+ {
160
+ name: 'Sara',
161
+ age: 25,
162
+ },
163
+ ]
164
+
165
+ export default function App() {
166
+ const columns = useMemo(
167
+ () => [
168
+ {
169
+ accessorKey: 'name', //simple recommended way to define a column
170
+ header: 'Name',
171
+ mantineTableHeadCellProps: { style: { color: 'green' } }, //optional custom props
172
+ Cell: ({ cell }) => <span>{cell.getValue()}</span>, //optional custom cell render
173
+ },
174
+ {
175
+ accessorFn: (row) => row.age, //alternate way
176
+ id: 'age', //id required if you use accessorFn instead of accessorKey
177
+ header: 'Age',
178
+ Header: () => <i>Age</i>, //optional custom header render
179
+ },
180
+ ],
181
+ [],
182
+ );
183
+
184
+ //optionally, you can manage any/all of the table state yourself
185
+ const [rowSelection, setRowSelection] = useState({});
186
+
187
+ useEffect(() => {
188
+ //do something when the row selection changes
189
+ }, [rowSelection]);
190
+
191
+ const table = useMantineReactTable({
192
+ columns,
193
+ data,
194
+ enableColumnOrdering: true, //enable some features
195
+ enableRowSelection: true,
196
+ enablePagination: false, //disable a default feature
197
+ onRowSelectionChange: setRowSelection, //hoist row selection state to your state
198
+ state: { rowSelection },
199
+ });
200
+
201
+ return <MantineReactTable table={table} />;
202
+ }
203
+ ```
204
+
205
+ _Open in [Code Sandbox](https://codesandbox.io/s/simple-mantine-react-table-example-t5c3ji)_
206
+
207
+ ## Contributors
208
+
209
+ <a href="https://github.com/kevinvandy/mantine-react-table/graphs/contributors">
210
+ <img src="https://contrib.rocks/image?repo=kevinvandy/mantine-react-table" />
211
+ </a>
212
+
213
+ PRs are Welcome, but please discuss in [GitHub Discussions](https://github.com/KevinVandy/mantine-react-table/discussions) or the [Discord Server](https://discord.gg/5wqyRx6fnm) first if it is a large change!
214
+
215
+ Read the [Contributing Guide](https://github.com/KevinVandy/mantine-react-table/blob/v2/CONTRIBUTING.md) to learn how to run this project locally.
216
+
217
+ <!-- Use the FORCE Luke! -->