@mui/x-data-grid 5.13.1 → 5.14.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 +44 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/colDef/gridActionsColDef.js +2 -0
- package/colDef/gridBooleanColDef.js +3 -1
- package/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/colDef/gridDateOperators.d.ts +1 -1
- package/colDef/gridStringColDef.d.ts +3 -0
- package/colDef/gridStringColDef.js +6 -0
- package/components/base/GridOverlays.js +4 -1
- package/components/cell/GridBooleanCell.d.ts +5 -2
- package/components/cell/GridBooleanCell.js +93 -2
- package/components/cell/GridEditDateCell.js +5 -1
- package/components/cell/index.d.ts +1 -0
- package/components/cell/index.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/components/containers/GridRootStyles.js +10 -0
- package/components/toolbar/GridToolbarExport.js +20 -10
- package/constants/gridClasses.d.ts +25 -1
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +8 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +2 -1
- package/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +13 -6
- package/hooks/features/export/utils.d.ts +1 -1
- package/hooks/features/export/utils.js +9 -2
- package/hooks/features/filter/gridFilterUtils.js +6 -0
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +11 -4
- package/hooks/features/pagination/useGridPage.js +4 -3
- package/hooks/features/pagination/useGridPageSize.js +4 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/selection/useGridSelection.js +24 -10
- package/hooks/features/sorting/gridSortingUtils.d.ts +1 -0
- package/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +34 -6
- package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +12 -1
- package/hooks/features/statePersistence/index.d.ts +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
- package/hooks/utils/useGridNativeEventListener.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -2
- package/internals/index.js +2 -2
- package/legacy/DataGrid/useDataGridComponent.js +1 -1
- package/legacy/colDef/gridActionsColDef.js +2 -0
- package/legacy/colDef/gridBooleanColDef.js +3 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/legacy/colDef/gridStringColDef.js +6 -0
- package/legacy/components/base/GridOverlays.js +4 -1
- package/legacy/components/cell/GridBooleanCell.js +93 -2
- package/legacy/components/cell/GridEditDateCell.js +5 -1
- package/legacy/components/cell/index.js +1 -0
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +6 -1
- package/legacy/components/containers/GridRootStyles.js +3 -3
- package/legacy/components/toolbar/GridToolbarExport.js +20 -10
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +8 -1
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/legacy/hooks/features/columns/useGridColumns.js +13 -8
- package/legacy/hooks/features/export/utils.js +9 -2
- package/legacy/hooks/features/filter/gridFilterUtils.js +6 -0
- package/legacy/hooks/features/filter/useGridFilter.js +11 -4
- package/legacy/hooks/features/pagination/useGridPage.js +4 -3
- package/legacy/hooks/features/pagination/useGridPageSize.js +4 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/legacy/hooks/features/selection/useGridSelection.js +26 -12
- package/legacy/hooks/features/sorting/gridSortingUtils.js +11 -12
- package/legacy/hooks/features/sorting/useGridSorting.js +34 -6
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/legacy/hooks/utils/useGridNativeEventListener.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +2 -2
- package/legacy/locales/arSD.js +7 -0
- package/legacy/locales/bgBG.js +7 -0
- package/legacy/locales/csCZ.js +7 -0
- package/legacy/locales/daDK.js +7 -0
- package/legacy/locales/deDE.js +8 -1
- package/legacy/locales/elGR.js +7 -0
- package/legacy/locales/esES.js +7 -0
- package/legacy/locales/faIR.js +7 -0
- package/legacy/locales/fiFI.js +7 -0
- package/legacy/locales/frFR.js +8 -1
- package/legacy/locales/heIL.js +8 -1
- package/legacy/locales/huHU.js +7 -0
- package/legacy/locales/index.js +2 -1
- package/legacy/locales/itIT.js +7 -0
- package/legacy/locales/jaJP.js +8 -1
- package/legacy/locales/koKR.js +7 -0
- package/legacy/locales/nbNO.js +8 -1
- package/legacy/locales/nlNL.js +8 -1
- package/legacy/locales/plPL.js +7 -0
- package/legacy/locales/ptBR.js +8 -1
- package/legacy/locales/roRO.js +8 -1
- package/legacy/locales/ruRU.js +7 -0
- package/legacy/locales/skSK.js +8 -1
- package/legacy/locales/svSE.js +8 -1
- package/legacy/locales/trTR.js +7 -0
- package/legacy/locales/ukUA.js +7 -0
- package/legacy/locales/viVN.js +7 -0
- package/legacy/locales/zhCN.js +7 -0
- package/legacy/locales/zhTW.js +135 -0
- package/legacy/models/events/gridEvents.js +1 -0
- package/locales/arSD.js +7 -0
- package/locales/bgBG.js +7 -0
- package/locales/csCZ.js +7 -0
- package/locales/daDK.js +7 -0
- package/locales/deDE.js +8 -1
- package/locales/elGR.js +7 -0
- package/locales/esES.js +7 -0
- package/locales/faIR.js +7 -0
- package/locales/fiFI.js +7 -0
- package/locales/frFR.js +8 -1
- package/locales/heIL.js +8 -1
- package/locales/huHU.js +7 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +2 -1
- package/locales/itIT.js +7 -0
- package/locales/jaJP.js +8 -1
- package/locales/koKR.js +7 -0
- package/locales/nbNO.js +8 -1
- package/locales/nlNL.js +8 -1
- package/locales/plPL.js +7 -0
- package/locales/ptBR.js +8 -1
- package/locales/roRO.js +8 -1
- package/locales/ruRU.js +7 -0
- package/locales/skSK.js +8 -1
- package/locales/svSE.js +8 -1
- package/locales/trTR.js +7 -0
- package/locales/ukUA.js +7 -0
- package/locales/viVN.js +7 -0
- package/locales/zhCN.js +7 -0
- package/locales/zhTW.d.ts +2 -0
- package/locales/zhTW.js +123 -0
- package/models/api/gridColumnSpanning.d.ts +2 -0
- package/models/api/gridLocaleTextApi.d.ts +8 -2
- package/models/api/gridSelectionApi.d.ts +6 -0
- package/models/events/gridEvents.d.ts +1 -0
- package/models/events/gridEvents.js +1 -0
- package/models/gridRows.d.ts +10 -1
- package/models/params/gridCellParams.d.ts +4 -4
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/colDef/gridActionsColDef.js +2 -0
- package/modern/colDef/gridBooleanColDef.js +3 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/modern/colDef/gridStringColDef.js +6 -0
- package/modern/components/base/GridOverlays.js +4 -1
- package/modern/components/cell/GridBooleanCell.js +93 -2
- package/modern/components/cell/GridEditDateCell.js +5 -1
- package/modern/components/cell/index.js +1 -0
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/modern/components/containers/GridRootStyles.js +10 -0
- package/modern/components/toolbar/GridToolbarExport.js +20 -10
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +8 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/modern/hooks/features/columns/useGridColumns.js +10 -5
- package/modern/hooks/features/export/utils.js +5 -2
- package/modern/hooks/features/filter/gridFilterUtils.js +6 -0
- package/modern/hooks/features/filter/useGridFilter.js +8 -3
- package/modern/hooks/features/pagination/useGridPage.js +4 -3
- package/modern/hooks/features/pagination/useGridPageSize.js +4 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +8 -4
- package/modern/hooks/features/selection/useGridSelection.js +22 -10
- package/modern/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/modern/hooks/features/sorting/useGridSorting.js +30 -6
- package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/modern/hooks/utils/useGridNativeEventListener.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -2
- package/modern/locales/arSD.js +7 -0
- package/modern/locales/bgBG.js +7 -0
- package/modern/locales/csCZ.js +7 -0
- package/modern/locales/daDK.js +7 -0
- package/modern/locales/deDE.js +8 -1
- package/modern/locales/elGR.js +7 -0
- package/modern/locales/esES.js +7 -0
- package/modern/locales/faIR.js +7 -0
- package/modern/locales/fiFI.js +7 -0
- package/modern/locales/frFR.js +8 -1
- package/modern/locales/heIL.js +8 -1
- package/modern/locales/huHU.js +7 -0
- package/modern/locales/index.js +2 -1
- package/modern/locales/itIT.js +7 -0
- package/modern/locales/jaJP.js +8 -1
- package/modern/locales/koKR.js +7 -0
- package/modern/locales/nbNO.js +8 -1
- package/modern/locales/nlNL.js +8 -1
- package/modern/locales/plPL.js +7 -0
- package/modern/locales/ptBR.js +8 -1
- package/modern/locales/roRO.js +8 -1
- package/modern/locales/ruRU.js +7 -0
- package/modern/locales/skSK.js +8 -1
- package/modern/locales/svSE.js +8 -1
- package/modern/locales/trTR.js +7 -0
- package/modern/locales/ukUA.js +7 -0
- package/modern/locales/viVN.js +7 -0
- package/modern/locales/zhCN.js +7 -0
- package/modern/locales/zhTW.js +123 -0
- package/modern/models/events/gridEvents.js +1 -0
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/colDef/gridActionsColDef.js +2 -0
- package/node/colDef/gridBooleanColDef.js +3 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/node/colDef/gridStringColDef.js +5 -0
- package/node/components/base/GridOverlays.js +4 -1
- package/node/components/cell/GridBooleanCell.js +93 -2
- package/node/components/cell/GridEditDateCell.js +7 -1
- package/node/components/cell/index.js +13 -0
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/node/components/containers/GridRootStyles.js +10 -0
- package/node/components/toolbar/GridToolbarExport.js +16 -10
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +8 -1
- package/node/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/node/hooks/features/columns/useGridColumns.js +13 -6
- package/node/hooks/features/export/utils.js +10 -2
- package/node/hooks/features/filter/gridFilterUtils.js +7 -0
- package/node/hooks/features/filter/useGridFilter.js +11 -4
- package/node/hooks/features/pagination/useGridPage.js +4 -3
- package/node/hooks/features/pagination/useGridPageSize.js +4 -3
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/node/hooks/features/selection/useGridSelection.js +24 -10
- package/node/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/node/hooks/features/sorting/useGridSorting.js +34 -6
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/node/hooks/utils/useGridNativeEventListener.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +18 -0
- package/node/locales/arSD.js +7 -0
- package/node/locales/bgBG.js +7 -0
- package/node/locales/csCZ.js +7 -0
- package/node/locales/daDK.js +7 -0
- package/node/locales/deDE.js +8 -1
- package/node/locales/elGR.js +7 -0
- package/node/locales/esES.js +7 -0
- package/node/locales/faIR.js +7 -0
- package/node/locales/fiFI.js +7 -0
- package/node/locales/frFR.js +8 -1
- package/node/locales/heIL.js +8 -1
- package/node/locales/huHU.js +7 -0
- package/node/locales/index.js +13 -0
- package/node/locales/itIT.js +7 -0
- package/node/locales/jaJP.js +8 -1
- package/node/locales/koKR.js +7 -0
- package/node/locales/nbNO.js +8 -1
- package/node/locales/nlNL.js +8 -1
- package/node/locales/plPL.js +7 -0
- package/node/locales/ptBR.js +8 -1
- package/node/locales/roRO.js +8 -1
- package/node/locales/ruRU.js +7 -0
- package/node/locales/skSK.js +8 -1
- package/node/locales/svSE.js +8 -1
- package/node/locales/trTR.js +7 -0
- package/node/locales/ukUA.js +7 -0
- package/node/locales/viVN.js +7 -0
- package/node/locales/zhCN.js +7 -0
- package/node/locales/zhTW.js +133 -0
- package/node/models/events/gridEvents.js +1 -0
- package/package.json +1 -1
- package/utils/getGridLocalization.d.ts +1 -1
package/modern/locales/heIL.js
CHANGED
|
@@ -111,6 +111,13 @@ const heILGrid = {
|
|
|
111
111
|
expandDetailPanel: 'הרחב',
|
|
112
112
|
collapseDetailPanel: 'כווץ',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'סידור שורות'
|
|
114
|
+
rowReorderingHeaderName: 'סידור שורות' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const heIL = getGridLocalization(heILGrid, heILCore);
|
package/modern/locales/huHU.js
CHANGED
|
@@ -111,6 +111,13 @@ const huHUGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Kibontás',
|
|
112
112
|
collapseDetailPanel: 'Összecsukás' // Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const huHU = getGridLocalization(huHUGrid, huHUCore);
|
package/modern/locales/index.js
CHANGED
package/modern/locales/itIT.js
CHANGED
|
@@ -111,6 +111,13 @@ const itITGrid = {
|
|
|
111
111
|
// collapseDetailPanel: 'Collapse',
|
|
112
112
|
// Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const itIT = getGridLocalization(itITGrid, itITCore);
|
package/modern/locales/jaJP.js
CHANGED
|
@@ -111,6 +111,13 @@ const jaJPGrid = {
|
|
|
111
111
|
expandDetailPanel: '展開',
|
|
112
112
|
collapseDetailPanel: '折りたたみ',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: '行並び替え'
|
|
114
|
+
rowReorderingHeaderName: '行並び替え' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const jaJP = getGridLocalization(jaJPGrid, jaJPCore);
|
package/modern/locales/koKR.js
CHANGED
|
@@ -111,6 +111,13 @@ const koKRGrid = {
|
|
|
111
111
|
// collapseDetailPanel: 'Collapse',
|
|
112
112
|
// Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const koKR = getGridLocalization(koKRGrid, koKRCore);
|
package/modern/locales/nbNO.js
CHANGED
|
@@ -111,6 +111,13 @@ const nbNOGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Utvid',
|
|
112
112
|
collapseDetailPanel: 'Kollaps',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Rad reorganisering'
|
|
114
|
+
rowReorderingHeaderName: 'Rad reorganisering' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const nbNO = getGridLocalization(nbNOGrid, nbNOCore);
|
package/modern/locales/nlNL.js
CHANGED
|
@@ -111,6 +111,13 @@ const nlNLGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Uitklappen',
|
|
112
112
|
collapseDetailPanel: 'Inklappen',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Rijen hersorteren'
|
|
114
|
+
rowReorderingHeaderName: 'Rijen hersorteren' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const nlNL = getGridLocalization(nlNLGrid, nlNLCore);
|
package/modern/locales/plPL.js
CHANGED
|
@@ -111,6 +111,13 @@ const plPLGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Rozwiń',
|
|
112
112
|
collapseDetailPanel: 'Zwiń' // Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const plPL = getGridLocalization(plPLGrid, plPLCore);
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -111,6 +111,13 @@ const ptBRGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Expandir',
|
|
112
112
|
collapseDetailPanel: 'Esconder',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Reorganizar linhas'
|
|
114
|
+
rowReorderingHeaderName: 'Reorganizar linhas' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const ptBR = getGridLocalization(ptBRGrid, ptBRCore);
|
package/modern/locales/roRO.js
CHANGED
|
@@ -111,6 +111,13 @@ const roROGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Extindere',
|
|
112
112
|
collapseDetailPanel: 'Restrângere',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Reordonare rânduri'
|
|
114
|
+
rowReorderingHeaderName: 'Reordonare rânduri' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const roRO = getGridLocalization(roROGrid, roROCore);
|
package/modern/locales/ruRU.js
CHANGED
|
@@ -144,6 +144,13 @@ const ruRUGrid = {
|
|
|
144
144
|
expandDetailPanel: 'Развернуть',
|
|
145
145
|
collapseDetailPanel: 'Свернуть' // Row reordering text
|
|
146
146
|
// rowReorderingHeaderName: 'Row reordering',
|
|
147
|
+
// Aggregation
|
|
148
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
149
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
150
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
151
|
+
// aggregationFunctionLabelMin: 'min',
|
|
152
|
+
// aggregationFunctionLabelMax: 'max',
|
|
153
|
+
// aggregationFunctionLabelSize: 'size',
|
|
147
154
|
|
|
148
155
|
};
|
|
149
156
|
export const ruRU = getGridLocalization(ruRUGrid, ruRUCore);
|
package/modern/locales/skSK.js
CHANGED
|
@@ -146,6 +146,13 @@ const skSKGrid = {
|
|
|
146
146
|
expandDetailPanel: 'Rozbaliť',
|
|
147
147
|
collapseDetailPanel: 'Zbaliť',
|
|
148
148
|
// Row reordering text
|
|
149
|
-
rowReorderingHeaderName: 'Preusporiadávanie riadkov'
|
|
149
|
+
rowReorderingHeaderName: 'Preusporiadávanie riadkov' // Aggregation
|
|
150
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
151
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
152
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
153
|
+
// aggregationFunctionLabelMin: 'min',
|
|
154
|
+
// aggregationFunctionLabelMax: 'max',
|
|
155
|
+
// aggregationFunctionLabelSize: 'size',
|
|
156
|
+
|
|
150
157
|
};
|
|
151
158
|
export const skSK = getGridLocalization(skSKGrid, skSKCore);
|
package/modern/locales/svSE.js
CHANGED
|
@@ -111,6 +111,13 @@ const svSEGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Expandera',
|
|
112
112
|
collapseDetailPanel: 'Kollapsa',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Ordna om rader'
|
|
114
|
+
rowReorderingHeaderName: 'Ordna om rader' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
115
122
|
};
|
|
116
123
|
export const svSE = getGridLocalization(svSEGrid, svSECore);
|
package/modern/locales/trTR.js
CHANGED
|
@@ -111,6 +111,13 @@ const trTRGrid = {
|
|
|
111
111
|
expandDetailPanel: 'Genişlet',
|
|
112
112
|
collapseDetailPanel: 'Gizle' // Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const trTR = getGridLocalization(trTRGrid, trTRCore);
|
package/modern/locales/ukUA.js
CHANGED
|
@@ -137,6 +137,13 @@ const ukUAGrid = {
|
|
|
137
137
|
// collapseDetailPanel: 'Collapse',
|
|
138
138
|
// Row reordering text
|
|
139
139
|
// rowReorderingHeaderName: 'Row reordering',
|
|
140
|
+
// Aggregation
|
|
141
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
142
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
143
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
144
|
+
// aggregationFunctionLabelMin: 'min',
|
|
145
|
+
// aggregationFunctionLabelMax: 'max',
|
|
146
|
+
// aggregationFunctionLabelSize: 'size',
|
|
140
147
|
|
|
141
148
|
};
|
|
142
149
|
export const ukUA = getGridLocalization(ukUAGrid, ukUACore);
|
package/modern/locales/viVN.js
CHANGED
|
@@ -111,6 +111,13 @@ const viVNGrid = {
|
|
|
111
111
|
// collapseDetailPanel: 'Collapse',
|
|
112
112
|
// Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const viVN = getGridLocalization(viVNGrid, viVNCore);
|
package/modern/locales/zhCN.js
CHANGED
|
@@ -111,6 +111,13 @@ const zhCNGrid = {
|
|
|
111
111
|
// collapseDetailPanel: 'Collapse',
|
|
112
112
|
// Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const zhCN = getGridLocalization(zhCNGrid, zhCNCore);
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { zhTW as zhTWCore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
const zhTWGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: '沒有資料',
|
|
6
|
+
noResultsOverlayLabel: '沒有結果',
|
|
7
|
+
errorOverlayDefaultLabel: '發生錯誤',
|
|
8
|
+
// Density selector toolbar button text
|
|
9
|
+
toolbarDensity: '表格密度',
|
|
10
|
+
toolbarDensityLabel: '表格密度',
|
|
11
|
+
toolbarDensityCompact: '緊湊',
|
|
12
|
+
toolbarDensityStandard: '標準',
|
|
13
|
+
toolbarDensityComfortable: '舒適',
|
|
14
|
+
// Columns selector toolbar button text
|
|
15
|
+
toolbarColumns: '欄位',
|
|
16
|
+
toolbarColumnsLabel: '選擇欄位',
|
|
17
|
+
// Filters toolbar button text
|
|
18
|
+
toolbarFilters: '篩選器',
|
|
19
|
+
toolbarFiltersLabel: '顯示篩選器',
|
|
20
|
+
toolbarFiltersTooltipHide: '隱藏篩選器',
|
|
21
|
+
toolbarFiltersTooltipShow: '顯示篩選器',
|
|
22
|
+
toolbarFiltersTooltipActive: count => `${count} 個篩選器`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
toolbarQuickFilterPlaceholder: '搜尋...',
|
|
25
|
+
toolbarQuickFilterLabel: '搜尋',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: '清除',
|
|
27
|
+
// Export selector toolbar button text
|
|
28
|
+
toolbarExport: '匯出',
|
|
29
|
+
toolbarExportLabel: '匯出',
|
|
30
|
+
toolbarExportCSV: '匯出 CSV',
|
|
31
|
+
toolbarExportPrint: '列印',
|
|
32
|
+
toolbarExportExcel: '匯出 Excel',
|
|
33
|
+
// Columns panel text
|
|
34
|
+
columnsPanelTextFieldLabel: '欄位搜尋',
|
|
35
|
+
columnsPanelTextFieldPlaceholder: '欄位名稱',
|
|
36
|
+
columnsPanelDragIconLabel: '排序欄位',
|
|
37
|
+
columnsPanelShowAllButton: '顯示所有',
|
|
38
|
+
columnsPanelHideAllButton: '隱藏所有',
|
|
39
|
+
// Filter panel text
|
|
40
|
+
filterPanelAddFilter: '增加篩選器',
|
|
41
|
+
filterPanelDeleteIconLabel: '刪除',
|
|
42
|
+
filterPanelLinkOperator: '邏輯運算子',
|
|
43
|
+
filterPanelOperators: '運算子',
|
|
44
|
+
// TODO v6: rename to filterPanelOperator
|
|
45
|
+
filterPanelOperatorAnd: '且',
|
|
46
|
+
filterPanelOperatorOr: '或',
|
|
47
|
+
filterPanelColumns: '欄位',
|
|
48
|
+
filterPanelInputLabel: '值',
|
|
49
|
+
filterPanelInputPlaceholder: '篩選值',
|
|
50
|
+
// Filter operators text
|
|
51
|
+
filterOperatorContains: '包含',
|
|
52
|
+
filterOperatorEquals: '等於',
|
|
53
|
+
filterOperatorStartsWith: '以...開頭',
|
|
54
|
+
filterOperatorEndsWith: '以...結束',
|
|
55
|
+
filterOperatorIs: '為',
|
|
56
|
+
filterOperatorNot: '不為',
|
|
57
|
+
filterOperatorAfter: '...之後',
|
|
58
|
+
filterOperatorOnOrAfter: '...(含)之後',
|
|
59
|
+
filterOperatorBefore: '...之前',
|
|
60
|
+
filterOperatorOnOrBefore: '...(含)之前',
|
|
61
|
+
filterOperatorIsEmpty: '為空',
|
|
62
|
+
filterOperatorIsNotEmpty: '不為空',
|
|
63
|
+
filterOperatorIsAnyOf: '是其中之一',
|
|
64
|
+
// Filter values text
|
|
65
|
+
filterValueAny: '任何值',
|
|
66
|
+
filterValueTrue: '真',
|
|
67
|
+
filterValueFalse: '假',
|
|
68
|
+
// Column menu text
|
|
69
|
+
columnMenuLabel: '選單',
|
|
70
|
+
columnMenuShowColumns: '顯示欄位',
|
|
71
|
+
columnMenuFilter: '篩選器',
|
|
72
|
+
columnMenuHideColumn: '隱藏',
|
|
73
|
+
columnMenuUnsort: '預設排序',
|
|
74
|
+
columnMenuSortAsc: '升序',
|
|
75
|
+
columnMenuSortDesc: '降序',
|
|
76
|
+
// Column header text
|
|
77
|
+
columnHeaderFiltersTooltipActive: count => `${count} 個篩選器`,
|
|
78
|
+
columnHeaderFiltersLabel: '顯示篩選器',
|
|
79
|
+
columnHeaderSortIconLabel: '排序',
|
|
80
|
+
// Rows selected footer text
|
|
81
|
+
footerRowSelected: count => `已選取 ${count.toLocaleString()} 個`,
|
|
82
|
+
// Total row amount footer text
|
|
83
|
+
footerTotalRows: '總數:',
|
|
84
|
+
// Total visible row amount footer text
|
|
85
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
|
+
// Checkbox selection text
|
|
87
|
+
checkboxSelectionHeaderName: '核取方塊',
|
|
88
|
+
checkboxSelectionSelectAllRows: '全選',
|
|
89
|
+
checkboxSelectionUnselectAllRows: '取消全選',
|
|
90
|
+
checkboxSelectionSelectRow: '選取',
|
|
91
|
+
checkboxSelectionUnselectRow: '取消選取',
|
|
92
|
+
// Boolean cell text
|
|
93
|
+
booleanCellTrueLabel: '真',
|
|
94
|
+
booleanCellFalseLabel: '假',
|
|
95
|
+
// Actions cell more text
|
|
96
|
+
actionsCellMore: '查看更多',
|
|
97
|
+
// Column pinning text
|
|
98
|
+
pinToLeft: '釘選在左側',
|
|
99
|
+
pinToRight: '釘選在右側',
|
|
100
|
+
unpin: '取消釘選',
|
|
101
|
+
// Tree Data
|
|
102
|
+
treeDataGroupingHeaderName: '群組',
|
|
103
|
+
treeDataExpand: '查看子項目',
|
|
104
|
+
treeDataCollapse: '隱藏子項目',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: '群組',
|
|
107
|
+
groupColumn: name => `以 ${name} 分組`,
|
|
108
|
+
unGroupColumn: name => `取消以 ${name} 分組`,
|
|
109
|
+
// Master/detail
|
|
110
|
+
detailPanelToggle: '切換顯示詳細資訊',
|
|
111
|
+
expandDetailPanel: '展開',
|
|
112
|
+
collapseDetailPanel: '摺疊',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: '排序' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
122
|
+
};
|
|
123
|
+
export const zhTW = getGridLocalization(zhTWGrid, zhTWCore);
|
|
@@ -54,6 +54,7 @@ var GridEvents;
|
|
|
54
54
|
GridEvents["pageChange"] = "pageChange";
|
|
55
55
|
GridEvents["pageSizeChange"] = "pageSizeChange";
|
|
56
56
|
GridEvents["rowGroupingModelChange"] = "rowGroupingModelChange";
|
|
57
|
+
GridEvents["aggregationModelChange"] = "aggregationModelChange";
|
|
57
58
|
GridEvents["rowsScroll"] = "rowsScroll";
|
|
58
59
|
GridEvents["rowsScrollEnd"] = "rowsScrollEnd";
|
|
59
60
|
GridEvents["columnSeparatorMouseDown"] = "columnSeparatorMouseDown";
|
|
@@ -94,7 +94,7 @@ const useDataGridComponent = props => {
|
|
|
94
94
|
const useGridEditing = (_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.newEditingApi ? _useGridEditing2.useGridEditing : _useGridEditing.useGridEditing;
|
|
95
95
|
useGridEditing(apiRef, props);
|
|
96
96
|
(0, _useGridFocus.useGridFocus)(apiRef, props);
|
|
97
|
-
(0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef);
|
|
97
|
+
(0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef, props);
|
|
98
98
|
(0, _useGridFilter.useGridFilter)(apiRef, props);
|
|
99
99
|
(0, _useGridSorting.useGridSorting)(apiRef, props);
|
|
100
100
|
(0, _useGridDensity.useGridDensity)(apiRef, props);
|
|
@@ -18,6 +18,8 @@ exports.GRID_ACTIONS_COLUMN_TYPE = GRID_ACTIONS_COLUMN_TYPE;
|
|
|
18
18
|
const GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
19
19
|
sortable: false,
|
|
20
20
|
filterable: false,
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
aggregable: false,
|
|
21
23
|
width: 100,
|
|
22
24
|
align: 'center',
|
|
23
25
|
headerAlign: 'center',
|
|
@@ -35,6 +35,8 @@ const GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
35
35
|
sortComparator: _gridSortingUtils.gridNumberComparator,
|
|
36
36
|
valueFormatter: gridBooleanFormatter,
|
|
37
37
|
filterOperators: (0, _gridBooleanOperators.getGridBooleanOperators)(),
|
|
38
|
-
getApplyQuickFilterFn: undefined
|
|
38
|
+
getApplyQuickFilterFn: undefined,
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
aggregable: false
|
|
39
41
|
});
|
|
40
42
|
exports.GRID_BOOLEAN_COL_DEF = GRID_BOOLEAN_COL_DEF;
|
|
@@ -11,6 +11,9 @@ var _gridSortingUtils = require("../hooks/features/sorting/gridSortingUtils");
|
|
|
11
11
|
|
|
12
12
|
var _gridStringOperators = require("./gridStringOperators");
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* TODO: Move pro and premium properties outside of this Community file
|
|
16
|
+
*/
|
|
14
17
|
const GRID_STRING_COL_DEF = {
|
|
15
18
|
width: 100,
|
|
16
19
|
minWidth: 50,
|
|
@@ -22,6 +25,8 @@ const GRID_STRING_COL_DEF = {
|
|
|
22
25
|
filterable: true,
|
|
23
26
|
groupable: true,
|
|
24
27
|
pinnable: true,
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
private_aggregable: true,
|
|
25
30
|
editable: false,
|
|
26
31
|
sortComparator: _gridSortingUtils.gridStringOrNumberComparator,
|
|
27
32
|
type: 'string',
|
|
@@ -66,7 +66,10 @@ function GridOverlayWrapper(props) {
|
|
|
66
66
|
width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
|
|
67
67
|
position: 'absolute',
|
|
68
68
|
top: headerHeight,
|
|
69
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
69
|
+
bottom: height === 'auto' ? 0 : undefined,
|
|
70
|
+
zIndex: 3,
|
|
71
|
+
// should be above pinned columns and detail panel
|
|
72
|
+
pointerEvents: 'none'
|
|
70
73
|
}
|
|
71
74
|
}, props));
|
|
72
75
|
}
|
|
@@ -13,6 +13,8 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
13
13
|
|
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
16
18
|
var _material = require("@mui/material");
|
|
17
19
|
|
|
18
20
|
var _gridClasses = require("../../constants/gridClasses");
|
|
@@ -39,7 +41,7 @@ const useUtilityClasses = ownerState => {
|
|
|
39
41
|
return (0, _material.unstable_composeClasses)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
40
42
|
};
|
|
41
43
|
|
|
42
|
-
const
|
|
44
|
+
const GridBooleanCellRaw = props => {
|
|
43
45
|
const {
|
|
44
46
|
value
|
|
45
47
|
} = props,
|
|
@@ -57,7 +59,96 @@ const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
|
57
59
|
titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
|
|
58
60
|
"data-value": Boolean(value)
|
|
59
61
|
}, other));
|
|
60
|
-
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
|
|
65
|
+
// ----------------------------- Warning --------------------------------
|
|
66
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
67
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
68
|
+
// ----------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* GridApi that let you manipulate the grid.
|
|
72
|
+
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
73
|
+
*/
|
|
74
|
+
api: _propTypes.default.any.isRequired,
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The mode of the cell.
|
|
78
|
+
*/
|
|
79
|
+
cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The column of the row that the current cell belongs to.
|
|
83
|
+
*/
|
|
84
|
+
colDef: _propTypes.default.object.isRequired,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The column field of the cell that triggered the event.
|
|
88
|
+
*/
|
|
89
|
+
field: _propTypes.default.string.isRequired,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* A ref allowing to set imperative focus.
|
|
93
|
+
* It can be passed to the element that should receive focus.
|
|
94
|
+
* @ignore - do not document.
|
|
95
|
+
*/
|
|
96
|
+
focusElementRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
97
|
+
current: _propTypes.default.shape({
|
|
98
|
+
focus: _propTypes.default.func.isRequired
|
|
99
|
+
})
|
|
100
|
+
})]),
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The cell value formatted with the column valueFormatter.
|
|
104
|
+
*/
|
|
105
|
+
formattedValue: _propTypes.default.any,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get the cell value of a row and field.
|
|
109
|
+
* @param {GridRowId} id The row id.
|
|
110
|
+
* @param {string} field The field.
|
|
111
|
+
* @returns {any} The cell value.
|
|
112
|
+
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
113
|
+
*/
|
|
114
|
+
getValue: _propTypes.default.func.isRequired,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* If true, the cell is the active element.
|
|
118
|
+
*/
|
|
119
|
+
hasFocus: _propTypes.default.bool.isRequired,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The grid row id.
|
|
123
|
+
*/
|
|
124
|
+
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* If true, the cell is editable.
|
|
128
|
+
*/
|
|
129
|
+
isEditable: _propTypes.default.bool,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The row model of the row that the current cell belongs to.
|
|
133
|
+
*/
|
|
134
|
+
row: _propTypes.default.object.isRequired,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The node of the row that the current cell belongs to.
|
|
138
|
+
*/
|
|
139
|
+
rowNode: _propTypes.default.object.isRequired,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* the tabIndex value.
|
|
143
|
+
*/
|
|
144
|
+
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The cell value, but if the column has valueGetter, use getValue.
|
|
148
|
+
*/
|
|
149
|
+
value: _propTypes.default.any
|
|
150
|
+
} : void 0;
|
|
151
|
+
const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
|
|
61
152
|
exports.GridBooleanCell = GridBooleanCell;
|
|
62
153
|
|
|
63
154
|
const renderBooleanCell = params => {
|
|
@@ -22,6 +22,8 @@ var _utils = require("@mui/material/utils");
|
|
|
22
22
|
|
|
23
23
|
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
|
|
24
24
|
|
|
25
|
+
var _styles = require("@mui/material/styles");
|
|
26
|
+
|
|
25
27
|
var _gridClasses = require("../../constants/gridClasses");
|
|
26
28
|
|
|
27
29
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -36,6 +38,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
36
38
|
|
|
37
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
38
40
|
|
|
41
|
+
const StyledInputBase = (0, _styles.styled)(_InputBase.default)({
|
|
42
|
+
fontSize: 'inherit'
|
|
43
|
+
});
|
|
44
|
+
|
|
39
45
|
const useUtilityClasses = ownerState => {
|
|
40
46
|
const {
|
|
41
47
|
classes
|
|
@@ -140,7 +146,7 @@ function GridEditDateCell(props) {
|
|
|
140
146
|
inputRef.current.focus();
|
|
141
147
|
}
|
|
142
148
|
}, [hasFocus]);
|
|
143
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
149
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInputBase, (0, _extends2.default)({
|
|
144
150
|
inputRef: inputRef,
|
|
145
151
|
fullWidth: true,
|
|
146
152
|
className: classes.root,
|
|
@@ -17,6 +17,19 @@ Object.keys(_GridCell).forEach(function (key) {
|
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
+
var _GridBooleanCell = require("./GridBooleanCell");
|
|
21
|
+
|
|
22
|
+
Object.keys(_GridBooleanCell).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _GridBooleanCell[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _GridBooleanCell[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
20
33
|
var _GridEditBooleanCell = require("./GridEditBooleanCell");
|
|
21
34
|
|
|
22
35
|
Object.keys(_GridEditBooleanCell).forEach(function (key) {
|