@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.10
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 +1903 -231
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +1 -1
- package/colDef/gridDateOperators.d.ts +2 -1
- package/colDef/gridNumericOperators.d.ts +4 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridHeaders.js +2 -2
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +10 -8
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +7 -4
- package/components/GridRow.d.ts +6 -11
- package/components/GridRow.js +55 -87
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.js +2 -0
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +22 -21
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.d.ts +17 -10
- package/components/cell/GridActionsCellItem.js +9 -8
- package/components/cell/GridCell.d.ts +19 -23
- package/components/cell/GridCell.js +49 -92
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +73 -4
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +1 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
- package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/components/columnsManagement/GridColumnsManagement.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +18 -8
- package/components/containers/GridRootStyles.js +160 -50
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/components/panel/GridColumnsPanel.js +1 -2
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +5 -3
- package/components/panel/GridPanelContent.js +7 -3
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -3
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
- package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/panel/filterPanel/index.d.ts +2 -2
- package/components/panel/filterPanel/index.js +1 -2
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +11 -5
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
- package/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
- package/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/components/virtualization/GridMainContainer.d.ts +13 -1
- package/components/virtualization/GridMainContainer.js +14 -5
- package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
- package/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/components/virtualization/GridVirtualScroller.js +27 -12
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -4
- package/constants/gridClasses.d.ts +12 -12
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +1 -1
- package/context/GridContextProvider.d.ts +2 -1
- package/context/GridRootPropsContext.js +2 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/hooks/core/useGridApiInitialization.d.ts +2 -2
- package/hooks/core/useGridApiInitialization.js +2 -2
- package/hooks/core/useGridInitialization.d.ts +2 -2
- package/hooks/core/useGridIsRtl.d.ts +2 -2
- package/hooks/core/useGridLocaleText.d.ts +2 -2
- package/hooks/core/useGridLoggerFactory.d.ts +2 -2
- package/hooks/core/useGridRefs.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.js +3 -3
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +33 -68
- package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
- package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
- package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.js +7 -3
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/hooks/features/editing/gridEditingSelectors.d.ts +6 -0
- package/hooks/features/editing/gridEditingSelectors.js +7 -1
- package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.js +7 -8
- package/hooks/features/events/useGridEvents.d.ts +2 -2
- package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
- package/hooks/features/export/useGridCsvExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.js +1 -1
- package/hooks/features/export/utils.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/filter/gridFilterSelector.js +6 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/useGridFilter.d.ts +2 -2
- package/hooks/features/filter/useGridFilter.js +1 -1
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/focus/useGridFocus.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +3 -2
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
- package/hooks/features/keyboardNavigation/utils.js +0 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
- package/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/hooks/features/listView/index.d.ts +1 -0
- package/hooks/features/listView/index.js +1 -0
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +2 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
- package/hooks/features/overlays/useGridOverlays.js +22 -2
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
- package/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +5 -3
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/hooks/features/preferencesPanel/index.d.ts +1 -1
- package/hooks/features/preferencesPanel/index.js +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -16
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +2 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +4 -4
- package/hooks/features/rows/gridRowsUtils.js +0 -9
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
- package/hooks/features/rows/useGridParamsApi.js +33 -14
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +23 -27
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +3 -2
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
- package/hooks/features/scroll/useGridScroll.d.ts +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
- package/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
- package/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +2 -2
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +15 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -4
- package/hooks/utils/useGridApiEventHandler.js +1 -1
- package/hooks/utils/useGridApiMethod.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +2 -2
- package/hooks/utils/useGridApiRef.js +1 -1
- package/hooks/utils/useGridInitializeState.d.ts +3 -3
- package/hooks/utils/useGridLogger.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
- package/hooks/utils/useGridSelector.d.ts +5 -7
- package/hooks/utils/useGridSelector.js +6 -44
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +6 -4
- package/internals/index.js +4 -3
- package/internals/utils/attachPinnedStyle.d.ts +2 -0
- package/internals/utils/attachPinnedStyle.js +9 -0
- package/internals/utils/getPinnedCellOffset.d.ts +3 -3
- package/internals/utils/getPinnedCellOffset.js +6 -7
- package/internals/utils/index.d.ts +1 -1
- package/internals/utils/index.js +2 -2
- package/locales/arSD.js +2 -1
- package/locales/beBY.js +1 -1
- package/locales/bgBG.js +2 -1
- package/locales/csCZ.js +2 -1
- package/locales/daDK.js +2 -1
- package/locales/deDE.js +12 -13
- package/locales/elGR.js +2 -1
- package/locales/esES.js +12 -13
- package/locales/faIR.js +7 -7
- package/locales/fiFI.js +2 -1
- package/locales/frFR.js +2 -1
- package/locales/heIL.js +16 -17
- package/locales/hrHR.js +2 -1
- package/locales/huHU.js +2 -1
- package/locales/isIS.js +2 -1
- package/locales/itIT.js +2 -1
- package/locales/jaJP.js +2 -1
- package/locales/koKR.js +46 -49
- package/locales/nbNO.js +2 -1
- package/locales/nlNL.js +7 -7
- package/locales/nnNO.js +2 -1
- package/locales/plPL.js +2 -1
- package/locales/ptBR.js +12 -13
- package/locales/ptPT.js +12 -13
- package/locales/roRO.js +20 -21
- package/locales/ruRU.js +2 -1
- package/locales/skSK.js +2 -1
- package/locales/svSE.js +2 -1
- package/locales/trTR.js +14 -15
- package/locales/ukUA.js +2 -1
- package/locales/urPK.js +11 -11
- package/locales/viVN.js +2 -1
- package/locales/zhCN.js +12 -13
- package/locales/zhHK.js +2 -1
- package/locales/zhTW.js +2 -1
- package/material/index.js +58 -7
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +7 -7
- package/models/api/gridDensityApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +1 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +34 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +1 -1
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterInputComponent.d.ts +32 -0
- package/models/gridFilterOperator.d.ts +6 -4
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponent.d.ts +16 -1
- package/models/gridSlotsComponentsProps.d.ts +45 -9
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +12 -24
- package/modern/DataGrid/DataGrid.js +20 -38
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridLoadingOverlay.js +10 -8
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +7 -4
- package/modern/components/GridRow.js +55 -87
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +2 -0
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +22 -21
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +9 -8
- package/modern/components/cell/GridCell.js +49 -92
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +73 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/cell/GridSkeletonCell.js +1 -2
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/modern/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +18 -8
- package/modern/components/containers/GridRootStyles.js +160 -50
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/components/panel/GridPanel.js +5 -3
- package/modern/components/panel/GridPanelContent.js +7 -3
- package/modern/components/panel/GridPanelFooter.js +4 -3
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/panel/filterPanel/index.js +1 -2
- package/modern/components/toolbar/GridToolbar.js +11 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/modern/components/virtualization/GridMainContainer.js +14 -5
- package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/modern/components/virtualization/GridVirtualScroller.js +27 -12
- package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/constants/dataGridPropsDefaultValues.js +2 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +1 -1
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +2 -2
- package/modern/hooks/core/useGridStateInitialization.js +3 -3
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +33 -68
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +7 -3
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/modern/hooks/features/editing/gridEditingSelectors.js +7 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -8
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
- package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/modern/hooks/features/listView/index.js +1 -0
- package/modern/hooks/features/listView/useGridListView.js +2 -1
- package/modern/hooks/features/overlays/useGridOverlays.js +22 -2
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/useGridPagination.js +5 -3
- package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/modern/hooks/features/preferencesPanel/index.js +1 -1
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -16
- package/modern/hooks/features/rowSelection/utils.js +2 -2
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
- package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/modern/hooks/features/rows/useGridRows.js +23 -27
- package/modern/hooks/features/rows/useGridRowsMeta.js +3 -2
- package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
- package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +6 -44
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +4 -3
- package/modern/internals/utils/attachPinnedStyle.js +9 -0
- package/modern/internals/utils/getPinnedCellOffset.js +6 -7
- package/modern/internals/utils/index.js +2 -2
- package/modern/locales/arSD.js +2 -1
- package/modern/locales/beBY.js +1 -1
- package/modern/locales/bgBG.js +2 -1
- package/modern/locales/csCZ.js +2 -1
- package/modern/locales/daDK.js +2 -1
- package/modern/locales/deDE.js +12 -13
- package/modern/locales/elGR.js +2 -1
- package/modern/locales/esES.js +12 -13
- package/modern/locales/faIR.js +7 -7
- package/modern/locales/fiFI.js +2 -1
- package/modern/locales/frFR.js +2 -1
- package/modern/locales/heIL.js +16 -17
- package/modern/locales/hrHR.js +2 -1
- package/modern/locales/huHU.js +2 -1
- package/modern/locales/isIS.js +2 -1
- package/modern/locales/itIT.js +2 -1
- package/modern/locales/jaJP.js +2 -1
- package/modern/locales/koKR.js +46 -49
- package/modern/locales/nbNO.js +2 -1
- package/modern/locales/nlNL.js +7 -7
- package/modern/locales/nnNO.js +2 -1
- package/modern/locales/plPL.js +2 -1
- package/modern/locales/ptBR.js +12 -13
- package/modern/locales/ptPT.js +12 -13
- package/modern/locales/roRO.js +20 -21
- package/modern/locales/ruRU.js +2 -1
- package/modern/locales/skSK.js +2 -1
- package/modern/locales/svSE.js +2 -1
- package/modern/locales/trTR.js +14 -15
- package/modern/locales/ukUA.js +2 -1
- package/modern/locales/urPK.js +11 -11
- package/modern/locales/viVN.js +2 -1
- package/modern/locales/zhCN.js +12 -13
- package/modern/locales/zhHK.js +2 -1
- package/modern/locales/zhTW.js +2 -1
- package/modern/material/index.js +58 -7
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/models/gridFilterInputComponent.js +1 -0
- package/modern/utils/assert.js +3 -0
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/createSelector.js +1 -120
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/roundToDecimalPlaces.js +3 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/modern/utils/utils.js +6 -1
- package/node/DataGrid/DataGrid.js +18 -36
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridLoadingOverlay.js +10 -8
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +7 -4
- package/node/components/GridRow.js +51 -84
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +1 -0
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +21 -20
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +7 -8
- package/node/components/cell/GridCell.js +48 -91
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +73 -4
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/cell/GridSkeletonCell.js +1 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
- package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/node/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +17 -7
- package/node/components/containers/GridRootStyles.js +160 -50
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/components/panel/GridPanel.js +5 -3
- package/node/components/panel/GridPanelContent.js +7 -3
- package/node/components/panel/GridPanelFooter.js +5 -4
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
- package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/panel/filterPanel/index.js +7 -23
- package/node/components/toolbar/GridToolbar.js +11 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/node/components/virtualization/GridMainContainer.js +14 -5
- package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/node/components/virtualization/GridVirtualScroller.js +27 -12
- package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/constants/dataGridPropsDefaultValues.js +2 -4
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +1 -1
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +2 -2
- package/node/hooks/core/useGridStateInitialization.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +31 -66
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +7 -3
- package/node/hooks/features/dimensions/useGridDimensions.js +12 -33
- package/node/hooks/features/editing/gridEditingSelectors.js +8 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +5 -6
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/focus/useGridFocus.js +3 -2
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
- package/node/hooks/features/keyboardNavigation/utils.js +0 -6
- package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/node/hooks/features/listView/index.js +16 -0
- package/node/hooks/features/listView/useGridListView.js +2 -1
- package/node/hooks/features/overlays/useGridOverlays.js +24 -2
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/useGridPagination.js +5 -3
- package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
- package/node/hooks/features/preferencesPanel/index.js +11 -10
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/node/hooks/features/rowSelection/useGridRowSelection.js +7 -15
- package/node/hooks/features/rowSelection/utils.js +2 -2
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -9
- package/node/hooks/features/rows/index.js +0 -7
- package/node/hooks/features/rows/useGridParamsApi.js +33 -14
- package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
- package/node/hooks/features/rows/useGridRows.js +21 -25
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -4
- package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +171 -96
- package/node/hooks/utils/useGridApiEventHandler.js +1 -1
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +8 -47
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +27 -22
- package/node/internals/utils/attachPinnedStyle.js +15 -0
- package/node/internals/utils/getPinnedCellOffset.js +6 -7
- package/node/internals/utils/index.js +11 -11
- package/node/locales/arSD.js +2 -1
- package/node/locales/beBY.js +1 -1
- package/node/locales/bgBG.js +2 -1
- package/node/locales/csCZ.js +2 -1
- package/node/locales/daDK.js +2 -1
- package/node/locales/deDE.js +12 -13
- package/node/locales/elGR.js +2 -1
- package/node/locales/esES.js +12 -13
- package/node/locales/faIR.js +7 -7
- package/node/locales/fiFI.js +2 -1
- package/node/locales/frFR.js +2 -1
- package/node/locales/heIL.js +16 -17
- package/node/locales/hrHR.js +2 -1
- package/node/locales/huHU.js +2 -1
- package/node/locales/isIS.js +2 -1
- package/node/locales/itIT.js +2 -1
- package/node/locales/jaJP.js +2 -1
- package/node/locales/koKR.js +46 -49
- package/node/locales/nbNO.js +2 -1
- package/node/locales/nlNL.js +7 -7
- package/node/locales/nnNO.js +2 -1
- package/node/locales/plPL.js +2 -1
- package/node/locales/ptBR.js +12 -13
- package/node/locales/ptPT.js +12 -13
- package/node/locales/roRO.js +20 -21
- package/node/locales/ruRU.js +2 -1
- package/node/locales/skSK.js +2 -1
- package/node/locales/svSE.js +2 -1
- package/node/locales/trTR.js +14 -15
- package/node/locales/ukUA.js +2 -1
- package/node/locales/urPK.js +11 -11
- package/node/locales/viVN.js +2 -1
- package/node/locales/zhCN.js +12 -13
- package/node/locales/zhHK.js +2 -1
- package/node/locales/zhTW.js +2 -1
- package/node/material/index.js +59 -7
- package/node/models/api/index.js +0 -11
- package/node/models/gridFilterInputComponent.js +5 -0
- package/node/utils/assert.js +9 -0
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/createSelector.js +4 -125
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/roundToDecimalPlaces.js +9 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/node/utils/utils.js +8 -1
- package/package.json +3 -3
- package/themeAugmentation/overrides.d.ts +10 -5
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +3 -0
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +7 -19
- package/utils/createSelector.js +1 -120
- package/utils/domUtils.js +7 -2
- package/utils/getPublicApiRef.d.ts +2 -1
- package/utils/isJSDOM.d.ts +1 -0
- package/utils/isJSDOM.js +1 -0
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/roundToDecimalPlaces.d.ts +1 -0
- package/utils/roundToDecimalPlaces.js +3 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +6 -1
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -389
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -389
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -397
- /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
- /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
- /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "isFilterActive", "clearButton", "headerFilterMenu", "slotProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
7
|
-
import { styled } from '@mui/material/styles';
|
|
8
7
|
import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
|
|
9
8
|
import { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from "./filterPanelUtils.js";
|
|
10
9
|
import { createElement as _createElement } from "react";
|
|
@@ -31,14 +30,6 @@ const renderSingleSelectOptions = ({
|
|
|
31
30
|
}), label);
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
|
-
const SingleSelectOperatorContainer = styled('div')({
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'flex-end',
|
|
37
|
-
width: '100%',
|
|
38
|
-
[`& button`]: {
|
|
39
|
-
margin: 'auto 0px 5px 5px'
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
33
|
function GridFilterInputSingleSelect(props) {
|
|
43
34
|
const {
|
|
44
35
|
item,
|
|
@@ -46,11 +37,10 @@ function GridFilterInputSingleSelect(props) {
|
|
|
46
37
|
type,
|
|
47
38
|
apiRef,
|
|
48
39
|
focusElementRef,
|
|
49
|
-
placeholder,
|
|
50
40
|
tabIndex,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
clearButton,
|
|
42
|
+
headerFilterMenu,
|
|
43
|
+
slotProps
|
|
54
44
|
} = props,
|
|
55
45
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
56
46
|
const filterValue = item.value ?? '';
|
|
@@ -82,15 +72,15 @@ function GridFilterInputSingleSelect(props) {
|
|
|
82
72
|
if (!isSingleSelectColDef(resolvedColumn)) {
|
|
83
73
|
return null;
|
|
84
74
|
}
|
|
85
|
-
const label =
|
|
86
|
-
return /*#__PURE__*/_jsxs(
|
|
75
|
+
const label = slotProps?.root.label ?? apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
76
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
87
77
|
children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
|
|
88
78
|
fullWidth: true,
|
|
89
79
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, rootProps.slotProps?.baseInputLabel, {
|
|
90
80
|
id: labelId,
|
|
91
81
|
htmlFor: id,
|
|
92
82
|
shrink: true,
|
|
93
|
-
variant:
|
|
83
|
+
variant: "outlined",
|
|
94
84
|
children: label
|
|
95
85
|
})), /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({
|
|
96
86
|
id: id,
|
|
@@ -98,16 +88,16 @@ function GridFilterInputSingleSelect(props) {
|
|
|
98
88
|
labelId: labelId,
|
|
99
89
|
value: filterValue,
|
|
100
90
|
onChange: onFilterChange,
|
|
101
|
-
variant:
|
|
91
|
+
variant: "outlined",
|
|
102
92
|
type: type || 'text',
|
|
103
|
-
inputProps: {
|
|
93
|
+
inputProps: _extends({
|
|
104
94
|
tabIndex,
|
|
105
95
|
ref: focusElementRef,
|
|
106
|
-
placeholder: placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')
|
|
107
|
-
},
|
|
96
|
+
placeholder: slotProps?.root.placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')
|
|
97
|
+
}, slotProps?.root.slotProps?.htmlInput),
|
|
108
98
|
native: isSelectNative,
|
|
109
|
-
notched:
|
|
110
|
-
}, others /* FIXME: typing error */,
|
|
99
|
+
notched: true
|
|
100
|
+
}, rootProps.slotProps?.baseSelect, others /* FIXME: typing error */, slotProps?.root, {
|
|
111
101
|
children: renderSingleSelectOptions({
|
|
112
102
|
column: resolvedColumn,
|
|
113
103
|
OptionComponent: rootProps.slots.baseSelectOption,
|
|
@@ -117,7 +107,7 @@ function GridFilterInputSingleSelect(props) {
|
|
|
117
107
|
baseSelectOptionProps: rootProps.slotProps?.baseSelectOption
|
|
118
108
|
})
|
|
119
109
|
}))]
|
|
120
|
-
}), clearButton]
|
|
110
|
+
}), headerFilterMenu, clearButton]
|
|
121
111
|
});
|
|
122
112
|
}
|
|
123
113
|
process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes = {
|
|
@@ -129,8 +119,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
|
|
|
129
119
|
current: PropTypes.object.isRequired
|
|
130
120
|
}).isRequired,
|
|
131
121
|
applyValue: PropTypes.func.isRequired,
|
|
122
|
+
className: PropTypes.string,
|
|
132
123
|
clearButton: PropTypes.node,
|
|
124
|
+
disabled: PropTypes.bool,
|
|
133
125
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
126
|
+
headerFilterMenu: PropTypes.node,
|
|
127
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
128
|
+
current: (props, propName) => {
|
|
129
|
+
if (props[propName] == null) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
133
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
})]),
|
|
134
138
|
/**
|
|
135
139
|
* It is `true` if the filter either has a value or an operator with no value
|
|
136
140
|
* required is selected (for example `isEmpty`)
|
|
@@ -141,6 +145,11 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
|
|
|
141
145
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
142
146
|
operator: PropTypes.string.isRequired,
|
|
143
147
|
value: PropTypes.any
|
|
144
|
-
}).isRequired
|
|
148
|
+
}).isRequired,
|
|
149
|
+
onBlur: PropTypes.func,
|
|
150
|
+
onFocus: PropTypes.func,
|
|
151
|
+
slotProps: PropTypes.object,
|
|
152
|
+
tabIndex: PropTypes.number,
|
|
153
|
+
type: PropTypes.oneOf(['singleSelect'])
|
|
145
154
|
} : void 0;
|
|
146
155
|
export { GridFilterInputSingleSelect };
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TextFieldProps } from '
|
|
3
|
-
import { GridFilterInputValueProps } from '
|
|
4
|
-
export type GridTypeFilterInputValueProps = GridFilterInputValueProps
|
|
2
|
+
import { TextFieldProps } from '../../../models/gridBaseSlots';
|
|
3
|
+
import { GridFilterInputValueProps } from '../../../models/gridFilterInputComponent';
|
|
4
|
+
export type GridTypeFilterInputValueProps = GridFilterInputValueProps<TextFieldProps> & {
|
|
5
5
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
6
|
-
clearButton?: React.ReactNode | null;
|
|
7
|
-
/**
|
|
8
|
-
* It is `true` if the filter either has a value or an operator with no value
|
|
9
|
-
* required is selected (for example `isEmpty`)
|
|
10
|
-
*/
|
|
11
|
-
isFilterActive?: boolean;
|
|
12
6
|
};
|
|
13
7
|
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps): React.JSX.Element;
|
|
14
8
|
declare namespace GridFilterInputValue {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "slotProps", "clearButton", "headerFilterMenu"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
7
7
|
import { useTimeout } from "../../../hooks/utils/useTimeout.js";
|
|
8
8
|
import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
function GridFilterInputValue(props) {
|
|
11
11
|
const {
|
|
12
12
|
item,
|
|
@@ -16,25 +16,24 @@ function GridFilterInputValue(props) {
|
|
|
16
16
|
focusElementRef,
|
|
17
17
|
tabIndex,
|
|
18
18
|
disabled,
|
|
19
|
+
slotProps,
|
|
19
20
|
clearButton,
|
|
20
|
-
|
|
21
|
-
variant = 'standard'
|
|
21
|
+
headerFilterMenu
|
|
22
22
|
} = props,
|
|
23
23
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
24
|
+
const textFieldProps = slotProps?.root;
|
|
24
25
|
const filterTimeout = useTimeout();
|
|
25
|
-
const [filterValueState, setFilterValueState] = React.useState(item.value
|
|
26
|
+
const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
|
|
26
27
|
const [applying, setIsApplying] = React.useState(false);
|
|
27
28
|
const id = useId();
|
|
28
29
|
const rootProps = useGridRootProps();
|
|
29
30
|
const onFilterChange = React.useCallback(event => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
} = event.target;
|
|
33
|
-
setFilterValueState(String(value));
|
|
31
|
+
const value = sanitizeFilterItemValue(event.target.value);
|
|
32
|
+
setFilterValueState(value);
|
|
34
33
|
setIsApplying(true);
|
|
35
34
|
filterTimeout.start(rootProps.filterDebounceMs, () => {
|
|
36
35
|
const newItem = _extends({}, item, {
|
|
37
|
-
value: type === 'number' ? Number(value) : value,
|
|
36
|
+
value: type === 'number' && !Number.isNaN(Number(value)) ? Number(value) : value,
|
|
38
37
|
fromInput: id
|
|
39
38
|
});
|
|
40
39
|
applyValue(newItem);
|
|
@@ -43,35 +42,42 @@ function GridFilterInputValue(props) {
|
|
|
43
42
|
}, [filterTimeout, rootProps.filterDebounceMs, item, type, id, applyValue]);
|
|
44
43
|
React.useEffect(() => {
|
|
45
44
|
const itemPlusTag = item;
|
|
46
|
-
if (itemPlusTag.fromInput !== id || item.value
|
|
47
|
-
setFilterValueState(
|
|
45
|
+
if (itemPlusTag.fromInput !== id || item.value == null) {
|
|
46
|
+
setFilterValueState(sanitizeFilterItemValue(item.value));
|
|
48
47
|
}
|
|
49
48
|
}, [id, item]);
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
49
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
50
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
|
|
51
|
+
id: id,
|
|
52
|
+
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
53
|
+
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
54
|
+
value: filterValueState ?? '',
|
|
55
|
+
onChange: onFilterChange,
|
|
56
|
+
type: type || 'text',
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
slotProps: _extends({}, textFieldProps?.slotProps, {
|
|
59
|
+
input: _extends({
|
|
60
|
+
endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
|
|
61
|
+
position: "end",
|
|
62
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
|
|
63
|
+
fontSize: "small",
|
|
64
|
+
color: "action"
|
|
65
|
+
})
|
|
66
|
+
}) : null
|
|
67
|
+
}, textFieldProps?.slotProps?.input),
|
|
68
|
+
htmlInput: _extends({
|
|
69
|
+
tabIndex
|
|
70
|
+
}, textFieldProps?.slotProps?.htmlInput)
|
|
71
|
+
}),
|
|
72
|
+
inputRef: focusElementRef
|
|
73
|
+
}, rootProps.slotProps?.baseTextField, others, textFieldProps)), headerFilterMenu, clearButton]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function sanitizeFilterItemValue(value) {
|
|
77
|
+
if (value == null || value === '') {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
return String(value);
|
|
75
81
|
}
|
|
76
82
|
process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
|
|
77
83
|
// ----------------------------- Warning --------------------------------
|
|
@@ -82,8 +88,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
|
|
|
82
88
|
current: PropTypes.object.isRequired
|
|
83
89
|
}).isRequired,
|
|
84
90
|
applyValue: PropTypes.func.isRequired,
|
|
91
|
+
className: PropTypes.string,
|
|
85
92
|
clearButton: PropTypes.node,
|
|
93
|
+
disabled: PropTypes.bool,
|
|
86
94
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
95
|
+
headerFilterMenu: PropTypes.node,
|
|
96
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
97
|
+
current: (props, propName) => {
|
|
98
|
+
if (props[propName] == null) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
102
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
})]),
|
|
87
107
|
/**
|
|
88
108
|
* It is `true` if the filter either has a value or an operator with no value
|
|
89
109
|
* required is selected (for example `isEmpty`)
|
|
@@ -94,6 +114,11 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
|
|
|
94
114
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
95
115
|
operator: PropTypes.string.isRequired,
|
|
96
116
|
value: PropTypes.any
|
|
97
|
-
}).isRequired
|
|
117
|
+
}).isRequired,
|
|
118
|
+
onBlur: PropTypes.func,
|
|
119
|
+
onFocus: PropTypes.func,
|
|
120
|
+
slotProps: PropTypes.object,
|
|
121
|
+
tabIndex: PropTypes.number,
|
|
122
|
+
type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])
|
|
98
123
|
} : void 0;
|
|
99
124
|
export { GridFilterInputValue };
|
|
@@ -38,7 +38,7 @@ export interface GridFilterPanelProps extends Pick<GridFilterFormProps, 'logicOp
|
|
|
38
38
|
children?: React.ReactNode;
|
|
39
39
|
}
|
|
40
40
|
declare const getGridFilter: (col: GridStateColDef) => GridFilterItem;
|
|
41
|
-
declare const GridFilterPanel: React.ForwardRefExoticComponent<GridFilterPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const GridFilterPanel: React.ForwardRefExoticComponent<GridFilterPanelProps> | React.ForwardRefExoticComponent<GridFilterPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
42
|
/**
|
|
43
43
|
* Demos:
|
|
44
44
|
* - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["logicOperators", "columnsSort", "filterFormProps", "getColumnForNewFilter", "children", "disableAddFilterButton", "disableRemoveAllButton"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
7
|
import { GridLogicOperator } from "../../../models/gridFilterItem.js";
|
|
7
8
|
import { useGridApiContext } from "../../../hooks/utils/useGridApiContext.js";
|
|
8
9
|
import { GridPanelContent } from "../GridPanelContent.js";
|
|
@@ -19,7 +20,7 @@ const getGridFilter = col => ({
|
|
|
19
20
|
operator: col.filterOperators[0].value,
|
|
20
21
|
id: Math.round(Math.random() * 1e5)
|
|
21
22
|
});
|
|
22
|
-
const GridFilterPanel =
|
|
23
|
+
const GridFilterPanel = forwardRef(function GridFilterPanel(props, ref) {
|
|
23
24
|
const apiRef = useGridApiContext();
|
|
24
25
|
const rootProps = useGridRootProps();
|
|
25
26
|
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
|
@@ -141,9 +142,8 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
141
142
|
lastFilterRef.current.focus();
|
|
142
143
|
}
|
|
143
144
|
}, [validFilters.length]);
|
|
144
|
-
return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({
|
|
145
|
-
ref: ref
|
|
146
|
-
}, other, {
|
|
145
|
+
return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({}, other, {
|
|
146
|
+
ref: ref,
|
|
147
147
|
children: [/*#__PURE__*/_jsxs(GridPanelContent, {
|
|
148
148
|
children: [readOnlyFilters.map((item, index) => /*#__PURE__*/_jsx(GridFilterForm, _extends({
|
|
149
149
|
item: item,
|
|
@@ -2,8 +2,8 @@ export * from './GridFilterForm';
|
|
|
2
2
|
export * from './GridFilterInputValue';
|
|
3
3
|
export * from './GridFilterInputDate';
|
|
4
4
|
export * from './GridFilterInputSingleSelect';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export { GridFilterInputBoolean } from './GridFilterInputBoolean';
|
|
6
|
+
export type { GridFilterInputBooleanProps } from './GridFilterInputBoolean';
|
|
7
7
|
export { GridFilterPanel } from './GridFilterPanel';
|
|
8
8
|
export type { GetColumnForNewFilterArgs } from './GridFilterPanel';
|
|
9
9
|
export * from './GridFilterInputMultipleValue';
|
|
@@ -2,8 +2,7 @@ export * from "./GridFilterForm.js";
|
|
|
2
2
|
export * from "./GridFilterInputValue.js";
|
|
3
3
|
export * from "./GridFilterInputDate.js";
|
|
4
4
|
export * from "./GridFilterInputSingleSelect.js";
|
|
5
|
-
export
|
|
6
|
-
export * from "./GridFilterInputValueProps.js";
|
|
5
|
+
export { GridFilterInputBoolean } from "./GridFilterInputBoolean.js";
|
|
7
6
|
export { GridFilterPanel } from "./GridFilterPanel.js";
|
|
8
7
|
export * from "./GridFilterInputMultipleValue.js";
|
|
9
8
|
export * from "./GridFilterInputMultipleSingleSelect.js";
|
|
@@ -13,5 +13,5 @@ export interface GridToolbarProps extends GridToolbarContainerProps, GridToolbar
|
|
|
13
13
|
*/
|
|
14
14
|
quickFilterProps?: GridToolbarQuickFilterProps;
|
|
15
15
|
}
|
|
16
|
-
declare const GridToolbar: React.ForwardRefExoticComponent<GridToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const GridToolbar: React.ForwardRefExoticComponent<GridToolbarProps> | React.ForwardRefExoticComponent<GridToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export { GridToolbar };
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
7
|
import { GridToolbarContainer } from "../containers/GridToolbarContainer.js";
|
|
7
8
|
import { GridToolbarColumnsButton } from "./GridToolbarColumnsButton.js";
|
|
8
9
|
import { GridToolbarDensitySelector } from "./GridToolbarDensitySelector.js";
|
|
@@ -11,7 +12,7 @@ import { GridToolbarExport } from "./GridToolbarExport.js";
|
|
|
11
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
12
13
|
import { GridToolbarQuickFilter } from "./GridToolbarQuickFilter.js";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const GridToolbar =
|
|
15
|
+
const GridToolbar = forwardRef(function GridToolbar(props, ref) {
|
|
15
16
|
// TODO v7: think about where export option should be passed.
|
|
16
17
|
// from slotProps={{ toolbarExport: { ...exportOption } }} seems to be more appropriate
|
|
17
18
|
const _ref = props,
|
|
@@ -27,9 +28,8 @@ const GridToolbar = /*#__PURE__*/React.forwardRef(function GridToolbar(props, re
|
|
|
27
28
|
if (rootProps.disableColumnFilter && rootProps.disableColumnSelector && rootProps.disableDensitySelector && !showQuickFilter) {
|
|
28
29
|
return null;
|
|
29
30
|
}
|
|
30
|
-
return /*#__PURE__*/_jsxs(GridToolbarContainer, _extends({
|
|
31
|
-
ref: ref
|
|
32
|
-
}, other, {
|
|
31
|
+
return /*#__PURE__*/_jsxs(GridToolbarContainer, _extends({}, other, {
|
|
32
|
+
ref: ref,
|
|
33
33
|
children: [/*#__PURE__*/_jsx(GridToolbarColumnsButton, {}), /*#__PURE__*/_jsx(GridToolbarFilterButton, {}), /*#__PURE__*/_jsx(GridToolbarDensitySelector, {}), /*#__PURE__*/_jsx(GridToolbarExport, {
|
|
34
34
|
csvOptions: csvOptions,
|
|
35
35
|
printOptions: printOptions
|
|
@@ -53,7 +53,13 @@ process.env.NODE_ENV !== "production" ? GridToolbar.propTypes = {
|
|
|
53
53
|
/**
|
|
54
54
|
* Props passed to the quick filter component.
|
|
55
55
|
*/
|
|
56
|
-
quickFilterProps: PropTypes.
|
|
56
|
+
quickFilterProps: PropTypes.shape({
|
|
57
|
+
className: PropTypes.string,
|
|
58
|
+
debounceMs: PropTypes.number,
|
|
59
|
+
quickFilterFormatter: PropTypes.func,
|
|
60
|
+
quickFilterParser: PropTypes.func,
|
|
61
|
+
slotProps: PropTypes.object
|
|
62
|
+
}),
|
|
57
63
|
/**
|
|
58
64
|
* Show the quick filter component.
|
|
59
65
|
* @default false
|
|
@@ -11,5 +11,5 @@ interface GridToolbarColumnsButtonProps {
|
|
|
11
11
|
tooltip?: Partial<TooltipProps>;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
declare const GridToolbarColumnsButton: React.ForwardRefExoticComponent<GridToolbarColumnsButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const GridToolbarColumnsButton: React.ForwardRefExoticComponent<GridToolbarColumnsButtonProps> | React.ForwardRefExoticComponent<GridToolbarColumnsButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
export { GridToolbarColumnsButton };
|
|
@@ -2,13 +2,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import useId from '@mui/utils/useId';
|
|
5
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
5
6
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
6
7
|
import { gridPreferencePanelStateSelector } from "../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js";
|
|
7
8
|
import { GridPreferencePanelsValue } from "../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js";
|
|
8
9
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const GridToolbarColumnsButton =
|
|
12
|
+
const GridToolbarColumnsButton = forwardRef(function GridToolbarColumnsButton(props, ref) {
|
|
12
13
|
const {
|
|
13
14
|
slotProps = {}
|
|
14
15
|
} = props;
|
|
@@ -36,9 +37,8 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
36
37
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
37
38
|
title: apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
38
39
|
enterDelay: 1000
|
|
39
|
-
},
|
|
40
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
40
41
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
41
|
-
ref: ref,
|
|
42
42
|
id: columnButtonId,
|
|
43
43
|
size: "small",
|
|
44
44
|
"aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
@@ -46,9 +46,15 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
46
46
|
"aria-expanded": isOpen,
|
|
47
47
|
"aria-controls": isOpen ? columnPanelId : undefined,
|
|
48
48
|
startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {})
|
|
49
|
-
}, buttonProps, {
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
50
|
+
onPointerUp: event => {
|
|
51
|
+
if (preferencePanel.open) {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
}
|
|
54
|
+
buttonProps.onPointerUp?.(event);
|
|
55
|
+
},
|
|
56
|
+
onClick: showColumns,
|
|
57
|
+
ref: ref,
|
|
52
58
|
children: apiRef.current.getLocaleText('toolbarColumns')
|
|
53
59
|
}))
|
|
54
60
|
}));
|
|
@@ -11,5 +11,5 @@ interface GridToolbarDensitySelectorProps {
|
|
|
11
11
|
tooltip?: Partial<TooltipProps>;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
declare const GridToolbarDensitySelector: React.ForwardRefExoticComponent<GridToolbarDensitySelectorProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const GridToolbarDensitySelector: React.ForwardRefExoticComponent<GridToolbarDensitySelectorProps> | React.ForwardRefExoticComponent<GridToolbarDensitySelectorProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
export { GridToolbarDensitySelector };
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
5
|
-
import
|
|
5
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
6
|
import { gridDensitySelector } from "../../hooks/features/density/densitySelector.js";
|
|
7
7
|
import { isHideMenuKey } from "../../utils/keyboardUtils.js";
|
|
8
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -11,7 +11,7 @@ import { GridMenu } from "../menu/GridMenu.js";
|
|
|
11
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
12
12
|
import { gridClasses } from "../../constants/gridClasses.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const GridToolbarDensitySelector =
|
|
14
|
+
const GridToolbarDensitySelector = forwardRef(function GridToolbarDensitySelector(props, ref) {
|
|
15
15
|
const {
|
|
16
16
|
slotProps = {}
|
|
17
17
|
} = props;
|
|
@@ -72,20 +72,18 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
72
72
|
if (rootProps.disableDensitySelector) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
const densityElements = densityOptions.map((option, index) => /*#__PURE__*/
|
|
75
|
+
const densityElements = densityOptions.map((option, index) => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
76
76
|
onClick: () => handleDensityUpdate(option.value),
|
|
77
77
|
selected: option.value === density,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}), option.label]
|
|
78
|
+
iconStart: option.icon,
|
|
79
|
+
children: option.label
|
|
81
80
|
}, index));
|
|
82
81
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
83
82
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
84
83
|
title: apiRef.current.getLocaleText('toolbarDensityLabel'),
|
|
85
84
|
enterDelay: 1000
|
|
86
|
-
},
|
|
85
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
87
86
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
88
|
-
ref: handleRef,
|
|
89
87
|
size: "small",
|
|
90
88
|
startIcon: startIcon,
|
|
91
89
|
"aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),
|
|
@@ -93,9 +91,9 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
93
91
|
"aria-expanded": open,
|
|
94
92
|
"aria-controls": open ? densityMenuId : undefined,
|
|
95
93
|
id: densityButtonId
|
|
96
|
-
}, buttonProps, {
|
|
97
|
-
onClick: handleDensitySelectorOpen
|
|
98
|
-
|
|
94
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
95
|
+
onClick: handleDensitySelectorOpen,
|
|
96
|
+
ref: handleRef,
|
|
99
97
|
children: apiRef.current.getLocaleText('toolbarDensity')
|
|
100
98
|
}))
|
|
101
99
|
})), /*#__PURE__*/_jsx(GridMenu, {
|
|
@@ -36,5 +36,5 @@ declare function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps): R
|
|
|
36
36
|
declare namespace GridPrintExportMenuItem {
|
|
37
37
|
var propTypes: any;
|
|
38
38
|
}
|
|
39
|
-
declare const GridToolbarExport: React.ForwardRefExoticComponent<GridToolbarExportProps & React.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
declare const GridToolbarExport: React.ForwardRefExoticComponent<GridToolbarExportProps> | React.ForwardRefExoticComponent<GridToolbarExportProps & React.RefAttributes<HTMLButtonElement>>;
|
|
40
40
|
export { GridToolbarExport, GridCsvExportMenuItem, GridPrintExportMenuItem };
|
|
@@ -5,6 +5,7 @@ const _excluded = ["hideMenu", "options"],
|
|
|
5
5
|
_excluded3 = ["csvOptions", "printOptions", "excelOptions"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
10
11
|
import { GridToolbarExportContainer } from "./GridToolbarExportContainer.js";
|
|
@@ -83,7 +84,7 @@ process.env.NODE_ENV !== "production" ? GridPrintExportMenuItem.propTypes = {
|
|
|
83
84
|
pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
84
85
|
})
|
|
85
86
|
} : void 0;
|
|
86
|
-
const GridToolbarExport =
|
|
87
|
+
const GridToolbarExport = forwardRef(function GridToolbarExport(props, ref) {
|
|
87
88
|
const _ref = props,
|
|
88
89
|
{
|
|
89
90
|
csvOptions = {},
|
|
@@ -11,7 +11,7 @@ interface GridToolbarExportContainerProps {
|
|
|
11
11
|
tooltip?: Partial<TooltipProps>;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
declare const GridToolbarExportContainer: React.ForwardRefExoticComponent<GridToolbarExportContainerProps & {
|
|
14
|
+
declare const GridToolbarExportContainer: React.ForwardRefExoticComponent<React.PropsWithChildren<GridToolbarExportContainerProps>> | React.ForwardRefExoticComponent<GridToolbarExportContainerProps & {
|
|
15
15
|
children?: React.ReactNode | undefined;
|
|
16
16
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
export { GridToolbarExportContainer };
|
|
@@ -2,13 +2,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
5
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
5
6
|
import { isHideMenuKey } from "../../utils/keyboardUtils.js";
|
|
6
7
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
7
8
|
import { GridMenu } from "../menu/GridMenu.js";
|
|
8
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { gridClasses } from "../../constants/gridClasses.js";
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
const GridToolbarExportContainer =
|
|
12
|
+
const GridToolbarExportContainer = forwardRef(function GridToolbarExportContainer(props, ref) {
|
|
12
13
|
const {
|
|
13
14
|
children,
|
|
14
15
|
slotProps = {}
|
|
@@ -42,9 +43,8 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
42
43
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
43
44
|
title: apiRef.current.getLocaleText('toolbarExportLabel'),
|
|
44
45
|
enterDelay: 1000
|
|
45
|
-
},
|
|
46
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
46
47
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
47
|
-
ref: handleRef,
|
|
48
48
|
size: "small",
|
|
49
49
|
startIcon: /*#__PURE__*/_jsx(rootProps.slots.exportIcon, {}),
|
|
50
50
|
"aria-expanded": open,
|
|
@@ -52,9 +52,9 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
52
52
|
"aria-haspopup": "menu",
|
|
53
53
|
"aria-controls": open ? exportMenuId : undefined,
|
|
54
54
|
id: exportButtonId
|
|
55
|
-
}, buttonProps, {
|
|
56
|
-
onClick: handleMenuOpen
|
|
57
|
-
|
|
55
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
56
|
+
onClick: handleMenuOpen,
|
|
57
|
+
ref: handleRef,
|
|
58
58
|
children: apiRef.current.getLocaleText('toolbarExport')
|
|
59
59
|
}))
|
|
60
60
|
})), /*#__PURE__*/_jsx(GridMenu, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
3
|
import { TooltipProps } from '@mui/material/Tooltip';
|
|
4
|
+
import { BadgeProps } from '../../models/gridBaseSlots';
|
|
4
5
|
export interface GridToolbarFilterButtonProps {
|
|
5
6
|
/**
|
|
6
7
|
* The props used for each slot inside.
|
|
@@ -9,7 +10,8 @@ export interface GridToolbarFilterButtonProps {
|
|
|
9
10
|
slotProps?: {
|
|
10
11
|
button?: Partial<ButtonProps>;
|
|
11
12
|
tooltip?: Partial<TooltipProps>;
|
|
13
|
+
badge?: Partial<BadgeProps>;
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
|
-
declare const GridToolbarFilterButton: React.ForwardRefExoticComponent<GridToolbarFilterButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
declare const GridToolbarFilterButton: React.ForwardRefExoticComponent<GridToolbarFilterButtonProps> | React.ForwardRefExoticComponent<GridToolbarFilterButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
17
|
export { GridToolbarFilterButton };
|