@mui/x-data-grid 7.16.0 → 7.18.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/CHANGELOG.md +184 -4
- package/DataGrid/DataGrid.js +11 -1
- package/DataGrid/useDataGridComponent.js +3 -0
- package/DataGrid/useDataGridProps.js +2 -1
- package/colDef/gridStringOperators.js +49 -33
- package/components/GridRow.js +1 -0
- package/components/cell/GridCell.js +30 -5
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/components/containers/GridRootStyles.js +3 -7
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/constants/gridClasses.d.ts +10 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +4 -0
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/hooks/features/editing/useGridCellEditing.js +3 -19
- package/hooks/features/editing/useGridRowEditing.js +7 -2
- package/hooks/features/editing/utils.d.ts +2 -0
- package/hooks/features/editing/utils.js +15 -0
- package/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/hooks/features/export/useGridPrintExport.js +2 -1
- package/hooks/features/filter/gridFilterUtils.js +1 -1
- package/hooks/features/focus/useGridFocus.js +2 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/hooks/features/keyboardNavigation/utils.d.ts +17 -0
- package/hooks/features/keyboardNavigation/utils.js +58 -0
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +4 -0
- package/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +10 -0
- package/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/hooks/features/rows/useGridRowSpanning.d.ts +27 -0
- package/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/hooks/utils/useGridApiEventHandler.js +0 -1
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +1 -2
- package/internals/utils/propValidation.js +1 -1
- package/locales/arSD.js +4 -0
- package/locales/beBY.js +4 -0
- package/locales/bgBG.js +4 -0
- package/locales/csCZ.js +4 -0
- package/locales/daDK.js +4 -0
- package/locales/deDE.js +4 -0
- package/locales/elGR.js +4 -0
- package/locales/esES.js +4 -0
- package/locales/faIR.js +4 -0
- package/locales/fiFI.js +4 -0
- package/locales/frFR.js +4 -0
- package/locales/heIL.js +4 -0
- package/locales/hrHR.js +4 -0
- package/locales/huHU.js +11 -8
- package/locales/isIS.js +4 -0
- package/locales/itIT.js +4 -0
- package/locales/jaJP.js +4 -0
- package/locales/koKR.js +4 -0
- package/locales/nbNO.js +4 -0
- package/locales/nlNL.js +4 -0
- package/locales/nnNO.js +4 -0
- package/locales/plPL.js +4 -0
- package/locales/ptBR.js +4 -0
- package/locales/ptPT.js +4 -0
- package/locales/roRO.js +4 -0
- package/locales/ruRU.js +4 -0
- package/locales/skSK.js +4 -0
- package/locales/svSE.js +4 -0
- package/locales/trTR.js +4 -0
- package/locales/ukUA.js +4 -0
- package/locales/urPK.js +4 -0
- package/locales/viVN.js +4 -0
- package/locales/zhCN.js +4 -0
- package/locales/zhHK.js +4 -0
- package/locales/zhTW.js +4 -0
- package/models/api/gridLocaleTextApi.d.ts +4 -0
- package/models/colDef/gridColDef.d.ts +4 -0
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +10 -0
- package/modern/DataGrid/DataGrid.js +11 -1
- package/modern/DataGrid/useDataGridComponent.js +3 -0
- package/modern/DataGrid/useDataGridProps.js +2 -1
- package/modern/colDef/gridStringOperators.js +49 -33
- package/modern/components/GridRow.js +1 -0
- package/modern/components/cell/GridCell.js +30 -5
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/modern/components/containers/GridRootStyles.js +3 -7
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -0
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/modern/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -19
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -2
- package/modern/hooks/features/editing/utils.js +15 -0
- package/modern/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/modern/hooks/features/export/useGridPrintExport.js +2 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +1 -1
- package/modern/hooks/features/focus/useGridFocus.js +2 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/modern/hooks/features/keyboardNavigation/utils.js +58 -0
- package/modern/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/modern/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/modern/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/modern/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/modern/hooks/utils/useGridApiEventHandler.js +0 -1
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/index.js +1 -2
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/arSD.js +4 -0
- package/modern/locales/beBY.js +4 -0
- package/modern/locales/bgBG.js +4 -0
- package/modern/locales/csCZ.js +4 -0
- package/modern/locales/daDK.js +4 -0
- package/modern/locales/deDE.js +4 -0
- package/modern/locales/elGR.js +4 -0
- package/modern/locales/esES.js +4 -0
- package/modern/locales/faIR.js +4 -0
- package/modern/locales/fiFI.js +4 -0
- package/modern/locales/frFR.js +4 -0
- package/modern/locales/heIL.js +4 -0
- package/modern/locales/hrHR.js +4 -0
- package/modern/locales/huHU.js +11 -8
- package/modern/locales/isIS.js +4 -0
- package/modern/locales/itIT.js +4 -0
- package/modern/locales/jaJP.js +4 -0
- package/modern/locales/koKR.js +4 -0
- package/modern/locales/nbNO.js +4 -0
- package/modern/locales/nlNL.js +4 -0
- package/modern/locales/nnNO.js +4 -0
- package/modern/locales/plPL.js +4 -0
- package/modern/locales/ptBR.js +4 -0
- package/modern/locales/ptPT.js +4 -0
- package/modern/locales/roRO.js +4 -0
- package/modern/locales/ruRU.js +4 -0
- package/modern/locales/skSK.js +4 -0
- package/modern/locales/svSE.js +4 -0
- package/modern/locales/trTR.js +4 -0
- package/modern/locales/ukUA.js +4 -0
- package/modern/locales/urPK.js +4 -0
- package/modern/locales/viVN.js +4 -0
- package/modern/locales/zhCN.js +4 -0
- package/modern/locales/zhHK.js +4 -0
- package/modern/locales/zhTW.js +4 -0
- package/modern/utils/createSelector.js +1 -1
- package/modern/utils/domUtils.js +12 -12
- package/node/DataGrid/DataGrid.js +11 -1
- package/node/DataGrid/useDataGridComponent.js +3 -0
- package/node/DataGrid/useDataGridProps.js +2 -1
- package/node/colDef/gridStringOperators.js +49 -33
- package/node/components/GridRow.js +1 -0
- package/node/components/cell/GridCell.js +30 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/node/components/containers/GridRootStyles.js +3 -7
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -0
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/node/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/node/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/node/hooks/features/editing/useGridCellEditing.js +3 -19
- package/node/hooks/features/editing/useGridRowEditing.js +7 -2
- package/node/hooks/features/editing/utils.js +22 -0
- package/node/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/node/hooks/features/export/useGridPrintExport.js +2 -1
- package/node/hooks/features/filter/gridFilterUtils.js +1 -1
- package/node/hooks/features/focus/useGridFocus.js +2 -1
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +16 -53
- package/node/hooks/features/keyboardNavigation/utils.js +68 -0
- package/node/hooks/features/rows/gridRowSpanningSelectors.js +11 -0
- package/node/hooks/features/rows/gridRowSpanningUtils.js +52 -0
- package/node/hooks/features/rows/useGridRowSpanning.js +267 -0
- package/node/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/node/hooks/utils/useGridApiEventHandler.js +0 -1
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +15 -0
- package/node/internals/utils/index.js +0 -11
- package/node/internals/utils/propValidation.js +1 -1
- package/node/locales/arSD.js +4 -0
- package/node/locales/beBY.js +4 -0
- package/node/locales/bgBG.js +4 -0
- package/node/locales/csCZ.js +4 -0
- package/node/locales/daDK.js +4 -0
- package/node/locales/deDE.js +4 -0
- package/node/locales/elGR.js +4 -0
- package/node/locales/esES.js +4 -0
- package/node/locales/faIR.js +4 -0
- package/node/locales/fiFI.js +4 -0
- package/node/locales/frFR.js +4 -0
- package/node/locales/heIL.js +4 -0
- package/node/locales/hrHR.js +4 -0
- package/node/locales/huHU.js +11 -8
- package/node/locales/isIS.js +4 -0
- package/node/locales/itIT.js +4 -0
- package/node/locales/jaJP.js +4 -0
- package/node/locales/koKR.js +4 -0
- package/node/locales/nbNO.js +4 -0
- package/node/locales/nlNL.js +4 -0
- package/node/locales/nnNO.js +4 -0
- package/node/locales/plPL.js +4 -0
- package/node/locales/ptBR.js +4 -0
- package/node/locales/ptPT.js +4 -0
- package/node/locales/roRO.js +4 -0
- package/node/locales/ruRU.js +4 -0
- package/node/locales/skSK.js +4 -0
- package/node/locales/svSE.js +4 -0
- package/node/locales/trTR.js +4 -0
- package/node/locales/ukUA.js +4 -0
- package/node/locales/urPK.js +4 -0
- package/node/locales/viVN.js +4 -0
- package/node/locales/zhCN.js +4 -0
- package/node/locales/zhHK.js +4 -0
- package/node/locales/zhTW.js +4 -0
- package/node/utils/createSelector.js +1 -1
- package/node/utils/domUtils.js +12 -12
- package/package.json +3 -3
- package/utils/createSelector.js +1 -1
- package/utils/domUtils.d.ts +4 -4
- package/utils/domUtils.js +12 -12
- package/internals/utils/warning.d.ts +0 -2
- package/internals/utils/warning.js +0 -21
- package/modern/internals/utils/warning.js +0 -21
- package/node/internals/utils/warning.js +0 -28
package/modern/locales/ukUA.js
CHANGED
|
@@ -63,7 +63,9 @@ const ukUAGrid = {
|
|
|
63
63
|
filterPanelInputPlaceholder: 'Значення фільтра',
|
|
64
64
|
// Filter operators text
|
|
65
65
|
filterOperatorContains: 'містить',
|
|
66
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
66
67
|
filterOperatorEquals: 'дорівнює',
|
|
68
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
67
69
|
filterOperatorStartsWith: 'починається з',
|
|
68
70
|
filterOperatorEndsWith: 'закінчується на',
|
|
69
71
|
filterOperatorIs: 'дорівнює',
|
|
@@ -83,7 +85,9 @@ const ukUAGrid = {
|
|
|
83
85
|
'filterOperator<=': '<=',
|
|
84
86
|
// Header filter operators text
|
|
85
87
|
headerFilterOperatorContains: 'Містить',
|
|
88
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
86
89
|
headerFilterOperatorEquals: 'Дорівнює',
|
|
90
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
87
91
|
headerFilterOperatorStartsWith: 'Починається з',
|
|
88
92
|
headerFilterOperatorEndsWith: 'Закінчується на',
|
|
89
93
|
headerFilterOperatorIs: 'Дорівнює',
|
package/modern/locales/urPK.js
CHANGED
|
@@ -48,7 +48,9 @@ const urPKGrid = {
|
|
|
48
48
|
filterPanelInputPlaceholder: 'ویلیو کو فلٹر کریں',
|
|
49
49
|
// Filter operators text
|
|
50
50
|
filterOperatorContains: 'شامل ہے',
|
|
51
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
51
52
|
filterOperatorEquals: 'برابر ہے',
|
|
53
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
52
54
|
filterOperatorStartsWith: 'شروع ہوتا ہے',
|
|
53
55
|
filterOperatorEndsWith: 'ختم ہوتا ہے',
|
|
54
56
|
filterOperatorIs: 'ہے',
|
|
@@ -68,7 +70,9 @@ const urPKGrid = {
|
|
|
68
70
|
'filterOperator<=': '<=',
|
|
69
71
|
// Header filter operators text
|
|
70
72
|
headerFilterOperatorContains: 'شامل ہے',
|
|
73
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
71
74
|
headerFilterOperatorEquals: 'برابر ہے',
|
|
75
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
72
76
|
headerFilterOperatorStartsWith: 'شروع ہوتا ہے',
|
|
73
77
|
headerFilterOperatorEndsWith: 'ختم ہوتا ہے',
|
|
74
78
|
headerFilterOperatorIs: 'ہے',
|
package/modern/locales/viVN.js
CHANGED
|
@@ -47,7 +47,9 @@ const viVNGrid = {
|
|
|
47
47
|
filterPanelInputPlaceholder: 'Lọc giá trị',
|
|
48
48
|
// Filter operators text
|
|
49
49
|
filterOperatorContains: 'Chứa',
|
|
50
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
50
51
|
filterOperatorEquals: 'Bằng',
|
|
52
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
51
53
|
filterOperatorStartsWith: 'Bắt đầu bằng',
|
|
52
54
|
filterOperatorEndsWith: 'Kết thúc bằng',
|
|
53
55
|
filterOperatorIs: 'Là',
|
|
@@ -67,7 +69,9 @@ const viVNGrid = {
|
|
|
67
69
|
'filterOperator<=': '<=',
|
|
68
70
|
// Header filter operators text
|
|
69
71
|
headerFilterOperatorContains: 'Chứa',
|
|
72
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
70
73
|
headerFilterOperatorEquals: 'Bằng',
|
|
74
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
71
75
|
headerFilterOperatorStartsWith: 'Bắt đầu với',
|
|
72
76
|
headerFilterOperatorEndsWith: 'Kết thúc với',
|
|
73
77
|
headerFilterOperatorIs: 'là',
|
package/modern/locales/zhCN.js
CHANGED
|
@@ -47,7 +47,9 @@ const zhCNGrid = {
|
|
|
47
47
|
filterPanelInputPlaceholder: '筛选值',
|
|
48
48
|
// Filter operators text
|
|
49
49
|
filterOperatorContains: '包含',
|
|
50
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
50
51
|
filterOperatorEquals: '等于',
|
|
52
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
51
53
|
filterOperatorStartsWith: '开始于',
|
|
52
54
|
filterOperatorEndsWith: '结束于',
|
|
53
55
|
filterOperatorIs: '是',
|
|
@@ -67,7 +69,9 @@ const zhCNGrid = {
|
|
|
67
69
|
'filterOperator<=': '<=',
|
|
68
70
|
// Header filter operators text
|
|
69
71
|
headerFilterOperatorContains: '包含',
|
|
72
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
70
73
|
headerFilterOperatorEquals: '等于',
|
|
74
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
71
75
|
headerFilterOperatorStartsWith: '开始于',
|
|
72
76
|
headerFilterOperatorEndsWith: '结束于',
|
|
73
77
|
headerFilterOperatorIs: '是',
|
package/modern/locales/zhHK.js
CHANGED
|
@@ -48,7 +48,9 @@ const zhHKGrid = {
|
|
|
48
48
|
filterPanelInputPlaceholder: '過濾值',
|
|
49
49
|
// Filter operators text
|
|
50
50
|
filterOperatorContains: '包含',
|
|
51
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
51
52
|
filterOperatorEquals: '等於',
|
|
53
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
52
54
|
filterOperatorStartsWith: '以。。開始',
|
|
53
55
|
filterOperatorEndsWith: '以。。結束',
|
|
54
56
|
filterOperatorIs: '是',
|
|
@@ -68,7 +70,9 @@ const zhHKGrid = {
|
|
|
68
70
|
'filterOperator<=': '<=',
|
|
69
71
|
// Header filter operators text
|
|
70
72
|
headerFilterOperatorContains: '包含',
|
|
73
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
71
74
|
headerFilterOperatorEquals: '等於',
|
|
75
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
72
76
|
headerFilterOperatorStartsWith: '以。。開始',
|
|
73
77
|
headerFilterOperatorEndsWith: '以。。結束',
|
|
74
78
|
headerFilterOperatorIs: '是',
|
package/modern/locales/zhTW.js
CHANGED
|
@@ -48,7 +48,9 @@ const zhTWGrid = {
|
|
|
48
48
|
filterPanelInputPlaceholder: '篩選值',
|
|
49
49
|
// Filter operators text
|
|
50
50
|
filterOperatorContains: '包含',
|
|
51
|
+
// filterOperatorDoesNotContain: 'does not contain',
|
|
51
52
|
filterOperatorEquals: '等於',
|
|
53
|
+
// filterOperatorDoesNotEqual: 'does not equal',
|
|
52
54
|
filterOperatorStartsWith: '以...開頭',
|
|
53
55
|
filterOperatorEndsWith: '以...結束',
|
|
54
56
|
filterOperatorIs: '為',
|
|
@@ -68,7 +70,9 @@ const zhTWGrid = {
|
|
|
68
70
|
'filterOperator<=': '<=',
|
|
69
71
|
// Header filter operators text
|
|
70
72
|
headerFilterOperatorContains: '包含',
|
|
73
|
+
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
71
74
|
headerFilterOperatorEquals: '等於',
|
|
75
|
+
// headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
72
76
|
headerFilterOperatorStartsWith: '以...開頭',
|
|
73
77
|
headerFilterOperatorEndsWith: '以...結束',
|
|
74
78
|
headerFilterOperatorIs: '為',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { lruMemoize, createSelectorCreator } from 'reselect';
|
|
2
|
-
import { warnOnce } from
|
|
2
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
3
3
|
const reselectCreateSelector = createSelectorCreator({
|
|
4
4
|
memoize: lruMemoize,
|
|
5
5
|
memoizeOptions: {
|
package/modern/utils/domUtils.js
CHANGED
|
@@ -120,22 +120,22 @@ const findPinnedCells = ({
|
|
|
120
120
|
});
|
|
121
121
|
return cells;
|
|
122
122
|
};
|
|
123
|
-
export function findLeftPinnedCellsAfterCol(api, col) {
|
|
123
|
+
export function findLeftPinnedCellsAfterCol(api, col, isRtl) {
|
|
124
124
|
const colIndex = parseCellColIndex(col);
|
|
125
125
|
return findPinnedCells({
|
|
126
126
|
api,
|
|
127
127
|
colIndex,
|
|
128
|
-
position: 'left',
|
|
129
|
-
filterFn: index => index > colIndex
|
|
128
|
+
position: isRtl ? 'right' : 'left',
|
|
129
|
+
filterFn: index => isRtl ? index < colIndex : index > colIndex
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
export function findRightPinnedCellsBeforeCol(api, col) {
|
|
132
|
+
export function findRightPinnedCellsBeforeCol(api, col, isRtl) {
|
|
133
133
|
const colIndex = parseCellColIndex(col);
|
|
134
134
|
return findPinnedCells({
|
|
135
135
|
api,
|
|
136
136
|
colIndex,
|
|
137
|
-
position: 'right',
|
|
138
|
-
filterFn: index => index < colIndex
|
|
137
|
+
position: isRtl ? 'left' : 'right',
|
|
138
|
+
filterFn: index => isRtl ? index > colIndex : index < colIndex
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
const findPinnedHeaders = ({
|
|
@@ -159,22 +159,22 @@ const findPinnedHeaders = ({
|
|
|
159
159
|
});
|
|
160
160
|
return elements;
|
|
161
161
|
};
|
|
162
|
-
export function findLeftPinnedHeadersAfterCol(api, col) {
|
|
162
|
+
export function findLeftPinnedHeadersAfterCol(api, col, isRtl) {
|
|
163
163
|
const colIndex = parseCellColIndex(col);
|
|
164
164
|
return findPinnedHeaders({
|
|
165
165
|
api,
|
|
166
|
-
position: 'left',
|
|
166
|
+
position: isRtl ? 'right' : 'left',
|
|
167
167
|
colIndex,
|
|
168
|
-
filterFn: index => index > colIndex
|
|
168
|
+
filterFn: index => isRtl ? index < colIndex : index > colIndex
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
export function findRightPinnedHeadersBeforeCol(api, col) {
|
|
171
|
+
export function findRightPinnedHeadersBeforeCol(api, col, isRtl) {
|
|
172
172
|
const colIndex = parseCellColIndex(col);
|
|
173
173
|
return findPinnedHeaders({
|
|
174
174
|
api,
|
|
175
|
-
position: 'right',
|
|
175
|
+
position: isRtl ? 'left' : 'right',
|
|
176
176
|
colIndex,
|
|
177
|
-
filterFn: index => index < colIndex
|
|
177
|
+
filterFn: index => isRtl ? index > colIndex : index < colIndex
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
export function findGridHeader(api, field) {
|
|
@@ -125,6 +125,11 @@ DataGridRaw.propTypes = {
|
|
|
125
125
|
* @default 150
|
|
126
126
|
*/
|
|
127
127
|
columnBufferPx: _propTypes.default.number,
|
|
128
|
+
/**
|
|
129
|
+
* Sets the height in pixels of the column group headers in the Data Grid.
|
|
130
|
+
* Inherits the `columnHeaderHeight` value if not set.
|
|
131
|
+
*/
|
|
132
|
+
columnGroupHeaderHeight: _propTypes.default.number,
|
|
128
133
|
columnGroupingModel: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
129
134
|
/**
|
|
130
135
|
* Sets the height in pixel of the column headers in the Data Grid.
|
|
@@ -750,5 +755,10 @@ DataGridRaw.propTypes = {
|
|
|
750
755
|
/**
|
|
751
756
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
752
757
|
*/
|
|
753
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
758
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
759
|
+
/**
|
|
760
|
+
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
761
|
+
* @default false
|
|
762
|
+
*/
|
|
763
|
+
unstable_rowSpanning: _propTypes.default.bool
|
|
754
764
|
};
|
|
@@ -33,6 +33,7 @@ var _useGridColumnSpanning = require("../hooks/features/columns/useGridColumnSpa
|
|
|
33
33
|
var _useGridColumnGrouping = require("../hooks/features/columnGrouping/useGridColumnGrouping");
|
|
34
34
|
var _virtualization = require("../hooks/features/virtualization");
|
|
35
35
|
var _useGridColumnResize = require("../hooks/features/columnResize/useGridColumnResize");
|
|
36
|
+
var _useGridRowSpanning = require("../hooks/features/rows/useGridRowSpanning");
|
|
36
37
|
const useDataGridComponent = (inputApiRef, props) => {
|
|
37
38
|
const apiRef = (0, _useGridInitialization.useGridInitialization)(inputApiRef, props);
|
|
38
39
|
|
|
@@ -54,6 +55,7 @@ const useDataGridComponent = (inputApiRef, props) => {
|
|
|
54
55
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridSorting.sortingStateInitializer, apiRef, props);
|
|
55
56
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridPreferencesPanel.preferencePanelStateInitializer, apiRef, props);
|
|
56
57
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridFilter.filterStateInitializer, apiRef, props);
|
|
58
|
+
(0, _useGridInitializeState.useGridInitializeState)(_useGridRowSpanning.rowSpanningStateInitializer, apiRef, props);
|
|
57
59
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridDensity.densityStateInitializer, apiRef, props);
|
|
58
60
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridColumnResize.columnResizeStateInitializer, apiRef, props);
|
|
59
61
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridPagination.paginationStateInitializer, apiRef, props);
|
|
@@ -65,6 +67,7 @@ const useDataGridComponent = (inputApiRef, props) => {
|
|
|
65
67
|
(0, _useGridRowSelection.useGridRowSelection)(apiRef, props);
|
|
66
68
|
(0, _useGridColumns.useGridColumns)(apiRef, props);
|
|
67
69
|
(0, _useGridRows.useGridRows)(apiRef, props);
|
|
70
|
+
(0, _useGridRowSpanning.useGridRowSpanning)(apiRef, props);
|
|
68
71
|
(0, _useGridParamsApi.useGridParamsApi)(apiRef);
|
|
69
72
|
(0, _useGridColumnSpanning.useGridColumnSpanning)(apiRef);
|
|
70
73
|
(0, _useGridColumnGrouping.useGridColumnGrouping)(apiRef, props);
|
|
@@ -81,7 +81,8 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES =
|
|
|
81
81
|
showColumnVerticalBorder: false,
|
|
82
82
|
sortingMode: 'client',
|
|
83
83
|
sortingOrder: ['asc', 'desc', null],
|
|
84
|
-
throttleRowsMs: 0
|
|
84
|
+
throttleRowsMs: 0,
|
|
85
|
+
unstable_rowSpanning: false
|
|
85
86
|
};
|
|
86
87
|
const defaultSlots = _defaultGridSlotsComponents.DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
87
88
|
const useDataGridProps = inProps => {
|
|
@@ -22,34 +22,58 @@ const getGridStringQuickFilterFn = value => {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
exports.getGridStringQuickFilterFn = getGridStringQuickFilterFn;
|
|
25
|
+
const createContainsFilterFn = (disableTrim, negate) => filterItem => {
|
|
26
|
+
if (!filterItem.value) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
30
|
+
const filterRegex = new RegExp((0, _utils.escapeRegExp)(trimmedValue), 'i');
|
|
31
|
+
return value => {
|
|
32
|
+
if (value == null) {
|
|
33
|
+
return negate;
|
|
34
|
+
}
|
|
35
|
+
const matches = filterRegex.test(String(value));
|
|
36
|
+
return negate ? !matches : matches;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const createEqualityFilterFn = (disableTrim, negate) => filterItem => {
|
|
40
|
+
if (!filterItem.value) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
44
|
+
const collator = new Intl.Collator(undefined, {
|
|
45
|
+
sensitivity: 'base',
|
|
46
|
+
usage: 'search'
|
|
47
|
+
});
|
|
48
|
+
return value => {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return negate;
|
|
51
|
+
}
|
|
52
|
+
const isEqual = collator.compare(trimmedValue, value.toString()) === 0;
|
|
53
|
+
return negate ? !isEqual : isEqual;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const createEmptyFilterFn = negate => () => {
|
|
57
|
+
return value => {
|
|
58
|
+
const isEmpty = value === '' || value == null;
|
|
59
|
+
return negate ? !isEmpty : isEmpty;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
25
62
|
const getGridStringOperators = (disableTrim = false) => [{
|
|
26
63
|
value: 'contains',
|
|
27
|
-
getApplyFilterFn:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const filterRegex = new RegExp((0, _utils.escapeRegExp)(filterItemValue), 'i');
|
|
33
|
-
return value => {
|
|
34
|
-
return value != null ? filterRegex.test(String(value)) : false;
|
|
35
|
-
};
|
|
36
|
-
},
|
|
64
|
+
getApplyFilterFn: createContainsFilterFn(disableTrim, false),
|
|
65
|
+
InputComponent: _GridFilterInputValue.GridFilterInputValue
|
|
66
|
+
}, {
|
|
67
|
+
value: 'doesNotContain',
|
|
68
|
+
getApplyFilterFn: createContainsFilterFn(disableTrim, true),
|
|
37
69
|
InputComponent: _GridFilterInputValue.GridFilterInputValue
|
|
38
70
|
}, {
|
|
39
71
|
value: 'equals',
|
|
40
|
-
getApplyFilterFn:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const collator = new Intl.Collator(undefined, {
|
|
46
|
-
sensitivity: 'base',
|
|
47
|
-
usage: 'search'
|
|
48
|
-
});
|
|
49
|
-
return value => {
|
|
50
|
-
return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
|
|
51
|
-
};
|
|
52
|
-
},
|
|
72
|
+
getApplyFilterFn: createEqualityFilterFn(disableTrim, false),
|
|
73
|
+
InputComponent: _GridFilterInputValue.GridFilterInputValue
|
|
74
|
+
}, {
|
|
75
|
+
value: 'doesNotEqual',
|
|
76
|
+
getApplyFilterFn: createEqualityFilterFn(disableTrim, true),
|
|
53
77
|
InputComponent: _GridFilterInputValue.GridFilterInputValue
|
|
54
78
|
}, {
|
|
55
79
|
value: 'startsWith',
|
|
@@ -79,19 +103,11 @@ const getGridStringOperators = (disableTrim = false) => [{
|
|
|
79
103
|
InputComponent: _GridFilterInputValue.GridFilterInputValue
|
|
80
104
|
}, {
|
|
81
105
|
value: 'isEmpty',
|
|
82
|
-
getApplyFilterFn: ()
|
|
83
|
-
return value => {
|
|
84
|
-
return value === '' || value == null;
|
|
85
|
-
};
|
|
86
|
-
},
|
|
106
|
+
getApplyFilterFn: createEmptyFilterFn(false),
|
|
87
107
|
requiresFilterValue: false
|
|
88
108
|
}, {
|
|
89
109
|
value: 'isNotEmpty',
|
|
90
|
-
getApplyFilterFn: ()
|
|
91
|
-
return value => {
|
|
92
|
-
return value !== '' && value != null;
|
|
93
|
-
};
|
|
94
|
-
},
|
|
110
|
+
getApplyFilterFn: createEmptyFilterFn(true),
|
|
95
111
|
requiresFilterValue: false
|
|
96
112
|
}, {
|
|
97
113
|
value: 'isAnyOf',
|
|
@@ -346,6 +346,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
346
346
|
height: _propTypes.default.number.isRequired,
|
|
347
347
|
width: _propTypes.default.number.isRequired
|
|
348
348
|
}).isRequired,
|
|
349
|
+
groupHeaderHeight: _propTypes.default.number.isRequired,
|
|
349
350
|
hasScrollX: _propTypes.default.bool.isRequired,
|
|
350
351
|
hasScrollY: _propTypes.default.bool.isRequired,
|
|
351
352
|
headerFilterHeight: _propTypes.default.number.isRequired,
|
|
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _utils = require("@mui/utils");
|
|
15
15
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
|
+
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
16
17
|
var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
|
|
17
18
|
var _gridClasses = require("../../constants/gridClasses");
|
|
18
19
|
var _models = require("../../models");
|
|
@@ -23,6 +24,7 @@ var _gridFocusStateSelector = require("../../hooks/features/focus/gridFocusState
|
|
|
23
24
|
var _useGridParamsApi = require("../../hooks/features/rows/useGridParamsApi");
|
|
24
25
|
var _cellBorderUtils = require("../../utils/cellBorderUtils");
|
|
25
26
|
var _gridColumnsInterfaces = require("../../hooks/features/columns/gridColumnsInterfaces");
|
|
27
|
+
var _gridRowSpanningSelectors = require("../../hooks/features/rows/gridRowSpanningSelectors");
|
|
26
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
29
|
const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "gridHasScrollX", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "sectionIndex", "sectionLength", "gridHasFiller", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
|
|
28
30
|
_excluded2 = ["changeReason", "unstable_updateValueOnRender"];
|
|
@@ -114,6 +116,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
114
116
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
115
117
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
116
118
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
119
|
+
const isRtl = (0, _RtlProvider.useRtl)();
|
|
117
120
|
const field = column.field;
|
|
118
121
|
const cellParams = (0, _useGridSelector.useGridSelector)(apiRef, () => {
|
|
119
122
|
// This is required because `.getCellParams` tries to get the `state.rows.tree` entry
|
|
@@ -134,6 +137,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
134
137
|
id: rowId,
|
|
135
138
|
field
|
|
136
139
|
}));
|
|
140
|
+
const hiddenCells = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSpanningSelectors.gridRowSpanningHiddenCellsSelector);
|
|
141
|
+
const spannedCells = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSpanningSelectors.gridRowSpanningSpannedCellsSelector);
|
|
137
142
|
const {
|
|
138
143
|
cellMode,
|
|
139
144
|
hasFocus,
|
|
@@ -206,6 +211,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
206
211
|
propHandler(event);
|
|
207
212
|
}
|
|
208
213
|
}, [apiRef, field, rowId]);
|
|
214
|
+
const isCellRowSpanned = hiddenCells[rowId]?.[field] ?? false;
|
|
215
|
+
const rowSpan = spannedCells[rowId]?.[field] ?? 1;
|
|
209
216
|
const style = React.useMemo(() => {
|
|
210
217
|
if (isNotVisible) {
|
|
211
218
|
return {
|
|
@@ -218,14 +225,21 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
218
225
|
const cellStyle = (0, _extends2.default)({
|
|
219
226
|
'--width': `${width}px`
|
|
220
227
|
}, styleProp);
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
const isLeftPinned = pinnedPosition === PinnedPosition.LEFT;
|
|
229
|
+
const isRightPinned = pinnedPosition === PinnedPosition.RIGHT;
|
|
230
|
+
if (isLeftPinned || isRightPinned) {
|
|
231
|
+
let side = isLeftPinned ? 'left' : 'right';
|
|
232
|
+
if (isRtl) {
|
|
233
|
+
side = isLeftPinned ? 'right' : 'left';
|
|
234
|
+
}
|
|
235
|
+
cellStyle[side] = pinnedOffset;
|
|
223
236
|
}
|
|
224
|
-
if (
|
|
225
|
-
cellStyle.
|
|
237
|
+
if (rowSpan > 1) {
|
|
238
|
+
cellStyle.height = `calc(var(--height) * ${rowSpan})`;
|
|
239
|
+
cellStyle.zIndex = 5;
|
|
226
240
|
}
|
|
227
241
|
return cellStyle;
|
|
228
|
-
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition]);
|
|
242
|
+
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);
|
|
229
243
|
React.useEffect(() => {
|
|
230
244
|
if (!hasFocus || cellMode === _models.GridCellModes.Edit) {
|
|
231
245
|
return;
|
|
@@ -245,6 +259,16 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
245
259
|
}
|
|
246
260
|
}
|
|
247
261
|
}, [hasFocus, cellMode, apiRef]);
|
|
262
|
+
if (isCellRowSpanned) {
|
|
263
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
264
|
+
"data-colindex": colIndex,
|
|
265
|
+
role: "presentation",
|
|
266
|
+
style: (0, _extends2.default)({}, style, {
|
|
267
|
+
minWidth: 'var(--width)',
|
|
268
|
+
maxWidth: 'var(--width)'
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
}
|
|
248
272
|
if (cellParams === EMPTY_CELL_PARAMS) {
|
|
249
273
|
return null;
|
|
250
274
|
}
|
|
@@ -305,6 +329,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
305
329
|
"data-colindex": colIndex,
|
|
306
330
|
"aria-colindex": colIndex + 1,
|
|
307
331
|
"aria-colspan": colSpan,
|
|
332
|
+
"aria-rowspan": rowSpan,
|
|
308
333
|
style: style,
|
|
309
334
|
title: title,
|
|
310
335
|
tabIndex: tabIndex,
|
|
@@ -30,14 +30,19 @@ const useUtilityClasses = ownerState => {
|
|
|
30
30
|
showRightBorder,
|
|
31
31
|
showLeftBorder,
|
|
32
32
|
filterItemsCounter,
|
|
33
|
-
pinnedPosition
|
|
33
|
+
pinnedPosition,
|
|
34
|
+
isLastUnpinned,
|
|
35
|
+
isSiblingFocused
|
|
34
36
|
} = ownerState;
|
|
35
37
|
const isColumnSorted = sortDirection != null;
|
|
36
38
|
const isColumnFiltered = filterItemsCounter != null && filterItemsCounter > 0;
|
|
37
39
|
// todo refactor to a prop on col isNumeric or ?? ie: coltype===price wont work
|
|
38
40
|
const isColumnNumeric = colDef.type === 'number';
|
|
39
41
|
const slots = {
|
|
40
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight'
|
|
42
|
+
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight',
|
|
43
|
+
// TODO: Remove classes below and restore `:has` selectors when they are supported in jsdom
|
|
44
|
+
// See https://github.com/mui/mui-x/pull/14559
|
|
45
|
+
isLastUnpinned && 'columnHeader--lastUnpinned', isSiblingFocused && 'columnHeader--siblingFocused'],
|
|
41
46
|
draggableContainer: ['columnHeaderDraggableContainer'],
|
|
42
47
|
titleContainer: ['columnHeaderTitleContainer'],
|
|
43
48
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
@@ -217,7 +222,9 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
|
|
|
217
222
|
indexInSection: _propTypes.default.number.isRequired,
|
|
218
223
|
isDragging: _propTypes.default.bool.isRequired,
|
|
219
224
|
isLast: _propTypes.default.bool.isRequired,
|
|
225
|
+
isLastUnpinned: _propTypes.default.bool.isRequired,
|
|
220
226
|
isResizing: _propTypes.default.bool.isRequired,
|
|
227
|
+
isSiblingFocused: _propTypes.default.bool.isRequired,
|
|
221
228
|
pinnedPosition: _propTypes.default.oneOf(['left', 'right']),
|
|
222
229
|
sectionLength: _propTypes.default.number.isRequired,
|
|
223
230
|
separatorSide: _propTypes.default.oneOf(['left', 'right']),
|
|
@@ -17,7 +17,7 @@ var _domUtils = require("../../utils/domUtils");
|
|
|
17
17
|
var _gridClasses = require("../../constants/gridClasses");
|
|
18
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["className"];
|
|
20
|
+
const _excluded = ["className", "aria-label"];
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
classes
|
|
@@ -39,6 +39,8 @@ const GridColumnHeaderTitleRoot = (0, _system.styled)('div', {
|
|
|
39
39
|
lineHeight: 'normal'
|
|
40
40
|
});
|
|
41
41
|
const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHeaderInnerTitle(props, ref) {
|
|
42
|
+
// Tooltip adds aria-label to the props, which is not needed since the children prop is a string
|
|
43
|
+
// See https://github.com/mui/mui-x/pull/14482
|
|
42
44
|
const {
|
|
43
45
|
className
|
|
44
46
|
} = props,
|
|
@@ -71,8 +71,7 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = /*#__P
|
|
|
71
71
|
role: "columnheader",
|
|
72
72
|
tabIndex: tabIndex,
|
|
73
73
|
"aria-colindex": colIndex + 1,
|
|
74
|
-
"aria-sort": ariaSort
|
|
75
|
-
"aria-label": headerComponent == null ? label : undefined
|
|
74
|
+
"aria-sort": ariaSort
|
|
76
75
|
}, other, {
|
|
77
76
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
78
77
|
className: classes.draggableContainer,
|
|
@@ -287,12 +287,10 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
287
287
|
// - the column has a left or right border
|
|
288
288
|
// - the next column is pinned right and has a left border
|
|
289
289
|
[`& .${_gridClasses.gridClasses.columnHeader}:focus,
|
|
290
|
-
& .${_gridClasses.gridClasses.columnHeader}:focus-within,
|
|
291
|
-
& .${_gridClasses.gridClasses.columnHeader}:has(+ .${_gridClasses.gridClasses.columnHeader}:focus),
|
|
292
|
-
& .${_gridClasses.gridClasses.columnHeader}:has(+ .${_gridClasses.gridClasses.columnHeader}:focus-within),
|
|
293
290
|
& .${_gridClasses.gridClasses['columnHeader--withLeftBorder']},
|
|
294
291
|
& .${_gridClasses.gridClasses['columnHeader--withRightBorder']},
|
|
295
|
-
& .${_gridClasses.gridClasses
|
|
292
|
+
& .${_gridClasses.gridClasses['columnHeader--siblingFocused']},
|
|
293
|
+
& .${_gridClasses.gridClasses['virtualScroller--hasScrollX']} .${_gridClasses.gridClasses['columnHeader--lastUnpinned']},
|
|
296
294
|
& .${_gridClasses.gridClasses['virtualScroller--hasScrollX']} .${_gridClasses.gridClasses['columnHeader--last']}
|
|
297
295
|
`]: {
|
|
298
296
|
[`& .${_gridClasses.gridClasses.columnSeparator}`]: {
|
|
@@ -407,9 +405,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
407
405
|
'@media (hover: none)': {
|
|
408
406
|
[`& .${_gridClasses.gridClasses.columnHeader}`]: columnHeaderStyles,
|
|
409
407
|
[`& .${_gridClasses.gridClasses.columnHeader}:focus,
|
|
410
|
-
& .${_gridClasses.gridClasses
|
|
411
|
-
& .${_gridClasses.gridClasses.columnHeader}:has(+ .${_gridClasses.gridClasses.columnHeader}:focus),
|
|
412
|
-
& .${_gridClasses.gridClasses.columnHeader}:has(+ .${_gridClasses.gridClasses.columnHeader}:focus-within)`]: {
|
|
408
|
+
& .${_gridClasses.gridClasses['columnHeader--siblingFocused']}`]: {
|
|
413
409
|
[`.${_gridClasses.gridClasses['columnSeparator--resizable']}`]: {
|
|
414
410
|
color: (t.vars || t).palette.primary.main
|
|
415
411
|
}
|
|
@@ -82,7 +82,7 @@ const FilterFormOperatorInput = (0, _styles.styled)('div', {
|
|
|
82
82
|
slot: 'FilterFormOperatorInput',
|
|
83
83
|
overridesResolver: (_, styles) => styles.filterFormOperatorInput
|
|
84
84
|
})({
|
|
85
|
-
width:
|
|
85
|
+
width: 150
|
|
86
86
|
});
|
|
87
87
|
const FilterFormValueInput = (0, _styles.styled)('div', {
|
|
88
88
|
name: 'MuiDataGrid',
|
|
@@ -9,4 +9,4 @@ var _utils = require("@mui/utils");
|
|
|
9
9
|
function getDataGridUtilityClass(slot) {
|
|
10
10
|
return (0, _utils.unstable_generateUtilityClass)('MuiDataGrid', slot);
|
|
11
11
|
}
|
|
12
|
-
const gridClasses = exports.gridClasses = (0, _utils.unstable_generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
12
|
+
const gridClasses = exports.gridClasses = (0, _utils.unstable_generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -51,7 +51,9 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
51
51
|
filterPanelInputPlaceholder: 'Filter value',
|
|
52
52
|
// Filter operators text
|
|
53
53
|
filterOperatorContains: 'contains',
|
|
54
|
+
filterOperatorDoesNotContain: 'does not contain',
|
|
54
55
|
filterOperatorEquals: 'equals',
|
|
56
|
+
filterOperatorDoesNotEqual: 'does not equal',
|
|
55
57
|
filterOperatorStartsWith: 'starts with',
|
|
56
58
|
filterOperatorEndsWith: 'ends with',
|
|
57
59
|
filterOperatorIs: 'is',
|
|
@@ -71,7 +73,9 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
71
73
|
'filterOperator<=': '<=',
|
|
72
74
|
// Header filter operators text
|
|
73
75
|
headerFilterOperatorContains: 'Contains',
|
|
76
|
+
headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
74
77
|
headerFilterOperatorEquals: 'Equals',
|
|
78
|
+
headerFilterOperatorDoesNotEqual: 'Does not equal',
|
|
75
79
|
headerFilterOperatorStartsWith: 'Starts with',
|
|
76
80
|
headerFilterOperatorEndsWith: 'Ends with',
|
|
77
81
|
headerFilterOperatorIs: 'Is',
|