@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
|
@@ -8,8 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.GridColumnMenuSortItem = GridColumnMenuSortItem;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
12
|
-
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
13
11
|
var _useGridSelector = require("../../../../hooks/utils/useGridSelector");
|
|
14
12
|
var _gridSortingSelector = require("../../../../hooks/features/sorting/gridSortingSelector");
|
|
15
13
|
var _useGridApiContext = require("../../../../hooks/utils/useGridApiContext");
|
|
@@ -44,31 +42,24 @@ function GridColumnMenuSortItem(props) {
|
|
|
44
42
|
return typeof label === 'function' ? label(colDef) : label;
|
|
45
43
|
};
|
|
46
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
47
|
-
children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/(0, _jsxRuntime.
|
|
45
|
+
children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
48
46
|
onClick: onSortMenuItemClick,
|
|
49
47
|
"data-value": "asc",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
children: getLabel('columnMenuSortAsc')
|
|
56
|
-
})]
|
|
57
|
-
}) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
|
|
48
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuSortAscendingIcon, {
|
|
49
|
+
fontSize: "small"
|
|
50
|
+
}),
|
|
51
|
+
children: getLabel('columnMenuSortAsc')
|
|
52
|
+
}) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
58
53
|
onClick: onSortMenuItemClick,
|
|
59
54
|
"data-value": "desc",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
children: getLabel('columnMenuSortDesc')
|
|
66
|
-
})]
|
|
67
|
-
}) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
|
|
55
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuSortDescendingIcon, {
|
|
56
|
+
fontSize: "small"
|
|
57
|
+
}),
|
|
58
|
+
children: getLabel('columnMenuSortDesc')
|
|
59
|
+
}) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
68
60
|
onClick: onSortMenuItemClick,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})]
|
|
61
|
+
iconStart: "",
|
|
62
|
+
children: apiRef.current.getLocaleText('columnMenuUnsort')
|
|
72
63
|
}) : null]
|
|
73
64
|
});
|
|
74
65
|
}
|
|
@@ -10,13 +10,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _GridPanelWrapper = require("./GridPanelWrapper");
|
|
13
|
-
var _columnsManagement = require("../columnsManagement");
|
|
14
13
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function GridColumnsPanel(props) {
|
|
17
16
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
18
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPanelWrapper.GridPanelWrapper, (0, _extends2.default)({}, props, {
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnsManagement, (0, _extends2.default)({}, rootProps.slotProps?.columnsManagement))
|
|
20
19
|
}));
|
|
21
20
|
}
|
|
22
21
|
process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
@@ -16,6 +16,7 @@ var _utils = require("@mui/utils");
|
|
|
16
16
|
var _ClickAwayListener = _interopRequireDefault(require("@mui/material/ClickAwayListener"));
|
|
17
17
|
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
18
18
|
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
19
|
+
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
19
20
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
20
21
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -44,7 +45,7 @@ const GridPaperRoot = (0, _styles.styled)(_Paper.default, {
|
|
|
44
45
|
maxWidth: `calc(100vw - ${theme.spacing(0.5)})`,
|
|
45
46
|
overflow: 'auto'
|
|
46
47
|
}));
|
|
47
|
-
const GridPanel = exports.GridPanel =
|
|
48
|
+
const GridPanel = exports.GridPanel = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
48
49
|
const {
|
|
49
50
|
children,
|
|
50
51
|
className
|
|
@@ -90,15 +91,16 @@ const GridPanel = exports.GridPanel = /*#__PURE__*/React.forwardRef((props, ref)
|
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
92
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPanelRoot, (0, _extends2.default)({
|
|
93
|
-
ref: ref,
|
|
94
94
|
placement: "bottom-start",
|
|
95
95
|
className: (0, _clsx.default)(classes.panel, className),
|
|
96
96
|
ownerState: rootProps,
|
|
97
97
|
anchorEl: anchorEl,
|
|
98
98
|
modifiers: modifiers
|
|
99
99
|
}, other, {
|
|
100
|
+
ref: ref,
|
|
100
101
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, {
|
|
101
|
-
mouseEvent: "
|
|
102
|
+
mouseEvent: "onPointerUp",
|
|
103
|
+
touchEvent: false,
|
|
102
104
|
onClickAway: handleClickAway,
|
|
103
105
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPaperRoot, {
|
|
104
106
|
className: classes.paper,
|
|
@@ -30,13 +30,17 @@ const GridPanelContentRoot = (0, _system.styled)('div', {
|
|
|
30
30
|
name: 'MuiDataGrid',
|
|
31
31
|
slot: 'PanelContent',
|
|
32
32
|
overridesResolver: (props, styles) => styles.panelContent
|
|
33
|
-
})({
|
|
33
|
+
})(({
|
|
34
|
+
theme
|
|
35
|
+
}) => ({
|
|
34
36
|
display: 'flex',
|
|
35
37
|
flexDirection: 'column',
|
|
36
38
|
overflow: 'auto',
|
|
37
39
|
flex: '1 1',
|
|
38
|
-
maxHeight: 400
|
|
39
|
-
|
|
40
|
+
maxHeight: 400,
|
|
41
|
+
padding: theme.spacing(2.5, 1.5, 2, 1),
|
|
42
|
+
gap: theme.spacing(2.5)
|
|
43
|
+
}));
|
|
40
44
|
function GridPanelContent(props) {
|
|
41
45
|
const {
|
|
42
46
|
className
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
-
var
|
|
14
|
+
var _styles = require("@mui/material/styles");
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _gridClasses = require("../../constants/gridClasses");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -26,16 +26,17 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
};
|
|
27
27
|
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
28
28
|
};
|
|
29
|
-
const GridPanelFooterRoot = (0,
|
|
29
|
+
const GridPanelFooterRoot = (0, _styles.styled)('div', {
|
|
30
30
|
name: 'MuiDataGrid',
|
|
31
31
|
slot: 'PanelFooter',
|
|
32
32
|
overridesResolver: (props, styles) => styles.panelFooter
|
|
33
33
|
})(({
|
|
34
34
|
theme
|
|
35
35
|
}) => ({
|
|
36
|
-
padding: theme.spacing(
|
|
36
|
+
padding: theme.spacing(1),
|
|
37
37
|
display: 'flex',
|
|
38
|
-
justifyContent: 'space-between'
|
|
38
|
+
justifyContent: 'space-between',
|
|
39
|
+
borderTop: `1px solid ${theme.palette.divider}`
|
|
39
40
|
}));
|
|
40
41
|
function GridPanelFooter(props) {
|
|
41
42
|
const {
|
|
@@ -14,6 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
14
14
|
var _Unstable_TrapFocus = _interopRequireDefault(require("@mui/material/Unstable_TrapFocus"));
|
|
15
15
|
var _styles = require("@mui/material/styles");
|
|
16
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
17
|
+
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
17
18
|
var _gridClasses = require("../../constants/gridClasses");
|
|
18
19
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -40,7 +41,7 @@ const GridPanelWrapperRoot = (0, _styles.styled)('div', {
|
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
const isEnabled = () => true;
|
|
43
|
-
const GridPanelWrapper = exports.GridPanelWrapper =
|
|
44
|
+
const GridPanelWrapper = exports.GridPanelWrapper = (0, _forwardRef.forwardRef)(function GridPanelWrapper(props, ref) {
|
|
44
45
|
const {
|
|
45
46
|
className,
|
|
46
47
|
slotProps = {}
|
|
@@ -54,11 +55,12 @@ const GridPanelWrapper = exports.GridPanelWrapper = /*#__PURE__*/React.forwardRe
|
|
|
54
55
|
isEnabled: isEnabled
|
|
55
56
|
}, slotProps.TrapFocus, {
|
|
56
57
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPanelWrapperRoot, (0, _extends2.default)({
|
|
57
|
-
ref: ref,
|
|
58
58
|
tabIndex: -1,
|
|
59
59
|
className: (0, _clsx.default)(classes.root, className),
|
|
60
60
|
ownerState: rootProps
|
|
61
|
-
}, other
|
|
61
|
+
}, other, {
|
|
62
|
+
ref: ref
|
|
63
|
+
}))
|
|
62
64
|
}));
|
|
63
65
|
});
|
|
64
66
|
process.env.NODE_ENV !== "production" ? GridPanelWrapper.propTypes = {
|
|
@@ -14,6 +14,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var _utils = require("@mui/utils");
|
|
15
15
|
var _styles = require("@mui/material/styles");
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
+
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
17
18
|
var _gridColumnsSelector = require("../../../hooks/features/columns/gridColumnsSelector");
|
|
18
19
|
var _gridFilterSelector = require("../../../hooks/features/filter/gridFilterSelector");
|
|
19
20
|
var _useGridSelector = require("../../../hooks/utils/useGridSelector");
|
|
@@ -47,27 +48,22 @@ const GridFilterFormRoot = (0, _styles.styled)('div', {
|
|
|
47
48
|
theme
|
|
48
49
|
}) => ({
|
|
49
50
|
display: 'flex',
|
|
50
|
-
|
|
51
|
+
gap: theme.spacing(1.5)
|
|
51
52
|
}));
|
|
52
53
|
const FilterFormDeleteIcon = (0, _styles.styled)('div', {
|
|
53
54
|
name: 'MuiDataGrid',
|
|
54
55
|
slot: 'FilterFormDeleteIcon',
|
|
55
56
|
overridesResolver: (_, styles) => styles.filterFormDeleteIcon
|
|
56
|
-
})(
|
|
57
|
-
theme
|
|
58
|
-
}) => ({
|
|
57
|
+
})({
|
|
59
58
|
flexShrink: 0,
|
|
60
|
-
justifyContent: '
|
|
61
|
-
|
|
62
|
-
marginBottom: theme.spacing(0.2)
|
|
63
|
-
}));
|
|
59
|
+
justifyContent: 'center'
|
|
60
|
+
});
|
|
64
61
|
const FilterFormLogicOperatorInput = (0, _styles.styled)('div', {
|
|
65
62
|
name: 'MuiDataGrid',
|
|
66
63
|
slot: 'FilterFormLogicOperatorInput',
|
|
67
64
|
overridesResolver: (_, styles) => styles.filterFormLogicOperatorInput
|
|
68
65
|
})({
|
|
69
|
-
minWidth:
|
|
70
|
-
marginRight: 5,
|
|
66
|
+
minWidth: 75,
|
|
71
67
|
justifyContent: 'end'
|
|
72
68
|
});
|
|
73
69
|
const FilterFormColumnInput = (0, _styles.styled)('div', {
|
|
@@ -103,7 +99,7 @@ const getLogicOperatorLocaleKey = logicOperator => {
|
|
|
103
99
|
};
|
|
104
100
|
const getColumnLabel = col => col.headerName || col.field;
|
|
105
101
|
const collator = new Intl.Collator();
|
|
106
|
-
const GridFilterForm = exports.GridFilterForm =
|
|
102
|
+
const GridFilterForm = exports.GridFilterForm = (0, _forwardRef.forwardRef)(function GridFilterForm(props, ref) {
|
|
107
103
|
const {
|
|
108
104
|
item,
|
|
109
105
|
hasMultipleFilters,
|
|
@@ -263,13 +259,12 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
263
259
|
}
|
|
264
260
|
}), [currentOperator]);
|
|
265
261
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridFilterFormRoot, (0, _extends2.default)({
|
|
266
|
-
ref: ref,
|
|
267
262
|
className: classes.root,
|
|
268
263
|
"data-id": item.id,
|
|
269
264
|
ownerState: rootProps
|
|
270
265
|
}, other, {
|
|
266
|
+
ref: ref,
|
|
271
267
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormDeleteIcon, (0, _extends2.default)({
|
|
272
|
-
variant: "standard",
|
|
273
268
|
as: rootProps.slots.baseFormControl
|
|
274
269
|
}, baseFormControlProps, deleteIconProps, {
|
|
275
270
|
className: (0, _clsx.default)(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
|
|
@@ -286,7 +281,8 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
286
281
|
})
|
|
287
282
|
}))
|
|
288
283
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormLogicOperatorInput, (0, _extends2.default)({
|
|
289
|
-
variant: "
|
|
284
|
+
variant: "outlined",
|
|
285
|
+
size: "small",
|
|
290
286
|
as: rootProps.slots.baseFormControl
|
|
291
287
|
}, baseFormControlProps, logicOperatorInputProps, {
|
|
292
288
|
sx: [hasLogicOperatorColumn ? {
|
|
@@ -316,7 +312,8 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
316
312
|
}), apiRef.current.getLocaleText(getLogicOperatorLocaleKey(logicOperator))))
|
|
317
313
|
}))
|
|
318
314
|
})), /*#__PURE__*/(0, _jsxRuntime.jsxs)(FilterFormColumnInput, (0, _extends2.default)({
|
|
319
|
-
variant: "
|
|
315
|
+
variant: "outlined",
|
|
316
|
+
size: "small",
|
|
320
317
|
as: rootProps.slots.baseFormControl
|
|
321
318
|
}, baseFormControlProps, columnInputProps, {
|
|
322
319
|
className: (0, _clsx.default)(classes.columnInput, baseFormControlProps.className, columnInputProps.className),
|
|
@@ -341,7 +338,8 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
341
338
|
}), getColumnLabel(col)))
|
|
342
339
|
}))]
|
|
343
340
|
})), /*#__PURE__*/(0, _jsxRuntime.jsxs)(FilterFormOperatorInput, (0, _extends2.default)({
|
|
344
|
-
variant: "
|
|
341
|
+
variant: "outlined",
|
|
342
|
+
size: "small",
|
|
345
343
|
as: rootProps.slots.baseFormControl
|
|
346
344
|
}, baseFormControlProps, operatorInputProps, {
|
|
347
345
|
className: (0, _clsx.default)(classes.operatorInput, baseFormControlProps.className, operatorInputProps.className),
|
|
@@ -367,7 +365,8 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
367
365
|
}), operator.label || apiRef.current.getLocaleText(`filterOperator${(0, _utils.unstable_capitalize)(operator.value)}`)))
|
|
368
366
|
}))]
|
|
369
367
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormValueInput, (0, _extends2.default)({
|
|
370
|
-
variant: "
|
|
368
|
+
variant: "outlined",
|
|
369
|
+
size: "small",
|
|
371
370
|
as: rootProps.slots.baseFormControl
|
|
372
371
|
}, baseFormControlProps, valueInputPropsOther, {
|
|
373
372
|
className: (0, _clsx.default)(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
|
|
@@ -377,7 +376,12 @@ const GridFilterForm = exports.GridFilterForm = /*#__PURE__*/React.forwardRef(fu
|
|
|
377
376
|
item: item,
|
|
378
377
|
applyValue: applyFilterChanges,
|
|
379
378
|
focusElementRef: valueRef,
|
|
380
|
-
disabled: readOnly
|
|
379
|
+
disabled: readOnly,
|
|
380
|
+
slotProps: {
|
|
381
|
+
root: {
|
|
382
|
+
size: 'small'
|
|
383
|
+
}
|
|
384
|
+
}
|
|
381
385
|
}, currentOperator.InputComponentProps, InputComponentProps), item.field) : null
|
|
382
386
|
}))]
|
|
383
387
|
}));
|
|
@@ -6,44 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.GridFilterInputBoolean = GridFilterInputBoolean;
|
|
9
|
-
exports.sanitizeFilterItemValue =
|
|
9
|
+
exports.sanitizeFilterItemValue = sanitizeFilterItemValue;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _utils = require("@mui/utils");
|
|
15
|
-
var _styles = require("@mui/material/styles");
|
|
16
15
|
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "
|
|
19
|
-
const sanitizeFilterItemValue = value => {
|
|
20
|
-
if (String(value).toLowerCase() === 'true') {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (String(value).toLowerCase() === 'false') {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
};
|
|
28
|
-
exports.sanitizeFilterItemValue = sanitizeFilterItemValue;
|
|
29
|
-
const BooleanOperatorContainer = (0, _styles.styled)('div')({
|
|
30
|
-
display: 'flex',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
width: '100%',
|
|
33
|
-
[`& button`]: {
|
|
34
|
-
margin: 'auto 0px 5px 5px'
|
|
35
|
-
}
|
|
36
|
-
});
|
|
17
|
+
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "headerFilterMenu", "clearButton", "tabIndex", "slotProps"];
|
|
37
18
|
function GridFilterInputBoolean(props) {
|
|
38
19
|
const {
|
|
39
20
|
item,
|
|
40
21
|
applyValue,
|
|
41
22
|
apiRef,
|
|
42
23
|
focusElementRef,
|
|
24
|
+
headerFilterMenu,
|
|
43
25
|
clearButton,
|
|
44
26
|
tabIndex,
|
|
45
|
-
|
|
46
|
-
variant = 'standard'
|
|
27
|
+
slotProps
|
|
47
28
|
} = props,
|
|
48
29
|
others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
49
30
|
const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
|
|
@@ -63,14 +44,15 @@ function GridFilterInputBoolean(props) {
|
|
|
63
44
|
React.useEffect(() => {
|
|
64
45
|
setFilterValueState(sanitizeFilterItemValue(item.value));
|
|
65
46
|
}, [item.value]);
|
|
66
|
-
const label =
|
|
67
|
-
|
|
47
|
+
const label = slotProps?.root.label ?? apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
48
|
+
const rootSlotProps = slotProps?.root.slotProps;
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
68
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseFormControl, {
|
|
69
51
|
fullWidth: true,
|
|
70
52
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseInputLabel, (0, _extends2.default)({}, rootProps.slotProps?.baseInputLabel, {
|
|
71
53
|
id: labelId,
|
|
72
54
|
shrink: true,
|
|
73
|
-
variant:
|
|
55
|
+
variant: "outlined",
|
|
74
56
|
children: label
|
|
75
57
|
})), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, (0, _extends2.default)({
|
|
76
58
|
labelId: labelId,
|
|
@@ -78,15 +60,15 @@ function GridFilterInputBoolean(props) {
|
|
|
78
60
|
label: label,
|
|
79
61
|
value: filterValueState === undefined ? '' : String(filterValueState),
|
|
80
62
|
onChange: onFilterChange,
|
|
81
|
-
variant:
|
|
82
|
-
notched:
|
|
63
|
+
variant: "outlined",
|
|
64
|
+
notched: true,
|
|
83
65
|
native: isSelectNative,
|
|
84
66
|
displayEmpty: true,
|
|
85
|
-
inputProps: {
|
|
67
|
+
inputProps: (0, _extends2.default)({
|
|
86
68
|
ref: focusElementRef,
|
|
87
69
|
tabIndex
|
|
88
|
-
}
|
|
89
|
-
}, others /* FIXME: typing error */,
|
|
70
|
+
}, rootSlotProps?.htmlInput)
|
|
71
|
+
}, baseSelectProps, others /* FIXME: typing error */, slotProps?.root, {
|
|
90
72
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSelectOption, (0, _extends2.default)({}, baseSelectOptionProps, {
|
|
91
73
|
native: isSelectNative,
|
|
92
74
|
value: "",
|
|
@@ -101,9 +83,18 @@ function GridFilterInputBoolean(props) {
|
|
|
101
83
|
children: apiRef.current.getLocaleText('filterValueFalse')
|
|
102
84
|
}))]
|
|
103
85
|
}))]
|
|
104
|
-
}), clearButton]
|
|
86
|
+
}), headerFilterMenu, clearButton]
|
|
105
87
|
});
|
|
106
88
|
}
|
|
89
|
+
function sanitizeFilterItemValue(value) {
|
|
90
|
+
if (String(value).toLowerCase() === 'true') {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
if (String(value).toLowerCase() === 'false') {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
107
98
|
process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
108
99
|
// ----------------------------- Warning --------------------------------
|
|
109
100
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -113,8 +104,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
|
113
104
|
current: _propTypes.default.object.isRequired
|
|
114
105
|
}).isRequired,
|
|
115
106
|
applyValue: _propTypes.default.func.isRequired,
|
|
107
|
+
className: _propTypes.default.string,
|
|
116
108
|
clearButton: _propTypes.default.node,
|
|
109
|
+
disabled: _propTypes.default.bool,
|
|
117
110
|
focusElementRef: _utils.refType,
|
|
111
|
+
headerFilterMenu: _propTypes.default.node,
|
|
112
|
+
inputRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
113
|
+
current: (props, propName) => {
|
|
114
|
+
if (props[propName] == null) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
118
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
})]),
|
|
118
123
|
/**
|
|
119
124
|
* It is `true` if the filter either has a value or an operator with no value
|
|
120
125
|
* required is selected (for example `isEmpty`)
|
|
@@ -125,5 +130,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
|
125
130
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
126
131
|
operator: _propTypes.default.string.isRequired,
|
|
127
132
|
value: _propTypes.default.any
|
|
128
|
-
}).isRequired
|
|
133
|
+
}).isRequired,
|
|
134
|
+
onBlur: _propTypes.default.func,
|
|
135
|
+
onFocus: _propTypes.default.func,
|
|
136
|
+
slotProps: _propTypes.default.object,
|
|
137
|
+
tabIndex: _propTypes.default.number
|
|
129
138
|
} : void 0;
|
|
@@ -14,7 +14,7 @@ var _utils = require("@mui/utils");
|
|
|
14
14
|
var _useTimeout = require("../../../hooks/utils/useTimeout");
|
|
15
15
|
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "
|
|
17
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps", "isFilterActive", "headerFilterMenu", "clearButton", "tabIndex", "disabled"];
|
|
18
18
|
function convertFilterItemValueToInputValue(itemValue, inputType) {
|
|
19
19
|
if (itemValue == null) {
|
|
20
20
|
return '';
|
|
@@ -42,12 +42,14 @@ function GridFilterInputDate(props) {
|
|
|
42
42
|
type,
|
|
43
43
|
apiRef,
|
|
44
44
|
focusElementRef,
|
|
45
|
-
|
|
45
|
+
slotProps,
|
|
46
|
+
headerFilterMenu,
|
|
46
47
|
clearButton,
|
|
47
48
|
tabIndex,
|
|
48
49
|
disabled
|
|
49
50
|
} = props,
|
|
50
51
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
52
|
+
const rootSlotProps = slotProps?.root.slotProps;
|
|
51
53
|
const filterTimeout = (0, _useTimeout.useTimeout)();
|
|
52
54
|
const [filterValueState, setFilterValueState] = React.useState(() => convertFilterItemValueToInputValue(item.value, type));
|
|
53
55
|
const [applying, setIsApplying] = React.useState(false);
|
|
@@ -70,33 +72,31 @@ function GridFilterInputDate(props) {
|
|
|
70
72
|
const value = convertFilterItemValueToInputValue(item.value, type);
|
|
71
73
|
setFilterValueState(value);
|
|
72
74
|
}, [item.value, type]);
|
|
73
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
})
|
|
99
|
-
}, other, rootProps.slotProps?.baseTextField));
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
76
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTextField, (0, _extends2.default)({
|
|
77
|
+
fullWidth: true,
|
|
78
|
+
id: id,
|
|
79
|
+
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
80
|
+
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
81
|
+
value: filterValueState,
|
|
82
|
+
onChange: onFilterChange,
|
|
83
|
+
type: type || 'text',
|
|
84
|
+
disabled: disabled,
|
|
85
|
+
inputRef: focusElementRef,
|
|
86
|
+
slotProps: (0, _extends2.default)({}, rootSlotProps, {
|
|
87
|
+
input: (0, _extends2.default)({
|
|
88
|
+
endAdornment: applying ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.loadIcon, {
|
|
89
|
+
fontSize: "small",
|
|
90
|
+
color: "action"
|
|
91
|
+
}) : null
|
|
92
|
+
}, rootSlotProps?.input),
|
|
93
|
+
htmlInput: (0, _extends2.default)({
|
|
94
|
+
max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',
|
|
95
|
+
tabIndex
|
|
96
|
+
}, rootSlotProps?.htmlInput)
|
|
97
|
+
})
|
|
98
|
+
}, rootProps.slotProps?.baseTextField, other, slotProps?.root)), headerFilterMenu, clearButton]
|
|
99
|
+
});
|
|
100
100
|
}
|
|
101
101
|
process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
102
102
|
// ----------------------------- Warning --------------------------------
|
|
@@ -107,8 +107,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
107
107
|
current: _propTypes.default.object.isRequired
|
|
108
108
|
}).isRequired,
|
|
109
109
|
applyValue: _propTypes.default.func.isRequired,
|
|
110
|
+
className: _propTypes.default.string,
|
|
110
111
|
clearButton: _propTypes.default.node,
|
|
112
|
+
disabled: _propTypes.default.bool,
|
|
111
113
|
focusElementRef: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
114
|
+
headerFilterMenu: _propTypes.default.node,
|
|
115
|
+
inputRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
116
|
+
current: (props, propName) => {
|
|
117
|
+
if (props[propName] == null) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
121
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
})]),
|
|
112
126
|
/**
|
|
113
127
|
* It is `true` if the filter either has a value or an operator with no value
|
|
114
128
|
* required is selected (for example `isEmpty`)
|
|
@@ -119,5 +133,10 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
119
133
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
120
134
|
operator: _propTypes.default.string.isRequired,
|
|
121
135
|
value: _propTypes.default.any
|
|
122
|
-
}).isRequired
|
|
136
|
+
}).isRequired,
|
|
137
|
+
onBlur: _propTypes.default.func,
|
|
138
|
+
onFocus: _propTypes.default.func,
|
|
139
|
+
slotProps: _propTypes.default.object,
|
|
140
|
+
tabIndex: _propTypes.default.number,
|
|
141
|
+
type: _propTypes.default.oneOf(['date', 'datetime-local'])
|
|
123
142
|
} : void 0;
|