material-react-table 2.0.5 → 2.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.
Files changed (150) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.esm.js +616 -545
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +614 -543
  5. package/dist/index.js.map +1 -1
  6. package/locales/fr/index.esm.js +1 -1
  7. package/locales/fr/index.js +1 -1
  8. package/locales/he/index.d.ts +3 -0
  9. package/locales/he/index.esm.d.ts +3 -0
  10. package/locales/he/index.esm.js +93 -0
  11. package/locales/he/index.js +97 -0
  12. package/locales/he/package.json +6 -0
  13. package/package.json +25 -25
  14. package/src/body/MRT_TableBodyCell.tsx +22 -19
  15. package/src/body/MRT_TableBodyCellValue.tsx +9 -9
  16. package/src/body/MRT_TableBodyRow.tsx +13 -13
  17. package/src/buttons/MRT_RowPinButton.tsx +2 -2
  18. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -2
  19. package/src/footer/MRT_TableFooterCell.tsx +2 -2
  20. package/src/head/MRT_TableHeadCell.tsx +25 -20
  21. package/src/head/MRT_TableHeadCellResizeHandle.tsx +19 -9
  22. package/src/hooks/useMRT_DisplayColumns.tsx +172 -125
  23. package/src/hooks/useMRT_TableOptions.ts +8 -0
  24. package/src/inputs/MRT_EditCellTextField.tsx +3 -1
  25. package/src/inputs/MRT_FilterCheckbox.tsx +2 -2
  26. package/src/inputs/MRT_FilterTextField.tsx +17 -17
  27. package/src/inputs/MRT_SelectCheckbox.tsx +2 -2
  28. package/src/locales/fr.ts +1 -1
  29. package/src/locales/he.ts +94 -0
  30. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +2 -2
  31. package/src/style.utils.ts +2 -2
  32. package/src/toolbar/MRT_TablePagination.tsx +8 -4
  33. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +6 -6
  34. package/src/types.ts +2 -2
  35. package/dist/types/MaterialReactTable.d.ts +0 -7
  36. package/dist/types/aggregationFns.d.ts +0 -11
  37. package/dist/types/body/MRT_TableBody.d.ts +0 -13
  38. package/dist/types/body/MRT_TableBodyCell.d.ts +0 -15
  39. package/dist/types/body/MRT_TableBodyCellValue.d.ts +0 -8
  40. package/dist/types/body/MRT_TableBodyRow.d.ts +0 -18
  41. package/dist/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -10
  42. package/dist/types/body/MRT_TableBodyRowPinButton.d.ts +0 -8
  43. package/dist/types/body/MRT_TableDetailPanel.d.ts +0 -13
  44. package/dist/types/body/index.d.ts +0 -7
  45. package/dist/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -8
  46. package/dist/types/buttons/MRT_CopyButton.d.ts +0 -8
  47. package/dist/types/buttons/MRT_EditActionButtons.d.ts +0 -9
  48. package/dist/types/buttons/MRT_ExpandAllButton.d.ts +0 -7
  49. package/dist/types/buttons/MRT_ExpandButton.d.ts +0 -8
  50. package/dist/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
  51. package/dist/types/buttons/MRT_RowPinButton.d.ts +0 -10
  52. package/dist/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
  53. package/dist/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
  54. package/dist/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
  55. package/dist/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
  56. package/dist/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
  57. package/dist/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -9
  58. package/dist/types/buttons/index.d.ts +0 -13
  59. package/dist/types/column.utils.d.ts +0 -127
  60. package/dist/types/filterFns.d.ts +0 -69
  61. package/dist/types/footer/MRT_TableFooter.d.ts +0 -11
  62. package/dist/types/footer/MRT_TableFooterCell.d.ts +0 -8
  63. package/dist/types/footer/MRT_TableFooterRow.d.ts +0 -12
  64. package/dist/types/footer/index.d.ts +0 -3
  65. package/dist/types/head/MRT_TableHead.d.ts +0 -11
  66. package/dist/types/head/MRT_TableHeadCell.d.ts +0 -8
  67. package/dist/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -8
  68. package/dist/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -8
  69. package/dist/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -8
  70. package/dist/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -10
  71. package/dist/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -8
  72. package/dist/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -8
  73. package/dist/types/head/MRT_TableHeadRow.d.ts +0 -12
  74. package/dist/types/head/index.d.ts +0 -9
  75. package/dist/types/hooks/index.d.ts +0 -4
  76. package/dist/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
  77. package/dist/types/hooks/useMRT_Effects.d.ts +0 -2
  78. package/dist/types/hooks/useMRT_TableInstance.d.ts +0 -2
  79. package/dist/types/hooks/useMRT_TableOptions.d.ts +0 -22
  80. package/dist/types/icons.d.ts +0 -36
  81. package/dist/types/index.d.ts +0 -18
  82. package/dist/types/inputs/MRT_EditCellTextField.d.ts +0 -8
  83. package/dist/types/inputs/MRT_FilterCheckbox.d.ts +0 -8
  84. package/dist/types/inputs/MRT_FilterRangeFields.d.ts +0 -8
  85. package/dist/types/inputs/MRT_FilterRangeSlider.d.ts +0 -8
  86. package/dist/types/inputs/MRT_FilterTextField.d.ts +0 -9
  87. package/dist/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -7
  88. package/dist/types/inputs/MRT_SelectCheckbox.d.ts +0 -9
  89. package/dist/types/inputs/index.d.ts +0 -7
  90. package/dist/types/locales/am.d.ts +0 -2
  91. package/dist/types/locales/ar.d.ts +0 -2
  92. package/dist/types/locales/az.d.ts +0 -2
  93. package/dist/types/locales/bg.d.ts +0 -2
  94. package/dist/types/locales/cs.d.ts +0 -2
  95. package/dist/types/locales/da.d.ts +0 -2
  96. package/dist/types/locales/de.d.ts +0 -2
  97. package/dist/types/locales/en.d.ts +0 -2
  98. package/dist/types/locales/es.d.ts +0 -2
  99. package/dist/types/locales/et.d.ts +0 -2
  100. package/dist/types/locales/fa.d.ts +0 -2
  101. package/dist/types/locales/fi.d.ts +0 -2
  102. package/dist/types/locales/fr.d.ts +0 -2
  103. package/dist/types/locales/hu.d.ts +0 -2
  104. package/dist/types/locales/hy.d.ts +0 -2
  105. package/dist/types/locales/id.d.ts +0 -2
  106. package/dist/types/locales/it.d.ts +0 -2
  107. package/dist/types/locales/ja.d.ts +0 -2
  108. package/dist/types/locales/ko.d.ts +0 -2
  109. package/dist/types/locales/nl.d.ts +0 -2
  110. package/dist/types/locales/no.d.ts +0 -2
  111. package/dist/types/locales/np.d.ts +0 -2
  112. package/dist/types/locales/pl.d.ts +0 -2
  113. package/dist/types/locales/pt-BR.d.ts +0 -2
  114. package/dist/types/locales/pt.d.ts +0 -2
  115. package/dist/types/locales/ro.d.ts +0 -2
  116. package/dist/types/locales/ru.d.ts +0 -2
  117. package/dist/types/locales/sk.d.ts +0 -2
  118. package/dist/types/locales/sr-Cyrl-RS.d.ts +0 -2
  119. package/dist/types/locales/sr-Latn-RS.d.ts +0 -2
  120. package/dist/types/locales/sv.d.ts +0 -2
  121. package/dist/types/locales/tr.d.ts +0 -2
  122. package/dist/types/locales/uk.d.ts +0 -2
  123. package/dist/types/locales/vi.d.ts +0 -2
  124. package/dist/types/locales/zh-Hans.d.ts +0 -2
  125. package/dist/types/locales/zh-Hant.d.ts +0 -2
  126. package/dist/types/menus/MRT_ColumnActionMenu.d.ts +0 -20
  127. package/dist/types/menus/MRT_FilterOptionMenu.d.ts +0 -13
  128. package/dist/types/menus/MRT_RowActionMenu.d.ts +0 -12
  129. package/dist/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -10
  130. package/dist/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -12
  131. package/dist/types/menus/index.d.ts +0 -5
  132. package/dist/types/modals/MRT_EditRowModal.d.ts +0 -8
  133. package/dist/types/modals/index.d.ts +0 -1
  134. package/dist/types/sortingFns.d.ts +0 -12
  135. package/dist/types/style.utils.d.ts +0 -32
  136. package/dist/types/table/MRT_Table.d.ts +0 -7
  137. package/dist/types/table/MRT_TableContainer.d.ts +0 -7
  138. package/dist/types/table/MRT_TableLoadingOverlay.d.ts +0 -7
  139. package/dist/types/table/MRT_TablePaper.d.ts +0 -7
  140. package/dist/types/table/index.d.ts +0 -5
  141. package/dist/types/toolbar/MRT_BottomToolbar.d.ts +0 -7
  142. package/dist/types/toolbar/MRT_LinearProgressBar.d.ts +0 -8
  143. package/dist/types/toolbar/MRT_TablePagination.d.ts +0 -14
  144. package/dist/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -8
  145. package/dist/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -7
  146. package/dist/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -7
  147. package/dist/types/toolbar/MRT_TopToolbar.d.ts +0 -6
  148. package/dist/types/toolbar/index.d.ts +0 -7
  149. package/dist/types/types.d.ts +0 -854
  150. package/dist/types/useMaterialReactTable.d.ts +0 -2
@@ -49,7 +49,7 @@ const MRT_Localization_FR = {
49
49
  groupByColumn: 'Grouper par {column}',
50
50
  groupedBy: 'Groupé par ',
51
51
  hideAll: 'Cacher tout',
52
- hideColumn: 'Cacher {column} colonne',
52
+ hideColumn: 'Cacher colonne {column}',
53
53
  max: 'Max',
54
54
  min: 'Min',
55
55
  move: 'Déplacer',
@@ -53,7 +53,7 @@ const MRT_Localization_FR = {
53
53
  groupByColumn: 'Grouper par {column}',
54
54
  groupedBy: 'Groupé par ',
55
55
  hideAll: 'Cacher tout',
56
- hideColumn: 'Cacher {column} colonne',
56
+ hideColumn: 'Cacher colonne {column}',
57
57
  max: 'Max',
58
58
  min: 'Min',
59
59
  move: 'Déplacer',
@@ -0,0 +1,3 @@
1
+ import { type MRT_Localization } from '../..';
2
+ export declare const MRT_Localization_HE: MRT_Localization;
3
+
@@ -0,0 +1,3 @@
1
+ import { type MRT_Localization } from '../..';
2
+ export declare const MRT_Localization_HE: MRT_Localization;
3
+
@@ -0,0 +1,93 @@
1
+ const MRT_Localization_HE = {
2
+ actions: 'פעולות',
3
+ and: 'ו',
4
+ cancel: 'ביטול',
5
+ changeFilterMode: 'שינוי מצב סינון',
6
+ changeSearchMode: 'שינוי מצב חיפוש',
7
+ clearFilter: 'נקה סינון',
8
+ clearSearch: 'נקה חיפוש',
9
+ clearSort: 'נקה מיון',
10
+ clickToCopy: 'לחץ להעתקה',
11
+ collapse: 'צמצום',
12
+ collapseAll: 'צמצום הכל',
13
+ columnActions: 'פעולות עמודה',
14
+ copiedToClipboard: 'הועתק ללוח',
15
+ dropToGroupBy: 'גרור לקיבוץ לפי {column}',
16
+ edit: 'ערוך',
17
+ expand: 'הרחב',
18
+ expandAll: 'הרחב הכל',
19
+ filterArrIncludes: 'כולל',
20
+ filterArrIncludesAll: 'כולל הכל',
21
+ filterArrIncludesSome: 'כולל',
22
+ filterBetween: 'בין',
23
+ filterBetweenInclusive: 'בין כולל',
24
+ filterByColumn: 'סנן לפי {column}',
25
+ filterContains: 'מכיל',
26
+ filterEmpty: 'ריק',
27
+ filterEndsWith: 'מסתיים ב',
28
+ filterEquals: 'שווה',
29
+ filterEqualsString: 'שווה',
30
+ filterFuzzy: 'פעיל',
31
+ filterGreaterThan: 'גדול מ',
32
+ filterGreaterThanOrEqualTo: 'גדול או שווה ל',
33
+ filterInNumberRange: 'בין',
34
+ filterIncludesString: 'מכיל',
35
+ filterIncludesStringSensitive: 'מכיל',
36
+ filterLessThan: 'קטן מ',
37
+ filterLessThanOrEqualTo: 'קטן או שווה ל',
38
+ filterMode: 'מצב סינון: {filterType}',
39
+ filterNotEmpty: 'לא ריק',
40
+ filterNotEquals: 'לא שווה',
41
+ filterStartsWith: 'מתחיל ב',
42
+ filterWeakEquals: 'שווה',
43
+ filteringByColumn: 'מסנן לפי {column} - {filterType} {filterValue}',
44
+ goToFirstPage: 'לדף הראשון',
45
+ goToLastPage: 'לדף האחרון',
46
+ goToNextPage: 'לדף הבא',
47
+ goToPreviousPage: 'לדף הקודם',
48
+ grab: 'תפוס',
49
+ groupByColumn: 'קיבוץ לפי {column}',
50
+ groupedBy: 'קובץ לפי',
51
+ hideAll: 'הסתר הכל',
52
+ hideColumn: 'הסתר עמודה {column}',
53
+ max: 'מקסימום',
54
+ min: 'מינימום',
55
+ move: 'הזז',
56
+ noRecordsToDisplay: 'אין רשומות להצגה',
57
+ noResultsFound: 'לא נמצאו תוצאות',
58
+ of: 'מתוך',
59
+ or: 'או',
60
+ pin: 'נעץ',
61
+ pinToLeft: 'נעץ לשמאל',
62
+ pinToRight: 'נעץ לימין',
63
+ resetColumnSize: 'איפוס גודל עמודה',
64
+ resetOrder: 'איפוס סדר',
65
+ rowActions: 'פעולות שורה',
66
+ rowNumber: '#',
67
+ rowNumbers: 'מספרי שורות',
68
+ rowsPerPage: 'שורות לעמוד',
69
+ save: 'שמור',
70
+ search: 'חיפוש',
71
+ selectedCountOfRowCountRowsSelected: '{selectedCount} מתוך {rowCount} שורות נבחרו',
72
+ select: 'בחר',
73
+ showAll: 'הצג הכל',
74
+ showAllColumns: 'הצג את כל העמודות',
75
+ showHideColumns: 'הצג/הסתר עמודות',
76
+ showHideFilters: 'הצג/הסתר סינונים',
77
+ showHideSearch: 'הצג/הסתר חיפוש',
78
+ sortByColumnAsc: 'מיין לפי {column} בסדר עולה',
79
+ sortByColumnDesc: 'מיין לפי {column} בסדר יורד',
80
+ sortedByColumnAsc: 'ממוין לפי {column} בסדר עולה',
81
+ sortedByColumnDesc: 'ממוין לפי {column} בסדר יורד',
82
+ thenBy: ', ואז לפי ',
83
+ toggleDensity: 'שנה צפיפות',
84
+ toggleFullScreen: 'מסך מלא',
85
+ toggleSelectAll: 'בחר/בטל בחירת הכל',
86
+ toggleSelectRow: 'בחר/בטל בחירת שורה',
87
+ toggleVisibility: 'הצג/הסתר',
88
+ ungroupByColumn: 'בטל קיבוץ לפי {column}',
89
+ unpin: 'בטל נעיצה',
90
+ unpinAll: 'בטל נעיצת הכל',
91
+ };
92
+
93
+ export { MRT_Localization_HE };
@@ -0,0 +1,97 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const MRT_Localization_HE = {
6
+ actions: 'פעולות',
7
+ and: 'ו',
8
+ cancel: 'ביטול',
9
+ changeFilterMode: 'שינוי מצב סינון',
10
+ changeSearchMode: 'שינוי מצב חיפוש',
11
+ clearFilter: 'נקה סינון',
12
+ clearSearch: 'נקה חיפוש',
13
+ clearSort: 'נקה מיון',
14
+ clickToCopy: 'לחץ להעתקה',
15
+ collapse: 'צמצום',
16
+ collapseAll: 'צמצום הכל',
17
+ columnActions: 'פעולות עמודה',
18
+ copiedToClipboard: 'הועתק ללוח',
19
+ dropToGroupBy: 'גרור לקיבוץ לפי {column}',
20
+ edit: 'ערוך',
21
+ expand: 'הרחב',
22
+ expandAll: 'הרחב הכל',
23
+ filterArrIncludes: 'כולל',
24
+ filterArrIncludesAll: 'כולל הכל',
25
+ filterArrIncludesSome: 'כולל',
26
+ filterBetween: 'בין',
27
+ filterBetweenInclusive: 'בין כולל',
28
+ filterByColumn: 'סנן לפי {column}',
29
+ filterContains: 'מכיל',
30
+ filterEmpty: 'ריק',
31
+ filterEndsWith: 'מסתיים ב',
32
+ filterEquals: 'שווה',
33
+ filterEqualsString: 'שווה',
34
+ filterFuzzy: 'פעיל',
35
+ filterGreaterThan: 'גדול מ',
36
+ filterGreaterThanOrEqualTo: 'גדול או שווה ל',
37
+ filterInNumberRange: 'בין',
38
+ filterIncludesString: 'מכיל',
39
+ filterIncludesStringSensitive: 'מכיל',
40
+ filterLessThan: 'קטן מ',
41
+ filterLessThanOrEqualTo: 'קטן או שווה ל',
42
+ filterMode: 'מצב סינון: {filterType}',
43
+ filterNotEmpty: 'לא ריק',
44
+ filterNotEquals: 'לא שווה',
45
+ filterStartsWith: 'מתחיל ב',
46
+ filterWeakEquals: 'שווה',
47
+ filteringByColumn: 'מסנן לפי {column} - {filterType} {filterValue}',
48
+ goToFirstPage: 'לדף הראשון',
49
+ goToLastPage: 'לדף האחרון',
50
+ goToNextPage: 'לדף הבא',
51
+ goToPreviousPage: 'לדף הקודם',
52
+ grab: 'תפוס',
53
+ groupByColumn: 'קיבוץ לפי {column}',
54
+ groupedBy: 'קובץ לפי',
55
+ hideAll: 'הסתר הכל',
56
+ hideColumn: 'הסתר עמודה {column}',
57
+ max: 'מקסימום',
58
+ min: 'מינימום',
59
+ move: 'הזז',
60
+ noRecordsToDisplay: 'אין רשומות להצגה',
61
+ noResultsFound: 'לא נמצאו תוצאות',
62
+ of: 'מתוך',
63
+ or: 'או',
64
+ pin: 'נעץ',
65
+ pinToLeft: 'נעץ לשמאל',
66
+ pinToRight: 'נעץ לימין',
67
+ resetColumnSize: 'איפוס גודל עמודה',
68
+ resetOrder: 'איפוס סדר',
69
+ rowActions: 'פעולות שורה',
70
+ rowNumber: '#',
71
+ rowNumbers: 'מספרי שורות',
72
+ rowsPerPage: 'שורות לעמוד',
73
+ save: 'שמור',
74
+ search: 'חיפוש',
75
+ selectedCountOfRowCountRowsSelected: '{selectedCount} מתוך {rowCount} שורות נבחרו',
76
+ select: 'בחר',
77
+ showAll: 'הצג הכל',
78
+ showAllColumns: 'הצג את כל העמודות',
79
+ showHideColumns: 'הצג/הסתר עמודות',
80
+ showHideFilters: 'הצג/הסתר סינונים',
81
+ showHideSearch: 'הצג/הסתר חיפוש',
82
+ sortByColumnAsc: 'מיין לפי {column} בסדר עולה',
83
+ sortByColumnDesc: 'מיין לפי {column} בסדר יורד',
84
+ sortedByColumnAsc: 'ממוין לפי {column} בסדר עולה',
85
+ sortedByColumnDesc: 'ממוין לפי {column} בסדר יורד',
86
+ thenBy: ', ואז לפי ',
87
+ toggleDensity: 'שנה צפיפות',
88
+ toggleFullScreen: 'מסך מלא',
89
+ toggleSelectAll: 'בחר/בטל בחירת הכל',
90
+ toggleSelectRow: 'בחר/בטל בחירת שורה',
91
+ toggleVisibility: 'הצג/הסתר',
92
+ ungroupByColumn: 'בטל קיבוץ לפי {column}',
93
+ unpin: 'בטל נעיצה',
94
+ unpinAll: 'בטל נעיצת הכל',
95
+ };
96
+
97
+ exports.MRT_Localization_HE = MRT_Localization_HE;
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "index.js",
3
+ "module": "index.esm.js",
4
+ "sideEffects": false,
5
+ "types": "index.d.ts"
6
+ }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.5",
2
+ "version": "2.1.0",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -61,32 +61,32 @@
61
61
  "storybook:dev": "storybook dev -p 6006"
62
62
  },
63
63
  "devDependencies": {
64
- "@babel/core": "^7.23.5",
64
+ "@babel/core": "^7.23.6",
65
65
  "@babel/preset-react": "^7.23.3",
66
66
  "@emotion/react": "^11.11.1",
67
67
  "@emotion/styled": "^11.11.0",
68
68
  "@faker-js/faker": "^8.3.1",
69
- "@mui/icons-material": "^5.14.19",
70
- "@mui/material": "^5.14.19",
71
- "@mui/x-date-pickers": "^6.18.3",
69
+ "@mui/icons-material": "^5.15.1",
70
+ "@mui/material": "^5.15.1",
71
+ "@mui/x-date-pickers": "^6.18.5",
72
72
  "@rollup/plugin-typescript": "^11.1.5",
73
- "@size-limit/preset-small-lib": "^11.0.0",
74
- "@storybook/addon-a11y": "^7.6.3",
75
- "@storybook/addon-essentials": "^7.6.3",
76
- "@storybook/addon-interactions": "^7.6.3",
77
- "@storybook/addon-links": "^7.6.3",
78
- "@storybook/addon-storysource": "^7.6.3",
79
- "@storybook/blocks": "^7.6.3",
80
- "@storybook/react": "^7.6.3",
81
- "@storybook/react-vite": "^7.6.3",
73
+ "@size-limit/preset-small-lib": "^11.0.1",
74
+ "@storybook/addon-a11y": "^7.6.6",
75
+ "@storybook/addon-essentials": "^7.6.6",
76
+ "@storybook/addon-interactions": "^7.6.6",
77
+ "@storybook/addon-links": "^7.6.6",
78
+ "@storybook/addon-storysource": "^7.6.6",
79
+ "@storybook/blocks": "^7.6.6",
80
+ "@storybook/react": "^7.6.6",
81
+ "@storybook/react-vite": "^7.6.6",
82
82
  "@storybook/testing-library": "^0.2.2",
83
- "@types/node": "^20.10.3",
84
- "@types/react": "^18.2.42",
85
- "@types/react-dom": "^18.2.17",
86
- "@typescript-eslint/eslint-plugin": "^6.13.2",
87
- "@typescript-eslint/parser": "^6.13.2",
83
+ "@types/node": "^20.10.5",
84
+ "@types/react": "^18.2.45",
85
+ "@types/react-dom": "^18.2.18",
86
+ "@typescript-eslint/eslint-plugin": "^6.15.0",
87
+ "@typescript-eslint/parser": "^6.15.0",
88
88
  "@vitejs/plugin-react": "^4.2.1",
89
- "eslint": "^8.55.0",
89
+ "eslint": "^8.56.0",
90
90
  "eslint-plugin-mui-path-imports": "^0.0.15",
91
91
  "eslint-plugin-perfectionist": "^2.5.0",
92
92
  "prop-types": "^15.8.1",
@@ -96,12 +96,12 @@
96
96
  "rollup": "^2.79.1",
97
97
  "rollup-plugin-dts": "^6.1.0",
98
98
  "rollup-plugin-peer-deps-external": "^2.2.4",
99
- "size-limit": "^11.0.0",
100
- "storybook": "^7.6.3",
99
+ "size-limit": "^11.0.1",
100
+ "storybook": "^7.6.6",
101
101
  "storybook-dark-mode": "^3.0.3",
102
102
  "tslib": "^2.6.2",
103
- "typescript": "^5.3.2",
104
- "vite": "^5.0.5"
103
+ "typescript": "^5.3.3",
104
+ "vite": "^5.0.10"
105
105
  },
106
106
  "peerDependencies": {
107
107
  "@emotion/react": ">=11.11",
@@ -114,7 +114,7 @@
114
114
  },
115
115
  "dependencies": {
116
116
  "@tanstack/match-sorter-utils": "8.8.4",
117
- "@tanstack/react-table": "8.10.7",
117
+ "@tanstack/react-table": "8.11.2",
118
118
  "@tanstack/react-virtual": "3.0.1",
119
119
  "highlight-words": "1.2.2"
120
120
  }
@@ -50,6 +50,7 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
50
50
  const {
51
51
  getState,
52
52
  options: {
53
+ columnResizeDirection,
53
54
  columnResizeMode,
54
55
  createDisplayMode,
55
56
  editDisplayMode,
@@ -119,28 +120,28 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
119
120
  const isFirstColumn = getIsFirstColumn(column, table);
120
121
  const isLastColumn = getIsLastColumn(column, table);
121
122
  const isLastRow = numRows && rowIndex === numRows - 1;
123
+ const isResizingColumn = columnSizingInfo.isResizingColumn === column.id;
122
124
  const showResizeBorder =
123
- columnSizingInfo.isResizingColumn === column.id &&
124
- columnResizeMode === 'onChange';
125
+ isResizingColumn && columnResizeMode === 'onChange';
125
126
 
126
127
  const borderStyle = showResizeBorder
127
128
  ? `2px solid ${draggingBorderColor} !important`
128
129
  : isDraggingColumn || isDraggingRow
129
- ? `1px dashed ${theme.palette.grey[500]} !important`
130
- : isHoveredColumn ||
131
- isHoveredRow ||
132
- columnSizingInfo.isResizingColumn === column.id
133
- ? `2px dashed ${draggingBorderColor} !important`
134
- : undefined;
130
+ ? `1px dashed ${theme.palette.grey[500]} !important`
131
+ : isHoveredColumn || isHoveredRow || isResizingColumn
132
+ ? `2px dashed ${draggingBorderColor} !important`
133
+ : undefined;
135
134
 
136
135
  if (showResizeBorder) {
137
- return { borderRight: borderStyle };
136
+ return columnResizeDirection === 'ltr'
137
+ ? { borderRight: borderStyle }
138
+ : { borderLeft: borderStyle };
138
139
  }
139
140
 
140
141
  return borderStyle
141
142
  ? {
142
143
  borderBottom:
143
- isDraggingRow || isHoveredRow || isLastRow
144
+ isDraggingRow || isHoveredRow || (isLastRow && !isResizingColumn)
144
145
  ? borderStyle
145
146
  : undefined,
146
147
  borderLeft:
@@ -168,6 +169,7 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
168
169
  ]);
169
170
 
170
171
  const isEditable =
172
+ !cell.getIsPlaceholder() &&
171
173
  parseFromValuesOrFunc(enableEditing, row) &&
172
174
  parseFromValuesOrFunc(columnDef.enableEditing, row) !== false;
173
175
 
@@ -222,7 +224,8 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
222
224
  sx={(theme) => ({
223
225
  '&:hover': {
224
226
  outline:
225
- ['cell', 'table'].includes(editDisplayMode ?? '') && isEditable
227
+ (editDisplayMode === 'cell' && isEditable) ||
228
+ (editDisplayMode === 'table' && (isCreating || isEditing))
226
229
  ? `1px solid ${theme.palette.grey[500]}`
227
230
  : undefined,
228
231
  outlineOffset: '-1px',
@@ -241,12 +244,12 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
241
244
  ? '0 0.5rem'
242
245
  : '0.5rem'
243
246
  : density === 'comfortable'
244
- ? columnDefType === 'display'
245
- ? '0.5rem 0.75rem'
246
- : '1rem'
247
- : columnDefType === 'display'
248
- ? '1rem 1.25rem'
249
- : '1.5rem',
247
+ ? columnDefType === 'display'
248
+ ? '0.5rem 0.75rem'
249
+ : '1rem'
250
+ : columnDefType === 'display'
251
+ ? '1rem 1.25rem'
252
+ : '1.5rem',
250
253
  textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined,
251
254
  [theme.direction === 'rtl' ? 'pr' : 'pl']:
252
255
  column.id === 'mrt-row-expand'
@@ -255,8 +258,8 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
255
258
  (density === 'compact'
256
259
  ? 0.5
257
260
  : density === 'comfortable'
258
- ? 0.75
259
- : 1.25)
261
+ ? 0.75
262
+ : 1.25)
260
263
  }rem`
261
264
  : undefined,
262
265
  whiteSpace:
@@ -37,15 +37,15 @@ export const MRT_TableBodyCellValue = <TData extends MRT_RowData>({
37
37
  table,
38
38
  })
39
39
  : row.getIsGrouped() && !cell.getIsGrouped()
40
- ? null
41
- : cell.getIsGrouped() && columnDef.GroupedCell
42
- ? columnDef.GroupedCell({
43
- cell,
44
- column,
45
- row,
46
- table,
47
- })
48
- : undefined;
40
+ ? null
41
+ : cell.getIsGrouped() && columnDef.GroupedCell
42
+ ? columnDef.GroupedCell({
43
+ cell,
44
+ column,
45
+ row,
46
+ table,
47
+ })
48
+ : undefined;
49
49
 
50
50
  const isGroupedValue = renderedCellValue !== undefined;
51
51
 
@@ -153,8 +153,8 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
153
153
  ? row.getIsSelected()
154
154
  ? `${alpha(selectedRowBackgroundColor, 0.3)}`
155
155
  : theme.palette.mode === 'dark'
156
- ? `${lighten(baseBackgroundColor, 0.05)}`
157
- : `${darken(baseBackgroundColor, 0.05)}`
156
+ ? `${lighten(baseBackgroundColor, 0.05)}`
157
+ : `${darken(baseBackgroundColor, 0.05)}`
158
158
  : undefined,
159
159
  },
160
160
  backgroundColor: `${baseBackgroundColor} !important`,
@@ -170,28 +170,28 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
170
170
  opacity: isPinned
171
171
  ? 0.97
172
172
  : draggingRow?.id === row.id || hoveredRow?.id === row.id
173
- ? 0.5
174
- : 1,
173
+ ? 0.5
174
+ : 1,
175
175
  position: virtualRow
176
176
  ? 'absolute'
177
177
  : rowPinningDisplayMode?.includes('sticky') && isPinned
178
- ? 'sticky'
179
- : undefined,
178
+ ? 'sticky'
179
+ : undefined,
180
180
  td: {
181
181
  backgroundColor: row.getIsSelected()
182
182
  ? selectedRowBackgroundColor
183
183
  : isPinned
184
- ? pinnedRowBackgroundColor
185
- : undefined,
184
+ ? pinnedRowBackgroundColor
185
+ : undefined,
186
186
  },
187
187
  top: virtualRow
188
188
  ? 0
189
189
  : topPinnedIndex !== undefined && isPinned
190
- ? `${
191
- topPinnedIndex * rowHeight +
192
- (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)
193
- }px`
194
- : undefined,
190
+ ? `${
191
+ topPinnedIndex * rowHeight +
192
+ (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)
193
+ }px`
194
+ : undefined,
195
195
  transition: virtualRow ? 'none' : 'all 150ms ease-in-out',
196
196
  width: '100%',
197
197
  zIndex:
@@ -69,8 +69,8 @@ export const MRT_RowPinButton = <TData extends MRT_RowData>({
69
69
  rowPinningDisplayMode === 'sticky'
70
70
  ? 135
71
71
  : pinningPosition === 'top'
72
- ? 180
73
- : 0
72
+ ? 180
73
+ : 0
74
74
  }deg)`,
75
75
  }}
76
76
  />
@@ -25,8 +25,8 @@ export const MRT_ToggleDensePaddingButton = <TData extends MRT_RowData>({
25
25
  density === 'comfortable'
26
26
  ? 'compact'
27
27
  : density === 'compact'
28
- ? 'spacious'
29
- : 'comfortable';
28
+ ? 'spacious'
29
+ : 'comfortable';
30
30
  setDensity(nextDensity);
31
31
  };
32
32
 
@@ -47,8 +47,8 @@ export const MRT_TableFooterCell = <TData extends MRT_RowData>({
47
47
  density === 'compact'
48
48
  ? '0.5rem'
49
49
  : density === 'comfortable'
50
- ? '1rem'
51
- : '1.5rem',
50
+ ? '1rem'
51
+ : '1.5rem',
52
52
  verticalAlign: 'top',
53
53
  zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1,
54
54
  ...getCommonMRTCellStyles({
@@ -32,6 +32,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
32
32
  getState,
33
33
  options: {
34
34
  columnFilterDisplayMode,
35
+ columnResizeDirection,
35
36
  columnResizeMode,
36
37
  enableColumnActions,
37
38
  enableColumnDragging,
@@ -97,13 +98,15 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
97
98
  const borderStyle = showResizeBorder
98
99
  ? `2px solid ${draggingBorderColor} !important`
99
100
  : draggingColumn?.id === column.id
100
- ? `1px dashed ${theme.palette.grey[500]}`
101
- : hoveredColumn?.id === column.id
102
- ? `2px dashed ${draggingBorderColor}`
103
- : undefined;
101
+ ? `1px dashed ${theme.palette.grey[500]}`
102
+ : hoveredColumn?.id === column.id
103
+ ? `2px dashed ${draggingBorderColor}`
104
+ : undefined;
104
105
 
105
106
  if (showResizeBorder) {
106
- return { borderRight: borderStyle };
107
+ return columnResizeDirection === 'ltr'
108
+ ? { borderRight: borderStyle }
109
+ : { borderLeft: borderStyle };
107
110
  }
108
111
  const draggingBorders = borderStyle
109
112
  ? {
@@ -158,32 +161,32 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
158
161
  density === 'compact'
159
162
  ? '0.5rem'
160
163
  : density === 'comfortable'
161
- ? columnDefType === 'display'
162
- ? '0.75rem'
163
- : '1rem'
164
- : columnDefType === 'display'
165
- ? '1rem 1.25rem'
166
- : '1.5rem',
164
+ ? columnDefType === 'display'
165
+ ? '0.75rem'
166
+ : '1rem'
167
+ : columnDefType === 'display'
168
+ ? '1rem 1.25rem'
169
+ : '1.5rem',
167
170
  pb:
168
171
  columnDefType === 'display'
169
172
  ? 0
170
173
  : showColumnFilters || density === 'compact'
171
- ? '0.4rem'
172
- : '0.6rem',
174
+ ? '0.4rem'
175
+ : '0.6rem',
173
176
  pt:
174
177
  columnDefType === 'group' || density === 'compact'
175
178
  ? '0.25rem'
176
179
  : density === 'comfortable'
177
- ? '.75rem'
178
- : '1.25rem',
180
+ ? '.75rem'
181
+ : '1.25rem',
179
182
  userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined,
180
183
  verticalAlign: 'top',
181
184
  zIndex:
182
185
  column.getIsResizing() || draggingColumn?.id === column.id
183
186
  ? 3
184
187
  : column.getIsPinned() && columnDefType !== 'group'
185
- ? 2
186
- : 1,
188
+ ? 2
189
+ : 1,
187
190
  ...getCommonMRTCellStyles({
188
191
  column,
189
192
  header,
@@ -209,8 +212,8 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
209
212
  tableCellProps?.align === 'center'
210
213
  ? 'center'
211
214
  : column.getCanResize()
212
- ? 'space-between'
213
- : 'flex-start',
215
+ ? 'space-between'
216
+ : 'flex-start',
214
217
  position: 'relative',
215
218
  width: '100%',
216
219
  }}
@@ -264,7 +267,9 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
264
267
  {columnDefType !== 'group' && (
265
268
  <Box
266
269
  className="Mui-TableHeadCell-Content-Actions"
267
- sx={{ whiteSpace: 'nowrap' }}
270
+ sx={{
271
+ whiteSpace: 'nowrap',
272
+ }}
268
273
  >
269
274
  {showDragHandle && (
270
275
  <MRT_TableHeadCellGrabHandle