@cutting/material-react-table 5.0.0 → 5.1.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/README.md +1 -4
- package/dist/index.d.ts +186 -524
- package/dist/index.js +323 -342
- package/dist/index.js.map +1 -1
- package/locales/ar/index.mjs +1 -2
- package/locales/az/index.mjs +1 -2
- package/locales/bg/index.mjs +1 -2
- package/locales/cs/index.mjs +1 -2
- package/locales/da/index.mjs +1 -2
- package/locales/de/index.mjs +1 -2
- package/locales/el/index.mjs +1 -2
- package/locales/en/index.mjs +1 -2
- package/locales/es/index.mjs +1 -2
- package/locales/et/index.mjs +1 -2
- package/locales/fa/index.mjs +1 -2
- package/locales/fi/index.mjs +1 -2
- package/locales/fr/index.mjs +1 -2
- package/locales/he/index.mjs +1 -2
- package/locales/hr/index.mjs +1 -2
- package/locales/hu/index.mjs +1 -2
- package/locales/hy/index.mjs +1 -2
- package/locales/id/index.mjs +1 -2
- package/locales/it/index.mjs +1 -2
- package/locales/ja/index.mjs +1 -2
- package/locales/ko/index.mjs +1 -2
- package/locales/nl/index.mjs +1 -2
- package/locales/no/index.mjs +1 -2
- package/locales/np/index.mjs +1 -2
- package/locales/pl/index.mjs +1 -2
- package/locales/pt/index.mjs +1 -2
- package/locales/pt-BR/index.mjs +1 -2
- package/locales/ro/index.mjs +1 -2
- package/locales/ru/index.mjs +1 -2
- package/locales/sk/index.mjs +1 -2
- package/locales/sr-Cyrl-RS/index.mjs +1 -2
- package/locales/sr-Latn-RS/index.mjs +1 -2
- package/locales/sv/index.mjs +1 -2
- package/locales/tr/index.mjs +1 -2
- package/locales/uk/index.mjs +1 -2
- package/locales/vi/index.mjs +1 -2
- package/locales/zh-Hans/index.mjs +1 -2
- package/locales/zh-Hant/index.mjs +1 -2
- package/package.json +19 -27
- package/src/MaterialReactTable.smoke.test.tsx +3 -9
- package/src/components/MaterialReactTable.tsx +13 -21
- package/src/components/body/MRT_TableBody.tsx +67 -82
- package/src/components/body/MRT_TableBodyCell.tsx +38 -80
- package/src/components/body/MRT_TableBodyCellValue.tsx +5 -14
- package/src/components/body/MRT_TableBodyRow.tsx +55 -102
- package/src/components/body/MRT_TableBodyRowGrabHandle.test.tsx +2 -6
- package/src/components/body/MRT_TableBodyRowGrabHandle.tsx +4 -9
- package/src/components/body/MRT_TableBodyRowPinButton.tsx +8 -14
- package/src/components/body/MRT_TableDetailPanel.test.tsx +3 -9
- package/src/components/body/MRT_TableDetailPanel.tsx +8 -14
- package/src/components/buttons/MRT_ColumnPinningButtons.test.tsx +6 -16
- package/src/components/buttons/MRT_ColumnPinningButtons.tsx +6 -12
- package/src/components/buttons/MRT_CopyButton.tsx +7 -15
- package/src/components/buttons/MRT_EditActionButtons.test.tsx +2 -6
- package/src/components/buttons/MRT_EditActionButtons.tsx +15 -37
- package/src/components/buttons/MRT_ExpandAllButton.tsx +8 -16
- package/src/components/buttons/MRT_ExpandButton.tsx +9 -21
- package/src/components/buttons/MRT_GrabHandleButton.tsx +6 -10
- package/src/components/buttons/MRT_RowPinButton.tsx +8 -23
- package/src/components/buttons/MRT_ShowHideColumnsButton.tsx +5 -18
- package/src/components/buttons/MRT_ToggleDensePaddingButton.test.tsx +4 -12
- package/src/components/buttons/MRT_ToggleDensePaddingButton.tsx +4 -11
- package/src/components/buttons/MRT_ToggleFiltersButton.test.tsx +4 -13
- package/src/components/buttons/MRT_ToggleFiltersButton.tsx +3 -5
- package/src/components/buttons/MRT_ToggleFullScreenButton.test.tsx +3 -11
- package/src/components/buttons/MRT_ToggleFullScreenButton.tsx +4 -9
- package/src/components/buttons/MRT_ToggleGlobalFilterButton.tsx +3 -5
- package/src/components/buttons/MRT_ToggleRowActionMenuButton.tsx +7 -15
- package/src/components/footer/MRT_TableFooter.tsx +9 -16
- package/src/components/footer/MRT_TableFooterCell.tsx +9 -32
- package/src/components/footer/MRT_TableFooterRow.tsx +18 -32
- package/src/components/head/MRT_TableHead.tsx +8 -18
- package/src/components/head/MRT_TableHeadCell.tsx +46 -100
- package/src/components/head/MRT_TableHeadCellColumnActionsButton.tsx +10 -30
- package/src/components/head/MRT_TableHeadCellFilterContainer.tsx +4 -15
- package/src/components/head/MRT_TableHeadCellFilterLabel.tsx +20 -54
- package/src/components/head/MRT_TableHeadCellGrabHandle.test.tsx +5 -19
- package/src/components/head/MRT_TableHeadCellGrabHandle.tsx +9 -38
- package/src/components/head/MRT_TableHeadCellResizeHandle.test.tsx +3 -13
- package/src/components/head/MRT_TableHeadCellResizeHandle.tsx +10 -24
- package/src/components/head/MRT_TableHeadCellSortLabel.tsx +10 -26
- package/src/components/head/MRT_TableHeadRow.tsx +24 -36
- package/src/components/inputs/MRT_EditCellTextField.test.tsx +2 -9
- package/src/components/inputs/MRT_EditCellTextField.tsx +9 -28
- package/src/components/inputs/MRT_FilterCheckbox.tsx +9 -23
- package/src/components/inputs/MRT_FilterRangeFields.tsx +6 -15
- package/src/components/inputs/MRT_FilterRangeSlider.tsx +24 -32
- package/src/components/inputs/MRT_FilterTextField.test.tsx +72 -14
- package/src/components/inputs/MRT_FilterTextField.tsx +77 -138
- package/src/components/inputs/MRT_GlobalFilterTextField.tsx +10 -32
- package/src/components/inputs/MRT_SelectCheckbox.test.tsx +4 -11
- package/src/components/inputs/MRT_SelectCheckbox.tsx +17 -36
- package/src/components/menus/MRT_ActionMenuItem.tsx +6 -15
- package/src/components/menus/MRT_CellActionMenu.tsx +6 -9
- package/src/components/menus/MRT_ColumnActionMenu.tsx +22 -57
- package/src/components/menus/MRT_FilterOptionMenu.tsx +38 -65
- package/src/components/menus/MRT_RowActionMenu.tsx +33 -22
- package/src/components/menus/MRT_ShowHideColumnsMenu.tsx +29 -65
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.test.tsx +43 -0
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.tsx +14 -50
- package/src/components/modals/MRT_EditRowModal.test.tsx +5 -21
- package/src/components/modals/MRT_EditRowModal.tsx +8 -26
- package/src/components/table/MRT_Table.tsx +12 -20
- package/src/components/table/MRT_TableContainer.test.tsx +147 -0
- package/src/components/table/MRT_TableContainer.tsx +33 -37
- package/src/components/table/MRT_TableLoadingOverlay.tsx +3 -5
- package/src/components/table/MRT_TablePaper.tsx +7 -14
- package/src/components/toolbar/MRT_BottomToolbar.tsx +11 -23
- package/src/components/toolbar/MRT_LinearProgressBar.tsx +4 -11
- package/src/components/toolbar/MRT_TablePagination.tsx +33 -40
- package/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +21 -50
- package/src/components/toolbar/MRT_ToolbarDropZone.test.tsx +26 -10
- package/src/components/toolbar/MRT_ToolbarDropZone.tsx +23 -21
- package/src/components/toolbar/MRT_ToolbarInternalButtons.tsx +11 -21
- package/src/components/toolbar/MRT_TopToolbar.tsx +12 -28
- package/src/fns/aggregationFns.test.tsx +1 -3
- package/src/fns/filterFns.test.tsx +8 -37
- package/src/fns/filterFns.ts +71 -96
- package/src/fns/sortingFns.test.tsx +5 -21
- package/src/fns/sortingFns.ts +10 -14
- package/src/fns/tableFeatures.test.tsx +6 -29
- package/src/fns/tableFeatures.ts +5 -4
- package/src/hooks/display-columns/getMRT_RowActionsColumnDef.tsx +2 -11
- package/src/hooks/display-columns/getMRT_RowDragColumnDef.tsx +2 -10
- package/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx +8 -17
- package/src/hooks/display-columns/getMRT_RowNumbersColumnDef.tsx +3 -8
- package/src/hooks/display-columns/getMRT_RowPinningColumnDef.tsx +2 -8
- package/src/hooks/display-columns/getMRT_RowSelectColumnDef.tsx +3 -13
- package/src/hooks/display-columns/getMRT_RowSpacerColumnDef.tsx +1 -5
- package/src/hooks/useMRT_ColumnVirtualizer.ts +28 -49
- package/src/hooks/useMRT_Effects.test.tsx +114 -0
- package/src/hooks/useMRT_Effects.ts +26 -27
- package/src/hooks/useMRT_RowVirtualizer.ts +18 -33
- package/src/hooks/useMRT_Rows.ts +3 -42
- package/src/hooks/useMRT_TableInstance.ts +63 -129
- package/src/hooks/useMRT_TableOptions.ts +15 -29
- package/src/hooks/useMaterialReactTable.ts +2 -7
- package/src/icons.ts +38 -1
- package/src/index.ts +0 -4
- package/src/locales/ar.ts +1 -2
- package/src/locales/az.ts +1 -2
- package/src/locales/bg.ts +1 -2
- package/src/locales/cs.ts +2 -4
- package/src/locales/da.ts +1 -2
- package/src/locales/de.ts +1 -2
- package/src/locales/el.ts +1 -2
- package/src/locales/en.ts +1 -2
- package/src/locales/es.ts +1 -2
- package/src/locales/et.ts +2 -4
- package/src/locales/fa.ts +1 -2
- package/src/locales/fi.ts +2 -4
- package/src/locales/fr.ts +1 -2
- package/src/locales/he.ts +1 -2
- package/src/locales/hr.ts +1 -2
- package/src/locales/hu.ts +1 -2
- package/src/locales/hy.ts +1 -2
- package/src/locales/id.ts +2 -4
- package/src/locales/it.ts +1 -2
- package/src/locales/ja.ts +1 -2
- package/src/locales/ko.ts +1 -2
- package/src/locales/nl.ts +1 -2
- package/src/locales/no.ts +2 -4
- package/src/locales/np.ts +2 -4
- package/src/locales/pl.ts +1 -2
- package/src/locales/pt-BR.ts +1 -2
- package/src/locales/pt.ts +1 -2
- package/src/locales/ro.ts +1 -2
- package/src/locales/ru.ts +1 -2
- package/src/locales/sk.ts +2 -4
- package/src/locales/sr-Cyrl-RS.ts +1 -2
- package/src/locales/sr-Latn-RS.ts +1 -2
- package/src/locales/sv.ts +1 -2
- package/src/locales/tr.ts +1 -2
- package/src/locales/uk.ts +1 -2
- package/src/locales/vi.ts +1 -2
- package/src/types.ts +156 -349
- package/src/utils/cell.utils.ts +30 -68
- package/src/utils/column.utils.ts +61 -49
- package/src/utils/displayColumn.utils.ts +16 -38
- package/src/utils/highlight.utils.ts +7 -11
- package/src/utils/row.utils.ts +40 -65
- package/src/utils/slotProps.utils.ts +1 -4
- package/src/utils/style.utils.ts +18 -46
- package/src/utils/tanstack.helpers.ts +10 -17
- package/src/utils/utils.ts +6 -10
- package/src/utils/virtualization.utils.ts +5 -9
package/locales/ar/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ar.ts
|
|
2
2
|
const MRT_Localization_AR = {
|
|
3
3
|
language: "ar",
|
|
4
4
|
actions: "إجراءات",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_AR = {
|
|
|
93
93
|
unpin: "عدم التثبيت",
|
|
94
94
|
unpinAll: "عدم تثبيت الكل"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_AR };
|
package/locales/az/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/az.ts
|
|
2
2
|
const MRT_Localization_AZ = {
|
|
3
3
|
language: "az",
|
|
4
4
|
actions: "Əməliyyatlar",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_AZ = {
|
|
|
93
93
|
unpin: "Ayır",
|
|
94
94
|
unpinAll: "Hamısını Ayır"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_AZ };
|
package/locales/bg/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/bg.ts
|
|
2
2
|
const MRT_Localization_BG = {
|
|
3
3
|
language: "bg",
|
|
4
4
|
actions: "Действия",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_BG = {
|
|
|
93
93
|
unpin: "Откачи",
|
|
94
94
|
unpinAll: "Откачи всички"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_BG };
|
package/locales/cs/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/cs.ts
|
|
2
2
|
const MRT_Localization_CS = {
|
|
3
3
|
language: "cs",
|
|
4
4
|
actions: "Akce",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_CS = {
|
|
|
93
93
|
unpin: "Odepnout",
|
|
94
94
|
unpinAll: "Odepnout vše"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_CS };
|
package/locales/da/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/da.ts
|
|
2
2
|
const MRT_Localization_DA = {
|
|
3
3
|
language: "da",
|
|
4
4
|
actions: "Handlinger",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_DA = {
|
|
|
93
93
|
unpin: "Frigør",
|
|
94
94
|
unpinAll: "Frigør alt"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_DA };
|
package/locales/de/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/de.ts
|
|
2
2
|
const MRT_Localization_DE = {
|
|
3
3
|
language: "de",
|
|
4
4
|
actions: "Aktionen",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_DE = {
|
|
|
93
93
|
unpin: "Loslösen",
|
|
94
94
|
unpinAll: "Alle loslösen"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_DE };
|
package/locales/el/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/el.ts
|
|
2
2
|
const MRT_Localization_EL = {
|
|
3
3
|
language: "el",
|
|
4
4
|
actions: "Ενέργειες",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_EL = {
|
|
|
93
93
|
unpin: "Αποκαρφίτσωση",
|
|
94
94
|
unpinAll: "Αποκαρφίτσωση όλων"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_EL };
|
package/locales/en/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/en.ts
|
|
2
2
|
const MRT_Localization_EN = {
|
|
3
3
|
language: "en",
|
|
4
4
|
actions: "Actions",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_EN = {
|
|
|
93
93
|
unpin: "Unpin",
|
|
94
94
|
unpinAll: "Unpin all"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_EN };
|
package/locales/es/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/es.ts
|
|
2
2
|
const MRT_Localization_ES = {
|
|
3
3
|
language: "es",
|
|
4
4
|
actions: "Acciones",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_ES = {
|
|
|
93
93
|
unpin: "Desanclar",
|
|
94
94
|
unpinAll: "Desanclar todo"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_ES };
|
package/locales/et/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/et.ts
|
|
2
2
|
const MRT_Localization_ET = {
|
|
3
3
|
language: "et",
|
|
4
4
|
actions: "Toimingud",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_ET = {
|
|
|
93
93
|
unpin: "Eemalda kinnitamine",
|
|
94
94
|
unpinAll: "Eemalda kõigi kinnitamine"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_ET };
|
package/locales/fa/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/fa.ts
|
|
2
2
|
const MRT_Localization_FA = {
|
|
3
3
|
language: "fa",
|
|
4
4
|
actions: "عملیات",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_FA = {
|
|
|
93
93
|
unpin: "پین کردن",
|
|
94
94
|
unpinAll: "از پین در آوردن "
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_FA };
|
package/locales/fi/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/fi.ts
|
|
2
2
|
const MRT_Localization_FI = {
|
|
3
3
|
language: "fi",
|
|
4
4
|
actions: "Toiminnot",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_FI = {
|
|
|
93
93
|
unpin: "Poista kiinnitys",
|
|
94
94
|
unpinAll: "Poista kiinnitys kaikilta"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_FI };
|
package/locales/fr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/fr.ts
|
|
2
2
|
const MRT_Localization_FR = {
|
|
3
3
|
language: "fr",
|
|
4
4
|
actions: "Actions",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_FR = {
|
|
|
93
93
|
unpin: "Détacher",
|
|
94
94
|
unpinAll: "Tout détacher"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_FR };
|
package/locales/he/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/he.ts
|
|
2
2
|
const MRT_Localization_HE = {
|
|
3
3
|
language: "he",
|
|
4
4
|
actions: "פעולות",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_HE = {
|
|
|
93
93
|
unpin: "בטל נעיצה",
|
|
94
94
|
unpinAll: "בטל נעיצת הכל"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_HE };
|
package/locales/hr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/hr.ts
|
|
2
2
|
const MRT_Localization_HR = {
|
|
3
3
|
language: "hr",
|
|
4
4
|
actions: "Radnje",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_HR = {
|
|
|
93
93
|
unpin: "Odkači",
|
|
94
94
|
unpinAll: "Odkači sve"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_HR };
|
package/locales/hu/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/hu.ts
|
|
2
2
|
const MRT_Localization_HU = {
|
|
3
3
|
language: "hu",
|
|
4
4
|
actions: "Műveletek",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_HU = {
|
|
|
93
93
|
unpin: "Feloldás",
|
|
94
94
|
unpinAll: "Minden feloldása"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_HU };
|
package/locales/hy/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/hy.ts
|
|
2
2
|
const MRT_Localization_HY = {
|
|
3
3
|
language: "hy",
|
|
4
4
|
actions: "Գործողություններ",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_HY = {
|
|
|
93
93
|
unpin: "Ապակցել",
|
|
94
94
|
unpinAll: "Ապակցել բոլորը"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_HY };
|
package/locales/id/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/id.ts
|
|
2
2
|
const MRT_Localization_ID = {
|
|
3
3
|
language: "id",
|
|
4
4
|
actions: "Aksi",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_ID = {
|
|
|
93
93
|
unpin: "Lepaskan sematan",
|
|
94
94
|
unpinAll: "Lepaskan semua sematan"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_ID };
|
package/locales/it/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/it.ts
|
|
2
2
|
const MRT_Localization_IT = {
|
|
3
3
|
language: "it",
|
|
4
4
|
actions: "Azioni",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_IT = {
|
|
|
93
93
|
unpin: "Sblocca",
|
|
94
94
|
unpinAll: "Sblocca tutto"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_IT };
|
package/locales/ja/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ja.ts
|
|
2
2
|
const MRT_Localization_JA = {
|
|
3
3
|
language: "ja",
|
|
4
4
|
actions: "操作",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_JA = {
|
|
|
93
93
|
unpin: "固定を解除",
|
|
94
94
|
unpinAll: "すべての固定を解除"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_JA };
|
package/locales/ko/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ko.ts
|
|
2
2
|
const MRT_Localization_KO = {
|
|
3
3
|
language: "ko",
|
|
4
4
|
actions: "동작",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_KO = {
|
|
|
93
93
|
unpin: "고정 해제",
|
|
94
94
|
unpinAll: "전체 고정 해제"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_KO };
|
package/locales/nl/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/nl.ts
|
|
2
2
|
const MRT_Localization_NL = {
|
|
3
3
|
language: "nl",
|
|
4
4
|
actions: "Acties",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_NL = {
|
|
|
93
93
|
unpin: "Losmaken",
|
|
94
94
|
unpinAll: "Alles losmaken"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_NL };
|
package/locales/no/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/no.ts
|
|
2
2
|
const MRT_Localization_NO = {
|
|
3
3
|
language: "no",
|
|
4
4
|
cancel: "Avbryt",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_NO = {
|
|
|
93
93
|
ungroupByColumn: "Oppgrupper etter {column}",
|
|
94
94
|
selectedCountOfRowCountRowsSelected: "{selectedCount} av {rowCount} rader valgt"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_NO };
|
package/locales/np/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/np.ts
|
|
2
2
|
const MRT_Localization_NP = {
|
|
3
3
|
language: "np",
|
|
4
4
|
actions: "कार्यहरू",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_NP = {
|
|
|
93
93
|
unpin: "अनपिन गर्नुहोस्",
|
|
94
94
|
unpinAll: "सबै अनपिन गर्नुहोस्"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_NP };
|
package/locales/pl/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/pl.ts
|
|
2
2
|
const MRT_Localization_PL = {
|
|
3
3
|
language: "pl",
|
|
4
4
|
actions: "Akcje",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_PL = {
|
|
|
93
93
|
unpin: "Odepnij",
|
|
94
94
|
unpinAll: "Odepnij wszystkie"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_PL };
|
package/locales/pt/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/pt.ts
|
|
2
2
|
const MRT_Localization_PT = {
|
|
3
3
|
language: "pt",
|
|
4
4
|
actions: "Ações",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_PT = {
|
|
|
93
93
|
unpin: "Desfixar",
|
|
94
94
|
unpinAll: "Desfixar tudo"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_PT };
|
package/locales/pt-BR/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/pt-BR.ts
|
|
2
2
|
const MRT_Localization_PT_BR = {
|
|
3
3
|
language: "pt-BR",
|
|
4
4
|
actions: "Ações",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_PT_BR = {
|
|
|
93
93
|
unpin: "Desfixar",
|
|
94
94
|
unpinAll: "Desfixar tudo"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_PT_BR };
|
package/locales/ro/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ro.ts
|
|
2
2
|
const MRT_Localization_RO = {
|
|
3
3
|
language: "ro",
|
|
4
4
|
actions: "Acțiuni",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_RO = {
|
|
|
93
93
|
unpin: "Deblocare",
|
|
94
94
|
unpinAll: "Deblocare"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_RO };
|
package/locales/ru/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ru.ts
|
|
2
2
|
const MRT_Localization_RU = {
|
|
3
3
|
language: "ru",
|
|
4
4
|
actions: "Действия",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_RU = {
|
|
|
93
93
|
unpin: "Открепить",
|
|
94
94
|
unpinAll: "Открепить всё"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_RU };
|
package/locales/sk/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/sk.ts
|
|
2
2
|
const MRT_Localization_SK = {
|
|
3
3
|
language: "sk",
|
|
4
4
|
actions: "Akcie",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_SK = {
|
|
|
93
93
|
unpin: "Odopnúť",
|
|
94
94
|
unpinAll: "Odopnúť všetko"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_SK };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/sr-Cyrl-RS.ts
|
|
2
2
|
const MRT_Localization_SR_CYRL_RS = {
|
|
3
3
|
language: "sr-Cyrl-RS",
|
|
4
4
|
actions: "Акције",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_SR_CYRL_RS = {
|
|
|
93
93
|
unpin: "Откачи",
|
|
94
94
|
unpinAll: "Откачи све"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_SR_CYRL_RS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/sr-Latn-RS.ts
|
|
2
2
|
const MRT_Localization_SR_LATN_RS = {
|
|
3
3
|
language: "sr-Latn-RS",
|
|
4
4
|
actions: "Akcije",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_SR_LATN_RS = {
|
|
|
93
93
|
unpin: "Otkači",
|
|
94
94
|
unpinAll: "Otkači sve"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_SR_LATN_RS };
|
package/locales/sv/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/sv.ts
|
|
2
2
|
const MRT_Localization_SV = {
|
|
3
3
|
language: "sv",
|
|
4
4
|
actions: "Åtgärder",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_SV = {
|
|
|
93
93
|
unpin: "Avfäst",
|
|
94
94
|
unpinAll: "Avfäst alla"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_SV };
|
package/locales/tr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/tr.ts
|
|
2
2
|
const MRT_Localization_TR = {
|
|
3
3
|
language: "tr",
|
|
4
4
|
actions: "İşlemler",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_TR = {
|
|
|
93
93
|
unpin: "Çöz",
|
|
94
94
|
unpinAll: "Tümünü Çöz"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_TR };
|
package/locales/uk/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/uk.ts
|
|
2
2
|
const MRT_Localization_UK = {
|
|
3
3
|
language: "uk",
|
|
4
4
|
actions: "Дії",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_UK = {
|
|
|
93
93
|
unpin: "Відкріпити",
|
|
94
94
|
unpinAll: "Відкріпити все"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_UK };
|
package/locales/vi/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/vi.ts
|
|
2
2
|
const MRT_Localization_VI = {
|
|
3
3
|
language: "vi",
|
|
4
4
|
actions: "Thao tác",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_VI = {
|
|
|
93
93
|
unpin: "Bỏ ghim",
|
|
94
94
|
unpinAll: "Bỏ ghim tất cả"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_VI };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/zh-Hans.ts
|
|
2
2
|
const MRT_Localization_ZH_HANS = {
|
|
3
3
|
language: "zh-Hans",
|
|
4
4
|
actions: "操作",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_ZH_HANS = {
|
|
|
93
93
|
unpin: "取消固定",
|
|
94
94
|
unpinAll: "全部取消固定"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_ZH_HANS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/zh-Hant.ts
|
|
2
2
|
const MRT_Localization_ZH_HANT = {
|
|
3
3
|
language: "zh-Hant",
|
|
4
4
|
actions: "動作",
|
|
@@ -93,5 +93,4 @@ const MRT_Localization_ZH_HANT = {
|
|
|
93
93
|
unpin: "取消固定",
|
|
94
94
|
unpinAll: "全部取消固定"
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { MRT_Localization_ZH_HANT };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.1.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "@cutting/material-react-table",
|
|
5
5
|
"description": "Maintenance fork of material-react-table updated for Material UI v9. A fully featured Material UI implementation of TanStack React Table V8.",
|
|
@@ -47,45 +47,37 @@
|
|
|
47
47
|
"node": ">=22"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@cutting/useful-types": "4.46.1",
|
|
50
51
|
"@emotion/react": "^11.14.0",
|
|
51
52
|
"@emotion/styled": "^11.14.1",
|
|
52
|
-
"@eslint/eslintrc": "^3.3.7",
|
|
53
|
-
"@eslint/js": "^10.0.1",
|
|
54
53
|
"@faker-js/faker": "^10.6.0",
|
|
55
54
|
"@mui/icons-material": "^9.5.0",
|
|
56
55
|
"@mui/material": "^9.5.0",
|
|
57
|
-
"@mui/x-date-pickers": "^9.
|
|
58
|
-
"@size-limit/preset-small-lib": "^14.
|
|
59
|
-
"@storybook/addon-a11y": "^10.6.
|
|
60
|
-
"@storybook/addon-docs": "^10.6.
|
|
61
|
-
"@storybook/addon-links": "^10.6.
|
|
62
|
-
"@storybook/react-vite": "^10.6.
|
|
56
|
+
"@mui/x-date-pickers": "^9.17.0",
|
|
57
|
+
"@size-limit/preset-small-lib": "^14.3.0",
|
|
58
|
+
"@storybook/addon-a11y": "^10.6.5",
|
|
59
|
+
"@storybook/addon-docs": "^10.6.5",
|
|
60
|
+
"@storybook/addon-links": "^10.6.5",
|
|
61
|
+
"@storybook/react-vite": "^10.6.5",
|
|
63
62
|
"@testing-library/jest-dom": "^7.0.1",
|
|
64
63
|
"@testing-library/react": "^16.3.3",
|
|
65
64
|
"@testing-library/user-event": "^14.6.8",
|
|
66
|
-
"@types/node": "^26.6.
|
|
65
|
+
"@types/node": "^26.6.6",
|
|
67
66
|
"@types/react": "^19.3.0",
|
|
68
67
|
"@types/react-dom": "^19.3.0",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
|
70
|
-
"@typescript-eslint/parser": "^8.72.0",
|
|
71
68
|
"@vitejs/plugin-react": "^6.1.2",
|
|
72
69
|
"dayjs": "^1.11.23",
|
|
73
|
-
"eslint": "^10.13.0",
|
|
74
|
-
"eslint-plugin-mui-path-imports": "^0.0.15",
|
|
75
|
-
"eslint-plugin-perfectionist": "^5.13.0",
|
|
76
|
-
"eslint-plugin-storybook": "^10.6.3",
|
|
77
|
-
"globals": "^17.13.0",
|
|
78
70
|
"jsdom": "^30.1.3",
|
|
79
71
|
"react": "^19.3.1",
|
|
80
72
|
"react-dom": "^19.3.1",
|
|
81
73
|
"react-is": "^19.3.1",
|
|
82
|
-
"rolldown": "^1.2.
|
|
83
|
-
"size-limit": "^14.
|
|
84
|
-
"storybook": "^10.6.
|
|
74
|
+
"rolldown": "^1.2.16",
|
|
75
|
+
"size-limit": "^14.3.0",
|
|
76
|
+
"storybook": "^10.6.5",
|
|
85
77
|
"storybook-dark-mode": "^5.0.0",
|
|
86
|
-
"tsdown": "^0.23.
|
|
87
|
-
"tslib": "^2.
|
|
88
|
-
"typescript": "
|
|
78
|
+
"tsdown": "^0.23.4",
|
|
79
|
+
"tslib": "^2.9.1",
|
|
80
|
+
"typescript": "7.0.2",
|
|
89
81
|
"vite": "^8.3.5",
|
|
90
82
|
"vitest": "^5.0.5"
|
|
91
83
|
},
|
|
@@ -101,7 +93,7 @@
|
|
|
101
93
|
"dependencies": {
|
|
102
94
|
"@tanstack/match-sorter-utils": "9.2.6",
|
|
103
95
|
"@tanstack/react-table": "9.3.1",
|
|
104
|
-
"@tanstack/react-virtual": "3.14.
|
|
96
|
+
"@tanstack/react-virtual": "3.14.24",
|
|
105
97
|
"@tanstack/table-core": "9.3.1",
|
|
106
98
|
"highlight-words": "2.0.0"
|
|
107
99
|
},
|
|
@@ -125,13 +117,13 @@
|
|
|
125
117
|
"lib:build-locales": "node build-locales.mjs",
|
|
126
118
|
"lib:build-lib": "tsdown && size-limit",
|
|
127
119
|
"lib:dev": "tsdown --watch",
|
|
128
|
-
"lint": "
|
|
120
|
+
"lint": "oxlint . --fix --deny-warnings && oxfmt .",
|
|
129
121
|
"size": "size-limit",
|
|
130
122
|
"test": "vitest run",
|
|
131
123
|
"test:watch": "vitest",
|
|
132
|
-
"storybook": "storybook dev -p 6006",
|
|
124
|
+
"storybook": "storybook dev -p 6006 --host 127.0.0.1",
|
|
133
125
|
"storybook:build": "storybook build",
|
|
134
|
-
"storybook:dev": "storybook dev -p 6006",
|
|
126
|
+
"storybook:dev": "storybook dev -p 6006 --host 127.0.0.1",
|
|
135
127
|
"build-storybook": "storybook build"
|
|
136
128
|
}
|
|
137
129
|
}
|
|
@@ -25,12 +25,8 @@ describe('MaterialReactTable smoke', () => {
|
|
|
25
25
|
test('renders headers and rows from props', () => {
|
|
26
26
|
render(<MaterialReactTable columns={columns} data={data} />);
|
|
27
27
|
|
|
28
|
-
expect(
|
|
29
|
-
|
|
30
|
-
).toBeInTheDocument();
|
|
31
|
-
expect(
|
|
32
|
-
screen.getByRole('columnheader', { name: /age/i }),
|
|
33
|
-
).toBeInTheDocument();
|
|
28
|
+
expect(screen.getByRole('columnheader', { name: /name/i })).toBeInTheDocument();
|
|
29
|
+
expect(screen.getByRole('columnheader', { name: /age/i })).toBeInTheDocument();
|
|
34
30
|
|
|
35
31
|
expect(screen.getByText('John')).toBeInTheDocument();
|
|
36
32
|
expect(screen.getByText('Sara')).toBeInTheDocument();
|
|
@@ -48,9 +44,7 @@ describe('MaterialReactTable smoke', () => {
|
|
|
48
44
|
|
|
49
45
|
await user.click(sortButton);
|
|
50
46
|
|
|
51
|
-
const firstBodyRow = document.querySelector<HTMLTableRowElement>(
|
|
52
|
-
'tr[data-index="0"]',
|
|
53
|
-
);
|
|
47
|
+
const firstBodyRow = document.querySelector<HTMLTableRowElement>('tr[data-index="0"]');
|
|
54
48
|
expect(firstBodyRow?.textContent).toContain('Aaron');
|
|
55
49
|
});
|
|
56
50
|
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { useMaterialReactTable } from '../hooks/useMaterialReactTable';
|
|
2
|
-
import {
|
|
3
|
-
type MRT_RowData,
|
|
4
|
-
type MRT_TableInstance,
|
|
5
|
-
type MRT_TableOptions,
|
|
6
|
-
type Xor,
|
|
7
|
-
} from '../types';
|
|
2
|
+
import { type MRT_RowData, type MRT_TableInstance, type MRT_TableOptions, type Xor } from '../types';
|
|
8
3
|
import { MRT_TablePaper } from './table/MRT_TablePaper';
|
|
9
4
|
|
|
10
|
-
export type MaterialReactTableProps<TData extends MRT_RowData> = Xor<
|
|
11
|
-
TableInstanceProp<TData>,
|
|
12
|
-
MRT_TableOptions<TData>
|
|
13
|
-
>;
|
|
5
|
+
export type MaterialReactTableProps<TData extends MRT_RowData> = Xor<TableInstanceProp<TData>, MRT_TableOptions<TData>>;
|
|
14
6
|
|
|
15
7
|
type TableInstanceProp<TData extends MRT_RowData> = {
|
|
16
8
|
table: MRT_TableInstance<TData>;
|
|
@@ -18,19 +10,19 @@ type TableInstanceProp<TData extends MRT_RowData> = {
|
|
|
18
10
|
|
|
19
11
|
const isTableInstanceProp = <TData extends MRT_RowData>(
|
|
20
12
|
props: MaterialReactTableProps<TData>,
|
|
21
|
-
): props is TableInstanceProp<TData> =>
|
|
22
|
-
(props as TableInstanceProp<TData>).table !== undefined;
|
|
13
|
+
): props is TableInstanceProp<TData> => (props as TableInstanceProp<TData>).table !== undefined;
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let table: MRT_TableInstance<TData>;
|
|
15
|
+
interface MRT_TableFromOptionsProps<TData extends MRT_RowData> {
|
|
16
|
+
tableOptions: MRT_TableOptions<TData>;
|
|
17
|
+
}
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
19
|
+
const MRT_TableFromOptions = <TData extends MRT_RowData>({
|
|
20
|
+
tableOptions,
|
|
21
|
+
}: Readonly<MRT_TableFromOptionsProps<TData>>): JSX.Element => {
|
|
22
|
+
const table = useMaterialReactTable(tableOptions);
|
|
34
23
|
|
|
35
24
|
return <MRT_TablePaper table={table} />;
|
|
36
25
|
};
|
|
26
|
+
|
|
27
|
+
export const MaterialReactTable = <TData extends MRT_RowData>(props: MaterialReactTableProps<TData>): JSX.Element =>
|
|
28
|
+
isTableInstanceProp(props) ? <MRT_TablePaper table={props.table} /> : <MRT_TableFromOptions tableOptions={props} />;
|