@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
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
9
|
-
import { styled } from '@mui/material/styles';
|
|
10
|
-
import { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from '../../hooks/features/columns/gridColumnsSelector';
|
|
11
|
-
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
12
|
-
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
13
|
-
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
14
|
-
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
15
|
-
import { useLazyRef } from '../../hooks/utils/useLazyRef';
|
|
16
|
-
import { checkColumnVisibilityModelsSame, defaultSearchPredicate } from './utils';
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
-
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
20
|
-
var classes = ownerState.classes;
|
|
21
|
-
var slots = {
|
|
22
|
-
root: ['columnsManagement'],
|
|
23
|
-
header: ['columnsManagementHeader'],
|
|
24
|
-
footer: ['columnsManagementFooter'],
|
|
25
|
-
row: ['columnsManagementRow']
|
|
26
|
-
};
|
|
27
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
28
|
-
};
|
|
29
|
-
var collator = new Intl.Collator();
|
|
30
|
-
function GridColumnsManagement(props) {
|
|
31
|
-
var _rootProps$slotProps, _rootProps$slotProps3, _rootProps$slotProps4;
|
|
32
|
-
var apiRef = useGridApiContext();
|
|
33
|
-
var searchInputRef = React.useRef(null);
|
|
34
|
-
var columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
|
35
|
-
var initialColumnVisibilityModel = useLazyRef(function () {
|
|
36
|
-
return gridColumnVisibilityModelSelector(apiRef);
|
|
37
|
-
}).current;
|
|
38
|
-
var columnVisibilityModel = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
39
|
-
var rootProps = useGridRootProps();
|
|
40
|
-
var _React$useState = React.useState(''),
|
|
41
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42
|
-
searchValue = _React$useState2[0],
|
|
43
|
-
setSearchValue = _React$useState2[1];
|
|
44
|
-
var classes = useUtilityClasses(rootProps);
|
|
45
|
-
var sort = props.sort,
|
|
46
|
-
_props$searchPredicat = props.searchPredicate,
|
|
47
|
-
searchPredicate = _props$searchPredicat === void 0 ? defaultSearchPredicate : _props$searchPredicat,
|
|
48
|
-
_props$autoFocusSearc = props.autoFocusSearchField,
|
|
49
|
-
autoFocusSearchField = _props$autoFocusSearc === void 0 ? true : _props$autoFocusSearc,
|
|
50
|
-
_props$disableShowHid = props.disableShowHideToggle,
|
|
51
|
-
disableShowHideToggle = _props$disableShowHid === void 0 ? false : _props$disableShowHid,
|
|
52
|
-
_props$disableResetBu = props.disableResetButton,
|
|
53
|
-
disableResetButton = _props$disableResetBu === void 0 ? false : _props$disableResetBu,
|
|
54
|
-
_props$toggleAllMode = props.toggleAllMode,
|
|
55
|
-
toggleAllMode = _props$toggleAllMode === void 0 ? 'all' : _props$toggleAllMode,
|
|
56
|
-
getTogglableColumns = props.getTogglableColumns;
|
|
57
|
-
var isResetDisabled = React.useMemo(function () {
|
|
58
|
-
return checkColumnVisibilityModelsSame(columnVisibilityModel, initialColumnVisibilityModel);
|
|
59
|
-
}, [columnVisibilityModel, initialColumnVisibilityModel]);
|
|
60
|
-
var sortedColumns = React.useMemo(function () {
|
|
61
|
-
switch (sort) {
|
|
62
|
-
case 'asc':
|
|
63
|
-
return _toConsumableArray(columns).sort(function (a, b) {
|
|
64
|
-
return collator.compare(a.headerName || a.field, b.headerName || b.field);
|
|
65
|
-
});
|
|
66
|
-
case 'desc':
|
|
67
|
-
return _toConsumableArray(columns).sort(function (a, b) {
|
|
68
|
-
return -collator.compare(a.headerName || a.field, b.headerName || b.field);
|
|
69
|
-
});
|
|
70
|
-
default:
|
|
71
|
-
return columns;
|
|
72
|
-
}
|
|
73
|
-
}, [columns, sort]);
|
|
74
|
-
var toggleColumn = function toggleColumn(event) {
|
|
75
|
-
var _ref = event.target,
|
|
76
|
-
field = _ref.name;
|
|
77
|
-
apiRef.current.setColumnVisibility(field, columnVisibilityModel[field] === false);
|
|
78
|
-
};
|
|
79
|
-
var currentColumns = React.useMemo(function () {
|
|
80
|
-
var togglableColumns = getTogglableColumns ? getTogglableColumns(sortedColumns) : null;
|
|
81
|
-
var togglableSortedColumns = togglableColumns ? sortedColumns.filter(function (_ref2) {
|
|
82
|
-
var field = _ref2.field;
|
|
83
|
-
return togglableColumns.includes(field);
|
|
84
|
-
}) : sortedColumns;
|
|
85
|
-
if (!searchValue) {
|
|
86
|
-
return togglableSortedColumns;
|
|
87
|
-
}
|
|
88
|
-
return togglableSortedColumns.filter(function (column) {
|
|
89
|
-
return searchPredicate(column, searchValue.toLowerCase());
|
|
90
|
-
});
|
|
91
|
-
}, [sortedColumns, searchValue, searchPredicate, getTogglableColumns]);
|
|
92
|
-
var toggleAllColumns = React.useCallback(function (isVisible) {
|
|
93
|
-
var currentModel = gridColumnVisibilityModelSelector(apiRef);
|
|
94
|
-
var newModel = _extends({}, currentModel);
|
|
95
|
-
var togglableColumns = getTogglableColumns ? getTogglableColumns(columns) : null;
|
|
96
|
-
(toggleAllMode === 'filteredOnly' ? currentColumns : columns).forEach(function (col) {
|
|
97
|
-
if (col.hideable && (togglableColumns == null || togglableColumns.includes(col.field))) {
|
|
98
|
-
if (isVisible) {
|
|
99
|
-
// delete the key from the model instead of setting it to `true`
|
|
100
|
-
delete newModel[col.field];
|
|
101
|
-
} else {
|
|
102
|
-
newModel[col.field] = false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
return apiRef.current.setColumnVisibilityModel(newModel);
|
|
107
|
-
}, [apiRef, columns, getTogglableColumns, toggleAllMode, currentColumns]);
|
|
108
|
-
var handleSearchValueChange = React.useCallback(function (event) {
|
|
109
|
-
setSearchValue(event.target.value);
|
|
110
|
-
}, []);
|
|
111
|
-
var hideableColumns = React.useMemo(function () {
|
|
112
|
-
return currentColumns.filter(function (col) {
|
|
113
|
-
return col.hideable;
|
|
114
|
-
});
|
|
115
|
-
}, [currentColumns]);
|
|
116
|
-
var allHideableColumnsVisible = React.useMemo(function () {
|
|
117
|
-
return hideableColumns.every(function (column) {
|
|
118
|
-
return columnVisibilityModel[column.field] == null || columnVisibilityModel[column.field] !== false;
|
|
119
|
-
});
|
|
120
|
-
}, [columnVisibilityModel, hideableColumns]);
|
|
121
|
-
var allHideableColumnsHidden = React.useMemo(function () {
|
|
122
|
-
return hideableColumns.every(function (column) {
|
|
123
|
-
return columnVisibilityModel[column.field] === false;
|
|
124
|
-
});
|
|
125
|
-
}, [columnVisibilityModel, hideableColumns]);
|
|
126
|
-
var firstSwitchRef = React.useRef(null);
|
|
127
|
-
React.useEffect(function () {
|
|
128
|
-
if (autoFocusSearchField) {
|
|
129
|
-
searchInputRef.current.focus();
|
|
130
|
-
} else if (firstSwitchRef.current && typeof firstSwitchRef.current.focus === 'function') {
|
|
131
|
-
firstSwitchRef.current.focus();
|
|
132
|
-
}
|
|
133
|
-
}, [autoFocusSearchField]);
|
|
134
|
-
var firstHideableColumnFound = false;
|
|
135
|
-
var isFirstHideableColumn = function isFirstHideableColumn(column) {
|
|
136
|
-
if (firstHideableColumnFound === false && column.hideable !== false) {
|
|
137
|
-
firstHideableColumnFound = true;
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
return false;
|
|
141
|
-
};
|
|
142
|
-
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
143
|
-
children: [/*#__PURE__*/_jsx(GridColumnsManagementHeader, {
|
|
144
|
-
className: classes.header,
|
|
145
|
-
ownerState: rootProps,
|
|
146
|
-
children: /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
|
|
147
|
-
placeholder: apiRef.current.getLocaleText('columnsManagementSearchTitle'),
|
|
148
|
-
inputRef: searchInputRef,
|
|
149
|
-
value: searchValue,
|
|
150
|
-
onChange: handleSearchValueChange,
|
|
151
|
-
variant: "outlined",
|
|
152
|
-
size: "small",
|
|
153
|
-
InputProps: {
|
|
154
|
-
startAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
|
|
155
|
-
position: "start",
|
|
156
|
-
children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {})
|
|
157
|
-
}),
|
|
158
|
-
sx: {
|
|
159
|
-
pl: 1.5
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
fullWidth: true
|
|
163
|
-
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField))
|
|
164
|
-
}), /*#__PURE__*/_jsxs(GridColumnsManagementBody, {
|
|
165
|
-
className: classes.root,
|
|
166
|
-
ownerState: rootProps,
|
|
167
|
-
children: [currentColumns.map(function (column) {
|
|
168
|
-
var _rootProps$slotProps2;
|
|
169
|
-
return /*#__PURE__*/_jsx(FormControlLabel, {
|
|
170
|
-
className: classes.row,
|
|
171
|
-
control: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
172
|
-
disabled: column.hideable === false,
|
|
173
|
-
checked: columnVisibilityModel[column.field] !== false,
|
|
174
|
-
onClick: toggleColumn,
|
|
175
|
-
name: column.field,
|
|
176
|
-
sx: {
|
|
177
|
-
p: 0.5
|
|
178
|
-
},
|
|
179
|
-
inputRef: isFirstHideableColumn(column) ? firstSwitchRef : undefined
|
|
180
|
-
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseCheckbox)),
|
|
181
|
-
label: column.headerName || column.field
|
|
182
|
-
}, column.field);
|
|
183
|
-
}), currentColumns.length === 0 && /*#__PURE__*/_jsx(GridColumnsManagementEmptyText, {
|
|
184
|
-
ownerState: rootProps,
|
|
185
|
-
children: apiRef.current.getLocaleText('columnsManagementNoColumns')
|
|
186
|
-
})]
|
|
187
|
-
}), !disableShowHideToggle && !disableResetButton && currentColumns.length > 0 ? /*#__PURE__*/_jsxs(GridColumnsManagementFooter, {
|
|
188
|
-
ownerState: rootProps,
|
|
189
|
-
className: classes.footer,
|
|
190
|
-
children: [!disableShowHideToggle ? /*#__PURE__*/_jsx(FormControlLabel, {
|
|
191
|
-
control: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
192
|
-
disabled: hideableColumns.length === 0,
|
|
193
|
-
checked: allHideableColumnsVisible,
|
|
194
|
-
indeterminate: !allHideableColumnsVisible && !allHideableColumnsHidden,
|
|
195
|
-
onClick: function onClick() {
|
|
196
|
-
return toggleAllColumns(!allHideableColumnsVisible);
|
|
197
|
-
},
|
|
198
|
-
name: apiRef.current.getLocaleText('columnsManagementShowHideAllText'),
|
|
199
|
-
sx: {
|
|
200
|
-
p: 0.5
|
|
201
|
-
}
|
|
202
|
-
}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseCheckbox)),
|
|
203
|
-
label: apiRef.current.getLocaleText('columnsManagementShowHideAllText')
|
|
204
|
-
}) : /*#__PURE__*/_jsx("span", {}), !disableResetButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
205
|
-
onClick: function onClick() {
|
|
206
|
-
return apiRef.current.setColumnVisibilityModel(initialColumnVisibilityModel);
|
|
207
|
-
},
|
|
208
|
-
disabled: isResetDisabled
|
|
209
|
-
}, (_rootProps$slotProps4 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps4.baseButton, {
|
|
210
|
-
children: "Reset"
|
|
211
|
-
})) : null]
|
|
212
|
-
}) : null]
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
process.env.NODE_ENV !== "production" ? GridColumnsManagement.propTypes = {
|
|
216
|
-
// ----------------------------- Warning --------------------------------
|
|
217
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
218
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
219
|
-
// ----------------------------------------------------------------------
|
|
220
|
-
/**
|
|
221
|
-
* If `true`, the column search field will be focused automatically.
|
|
222
|
-
* If `false`, the first column switch input will be focused automatically.
|
|
223
|
-
* This helps to avoid input keyboard panel to popup automatically on touch devices.
|
|
224
|
-
* @default true
|
|
225
|
-
*/
|
|
226
|
-
autoFocusSearchField: PropTypes.bool,
|
|
227
|
-
/**
|
|
228
|
-
* If `true`, the `Reset` button will not be disabled
|
|
229
|
-
* @default false
|
|
230
|
-
*/
|
|
231
|
-
disableResetButton: PropTypes.bool,
|
|
232
|
-
/**
|
|
233
|
-
* If `true`, the `Show/Hide all` toggle checkbox will not be displayed.
|
|
234
|
-
* @default false
|
|
235
|
-
*/
|
|
236
|
-
disableShowHideToggle: PropTypes.bool,
|
|
237
|
-
/**
|
|
238
|
-
* Returns the list of togglable columns.
|
|
239
|
-
* If used, only those columns will be displayed in the panel
|
|
240
|
-
* which are passed as the return value of the function.
|
|
241
|
-
* @param {GridColDef[]} columns The `ColDef` list of all columns.
|
|
242
|
-
* @returns {GridColDef['field'][]} The list of togglable columns' field names.
|
|
243
|
-
*/
|
|
244
|
-
getTogglableColumns: PropTypes.func,
|
|
245
|
-
searchPredicate: PropTypes.func,
|
|
246
|
-
sort: PropTypes.oneOf(['asc', 'desc']),
|
|
247
|
-
/**
|
|
248
|
-
* Changes the behavior of the `Show/Hide All` toggle when the search field is used:
|
|
249
|
-
* - `all`: Will toggle all columns.
|
|
250
|
-
* - `filteredOnly`: Will only toggle columns that match the search criteria.
|
|
251
|
-
* @default 'all'
|
|
252
|
-
*/
|
|
253
|
-
toggleAllMode: PropTypes.oneOf(['all', 'filteredOnly'])
|
|
254
|
-
} : void 0;
|
|
255
|
-
var GridColumnsManagementBody = styled('div', {
|
|
256
|
-
name: 'MuiDataGrid',
|
|
257
|
-
slot: 'ColumnsManagement',
|
|
258
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
259
|
-
return styles.columnsManagement;
|
|
260
|
-
}
|
|
261
|
-
})(function (_ref3) {
|
|
262
|
-
var theme = _ref3.theme;
|
|
263
|
-
return {
|
|
264
|
-
padding: theme.spacing(0, 3, 1.5),
|
|
265
|
-
display: 'flex',
|
|
266
|
-
flexDirection: 'column',
|
|
267
|
-
overflow: 'auto',
|
|
268
|
-
flex: '1 1',
|
|
269
|
-
maxHeight: 400,
|
|
270
|
-
alignItems: 'flex-start'
|
|
271
|
-
};
|
|
272
|
-
});
|
|
273
|
-
var GridColumnsManagementHeader = styled('div', {
|
|
274
|
-
name: 'MuiDataGrid',
|
|
275
|
-
slot: 'ColumnsManagementHeader',
|
|
276
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
277
|
-
return styles.columnsManagementHeader;
|
|
278
|
-
}
|
|
279
|
-
})(function (_ref4) {
|
|
280
|
-
var theme = _ref4.theme;
|
|
281
|
-
return {
|
|
282
|
-
padding: theme.spacing(1.5, 3)
|
|
283
|
-
};
|
|
284
|
-
});
|
|
285
|
-
var GridColumnsManagementFooter = styled('div', {
|
|
286
|
-
name: 'MuiDataGrid',
|
|
287
|
-
slot: 'ColumnsManagementFooter',
|
|
288
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
289
|
-
return styles.columnsManagementFooter;
|
|
290
|
-
}
|
|
291
|
-
})(function (_ref5) {
|
|
292
|
-
var theme = _ref5.theme;
|
|
293
|
-
return {
|
|
294
|
-
padding: theme.spacing(0.5, 1, 0.5, 3),
|
|
295
|
-
display: 'flex',
|
|
296
|
-
justifyContent: 'space-between',
|
|
297
|
-
borderTop: "1px solid ".concat(theme.palette.divider)
|
|
298
|
-
};
|
|
299
|
-
});
|
|
300
|
-
var GridColumnsManagementEmptyText = styled('div')(function (_ref6) {
|
|
301
|
-
var theme = _ref6.theme;
|
|
302
|
-
return {
|
|
303
|
-
padding: theme.spacing(0.5, 0),
|
|
304
|
-
color: theme.palette.grey[500]
|
|
305
|
-
};
|
|
306
|
-
});
|
|
307
|
-
export { GridColumnsManagement };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GridColumnsManagement';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export var checkColumnVisibilityModelsSame = function checkColumnVisibilityModelsSame(a, b) {
|
|
2
|
-
// Filter `false` values only, as `true` and not having a key are the same
|
|
3
|
-
var aFalseValues = new Set(Object.keys(a).filter(function (key) {
|
|
4
|
-
return a[key] === false;
|
|
5
|
-
}));
|
|
6
|
-
var bFalseValues = new Set(Object.keys(b).filter(function (key) {
|
|
7
|
-
return b[key] === false;
|
|
8
|
-
}));
|
|
9
|
-
if (aFalseValues.size !== bFalseValues.size) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
var result = true;
|
|
13
|
-
aFalseValues.forEach(function (key) {
|
|
14
|
-
if (!bFalseValues.has(key)) {
|
|
15
|
-
result = false;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return result;
|
|
19
|
-
};
|
|
20
|
-
export var defaultSearchPredicate = function defaultSearchPredicate(column, searchValue) {
|
|
21
|
-
return (column.headerName || column.field).toLowerCase().indexOf(searchValue) > -1;
|
|
22
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
-
import { styled } from '@mui/system';
|
|
9
|
-
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
|
-
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
13
|
-
var classes = ownerState.classes;
|
|
14
|
-
var slots = {
|
|
15
|
-
root: ['footerContainer', 'withBorderColor']
|
|
16
|
-
};
|
|
17
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
18
|
-
};
|
|
19
|
-
var GridFooterContainerRoot = styled('div', {
|
|
20
|
-
name: 'MuiDataGrid',
|
|
21
|
-
slot: 'FooterContainer',
|
|
22
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
23
|
-
return styles.footerContainer;
|
|
24
|
-
}
|
|
25
|
-
})({
|
|
26
|
-
display: 'flex',
|
|
27
|
-
justifyContent: 'space-between',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
minHeight: 52,
|
|
30
|
-
borderTop: '1px solid'
|
|
31
|
-
});
|
|
32
|
-
var GridFooterContainer = /*#__PURE__*/React.forwardRef(function GridFooterContainer(props, ref) {
|
|
33
|
-
var className = props.className,
|
|
34
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
35
|
-
var rootProps = useGridRootProps();
|
|
36
|
-
var classes = useUtilityClasses(rootProps);
|
|
37
|
-
return /*#__PURE__*/_jsx(GridFooterContainerRoot, _extends({
|
|
38
|
-
ref: ref,
|
|
39
|
-
className: clsx(classes.root, className),
|
|
40
|
-
ownerState: rootProps
|
|
41
|
-
}, other));
|
|
42
|
-
});
|
|
43
|
-
process.env.NODE_ENV !== "production" ? GridFooterContainer.propTypes = {
|
|
44
|
-
// ----------------------------- Warning --------------------------------
|
|
45
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
46
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
47
|
-
// ----------------------------------------------------------------------
|
|
48
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
49
|
-
} : void 0;
|
|
50
|
-
export { GridFooterContainer };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
-
import { styled } from '@mui/system';
|
|
9
|
-
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
|
-
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
13
|
-
var classes = ownerState.classes;
|
|
14
|
-
var slots = {
|
|
15
|
-
root: ['overlay']
|
|
16
|
-
};
|
|
17
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
18
|
-
};
|
|
19
|
-
var GridOverlayRoot = styled('div', {
|
|
20
|
-
name: 'MuiDataGrid',
|
|
21
|
-
slot: 'Overlay',
|
|
22
|
-
overridesResolver: function overridesResolver(_, styles) {
|
|
23
|
-
return styles.overlay;
|
|
24
|
-
}
|
|
25
|
-
})({
|
|
26
|
-
width: '100%',
|
|
27
|
-
height: '100%',
|
|
28
|
-
display: 'flex',
|
|
29
|
-
alignSelf: 'center',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
backgroundColor: 'var(--unstable_DataGrid-overlayBackground)'
|
|
33
|
-
});
|
|
34
|
-
var GridOverlay = /*#__PURE__*/React.forwardRef(function GridOverlay(props, ref) {
|
|
35
|
-
var className = props.className,
|
|
36
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
37
|
-
var rootProps = useGridRootProps();
|
|
38
|
-
var classes = useUtilityClasses(rootProps);
|
|
39
|
-
return /*#__PURE__*/_jsx(GridOverlayRoot, _extends({
|
|
40
|
-
ref: ref,
|
|
41
|
-
className: clsx(classes.root, className),
|
|
42
|
-
ownerState: rootProps
|
|
43
|
-
}, other));
|
|
44
|
-
});
|
|
45
|
-
process.env.NODE_ENV !== "production" ? GridOverlay.propTypes = {
|
|
46
|
-
// ----------------------------- Warning --------------------------------
|
|
47
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
49
|
-
// ----------------------------------------------------------------------
|
|
50
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
51
|
-
} : void 0;
|
|
52
|
-
export { GridOverlay };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className"];
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
9
|
-
import { styled } from '@mui/system';
|
|
10
|
-
import { GridRootStyles } from './GridRootStyles';
|
|
11
|
-
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
12
|
-
import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
|
|
13
|
-
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
14
|
-
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
15
|
-
import { gridDensityValueSelector } from '../../hooks/features/density/densitySelector';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
19
|
-
var autoHeight = ownerState.autoHeight,
|
|
20
|
-
density = ownerState.density,
|
|
21
|
-
classes = ownerState.classes,
|
|
22
|
-
showCellVerticalBorder = ownerState.showCellVerticalBorder;
|
|
23
|
-
var slots = {
|
|
24
|
-
root: ['root', autoHeight && 'autoHeight', "root--density".concat(capitalize(density)), 'withBorderColor', showCellVerticalBorder && 'withVerticalBorder']
|
|
25
|
-
};
|
|
26
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
27
|
-
};
|
|
28
|
-
var GridPanelAnchor = styled('div')({
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
top: "var(--DataGrid-headersTotalHeight)",
|
|
31
|
-
left: 0
|
|
32
|
-
});
|
|
33
|
-
var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
34
|
-
var rootProps = useGridRootProps();
|
|
35
|
-
var children = props.children,
|
|
36
|
-
className = props.className,
|
|
37
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
38
|
-
var apiRef = useGridPrivateApiContext();
|
|
39
|
-
var densityValue = useGridSelector(apiRef, gridDensityValueSelector);
|
|
40
|
-
var rootElementRef = apiRef.current.rootElementRef;
|
|
41
|
-
var handleRef = useForkRef(rootElementRef, ref);
|
|
42
|
-
var ownerState = _extends({}, rootProps, {
|
|
43
|
-
density: densityValue
|
|
44
|
-
});
|
|
45
|
-
var classes = useUtilityClasses(ownerState);
|
|
46
|
-
|
|
47
|
-
// Our implementation of <NoSsr />
|
|
48
|
-
var _React$useState = React.useState(false),
|
|
49
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
|
-
mountedState = _React$useState2[0],
|
|
51
|
-
setMountedState = _React$useState2[1];
|
|
52
|
-
useEnhancedEffect(function () {
|
|
53
|
-
setMountedState(true);
|
|
54
|
-
}, []);
|
|
55
|
-
if (!mountedState) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/_jsxs(GridRootStyles, _extends({
|
|
59
|
-
ref: handleRef,
|
|
60
|
-
className: clsx(className, classes.root),
|
|
61
|
-
ownerState: ownerState
|
|
62
|
-
}, other, {
|
|
63
|
-
children: [/*#__PURE__*/_jsx(GridPanelAnchor, {
|
|
64
|
-
role: "presentation",
|
|
65
|
-
"data-id": "gridPanelAnchor"
|
|
66
|
-
}), children]
|
|
67
|
-
}));
|
|
68
|
-
});
|
|
69
|
-
process.env.NODE_ENV !== "production" ? GridRoot.propTypes = {
|
|
70
|
-
// ----------------------------- Warning --------------------------------
|
|
71
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
72
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
73
|
-
// ----------------------------------------------------------------------
|
|
74
|
-
/**
|
|
75
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
76
|
-
*/
|
|
77
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
78
|
-
} : void 0;
|
|
79
|
-
export { GridRoot };
|