@mui/x-data-grid 6.0.0-beta.4 → 6.0.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 +204 -29
- package/DataGrid/DataGrid.js +10 -2
- package/DataGrid/useDataGridProps.js +25 -18
- package/colDef/gridSingleSelectColDef.js +13 -4
- package/components/GridColumnHeaders.d.ts +7 -0
- package/components/GridColumnHeaders.js +108 -0
- package/components/GridFooter.d.ts +1 -1
- package/components/GridFooter.js +2 -2
- package/components/GridHeader.js +2 -2
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridNoResultsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.d.ts +1 -1
- package/components/GridRow.d.ts +13 -7
- package/components/GridRow.js +49 -31
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +4 -6
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.d.ts +1 -1
- package/components/GridSelectedRowCount.js +4 -6
- package/components/base/GridBody.d.ts +1 -4
- package/components/base/GridBody.js +43 -5
- package/components/base/GridFooterPlaceholder.js +2 -2
- package/components/base/GridOverlays.js +7 -7
- package/components/cell/GridActionsCell.js +4 -4
- package/components/cell/GridActionsCellItem.js +3 -3
- package/components/cell/GridBooleanCell.js +1 -1
- package/components/cell/GridCell.d.ts +2 -5
- package/components/cell/GridCell.js +14 -12
- package/components/cell/GridEditBooleanCell.js +3 -3
- package/components/cell/GridEditInputCell.js +3 -6
- package/components/cell/GridEditSingleSelectCell.d.ts +2 -8
- package/components/cell/GridEditSingleSelectCell.js +32 -16
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +4 -4
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +7 -0
- package/{modern/components/columnHeaders/GridColumnHeaders.js → components/columnHeaders/GridBaseColumnHeaders.js} +14 -20
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +6 -6
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -5
- package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +7 -7
- package/components/columnHeaders/GridColumnHeaderTitle.js +10 -14
- package/components/columnHeaders/GridColumnHeadersInner.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeadersInner.js +6 -6
- package/components/columnHeaders/GridIconButtonContainer.js +4 -6
- package/components/columnSelection/GridCellCheckboxRenderer.js +3 -3
- package/components/columnSelection/GridHeaderCheckbox.js +3 -3
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +10 -15
- package/components/containers/GridMainContainer.js +3 -5
- package/components/containers/GridOverlay.d.ts +1 -2
- package/components/containers/GridOverlay.js +7 -11
- package/components/containers/GridRoot.js +4 -5
- package/components/containers/GridRootStyles.d.ts +5 -1
- package/components/containers/GridRootStyles.js +7 -3
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +4 -6
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/components/menu/GridMenu.js +5 -7
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -2
- package/components/panel/GridColumnsPanel.js +16 -18
- package/components/panel/GridPanel.d.ts +6 -2
- package/components/panel/GridPanel.js +4 -0
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelContent.js +4 -6
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -6
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPanelHeader.js +4 -6
- package/components/panel/GridPanelWrapper.js +3 -5
- package/components/panel/GridPreferencesPanel.js +4 -4
- package/components/panel/filterPanel/GridFilterForm.js +50 -45
- package/components/panel/filterPanel/GridFilterInputBoolean.js +14 -11
- package/components/panel/filterPanel/GridFilterInputDate.js +4 -5
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -8
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +28 -20
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +3 -3
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +2 -8
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +53 -25
- package/components/panel/filterPanel/GridFilterInputValue.js +4 -5
- package/components/panel/filterPanel/GridFilterPanel.d.ts +5 -3
- package/components/panel/filterPanel/GridFilterPanel.js +35 -11
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -2
- package/components/panel/filterPanel/filterPanelUtils.js +3 -9
- package/components/toolbar/GridToolbarColumnsButton.js +4 -4
- package/components/toolbar/GridToolbarDensitySelector.js +9 -9
- package/components/toolbar/GridToolbarExportContainer.js +4 -4
- package/components/toolbar/GridToolbarFilterButton.js +9 -11
- package/components/toolbar/GridToolbarQuickFilter.js +8 -7
- package/components/virtualization/GridVirtualScroller.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +4 -6
- package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerContent.js +4 -4
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +4 -6
- package/constants/defaultGridSlotsComponents.js +5 -54
- package/constants/localeTextConstants.js +1 -0
- package/hooks/core/useGridLocaleText.js +2 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +22 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +19 -26
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +5 -5
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +5 -5
- package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +2 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +36 -19
- package/index.d.ts +3 -0
- package/index.js +5 -1
- package/internals/index.d.ts +4 -1
- package/internals/index.js +3 -2
- package/internals/utils/computeSlots.d.ts +6 -0
- package/internals/utils/computeSlots.js +17 -0
- package/internals/utils/index.d.ts +2 -0
- package/internals/utils/index.js +2 -0
- package/internals/utils/slotsMigration.d.ts +4 -0
- package/internals/utils/slotsMigration.js +13 -0
- package/legacy/DataGrid/DataGrid.js +10 -2
- package/legacy/DataGrid/useDataGridProps.js +21 -20
- package/legacy/colDef/gridSingleSelectColDef.js +13 -4
- package/legacy/components/GridColumnHeaders.js +106 -0
- package/legacy/components/GridFooter.js +2 -2
- package/legacy/components/GridHeader.js +2 -2
- package/legacy/components/GridRow.js +47 -31
- package/legacy/components/GridRowCount.js +4 -6
- package/legacy/components/GridScrollArea.js +4 -3
- package/legacy/components/GridSelectedRowCount.js +4 -6
- package/legacy/components/base/GridBody.js +43 -5
- package/legacy/components/base/GridFooterPlaceholder.js +2 -2
- package/legacy/components/base/GridOverlays.js +7 -7
- package/legacy/components/cell/GridActionsCell.js +4 -4
- package/legacy/components/cell/GridActionsCellItem.js +3 -3
- package/legacy/components/cell/GridBooleanCell.js +2 -2
- package/legacy/components/cell/GridCell.js +14 -12
- package/legacy/components/cell/GridEditBooleanCell.js +3 -3
- package/legacy/components/cell/GridEditInputCell.js +3 -6
- package/legacy/components/cell/GridEditSingleSelectCell.js +40 -23
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +4 -4
- package/legacy/components/columnHeaders/{GridColumnHeaders.js → GridBaseColumnHeaders.js} +14 -19
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +6 -6
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -5
- package/legacy/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/legacy/components/columnHeaders/GridColumnHeaderSortIcon.js +7 -7
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +12 -17
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +6 -6
- package/legacy/components/columnHeaders/GridIconButtonContainer.js +4 -6
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +3 -3
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +3 -3
- package/legacy/components/containers/GridFooterContainer.js +10 -15
- package/legacy/components/containers/GridMainContainer.js +3 -5
- package/legacy/components/containers/GridOverlay.js +12 -17
- package/legacy/components/containers/GridRoot.js +5 -6
- package/legacy/components/containers/GridRootStyles.js +7 -3
- package/legacy/components/containers/GridToolbarContainer.js +4 -6
- package/legacy/components/index.js +1 -1
- package/legacy/components/menu/GridMenu.js +5 -7
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -2
- package/legacy/components/panel/GridColumnsPanel.js +16 -20
- package/legacy/components/panel/GridPanel.js +4 -0
- package/legacy/components/panel/GridPanelContent.js +4 -6
- package/legacy/components/panel/GridPanelFooter.js +4 -6
- package/legacy/components/panel/GridPanelHeader.js +4 -6
- package/legacy/components/panel/GridPanelWrapper.js +3 -5
- package/legacy/components/panel/GridPreferencesPanel.js +4 -4
- package/legacy/components/panel/filterPanel/GridFilterForm.js +50 -45
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +14 -11
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -5
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -26
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +3 -3
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +52 -27
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +36 -10
- package/legacy/components/panel/filterPanel/filterPanelUtils.js +3 -9
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +4 -4
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +9 -9
- package/legacy/components/toolbar/GridToolbarExportContainer.js +4 -4
- package/legacy/components/toolbar/GridToolbarFilterButton.js +9 -11
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +8 -7
- package/legacy/components/virtualization/GridVirtualScroller.js +4 -6
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +4 -4
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +4 -6
- package/legacy/constants/defaultGridSlotsComponents.js +5 -54
- package/legacy/constants/localeTextConstants.js +1 -0
- package/legacy/hooks/core/useGridLocaleText.js +2 -4
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +19 -26
- package/legacy/hooks/features/columns/useGridColumns.js +5 -5
- package/legacy/hooks/features/filter/useGridFilter.js +5 -5
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +34 -17
- package/legacy/index.js +5 -1
- package/legacy/internals/index.js +3 -2
- package/legacy/internals/utils/computeSlots.js +16 -0
- package/legacy/internals/utils/index.js +2 -0
- package/legacy/internals/utils/slotsMigration.js +14 -0
- package/legacy/locales/arSD.js +15 -19
- package/legacy/locales/beBY.js +1 -0
- package/legacy/locales/bgBG.js +1 -0
- package/legacy/locales/csCZ.js +25 -32
- package/legacy/locales/daDK.js +1 -0
- package/legacy/locales/deDE.js +1 -0
- package/legacy/locales/elGR.js +1 -0
- package/legacy/locales/esES.js +2 -1
- package/legacy/locales/faIR.js +1 -0
- package/legacy/locales/fiFI.js +1 -0
- package/legacy/locales/frFR.js +1 -0
- package/legacy/locales/heIL.js +1 -0
- package/legacy/locales/huHU.js +1 -0
- package/legacy/locales/itIT.js +1 -0
- package/legacy/locales/jaJP.js +1 -0
- package/legacy/locales/koKR.js +1 -0
- package/legacy/locales/nbNO.js +1 -0
- package/legacy/locales/nlNL.js +1 -0
- package/legacy/locales/plPL.js +1 -0
- package/legacy/locales/ptBR.js +1 -0
- package/legacy/locales/roRO.js +1 -0
- package/legacy/locales/ruRU.js +1 -0
- package/legacy/locales/skSK.js +1 -0
- package/legacy/locales/svSE.js +1 -0
- package/legacy/locales/trTR.js +1 -0
- package/legacy/locales/ukUA.js +1 -0
- package/legacy/locales/urPK.js +1 -0
- package/legacy/locales/viVN.js +1 -0
- package/legacy/locales/zhCN.js +1 -0
- package/legacy/locales/zhTW.js +1 -0
- package/legacy/material/components/MUISelectOption.js +14 -0
- package/legacy/{components/columnHeaders → material/icons}/GridColumnUnsortedIcon.js +1 -1
- package/legacy/{components → material}/icons/index.js +7 -1
- package/legacy/material/index.js +65 -0
- package/legacy/models/gridFilterItem.js +2 -0
- package/legacy/models/params/gridRowParams.js +4 -0
- package/locales/arSD.js +15 -19
- package/locales/beBY.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/csCZ.js +24 -31
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +2 -1
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.js +1 -0
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/roRO.js +1 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.js +1 -0
- package/locales/svSE.js +1 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/urPK.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/locales/zhTW.js +1 -0
- package/material/components/MUISelectOption.d.ts +3 -0
- package/material/components/MUISelectOption.js +16 -0
- package/{components/columnHeaders → material/icons}/GridColumnUnsortedIcon.js +1 -1
- package/{components → material}/icons/index.d.ts +6 -0
- package/{components → material}/icons/index.js +7 -1
- package/material/index.d.ts +57 -0
- package/material/index.js +65 -0
- package/material/package.json +6 -0
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/colDef/gridColDef.d.ts +19 -1
- package/models/gridExport.d.ts +4 -0
- package/models/gridFilterItem.d.ts +2 -0
- package/models/gridFilterItem.js +2 -0
- package/models/gridFilterModel.d.ts +2 -0
- package/models/gridFilterOperator.d.ts +2 -0
- package/models/gridIconSlotsComponent.d.ts +22 -2
- package/models/gridSlotsComponent.d.ts +18 -1
- package/models/gridSlotsComponentsProps.d.ts +103 -23
- package/models/params/gridRowParams.d.ts +6 -0
- package/models/params/gridRowParams.js +4 -0
- package/models/props/DataGridProps.d.ts +13 -2
- package/modern/DataGrid/DataGrid.js +10 -2
- package/modern/DataGrid/useDataGridProps.js +21 -17
- package/modern/colDef/gridSingleSelectColDef.js +13 -4
- package/modern/components/GridColumnHeaders.js +108 -0
- package/modern/components/GridFooter.js +1 -1
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridRow.js +49 -28
- package/modern/components/GridRowCount.js +4 -6
- package/modern/components/GridScrollArea.js +4 -3
- package/modern/components/GridSelectedRowCount.js +4 -6
- package/modern/components/base/GridBody.js +43 -5
- package/modern/components/base/GridFooterPlaceholder.js +1 -1
- package/modern/components/base/GridOverlays.js +4 -4
- package/modern/components/cell/GridActionsCell.js +3 -3
- package/modern/components/cell/GridActionsCellItem.js +2 -2
- package/modern/components/cell/GridBooleanCell.js +1 -1
- package/modern/components/cell/GridCell.js +14 -12
- package/modern/components/cell/GridEditBooleanCell.js +2 -2
- package/modern/components/cell/GridEditInputCell.js +3 -6
- package/modern/components/cell/GridEditSingleSelectCell.js +30 -15
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/{components/columnHeaders/GridColumnHeaders.js → modern/components/columnHeaders/GridBaseColumnHeaders.js} +14 -20
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +5 -5
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +4 -4
- package/modern/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +6 -6
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +9 -13
- package/modern/components/columnHeaders/GridColumnHeadersInner.js +6 -6
- package/modern/components/columnHeaders/GridIconButtonContainer.js +4 -6
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/modern/components/containers/GridFooterContainer.js +10 -15
- package/modern/components/containers/GridMainContainer.js +3 -5
- package/modern/components/containers/GridOverlay.js +7 -11
- package/modern/components/containers/GridRoot.js +4 -5
- package/modern/components/containers/GridRootStyles.js +7 -3
- package/modern/components/containers/GridToolbarContainer.js +4 -6
- package/modern/components/index.js +1 -1
- package/modern/components/menu/GridMenu.js +4 -6
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -2
- package/modern/components/panel/GridColumnsPanel.js +14 -16
- package/modern/components/panel/GridPanel.js +4 -0
- package/modern/components/panel/GridPanelContent.js +4 -6
- package/modern/components/panel/GridPanelFooter.js +4 -6
- package/modern/components/panel/GridPanelHeader.js +4 -6
- package/modern/components/panel/GridPanelWrapper.js +3 -5
- package/modern/components/panel/GridPreferencesPanel.js +3 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +49 -44
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +13 -10
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +3 -4
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +24 -17
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +52 -24
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -4
- package/modern/components/panel/filterPanel/GridFilterPanel.js +34 -10
- package/modern/components/panel/filterPanel/filterPanelUtils.js +3 -9
- package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -3
- package/modern/components/toolbar/GridToolbarDensitySelector.js +8 -8
- package/modern/components/toolbar/GridToolbarExportContainer.js +3 -3
- package/modern/components/toolbar/GridToolbarFilterButton.js +8 -10
- package/modern/components/toolbar/GridToolbarQuickFilter.js +7 -6
- package/modern/components/virtualization/GridVirtualScroller.js +4 -6
- package/modern/components/virtualization/GridVirtualScrollerContent.js +4 -4
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +4 -6
- package/modern/constants/defaultGridSlotsComponents.js +5 -54
- package/modern/constants/localeTextConstants.js +1 -0
- package/modern/hooks/core/useGridLocaleText.js +2 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +19 -26
- package/modern/hooks/features/columns/useGridColumns.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +3 -3
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +34 -18
- package/modern/index.js +5 -1
- package/modern/internals/index.js +3 -2
- package/modern/internals/utils/computeSlots.js +17 -0
- package/modern/internals/utils/index.js +2 -0
- package/modern/internals/utils/slotsMigration.js +13 -0
- package/modern/locales/arSD.js +15 -19
- package/modern/locales/beBY.js +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/csCZ.js +24 -31
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.js +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/esES.js +2 -1
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.js +1 -0
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/roRO.js +1 -0
- package/modern/locales/ruRU.js +1 -0
- package/modern/locales/skSK.js +1 -0
- package/modern/locales/svSE.js +1 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/urPK.js +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/modern/locales/zhTW.js +1 -0
- package/modern/material/components/MUISelectOption.js +16 -0
- package/modern/{components/columnHeaders → material/icons}/GridColumnUnsortedIcon.js +1 -1
- package/modern/{components → material}/icons/index.js +7 -1
- package/modern/material/index.js +65 -0
- package/modern/models/gridFilterItem.js +2 -0
- package/modern/models/params/gridRowParams.js +4 -0
- package/node/DataGrid/DataGrid.js +10 -2
- package/node/DataGrid/useDataGridProps.js +21 -17
- package/node/colDef/gridSingleSelectColDef.js +12 -3
- package/node/components/GridColumnHeaders.js +116 -0
- package/node/components/GridFooter.js +1 -1
- package/node/components/GridHeader.js +1 -1
- package/node/components/GridRow.js +49 -28
- package/node/components/GridRowCount.js +5 -7
- package/node/components/GridScrollArea.js +5 -4
- package/node/components/GridSelectedRowCount.js +5 -7
- package/node/components/base/GridBody.js +43 -5
- package/node/components/base/GridFooterPlaceholder.js +1 -1
- package/node/components/base/GridOverlays.js +6 -6
- package/node/components/cell/GridActionsCell.js +3 -3
- package/node/components/cell/GridActionsCellItem.js +2 -2
- package/node/components/cell/GridBooleanCell.js +1 -1
- package/node/components/cell/GridCell.js +14 -11
- package/node/components/cell/GridEditBooleanCell.js +2 -2
- package/node/components/cell/GridEditInputCell.js +3 -6
- package/node/components/cell/GridEditSingleSelectCell.js +28 -14
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/node/components/columnHeaders/{GridColumnHeaders.js → GridBaseColumnHeaders.js} +17 -23
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +5 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +4 -4
- package/node/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +6 -6
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +10 -14
- package/node/components/columnHeaders/GridColumnHeadersInner.js +7 -7
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -7
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/node/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/node/components/containers/GridFooterContainer.js +11 -16
- package/node/components/containers/GridMainContainer.js +4 -6
- package/node/components/containers/GridOverlay.js +8 -12
- package/node/components/containers/GridRoot.js +4 -5
- package/node/components/containers/GridRootStyles.js +7 -3
- package/node/components/containers/GridToolbarContainer.js +5 -7
- package/node/components/index.js +1 -1
- package/node/components/menu/GridMenu.js +4 -6
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -2
- package/node/components/panel/GridColumnsPanel.js +14 -16
- package/node/components/panel/GridPanel.js +4 -0
- package/node/components/panel/GridPanelContent.js +5 -7
- package/node/components/panel/GridPanelFooter.js +5 -7
- package/node/components/panel/GridPanelHeader.js +5 -7
- package/node/components/panel/GridPanelWrapper.js +3 -5
- package/node/components/panel/GridPreferencesPanel.js +3 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +48 -44
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +13 -10
- package/node/components/panel/filterPanel/GridFilterInputDate.js +3 -4
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +23 -16
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +50 -23
- package/node/components/panel/filterPanel/GridFilterInputValue.js +3 -4
- package/node/components/panel/filterPanel/GridFilterPanel.js +34 -10
- package/node/components/panel/filterPanel/filterPanelUtils.js +3 -10
- package/node/components/toolbar/GridToolbarColumnsButton.js +3 -3
- package/node/components/toolbar/GridToolbarDensitySelector.js +8 -8
- package/node/components/toolbar/GridToolbarExportContainer.js +3 -3
- package/node/components/toolbar/GridToolbarFilterButton.js +8 -10
- package/node/components/toolbar/GridToolbarQuickFilter.js +7 -6
- package/node/components/virtualization/GridVirtualScroller.js +5 -7
- package/node/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -7
- package/node/constants/defaultGridSlotsComponents.js +4 -53
- package/node/constants/localeTextConstants.js +1 -0
- package/node/hooks/core/useGridLocaleText.js +2 -4
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +21 -28
- package/node/hooks/features/columns/useGridColumns.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +3 -3
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +33 -16
- package/node/index.js +9 -1
- package/node/internals/index.js +94 -4
- package/node/internals/utils/computeSlots.js +23 -0
- package/node/internals/utils/index.js +27 -0
- package/node/internals/utils/slotsMigration.js +21 -0
- package/node/locales/arSD.js +15 -19
- package/node/locales/beBY.js +1 -0
- package/node/locales/bgBG.js +1 -0
- package/node/locales/csCZ.js +24 -31
- package/node/locales/daDK.js +1 -0
- package/node/locales/deDE.js +1 -0
- package/node/locales/elGR.js +1 -0
- package/node/locales/esES.js +2 -1
- package/node/locales/faIR.js +1 -0
- package/node/locales/fiFI.js +1 -0
- package/node/locales/frFR.js +1 -0
- package/node/locales/heIL.js +1 -0
- package/node/locales/huHU.js +1 -0
- package/node/locales/itIT.js +1 -0
- package/node/locales/jaJP.js +1 -0
- package/node/locales/koKR.js +1 -0
- package/node/locales/nbNO.js +1 -0
- package/node/locales/nlNL.js +1 -0
- package/node/locales/plPL.js +1 -0
- package/node/locales/ptBR.js +1 -0
- package/node/locales/roRO.js +1 -0
- package/node/locales/ruRU.js +1 -0
- package/node/locales/skSK.js +1 -0
- package/node/locales/svSE.js +1 -0
- package/node/locales/trTR.js +1 -0
- package/node/locales/ukUA.js +1 -0
- package/node/locales/urPK.js +1 -0
- package/node/locales/viVN.js +1 -0
- package/node/locales/zhCN.js +1 -0
- package/node/locales/zhTW.js +1 -0
- package/node/{components/DataGridColumnHeaders.js → material/components/MUISelectOption.js} +13 -35
- package/node/{components/columnHeaders → material/icons}/GridColumnUnsortedIcon.js +1 -1
- package/node/{components → material}/icons/index.js +10 -2
- package/node/material/index.js +73 -0
- package/node/models/gridFilterItem.js +2 -0
- package/node/models/params/gridRowParams.js +4 -0
- package/package.json +1 -1
- package/components/DataGridColumnHeaders.d.ts +0 -6
- package/components/DataGridColumnHeaders.js +0 -38
- package/components/columnHeaders/GridColumnHeaders.d.ts +0 -7
- package/legacy/components/DataGridColumnHeaders.js +0 -36
- package/modern/components/DataGridColumnHeaders.js +0 -38
- /package/{components/columnHeaders → material/icons}/GridColumnUnsortedIcon.d.ts +0 -0
|
@@ -5,7 +5,7 @@ const _excluded = ["align", "children", "colIndex", "colDef", "cellMode", "field
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
|
-
import { unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
|
|
8
|
+
import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { GridCellModes } from '../../models';
|
|
11
11
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
@@ -40,7 +40,7 @@ const useUtilityClasses = ownerState => {
|
|
|
40
40
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
41
41
|
};
|
|
42
42
|
let warnedOnce = false;
|
|
43
|
-
|
|
43
|
+
const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
44
44
|
var _rootProps$experiment;
|
|
45
45
|
const {
|
|
46
46
|
align,
|
|
@@ -74,6 +74,7 @@ function GridCell(props) {
|
|
|
74
74
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
75
75
|
const valueToRender = formattedValue == null ? value : formattedValue;
|
|
76
76
|
const cellRef = React.useRef(null);
|
|
77
|
+
const handleRef = useForkRef(ref, cellRef);
|
|
77
78
|
const focusElementRef = React.useRef(null);
|
|
78
79
|
const apiRef = useGridApiContext();
|
|
79
80
|
const rootProps = useGridRootProps();
|
|
@@ -175,7 +176,7 @@ function GridCell(props) {
|
|
|
175
176
|
onDragOver: publish('cellDragOver', onDragOver)
|
|
176
177
|
};
|
|
177
178
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
178
|
-
ref:
|
|
179
|
+
ref: handleRef,
|
|
179
180
|
className: clsx(className, classes.root),
|
|
180
181
|
role: "cell",
|
|
181
182
|
"data-field": field,
|
|
@@ -195,23 +196,24 @@ function GridCell(props) {
|
|
|
195
196
|
onFocus: handleFocus,
|
|
196
197
|
children: renderChildren()
|
|
197
198
|
}));
|
|
198
|
-
}
|
|
199
|
+
});
|
|
200
|
+
const MemoizedCell = /*#__PURE__*/React.memo(GridCell);
|
|
199
201
|
process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
200
202
|
// ----------------------------- Warning --------------------------------
|
|
201
203
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
202
204
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
203
205
|
// ----------------------------------------------------------------------
|
|
204
|
-
align: PropTypes.oneOf(['center', 'left', 'right'])
|
|
206
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
205
207
|
cellMode: PropTypes.oneOf(['edit', 'view']),
|
|
206
208
|
children: PropTypes.node,
|
|
207
209
|
className: PropTypes.string,
|
|
208
|
-
colIndex: PropTypes.number
|
|
210
|
+
colIndex: PropTypes.number,
|
|
209
211
|
colSpan: PropTypes.number,
|
|
210
212
|
disableDragEvents: PropTypes.bool,
|
|
211
|
-
field: PropTypes.string
|
|
213
|
+
field: PropTypes.string,
|
|
212
214
|
formattedValue: PropTypes.any,
|
|
213
215
|
hasFocus: PropTypes.bool,
|
|
214
|
-
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
216
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
215
217
|
isEditable: PropTypes.bool,
|
|
216
218
|
isSelected: PropTypes.bool,
|
|
217
219
|
onClick: PropTypes.func,
|
|
@@ -221,10 +223,10 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
221
223
|
onKeyDown: PropTypes.func,
|
|
222
224
|
onMouseDown: PropTypes.func,
|
|
223
225
|
onMouseUp: PropTypes.func,
|
|
224
|
-
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
226
|
+
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
225
227
|
showRightBorder: PropTypes.bool,
|
|
226
|
-
tabIndex: PropTypes.oneOf([-1, 0])
|
|
228
|
+
tabIndex: PropTypes.oneOf([-1, 0]),
|
|
227
229
|
value: PropTypes.any,
|
|
228
|
-
width: PropTypes.number
|
|
230
|
+
width: PropTypes.number
|
|
229
231
|
} : void 0;
|
|
230
|
-
export { GridCell };
|
|
232
|
+
export { MemoizedCell as GridCell };
|
|
@@ -19,7 +19,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
19
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
20
20
|
};
|
|
21
21
|
function GridEditBooleanCell(props) {
|
|
22
|
-
var _rootProps$
|
|
22
|
+
var _rootProps$slotProps;
|
|
23
23
|
const {
|
|
24
24
|
id: idProp,
|
|
25
25
|
value,
|
|
@@ -62,13 +62,13 @@ function GridEditBooleanCell(props) {
|
|
|
62
62
|
htmlFor: id,
|
|
63
63
|
className: clsx(classes.root, className)
|
|
64
64
|
}, other, {
|
|
65
|
-
children: /*#__PURE__*/_jsx(rootProps.
|
|
65
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
66
66
|
id: id,
|
|
67
67
|
inputRef: inputRef,
|
|
68
68
|
checked: Boolean(valueState),
|
|
69
69
|
onChange: handleChange,
|
|
70
70
|
size: "small"
|
|
71
|
-
}, (_rootProps$
|
|
71
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox))
|
|
72
72
|
}));
|
|
73
73
|
}
|
|
74
74
|
process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes = {
|
|
@@ -8,7 +8,6 @@ import { styled } from '@mui/material/styles';
|
|
|
8
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
-
import { GridLoadIcon } from '../icons/index';
|
|
12
11
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
const useUtilityClasses = ownerState => {
|
|
@@ -49,10 +48,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
49
48
|
const apiRef = useGridApiContext();
|
|
50
49
|
const inputRef = React.useRef();
|
|
51
50
|
const [valueState, setValueState] = React.useState(value);
|
|
52
|
-
const
|
|
53
|
-
classes: rootProps.classes
|
|
54
|
-
};
|
|
55
|
-
const classes = useUtilityClasses(ownerState);
|
|
51
|
+
const classes = useUtilityClasses(rootProps);
|
|
56
52
|
const handleChange = React.useCallback(async event => {
|
|
57
53
|
const newValue = event.target.value;
|
|
58
54
|
if (onValueChange) {
|
|
@@ -87,11 +83,12 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
87
83
|
ref: ref,
|
|
88
84
|
inputRef: inputRef,
|
|
89
85
|
className: classes.root,
|
|
86
|
+
ownerState: rootProps,
|
|
90
87
|
fullWidth: true,
|
|
91
88
|
type: colDef.type === 'number' ? colDef.type : 'text',
|
|
92
89
|
value: valueState != null ? valueState : '',
|
|
93
90
|
onChange: handleChange,
|
|
94
|
-
endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(
|
|
91
|
+
endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {}) : undefined
|
|
95
92
|
}, other));
|
|
96
93
|
});
|
|
97
94
|
process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
3
3
|
import { GridRenderEditCellParams } from '../../models/params/gridCellParams';
|
|
4
|
-
import {
|
|
5
|
-
export interface GridEditSingleSelectCellProps extends GridRenderEditCellParams, Omit<SelectProps, 'id' | 'tabIndex' | 'value'> {
|
|
4
|
+
import { GridSingleSelectColDef } from '../../models/colDef/gridColDef';
|
|
5
|
+
export interface GridEditSingleSelectCellProps extends GridRenderEditCellParams, Omit<SelectProps, 'id' | 'tabIndex' | 'value'>, Pick<GridSingleSelectColDef, 'getOptionLabel' | 'getOptionValue'> {
|
|
6
6
|
/**
|
|
7
7
|
* Callback called when the value is changed by the user.
|
|
8
8
|
* @param {SelectChangeEvent<any>} event The event source of the callback.
|
|
@@ -14,12 +14,6 @@ export interface GridEditSingleSelectCellProps extends GridRenderEditCellParams,
|
|
|
14
14
|
* If true, the select opens by default.
|
|
15
15
|
*/
|
|
16
16
|
initialOpen?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Used to determine the text displayed for a given value option.
|
|
19
|
-
* @param {ValueOptions} value The current value option.
|
|
20
|
-
* @returns {string} The text to be displayed.
|
|
21
|
-
*/
|
|
22
|
-
getOptionLabel?: (value: ValueOptions) => string;
|
|
23
17
|
}
|
|
24
18
|
declare function GridEditSingleSelectCell(props: GridEditSingleSelectCellProps): JSX.Element | null;
|
|
25
19
|
declare namespace GridEditSingleSelectCell {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange", "initialOpen", "getOptionLabel"];
|
|
3
|
+
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange", "initialOpen", "getOptionLabel", "getOptionValue"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
7
|
-
import MenuItem from '@mui/material/MenuItem';
|
|
8
7
|
import { isEscapeKey } from '../../utils/keyboardUtils';
|
|
9
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
9
|
import { GridEditModes } from '../../models/gridEditRowModel';
|
|
11
|
-
import {
|
|
10
|
+
import { getValueFromValueOptions, isSingleSelectColDef } from '../panel/filterPanel/filterPanelUtils';
|
|
12
11
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
12
|
+
import { createElement as _createElement } from "react";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
function isKeyboardEvent(event) {
|
|
15
15
|
return !!event.key;
|
|
16
16
|
}
|
|
17
17
|
function GridEditSingleSelectCell(props) {
|
|
18
|
-
var _rootProps$
|
|
18
|
+
var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2;
|
|
19
19
|
const rootProps = useGridRootProps();
|
|
20
20
|
const {
|
|
21
21
|
id,
|
|
@@ -27,14 +27,15 @@ function GridEditSingleSelectCell(props) {
|
|
|
27
27
|
error,
|
|
28
28
|
onValueChange,
|
|
29
29
|
initialOpen = rootProps.editMode === GridEditModes.Cell,
|
|
30
|
-
getOptionLabel
|
|
30
|
+
getOptionLabel: getOptionLabelProp,
|
|
31
|
+
getOptionValue: getOptionValueProp
|
|
31
32
|
} = props,
|
|
32
33
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
33
34
|
const apiRef = useGridApiContext();
|
|
34
35
|
const ref = React.useRef();
|
|
35
36
|
const inputRef = React.useRef();
|
|
36
37
|
const [open, setOpen] = React.useState(initialOpen);
|
|
37
|
-
const baseSelectProps = ((_rootProps$
|
|
38
|
+
const baseSelectProps = ((_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseSelect) || {};
|
|
38
39
|
const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : false;
|
|
39
40
|
useEnhancedEffect(() => {
|
|
40
41
|
if (hasFocus) {
|
|
@@ -58,11 +59,16 @@ function GridEditSingleSelectCell(props) {
|
|
|
58
59
|
if (!valueOptions) {
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
62
|
+
const getOptionValue = getOptionValueProp || colDef.getOptionValue;
|
|
63
|
+
const getOptionLabel = getOptionLabelProp || colDef.getOptionLabel;
|
|
61
64
|
const handleChange = async event => {
|
|
65
|
+
if (!isSingleSelectColDef(colDef) || !valueOptions) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
62
68
|
setOpen(false);
|
|
63
69
|
const target = event.target;
|
|
64
70
|
// NativeSelect casts the value to a string.
|
|
65
|
-
const formattedTargetValue = getValueFromValueOptions(target.value, valueOptions);
|
|
71
|
+
const formattedTargetValue = getValueFromValueOptions(target.value, valueOptions, getOptionValue);
|
|
66
72
|
if (onValueChange) {
|
|
67
73
|
await onValueChange(event, formattedTargetValue);
|
|
68
74
|
}
|
|
@@ -91,8 +97,10 @@ function GridEditSingleSelectCell(props) {
|
|
|
91
97
|
}
|
|
92
98
|
setOpen(true);
|
|
93
99
|
};
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
if (!valueOptions || !colDef) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({
|
|
96
104
|
ref: ref,
|
|
97
105
|
inputRef: inputRef,
|
|
98
106
|
value: valueProp,
|
|
@@ -105,13 +113,15 @@ function GridEditSingleSelectCell(props) {
|
|
|
105
113
|
error: error,
|
|
106
114
|
native: isSelectNative,
|
|
107
115
|
fullWidth: true
|
|
108
|
-
}, other, (_rootProps$
|
|
116
|
+
}, other, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseSelect, {
|
|
109
117
|
children: valueOptions.map(valueOption => {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
var _rootProps$slotProps3;
|
|
119
|
+
const value = getOptionValue(valueOption);
|
|
120
|
+
return /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, ((_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseSelectOption) || {}, {
|
|
121
|
+
native: isSelectNative,
|
|
122
|
+
key: value,
|
|
123
|
+
value: value
|
|
124
|
+
}), getOptionLabel(valueOption));
|
|
115
125
|
})
|
|
116
126
|
}));
|
|
117
127
|
}
|
|
@@ -142,11 +152,17 @@ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
|
|
|
142
152
|
*/
|
|
143
153
|
formattedValue: PropTypes.any,
|
|
144
154
|
/**
|
|
145
|
-
* Used to determine the
|
|
155
|
+
* Used to determine the label displayed for a given value option.
|
|
146
156
|
* @param {ValueOptions} value The current value option.
|
|
147
157
|
* @returns {string} The text to be displayed.
|
|
148
158
|
*/
|
|
149
159
|
getOptionLabel: PropTypes.func,
|
|
160
|
+
/**
|
|
161
|
+
* Used to determine the value used for a value option.
|
|
162
|
+
* @param {ValueOptions} value The current value option.
|
|
163
|
+
* @returns {string} The value to be used.
|
|
164
|
+
*/
|
|
165
|
+
getOptionValue: PropTypes.func,
|
|
150
166
|
/**
|
|
151
167
|
* If true, the cell is the active element.
|
|
152
168
|
*/
|
|
@@ -17,7 +17,7 @@ const useUtilityClasses = ownerState => {
|
|
|
17
17
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
18
18
|
};
|
|
19
19
|
export const ColumnHeaderMenuIcon = /*#__PURE__*/React.memo(props => {
|
|
20
|
-
var _rootProps$
|
|
20
|
+
var _rootProps$slotProps;
|
|
21
21
|
const {
|
|
22
22
|
colDef,
|
|
23
23
|
open,
|
|
@@ -38,7 +38,7 @@ export const ColumnHeaderMenuIcon = /*#__PURE__*/React.memo(props => {
|
|
|
38
38
|
}, [apiRef, colDef.field]);
|
|
39
39
|
return /*#__PURE__*/_jsx("div", {
|
|
40
40
|
className: classes.root,
|
|
41
|
-
children: /*#__PURE__*/_jsx(rootProps.
|
|
41
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
42
42
|
ref: iconButtonRef,
|
|
43
43
|
tabIndex: -1,
|
|
44
44
|
className: classes.button,
|
|
@@ -50,8 +50,8 @@ export const ColumnHeaderMenuIcon = /*#__PURE__*/React.memo(props => {
|
|
|
50
50
|
"aria-haspopup": "true",
|
|
51
51
|
"aria-controls": columnMenuId,
|
|
52
52
|
id: columnMenuButtonId
|
|
53
|
-
}, (_rootProps$
|
|
54
|
-
children: /*#__PURE__*/_jsx(rootProps.
|
|
53
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
|
54
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuIcon, {
|
|
55
55
|
fontSize: "small"
|
|
56
56
|
})
|
|
57
57
|
}))
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/system';
|
|
3
|
+
interface GridBaseColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
sx?: SxProps<Theme>;
|
|
5
|
+
}
|
|
6
|
+
export declare const GridBaseColumnHeaders: React.ForwardRefExoticComponent<GridBaseColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export {};
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
7
|
-
import { styled } from '@mui/
|
|
7
|
+
import { styled } from '@mui/system';
|
|
8
8
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -21,32 +21,26 @@ const GridColumnHeadersRoot = styled('div', {
|
|
|
21
21
|
name: 'MuiDataGrid',
|
|
22
22
|
slot: 'ColumnHeaders',
|
|
23
23
|
overridesResolver: (props, styles) => styles.columnHeaders
|
|
24
|
-
})(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
borderBottom: '1px solid',
|
|
34
|
-
borderTopLeftRadius: theme.shape.borderRadius,
|
|
35
|
-
borderTopRightRadius: theme.shape.borderRadius
|
|
36
|
-
};
|
|
24
|
+
})({
|
|
25
|
+
position: 'relative',
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
borderBottom: '1px solid',
|
|
31
|
+
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
|
|
32
|
+
borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
|
|
37
33
|
});
|
|
38
|
-
export const
|
|
34
|
+
export const GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
|
|
39
35
|
const {
|
|
40
36
|
className
|
|
41
37
|
} = props,
|
|
42
38
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
43
39
|
const rootProps = useGridRootProps();
|
|
44
|
-
const
|
|
45
|
-
classes: rootProps.classes
|
|
46
|
-
};
|
|
47
|
-
const classes = useUtilityClasses(ownerState);
|
|
40
|
+
const classes = useUtilityClasses(rootProps);
|
|
48
41
|
return /*#__PURE__*/_jsx(GridColumnHeadersRoot, _extends({
|
|
49
42
|
ref: ref,
|
|
50
|
-
className: clsx(className, classes.root)
|
|
43
|
+
className: clsx(className, classes.root),
|
|
44
|
+
ownerState: rootProps
|
|
51
45
|
}, other));
|
|
52
46
|
});
|
|
@@ -21,7 +21,7 @@ const useUtilityClasses = ownerState => {
|
|
|
21
21
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
22
22
|
};
|
|
23
23
|
function GridColumnHeaderFilterIconButton(props) {
|
|
24
|
-
var _rootProps$
|
|
24
|
+
var _rootProps$slotProps, _rootProps$slotProps2;
|
|
25
25
|
const {
|
|
26
26
|
counter,
|
|
27
27
|
field,
|
|
@@ -52,22 +52,22 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
52
52
|
if (!counter) {
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
-
const iconButton = /*#__PURE__*/_jsx(rootProps.
|
|
55
|
+
const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
56
56
|
onClick: toggleFilter,
|
|
57
57
|
color: "default",
|
|
58
58
|
"aria-label": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),
|
|
59
59
|
size: "small",
|
|
60
60
|
tabIndex: -1
|
|
61
|
-
}, (_rootProps$
|
|
62
|
-
children: /*#__PURE__*/_jsx(rootProps.
|
|
61
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
|
62
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnFilteredIcon, {
|
|
63
63
|
className: classes.icon,
|
|
64
64
|
fontSize: "small"
|
|
65
65
|
})
|
|
66
66
|
}));
|
|
67
|
-
return /*#__PURE__*/_jsx(rootProps.
|
|
67
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
68
68
|
title: apiRef.current.getLocaleText('columnHeaderFiltersTooltipActive')(counter),
|
|
69
69
|
enterDelay: 1000
|
|
70
|
-
}, (_rootProps$
|
|
70
|
+
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseTooltip, {
|
|
71
71
|
children: /*#__PURE__*/_jsxs(GridIconButtonContainer, {
|
|
72
72
|
children: [counter > 1 && /*#__PURE__*/_jsx(Badge, {
|
|
73
73
|
badgeContent: counter,
|
|
@@ -33,7 +33,7 @@ const useUtilityClasses = ownerState => {
|
|
|
33
33
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
34
34
|
};
|
|
35
35
|
function GridColumnHeaderItem(props) {
|
|
36
|
-
var _rootProps$
|
|
36
|
+
var _rootProps$slotProps, _colDef$sortingOrder, _rootProps$slotProps2, _colDef$headerName;
|
|
37
37
|
const {
|
|
38
38
|
colDef,
|
|
39
39
|
columnMenuOpen,
|
|
@@ -118,16 +118,16 @@ function GridColumnHeaderItem(props) {
|
|
|
118
118
|
field: colDef.field,
|
|
119
119
|
open: columnMenuOpen,
|
|
120
120
|
target: iconButtonRef.current,
|
|
121
|
-
ContentComponent: rootProps.
|
|
122
|
-
contentComponentProps: (_rootProps$
|
|
121
|
+
ContentComponent: rootProps.slots.columnMenu,
|
|
122
|
+
contentComponentProps: (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.columnMenu,
|
|
123
123
|
onExited: handleExited
|
|
124
124
|
});
|
|
125
125
|
const sortingOrder = (_colDef$sortingOrder = colDef.sortingOrder) != null ? _colDef$sortingOrder : rootProps.sortingOrder;
|
|
126
126
|
const columnTitleIconButtons = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
127
|
-
children: [!rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.
|
|
127
|
+
children: [!rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderFilterIconButton, _extends({
|
|
128
128
|
field: colDef.field,
|
|
129
129
|
counter: filterItemsCounter
|
|
130
|
-
}, (_rootProps$
|
|
130
|
+
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.columnHeaderFilterIconButton)), colDef.sortable && !colDef.hideSortIcons && /*#__PURE__*/_jsx(GridColumnHeaderSortIcon, {
|
|
131
131
|
direction: sortDirection,
|
|
132
132
|
index: sortIndex,
|
|
133
133
|
sortingOrder: sortingOrder
|
|
@@ -52,7 +52,7 @@ function GridColumnHeaderSeparatorRaw(props) {
|
|
|
52
52
|
}
|
|
53
53
|
}, other, {
|
|
54
54
|
onClick: stopClick,
|
|
55
|
-
children: /*#__PURE__*/_jsx(rootProps.
|
|
55
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnResizeIcon, {
|
|
56
56
|
className: classes.icon
|
|
57
57
|
})
|
|
58
58
|
}))
|
|
@@ -22,11 +22,11 @@ function getIcon(icons, direction, className, sortingOrder) {
|
|
|
22
22
|
let Icon;
|
|
23
23
|
const iconProps = {};
|
|
24
24
|
if (direction === 'asc') {
|
|
25
|
-
Icon = icons.
|
|
25
|
+
Icon = icons.columnSortedAscendingIcon;
|
|
26
26
|
} else if (direction === 'desc') {
|
|
27
|
-
Icon = icons.
|
|
27
|
+
Icon = icons.columnSortedDescendingIcon;
|
|
28
28
|
} else {
|
|
29
|
-
Icon = icons.
|
|
29
|
+
Icon = icons.columnUnsortedIcon;
|
|
30
30
|
iconProps.sortingOrder = sortingOrder;
|
|
31
31
|
}
|
|
32
32
|
return Icon ? /*#__PURE__*/_jsx(Icon, _extends({
|
|
@@ -35,7 +35,7 @@ function getIcon(icons, direction, className, sortingOrder) {
|
|
|
35
35
|
}, iconProps)) : null;
|
|
36
36
|
}
|
|
37
37
|
function GridColumnHeaderSortIconRaw(props) {
|
|
38
|
-
var _rootProps$
|
|
38
|
+
var _rootProps$slotProps;
|
|
39
39
|
const {
|
|
40
40
|
direction,
|
|
41
41
|
index,
|
|
@@ -47,16 +47,16 @@ function GridColumnHeaderSortIconRaw(props) {
|
|
|
47
47
|
classes: rootProps.classes
|
|
48
48
|
});
|
|
49
49
|
const classes = useUtilityClasses(ownerState);
|
|
50
|
-
const iconElement = getIcon(rootProps.
|
|
50
|
+
const iconElement = getIcon(rootProps.slots, direction, classes.icon, sortingOrder);
|
|
51
51
|
if (!iconElement) {
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const iconButton = /*#__PURE__*/_jsx(rootProps.
|
|
54
|
+
const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
55
55
|
tabIndex: -1,
|
|
56
56
|
"aria-label": apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
|
|
57
57
|
title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
|
|
58
58
|
size: "small"
|
|
59
|
-
}, (_rootProps$
|
|
59
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
|
60
60
|
children: iconElement
|
|
61
61
|
}));
|
|
62
62
|
return /*#__PURE__*/_jsxs(GridIconButtonContainer, {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
-
import { styled } from '@mui/
|
|
8
|
+
import { styled } from '@mui/system';
|
|
9
9
|
import { isOverflown } from '../../utils/domUtils';
|
|
10
10
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -23,32 +23,28 @@ const GridColumnHeaderTitleRoot = styled('div', {
|
|
|
23
23
|
name: 'MuiDataGrid',
|
|
24
24
|
slot: 'ColumnHeaderTitle',
|
|
25
25
|
overridesResolver: (props, styles) => styles.columnHeaderTitle
|
|
26
|
-
})(
|
|
27
|
-
theme
|
|
28
|
-
}) => ({
|
|
26
|
+
})({
|
|
29
27
|
textOverflow: 'ellipsis',
|
|
30
28
|
overflow: 'hidden',
|
|
31
29
|
whiteSpace: 'nowrap',
|
|
32
|
-
fontWeight:
|
|
33
|
-
})
|
|
30
|
+
fontWeight: 'var(--unstable_DataGrid-headWeight)'
|
|
31
|
+
});
|
|
34
32
|
const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHeaderInnerTitle(props, ref) {
|
|
35
33
|
const {
|
|
36
34
|
className
|
|
37
35
|
} = props,
|
|
38
36
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
39
37
|
const rootProps = useGridRootProps();
|
|
40
|
-
const
|
|
41
|
-
classes: rootProps.classes
|
|
42
|
-
};
|
|
43
|
-
const classes = useUtilityClasses(ownerState);
|
|
38
|
+
const classes = useUtilityClasses(rootProps);
|
|
44
39
|
return /*#__PURE__*/_jsx(GridColumnHeaderTitleRoot, _extends({
|
|
45
40
|
ref: ref,
|
|
46
|
-
className: clsx(classes.root, className)
|
|
41
|
+
className: clsx(classes.root, className),
|
|
42
|
+
ownerState: rootProps
|
|
47
43
|
}, other));
|
|
48
44
|
});
|
|
49
45
|
// No React.memo here as if we display the sort icon, we need to recalculate the isOver
|
|
50
46
|
function GridColumnHeaderTitle(props) {
|
|
51
|
-
var _rootProps$
|
|
47
|
+
var _rootProps$slotProps;
|
|
52
48
|
const {
|
|
53
49
|
label,
|
|
54
50
|
description,
|
|
@@ -67,9 +63,9 @@ function GridColumnHeaderTitle(props) {
|
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
}, [titleRef, columnWidth, description, label]);
|
|
70
|
-
return /*#__PURE__*/_jsx(rootProps.
|
|
66
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
71
67
|
title: description || tooltip
|
|
72
|
-
}, (_rootProps$
|
|
68
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
|
73
69
|
children: /*#__PURE__*/_jsx(ColumnHeaderInnerTitle, {
|
|
74
70
|
ref: titleRef,
|
|
75
71
|
children: label
|
|
@@ -4,7 +4,7 @@ const _excluded = ["isDragging", "className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
7
|
-
import { styled } from '@mui/
|
|
7
|
+
import { styled } from '@mui/system';
|
|
8
8
|
import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
10
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
@@ -46,14 +46,14 @@ export const GridColumnHeadersInner = /*#__PURE__*/React.forwardRef(function Gri
|
|
|
46
46
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
47
47
|
const apiRef = useGridApiContext();
|
|
48
48
|
const rootProps = useGridRootProps();
|
|
49
|
-
const ownerState = {
|
|
49
|
+
const ownerState = _extends({}, rootProps, {
|
|
50
50
|
isDragging,
|
|
51
|
-
hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
|
|
52
|
-
|
|
53
|
-
};
|
|
51
|
+
hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
|
|
52
|
+
});
|
|
54
53
|
const classes = useUtilityClasses(ownerState);
|
|
55
54
|
return /*#__PURE__*/_jsx(GridColumnHeadersInnerRoot, _extends({
|
|
56
55
|
ref: ref,
|
|
57
|
-
className: clsx(className, classes.root)
|
|
56
|
+
className: clsx(className, classes.root),
|
|
57
|
+
ownerState: ownerState
|
|
58
58
|
}, other));
|
|
59
59
|
});
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
7
|
-
import { styled } from '@mui/
|
|
7
|
+
import { styled } from '@mui/system';
|
|
8
8
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,12 +32,10 @@ export const GridIconButtonContainer = /*#__PURE__*/React.forwardRef(function Gr
|
|
|
32
32
|
} = props,
|
|
33
33
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
34
34
|
const rootProps = useGridRootProps();
|
|
35
|
-
const
|
|
36
|
-
classes: rootProps.classes
|
|
37
|
-
};
|
|
38
|
-
const classes = useUtilityClasses(ownerState);
|
|
35
|
+
const classes = useUtilityClasses(rootProps);
|
|
39
36
|
return /*#__PURE__*/_jsx(GridIconButtonContainerRoot, _extends({
|
|
40
37
|
ref: ref,
|
|
41
|
-
className: clsx(classes.root, className)
|
|
38
|
+
className: clsx(classes.root, className),
|
|
39
|
+
ownerState: rootProps
|
|
42
40
|
}, other));
|
|
43
41
|
});
|
|
@@ -19,7 +19,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
19
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
20
20
|
};
|
|
21
21
|
const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCellCheckboxRenderer(props, ref) {
|
|
22
|
-
var _rootProps$
|
|
22
|
+
var _rootProps$slotProps;
|
|
23
23
|
const {
|
|
24
24
|
field,
|
|
25
25
|
id,
|
|
@@ -75,7 +75,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
75
75
|
}
|
|
76
76
|
const isSelectable = apiRef.current.isRowSelectable(id);
|
|
77
77
|
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
78
|
-
return /*#__PURE__*/_jsx(rootProps.
|
|
78
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
79
79
|
ref: handleRef,
|
|
80
80
|
tabIndex: tabIndex,
|
|
81
81
|
checked: isChecked,
|
|
@@ -87,7 +87,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
87
87
|
onKeyDown: handleKeyDown,
|
|
88
88
|
disabled: !isSelectable,
|
|
89
89
|
touchRippleRef: rippleRef
|
|
90
|
-
}, (_rootProps$
|
|
90
|
+
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox, other));
|
|
91
91
|
});
|
|
92
92
|
process.env.NODE_ENV !== "production" ? GridCellCheckboxForwardRef.propTypes = {
|
|
93
93
|
// ----------------------------- Warning --------------------------------
|