@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.
- package/LICENSE +21 -0
- package/README.md +217 -3
- package/dist/index.cjs +4023 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1488 -0
- package/dist/index.esm.d.mts +1488 -0
- package/dist/index.esm.mjs +3909 -0
- package/dist/index.esm.mjs.map +1 -0
- package/locales/ar/index.cjs +97 -0
- package/locales/ar/index.d.cts +3 -0
- package/locales/ar/index.esm.d.mts +3 -0
- package/locales/ar/index.esm.mjs +95 -0
- package/locales/ar/package.json +19 -0
- package/locales/az/index.cjs +97 -0
- package/locales/az/index.d.cts +3 -0
- package/locales/az/index.esm.d.mts +3 -0
- package/locales/az/index.esm.mjs +95 -0
- package/locales/az/package.json +19 -0
- package/locales/bg/index.cjs +97 -0
- package/locales/bg/index.d.cts +3 -0
- package/locales/bg/index.esm.d.mts +3 -0
- package/locales/bg/index.esm.mjs +95 -0
- package/locales/bg/package.json +19 -0
- package/locales/cs/index.cjs +97 -0
- package/locales/cs/index.d.cts +3 -0
- package/locales/cs/index.esm.d.mts +3 -0
- package/locales/cs/index.esm.mjs +95 -0
- package/locales/cs/package.json +19 -0
- package/locales/da/index.cjs +97 -0
- package/locales/da/index.d.cts +3 -0
- package/locales/da/index.esm.d.mts +3 -0
- package/locales/da/index.esm.mjs +95 -0
- package/locales/da/package.json +19 -0
- package/locales/de/index.cjs +97 -0
- package/locales/de/index.d.cts +3 -0
- package/locales/de/index.esm.d.mts +3 -0
- package/locales/de/index.esm.mjs +95 -0
- package/locales/de/package.json +19 -0
- package/locales/el/index.cjs +97 -0
- package/locales/el/index.d.cts +3 -0
- package/locales/el/index.esm.d.mts +3 -0
- package/locales/el/index.esm.mjs +95 -0
- package/locales/el/package.json +19 -0
- package/locales/en/index.cjs +97 -0
- package/locales/en/index.d.cts +3 -0
- package/locales/en/index.esm.d.mts +3 -0
- package/locales/en/index.esm.mjs +95 -0
- package/locales/en/package.json +19 -0
- package/locales/es/index.cjs +97 -0
- package/locales/es/index.d.cts +3 -0
- package/locales/es/index.esm.d.mts +3 -0
- package/locales/es/index.esm.mjs +95 -0
- package/locales/es/package.json +19 -0
- package/locales/et/index.cjs +97 -0
- package/locales/et/index.d.cts +3 -0
- package/locales/et/index.esm.d.mts +3 -0
- package/locales/et/index.esm.mjs +95 -0
- package/locales/et/package.json +19 -0
- package/locales/fa/index.cjs +97 -0
- package/locales/fa/index.d.cts +3 -0
- package/locales/fa/index.esm.d.mts +3 -0
- package/locales/fa/index.esm.mjs +95 -0
- package/locales/fa/package.json +19 -0
- package/locales/fi/index.cjs +97 -0
- package/locales/fi/index.d.cts +3 -0
- package/locales/fi/index.esm.d.mts +3 -0
- package/locales/fi/index.esm.mjs +95 -0
- package/locales/fi/package.json +19 -0
- package/locales/fr/index.cjs +97 -0
- package/locales/fr/index.d.cts +3 -0
- package/locales/fr/index.esm.d.mts +3 -0
- package/locales/fr/index.esm.mjs +95 -0
- package/locales/fr/package.json +19 -0
- package/locales/he/index.cjs +97 -0
- package/locales/he/index.d.cts +3 -0
- package/locales/he/index.esm.d.mts +3 -0
- package/locales/he/index.esm.mjs +95 -0
- package/locales/he/package.json +19 -0
- package/locales/hr/index.cjs +97 -0
- package/locales/hr/index.d.cts +3 -0
- package/locales/hr/index.esm.d.mts +3 -0
- package/locales/hr/index.esm.mjs +95 -0
- package/locales/hr/package.json +19 -0
- package/locales/hu/index.cjs +97 -0
- package/locales/hu/index.d.cts +3 -0
- package/locales/hu/index.esm.d.mts +3 -0
- package/locales/hu/index.esm.mjs +95 -0
- package/locales/hu/package.json +19 -0
- package/locales/hy/index.cjs +97 -0
- package/locales/hy/index.d.cts +3 -0
- package/locales/hy/index.esm.d.mts +3 -0
- package/locales/hy/index.esm.mjs +95 -0
- package/locales/hy/package.json +19 -0
- package/locales/id/index.cjs +97 -0
- package/locales/id/index.d.cts +3 -0
- package/locales/id/index.esm.d.mts +3 -0
- package/locales/id/index.esm.mjs +95 -0
- package/locales/id/package.json +19 -0
- package/locales/it/index.cjs +97 -0
- package/locales/it/index.d.cts +3 -0
- package/locales/it/index.esm.d.mts +3 -0
- package/locales/it/index.esm.mjs +95 -0
- package/locales/it/package.json +19 -0
- package/locales/ja/index.cjs +97 -0
- package/locales/ja/index.d.cts +3 -0
- package/locales/ja/index.esm.d.mts +3 -0
- package/locales/ja/index.esm.mjs +95 -0
- package/locales/ja/package.json +19 -0
- package/locales/ko/index.cjs +97 -0
- package/locales/ko/index.d.cts +3 -0
- package/locales/ko/index.esm.d.mts +3 -0
- package/locales/ko/index.esm.mjs +95 -0
- package/locales/ko/package.json +19 -0
- package/locales/nl/index.cjs +97 -0
- package/locales/nl/index.d.cts +3 -0
- package/locales/nl/index.esm.d.mts +3 -0
- package/locales/nl/index.esm.mjs +95 -0
- package/locales/nl/package.json +19 -0
- package/locales/no/index.cjs +97 -0
- package/locales/no/index.d.cts +3 -0
- package/locales/no/index.esm.d.mts +3 -0
- package/locales/no/index.esm.mjs +95 -0
- package/locales/no/package.json +19 -0
- package/locales/np/index.cjs +97 -0
- package/locales/np/index.d.cts +3 -0
- package/locales/np/index.esm.d.mts +3 -0
- package/locales/np/index.esm.mjs +95 -0
- package/locales/np/package.json +19 -0
- package/locales/pl/index.cjs +97 -0
- package/locales/pl/index.d.cts +3 -0
- package/locales/pl/index.esm.d.mts +3 -0
- package/locales/pl/index.esm.mjs +95 -0
- package/locales/pl/package.json +19 -0
- package/locales/pt/index.cjs +97 -0
- package/locales/pt/index.d.cts +3 -0
- package/locales/pt/index.esm.d.mts +3 -0
- package/locales/pt/index.esm.mjs +95 -0
- package/locales/pt/package.json +19 -0
- package/locales/pt-BR/index.cjs +97 -0
- package/locales/pt-BR/index.d.cts +3 -0
- package/locales/pt-BR/index.esm.d.mts +3 -0
- package/locales/pt-BR/index.esm.mjs +95 -0
- package/locales/pt-BR/package.json +19 -0
- package/locales/ro/index.cjs +97 -0
- package/locales/ro/index.d.cts +3 -0
- package/locales/ro/index.esm.d.mts +3 -0
- package/locales/ro/index.esm.mjs +95 -0
- package/locales/ro/package.json +19 -0
- package/locales/ru/index.cjs +97 -0
- package/locales/ru/index.d.cts +3 -0
- package/locales/ru/index.esm.d.mts +3 -0
- package/locales/ru/index.esm.mjs +95 -0
- package/locales/ru/package.json +19 -0
- package/locales/sk/index.cjs +97 -0
- package/locales/sk/index.d.cts +3 -0
- package/locales/sk/index.esm.d.mts +3 -0
- package/locales/sk/index.esm.mjs +95 -0
- package/locales/sk/package.json +19 -0
- package/locales/sr-Cyrl-RS/index.cjs +97 -0
- package/locales/sr-Cyrl-RS/index.d.cts +3 -0
- package/locales/sr-Cyrl-RS/index.esm.d.mts +3 -0
- package/locales/sr-Cyrl-RS/index.esm.mjs +95 -0
- package/locales/sr-Cyrl-RS/package.json +19 -0
- package/locales/sr-Latn-RS/index.cjs +97 -0
- package/locales/sr-Latn-RS/index.d.cts +3 -0
- package/locales/sr-Latn-RS/index.esm.d.mts +3 -0
- package/locales/sr-Latn-RS/index.esm.mjs +95 -0
- package/locales/sr-Latn-RS/package.json +19 -0
- package/locales/sv/index.cjs +97 -0
- package/locales/sv/index.d.cts +3 -0
- package/locales/sv/index.esm.d.mts +3 -0
- package/locales/sv/index.esm.mjs +95 -0
- package/locales/sv/package.json +19 -0
- package/locales/th/index.cjs +97 -0
- package/locales/th/index.d.cts +3 -0
- package/locales/th/index.esm.d.mts +3 -0
- package/locales/th/index.esm.mjs +95 -0
- package/locales/th/package.json +19 -0
- package/locales/tr/index.cjs +97 -0
- package/locales/tr/index.d.cts +3 -0
- package/locales/tr/index.esm.d.mts +3 -0
- package/locales/tr/index.esm.mjs +95 -0
- package/locales/tr/package.json +19 -0
- package/locales/uk/index.cjs +97 -0
- package/locales/uk/index.d.cts +3 -0
- package/locales/uk/index.esm.d.mts +3 -0
- package/locales/uk/index.esm.mjs +95 -0
- package/locales/uk/package.json +19 -0
- package/locales/vi/index.cjs +97 -0
- package/locales/vi/index.d.cts +3 -0
- package/locales/vi/index.esm.d.mts +3 -0
- package/locales/vi/index.esm.mjs +95 -0
- package/locales/vi/package.json +19 -0
- package/locales/zh-Hans/index.cjs +97 -0
- package/locales/zh-Hans/index.d.cts +3 -0
- package/locales/zh-Hans/index.esm.d.mts +3 -0
- package/locales/zh-Hans/index.esm.mjs +95 -0
- package/locales/zh-Hans/package.json +19 -0
- package/locales/zh-Hant/index.cjs +97 -0
- package/locales/zh-Hant/index.d.cts +3 -0
- package/locales/zh-Hant/index.esm.d.mts +3 -0
- package/locales/zh-Hant/index.esm.mjs +95 -0
- package/locales/zh-Hant/package.json +19 -0
- package/package.json +184 -4
- package/src/components/MantineReactTable.tsx +38 -0
- package/src/components/body/MRT_TableBody.module.css +42 -0
- package/src/components/body/MRT_TableBody.tsx +214 -0
- package/src/components/body/MRT_TableBodyCell.module.css +107 -0
- package/src/components/body/MRT_TableBodyCell.tsx +355 -0
- package/src/components/body/MRT_TableBodyCellValue.tsx +114 -0
- package/src/components/body/MRT_TableBodyEmptyRow.tsx +89 -0
- package/src/components/body/MRT_TableBodyRow.module.css +261 -0
- package/src/components/body/MRT_TableBodyRow.tsx +278 -0
- package/src/components/body/MRT_TableBodyRowGrabHandle.tsx +59 -0
- package/src/components/body/MRT_TableBodyRowPinButton.tsx +59 -0
- package/src/components/body/MRT_TableDetailPanel.module.css +35 -0
- package/src/components/body/MRT_TableDetailPanel.tsx +132 -0
- package/src/components/buttons/MRT_ColumnPinningButtons.module.css +11 -0
- package/src/components/buttons/MRT_ColumnPinningButtons.tsx +69 -0
- package/src/components/buttons/MRT_CopyButton.module.css +27 -0
- package/src/components/buttons/MRT_CopyButton.tsx +84 -0
- package/src/components/buttons/MRT_EditActionButtons.module.css +4 -0
- package/src/components/buttons/MRT_EditActionButtons.tsx +139 -0
- package/src/components/buttons/MRT_ExpandAllButton.module.css +26 -0
- package/src/components/buttons/MRT_ExpandAllButton.tsx +84 -0
- package/src/components/buttons/MRT_ExpandButton.module.css +37 -0
- package/src/components/buttons/MRT_ExpandButton.tsx +121 -0
- package/src/components/buttons/MRT_GrabHandleButton.module.css +6 -0
- package/src/components/buttons/MRT_GrabHandleButton.tsx +65 -0
- package/src/components/buttons/MRT_RowPinButton.tsx +84 -0
- package/src/components/buttons/MRT_ShowHideColumnsButton.tsx +46 -0
- package/src/components/buttons/MRT_ToggleDensePaddingButton.tsx +66 -0
- package/src/components/buttons/MRT_ToggleFiltersButton.tsx +45 -0
- package/src/components/buttons/MRT_ToggleFullScreenButton.tsx +59 -0
- package/src/components/buttons/MRT_ToggleGlobalFilterButton.tsx +52 -0
- package/src/components/buttons/MRT_ToggleRowActionMenuButton.tsx +87 -0
- package/src/components/footer/MRT_TableFooter.module.css +17 -0
- package/src/components/footer/MRT_TableFooter.tsx +70 -0
- package/src/components/footer/MRT_TableFooterCell.module.css +59 -0
- package/src/components/footer/MRT_TableFooterCell.tsx +126 -0
- package/src/components/footer/MRT_TableFooterRow.module.css +10 -0
- package/src/components/footer/MRT_TableFooterRow.tsx +111 -0
- package/src/components/head/MRT_TableHead.module.css +32 -0
- package/src/components/head/MRT_TableHead.tsx +106 -0
- package/src/components/head/MRT_TableHeadCell.module.css +172 -0
- package/src/components/head/MRT_TableHeadCell.tsx +317 -0
- package/src/components/head/MRT_TableHeadCellFilterContainer.module.css +5 -0
- package/src/components/head/MRT_TableHeadCellFilterContainer.tsx +123 -0
- package/src/components/head/MRT_TableHeadCellFilterLabel.module.css +14 -0
- package/src/components/head/MRT_TableHeadCellFilterLabel.tsx +176 -0
- package/src/components/head/MRT_TableHeadCellGrabHandle.tsx +82 -0
- package/src/components/head/MRT_TableHeadCellResizeHandle.module.css +44 -0
- package/src/components/head/MRT_TableHeadCellResizeHandle.tsx +68 -0
- package/src/components/head/MRT_TableHeadCellSortLabel.module.css +22 -0
- package/src/components/head/MRT_TableHeadCellSortLabel.tsx +90 -0
- package/src/components/head/MRT_TableHeadRow.module.css +12 -0
- package/src/components/head/MRT_TableHeadRow.tsx +105 -0
- package/src/components/inputs/MRT_EditCellTextInput.tsx +214 -0
- package/src/components/inputs/MRT_FilterCheckBox.module.css +4 -0
- package/src/components/inputs/MRT_FilterCheckbox.tsx +80 -0
- package/src/components/inputs/MRT_FilterRangeFields.module.css +5 -0
- package/src/components/inputs/MRT_FilterRangeFields.tsx +36 -0
- package/src/components/inputs/MRT_FilterRangeSlider.module.css +6 -0
- package/src/components/inputs/MRT_FilterRangeSlider.tsx +107 -0
- package/src/components/inputs/MRT_FilterTextInput.module.css +27 -0
- package/src/components/inputs/MRT_FilterTextInput.tsx +418 -0
- package/src/components/inputs/MRT_GlobalFilterTextInput.module.css +11 -0
- package/src/components/inputs/MRT_GlobalFilterTextInput.tsx +142 -0
- package/src/components/inputs/MRT_SelectCheckbox.tsx +138 -0
- package/src/components/menus/MRT_ColumnActionMenu.module.css +7 -0
- package/src/components/menus/MRT_ColumnActionMenu.tsx +288 -0
- package/src/components/menus/MRT_FilterOptionMenu.module.css +6 -0
- package/src/components/menus/MRT_FilterOptionMenu.tsx +279 -0
- package/src/components/menus/MRT_RowActionMenu.tsx +75 -0
- package/src/components/menus/MRT_ShowHideColumnsMenu.module.css +10 -0
- package/src/components/menus/MRT_ShowHideColumnsMenu.tsx +136 -0
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.module.css +35 -0
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.tsx +171 -0
- package/src/components/modals/MRT_EditRowModal.tsx +98 -0
- package/src/components/table/MRT_Table.module.css +7 -0
- package/src/components/table/MRT_Table.tsx +155 -0
- package/src/components/table/MRT_TableContainer.module.css +32 -0
- package/src/components/table/MRT_TableContainer.tsx +124 -0
- package/src/components/table/MRT_TablePaper.module.css +88 -0
- package/src/components/table/MRT_TablePaper.tsx +91 -0
- package/src/components/toolbar/MRT_BottomToolbar.module.css +40 -0
- package/src/components/toolbar/MRT_BottomToolbar.tsx +99 -0
- package/src/components/toolbar/MRT_ProgressBar.module.css +10 -0
- package/src/components/toolbar/MRT_ProgressBar.tsx +54 -0
- package/src/components/toolbar/MRT_TablePagination.module.css +20 -0
- package/src/components/toolbar/MRT_TablePagination.tsx +175 -0
- package/src/components/toolbar/MRT_ToolbarAlertBanner.module.css +37 -0
- package/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +169 -0
- package/src/components/toolbar/MRT_ToolbarDropZone.module.css +23 -0
- package/src/components/toolbar/MRT_ToolbarDropZone.tsx +68 -0
- package/src/components/toolbar/MRT_ToolbarInternalButtons.module.css +6 -0
- package/src/components/toolbar/MRT_ToolbarInternalButtons.tsx +74 -0
- package/src/components/toolbar/MRT_TopToolbar.module.css +24 -0
- package/src/components/toolbar/MRT_TopToolbar.tsx +127 -0
- package/src/components/toolbar/common.styles.module.css +10 -0
- package/src/fns/aggregationFns.ts +3 -0
- package/src/fns/filterFns.ts +243 -0
- package/src/fns/sortingFns.ts +34 -0
- package/src/hooks/display-columns/getMRT_RowActionsColumnDef.tsx +25 -0
- package/src/hooks/display-columns/getMRT_RowDragColumnDef.tsx +32 -0
- package/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx +94 -0
- package/src/hooks/display-columns/getMRT_RowNumbersColumnDef.tsx +32 -0
- package/src/hooks/display-columns/getMRT_RowPinningColumnDef.tsx +26 -0
- package/src/hooks/display-columns/getMRT_RowSelectColumnDef.tsx +36 -0
- package/src/hooks/display-columns/getMRT_RowSpacerColumnDef.tsx +36 -0
- package/src/hooks/useMRT_ColumnVirtualizer.ts +135 -0
- package/src/hooks/useMRT_Effects.ts +109 -0
- package/src/hooks/useMRT_RowVirtualizer.ts +101 -0
- package/src/hooks/useMRT_Rows.ts +47 -0
- package/src/hooks/useMRT_TableInstance.ts +320 -0
- package/src/hooks/useMRT_TableOptions.ts +300 -0
- package/src/hooks/useMRT_TableSnapshot.ts +134 -0
- package/src/hooks/useMRT_VirtualizerScrollElement.ts +31 -0
- package/src/hooks/useMantineReactTable.ts +23 -0
- package/src/icons.ts +108 -0
- package/src/index.ts +91 -0
- package/src/locales/ar.ts +96 -0
- package/src/locales/az.ts +96 -0
- package/src/locales/bg.ts +96 -0
- package/src/locales/cs.ts +97 -0
- package/src/locales/da.ts +96 -0
- package/src/locales/de.ts +96 -0
- package/src/locales/el.ts +96 -0
- package/src/locales/en.ts +96 -0
- package/src/locales/es.ts +96 -0
- package/src/locales/et.ts +97 -0
- package/src/locales/fa.ts +96 -0
- package/src/locales/fi.ts +97 -0
- package/src/locales/fr.ts +96 -0
- package/src/locales/he.ts +96 -0
- package/src/locales/hr.ts +96 -0
- package/src/locales/hu.ts +96 -0
- package/src/locales/hy.ts +96 -0
- package/src/locales/id.ts +97 -0
- package/src/locales/it.ts +96 -0
- package/src/locales/ja.ts +96 -0
- package/src/locales/ko.ts +96 -0
- package/src/locales/nl.ts +96 -0
- package/src/locales/no.ts +97 -0
- package/src/locales/np.ts +97 -0
- package/src/locales/pl.ts +96 -0
- package/src/locales/pt-BR.ts +96 -0
- package/src/locales/pt.ts +96 -0
- package/src/locales/ro.ts +96 -0
- package/src/locales/ru.ts +96 -0
- package/src/locales/sk.ts +97 -0
- package/src/locales/sr-Cyrl-RS.ts +96 -0
- package/src/locales/sr-Latn-RS.ts +96 -0
- package/src/locales/sv.ts +96 -0
- package/src/locales/th.ts +97 -0
- package/src/locales/tr.ts +96 -0
- package/src/locales/uk.ts +96 -0
- package/src/locales/vi.ts +96 -0
- package/src/locales/zh-Hans.ts +95 -0
- package/src/locales/zh-Hant.ts +95 -0
- package/src/types.ts +1299 -0
- package/src/typings.d.ts +1 -0
- package/src/utils/column.utils.ts +157 -0
- package/src/utils/displayColumn.utils.ts +153 -0
- package/src/utils/row.utils.ts +263 -0
- package/src/utils/snapshot.utils.ts +97 -0
- package/src/utils/style.utils.ts +32 -0
- package/src/utils/tanstack.helpers.ts +66 -0
- package/src/utils/utils.ts +15 -0
- package/src/utils/virtualization.utils.ts +85 -0
- 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
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
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! -->
|