@mui/x-data-grid 7.0.0-beta.3 → 7.0.0-beta.5
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 +357 -22
- package/DataGrid/DataGrid.js +2 -0
- package/colDef/gridActionsColDef.js +1 -0
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridBooleanOperators.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridRow.d.ts +7 -9
- package/components/GridRow.js +36 -47
- package/components/GridScrollbarFillerCell.js +6 -21
- package/components/cell/GridCell.d.ts +2 -1
- package/components/cell/GridCell.js +17 -15
- package/components/cell/GridSkeletonCell.d.ts +3 -2
- package/components/cell/GridSkeletonCell.js +14 -6
- package/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/containers/GridRootStyles.js +59 -21
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/components/virtualization/GridBottomContainer.js +1 -1
- package/components/virtualization/GridTopContainer.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/components/virtualization/GridVirtualScrollerRenderZone.js +9 -3
- package/constants/gridClasses.d.ts +24 -8
- package/constants/gridClasses.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -8
- package/hooks/features/columns/gridColumnsSelector.d.ts +6 -0
- package/hooks/features/columns/gridColumnsSelector.js +8 -1
- package/hooks/features/columns/useGridColumns.js +4 -0
- package/hooks/features/editing/useGridCellEditing.js +3 -4
- package/hooks/features/editing/useGridRowEditing.js +4 -6
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/rows/useGridRows.js +8 -4
- package/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/hooks/features/sorting/useGridSorting.js +1 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +0 -9
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -7
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +3 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +82 -138
- package/hooks/features/virtualization/useGridVirtualization.d.ts +0 -8
- package/hooks/features/virtualization/useGridVirtualization.js +1 -6
- package/hooks/utils/useTimeout.d.ts +5 -3
- package/hooks/utils/useTimeout.js +13 -5
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/models/colDef/gridColDef.d.ts +13 -0
- package/modern/DataGrid/DataGrid.js +2 -0
- package/modern/colDef/gridActionsColDef.js +1 -0
- package/modern/colDef/gridBooleanColDef.js +1 -0
- package/modern/colDef/gridBooleanOperators.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/components/GridRow.js +35 -46
- package/modern/components/GridScrollbarFillerCell.js +6 -21
- package/modern/components/cell/GridCell.js +17 -15
- package/modern/components/cell/GridSkeletonCell.js +14 -6
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/modern/components/containers/GridRootStyles.js +59 -21
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/modern/components/virtualization/GridBottomContainer.js +1 -1
- package/modern/components/virtualization/GridTopContainer.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +8 -3
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -8
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -1
- package/modern/hooks/features/columns/useGridColumns.js +2 -0
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +4 -6
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/rows/useGridRows.js +8 -4
- package/modern/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/modern/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +80 -136
- package/modern/hooks/features/virtualization/useGridVirtualization.js +1 -6
- package/modern/hooks/utils/useTimeout.js +13 -5
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/utils/keyboardUtils.js +20 -11
- package/modern/utils/utils.js +9 -0
- package/node/DataGrid/DataGrid.js +1 -0
- package/node/colDef/gridActionsColDef.js +1 -0
- package/node/colDef/gridBooleanColDef.js +1 -0
- package/node/colDef/gridBooleanOperators.js +1 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/components/GridRow.js +35 -46
- package/node/components/GridScrollbarFillerCell.js +5 -20
- package/node/components/cell/GridCell.js +17 -15
- package/node/components/cell/GridSkeletonCell.js +15 -7
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/node/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/node/components/containers/GridRootStyles.js +59 -21
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/node/components/virtualization/GridBottomContainer.js +1 -1
- package/node/components/virtualization/GridTopContainer.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +7 -2
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -5
- package/node/hooks/features/columns/gridColumnsSelector.js +9 -2
- package/node/hooks/features/columns/useGridColumns.js +2 -0
- package/node/hooks/features/editing/useGridCellEditing.js +2 -3
- package/node/hooks/features/editing/useGridRowEditing.js +3 -5
- package/node/hooks/features/filter/useGridFilter.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +8 -4
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/node/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/node/hooks/features/sorting/useGridSorting.js +1 -2
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +1 -8
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +81 -136
- package/node/hooks/features/virtualization/useGridVirtualization.js +2 -7
- package/node/hooks/utils/useTimeout.js +13 -4
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/utils/keyboardUtils.js +25 -20
- package/node/utils/utils.js +12 -1
- package/package.json +1 -1
- package/utils/keyboardUtils.d.ts +7 -6
- package/utils/keyboardUtils.js +20 -11
- package/utils/utils.d.ts +4 -0
- package/utils/utils.js +9 -0
- package/legacy/DataGrid/DataGrid.js +0 -664
- package/legacy/DataGrid/index.js +0 -2
- package/legacy/DataGrid/useDataGridComponent.js +0 -81
- package/legacy/DataGrid/useDataGridProps.js +0 -98
- package/legacy/colDef/gridActionsColDef.js +0 -18
- package/legacy/colDef/gridBooleanColDef.js +0 -42
- package/legacy/colDef/gridBooleanOperators.js +0 -16
- package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -33
- package/legacy/colDef/gridDateColDef.js +0 -62
- package/legacy/colDef/gridDateOperators.js +0 -115
- package/legacy/colDef/gridDefaultColumnTypes.js +0 -19
- package/legacy/colDef/gridNumericColDef.js +0 -19
- package/legacy/colDef/gridNumericOperators.js +0 -145
- package/legacy/colDef/gridSingleSelectColDef.js +0 -64
- package/legacy/colDef/gridSingleSelectOperators.js +0 -46
- package/legacy/colDef/gridStringColDef.js +0 -27
- package/legacy/colDef/gridStringOperators.js +0 -112
- package/legacy/colDef/index.js +0 -13
- package/legacy/components/GridApiContext.js +0 -5
- package/legacy/components/GridColumnHeaders.js +0 -94
- package/legacy/components/GridDetailPanels.js +0 -4
- package/legacy/components/GridFooter.js +0 -42
- package/legacy/components/GridHeader.js +0 -13
- package/legacy/components/GridHeaders.js +0 -53
- package/legacy/components/GridLoadingOverlay.js +0 -21
- package/legacy/components/GridNoResultsOverlay.js +0 -14
- package/legacy/components/GridNoRowsOverlay.js +0 -23
- package/legacy/components/GridPagination.js +0 -85
- package/legacy/components/GridPinnedRows.js +0 -4
- package/legacy/components/GridRow.js +0 -465
- package/legacy/components/GridRowCount.js +0 -63
- package/legacy/components/GridScrollbarFillerCell.js +0 -34
- package/legacy/components/GridSelectedRowCount.js +0 -66
- package/legacy/components/base/GridBody.js +0 -2
- package/legacy/components/base/GridFooterPlaceholder.js +0 -12
- package/legacy/components/base/GridOverlays.js +0 -122
- package/legacy/components/base/index.js +0 -3
- package/legacy/components/cell/GridActionsCell.js +0 -294
- package/legacy/components/cell/GridActionsCellItem.js +0 -69
- package/legacy/components/cell/GridBooleanCell.js +0 -121
- package/legacy/components/cell/GridCell.js +0 -350
- package/legacy/components/cell/GridEditBooleanCell.js +0 -174
- package/legacy/components/cell/GridEditDateCell.js +0 -230
- package/legacy/components/cell/GridEditInputCell.js +0 -198
- package/legacy/components/cell/GridEditSingleSelectCell.js +0 -231
- package/legacy/components/cell/GridSkeletonCell.js +0 -52
- package/legacy/components/cell/index.js +0 -9
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +0 -59
- package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +0 -41
- package/legacy/components/columnHeaders/GridColumnGroupHeader.js +0 -132
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -93
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +0 -212
- package/legacy/components/columnHeaders/GridColumnHeaderSeparator.js +0 -71
- package/legacy/components/columnHeaders/GridColumnHeaderSortIcon.js +0 -79
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +0 -84
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +0 -55
- package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +0 -107
- package/legacy/components/columnHeaders/GridIconButtonContainer.js +0 -41
- package/legacy/components/columnHeaders/index.js +0 -5
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -160
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -134
- package/legacy/components/columnSelection/index.js +0 -2
- package/legacy/components/columnsManagement/GridColumnsManagement.js +0 -307
- package/legacy/components/columnsManagement/index.js +0 -1
- package/legacy/components/columnsManagement/utils.js +0 -22
- package/legacy/components/containers/GridFooterContainer.js +0 -50
- package/legacy/components/containers/GridOverlay.js +0 -52
- package/legacy/components/containers/GridRoot.js +0 -79
- package/legacy/components/containers/GridRootStyles.js +0 -395
- package/legacy/components/containers/GridToolbarContainer.js +0 -59
- package/legacy/components/containers/index.js +0 -4
- package/legacy/components/index.js +0 -19
- package/legacy/components/menu/GridMenu.js +0 -132
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +0 -61
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +0 -81
- package/legacy/components/menu/columnMenu/GridColumnMenuContainer.js +0 -56
- package/legacy/components/menu/columnMenu/GridColumnMenuItemProps.js +0 -1
- package/legacy/components/menu/columnMenu/GridColumnMenuProps.js +0 -1
- package/legacy/components/menu/columnMenu/index.js +0 -9
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +0 -21
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +0 -41
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +0 -60
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +0 -41
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +0 -80
- package/legacy/components/menu/columnMenu/menuItems/index.js +0 -5
- package/legacy/components/menu/index.js +0 -2
- package/legacy/components/panel/GridColumnsPanel.js +0 -22
- package/legacy/components/panel/GridPanel.js +0 -137
- package/legacy/components/panel/GridPanelContent.js +0 -49
- package/legacy/components/panel/GridPanelFooter.js +0 -50
- package/legacy/components/panel/GridPanelHeader.js +0 -48
- package/legacy/components/panel/GridPanelWrapper.js +0 -64
- package/legacy/components/panel/GridPreferencesPanel.js +0 -26
- package/legacy/components/panel/filterPanel/GridFilterForm.js +0 -528
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +0 -118
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +0 -121
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -116
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +0 -102
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +0 -149
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +0 -106
- package/legacy/components/panel/filterPanel/GridFilterInputValueProps.js +0 -1
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +0 -264
- package/legacy/components/panel/filterPanel/filterPanelUtils.js +0 -22
- package/legacy/components/panel/filterPanel/index.js +0 -9
- package/legacy/components/panel/index.js +0 -7
- package/legacy/components/reexportable.js +0 -1
- package/legacy/components/toolbar/GridToolbar.js +0 -64
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -68
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -142
- package/legacy/components/toolbar/GridToolbarExport.js +0 -80
- package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -105
- package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -136
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +0 -164
- package/legacy/components/toolbar/index.js +0 -7
- package/legacy/components/virtualization/GridBottomContainer.js +0 -25
- package/legacy/components/virtualization/GridMainContainer.js +0 -20
- package/legacy/components/virtualization/GridTopContainer.js +0 -35
- package/legacy/components/virtualization/GridVirtualScrollbar.js +0 -129
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -93
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +0 -35
- package/legacy/components/virtualization/GridVirtualScrollerFiller.js +0 -70
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +0 -49
- package/legacy/constants/defaultGridSlotsComponents.js +0 -33
- package/legacy/constants/envConstants.js +0 -19
- package/legacy/constants/gridClasses.js +0 -5
- package/legacy/constants/gridDetailPanelToggleField.js +0 -2
- package/legacy/constants/index.js +0 -3
- package/legacy/constants/localeTextConstants.js +0 -158
- package/legacy/context/GridContextProvider.js +0 -21
- package/legacy/context/GridRootPropsContext.js +0 -6
- package/legacy/context/index.js +0 -1
- package/legacy/hooks/core/gridCoreSelector.js +0 -7
- package/legacy/hooks/core/index.js +0 -1
- package/legacy/hooks/core/pipeProcessing/gridPipeProcessingApi.js +0 -1
- package/legacy/hooks/core/pipeProcessing/index.js +0 -4
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +0 -114
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +0 -26
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -26
- package/legacy/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +0 -1
- package/legacy/hooks/core/strategyProcessing/index.js +0 -3
- package/legacy/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +0 -18
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +0 -116
- package/legacy/hooks/core/useGridApiInitialization.js +0 -124
- package/legacy/hooks/core/useGridInitialization.js +0 -26
- package/legacy/hooks/core/useGridLocaleText.js +0 -12
- package/legacy/hooks/core/useGridLoggerFactory.js +0 -51
- package/legacy/hooks/core/useGridRefs.js +0 -13
- package/legacy/hooks/core/useGridStateInitialization.js +0 -106
- package/legacy/hooks/core/useGridTheme.js +0 -21
- package/legacy/hooks/features/clipboard/useGridClipboard.js +0 -92
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsInterfaces.js +0 -1
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +0 -24
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +0 -92
- package/legacy/hooks/features/columnGrouping/index.js +0 -2
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +0 -140
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +0 -272
- package/legacy/hooks/features/columnMenu/columnMenuInterfaces.js +0 -1
- package/legacy/hooks/features/columnMenu/columnMenuSelector.js +0 -3
- package/legacy/hooks/features/columnMenu/index.js +0 -2
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +0 -108
- package/legacy/hooks/features/columnMenu/useGridColumnMenuSlots.js +0 -71
- package/legacy/hooks/features/columns/gridColumnsInterfaces.js +0 -9
- package/legacy/hooks/features/columns/gridColumnsSelector.js +0 -174
- package/legacy/hooks/features/columns/gridColumnsUtils.js +0 -338
- package/legacy/hooks/features/columns/index.js +0 -2
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +0 -105
- package/legacy/hooks/features/columns/useGridColumns.js +0 -319
- package/legacy/hooks/features/density/densitySelector.js +0 -10
- package/legacy/hooks/features/density/densityState.js +0 -1
- package/legacy/hooks/features/density/index.js +0 -2
- package/legacy/hooks/features/density/useGridDensity.js +0 -48
- package/legacy/hooks/features/dimensions/gridDimensionsApi.js +0 -1
- package/legacy/hooks/features/dimensions/gridDimensionsSelectors.js +0 -3
- package/legacy/hooks/features/dimensions/index.js +0 -2
- package/legacy/hooks/features/dimensions/useGridDimensions.js +0 -302
- package/legacy/hooks/features/editing/gridEditingSelectors.js +0 -4
- package/legacy/hooks/features/editing/useGridCellEditing.js +0 -456
- package/legacy/hooks/features/editing/useGridEditing.js +0 -145
- package/legacy/hooks/features/editing/useGridRowEditing.js +0 -567
- package/legacy/hooks/features/events/useGridEvents.js +0 -23
- package/legacy/hooks/features/export/serializers/csvSerializer.js +0 -155
- package/legacy/hooks/features/export/useGridCsvExport.js +0 -75
- package/legacy/hooks/features/export/useGridPrintExport.js +0 -313
- package/legacy/hooks/features/export/utils.js +0 -49
- package/legacy/hooks/features/filter/gridFilterSelector.js +0 -165
- package/legacy/hooks/features/filter/gridFilterState.js +0 -20
- package/legacy/hooks/features/filter/gridFilterUtils.js +0 -330
- package/legacy/hooks/features/filter/index.js +0 -2
- package/legacy/hooks/features/filter/useGridFilter.js +0 -378
- package/legacy/hooks/features/focus/gridFocusState.js +0 -1
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +0 -31
- package/legacy/hooks/features/focus/index.js +0 -2
- package/legacy/hooks/features/focus/useGridFocus.js +0 -408
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +0 -10
- package/legacy/hooks/features/headerFiltering/index.js +0 -1
- package/legacy/hooks/features/headerFiltering/useGridHeaderFiltering.js +0 -93
- package/legacy/hooks/features/index.js +0 -16
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +0 -565
- package/legacy/hooks/features/pagination/gridPaginationInterfaces.js +0 -1
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +0 -115
- package/legacy/hooks/features/pagination/gridPaginationUtils.js +0 -31
- package/legacy/hooks/features/pagination/index.js +0 -2
- package/legacy/hooks/features/pagination/useGridPagination.js +0 -175
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +0 -3
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelState.js +0 -1
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +0 -6
- package/legacy/hooks/features/preferencesPanel/index.js +0 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +0 -125
- package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +0 -19
- package/legacy/hooks/features/rowSelection/index.js +0 -1
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +0 -419
- package/legacy/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +0 -45
- package/legacy/hooks/features/rowSelection/utils.js +0 -8
- package/legacy/hooks/features/rows/gridRowsInterfaces.js +0 -1
- package/legacy/hooks/features/rows/gridRowsMetaSelector.js +0 -3
- package/legacy/hooks/features/rows/gridRowsMetaState.js +0 -1
- package/legacy/hooks/features/rows/gridRowsSelector.js +0 -90
- package/legacy/hooks/features/rows/gridRowsUtils.js +0 -294
- package/legacy/hooks/features/rows/index.js +0 -4
- package/legacy/hooks/features/rows/useGridParamsApi.js +0 -142
- package/legacy/hooks/features/rows/useGridRows.js +0 -466
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -236
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +0 -82
- package/legacy/hooks/features/scroll/useGridScroll.js +0 -133
- package/legacy/hooks/features/sorting/gridSortingSelector.js +0 -56
- package/legacy/hooks/features/sorting/gridSortingState.js +0 -1
- package/legacy/hooks/features/sorting/gridSortingUtils.js +0 -154
- package/legacy/hooks/features/sorting/index.js +0 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +0 -276
- package/legacy/hooks/features/statePersistence/gridStatePersistenceInterface.js +0 -1
- package/legacy/hooks/features/statePersistence/index.js +0 -1
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +0 -25
- package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -61
- package/legacy/hooks/features/virtualization/index.js +0 -2
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -646
- package/legacy/hooks/features/virtualization/useGridVirtualization.js +0 -63
- package/legacy/hooks/index.js +0 -3
- package/legacy/hooks/utils/index.js +0 -9
- package/legacy/hooks/utils/useFirstRender.js +0 -8
- package/legacy/hooks/utils/useGridApiContext.js +0 -9
- package/legacy/hooks/utils/useGridApiEventHandler.js +0 -105
- package/legacy/hooks/utils/useGridApiMethod.js +0 -11
- package/legacy/hooks/utils/useGridApiRef.js +0 -7
- package/legacy/hooks/utils/useGridAriaAttributes.js +0 -25
- package/legacy/hooks/utils/useGridInitializeState.js +0 -8
- package/legacy/hooks/utils/useGridLogger.js +0 -10
- package/legacy/hooks/utils/useGridNativeEventListener.js +0 -32
- package/legacy/hooks/utils/useGridPrivateApiContext.js +0 -12
- package/legacy/hooks/utils/useGridRootProps.js +0 -9
- package/legacy/hooks/utils/useGridSelector.js +0 -54
- package/legacy/hooks/utils/useGridVisibleRows.js +0 -42
- package/legacy/hooks/utils/useLazyRef.js +0 -11
- package/legacy/hooks/utils/useOnMount.js +0 -7
- package/legacy/hooks/utils/useResizeObserver.js +0 -36
- package/legacy/hooks/utils/useRunOnce.js +0 -18
- package/legacy/hooks/utils/useTimeout.js +0 -38
- package/legacy/index.js +0 -38
- package/legacy/internals/index.js +0 -68
- package/legacy/internals/utils/computeSlots.js +0 -17
- package/legacy/internals/utils/index.js +0 -3
- package/legacy/internals/utils/propValidation.js +0 -21
- package/legacy/internals/utils/useProps.js +0 -32
- package/legacy/joy/icons.js +0 -432
- package/legacy/joy/index.js +0 -2
- package/legacy/joy/joySlots.js +0 -420
- package/legacy/locales/arSD.js +0 -160
- package/legacy/locales/beBY.js +0 -184
- package/legacy/locales/bgBG.js +0 -160
- package/legacy/locales/coreLocales.js +0 -62
- package/legacy/locales/csCZ.js +0 -181
- package/legacy/locales/daDK.js +0 -160
- package/legacy/locales/deDE.js +0 -160
- package/legacy/locales/elGR.js +0 -160
- package/legacy/locales/enUS.js +0 -4
- package/legacy/locales/esES.js +0 -160
- package/legacy/locales/faIR.js +0 -160
- package/legacy/locales/fiFI.js +0 -160
- package/legacy/locales/frFR.js +0 -160
- package/legacy/locales/heIL.js +0 -160
- package/legacy/locales/hrHR.js +0 -160
- package/legacy/locales/huHU.js +0 -160
- package/legacy/locales/index.js +0 -35
- package/legacy/locales/itIT.js +0 -160
- package/legacy/locales/jaJP.js +0 -160
- package/legacy/locales/koKR.js +0 -162
- package/legacy/locales/nbNO.js +0 -162
- package/legacy/locales/nlNL.js +0 -160
- package/legacy/locales/plPL.js +0 -163
- package/legacy/locales/ptBR.js +0 -160
- package/legacy/locales/ptPT.js +0 -160
- package/legacy/locales/roRO.js +0 -160
- package/legacy/locales/ruRU.js +0 -181
- package/legacy/locales/skSK.js +0 -181
- package/legacy/locales/svSE.js +0 -160
- package/legacy/locales/trTR.js +0 -161
- package/legacy/locales/ukUA.js +0 -182
- package/legacy/locales/urPK.js +0 -160
- package/legacy/locales/viVN.js +0 -160
- package/legacy/locales/zhCN.js +0 -160
- package/legacy/locales/zhHK.js +0 -160
- package/legacy/locales/zhTW.js +0 -160
- package/legacy/material/components/MUISelectOption.js +0 -14
- package/legacy/material/icons/GridColumnUnsortedIcon.js +0 -16
- package/legacy/material/icons/index.js +0 -89
- package/legacy/material/index.js +0 -69
- package/legacy/models/api/gridApiCommon.js +0 -1
- package/legacy/models/api/gridApiCommunity.js +0 -1
- package/legacy/models/api/gridCallbackDetails.js +0 -1
- package/legacy/models/api/gridColumnApi.js +0 -1
- package/legacy/models/api/gridColumnGroupingApi.js +0 -1
- package/legacy/models/api/gridColumnMenuApi.js +0 -1
- package/legacy/models/api/gridColumnSpanning.js +0 -1
- package/legacy/models/api/gridCoreApi.js +0 -1
- package/legacy/models/api/gridCsvExportApi.js +0 -1
- package/legacy/models/api/gridDensityApi.js +0 -1
- package/legacy/models/api/gridEditingApi.js +0 -1
- package/legacy/models/api/gridFilterApi.js +0 -1
- package/legacy/models/api/gridFocusApi.js +0 -1
- package/legacy/models/api/gridHeaderFilteringApi.js +0 -1
- package/legacy/models/api/gridLocaleTextApi.js +0 -1
- package/legacy/models/api/gridLoggerApi.js +0 -1
- package/legacy/models/api/gridParamsApi.js +0 -1
- package/legacy/models/api/gridPreferencesPanelApi.js +0 -1
- package/legacy/models/api/gridPrintExportApi.js +0 -1
- package/legacy/models/api/gridRowApi.js +0 -1
- package/legacy/models/api/gridRowSelectionApi.js +0 -1
- package/legacy/models/api/gridRowsMetaApi.js +0 -1
- package/legacy/models/api/gridScrollApi.js +0 -1
- package/legacy/models/api/gridSortApi.js +0 -1
- package/legacy/models/api/gridStateApi.js +0 -1
- package/legacy/models/api/gridVirtualizationApi.js +0 -1
- package/legacy/models/api/index.js +0 -16
- package/legacy/models/colDef/gridColDef.js +0 -1
- package/legacy/models/colDef/gridColType.js +0 -1
- package/legacy/models/colDef/gridColumnTypesRecord.js +0 -1
- package/legacy/models/colDef/index.js +0 -6
- package/legacy/models/controlStateItem.js +0 -1
- package/legacy/models/cursorCoordinates.js +0 -1
- package/legacy/models/elementSize.js +0 -1
- package/legacy/models/events/gridEventListener.js +0 -1
- package/legacy/models/events/gridEventLookup.js +0 -1
- package/legacy/models/events/gridEventPublisher.js +0 -1
- package/legacy/models/events/index.js +0 -3
- package/legacy/models/gridApiCaches.js +0 -1
- package/legacy/models/gridCell.js +0 -1
- package/legacy/models/gridCellClass.js +0 -1
- package/legacy/models/gridColumnGrouping.js +0 -11
- package/legacy/models/gridColumnHeaderClass.js +0 -1
- package/legacy/models/gridColumnSpanning.js +0 -1
- package/legacy/models/gridDensity.js +0 -1
- package/legacy/models/gridEditRowModel.js +0 -16
- package/legacy/models/gridExport.js +0 -1
- package/legacy/models/gridFeatureMode.js +0 -1
- package/legacy/models/gridFilterItem.js +0 -11
- package/legacy/models/gridFilterModel.js +0 -1
- package/legacy/models/gridFilterOperator.js +0 -1
- package/legacy/models/gridHeaderFilteringModel.js +0 -1
- package/legacy/models/gridIconSlotsComponent.js +0 -1
- package/legacy/models/gridPaginationProps.js +0 -1
- package/legacy/models/gridRenderContextProps.js +0 -1
- package/legacy/models/gridRowSelectionModel.js +0 -1
- package/legacy/models/gridRows.js +0 -1
- package/legacy/models/gridSlotsComponent.js +0 -1
- package/legacy/models/gridSlotsComponentsProps.js +0 -1
- package/legacy/models/gridSortModel.js +0 -1
- package/legacy/models/gridStateCommunity.js +0 -1
- package/legacy/models/index.js +0 -29
- package/legacy/models/logger.js +0 -1
- package/legacy/models/muiEvent.js +0 -1
- package/legacy/models/params/gridCellParams.js +0 -1
- package/legacy/models/params/gridColumnGroupHeaderParams.js +0 -1
- package/legacy/models/params/gridColumnHeaderParams.js +0 -1
- package/legacy/models/params/gridColumnOrderChangeParams.js +0 -1
- package/legacy/models/params/gridColumnResizeParams.js +0 -1
- package/legacy/models/params/gridEditCellParams.js +0 -27
- package/legacy/models/params/gridHeaderSelectionCheckboxParams.js +0 -1
- package/legacy/models/params/gridMenuParams.js +0 -1
- package/legacy/models/params/gridPreferencePanelParams.js +0 -1
- package/legacy/models/params/gridRowParams.js +0 -44
- package/legacy/models/params/gridRowSelectionCheckboxParams.js +0 -1
- package/legacy/models/params/gridScrollParams.js +0 -1
- package/legacy/models/params/gridValueOptionsParams.js +0 -1
- package/legacy/models/params/index.js +0 -13
- package/legacy/models/props/DataGridProps.js +0 -1
- package/legacy/themeAugmentation/index.js +0 -4
- package/legacy/themeAugmentation/overrides.js +0 -1
- package/legacy/themeAugmentation/props.js +0 -1
- package/legacy/utils/EventManager.js +0 -91
- package/legacy/utils/Store.js +0 -34
- package/legacy/utils/cleanupTracking/CleanupTracking.js +0 -1
- package/legacy/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +0 -29
- package/legacy/utils/cleanupTracking/TimerBasedCleanupTracking.js +0 -52
- package/legacy/utils/createControllablePromise.js +0 -11
- package/legacy/utils/createSelector.js +0 -120
- package/legacy/utils/doesSupportPreventScroll.js +0 -13
- package/legacy/utils/domUtils.js +0 -49
- package/legacy/utils/exportAs.js +0 -40
- package/legacy/utils/fastMemo.js +0 -5
- package/legacy/utils/fastObjectShallowCompare.js +0 -32
- package/legacy/utils/getGridLocalization.js +0 -15
- package/legacy/utils/getPublicApiRef.js +0 -5
- package/legacy/utils/index.js +0 -1
- package/legacy/utils/keyboardUtils.js +0 -60
- package/legacy/utils/utils.js +0 -189
- package/legacy/utils/warning.js +0 -25
|
@@ -27,11 +27,10 @@ var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelecto
|
|
|
27
27
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
28
28
|
var _gridColumnGroupsSelector = require("../hooks/features/columnGrouping/gridColumnGroupsSelector");
|
|
29
29
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
30
|
-
var _utils2 = require("../utils/utils");
|
|
31
30
|
var _GridCell = require("./cell/GridCell");
|
|
32
31
|
var _GridScrollbarFillerCell = require("./GridScrollbarFillerCell");
|
|
33
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
34
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "
|
|
33
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
35
34
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
36
35
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
37
36
|
const useUtilityClasses = ownerState => {
|
|
@@ -73,16 +72,14 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
73
72
|
rowHeight,
|
|
74
73
|
className,
|
|
75
74
|
visibleColumns,
|
|
76
|
-
renderedColumns,
|
|
77
75
|
pinnedColumns,
|
|
78
|
-
|
|
76
|
+
offsetLeft,
|
|
79
77
|
dimensions,
|
|
80
|
-
|
|
78
|
+
renderContext,
|
|
79
|
+
focusedColumnIndex,
|
|
81
80
|
isFirstVisible,
|
|
82
81
|
isLastVisible,
|
|
83
|
-
focusedCellColumnIndexNotInRange,
|
|
84
82
|
isNotVisible,
|
|
85
|
-
focusedCell,
|
|
86
83
|
onClick,
|
|
87
84
|
onDoubleClick,
|
|
88
85
|
onMouseEnter,
|
|
@@ -103,6 +100,9 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
103
100
|
const handleRef = (0, _utils.unstable_useForkRef)(ref, refProp);
|
|
104
101
|
const rowNode = apiRef.current.getRowNode(rowId);
|
|
105
102
|
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
103
|
+
const hasFocusCell = focusedColumnIndex !== undefined;
|
|
104
|
+
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
|
|
105
|
+
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
|
|
106
106
|
const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
|
|
107
107
|
|
|
108
108
|
const ownerState = {
|
|
@@ -251,12 +251,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
251
251
|
});
|
|
252
252
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
253
253
|
}
|
|
254
|
-
const randomNumber = (0, _utils2.randomNumberBetween)(10000, 20, 80);
|
|
255
254
|
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = _GridCell.PinnedPosition.NONE) => {
|
|
256
255
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
257
|
-
if (
|
|
256
|
+
if (cellColSpanInfo?.spannedByColSpan) {
|
|
258
257
|
return null;
|
|
259
258
|
}
|
|
259
|
+
const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;
|
|
260
|
+
const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;
|
|
260
261
|
let pinnedOffset;
|
|
261
262
|
// FIXME: Why is the switch check exhaustiveness not validated with typescript-eslint?
|
|
262
263
|
// eslint-disable-next-line default-case
|
|
@@ -268,25 +269,18 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
268
269
|
pinnedOffset = dimensions.columnsTotalWidth - columnPositions[indexRelativeToAllColumns] - column.computedWidth + scrollbarWidth;
|
|
269
270
|
break;
|
|
270
271
|
case _GridCell.PinnedPosition.NONE:
|
|
272
|
+
case _GridCell.PinnedPosition.VIRTUAL:
|
|
271
273
|
pinnedOffset = 0;
|
|
272
274
|
break;
|
|
273
275
|
}
|
|
274
276
|
if (rowNode?.type === 'skeletonRow') {
|
|
275
|
-
const {
|
|
276
|
-
width
|
|
277
|
-
} = cellColSpanInfo.cellProps;
|
|
278
|
-
const contentWidth = Math.round(randomNumber());
|
|
279
277
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(slots.skeletonCell, {
|
|
280
278
|
width: width,
|
|
281
|
-
|
|
279
|
+
height: rowHeight,
|
|
282
280
|
field: column.field,
|
|
283
281
|
align: column.align ?? 'left'
|
|
284
282
|
}, column.field);
|
|
285
283
|
}
|
|
286
|
-
const {
|
|
287
|
-
colSpan,
|
|
288
|
-
width
|
|
289
|
-
} = cellColSpanInfo.cellProps;
|
|
290
284
|
const editCellState = editRowsState[rowId]?.[column.field] ?? null;
|
|
291
285
|
|
|
292
286
|
// when the cell is a reorder cell we are not allowing to reorder the col
|
|
@@ -296,10 +290,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
296
290
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
297
291
|
const canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;
|
|
298
292
|
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
299
|
-
|
|
300
|
-
if (focusedCellColumnIndexNotInRange !== undefined && visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
|
|
301
|
-
cellIsNotVisible = true;
|
|
302
|
-
}
|
|
293
|
+
const cellIsNotVisible = pinnedPosition === _GridCell.PinnedPosition.VIRTUAL;
|
|
303
294
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(slots.cell, (0, _extends2.default)({
|
|
304
295
|
column: column,
|
|
305
296
|
width: width,
|
|
@@ -335,18 +326,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
335
326
|
});
|
|
336
327
|
const middleColumnsLength = visibleColumns.length - pinnedColumns.left.length - pinnedColumns.right.length;
|
|
337
328
|
const cells = [];
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const indexInSection = indexRelativeToAllColumns - pinnedColumns.left.length;
|
|
349
|
-
cells.push(getCell(column, indexInSection, indexRelativeToAllColumns, middleColumnsLength));
|
|
329
|
+
if (hasVirtualFocusCellLeft) {
|
|
330
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, _GridCell.PinnedPosition.VIRTUAL));
|
|
331
|
+
}
|
|
332
|
+
for (let i = renderContext.firstColumnIndex; i < renderContext.lastColumnIndex; i += 1) {
|
|
333
|
+
const column = visibleColumns[i];
|
|
334
|
+
const indexInSection = i - pinnedColumns.left.length;
|
|
335
|
+
cells.push(getCell(column, indexInSection, i, middleColumnsLength));
|
|
336
|
+
}
|
|
337
|
+
if (hasVirtualFocusCellRight) {
|
|
338
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, _GridCell.PinnedPosition.VIRTUAL));
|
|
350
339
|
}
|
|
351
340
|
const eventHandlers = row ? {
|
|
352
341
|
onClick: publishClick,
|
|
@@ -372,7 +361,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
372
361
|
role: "presentation",
|
|
373
362
|
className: _gridClasses.gridClasses.cellOffsetLeft,
|
|
374
363
|
style: {
|
|
375
|
-
width:
|
|
364
|
+
width: offsetLeft
|
|
376
365
|
}
|
|
377
366
|
}), cells, emptyCellWidth > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyCell, {
|
|
378
367
|
width: emptyCellWidth
|
|
@@ -426,13 +415,11 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
426
415
|
width: _propTypes.default.number.isRequired
|
|
427
416
|
}).isRequired
|
|
428
417
|
}).isRequired,
|
|
429
|
-
firstColumnToRender: _propTypes.default.number.isRequired,
|
|
430
418
|
/**
|
|
431
419
|
* Determines which cell has focus.
|
|
432
420
|
* If `null`, no cell in this row has focus.
|
|
433
421
|
*/
|
|
434
|
-
|
|
435
|
-
focusedCellColumnIndexNotInRange: _propTypes.default.number,
|
|
422
|
+
focusedColumnIndex: _propTypes.default.number,
|
|
436
423
|
/**
|
|
437
424
|
* Index of the row in the whole sorted and filtered dataset.
|
|
438
425
|
* If some rows above have expanded children, this index also take those children into account.
|
|
@@ -440,19 +427,21 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
440
427
|
index: _propTypes.default.number.isRequired,
|
|
441
428
|
isFirstVisible: _propTypes.default.bool.isRequired,
|
|
442
429
|
isLastVisible: _propTypes.default.bool.isRequired,
|
|
443
|
-
isNotVisible: _propTypes.default.bool,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
left: _propTypes.default.number.isRequired,
|
|
447
|
-
top: _propTypes.default.number.isRequired
|
|
448
|
-
}).isRequired,
|
|
430
|
+
isNotVisible: _propTypes.default.bool.isRequired,
|
|
431
|
+
offsetLeft: _propTypes.default.number.isRequired,
|
|
432
|
+
offsetTop: _propTypes.default.number,
|
|
449
433
|
onClick: _propTypes.default.func,
|
|
450
434
|
onDoubleClick: _propTypes.default.func,
|
|
451
435
|
onMouseEnter: _propTypes.default.func,
|
|
452
436
|
onMouseLeave: _propTypes.default.func,
|
|
453
437
|
pinnedColumns: _propTypes.default.object.isRequired,
|
|
454
|
-
|
|
455
|
-
|
|
438
|
+
renderContext: _propTypes.default.shape({
|
|
439
|
+
firstColumnIndex: _propTypes.default.number.isRequired,
|
|
440
|
+
firstRowIndex: _propTypes.default.number.isRequired,
|
|
441
|
+
lastColumnIndex: _propTypes.default.number.isRequired,
|
|
442
|
+
lastRowIndex: _propTypes.default.number.isRequired
|
|
443
|
+
}).isRequired,
|
|
444
|
+
row: _propTypes.default.object.isRequired,
|
|
456
445
|
rowHeight: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]).isRequired,
|
|
457
446
|
rowId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
458
447
|
selected: _propTypes.default.bool.isRequired,
|
|
@@ -7,37 +7,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GridScrollbarFillerCell = GridScrollbarFillerCell;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
10
|
var _constants = require("../constants");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
14
|
const classes = {
|
|
16
|
-
root:
|
|
17
|
-
header:
|
|
18
|
-
borderTop:
|
|
19
|
-
pinnedRight:
|
|
15
|
+
root: _constants.gridClasses.scrollbarFiller,
|
|
16
|
+
header: _constants.gridClasses['scrollbarFiller--header'],
|
|
17
|
+
borderTop: _constants.gridClasses['scrollbarFiller--borderTop'],
|
|
18
|
+
pinnedRight: _constants.gridClasses['scrollbarFiller--pinnedRight']
|
|
20
19
|
};
|
|
21
|
-
const Style = (0, _styles.styled)('div')({
|
|
22
|
-
minWidth: 'calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',
|
|
23
|
-
alignSelf: 'stretch',
|
|
24
|
-
[`&.${classes.borderTop}`]: {
|
|
25
|
-
borderTop: '1px solid var(--DataGrid-rowBorderColor)'
|
|
26
|
-
},
|
|
27
|
-
[`&.${classes.pinnedRight}`]: {
|
|
28
|
-
backgroundColor: 'var(--DataGrid-pinnedBackground)'
|
|
29
|
-
},
|
|
30
|
-
[`&.${classes.pinnedRight}:not(.${classes.header})`]: {
|
|
31
|
-
position: 'sticky',
|
|
32
|
-
right: 0
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
20
|
function GridScrollbarFillerCell({
|
|
36
21
|
header,
|
|
37
22
|
borderTop = true,
|
|
38
23
|
pinnedRight
|
|
39
24
|
}) {
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
26
|
role: "presentation",
|
|
42
27
|
className: (0, _clsx.default)(classes.root, header && classes.header, borderTop && classes.borderTop, pinnedRight && classes.pinnedRight)
|
|
43
28
|
});
|
|
@@ -29,6 +29,7 @@ let PinnedPosition = exports.PinnedPosition = /*#__PURE__*/function (PinnedPosit
|
|
|
29
29
|
PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
|
|
30
30
|
PinnedPosition[PinnedPosition["LEFT"] = 1] = "LEFT";
|
|
31
31
|
PinnedPosition[PinnedPosition["RIGHT"] = 2] = "RIGHT";
|
|
32
|
+
PinnedPosition[PinnedPosition["VIRTUAL"] = 3] = "VIRTUAL";
|
|
32
33
|
return PinnedPosition;
|
|
33
34
|
}({});
|
|
34
35
|
const EMPTY_CELL_PARAMS = {
|
|
@@ -67,8 +68,7 @@ const useUtilityClasses = ownerState => {
|
|
|
67
68
|
classes
|
|
68
69
|
} = ownerState;
|
|
69
70
|
const slots = {
|
|
70
|
-
root: ['cell', `cell--text${(0, _utils.unstable_capitalize)(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
|
|
71
|
-
content: ['cellContent']
|
|
71
|
+
root: ['cell', `cell--text${(0, _utils.unstable_capitalize)(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
|
|
72
72
|
};
|
|
73
73
|
return (0, _utils.unstable_composeClasses)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
74
74
|
};
|
|
@@ -141,13 +141,19 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
141
141
|
classes: rootClasses,
|
|
142
142
|
getCellClassName
|
|
143
143
|
} = rootProps;
|
|
144
|
-
|
|
144
|
+
|
|
145
|
+
// There is a hidden grid state access in `applyPipeProcessor('cellClassName', ...)`
|
|
146
|
+
const pipesClassName = (0, _useGridSelector.useGridSelector)(apiRef, () => apiRef.current.unstable_applyPipeProcessors('cellClassName', [], {
|
|
145
147
|
id: rowId,
|
|
146
148
|
field
|
|
147
|
-
});
|
|
149
|
+
}).filter(Boolean).join(' '));
|
|
150
|
+
const classNames = [pipesClassName];
|
|
148
151
|
if (column.cellClassName) {
|
|
149
152
|
classNames.push(typeof column.cellClassName === 'function' ? column.cellClassName(cellParamsWithAPI) : column.cellClassName);
|
|
150
153
|
}
|
|
154
|
+
if (column.display === 'flex') {
|
|
155
|
+
classNames.push(_gridClasses.gridClasses['cell--flex']);
|
|
156
|
+
}
|
|
151
157
|
if (getCellClassName) {
|
|
152
158
|
classNames.push(getCellClassName(cellParamsWithAPI));
|
|
153
159
|
}
|
|
@@ -256,12 +262,11 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
256
262
|
};
|
|
257
263
|
}
|
|
258
264
|
let children;
|
|
259
|
-
|
|
265
|
+
let title;
|
|
266
|
+
if (editCellState === null && column.renderCell) {
|
|
260
267
|
children = column.renderCell(cellParamsWithAPI);
|
|
261
|
-
classNames.push(_gridClasses.gridClasses['cell--withRenderer']);
|
|
262
|
-
classNames.push(rootClasses?.['cell--withRenderer']);
|
|
263
268
|
}
|
|
264
|
-
if (editCellState
|
|
269
|
+
if (editCellState !== null && column.renderEditCell) {
|
|
265
270
|
const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
|
|
266
271
|
|
|
267
272
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -275,12 +280,8 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
275
280
|
}
|
|
276
281
|
if (children === undefined) {
|
|
277
282
|
const valueString = valueToRender?.toString();
|
|
278
|
-
children =
|
|
279
|
-
|
|
280
|
-
title: valueString,
|
|
281
|
-
role: "presentation",
|
|
282
|
-
children: valueString
|
|
283
|
-
});
|
|
283
|
+
children = valueString;
|
|
284
|
+
title = valueString;
|
|
284
285
|
}
|
|
285
286
|
if ( /*#__PURE__*/React.isValidElement(children) && canManageOwnFocus) {
|
|
286
287
|
children = /*#__PURE__*/React.cloneElement(children, {
|
|
@@ -300,6 +301,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
300
301
|
"aria-colindex": colIndex + 1,
|
|
301
302
|
"aria-colspan": colSpan,
|
|
302
303
|
style: style,
|
|
304
|
+
title: title,
|
|
303
305
|
tabIndex: tabIndex,
|
|
304
306
|
onClick: publish('cellClick', onClick),
|
|
305
307
|
onDoubleClick: publish('cellDoubleClick', onDoubleClick),
|
|
@@ -341,7 +343,7 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
341
343
|
onMouseDown: _propTypes.default.func,
|
|
342
344
|
onMouseUp: _propTypes.default.func,
|
|
343
345
|
pinnedOffset: _propTypes.default.number.isRequired,
|
|
344
|
-
pinnedPosition: _propTypes.default.oneOf([0, 1, 2]).isRequired,
|
|
346
|
+
pinnedPosition: _propTypes.default.oneOf([0, 1, 2, 3]).isRequired,
|
|
345
347
|
rowId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
346
348
|
sectionIndex: _propTypes.default.number.isRequired,
|
|
347
349
|
sectionLength: _propTypes.default.number.isRequired,
|
|
@@ -4,19 +4,22 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.GridSkeletonCell =
|
|
7
|
+
exports.GridSkeletonCell = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
13
13
|
var _utils = require("@mui/utils");
|
|
14
|
+
var _fastMemo = require("../../utils/fastMemo");
|
|
15
|
+
var _utils2 = require("../../utils/utils");
|
|
14
16
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
15
17
|
var _gridClasses = require("../../constants/gridClasses");
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["field", "align", "width", "
|
|
19
|
+
const _excluded = ["field", "align", "width", "height"];
|
|
18
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
const randomWidth = (0, _utils2.randomNumberBetween)(10000, 20, 80);
|
|
20
23
|
const useUtilityClasses = ownerState => {
|
|
21
24
|
const {
|
|
22
25
|
align,
|
|
@@ -31,7 +34,7 @@ function GridSkeletonCell(props) {
|
|
|
31
34
|
const {
|
|
32
35
|
align,
|
|
33
36
|
width,
|
|
34
|
-
|
|
37
|
+
height
|
|
35
38
|
} = props,
|
|
36
39
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
37
40
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
@@ -40,14 +43,18 @@ function GridSkeletonCell(props) {
|
|
|
40
43
|
align
|
|
41
44
|
};
|
|
42
45
|
const classes = useUtilityClasses(ownerState);
|
|
46
|
+
const contentWidth = Math.round(randomWidth());
|
|
43
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
|
|
44
48
|
className: classes.root,
|
|
45
49
|
style: {
|
|
46
|
-
|
|
50
|
+
height,
|
|
51
|
+
maxWidth: width,
|
|
52
|
+
minWidth: width
|
|
47
53
|
}
|
|
48
54
|
}, other, {
|
|
49
55
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, {
|
|
50
|
-
width: `${contentWidth}
|
|
56
|
+
width: `${contentWidth}%`,
|
|
57
|
+
height: 25
|
|
51
58
|
})
|
|
52
59
|
}));
|
|
53
60
|
}
|
|
@@ -57,7 +64,8 @@ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
|
|
|
57
64
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
58
65
|
// ----------------------------------------------------------------------
|
|
59
66
|
align: _propTypes.default.string.isRequired,
|
|
60
|
-
contentWidth: _propTypes.default.number.isRequired,
|
|
61
67
|
field: _propTypes.default.string.isRequired,
|
|
68
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]).isRequired,
|
|
62
69
|
width: _propTypes.default.number.isRequired
|
|
63
|
-
} : void 0;
|
|
70
|
+
} : void 0;
|
|
71
|
+
const Memoized = exports.GridSkeletonCell = (0, _fastMemo.fastMemo)(GridSkeletonCell);
|
|
@@ -10,7 +10,6 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _utils = require("@mui/utils");
|
|
13
|
-
var _keyboardUtils = require("../../utils/keyboardUtils");
|
|
14
13
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
15
14
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
16
15
|
var _gridClasses = require("../../constants/gridClasses");
|
|
@@ -46,7 +45,6 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = /*#__PUR
|
|
|
46
45
|
const checkboxElement = React.useRef(null);
|
|
47
46
|
const rippleRef = React.useRef(null);
|
|
48
47
|
const handleRef = (0, _utils.unstable_useForkRef)(checkboxElement, ref);
|
|
49
|
-
const element = apiRef.current.getCellElement(id, field);
|
|
50
48
|
const handleChange = event => {
|
|
51
49
|
const params = {
|
|
52
50
|
value: event.target.checked,
|
|
@@ -55,10 +53,13 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = /*#__PUR
|
|
|
55
53
|
apiRef.current.publishEvent('rowSelectionCheckboxChange', params, event);
|
|
56
54
|
};
|
|
57
55
|
React.useLayoutEffect(() => {
|
|
58
|
-
if (tabIndex === 0
|
|
59
|
-
element
|
|
56
|
+
if (tabIndex === 0) {
|
|
57
|
+
const element = apiRef.current.getCellElement(id, field);
|
|
58
|
+
if (element) {
|
|
59
|
+
element.tabIndex = -1;
|
|
60
|
+
}
|
|
60
61
|
}
|
|
61
|
-
}, [
|
|
62
|
+
}, [apiRef, tabIndex, id, field]);
|
|
62
63
|
React.useEffect(() => {
|
|
63
64
|
if (hasFocus) {
|
|
64
65
|
const input = checkboxElement.current?.querySelector('input');
|
|
@@ -71,7 +72,7 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = /*#__PUR
|
|
|
71
72
|
}
|
|
72
73
|
}, [hasFocus]);
|
|
73
74
|
const handleKeyDown = React.useCallback(event => {
|
|
74
|
-
if (
|
|
75
|
+
if (event.key === ' ') {
|
|
75
76
|
// We call event.stopPropagation to avoid selecting the row and also scrolling to bottom
|
|
76
77
|
// TODO: Remove and add a check inside useGridKeyboardNavigation
|
|
77
78
|
event.stopPropagation();
|
|
@@ -161,7 +161,7 @@ function GridColumnsManagement(props) {
|
|
|
161
161
|
ownerState: rootProps,
|
|
162
162
|
children: apiRef.current.getLocaleText('columnsManagementNoColumns')
|
|
163
163
|
})]
|
|
164
|
-
}), !disableShowHideToggle
|
|
164
|
+
}), (!disableShowHideToggle || !disableResetButton) && currentColumns.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridColumnsManagementFooter, {
|
|
165
165
|
ownerState: rootProps,
|
|
166
166
|
className: classes.footer,
|
|
167
167
|
children: [!disableShowHideToggle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel.default, {
|
|
@@ -54,6 +54,8 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
54
54
|
[`&.${_gridClasses.gridClasses.autosizing}`]: styles.autosizing
|
|
55
55
|
}, {
|
|
56
56
|
[`& .${_gridClasses.gridClasses.editBooleanCell}`]: styles.editBooleanCell
|
|
57
|
+
}, {
|
|
58
|
+
[`& .${_gridClasses.gridClasses.cell}`]: styles.cell
|
|
57
59
|
}, {
|
|
58
60
|
[`& .${_gridClasses.gridClasses['cell--editing']}`]: styles['cell--editing']
|
|
59
61
|
}, {
|
|
@@ -62,12 +64,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
62
64
|
[`& .${_gridClasses.gridClasses['cell--textLeft']}`]: styles['cell--textLeft']
|
|
63
65
|
}, {
|
|
64
66
|
[`& .${_gridClasses.gridClasses['cell--textRight']}`]: styles['cell--textRight']
|
|
65
|
-
},
|
|
66
|
-
// TODO v6: Remove
|
|
67
|
-
{
|
|
68
|
-
[`& .${_gridClasses.gridClasses['cell--withRenderer']}`]: styles['cell--withRenderer']
|
|
69
|
-
}, {
|
|
70
|
-
[`& .${_gridClasses.gridClasses.cell}`]: styles.cell
|
|
71
67
|
}, {
|
|
72
68
|
[`& .${_gridClasses.gridClasses['cell--rangeTop']}`]: styles['cell--rangeTop']
|
|
73
69
|
}, {
|
|
@@ -78,8 +74,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
78
74
|
[`& .${_gridClasses.gridClasses['cell--rangeRight']}`]: styles['cell--rangeRight']
|
|
79
75
|
}, {
|
|
80
76
|
[`& .${_gridClasses.gridClasses['cell--withRightBorder']}`]: styles['cell--withRightBorder']
|
|
81
|
-
}, {
|
|
82
|
-
[`& .${_gridClasses.gridClasses.cellContent}`]: styles.cellContent
|
|
83
77
|
}, {
|
|
84
78
|
[`& .${_gridClasses.gridClasses.cellCheckbox}`]: styles.cellCheckbox
|
|
85
79
|
}, {
|
|
@@ -242,9 +236,21 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
242
236
|
[`& .${_gridClasses.gridClasses.columnHeaderTitleContainerContent} > *`]: {
|
|
243
237
|
overflow: 'visible !important'
|
|
244
238
|
},
|
|
245
|
-
|
|
239
|
+
'@media (hover: hover)': {
|
|
240
|
+
[`& .${_gridClasses.gridClasses.iconButtonContainer}`]: {
|
|
241
|
+
width: '0 !important',
|
|
242
|
+
visibility: 'hidden !important'
|
|
243
|
+
},
|
|
244
|
+
[`& .${_gridClasses.gridClasses.menuIcon}`]: {
|
|
245
|
+
width: '0 !important',
|
|
246
|
+
visibility: 'hidden !important'
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
[`& .${_gridClasses.gridClasses.cell}`]: {
|
|
246
250
|
overflow: 'visible !important',
|
|
247
|
-
whiteSpace: 'nowrap'
|
|
251
|
+
whiteSpace: 'nowrap',
|
|
252
|
+
minWidth: 'max-content !important',
|
|
253
|
+
maxWidth: 'max-content !important'
|
|
248
254
|
},
|
|
249
255
|
[`& .${_gridClasses.gridClasses.groupingCriteriaCell}`]: {
|
|
250
256
|
width: 'unset'
|
|
@@ -342,7 +348,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
342
348
|
[`& .${_gridClasses.gridClasses.columnSeparator}`]: {
|
|
343
349
|
visibility: 'hidden',
|
|
344
350
|
position: 'absolute',
|
|
345
|
-
zIndex:
|
|
351
|
+
zIndex: 3,
|
|
346
352
|
display: 'flex',
|
|
347
353
|
flexDirection: 'column',
|
|
348
354
|
justifyContent: 'center',
|
|
@@ -436,15 +442,19 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
436
442
|
},
|
|
437
443
|
/* Cell styles */
|
|
438
444
|
[`& .${_gridClasses.gridClasses.cell}`]: {
|
|
439
|
-
display: 'flex',
|
|
440
|
-
alignItems: 'center',
|
|
441
445
|
height: 'var(--height)',
|
|
442
446
|
minWidth: 'var(--width)',
|
|
443
447
|
maxWidth: 'var(--width)',
|
|
448
|
+
lineHeight: 'calc(var(--height) - 1px)',
|
|
449
|
+
// -1px for the border
|
|
450
|
+
|
|
444
451
|
'--width': '0px',
|
|
445
452
|
'--height': '0px',
|
|
446
453
|
boxSizing: 'border-box',
|
|
447
454
|
borderTop: `1px solid var(--rowBorderColor)`,
|
|
455
|
+
overflow: 'hidden',
|
|
456
|
+
whiteSpace: 'nowrap',
|
|
457
|
+
textOverflow: 'ellipsis',
|
|
448
458
|
'&.Mui-selected': selectedStyles
|
|
449
459
|
},
|
|
450
460
|
[`& .${_gridClasses.gridClasses['virtualScrollerContent--overflowed']} .${_gridClasses.gridClasses['row--lastVisible']} .${_gridClasses.gridClasses.cell}`]: {
|
|
@@ -453,12 +463,14 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
453
463
|
[`&.${_gridClasses.gridClasses['root--disableUserSelection']} .${_gridClasses.gridClasses.cell}`]: {
|
|
454
464
|
userSelect: 'none'
|
|
455
465
|
},
|
|
456
|
-
[`& .${_gridClasses.gridClasses
|
|
457
|
-
overflow: '
|
|
458
|
-
whiteSpace: '
|
|
466
|
+
[`& .${_gridClasses.gridClasses['row--dynamicHeight']} > .${_gridClasses.gridClasses.cell}`]: {
|
|
467
|
+
overflow: 'initial',
|
|
468
|
+
whiteSpace: 'initial',
|
|
469
|
+
lineHeight: 'inherit'
|
|
459
470
|
},
|
|
460
471
|
[`& .${_gridClasses.gridClasses.cellEmpty}`]: {
|
|
461
|
-
padding: 0
|
|
472
|
+
padding: 0,
|
|
473
|
+
height: 'unset'
|
|
462
474
|
},
|
|
463
475
|
[`& .${_gridClasses.gridClasses.cell}.${_gridClasses.gridClasses['cell--selectionMode']}`]: {
|
|
464
476
|
cursor: 'default'
|
|
@@ -473,10 +485,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
473
485
|
outlineOffset: '-1px'
|
|
474
486
|
}
|
|
475
487
|
},
|
|
476
|
-
[`& .${_gridClasses.gridClasses.cellContent}`]: {
|
|
477
|
-
overflow: 'hidden',
|
|
478
|
-
textOverflow: 'ellipsis'
|
|
479
|
-
},
|
|
480
488
|
[`& .${_gridClasses.gridClasses['row--editing']}`]: {
|
|
481
489
|
boxShadow: t.shadows[2]
|
|
482
490
|
},
|
|
@@ -515,6 +523,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
515
523
|
},
|
|
516
524
|
[`& .${_gridClasses.gridClasses.rowReorderCellContainer}`]: {
|
|
517
525
|
padding: 0,
|
|
526
|
+
display: 'flex',
|
|
518
527
|
alignItems: 'stretch'
|
|
519
528
|
},
|
|
520
529
|
[`.${_gridClasses.gridClasses.withBorderColor}`]: {
|
|
@@ -534,13 +543,21 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
534
543
|
borderRightWidth: '1px',
|
|
535
544
|
borderRightStyle: 'solid'
|
|
536
545
|
},
|
|
546
|
+
[`& .${_gridClasses.gridClasses['cell--flex']}`]: {
|
|
547
|
+
display: 'flex',
|
|
548
|
+
alignItems: 'center',
|
|
549
|
+
lineHeight: 'inherit'
|
|
550
|
+
},
|
|
537
551
|
[`& .${_gridClasses.gridClasses['cell--textLeft']}`]: {
|
|
552
|
+
textAlign: 'left',
|
|
538
553
|
justifyContent: 'flex-start'
|
|
539
554
|
},
|
|
540
555
|
[`& .${_gridClasses.gridClasses['cell--textRight']}`]: {
|
|
556
|
+
textAlign: 'right',
|
|
541
557
|
justifyContent: 'flex-end'
|
|
542
558
|
},
|
|
543
559
|
[`& .${_gridClasses.gridClasses['cell--textCenter']}`]: {
|
|
560
|
+
textAlign: 'center',
|
|
544
561
|
justifyContent: 'center'
|
|
545
562
|
},
|
|
546
563
|
[`& .${_gridClasses.gridClasses['cell--pinnedLeft']}, & .${_gridClasses.gridClasses['cell--pinnedRight']}`]: {
|
|
@@ -569,6 +586,12 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
569
586
|
flex: '0 0 auto',
|
|
570
587
|
display: 'inline-block'
|
|
571
588
|
},
|
|
589
|
+
[`& .${_gridClasses.gridClasses.cellSkeleton}`]: {
|
|
590
|
+
flex: '0 0 auto',
|
|
591
|
+
height: '100%',
|
|
592
|
+
display: 'inline-flex',
|
|
593
|
+
alignItems: 'center'
|
|
594
|
+
},
|
|
572
595
|
[`& .${_gridClasses.gridClasses.columnHeaderDraggableContainer}`]: {
|
|
573
596
|
display: 'flex',
|
|
574
597
|
width: '100%',
|
|
@@ -611,6 +634,21 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
611
634
|
flex: '0 0 28px',
|
|
612
635
|
alignSelf: 'stretch',
|
|
613
636
|
marginRight: t.spacing(2)
|
|
637
|
+
},
|
|
638
|
+
/* ScrollbarFiller styles */
|
|
639
|
+
[`.${_gridClasses.gridClasses.scrollbarFiller}`]: {
|
|
640
|
+
minWidth: 'calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',
|
|
641
|
+
alignSelf: 'stretch',
|
|
642
|
+
[`&.${_gridClasses.gridClasses['scrollbarFiller--borderTop']}`]: {
|
|
643
|
+
borderTop: '1px solid var(--DataGrid-rowBorderColor)'
|
|
644
|
+
},
|
|
645
|
+
[`&.${_gridClasses.gridClasses['scrollbarFiller--pinnedRight']}`]: {
|
|
646
|
+
backgroundColor: 'var(--DataGrid-pinnedBackground)'
|
|
647
|
+
},
|
|
648
|
+
[`&.${_gridClasses.gridClasses['scrollbarFiller--pinnedRight']}:not(.${_gridClasses.gridClasses['scrollbarFiller--header']})`]: {
|
|
649
|
+
position: 'sticky',
|
|
650
|
+
right: 0
|
|
651
|
+
}
|
|
614
652
|
}
|
|
615
653
|
});
|
|
616
654
|
return gridStyle;
|
|
@@ -60,8 +60,14 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
60
60
|
if (!Array.isArray(item.value)) {
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
|
-
return item.value
|
|
64
|
-
|
|
63
|
+
return item.value.reduce((acc, value) => {
|
|
64
|
+
const resolvedValue = resolvedValueOptions.find(v => getOptionValue(v) === value);
|
|
65
|
+
if (resolvedValue != null) {
|
|
66
|
+
acc.push(resolvedValue);
|
|
67
|
+
}
|
|
68
|
+
return acc;
|
|
69
|
+
}, []);
|
|
70
|
+
}, [getOptionValue, item.value, resolvedValueOptions]);
|
|
65
71
|
const handleChange = React.useCallback((event, value) => {
|
|
66
72
|
applyValue((0, _extends2.default)({}, item, {
|
|
67
73
|
value: value.map(getOptionValue)
|
|
@@ -22,7 +22,7 @@ const useUtilityClasses = () => {
|
|
|
22
22
|
};
|
|
23
23
|
const Element = (0, _system.styled)('div')({
|
|
24
24
|
position: 'sticky',
|
|
25
|
-
zIndex:
|
|
25
|
+
zIndex: 4,
|
|
26
26
|
bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'
|
|
27
27
|
});
|
|
28
28
|
function GridBottomContainer(props) {
|