@mui/x-data-grid 8.0.0-alpha.0 → 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 +2215 -119
- 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 +3 -3
- 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 +3 -3
- package/components/GridLoadingOverlay.js +14 -12
- 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 +52 -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 +2 -0
- package/components/columnsManagement/GridColumnsManagement.js +81 -11
- 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 +36 -12
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +12 -0
- 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 +34 -69
- 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 +7 -4
- package/internals/index.js +5 -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 +14 -0
- package/locales/beBY.js +13 -0
- package/locales/bgBG.js +15 -0
- package/locales/csCZ.js +15 -0
- package/locales/daDK.js +15 -0
- package/locales/deDE.js +13 -0
- package/locales/elGR.js +14 -0
- package/locales/esES.js +17 -4
- package/locales/faIR.js +18 -4
- package/locales/fiFI.js +15 -0
- package/locales/frFR.js +15 -0
- package/locales/heIL.js +17 -4
- package/locales/hrHR.js +15 -0
- package/locales/huHU.js +15 -0
- package/locales/isIS.js +14 -0
- package/locales/itIT.js +15 -0
- package/locales/jaJP.js +15 -0
- package/locales/koKR.js +47 -37
- package/locales/nbNO.js +15 -0
- package/locales/nlNL.js +18 -4
- package/locales/nnNO.js +15 -0
- package/locales/plPL.js +15 -0
- package/locales/ptBR.js +13 -0
- package/locales/ptPT.js +13 -0
- package/locales/roRO.js +21 -9
- package/locales/ruRU.js +15 -0
- package/locales/skSK.js +14 -0
- package/locales/svSE.js +19 -5
- package/locales/trTR.js +15 -2
- package/locales/ukUA.js +14 -0
- package/locales/urPK.js +22 -9
- package/locales/viVN.js +15 -0
- package/locales/zhCN.js +17 -4
- package/locales/zhHK.js +14 -0
- package/locales/zhTW.js +14 -0
- 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 +11 -0
- 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 +38 -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 +13 -13
- 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 +14 -12
- 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 +52 -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 +81 -11
- 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 +12 -0
- 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 +34 -69
- 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 +5 -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 +14 -0
- package/modern/locales/beBY.js +13 -0
- package/modern/locales/bgBG.js +15 -0
- package/modern/locales/csCZ.js +15 -0
- package/modern/locales/daDK.js +15 -0
- package/modern/locales/deDE.js +13 -0
- package/modern/locales/elGR.js +14 -0
- package/modern/locales/esES.js +17 -4
- package/modern/locales/faIR.js +18 -4
- package/modern/locales/fiFI.js +15 -0
- package/modern/locales/frFR.js +15 -0
- package/modern/locales/heIL.js +17 -4
- package/modern/locales/hrHR.js +15 -0
- package/modern/locales/huHU.js +15 -0
- package/modern/locales/isIS.js +14 -0
- package/modern/locales/itIT.js +15 -0
- package/modern/locales/jaJP.js +15 -0
- package/modern/locales/koKR.js +47 -37
- package/modern/locales/nbNO.js +15 -0
- package/modern/locales/nlNL.js +18 -4
- package/modern/locales/nnNO.js +15 -0
- package/modern/locales/plPL.js +15 -0
- package/modern/locales/ptBR.js +13 -0
- package/modern/locales/ptPT.js +13 -0
- package/modern/locales/roRO.js +21 -9
- package/modern/locales/ruRU.js +15 -0
- package/modern/locales/skSK.js +14 -0
- package/modern/locales/svSE.js +19 -5
- package/modern/locales/trTR.js +15 -2
- package/modern/locales/ukUA.js +14 -0
- package/modern/locales/urPK.js +22 -9
- package/modern/locales/viVN.js +15 -0
- package/modern/locales/zhCN.js +17 -4
- package/modern/locales/zhHK.js +14 -0
- package/modern/locales/zhTW.js +14 -0
- 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 +14 -12
- 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 +51 -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 +81 -11
- 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 +12 -0
- 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 +32 -67
- 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 +36 -24
- 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 +14 -0
- package/node/locales/beBY.js +13 -0
- package/node/locales/bgBG.js +15 -0
- package/node/locales/csCZ.js +15 -0
- package/node/locales/daDK.js +15 -0
- package/node/locales/deDE.js +13 -0
- package/node/locales/elGR.js +14 -0
- package/node/locales/esES.js +17 -4
- package/node/locales/faIR.js +18 -4
- package/node/locales/fiFI.js +15 -0
- package/node/locales/frFR.js +15 -0
- package/node/locales/heIL.js +17 -4
- package/node/locales/hrHR.js +15 -0
- package/node/locales/huHU.js +15 -0
- package/node/locales/isIS.js +14 -0
- package/node/locales/itIT.js +15 -0
- package/node/locales/jaJP.js +15 -0
- package/node/locales/koKR.js +47 -37
- package/node/locales/nbNO.js +15 -0
- package/node/locales/nlNL.js +18 -4
- package/node/locales/nnNO.js +15 -0
- package/node/locales/plPL.js +15 -0
- package/node/locales/ptBR.js +13 -0
- package/node/locales/ptPT.js +13 -0
- package/node/locales/roRO.js +21 -9
- package/node/locales/ruRU.js +15 -0
- package/node/locales/skSK.js +14 -0
- package/node/locales/svSE.js +19 -5
- package/node/locales/trTR.js +15 -2
- package/node/locales/ukUA.js +14 -0
- package/node/locales/urPK.js +22 -9
- package/node/locales/viVN.js +15 -0
- package/node/locales/zhCN.js +17 -4
- package/node/locales/zhHK.js +14 -0
- package/node/locales/zhTW.js +14 -0
- 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 +5 -5
- 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 -384
- 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 -384
- 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 -392
- /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,11 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
4
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
5
3
|
import { GridPreferencePanelsValue } from "../../../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js";
|
|
6
4
|
import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
|
|
7
5
|
import { useGridRootProps } from "../../../../hooks/utils/useGridRootProps.js";
|
|
8
|
-
import { jsx as _jsx
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
7
|
function GridColumnMenuManageItem(props) {
|
|
10
8
|
const {
|
|
11
9
|
onClick
|
|
@@ -19,15 +17,12 @@ function GridColumnMenuManageItem(props) {
|
|
|
19
17
|
if (rootProps.disableColumnSelector) {
|
|
20
18
|
return null;
|
|
21
19
|
}
|
|
22
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
23
21
|
onClick: showColumns,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
29
|
-
children: apiRef.current.getLocaleText('columnMenuManageColumns')
|
|
30
|
-
})]
|
|
22
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuManageColumnsIcon, {
|
|
23
|
+
fontSize: "small"
|
|
24
|
+
}),
|
|
25
|
+
children: apiRef.current.getLocaleText('columnMenuManageColumns')
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
28
|
process.env.NODE_ENV !== "production" ? GridColumnMenuManageItem.propTypes = {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
4
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
5
3
|
import { useGridSelector } from "../../../../hooks/utils/useGridSelector.js";
|
|
6
4
|
import { gridSortModelSelector } from "../../../../hooks/features/sorting/gridSortingSelector.js";
|
|
7
5
|
import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
|
|
@@ -36,31 +34,24 @@ function GridColumnMenuSortItem(props) {
|
|
|
36
34
|
return typeof label === 'function' ? label(colDef) : label;
|
|
37
35
|
};
|
|
38
36
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
39
|
-
children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/
|
|
37
|
+
children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
40
38
|
onClick: onSortMenuItemClick,
|
|
41
39
|
"data-value": "asc",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
children: getLabel('columnMenuSortAsc')
|
|
48
|
-
})]
|
|
49
|
-
}) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
|
|
40
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortAscendingIcon, {
|
|
41
|
+
fontSize: "small"
|
|
42
|
+
}),
|
|
43
|
+
children: getLabel('columnMenuSortAsc')
|
|
44
|
+
}) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
50
45
|
onClick: onSortMenuItemClick,
|
|
51
46
|
"data-value": "desc",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children: getLabel('columnMenuSortDesc')
|
|
58
|
-
})]
|
|
59
|
-
}) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
|
|
47
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortDescendingIcon, {
|
|
48
|
+
fontSize: "small"
|
|
49
|
+
}),
|
|
50
|
+
children: getLabel('columnMenuSortDesc')
|
|
51
|
+
}) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
60
52
|
onClick: onSortMenuItemClick,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})]
|
|
53
|
+
iconStart: "",
|
|
54
|
+
children: apiRef.current.getLocaleText('columnMenuUnsort')
|
|
64
55
|
}) : null]
|
|
65
56
|
});
|
|
66
57
|
}
|
|
@@ -2,13 +2,12 @@ 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 { GridPanelWrapper } from "./GridPanelWrapper.js";
|
|
5
|
-
import { GridColumnsManagement } from "../columnsManagement/index.js";
|
|
6
5
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
function GridColumnsPanel(props) {
|
|
9
8
|
const rootProps = useGridRootProps();
|
|
10
9
|
return /*#__PURE__*/_jsx(GridPanelWrapper, _extends({}, props, {
|
|
11
|
-
children: /*#__PURE__*/_jsx(
|
|
10
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))
|
|
12
11
|
}));
|
|
13
12
|
}
|
|
14
13
|
process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
@@ -9,6 +9,7 @@ import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/
|
|
|
9
9
|
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
10
10
|
import Paper from '@mui/material/Paper';
|
|
11
11
|
import Popper from '@mui/material/Popper';
|
|
12
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
12
13
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
13
14
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -36,7 +37,7 @@ const GridPaperRoot = styled(Paper, {
|
|
|
36
37
|
maxWidth: `calc(100vw - ${theme.spacing(0.5)})`,
|
|
37
38
|
overflow: 'auto'
|
|
38
39
|
}));
|
|
39
|
-
const GridPanel =
|
|
40
|
+
const GridPanel = forwardRef((props, ref) => {
|
|
40
41
|
const {
|
|
41
42
|
children,
|
|
42
43
|
className
|
|
@@ -82,15 +83,16 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
82
83
|
return null;
|
|
83
84
|
}
|
|
84
85
|
return /*#__PURE__*/_jsx(GridPanelRoot, _extends({
|
|
85
|
-
ref: ref,
|
|
86
86
|
placement: "bottom-start",
|
|
87
87
|
className: clsx(classes.panel, className),
|
|
88
88
|
ownerState: rootProps,
|
|
89
89
|
anchorEl: anchorEl,
|
|
90
90
|
modifiers: modifiers
|
|
91
91
|
}, other, {
|
|
92
|
+
ref: ref,
|
|
92
93
|
children: /*#__PURE__*/_jsx(ClickAwayListener, {
|
|
93
|
-
mouseEvent: "
|
|
94
|
+
mouseEvent: "onPointerUp",
|
|
95
|
+
touchEvent: false,
|
|
94
96
|
onClickAway: handleClickAway,
|
|
95
97
|
children: /*#__PURE__*/_jsx(GridPaperRoot, {
|
|
96
98
|
className: classes.paper,
|
|
@@ -22,13 +22,17 @@ const GridPanelContentRoot = styled('div', {
|
|
|
22
22
|
name: 'MuiDataGrid',
|
|
23
23
|
slot: 'PanelContent',
|
|
24
24
|
overridesResolver: (props, styles) => styles.panelContent
|
|
25
|
-
})({
|
|
25
|
+
})(({
|
|
26
|
+
theme
|
|
27
|
+
}) => ({
|
|
26
28
|
display: 'flex',
|
|
27
29
|
flexDirection: 'column',
|
|
28
30
|
overflow: 'auto',
|
|
29
31
|
flex: '1 1',
|
|
30
|
-
maxHeight: 400
|
|
31
|
-
|
|
32
|
+
maxHeight: 400,
|
|
33
|
+
padding: theme.spacing(2.5, 1.5, 2, 1),
|
|
34
|
+
gap: theme.spacing(2.5)
|
|
35
|
+
}));
|
|
32
36
|
function GridPanelContent(props) {
|
|
33
37
|
const {
|
|
34
38
|
className
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { styled } from '@mui/
|
|
7
|
+
import { styled } from '@mui/material/styles';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -25,9 +25,10 @@ const GridPanelFooterRoot = styled('div', {
|
|
|
25
25
|
})(({
|
|
26
26
|
theme
|
|
27
27
|
}) => ({
|
|
28
|
-
padding: theme.spacing(
|
|
28
|
+
padding: theme.spacing(1),
|
|
29
29
|
display: 'flex',
|
|
30
|
-
justifyContent: 'space-between'
|
|
30
|
+
justifyContent: 'space-between',
|
|
31
|
+
borderTop: `1px solid ${theme.palette.divider}`
|
|
31
32
|
}));
|
|
32
33
|
function GridPanelFooter(props) {
|
|
33
34
|
const {
|
|
@@ -7,6 +7,7 @@ import clsx from 'clsx';
|
|
|
7
7
|
import FocusTrap from '@mui/material/Unstable_TrapFocus';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
11
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,7 +33,7 @@ const GridPanelWrapperRoot = styled('div', {
|
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
35
|
const isEnabled = () => true;
|
|
35
|
-
const GridPanelWrapper =
|
|
36
|
+
const GridPanelWrapper = forwardRef(function GridPanelWrapper(props, ref) {
|
|
36
37
|
const {
|
|
37
38
|
className,
|
|
38
39
|
slotProps = {}
|
|
@@ -46,11 +47,12 @@ const GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper
|
|
|
46
47
|
isEnabled: isEnabled
|
|
47
48
|
}, slotProps.TrapFocus, {
|
|
48
49
|
children: /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({
|
|
49
|
-
ref: ref,
|
|
50
50
|
tabIndex: -1,
|
|
51
51
|
className: clsx(classes.root, className),
|
|
52
52
|
ownerState: rootProps
|
|
53
|
-
}, other
|
|
53
|
+
}, other, {
|
|
54
|
+
ref: ref
|
|
55
|
+
}))
|
|
54
56
|
}));
|
|
55
57
|
});
|
|
56
58
|
process.env.NODE_ENV !== "production" ? GridPanelWrapper.propTypes = {
|
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_capitalize as capitalize } from '@mui/utils';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
11
|
import { gridFilterableColumnDefinitionsSelector, gridColumnLookupSelector } from "../../../hooks/features/columns/gridColumnsSelector.js";
|
|
11
12
|
import { gridFilterModelSelector } from "../../../hooks/features/filter/gridFilterSelector.js";
|
|
12
13
|
import { useGridSelector } from "../../../hooks/utils/useGridSelector.js";
|
|
@@ -39,27 +40,22 @@ const GridFilterFormRoot = styled('div', {
|
|
|
39
40
|
theme
|
|
40
41
|
}) => ({
|
|
41
42
|
display: 'flex',
|
|
42
|
-
|
|
43
|
+
gap: theme.spacing(1.5)
|
|
43
44
|
}));
|
|
44
45
|
const FilterFormDeleteIcon = styled('div', {
|
|
45
46
|
name: 'MuiDataGrid',
|
|
46
47
|
slot: 'FilterFormDeleteIcon',
|
|
47
48
|
overridesResolver: (_, styles) => styles.filterFormDeleteIcon
|
|
48
|
-
})(
|
|
49
|
-
theme
|
|
50
|
-
}) => ({
|
|
49
|
+
})({
|
|
51
50
|
flexShrink: 0,
|
|
52
|
-
justifyContent: '
|
|
53
|
-
|
|
54
|
-
marginBottom: theme.spacing(0.2)
|
|
55
|
-
}));
|
|
51
|
+
justifyContent: 'center'
|
|
52
|
+
});
|
|
56
53
|
const FilterFormLogicOperatorInput = styled('div', {
|
|
57
54
|
name: 'MuiDataGrid',
|
|
58
55
|
slot: 'FilterFormLogicOperatorInput',
|
|
59
56
|
overridesResolver: (_, styles) => styles.filterFormLogicOperatorInput
|
|
60
57
|
})({
|
|
61
|
-
minWidth:
|
|
62
|
-
marginRight: 5,
|
|
58
|
+
minWidth: 75,
|
|
63
59
|
justifyContent: 'end'
|
|
64
60
|
});
|
|
65
61
|
const FilterFormColumnInput = styled('div', {
|
|
@@ -95,7 +91,7 @@ const getLogicOperatorLocaleKey = logicOperator => {
|
|
|
95
91
|
};
|
|
96
92
|
const getColumnLabel = col => col.headerName || col.field;
|
|
97
93
|
const collator = new Intl.Collator();
|
|
98
|
-
const GridFilterForm =
|
|
94
|
+
const GridFilterForm = forwardRef(function GridFilterForm(props, ref) {
|
|
99
95
|
const {
|
|
100
96
|
item,
|
|
101
97
|
hasMultipleFilters,
|
|
@@ -255,13 +251,12 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
255
251
|
}
|
|
256
252
|
}), [currentOperator]);
|
|
257
253
|
return /*#__PURE__*/_jsxs(GridFilterFormRoot, _extends({
|
|
258
|
-
ref: ref,
|
|
259
254
|
className: classes.root,
|
|
260
255
|
"data-id": item.id,
|
|
261
256
|
ownerState: rootProps
|
|
262
257
|
}, other, {
|
|
258
|
+
ref: ref,
|
|
263
259
|
children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({
|
|
264
|
-
variant: "standard",
|
|
265
260
|
as: rootProps.slots.baseFormControl
|
|
266
261
|
}, baseFormControlProps, deleteIconProps, {
|
|
267
262
|
className: clsx(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
|
|
@@ -278,7 +273,8 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
278
273
|
})
|
|
279
274
|
}))
|
|
280
275
|
})), /*#__PURE__*/_jsx(FilterFormLogicOperatorInput, _extends({
|
|
281
|
-
variant: "
|
|
276
|
+
variant: "outlined",
|
|
277
|
+
size: "small",
|
|
282
278
|
as: rootProps.slots.baseFormControl
|
|
283
279
|
}, baseFormControlProps, logicOperatorInputProps, {
|
|
284
280
|
sx: [hasLogicOperatorColumn ? {
|
|
@@ -308,7 +304,8 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
308
304
|
}), apiRef.current.getLocaleText(getLogicOperatorLocaleKey(logicOperator))))
|
|
309
305
|
}))
|
|
310
306
|
})), /*#__PURE__*/_jsxs(FilterFormColumnInput, _extends({
|
|
311
|
-
variant: "
|
|
307
|
+
variant: "outlined",
|
|
308
|
+
size: "small",
|
|
312
309
|
as: rootProps.slots.baseFormControl
|
|
313
310
|
}, baseFormControlProps, columnInputProps, {
|
|
314
311
|
className: clsx(classes.columnInput, baseFormControlProps.className, columnInputProps.className),
|
|
@@ -333,7 +330,8 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
333
330
|
}), getColumnLabel(col)))
|
|
334
331
|
}))]
|
|
335
332
|
})), /*#__PURE__*/_jsxs(FilterFormOperatorInput, _extends({
|
|
336
|
-
variant: "
|
|
333
|
+
variant: "outlined",
|
|
334
|
+
size: "small",
|
|
337
335
|
as: rootProps.slots.baseFormControl
|
|
338
336
|
}, baseFormControlProps, operatorInputProps, {
|
|
339
337
|
className: clsx(classes.operatorInput, baseFormControlProps.className, operatorInputProps.className),
|
|
@@ -359,7 +357,8 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
359
357
|
}), operator.label || apiRef.current.getLocaleText(`filterOperator${capitalize(operator.value)}`)))
|
|
360
358
|
}))]
|
|
361
359
|
})), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({
|
|
362
|
-
variant: "
|
|
360
|
+
variant: "outlined",
|
|
361
|
+
size: "small",
|
|
363
362
|
as: rootProps.slots.baseFormControl
|
|
364
363
|
}, baseFormControlProps, valueInputPropsOther, {
|
|
365
364
|
className: clsx(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
|
|
@@ -369,7 +368,12 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
369
368
|
item: item,
|
|
370
369
|
applyValue: applyFilterChanges,
|
|
371
370
|
focusElementRef: valueRef,
|
|
372
|
-
disabled: readOnly
|
|
371
|
+
disabled: readOnly,
|
|
372
|
+
slotProps: {
|
|
373
|
+
root: {
|
|
374
|
+
size: 'small'
|
|
375
|
+
}
|
|
376
|
+
}
|
|
373
377
|
}, currentOperator.InputComponentProps, InputComponentProps), item.field) : null
|
|
374
378
|
}))]
|
|
375
379
|
}));
|
|
@@ -1,39 +1,21 @@
|
|
|
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", "apiRef", "focusElementRef", "isFilterActive", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "headerFilterMenu", "clearButton", "tabIndex", "slotProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { refType, 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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
export const sanitizeFilterItemValue = value => {
|
|
11
|
-
if (String(value).toLowerCase() === 'true') {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
if (String(value).toLowerCase() === 'false') {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
};
|
|
19
|
-
const BooleanOperatorContainer = styled('div')({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
width: '100%',
|
|
23
|
-
[`& button`]: {
|
|
24
|
-
margin: 'auto 0px 5px 5px'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
9
|
function GridFilterInputBoolean(props) {
|
|
28
10
|
const {
|
|
29
11
|
item,
|
|
30
12
|
applyValue,
|
|
31
13
|
apiRef,
|
|
32
14
|
focusElementRef,
|
|
15
|
+
headerFilterMenu,
|
|
33
16
|
clearButton,
|
|
34
17
|
tabIndex,
|
|
35
|
-
|
|
36
|
-
variant = 'standard'
|
|
18
|
+
slotProps
|
|
37
19
|
} = props,
|
|
38
20
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
39
21
|
const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
|
|
@@ -53,14 +35,15 @@ function GridFilterInputBoolean(props) {
|
|
|
53
35
|
React.useEffect(() => {
|
|
54
36
|
setFilterValueState(sanitizeFilterItemValue(item.value));
|
|
55
37
|
}, [item.value]);
|
|
56
|
-
const label =
|
|
57
|
-
|
|
38
|
+
const label = slotProps?.root.label ?? apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
39
|
+
const rootSlotProps = slotProps?.root.slotProps;
|
|
40
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
58
41
|
children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
|
|
59
42
|
fullWidth: true,
|
|
60
43
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, rootProps.slotProps?.baseInputLabel, {
|
|
61
44
|
id: labelId,
|
|
62
45
|
shrink: true,
|
|
63
|
-
variant:
|
|
46
|
+
variant: "outlined",
|
|
64
47
|
children: label
|
|
65
48
|
})), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
|
|
66
49
|
labelId: labelId,
|
|
@@ -68,15 +51,15 @@ function GridFilterInputBoolean(props) {
|
|
|
68
51
|
label: label,
|
|
69
52
|
value: filterValueState === undefined ? '' : String(filterValueState),
|
|
70
53
|
onChange: onFilterChange,
|
|
71
|
-
variant:
|
|
72
|
-
notched:
|
|
54
|
+
variant: "outlined",
|
|
55
|
+
notched: true,
|
|
73
56
|
native: isSelectNative,
|
|
74
57
|
displayEmpty: true,
|
|
75
|
-
inputProps: {
|
|
58
|
+
inputProps: _extends({
|
|
76
59
|
ref: focusElementRef,
|
|
77
60
|
tabIndex
|
|
78
|
-
}
|
|
79
|
-
}, others /* FIXME: typing error */,
|
|
61
|
+
}, rootSlotProps?.htmlInput)
|
|
62
|
+
}, baseSelectProps, others /* FIXME: typing error */, slotProps?.root, {
|
|
80
63
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
81
64
|
native: isSelectNative,
|
|
82
65
|
value: "",
|
|
@@ -91,9 +74,18 @@ function GridFilterInputBoolean(props) {
|
|
|
91
74
|
children: apiRef.current.getLocaleText('filterValueFalse')
|
|
92
75
|
}))]
|
|
93
76
|
}))]
|
|
94
|
-
}), clearButton]
|
|
77
|
+
}), headerFilterMenu, clearButton]
|
|
95
78
|
});
|
|
96
79
|
}
|
|
80
|
+
export function sanitizeFilterItemValue(value) {
|
|
81
|
+
if (String(value).toLowerCase() === 'true') {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
if (String(value).toLowerCase() === 'false') {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
97
89
|
process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
98
90
|
// ----------------------------- Warning --------------------------------
|
|
99
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -103,8 +95,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
|
103
95
|
current: PropTypes.object.isRequired
|
|
104
96
|
}).isRequired,
|
|
105
97
|
applyValue: PropTypes.func.isRequired,
|
|
98
|
+
className: PropTypes.string,
|
|
106
99
|
clearButton: PropTypes.node,
|
|
100
|
+
disabled: PropTypes.bool,
|
|
107
101
|
focusElementRef: refType,
|
|
102
|
+
headerFilterMenu: PropTypes.node,
|
|
103
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
104
|
+
current: (props, propName) => {
|
|
105
|
+
if (props[propName] == null) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
109
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
})]),
|
|
108
114
|
/**
|
|
109
115
|
* It is `true` if the filter either has a value or an operator with no value
|
|
110
116
|
* required is selected (for example `isEmpty`)
|
|
@@ -115,6 +121,10 @@ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
|
115
121
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
116
122
|
operator: PropTypes.string.isRequired,
|
|
117
123
|
value: PropTypes.any
|
|
118
|
-
}).isRequired
|
|
124
|
+
}).isRequired,
|
|
125
|
+
onBlur: PropTypes.func,
|
|
126
|
+
onFocus: PropTypes.func,
|
|
127
|
+
slotProps: PropTypes.object,
|
|
128
|
+
tabIndex: PropTypes.number
|
|
119
129
|
} : void 0;
|
|
120
130
|
export { GridFilterInputBoolean };
|
|
@@ -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", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps", "isFilterActive", "headerFilterMenu", "clearButton", "tabIndex", "disabled"];
|
|
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 convertFilterItemValueToInputValue(itemValue, inputType) {
|
|
11
11
|
if (itemValue == null) {
|
|
12
12
|
return '';
|
|
@@ -34,12 +34,14 @@ function GridFilterInputDate(props) {
|
|
|
34
34
|
type,
|
|
35
35
|
apiRef,
|
|
36
36
|
focusElementRef,
|
|
37
|
-
|
|
37
|
+
slotProps,
|
|
38
|
+
headerFilterMenu,
|
|
38
39
|
clearButton,
|
|
39
40
|
tabIndex,
|
|
40
41
|
disabled
|
|
41
42
|
} = props,
|
|
42
43
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
44
|
+
const rootSlotProps = slotProps?.root.slotProps;
|
|
43
45
|
const filterTimeout = useTimeout();
|
|
44
46
|
const [filterValueState, setFilterValueState] = React.useState(() => convertFilterItemValueToInputValue(item.value, type));
|
|
45
47
|
const [applying, setIsApplying] = React.useState(false);
|
|
@@ -62,33 +64,31 @@ function GridFilterInputDate(props) {
|
|
|
62
64
|
const value = convertFilterItemValueToInputValue(item.value, type);
|
|
63
65
|
setFilterValueState(value);
|
|
64
66
|
}, [item.value, type]);
|
|
65
|
-
return /*#__PURE__*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
})
|
|
91
|
-
}, other, rootProps.slotProps?.baseTextField));
|
|
67
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
68
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
|
|
69
|
+
fullWidth: true,
|
|
70
|
+
id: id,
|
|
71
|
+
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
72
|
+
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
73
|
+
value: filterValueState,
|
|
74
|
+
onChange: onFilterChange,
|
|
75
|
+
type: type || 'text',
|
|
76
|
+
disabled: disabled,
|
|
77
|
+
inputRef: focusElementRef,
|
|
78
|
+
slotProps: _extends({}, rootSlotProps, {
|
|
79
|
+
input: _extends({
|
|
80
|
+
endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
|
|
81
|
+
fontSize: "small",
|
|
82
|
+
color: "action"
|
|
83
|
+
}) : null
|
|
84
|
+
}, rootSlotProps?.input),
|
|
85
|
+
htmlInput: _extends({
|
|
86
|
+
max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',
|
|
87
|
+
tabIndex
|
|
88
|
+
}, rootSlotProps?.htmlInput)
|
|
89
|
+
})
|
|
90
|
+
}, rootProps.slotProps?.baseTextField, other, slotProps?.root)), headerFilterMenu, clearButton]
|
|
91
|
+
});
|
|
92
92
|
}
|
|
93
93
|
process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
94
94
|
// ----------------------------- Warning --------------------------------
|
|
@@ -99,8 +99,22 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
99
99
|
current: PropTypes.object.isRequired
|
|
100
100
|
}).isRequired,
|
|
101
101
|
applyValue: PropTypes.func.isRequired,
|
|
102
|
+
className: PropTypes.string,
|
|
102
103
|
clearButton: PropTypes.node,
|
|
104
|
+
disabled: PropTypes.bool,
|
|
103
105
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
106
|
+
headerFilterMenu: PropTypes.node,
|
|
107
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
108
|
+
current: (props, propName) => {
|
|
109
|
+
if (props[propName] == null) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
113
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
114
|
+
}
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
})]),
|
|
104
118
|
/**
|
|
105
119
|
* It is `true` if the filter either has a value or an operator with no value
|
|
106
120
|
* required is selected (for example `isEmpty`)
|
|
@@ -111,6 +125,11 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
111
125
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
112
126
|
operator: PropTypes.string.isRequired,
|
|
113
127
|
value: PropTypes.any
|
|
114
|
-
}).isRequired
|
|
128
|
+
}).isRequired,
|
|
129
|
+
onBlur: PropTypes.func,
|
|
130
|
+
onFocus: PropTypes.func,
|
|
131
|
+
slotProps: PropTypes.object,
|
|
132
|
+
tabIndex: PropTypes.number,
|
|
133
|
+
type: PropTypes.oneOf(['date', 'datetime-local'])
|
|
115
134
|
} : void 0;
|
|
116
135
|
export { GridFilterInputDate };
|