@mui/x-data-grid 7.0.0-alpha.8 → 7.0.0-beta.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 +508 -30
- package/DataGrid/DataGrid.js +6 -6
- package/DataGrid/useDataGridComponent.js +2 -1
- package/DataGrid/useDataGridProps.js +1 -0
- package/README.md +3 -3
- package/components/GridColumnHeaders.d.ts +3 -2
- package/components/GridColumnHeaders.js +3 -11
- package/components/GridDetailPanels.d.ts +5 -0
- package/components/GridDetailPanels.js +4 -0
- package/components/GridHeaders.d.ts +4 -0
- package/components/GridHeaders.js +53 -0
- package/components/GridPinnedRows.d.ts +7 -0
- package/components/GridPinnedRows.js +4 -0
- package/components/GridRow.d.ts +7 -4
- package/components/GridRow.js +161 -97
- package/components/GridScrollbarFillerCell.d.ts +7 -0
- package/components/GridScrollbarFillerCell.js +39 -0
- package/components/base/GridBody.d.ts +2 -13
- package/components/base/GridBody.js +2 -116
- package/components/base/GridOverlays.js +10 -21
- package/components/cell/GridActionsCellItem.d.ts +2 -2
- package/components/cell/GridCell.d.ts +15 -21
- package/components/cell/GridCell.js +67 -372
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +7 -3
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
- package/components/columnHeaders/GridColumnHeadersInner.js +1 -2
- package/components/columnsManagement/GridColumnsManagement.d.ts +36 -0
- package/components/columnsManagement/GridColumnsManagement.js +260 -0
- package/components/columnsManagement/index.d.ts +1 -0
- package/components/columnsManagement/index.js +1 -0
- package/components/columnsManagement/utils.d.ts +4 -0
- package/components/columnsManagement/utils.js +16 -0
- package/components/containers/GridRoot.js +18 -15
- package/components/containers/GridRootStyles.js +307 -204
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/components/panel/GridColumnsPanel.d.ts +0 -28
- package/components/panel/GridColumnsPanel.js +5 -213
- package/components/panel/GridPanel.js +3 -4
- package/components/panel/filterPanel/GridFilterForm.d.ts +6 -4
- package/components/panel/filterPanel/GridFilterForm.js +31 -14
- package/components/panel/filterPanel/GridFilterPanel.js +46 -20
- package/components/toolbar/GridToolbarColumnsButton.d.ts +13 -1
- package/components/toolbar/GridToolbarColumnsButton.js +40 -22
- package/components/toolbar/GridToolbarDensitySelector.d.ts +13 -1
- package/components/toolbar/GridToolbarDensitySelector.js +40 -22
- package/components/toolbar/GridToolbarExport.d.ts +10 -1
- package/components/toolbar/GridToolbarExport.js +6 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +15 -1
- package/components/toolbar/GridToolbarExportContainer.js +41 -23
- package/components/toolbar/GridToolbarFilterButton.d.ts +5 -4
- package/components/toolbar/GridToolbarFilterButton.js +6 -10
- package/components/virtualization/GridBottomContainer.d.ts +2 -0
- package/components/virtualization/GridBottomContainer.js +25 -0
- package/components/{containers → virtualization}/GridMainContainer.d.ts +2 -0
- package/components/virtualization/GridMainContainer.js +20 -0
- package/components/virtualization/GridTopContainer.d.ts +2 -0
- package/components/virtualization/GridTopContainer.js +35 -0
- package/components/virtualization/GridVirtualScrollbar.d.ts +7 -0
- package/components/virtualization/GridVirtualScrollbar.js +131 -0
- package/components/virtualization/GridVirtualScroller.d.ts +4 -4
- package/components/virtualization/GridVirtualScroller.js +69 -16
- package/components/virtualization/GridVirtualScrollerFiller.d.ts +4 -0
- package/components/virtualization/GridVirtualScrollerFiller.js +71 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/constants/defaultGridSlotsComponents.js +8 -3
- package/constants/gridClasses.d.ts +72 -12
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -6
- package/hooks/core/gridCoreSelector.d.ts +6 -0
- package/hooks/core/gridCoreSelector.js +5 -0
- package/hooks/core/useGridApiInitialization.js +4 -0
- package/hooks/core/useGridInitialization.js +4 -0
- package/hooks/core/useGridRefs.d.ts +3 -0
- package/hooks/core/useGridRefs.js +13 -0
- package/hooks/core/useGridTheme.d.ts +3 -0
- package/hooks/core/useGridTheme.js +19 -0
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +7 -14
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +13 -18
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +68 -162
- package/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +17 -0
- package/hooks/features/columns/gridColumnsInterfaces.js +9 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +14 -1
- package/hooks/features/columns/gridColumnsSelector.js +52 -0
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -5
- package/hooks/features/columns/gridColumnsUtils.js +10 -12
- package/hooks/features/columns/index.d.ts +2 -2
- package/hooks/features/columns/index.js +2 -1
- package/hooks/features/columns/useGridColumnSpanning.js +62 -61
- package/hooks/features/columns/useGridColumns.js +20 -23
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +60 -11
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +2 -0
- package/hooks/features/dimensions/gridDimensionsSelectors.js +1 -0
- package/hooks/features/dimensions/index.d.ts +2 -0
- package/hooks/features/dimensions/index.js +1 -0
- package/hooks/features/dimensions/useGridDimensions.d.ts +7 -1
- package/hooks/features/dimensions/useGridDimensions.js +216 -148
- package/hooks/features/export/serializers/csvSerializer.js +2 -2
- package/hooks/features/filter/useGridFilter.js +3 -3
- package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -2
- package/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/hooks/features/focus/useGridFocus.js +3 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
- package/hooks/features/pagination/useGridPagination.js +3 -5
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -0
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -2
- package/hooks/features/rows/gridRowsSelector.js +5 -5
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +8 -5
- package/hooks/features/rows/useGridRowsMeta.js +7 -4
- package/hooks/features/scroll/useGridScroll.js +8 -10
- package/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +15 -10
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +14 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +27 -42
- package/hooks/features/virtualization/useGridVirtualScroller.js +441 -438
- package/hooks/features/virtualization/useGridVirtualization.d.ts +8 -0
- package/hooks/features/virtualization/useGridVirtualization.js +8 -1
- package/hooks/utils/index.d.ts +3 -0
- package/hooks/utils/index.js +4 -1
- package/hooks/utils/useGridAriaAttributes.js +1 -2
- package/hooks/utils/useGridNativeEventListener.js +4 -9
- package/hooks/utils/useResizeObserver.d.ts +2 -0
- package/hooks/utils/useResizeObserver.js +36 -0
- package/hooks/utils/useRunOnce.d.ts +5 -0
- package/hooks/utils/useRunOnce.js +18 -0
- package/index.js +1 -1
- package/internals/index.d.ts +12 -9
- package/internals/index.js +9 -7
- package/legacy/DataGrid/DataGrid.js +6 -6
- package/legacy/DataGrid/useDataGridComponent.js +2 -1
- package/legacy/DataGrid/useDataGridProps.js +1 -0
- package/legacy/components/GridColumnHeaders.js +3 -11
- package/legacy/components/GridDetailPanels.js +4 -0
- package/legacy/components/GridHeaders.js +53 -0
- package/legacy/components/GridPinnedRows.js +4 -0
- package/legacy/components/GridRow.js +159 -98
- package/legacy/components/GridScrollbarFillerCell.js +36 -0
- package/legacy/components/base/GridBody.js +2 -114
- package/legacy/components/base/GridOverlays.js +10 -25
- package/legacy/components/cell/GridCell.js +69 -377
- package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +7 -3
- package/legacy/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +1 -2
- package/legacy/components/columnsManagement/GridColumnsManagement.js +300 -0
- package/legacy/components/columnsManagement/index.js +1 -0
- package/legacy/components/columnsManagement/utils.js +22 -0
- package/legacy/components/containers/GridRoot.js +18 -15
- package/legacy/components/containers/GridRootStyles.js +215 -137
- package/legacy/components/index.js +1 -0
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/legacy/components/panel/GridColumnsPanel.js +5 -233
- package/legacy/components/panel/GridPanel.js +3 -4
- package/legacy/components/panel/filterPanel/GridFilterForm.js +30 -13
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +49 -20
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +40 -21
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +40 -21
- package/legacy/components/toolbar/GridToolbarExport.js +6 -1
- package/legacy/components/toolbar/GridToolbarExportContainer.js +40 -21
- package/legacy/components/toolbar/GridToolbarFilterButton.js +6 -10
- package/legacy/components/virtualization/GridBottomContainer.js +25 -0
- package/legacy/components/virtualization/GridMainContainer.js +20 -0
- package/legacy/components/virtualization/GridTopContainer.js +35 -0
- package/legacy/components/virtualization/GridVirtualScrollbar.js +129 -0
- package/legacy/components/virtualization/GridVirtualScroller.js +67 -16
- package/legacy/components/virtualization/GridVirtualScrollerFiller.js +70 -0
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/legacy/constants/defaultGridSlotsComponents.js +8 -3
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +4 -6
- package/legacy/hooks/core/gridCoreSelector.js +7 -0
- package/legacy/hooks/core/useGridApiInitialization.js +4 -0
- package/legacy/hooks/core/useGridInitialization.js +4 -0
- package/legacy/hooks/core/useGridRefs.js +13 -0
- package/legacy/hooks/core/useGridTheme.js +21 -0
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +7 -14
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +69 -181
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
- package/legacy/hooks/features/columns/gridColumnsInterfaces.js +9 -1
- package/legacy/hooks/features/columns/gridColumnsSelector.js +62 -0
- package/legacy/hooks/features/columns/gridColumnsUtils.js +10 -16
- package/legacy/hooks/features/columns/index.js +2 -1
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +60 -59
- package/legacy/hooks/features/columns/useGridColumns.js +22 -23
- package/legacy/hooks/features/dimensions/gridDimensionsSelectors.js +3 -0
- package/legacy/hooks/features/dimensions/index.js +1 -0
- package/legacy/hooks/features/dimensions/useGridDimensions.js +226 -151
- package/legacy/hooks/features/export/serializers/csvSerializer.js +2 -2
- package/legacy/hooks/features/filter/useGridFilter.js +3 -3
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/legacy/hooks/features/focus/useGridFocus.js +3 -3
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
- package/legacy/hooks/features/pagination/useGridPagination.js +3 -5
- package/legacy/hooks/features/rows/gridRowsSelector.js +5 -5
- package/legacy/hooks/features/rows/gridRowsUtils.js +8 -5
- package/legacy/hooks/features/rows/useGridRowsMeta.js +7 -4
- package/legacy/hooks/features/scroll/useGridScroll.js +8 -10
- package/legacy/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/legacy/hooks/features/sorting/useGridSorting.js +15 -10
- package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +29 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +490 -483
- package/legacy/hooks/features/virtualization/useGridVirtualization.js +8 -1
- package/legacy/hooks/utils/index.js +4 -1
- package/legacy/hooks/utils/useGridAriaAttributes.js +1 -2
- package/legacy/hooks/utils/useGridNativeEventListener.js +4 -9
- package/legacy/hooks/utils/useResizeObserver.js +36 -0
- package/legacy/hooks/utils/useRunOnce.js +18 -0
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +9 -7
- package/legacy/locales/arSD.js +5 -6
- package/legacy/locales/beBY.js +5 -6
- package/legacy/locales/bgBG.js +5 -6
- package/legacy/locales/csCZ.js +5 -6
- package/legacy/locales/daDK.js +5 -6
- package/legacy/locales/deDE.js +5 -6
- package/legacy/locales/elGR.js +5 -6
- package/legacy/locales/esES.js +5 -6
- package/legacy/locales/faIR.js +5 -6
- package/legacy/locales/fiFI.js +5 -6
- package/legacy/locales/frFR.js +5 -6
- package/legacy/locales/heIL.js +5 -6
- package/legacy/locales/hrHR.js +160 -0
- package/legacy/locales/huHU.js +5 -6
- package/legacy/locales/index.js +4 -1
- package/legacy/locales/itIT.js +5 -6
- package/legacy/locales/jaJP.js +5 -6
- package/legacy/locales/koKR.js +5 -6
- package/legacy/locales/nbNO.js +5 -6
- package/legacy/locales/nlNL.js +5 -6
- package/legacy/locales/plPL.js +5 -6
- package/legacy/locales/ptBR.js +5 -6
- package/legacy/locales/ptPT.js +160 -0
- package/legacy/locales/roRO.js +5 -6
- package/legacy/locales/ruRU.js +5 -6
- package/legacy/locales/skSK.js +5 -6
- package/legacy/locales/svSE.js +5 -6
- package/legacy/locales/trTR.js +5 -6
- package/legacy/locales/ukUA.js +5 -6
- package/legacy/locales/urPK.js +5 -6
- package/legacy/locales/viVN.js +5 -6
- package/legacy/locales/zhCN.js +5 -6
- package/legacy/locales/zhHK.js +160 -0
- package/legacy/locales/zhTW.js +5 -6
- package/legacy/models/index.js +0 -1
- package/legacy/models/params/index.js +1 -2
- package/legacy/utils/utils.js +10 -1
- package/locales/arSD.js +5 -6
- package/locales/beBY.js +5 -6
- package/locales/bgBG.js +5 -6
- package/locales/csCZ.js +5 -6
- package/locales/daDK.js +5 -6
- package/locales/deDE.js +5 -6
- package/locales/elGR.js +5 -6
- package/locales/esES.js +5 -6
- package/locales/faIR.js +5 -6
- package/locales/fiFI.js +5 -6
- package/locales/frFR.js +5 -6
- package/locales/heIL.js +5 -6
- package/locales/hrHR.d.ts +1 -0
- package/locales/hrHR.js +148 -0
- package/locales/huHU.js +5 -6
- package/locales/index.d.ts +3 -0
- package/locales/index.js +4 -1
- package/locales/itIT.js +5 -6
- package/locales/jaJP.js +5 -6
- package/locales/koKR.js +5 -6
- package/locales/nbNO.js +5 -6
- package/locales/nlNL.js +5 -6
- package/locales/plPL.js +5 -6
- package/locales/ptBR.js +5 -6
- package/locales/ptPT.d.ts +1 -0
- package/locales/ptPT.js +148 -0
- package/locales/roRO.js +5 -6
- package/locales/ruRU.js +5 -6
- package/locales/skSK.js +5 -6
- package/locales/svSE.js +5 -6
- package/locales/trTR.js +5 -6
- package/locales/ukUA.js +5 -6
- package/locales/urPK.js +5 -6
- package/locales/viVN.js +5 -6
- package/locales/zhCN.js +5 -6
- package/locales/zhHK.d.ts +1 -0
- package/locales/zhHK.js +148 -0
- package/locales/zhTW.js +5 -6
- package/models/api/gridColumnGroupingApi.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +16 -16
- package/models/api/gridLocaleTextApi.d.ts +3 -5
- package/models/api/gridRowsMetaApi.d.ts +1 -1
- package/models/api/gridVirtualizationApi.d.ts +2 -3
- package/models/colDef/gridColType.d.ts +11 -2
- package/models/events/gridEventLookup.d.ts +3 -3
- package/models/gridFilterModel.d.ts +1 -1
- package/models/gridSlotsComponent.d.ts +21 -2
- package/models/gridSlotsComponentsProps.d.ts +4 -0
- package/models/gridStateCommunity.d.ts +5 -1
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -1
- package/models/params/index.d.ts +0 -1
- package/models/params/index.js +1 -2
- package/models/props/DataGridProps.d.ts +6 -11
- package/modern/DataGrid/DataGrid.js +6 -6
- package/modern/DataGrid/useDataGridComponent.js +2 -1
- package/modern/DataGrid/useDataGridProps.js +1 -0
- package/modern/components/GridColumnHeaders.js +3 -11
- package/modern/components/GridDetailPanels.js +4 -0
- package/modern/components/GridHeaders.js +53 -0
- package/modern/components/GridPinnedRows.js +4 -0
- package/modern/components/GridRow.js +159 -96
- package/modern/components/GridScrollbarFillerCell.js +39 -0
- package/modern/components/base/GridBody.js +2 -116
- package/modern/components/base/GridOverlays.js +10 -16
- package/modern/components/cell/GridCell.js +65 -369
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +7 -3
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
- package/modern/components/columnHeaders/GridColumnHeadersInner.js +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +256 -0
- package/modern/components/columnsManagement/index.js +1 -0
- package/modern/components/columnsManagement/utils.js +16 -0
- package/modern/components/containers/GridRoot.js +18 -14
- package/modern/components/containers/GridRootStyles.js +307 -204
- package/modern/components/index.js +1 -0
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/modern/components/panel/GridColumnsPanel.js +4 -209
- package/modern/components/panel/GridPanel.js +3 -4
- package/modern/components/panel/filterPanel/GridFilterForm.js +30 -13
- package/modern/components/panel/filterPanel/GridFilterPanel.js +46 -20
- package/modern/components/toolbar/GridToolbarColumnsButton.js +38 -21
- package/modern/components/toolbar/GridToolbarDensitySelector.js +38 -21
- package/modern/components/toolbar/GridToolbarExport.js +6 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +39 -22
- package/modern/components/toolbar/GridToolbarFilterButton.js +6 -10
- package/modern/components/virtualization/GridBottomContainer.js +25 -0
- package/modern/components/virtualization/GridMainContainer.js +20 -0
- package/modern/components/virtualization/GridTopContainer.js +35 -0
- package/modern/components/virtualization/GridVirtualScrollbar.js +131 -0
- package/modern/components/virtualization/GridVirtualScroller.js +69 -16
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +71 -0
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/modern/constants/defaultGridSlotsComponents.js +8 -3
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -6
- package/modern/hooks/core/gridCoreSelector.js +5 -0
- package/modern/hooks/core/useGridApiInitialization.js +3 -0
- package/modern/hooks/core/useGridInitialization.js +4 -0
- package/modern/hooks/core/useGridRefs.js +13 -0
- package/modern/hooks/core/useGridTheme.js +19 -0
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +5 -12
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +67 -160
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
- package/modern/hooks/features/columns/gridColumnsInterfaces.js +9 -1
- package/modern/hooks/features/columns/gridColumnsSelector.js +51 -0
- package/modern/hooks/features/columns/gridColumnsUtils.js +10 -12
- package/modern/hooks/features/columns/index.js +2 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +62 -61
- package/modern/hooks/features/columns/useGridColumns.js +19 -21
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +1 -0
- package/modern/hooks/features/dimensions/index.js +1 -0
- package/modern/hooks/features/dimensions/useGridDimensions.js +214 -146
- package/modern/hooks/features/export/serializers/csvSerializer.js +2 -2
- package/modern/hooks/features/filter/useGridFilter.js +3 -3
- package/modern/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/modern/hooks/features/focus/useGridFocus.js +3 -3
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
- package/modern/hooks/features/pagination/useGridPagination.js +3 -5
- package/modern/hooks/features/rows/gridRowsSelector.js +2 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -5
- package/modern/hooks/features/rows/useGridRowsMeta.js +7 -4
- package/modern/hooks/features/scroll/useGridScroll.js +8 -9
- package/modern/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +15 -10
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +435 -432
- package/modern/hooks/features/virtualization/useGridVirtualization.js +8 -1
- package/modern/hooks/utils/index.js +4 -1
- package/modern/hooks/utils/useGridAriaAttributes.js +1 -1
- package/modern/hooks/utils/useGridNativeEventListener.js +3 -9
- package/modern/hooks/utils/useResizeObserver.js +36 -0
- package/modern/hooks/utils/useRunOnce.js +18 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +9 -7
- package/modern/locales/arSD.js +5 -6
- package/modern/locales/beBY.js +5 -6
- package/modern/locales/bgBG.js +5 -6
- package/modern/locales/csCZ.js +5 -6
- package/modern/locales/daDK.js +5 -6
- package/modern/locales/deDE.js +5 -6
- package/modern/locales/elGR.js +5 -6
- package/modern/locales/esES.js +5 -6
- package/modern/locales/faIR.js +5 -6
- package/modern/locales/fiFI.js +5 -6
- package/modern/locales/frFR.js +5 -6
- package/modern/locales/heIL.js +5 -6
- package/modern/locales/hrHR.js +148 -0
- package/modern/locales/huHU.js +5 -6
- package/modern/locales/index.js +4 -1
- package/modern/locales/itIT.js +5 -6
- package/modern/locales/jaJP.js +5 -6
- package/modern/locales/koKR.js +5 -6
- package/modern/locales/nbNO.js +5 -6
- package/modern/locales/nlNL.js +5 -6
- package/modern/locales/plPL.js +5 -6
- package/modern/locales/ptBR.js +5 -6
- package/modern/locales/ptPT.js +148 -0
- package/modern/locales/roRO.js +5 -6
- package/modern/locales/ruRU.js +5 -6
- package/modern/locales/skSK.js +5 -6
- package/modern/locales/svSE.js +5 -6
- package/modern/locales/trTR.js +5 -6
- package/modern/locales/ukUA.js +5 -6
- package/modern/locales/urPK.js +5 -6
- package/modern/locales/viVN.js +5 -6
- package/modern/locales/zhCN.js +5 -6
- package/modern/locales/zhHK.js +148 -0
- package/modern/locales/zhTW.js +5 -6
- package/modern/models/index.js +0 -1
- package/modern/models/params/index.js +1 -2
- package/modern/utils/utils.js +10 -1
- package/node/DataGrid/DataGrid.js +6 -6
- package/node/DataGrid/useDataGridComponent.js +1 -0
- package/node/DataGrid/useDataGridProps.js +1 -0
- package/node/components/GridColumnHeaders.js +3 -11
- package/node/components/GridDetailPanels.js +10 -0
- package/node/components/GridHeaders.js +60 -0
- package/node/components/GridPinnedRows.js +10 -0
- package/node/components/GridRow.js +157 -94
- package/node/components/GridScrollbarFillerCell.js +47 -0
- package/node/components/base/GridBody.js +7 -118
- package/node/components/base/GridOverlays.js +9 -15
- package/node/components/cell/GridCell.js +66 -369
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +8 -4
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
- package/node/components/columnHeaders/GridColumnHeadersInner.js +1 -1
- package/node/components/columnsManagement/GridColumnsManagement.js +264 -0
- package/node/components/columnsManagement/index.js +16 -0
- package/node/components/columnsManagement/utils.js +24 -0
- package/node/components/containers/GridRoot.js +17 -14
- package/node/components/containers/GridRootStyles.js +175 -72
- package/node/components/index.js +11 -0
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +4 -208
- package/node/components/panel/GridPanel.js +3 -4
- package/node/components/panel/filterPanel/GridFilterForm.js +29 -12
- package/node/components/panel/filterPanel/GridFilterPanel.js +45 -19
- package/node/components/toolbar/GridToolbarColumnsButton.js +36 -20
- package/node/components/toolbar/GridToolbarDensitySelector.js +36 -20
- package/node/components/toolbar/GridToolbarExport.js +6 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +37 -21
- package/node/components/toolbar/GridToolbarFilterButton.js +6 -10
- package/node/components/virtualization/GridBottomContainer.js +34 -0
- package/node/components/{containers → virtualization}/GridMainContainer.js +7 -29
- package/node/components/virtualization/GridTopContainer.js +44 -0
- package/node/components/virtualization/GridVirtualScrollbar.js +138 -0
- package/node/components/virtualization/GridVirtualScroller.js +69 -17
- package/node/components/virtualization/GridVirtualScrollerFiller.js +77 -0
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/node/constants/defaultGridSlotsComponents.js +6 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -6
- package/node/hooks/core/gridCoreSelector.js +12 -0
- package/node/hooks/core/useGridApiInitialization.js +3 -0
- package/node/hooks/core/useGridInitialization.js +4 -0
- package/node/hooks/core/useGridRefs.js +22 -0
- package/node/hooks/core/useGridTheme.js +29 -0
- package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +5 -12
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +65 -159
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
- package/node/hooks/features/columns/gridColumnsInterfaces.js +11 -1
- package/node/hooks/features/columns/gridColumnsSelector.js +52 -1
- package/node/hooks/features/columns/gridColumnsUtils.js +10 -13
- package/node/hooks/features/columns/index.js +22 -61
- package/node/hooks/features/columns/useGridColumnSpanning.js +62 -61
- package/node/hooks/features/columns/useGridColumns.js +20 -22
- package/node/hooks/features/dimensions/gridDimensionsSelectors.js +8 -0
- package/node/hooks/features/dimensions/index.js +11 -0
- package/node/hooks/features/dimensions/useGridDimensions.js +215 -144
- package/node/hooks/features/export/serializers/csvSerializer.js +2 -2
- package/node/hooks/features/filter/useGridFilter.js +2 -2
- package/node/hooks/features/focus/gridFocusStateSelector.js +3 -7
- package/node/hooks/features/focus/useGridFocus.js +2 -2
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -15
- package/node/hooks/features/pagination/useGridPagination.js +3 -5
- package/node/hooks/features/rows/gridRowsSelector.js +2 -2
- package/node/hooks/features/rows/gridRowsUtils.js +8 -5
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -3
- package/node/hooks/features/scroll/useGridScroll.js +8 -9
- package/node/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/node/hooks/features/sorting/useGridSorting.js +15 -10
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +434 -431
- package/node/hooks/features/virtualization/useGridVirtualization.js +9 -1
- package/node/hooks/utils/index.js +36 -0
- package/node/hooks/utils/useGridAriaAttributes.js +1 -1
- package/node/hooks/utils/useGridNativeEventListener.js +3 -9
- package/node/hooks/utils/useResizeObserver.js +44 -0
- package/node/hooks/utils/useRunOnce.js +27 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +86 -71
- package/node/locales/arSD.js +5 -6
- package/node/locales/beBY.js +5 -6
- package/node/locales/bgBG.js +5 -6
- package/node/locales/csCZ.js +5 -6
- package/node/locales/daDK.js +5 -6
- package/node/locales/deDE.js +5 -6
- package/node/locales/elGR.js +5 -6
- package/node/locales/esES.js +5 -6
- package/node/locales/faIR.js +5 -6
- package/node/locales/fiFI.js +5 -6
- package/node/locales/frFR.js +5 -6
- package/node/locales/heIL.js +5 -6
- package/node/locales/hrHR.js +154 -0
- package/node/locales/huHU.js +5 -6
- package/node/locales/index.js +33 -0
- package/node/locales/itIT.js +5 -6
- package/node/locales/jaJP.js +5 -6
- package/node/locales/koKR.js +5 -6
- package/node/locales/nbNO.js +5 -6
- package/node/locales/nlNL.js +5 -6
- package/node/locales/plPL.js +5 -6
- package/node/locales/ptBR.js +5 -6
- package/node/locales/ptPT.js +154 -0
- package/node/locales/roRO.js +5 -6
- package/node/locales/ruRU.js +5 -6
- package/node/locales/skSK.js +5 -6
- package/node/locales/svSE.js +5 -6
- package/node/locales/trTR.js +5 -6
- package/node/locales/ukUA.js +5 -6
- package/node/locales/urPK.js +5 -6
- package/node/locales/viVN.js +5 -6
- package/node/locales/zhCN.js +5 -6
- package/node/locales/zhHK.js +154 -0
- package/node/locales/zhTW.js +5 -6
- package/node/models/index.js +0 -11
- package/node/models/params/index.js +0 -11
- package/node/utils/utils.js +11 -1
- package/package.json +6 -6
- package/utils/utils.d.ts +6 -0
- package/utils/utils.js +10 -1
- package/components/DataGridVirtualScroller.d.ts +0 -3
- package/components/DataGridVirtualScroller.js +0 -35
- package/components/containers/GridMainContainer.js +0 -43
- package/legacy/components/DataGridVirtualScroller.js +0 -32
- package/legacy/components/containers/GridMainContainer.js +0 -45
- package/legacy/models/gridRootContainerRef.js +0 -1
- package/legacy/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
- package/models/gridRootContainerRef.d.ts +0 -5
- package/models/gridRootContainerRef.js +0 -1
- package/models/params/gridRenderedRowsIntervalChangeParams.d.ts +0 -10
- package/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
- package/modern/components/DataGridVirtualScroller.js +0 -35
- package/modern/components/containers/GridMainContainer.js +0 -42
- package/modern/models/gridRootContainerRef.js +0 -1
- package/modern/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
- package/node/components/DataGridVirtualScroller.js +0 -42
- package/node/models/gridRootContainerRef.js +0 -5
- package/node/models/params/gridRenderedRowsIntervalChangeParams.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import { alpha, styled, darken, lighten } from '@mui/material/styles';
|
|
4
|
-
import { gridClasses } from '../../constants/gridClasses';
|
|
3
|
+
import { alpha, styled, darken, lighten, decomposeColor, recomposeColor } from '@mui/material/styles';
|
|
4
|
+
import { gridClasses as c } from '../../constants/gridClasses';
|
|
5
5
|
function getBorderColor(theme) {
|
|
6
6
|
if (theme.vars) {
|
|
7
7
|
return theme.vars.palette.TableCell.border;
|
|
@@ -11,14 +11,14 @@ function getBorderColor(theme) {
|
|
|
11
11
|
}
|
|
12
12
|
return darken(alpha(theme.palette.divider, 1), 0.68);
|
|
13
13
|
}
|
|
14
|
-
var columnHeadersStyles = _defineProperty({}, ".".concat(
|
|
14
|
+
var columnHeadersStyles = _defineProperty({}, ".".concat(c.columnSeparator, ", .").concat(c['columnSeparator--resizing']), {
|
|
15
15
|
visibility: 'visible',
|
|
16
16
|
width: 'auto'
|
|
17
17
|
});
|
|
18
|
-
var columnHeaderStyles = _defineProperty(_defineProperty({}, "& .".concat(
|
|
18
|
+
var columnHeaderStyles = _defineProperty(_defineProperty({}, "& .".concat(c.iconButtonContainer), {
|
|
19
19
|
visibility: 'visible',
|
|
20
20
|
width: 'auto'
|
|
21
|
-
}), "& .".concat(
|
|
21
|
+
}), "& .".concat(c.menuIcon), {
|
|
22
22
|
width: 'auto',
|
|
23
23
|
visibility: 'visible'
|
|
24
24
|
});
|
|
@@ -26,19 +26,57 @@ export var GridRootStyles = styled('div', {
|
|
|
26
26
|
name: 'MuiDataGrid',
|
|
27
27
|
slot: 'Root',
|
|
28
28
|
overridesResolver: function overridesResolver(props, styles) {
|
|
29
|
-
return [_defineProperty({}, "&.".concat(
|
|
30
|
-
_defineProperty({}, "& .".concat(
|
|
29
|
+
return [_defineProperty({}, "&.".concat(c.autoHeight), styles.autoHeight), _defineProperty({}, "&.".concat(c.aggregationColumnHeader), styles.aggregationColumnHeader), _defineProperty({}, "&.".concat(c['aggregationColumnHeader--alignLeft']), styles['aggregationColumnHeader--alignLeft']), _defineProperty({}, "&.".concat(c['aggregationColumnHeader--alignCenter']), styles['aggregationColumnHeader--alignCenter']), _defineProperty({}, "&.".concat(c['aggregationColumnHeader--alignRight']), styles['aggregationColumnHeader--alignRight']), _defineProperty({}, "&.".concat(c.aggregationColumnHeaderLabel), styles.aggregationColumnHeaderLabel), _defineProperty({}, "&.".concat(c['root--disableUserSelection'], " .").concat(c.cell), styles['root--disableUserSelection']), _defineProperty({}, "&.".concat(c.autosizing), styles.autosizing), _defineProperty({}, "& .".concat(c.editBooleanCell), styles.editBooleanCell), _defineProperty({}, "& .".concat(c['cell--editing']), styles['cell--editing']), _defineProperty({}, "& .".concat(c['cell--textCenter']), styles['cell--textCenter']), _defineProperty({}, "& .".concat(c['cell--textLeft']), styles['cell--textLeft']), _defineProperty({}, "& .".concat(c['cell--textRight']), styles['cell--textRight']), // TODO v6: Remove
|
|
30
|
+
_defineProperty({}, "& .".concat(c['cell--withRenderer']), styles['cell--withRenderer']), _defineProperty({}, "& .".concat(c.cell), styles.cell), _defineProperty({}, "& .".concat(c['cell--rangeTop']), styles['cell--rangeTop']), _defineProperty({}, "& .".concat(c['cell--rangeBottom']), styles['cell--rangeBottom']), _defineProperty({}, "& .".concat(c['cell--rangeLeft']), styles['cell--rangeLeft']), _defineProperty({}, "& .".concat(c['cell--rangeRight']), styles['cell--rangeRight']), _defineProperty({}, "& .".concat(c['cell--withRightBorder']), styles['cell--withRightBorder']), _defineProperty({}, "& .".concat(c.cellContent), styles.cellContent), _defineProperty({}, "& .".concat(c.cellCheckbox), styles.cellCheckbox), _defineProperty({}, "& .".concat(c.cellSkeleton), styles.cellSkeleton), _defineProperty({}, "& .".concat(c.checkboxInput), styles.checkboxInput), _defineProperty({}, "& .".concat(c['columnHeader--alignCenter']), styles['columnHeader--alignCenter']), _defineProperty({}, "& .".concat(c['columnHeader--alignLeft']), styles['columnHeader--alignLeft']), _defineProperty({}, "& .".concat(c['columnHeader--alignRight']), styles['columnHeader--alignRight']), _defineProperty({}, "& .".concat(c['columnHeader--dragging']), styles['columnHeader--dragging']), _defineProperty({}, "& .".concat(c['columnHeader--moving']), styles['columnHeader--moving']), _defineProperty({}, "& .".concat(c['columnHeader--numeric']), styles['columnHeader--numeric']), _defineProperty({}, "& .".concat(c['columnHeader--sortable']), styles['columnHeader--sortable']), _defineProperty({}, "& .".concat(c['columnHeader--sorted']), styles['columnHeader--sorted']), _defineProperty({}, "& .".concat(c['columnHeader--withRightBorder']), styles['columnHeader--withRightBorder']), _defineProperty({}, "& .".concat(c.columnHeader), styles.columnHeader), _defineProperty({}, "& .".concat(c.headerFilterRow), styles.headerFilterRow), _defineProperty({}, "& .".concat(c.columnHeaderCheckbox), styles.columnHeaderCheckbox), _defineProperty({}, "& .".concat(c.columnHeaderDraggableContainer), styles.columnHeaderDraggableContainer), _defineProperty({}, "& .".concat(c.columnHeaderTitleContainer), styles.columnHeaderTitleContainer), _defineProperty({}, "& .".concat(c['columnSeparator--resizable']), styles['columnSeparator--resizable']), _defineProperty({}, "& .".concat(c['columnSeparator--resizing']), styles['columnSeparator--resizing']), _defineProperty({}, "& .".concat(c.columnSeparator), styles.columnSeparator), _defineProperty({}, "& .".concat(c.filterIcon), styles.filterIcon), _defineProperty({}, "& .".concat(c.iconSeparator), styles.iconSeparator), _defineProperty({}, "& .".concat(c.menuIcon), styles.menuIcon), _defineProperty({}, "& .".concat(c.menuIconButton), styles.menuIconButton), _defineProperty({}, "& .".concat(c.menuOpen), styles.menuOpen), _defineProperty({}, "& .".concat(c.menuList), styles.menuList), _defineProperty({}, "& .".concat(c['row--editable']), styles['row--editable']), _defineProperty({}, "& .".concat(c['row--editing']), styles['row--editing']), _defineProperty({}, "& .".concat(c['row--dragging']), styles['row--dragging']), _defineProperty({}, "& .".concat(c.row), styles.row), _defineProperty({}, "& .".concat(c.rowReorderCellPlaceholder), styles.rowReorderCellPlaceholder), _defineProperty({}, "& .".concat(c.rowReorderCell), styles.rowReorderCell), _defineProperty({}, "& .".concat(c['rowReorderCell--draggable']), styles['rowReorderCell--draggable']), _defineProperty({}, "& .".concat(c.sortIcon), styles.sortIcon), _defineProperty({}, "& .".concat(c.withBorderColor), styles.withBorderColor), _defineProperty({}, "& .".concat(c.treeDataGroupingCell), styles.treeDataGroupingCell), _defineProperty({}, "& .".concat(c.treeDataGroupingCellToggle), styles.treeDataGroupingCellToggle), _defineProperty({}, "& .".concat(c.detailPanelToggleCell), styles.detailPanelToggleCell), _defineProperty({}, "& .".concat(c['detailPanelToggleCell--expanded']), styles['detailPanelToggleCell--expanded']), styles.root];
|
|
31
31
|
}
|
|
32
32
|
})(function (_ref61) {
|
|
33
33
|
var _extends2;
|
|
34
|
-
var
|
|
35
|
-
var borderColor = getBorderColor(
|
|
36
|
-
var radius =
|
|
34
|
+
var t = _ref61.theme;
|
|
35
|
+
var borderColor = getBorderColor(t);
|
|
36
|
+
var radius = t.shape.borderRadius;
|
|
37
|
+
var containerBackground = t.vars ? t.vars.palette.background.default : t.palette.background.default;
|
|
38
|
+
var pinnedBackground = containerBackground;
|
|
39
|
+
var overlayBackground = t.vars ? "rgba(".concat(t.vars.palette.background.defaultChannel, " / ").concat(t.vars.palette.action.disabledOpacity, ")") : alpha(t.palette.background.default, t.palette.action.disabledOpacity);
|
|
40
|
+
var hoverOpacity = (t.vars || t).palette.action.hoverOpacity;
|
|
41
|
+
var hoverColor = (t.vars || t).palette.action.hover;
|
|
42
|
+
var selectedOpacity = (t.vars || t).palette.action.selectedOpacity;
|
|
43
|
+
var selectedBackground = t.vars ? "rgba(".concat(t.vars.palette.primary.mainChannel, " / ").concat(selectedOpacity, ")") : alpha(t.palette.primary.main, selectedOpacity);
|
|
44
|
+
var selectedHoverBackground = t.vars ? "rgba(".concat(t.vars.palette.primary.mainChannel, " / calc(\n ").concat(t.vars.palette.action.selectedOpacity, " + \n ").concat(t.vars.palette.action.hoverOpacity, "\n ))") : alpha(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity);
|
|
45
|
+
var pinnedHoverBackground = t.vars ? hoverColor : blend(pinnedBackground, hoverColor, hoverOpacity);
|
|
46
|
+
var pinnedSelectedBackground = t.vars ? selectedBackground : blend(pinnedBackground, selectedBackground, selectedOpacity);
|
|
47
|
+
var pinnedSelectedHoverBackground = t.vars ? hoverColor : blend(pinnedSelectedBackground, hoverColor, hoverOpacity);
|
|
48
|
+
var selectedStyles = {
|
|
49
|
+
backgroundColor: selectedBackground,
|
|
50
|
+
'&:hover': {
|
|
51
|
+
backgroundColor: selectedHoverBackground,
|
|
52
|
+
// Reset on touch devices, it doesn't add specificity
|
|
53
|
+
'@media (hover: none)': {
|
|
54
|
+
backgroundColor: selectedBackground
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
37
58
|
var gridStyle = _extends({
|
|
38
59
|
'--unstable_DataGrid-radius': typeof radius === 'number' ? "".concat(radius, "px") : radius,
|
|
39
|
-
'--unstable_DataGrid-headWeight':
|
|
40
|
-
'--unstable_DataGrid-overlayBackground':
|
|
60
|
+
'--unstable_DataGrid-headWeight': t.typography.fontWeightMedium,
|
|
61
|
+
'--unstable_DataGrid-overlayBackground': overlayBackground,
|
|
62
|
+
'--DataGrid-containerBackground': containerBackground,
|
|
63
|
+
'--DataGrid-pinnedBackground': pinnedBackground,
|
|
64
|
+
'--DataGrid-rowBorderColor': borderColor,
|
|
41
65
|
'--DataGrid-cellOffsetMultiplier': 2,
|
|
66
|
+
'--DataGrid-width': '0px',
|
|
67
|
+
'--DataGrid-hasScrollX': '0',
|
|
68
|
+
'--DataGrid-hasScrollY': '0',
|
|
69
|
+
'--DataGrid-offsetTop': '0px',
|
|
70
|
+
'--DataGrid-offsetLeft': '0px',
|
|
71
|
+
'--DataGrid-scrollbarSize': '10px',
|
|
72
|
+
'--DataGrid-rowWidth': '0px',
|
|
73
|
+
'--DataGrid-columnsTotalWidth': '0px',
|
|
74
|
+
'--DataGrid-leftPinnedWidth': '0px',
|
|
75
|
+
'--DataGrid-rightPinnedWidth': '0px',
|
|
76
|
+
'--DataGrid-headerHeight': '0px',
|
|
77
|
+
'--DataGrid-headersTotalHeight': '0px',
|
|
78
|
+
'--DataGrid-topContainerHeight': '0px',
|
|
79
|
+
'--DataGrid-bottomContainerHeight': '0px',
|
|
42
80
|
flex: 1,
|
|
43
81
|
boxSizing: 'border-box',
|
|
44
82
|
position: 'relative',
|
|
@@ -46,8 +84,8 @@ export var GridRootStyles = styled('div', {
|
|
|
46
84
|
borderStyle: 'solid',
|
|
47
85
|
borderColor: borderColor,
|
|
48
86
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
49
|
-
color: (
|
|
50
|
-
},
|
|
87
|
+
color: (t.vars || t).palette.text.primary
|
|
88
|
+
}, t.typography.body2, (_extends2 = {
|
|
51
89
|
outline: 'none',
|
|
52
90
|
height: '100%',
|
|
53
91
|
display: 'flex',
|
|
@@ -56,45 +94,45 @@ export var GridRootStyles = styled('div', {
|
|
|
56
94
|
minHeight: 0,
|
|
57
95
|
flexDirection: 'column',
|
|
58
96
|
overflowAnchor: 'none'
|
|
59
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "
|
|
97
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, ".".concat(c.main, " > *:first-of-type"), {
|
|
98
|
+
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
|
|
99
|
+
borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
|
|
100
|
+
}), "&.".concat(c.autoHeight), {
|
|
60
101
|
height: 'auto'
|
|
61
|
-
}, "
|
|
62
|
-
borderBottomColor: 'transparent'
|
|
63
|
-
})), "&.".concat(gridClasses.autosizing), _defineProperty(_defineProperty({}, "& .".concat(gridClasses.columnHeaderTitleContainerContent, " > *"), {
|
|
102
|
+
}), "&.".concat(c.autosizing), _defineProperty(_defineProperty({}, "& .".concat(c.columnHeaderTitleContainerContent, " > *"), {
|
|
64
103
|
overflow: 'visible !important'
|
|
65
|
-
}), "& .".concat(
|
|
104
|
+
}), "& .".concat(c.cell, " > *"), {
|
|
66
105
|
overflow: 'visible !important',
|
|
67
106
|
whiteSpace: 'nowrap'
|
|
68
|
-
})), "& .".concat(
|
|
69
|
-
borderBottomColor: 'transparent'
|
|
70
|
-
}), "& .".concat(gridClasses.columnHeader, ", & .").concat(gridClasses.cell), {
|
|
107
|
+
})), "& .".concat(c.columnHeader, ", & .").concat(c.cell), {
|
|
71
108
|
WebkitTapHighlightColor: 'transparent',
|
|
72
109
|
lineHeight: null,
|
|
73
110
|
padding: '0 10px',
|
|
74
111
|
boxSizing: 'border-box'
|
|
75
|
-
}), "& .".concat(
|
|
76
|
-
outline: "solid ".concat(
|
|
112
|
+
}), "& .".concat(c.columnHeader, ":focus-within, & .").concat(c.cell, ":focus-within"), {
|
|
113
|
+
outline: "solid ".concat(t.vars ? "rgba(".concat(t.vars.palette.primary.mainChannel, " / 0.5)") : alpha(t.palette.primary.main, 0.5), " 1px"),
|
|
77
114
|
outlineWidth: 1,
|
|
78
115
|
outlineOffset: -1
|
|
79
|
-
}), "& .".concat(
|
|
80
|
-
outline: "solid ".concat(
|
|
81
|
-
}), "& .".concat(
|
|
116
|
+
}), "& .".concat(c.columnHeader, ":focus, & .").concat(c.cell, ":focus"), {
|
|
117
|
+
outline: "solid ".concat(t.palette.primary.main, " 1px")
|
|
118
|
+
}), "& .".concat(c.columnHeaderCheckbox, ", & .").concat(c.cellCheckbox), {
|
|
82
119
|
padding: 0,
|
|
83
120
|
justifyContent: 'center',
|
|
84
121
|
alignItems: 'center'
|
|
85
|
-
}), "& .".concat(
|
|
122
|
+
}), "& .".concat(c.columnHeader), {
|
|
86
123
|
position: 'relative',
|
|
87
124
|
display: 'flex',
|
|
88
|
-
alignItems: 'center'
|
|
89
|
-
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
overflow: 'hidden'
|
|
127
|
+
}), "& .".concat(c['columnHeader--sorted'], " .").concat(c.iconButtonContainer, ", & .").concat(c['columnHeader--filtered'], " .").concat(c.iconButtonContainer), {
|
|
90
128
|
visibility: 'visible',
|
|
91
129
|
width: 'auto'
|
|
92
|
-
}), "& .".concat(
|
|
130
|
+
}), "& .".concat(c.columnHeader, ":not(.").concat(c['columnHeader--sorted'], ") .").concat(c.sortIcon), {
|
|
93
131
|
opacity: 0,
|
|
94
|
-
transition:
|
|
95
|
-
duration:
|
|
132
|
+
transition: t.transitions.create(['opacity'], {
|
|
133
|
+
duration: t.transitions.duration.shorter
|
|
96
134
|
})
|
|
97
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(
|
|
135
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c.columnHeaderTitleContainer), {
|
|
98
136
|
display: 'flex',
|
|
99
137
|
alignItems: 'center',
|
|
100
138
|
minWidth: 0,
|
|
@@ -103,39 +141,37 @@ export var GridRootStyles = styled('div', {
|
|
|
103
141
|
overflow: 'hidden',
|
|
104
142
|
// to anchor the aggregation label
|
|
105
143
|
position: 'relative'
|
|
106
|
-
}), "& .".concat(
|
|
144
|
+
}), "& .".concat(c.columnHeaderTitleContainerContent), {
|
|
107
145
|
overflow: 'hidden',
|
|
108
146
|
display: 'flex',
|
|
109
147
|
alignItems: 'center'
|
|
110
|
-
}), "& .".concat(
|
|
148
|
+
}), "& .".concat(c['columnHeader--filledGroup'], " .").concat(c.columnHeaderTitleContainer), {
|
|
111
149
|
borderBottomWidth: '1px',
|
|
112
150
|
borderBottomStyle: 'solid',
|
|
113
151
|
boxSizing: 'border-box'
|
|
114
|
-
}), "& .".concat(
|
|
152
|
+
}), "& .".concat(c['columnHeader--filledGroup'], ".").concat(c['columnHeader--showColumnBorder'], " .").concat(c.columnHeaderTitleContainer), {
|
|
115
153
|
borderBottom: "none"
|
|
116
|
-
}), "& .".concat(
|
|
154
|
+
}), "& .".concat(c['columnHeader--filledGroup'], ".").concat(c['columnHeader--showColumnBorder']), {
|
|
117
155
|
borderBottomWidth: '1px',
|
|
118
156
|
borderBottomStyle: 'solid',
|
|
119
157
|
boxSizing: 'border-box'
|
|
120
|
-
}), "& .".concat(
|
|
121
|
-
borderTop: "1px solid ".concat(borderColor)
|
|
122
|
-
}), "& .".concat(gridClasses.sortIcon, ", & .").concat(gridClasses.filterIcon), {
|
|
158
|
+
}), "& .".concat(c.sortIcon, ", & .").concat(c.filterIcon), {
|
|
123
159
|
fontSize: 'inherit'
|
|
124
|
-
}), "& .".concat(
|
|
160
|
+
}), "& .".concat(c['columnHeader--sortable']), {
|
|
125
161
|
cursor: 'pointer'
|
|
126
|
-
}), "& .".concat(
|
|
162
|
+
}), "& .".concat(c['columnHeader--alignCenter'], " .").concat(c.columnHeaderTitleContainer), {
|
|
127
163
|
justifyContent: 'center'
|
|
128
|
-
}), "& .".concat(
|
|
164
|
+
}), "& .".concat(c['columnHeader--alignRight'], " .").concat(c.columnHeaderDraggableContainer, ", & .").concat(c['columnHeader--alignRight'], " .").concat(c.columnHeaderTitleContainer), {
|
|
129
165
|
flexDirection: 'row-reverse'
|
|
130
|
-
}),
|
|
166
|
+
}), "& .".concat(c['columnHeader--alignCenter'], " .").concat(c.menuIcon, ", & .").concat(c['columnHeader--alignRight'], " .").concat(c.menuIcon), {
|
|
131
167
|
marginRight: 'auto',
|
|
132
168
|
marginLeft: -6
|
|
133
|
-
}), "& .".concat(
|
|
169
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c['columnHeader--alignRight'], " .").concat(c.menuIcon, ", & .").concat(c['columnHeader--alignRight'], " .").concat(c.menuIcon), {
|
|
134
170
|
marginRight: 'auto',
|
|
135
171
|
marginLeft: -10
|
|
136
|
-
}), "& .".concat(
|
|
137
|
-
backgroundColor: (
|
|
138
|
-
}), "& .".concat(
|
|
172
|
+
}), "& .".concat(c['columnHeader--moving']), {
|
|
173
|
+
backgroundColor: (t.vars || t).palette.action.hover
|
|
174
|
+
}), "& .".concat(c.columnSeparator), {
|
|
139
175
|
visibility: 'hidden',
|
|
140
176
|
position: 'absolute',
|
|
141
177
|
zIndex: 100,
|
|
@@ -143,172 +179,214 @@ export var GridRootStyles = styled('div', {
|
|
|
143
179
|
flexDirection: 'column',
|
|
144
180
|
justifyContent: 'center',
|
|
145
181
|
color: borderColor
|
|
146
|
-
}),
|
|
182
|
+
}), "& .".concat(c.columnHeaders), {
|
|
183
|
+
width: 'var(--DataGrid-rowWidth)'
|
|
184
|
+
}), '@media (hover: hover)', _defineProperty(_defineProperty(_defineProperty({}, "& .".concat(c.columnHeaders, ":hover"), columnHeadersStyles), "& .".concat(c.columnHeader, ":hover"), columnHeaderStyles), "& .".concat(c.columnHeader, ":not(.").concat(c['columnHeader--sorted'], "):hover .").concat(c.sortIcon), {
|
|
147
185
|
opacity: 0.5
|
|
148
|
-
})), '@media (hover: none)', _defineProperty(_defineProperty({}, "& .".concat(
|
|
186
|
+
})), '@media (hover: none)', _defineProperty(_defineProperty({}, "& .".concat(c.columnHeaders), columnHeadersStyles), "& .".concat(c.columnHeader), columnHeaderStyles)), "& .".concat(c['columnSeparator--sideLeft']), {
|
|
149
187
|
left: -12
|
|
150
|
-
}), "& .".concat(
|
|
188
|
+
}), "& .".concat(c['columnSeparator--sideRight']), {
|
|
151
189
|
right: -12
|
|
152
|
-
}), "& .".concat(
|
|
190
|
+
}), "& .".concat(c['columnSeparator--resizable']), _defineProperty(_defineProperty({
|
|
153
191
|
cursor: 'col-resize',
|
|
154
192
|
touchAction: 'none',
|
|
155
193
|
'&:hover': {
|
|
156
|
-
color: (
|
|
194
|
+
color: (t.vars || t).palette.text.primary,
|
|
157
195
|
// Reset on touch devices, it doesn't add specificity
|
|
158
196
|
'@media (hover: none)': {
|
|
159
197
|
color: borderColor
|
|
160
198
|
}
|
|
161
199
|
}
|
|
162
|
-
}, "&.".concat(
|
|
163
|
-
color: (
|
|
200
|
+
}, "&.".concat(c['columnSeparator--resizing']), {
|
|
201
|
+
color: (t.vars || t).palette.text.primary
|
|
164
202
|
}), '& svg', {
|
|
165
203
|
pointerEvents: 'none'
|
|
166
|
-
})), "& .".concat(
|
|
204
|
+
})), "& .".concat(c.iconSeparator), {
|
|
167
205
|
color: 'inherit'
|
|
168
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(
|
|
206
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c.menuIcon), {
|
|
169
207
|
width: 0,
|
|
170
208
|
visibility: 'hidden',
|
|
171
209
|
fontSize: 20,
|
|
172
210
|
marginRight: -10,
|
|
173
211
|
display: 'flex',
|
|
174
212
|
alignItems: 'center'
|
|
175
|
-
}), ".".concat(
|
|
213
|
+
}), ".".concat(c.menuOpen), {
|
|
176
214
|
visibility: 'visible',
|
|
177
215
|
width: 'auto'
|
|
178
|
-
}), "& .".concat(
|
|
216
|
+
}), "& .".concat(c.headerFilterRow), _defineProperty({}, "& .".concat(c.columnHeader), {
|
|
217
|
+
boxSizing: 'border-box',
|
|
218
|
+
borderTop: '1px solid var(--DataGrid-rowBorderColor)'
|
|
219
|
+
})), ".".concat(c.row), _defineProperty(_defineProperty(_defineProperty({
|
|
179
220
|
display: 'flex',
|
|
180
|
-
width: '
|
|
221
|
+
width: 'var(--DataGrid-rowWidth)',
|
|
181
222
|
breakInside: 'avoid',
|
|
182
223
|
// Avoid the row to be broken in two different print pages.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
'
|
|
191
|
-
backgroundColor:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.primary.mainChannel, " / ").concat(theme.vars.palette.action.selectedOpacity, ")") : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
197
|
-
}
|
|
198
|
-
}
|
|
224
|
+
|
|
225
|
+
'--rowBorderColor': 'var(--DataGrid-rowBorderColor)'
|
|
226
|
+
}, "&.".concat(c['row--firstVisible']), {
|
|
227
|
+
'--rowBorderColor': 'transparent'
|
|
228
|
+
}), '&:hover', {
|
|
229
|
+
backgroundColor: (t.vars || t).palette.action.hover,
|
|
230
|
+
// Reset on touch devices, it doesn't add specificity
|
|
231
|
+
'@media (hover: none)': {
|
|
232
|
+
backgroundColor: 'transparent'
|
|
233
|
+
}
|
|
234
|
+
}), '&.Mui-selected', selectedStyles)), "& .".concat(c['container--top'], ", & .").concat(c['container--bottom']), _defineProperty({
|
|
235
|
+
'[role=row]': {
|
|
236
|
+
background: 'var(--DataGrid-containerBackground)'
|
|
199
237
|
}
|
|
200
|
-
}
|
|
238
|
+
}, ".".concat(c.pinnedColumnHeaders, " [role=row]"), {
|
|
239
|
+
background: 'var(--DataGrid-pinnedBackground)'
|
|
240
|
+
})), "& .".concat(c.cell), {
|
|
201
241
|
display: 'flex',
|
|
202
242
|
alignItems: 'center',
|
|
203
|
-
|
|
204
|
-
'
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}), "&.".concat(gridClasses['root--disableUserSelection'], " .").concat(gridClasses.cell), {
|
|
243
|
+
height: 'var(--height)',
|
|
244
|
+
minWidth: 'var(--width)',
|
|
245
|
+
maxWidth: 'var(--width)',
|
|
246
|
+
'--width': '0px',
|
|
247
|
+
'--height': '0px',
|
|
248
|
+
boxSizing: 'border-box',
|
|
249
|
+
borderTop: "1px solid var(--rowBorderColor)",
|
|
250
|
+
'&.Mui-selected': selectedStyles
|
|
251
|
+
}), "& .".concat(c['virtualScrollerContent--overflowed'], " .").concat(c['row--lastVisible'], " .").concat(c.cell), {
|
|
252
|
+
borderTopColor: 'transparent'
|
|
253
|
+
}), "&.".concat(c['root--disableUserSelection'], " .").concat(c.cell), {
|
|
215
254
|
userSelect: 'none'
|
|
216
|
-
}), "& .".concat(
|
|
255
|
+
}), "& .".concat(c.row, ":not(.").concat(c['row--dynamicHeight'], ") > .").concat(c.cell), {
|
|
217
256
|
overflow: 'hidden',
|
|
218
257
|
whiteSpace: 'nowrap'
|
|
219
|
-
}), "& .".concat(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}), "& .".concat(gridClasses.cell, ".").concat(gridClasses['cell--selectionMode']), {
|
|
258
|
+
}), "& .".concat(c.cellEmpty), {
|
|
259
|
+
padding: 0
|
|
260
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c.cell, ".").concat(c['cell--selectionMode']), {
|
|
223
261
|
cursor: 'default'
|
|
224
|
-
}), "& .".concat(
|
|
262
|
+
}), "& .".concat(c.cell, ".").concat(c['cell--editing']), {
|
|
225
263
|
padding: 1,
|
|
226
264
|
display: 'flex',
|
|
227
|
-
boxShadow:
|
|
228
|
-
backgroundColor: (
|
|
265
|
+
boxShadow: t.shadows[2],
|
|
266
|
+
backgroundColor: (t.vars || t).palette.background.paper,
|
|
229
267
|
'&:focus-within': {
|
|
230
|
-
outline: "solid ".concat((
|
|
268
|
+
outline: "solid ".concat((t.vars || t).palette.primary.main, " 1px"),
|
|
231
269
|
outlineOffset: '-1px'
|
|
232
270
|
}
|
|
233
|
-
}), "& .".concat(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}), "& .".concat(
|
|
271
|
+
}), "& .".concat(c.cellContent), {
|
|
272
|
+
overflow: 'hidden',
|
|
273
|
+
textOverflow: 'ellipsis'
|
|
274
|
+
}), "& .".concat(c['row--editing']), {
|
|
275
|
+
boxShadow: t.shadows[2]
|
|
276
|
+
}), "& .".concat(c['row--editing'], " .").concat(c.cell), {
|
|
277
|
+
boxShadow: t.shadows[0],
|
|
278
|
+
backgroundColor: (t.vars || t).palette.background.paper
|
|
279
|
+
}), "& .".concat(c.editBooleanCell), {
|
|
239
280
|
display: 'flex',
|
|
240
281
|
height: '100%',
|
|
241
282
|
width: '100%',
|
|
242
283
|
alignItems: 'center',
|
|
243
284
|
justifyContent: 'center'
|
|
244
|
-
}), "& .".concat(
|
|
245
|
-
color: (
|
|
246
|
-
}), "& .".concat(
|
|
247
|
-
color: (
|
|
248
|
-
}), "& .".concat(
|
|
285
|
+
}), "& .".concat(c.booleanCell, "[data-value=\"true\"]"), {
|
|
286
|
+
color: (t.vars || t).palette.text.secondary
|
|
287
|
+
}), "& .".concat(c.booleanCell, "[data-value=\"false\"]"), {
|
|
288
|
+
color: (t.vars || t).palette.text.disabled
|
|
289
|
+
}), "& .".concat(c.actionsCell), {
|
|
249
290
|
display: 'inline-flex',
|
|
250
291
|
alignItems: 'center',
|
|
251
|
-
gridGap:
|
|
252
|
-
}), "& .".concat(
|
|
292
|
+
gridGap: t.spacing(1)
|
|
293
|
+
}), "& .".concat(c.rowReorderCell), {
|
|
253
294
|
display: 'inline-flex',
|
|
254
295
|
flex: 1,
|
|
255
296
|
alignItems: 'center',
|
|
256
297
|
justifyContent: 'center',
|
|
257
|
-
opacity: (
|
|
258
|
-
}), "& .".concat(
|
|
298
|
+
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
299
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c['rowReorderCell--draggable']), {
|
|
259
300
|
cursor: 'move',
|
|
260
301
|
opacity: 1
|
|
261
|
-
}), "& .".concat(
|
|
302
|
+
}), "& .".concat(c.rowReorderCellContainer), {
|
|
262
303
|
padding: 0,
|
|
263
304
|
alignItems: 'stretch'
|
|
264
|
-
}), ".".concat(
|
|
305
|
+
}), ".".concat(c.withBorderColor), {
|
|
265
306
|
borderColor: borderColor
|
|
266
|
-
}), "& .".concat(
|
|
307
|
+
}), "& .".concat(c['cell--withLeftBorder']), {
|
|
308
|
+
borderLeftColor: 'var(--DataGrid-rowBorderColor)',
|
|
309
|
+
borderLeftWidth: '1px',
|
|
310
|
+
borderLeftStyle: 'solid'
|
|
311
|
+
}), "& .".concat(c['cell--withRightBorder']), {
|
|
312
|
+
borderRightColor: 'var(--DataGrid-rowBorderColor)',
|
|
267
313
|
borderRightWidth: '1px',
|
|
268
314
|
borderRightStyle: 'solid'
|
|
269
|
-
}),
|
|
315
|
+
}), "& .".concat(c['columnHeader--withRightBorder']), {
|
|
270
316
|
borderRightWidth: '1px',
|
|
271
317
|
borderRightStyle: 'solid'
|
|
272
|
-
}), "& .".concat(
|
|
318
|
+
}), "& .".concat(c['cell--textLeft']), {
|
|
273
319
|
justifyContent: 'flex-start'
|
|
274
|
-
}), "& .".concat(
|
|
320
|
+
}), "& .".concat(c['cell--textRight']), {
|
|
275
321
|
justifyContent: 'flex-end'
|
|
276
|
-
}), "& .".concat(
|
|
322
|
+
}), "& .".concat(c['cell--textCenter']), {
|
|
277
323
|
justifyContent: 'center'
|
|
278
|
-
}), "& .".concat(
|
|
324
|
+
}), "& .".concat(c['cell--pinnedLeft'], ", & .").concat(c['cell--pinnedRight']), {
|
|
325
|
+
position: 'sticky',
|
|
326
|
+
zIndex: 3,
|
|
327
|
+
background: 'var(--DataGrid-pinnedBackground)'
|
|
328
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(c.virtualScrollerContent, " .").concat(c.row), _defineProperty({
|
|
329
|
+
'&:hover': _defineProperty({}, "& .".concat(c['cell--pinnedLeft'], ", & .").concat(c['cell--pinnedRight']), {
|
|
330
|
+
backgroundColor: pinnedHoverBackground
|
|
331
|
+
})
|
|
332
|
+
}, "&.Mui-selected", _defineProperty(_defineProperty({}, "& .".concat(c['cell--pinnedLeft'], ", & .").concat(c['cell--pinnedRight']), {
|
|
333
|
+
backgroundColor: pinnedSelectedBackground
|
|
334
|
+
}), '&:hover', _defineProperty({}, "& .".concat(c['cell--pinnedLeft'], ", & .").concat(c['cell--pinnedRight']), {
|
|
335
|
+
backgroundColor: pinnedSelectedHoverBackground
|
|
336
|
+
})))), "& .".concat(c.cell, ":not(.").concat(c['cell--pinnedLeft'], "):not(.").concat(c['cell--pinnedRight'], ")"), {
|
|
337
|
+
transform: 'translate3d(var(--DataGrid-offsetLeft), 0, 0)'
|
|
338
|
+
}), "& .".concat(c.columnHeaderDraggableContainer), {
|
|
279
339
|
display: 'flex',
|
|
280
340
|
width: '100%',
|
|
281
341
|
height: '100%'
|
|
282
|
-
}), "& .".concat(
|
|
342
|
+
}), "& .".concat(c.rowReorderCellPlaceholder), {
|
|
283
343
|
display: 'none'
|
|
284
|
-
}), "& .".concat(
|
|
285
|
-
background: (
|
|
344
|
+
}), "& .".concat(c['columnHeader--dragging'], ", & .").concat(c['row--dragging']), {
|
|
345
|
+
background: (t.vars || t).palette.background.paper,
|
|
286
346
|
padding: '0 12px',
|
|
287
347
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
288
|
-
opacity: (
|
|
289
|
-
}), "& .".concat(
|
|
290
|
-
background: (
|
|
348
|
+
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
349
|
+
}), "& .".concat(c['row--dragging']), _defineProperty({
|
|
350
|
+
background: (t.vars || t).palette.background.paper,
|
|
291
351
|
padding: '0 12px',
|
|
292
352
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
293
|
-
opacity: (
|
|
294
|
-
}, "& .".concat(
|
|
353
|
+
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
354
|
+
}, "& .".concat(c.rowReorderCellPlaceholder), {
|
|
295
355
|
display: 'flex'
|
|
296
|
-
})), "& .".concat(
|
|
356
|
+
})), "& .".concat(c.treeDataGroupingCell), {
|
|
297
357
|
display: 'flex',
|
|
298
358
|
alignItems: 'center',
|
|
299
359
|
width: '100%'
|
|
300
|
-
}), "& .".concat(
|
|
360
|
+
}), "& .".concat(c.treeDataGroupingCellToggle), {
|
|
301
361
|
flex: '0 0 28px',
|
|
302
362
|
alignSelf: 'stretch',
|
|
303
|
-
marginRight:
|
|
304
|
-
}),
|
|
363
|
+
marginRight: t.spacing(2)
|
|
364
|
+
}), "& .".concat(c.groupingCriteriaCell), {
|
|
305
365
|
display: 'flex',
|
|
306
366
|
alignItems: 'center',
|
|
307
367
|
width: '100%'
|
|
308
|
-
}), "& .".concat(
|
|
368
|
+
}), "& .".concat(c.groupingCriteriaCellToggle), {
|
|
309
369
|
flex: '0 0 28px',
|
|
310
370
|
alignSelf: 'stretch',
|
|
311
|
-
marginRight:
|
|
371
|
+
marginRight: t.spacing(2)
|
|
312
372
|
})));
|
|
313
373
|
return gridStyle;
|
|
314
|
-
});
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Blend a transparent overlay color with a background color, resulting in a single
|
|
378
|
+
* RGB color.
|
|
379
|
+
*/
|
|
380
|
+
function blend(background, overlay, opacity) {
|
|
381
|
+
var gamma = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
382
|
+
var f = function f(b, o) {
|
|
383
|
+
return Math.round(Math.pow(Math.pow(b, 1 / gamma) * (1 - opacity) + Math.pow(o, 1 / gamma) * opacity, gamma));
|
|
384
|
+
};
|
|
385
|
+
var backgroundColor = decomposeColor(background);
|
|
386
|
+
var overlayColor = decomposeColor(overlay);
|
|
387
|
+
var rgb = [f(backgroundColor.values[0], overlayColor.values[0]), f(backgroundColor.values[1], overlayColor.values[1]), f(backgroundColor.values[2], overlayColor.values[2])];
|
|
388
|
+
return recomposeColor({
|
|
389
|
+
type: 'rgb',
|
|
390
|
+
values: rgb
|
|
391
|
+
});
|
|
392
|
+
}
|
|
@@ -31,7 +31,7 @@ function GridColumnMenuSortItem(props) {
|
|
|
31
31
|
var direction = event.currentTarget.getAttribute('data-value') || null;
|
|
32
32
|
apiRef.current.sortColumn(colDef.field, direction === sortDirection ? null : direction);
|
|
33
33
|
}, [apiRef, colDef, onClick, sortDirection]);
|
|
34
|
-
if (!colDef || !colDef.sortable || !sortingOrder.some(function (item) {
|
|
34
|
+
if (rootProps.disableColumnSorting || !colDef || !colDef.sortable || !sortingOrder.some(function (item) {
|
|
35
35
|
return !!item;
|
|
36
36
|
})) {
|
|
37
37
|
return null;
|