@mui/x-data-grid 6.4.0 → 6.6.0
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 +134 -2
- package/DataGrid/DataGrid.js +10 -3
- package/DataGrid/useDataGridProps.js +5 -12
- package/README.md +2 -2
- package/colDef/gridNumericOperators.js +0 -6
- package/components/GridColumnHeaders.js +4 -9
- package/components/GridHeader.d.ts +2 -2
- package/components/base/GridBody.d.ts +1 -1
- package/components/base/GridFooterPlaceholder.d.ts +2 -2
- package/components/base/GridOverlays.d.ts +2 -2
- package/components/cell/GridActionsCell.d.ts +3 -3
- package/components/cell/GridActionsCell.js +3 -3
- package/components/cell/GridBooleanCell.d.ts +1 -1
- package/components/cell/GridEditBooleanCell.d.ts +2 -2
- package/components/cell/GridEditDateCell.d.ts +2 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +4 -1
- package/components/cell/GridEditSingleSelectCell.d.ts +3 -3
- package/components/cell/GridEditSingleSelectCell.js +5 -5
- package/components/cell/GridSkeletonCell.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
- package/components/containers/GridRoot.js +1 -3
- package/components/index.d.ts +0 -1
- package/components/index.js +1 -2
- package/components/menu/GridMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +2 -2
- package/components/panel/GridColumnsPanel.d.ts +2 -2
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +3 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +15 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +9 -2
- package/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +9 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +56 -32
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +11 -4
- package/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -1
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/panel/filterPanel/index.d.ts +3 -1
- package/components/panel/filterPanel/index.js +2 -1
- package/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/components/toolbar/GridToolbarExport.d.ts +2 -2
- package/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/components/toolbar/GridToolbarQuickFilter.d.ts +2 -2
- package/constants/localeTextConstants.js +26 -0
- package/context/GridContextProvider.d.ts +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +10 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +10 -3
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/hooks/features/editing/useGridEditing.js +0 -3
- package/hooks/features/filter/gridFilterSelector.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.js +2 -2
- package/hooks/features/filter/gridFilterState.d.ts +6 -6
- package/hooks/features/filter/gridFilterState.js +6 -0
- package/hooks/features/filter/useGridFilter.js +29 -9
- package/hooks/features/focus/gridFocusState.d.ts +2 -0
- package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -0
- package/hooks/features/focus/gridFocusStateSelector.js +6 -0
- package/hooks/features/focus/useGridFocus.js +55 -9
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -0
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
- package/hooks/features/headerFiltering/index.d.ts +1 -0
- package/hooks/features/headerFiltering/index.js +1 -0
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +6 -0
- package/hooks/features/headerFiltering/useGridHeaderFiltering.js +91 -0
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +2 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +113 -4
- package/hooks/features/preferencesPanel/gridPreferencePanelState.d.ts +2 -0
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/hooks/features/rows/useGridRows.js +16 -1
- package/hooks/features/rows/useGridRowsMeta.js +11 -12
- package/index.js +1 -1
- package/internals/index.d.ts +6 -1
- package/internals/index.js +4 -0
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/internals/utils/useProps.d.ts +8 -0
- package/internals/utils/useProps.js +33 -0
- package/legacy/DataGrid/DataGrid.js +10 -3
- package/legacy/DataGrid/useDataGridProps.js +8 -8
- package/legacy/colDef/gridNumericOperators.js +0 -6
- package/legacy/components/GridColumnHeaders.js +4 -9
- package/legacy/components/cell/GridActionsCell.js +3 -3
- package/legacy/components/cell/GridEditInputCell.js +4 -1
- package/legacy/components/cell/GridEditSingleSelectCell.js +5 -5
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/legacy/components/containers/GridRoot.js +1 -3
- package/legacy/components/index.js +1 -2
- package/legacy/components/panel/GridPreferencesPanel.js +3 -1
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +79 -35
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +26 -5
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -31
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +28 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/legacy/components/panel/filterPanel/index.js +2 -1
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +11 -5
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/legacy/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/legacy/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/legacy/constants/localeTextConstants.js +26 -0
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/legacy/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/legacy/hooks/features/editing/useGridEditing.js +0 -3
- package/legacy/hooks/features/filter/gridFilterSelector.js +4 -4
- package/legacy/hooks/features/filter/gridFilterState.js +6 -0
- package/legacy/hooks/features/filter/useGridFilter.js +29 -9
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +10 -0
- package/legacy/hooks/features/focus/useGridFocus.js +58 -9
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +11 -0
- package/legacy/hooks/features/headerFiltering/index.js +1 -0
- package/legacy/hooks/features/headerFiltering/useGridHeaderFiltering.js +93 -0
- package/legacy/hooks/features/index.js +2 -1
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +113 -4
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/legacy/hooks/features/rows/useGridRows.js +16 -1
- package/legacy/hooks/features/rows/useGridRowsMeta.js +12 -20
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +4 -0
- package/legacy/internals/utils/index.js +2 -1
- package/legacy/internals/utils/useProps.js +33 -0
- package/legacy/locales/arSD.js +28 -0
- package/legacy/locales/beBY.js +28 -0
- package/legacy/locales/bgBG.js +28 -0
- package/legacy/locales/csCZ.js +36 -8
- package/legacy/locales/daDK.js +28 -0
- package/legacy/locales/deDE.js +28 -0
- package/legacy/locales/elGR.js +27 -0
- package/legacy/locales/esES.js +28 -0
- package/legacy/locales/faIR.js +28 -0
- package/legacy/locales/fiFI.js +28 -0
- package/legacy/locales/frFR.js +26 -0
- package/legacy/locales/heIL.js +30 -2
- package/legacy/locales/huHU.js +28 -0
- package/legacy/locales/itIT.js +28 -0
- package/legacy/locales/jaJP.js +28 -0
- package/legacy/locales/koKR.js +28 -0
- package/legacy/locales/nbNO.js +28 -0
- package/legacy/locales/nlNL.js +26 -0
- package/legacy/locales/plPL.js +28 -0
- package/legacy/locales/ptBR.js +28 -0
- package/legacy/locales/roRO.js +28 -0
- package/legacy/locales/ruRU.js +28 -0
- package/legacy/locales/skSK.js +28 -0
- package/legacy/locales/svSE.js +28 -0
- package/legacy/locales/trTR.js +28 -0
- package/legacy/locales/ukUA.js +28 -0
- package/legacy/locales/urPK.js +28 -0
- package/legacy/locales/viVN.js +27 -0
- package/legacy/locales/zhCN.js +28 -0
- package/legacy/locales/zhTW.js +28 -0
- package/legacy/material/index.js +2 -0
- package/legacy/models/api/gridHeaderFilteringApi.js +1 -0
- package/legacy/models/gridFilterItem.js +1 -1
- package/legacy/models/gridHeaderFilteringModel.js +1 -0
- package/legacy/models/index.js +0 -1
- package/locales/arSD.js +28 -0
- package/locales/beBY.js +28 -0
- package/locales/bgBG.js +28 -0
- package/locales/csCZ.js +36 -8
- package/locales/daDK.js +28 -0
- package/locales/deDE.js +28 -0
- package/locales/elGR.js +27 -0
- package/locales/esES.js +28 -0
- package/locales/faIR.js +28 -0
- package/locales/fiFI.js +28 -0
- package/locales/frFR.js +26 -0
- package/locales/heIL.js +30 -2
- package/locales/huHU.js +28 -0
- package/locales/itIT.js +28 -0
- package/locales/jaJP.js +28 -0
- package/locales/koKR.js +28 -0
- package/locales/nbNO.js +28 -0
- package/locales/nlNL.js +26 -0
- package/locales/plPL.js +28 -0
- package/locales/ptBR.js +28 -0
- package/locales/roRO.js +28 -0
- package/locales/ruRU.js +28 -0
- package/locales/skSK.js +28 -0
- package/locales/svSE.js +28 -0
- package/locales/trTR.js +28 -0
- package/locales/ukUA.js +28 -0
- package/locales/urPK.js +28 -0
- package/locales/viVN.js +27 -0
- package/locales/zhCN.js +28 -0
- package/locales/zhTW.js +28 -0
- package/material/components/MUISelectOption.d.ts +2 -2
- package/material/index.d.ts +3 -66
- package/material/index.js +2 -0
- package/models/api/gridApiCommon.d.ts +3 -2
- package/models/api/gridCoreApi.d.ts +4 -0
- package/models/api/gridFilterApi.d.ts +3 -1
- package/models/api/gridFocusApi.d.ts +6 -0
- package/models/api/gridHeaderFilteringApi.d.ts +30 -0
- package/models/api/gridHeaderFilteringApi.js +1 -0
- package/models/api/gridLocaleTextApi.d.ts +25 -0
- package/models/api/gridPreferencesPanelApi.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +27 -1
- package/models/gridFilterItem.d.ts +1 -1
- package/models/gridFilterItem.js +1 -1
- package/models/gridFilterOperator.d.ts +5 -1
- package/models/gridHeaderFilteringModel.d.ts +5 -0
- package/models/gridHeaderFilteringModel.js +1 -0
- package/models/gridSlotsComponent.d.ts +16 -4
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -1
- package/models/index.js +0 -1
- package/models/props/DataGridProps.d.ts +5 -0
- package/modern/DataGrid/DataGrid.js +10 -3
- package/modern/DataGrid/useDataGridProps.js +5 -12
- package/modern/colDef/gridNumericOperators.js +0 -6
- package/modern/components/GridColumnHeaders.js +4 -9
- package/modern/components/cell/GridActionsCell.js +3 -3
- package/modern/components/cell/GridEditInputCell.js +4 -1
- package/modern/components/cell/GridEditSingleSelectCell.js +5 -5
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/modern/components/containers/GridRoot.js +1 -3
- package/modern/components/index.js +1 -2
- package/modern/components/panel/GridPreferencesPanel.js +3 -1
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +56 -32
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/panel/filterPanel/index.js +2 -1
- package/modern/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/modern/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/modern/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/modern/constants/localeTextConstants.js +26 -0
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/modern/hooks/features/editing/useGridEditing.js +0 -3
- package/modern/hooks/features/filter/gridFilterSelector.js +2 -2
- package/modern/hooks/features/filter/gridFilterState.js +6 -0
- package/modern/hooks/features/filter/useGridFilter.js +29 -9
- package/modern/hooks/features/focus/gridFocusStateSelector.js +6 -0
- package/modern/hooks/features/focus/useGridFocus.js +55 -9
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
- package/modern/hooks/features/headerFiltering/index.js +1 -0
- package/modern/hooks/features/headerFiltering/useGridHeaderFiltering.js +90 -0
- package/modern/hooks/features/index.js +2 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +113 -4
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/modern/hooks/features/rows/useGridRows.js +16 -1
- package/modern/hooks/features/rows/useGridRowsMeta.js +11 -12
- package/modern/index.js +1 -1
- package/modern/internals/index.js +4 -0
- package/modern/internals/utils/index.js +2 -1
- package/modern/internals/utils/useProps.js +32 -0
- package/modern/locales/arSD.js +28 -0
- package/modern/locales/beBY.js +28 -0
- package/modern/locales/bgBG.js +28 -0
- package/modern/locales/csCZ.js +36 -8
- package/modern/locales/daDK.js +28 -0
- package/modern/locales/deDE.js +28 -0
- package/modern/locales/elGR.js +27 -0
- package/modern/locales/esES.js +28 -0
- package/modern/locales/faIR.js +28 -0
- package/modern/locales/fiFI.js +28 -0
- package/modern/locales/frFR.js +26 -0
- package/modern/locales/heIL.js +30 -2
- package/modern/locales/huHU.js +28 -0
- package/modern/locales/itIT.js +28 -0
- package/modern/locales/jaJP.js +28 -0
- package/modern/locales/koKR.js +28 -0
- package/modern/locales/nbNO.js +28 -0
- package/modern/locales/nlNL.js +26 -0
- package/modern/locales/plPL.js +28 -0
- package/modern/locales/ptBR.js +28 -0
- package/modern/locales/roRO.js +28 -0
- package/modern/locales/ruRU.js +28 -0
- package/modern/locales/skSK.js +28 -0
- package/modern/locales/svSE.js +28 -0
- package/modern/locales/trTR.js +28 -0
- package/modern/locales/ukUA.js +28 -0
- package/modern/locales/urPK.js +28 -0
- package/modern/locales/viVN.js +27 -0
- package/modern/locales/zhCN.js +28 -0
- package/modern/locales/zhTW.js +28 -0
- package/modern/material/index.js +2 -0
- package/modern/models/api/gridHeaderFilteringApi.js +1 -0
- package/modern/models/gridFilterItem.js +1 -1
- package/modern/models/gridHeaderFilteringModel.js +1 -0
- package/modern/models/index.js +0 -1
- package/node/DataGrid/DataGrid.js +10 -3
- package/node/DataGrid/useDataGridProps.js +4 -11
- package/node/colDef/gridNumericOperators.js +0 -6
- package/node/components/GridColumnHeaders.js +3 -8
- package/node/components/cell/GridActionsCell.js +3 -3
- package/node/components/cell/GridEditInputCell.js +4 -1
- package/node/components/cell/GridEditSingleSelectCell.js +5 -5
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +12 -3
- package/node/components/containers/GridRoot.js +1 -3
- package/node/components/index.js +0 -11
- package/node/components/panel/GridPreferencesPanel.js +3 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +78 -35
- package/node/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +56 -32
- package/node/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +2 -1
- package/node/components/panel/filterPanel/index.js +26 -8
- package/node/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/node/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/node/components/toolbar/GridToolbarFilterButton.js +10 -3
- package/node/constants/localeTextConstants.js +26 -0
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/node/hooks/features/editing/useGridEditing.js +0 -3
- package/node/hooks/features/filter/gridFilterSelector.js +2 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -0
- package/node/hooks/features/filter/useGridFilter.js +30 -10
- package/node/hooks/features/focus/gridFocusStateSelector.js +9 -1
- package/node/hooks/features/focus/useGridFocus.js +55 -9
- package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +15 -0
- package/node/hooks/features/headerFiltering/index.js +16 -0
- package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +101 -0
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +113 -4
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/node/hooks/features/rows/useGridRows.js +16 -1
- package/node/hooks/features/rows/useGridRowsMeta.js +11 -12
- package/node/index.js +1 -1
- package/node/internals/index.js +46 -0
- package/node/internals/utils/index.js +11 -0
- package/node/internals/utils/useProps.js +41 -0
- package/node/locales/arSD.js +28 -0
- package/node/locales/beBY.js +28 -0
- package/node/locales/bgBG.js +28 -0
- package/node/locales/csCZ.js +36 -8
- package/node/locales/daDK.js +28 -0
- package/node/locales/deDE.js +28 -0
- package/node/locales/elGR.js +27 -0
- package/node/locales/esES.js +28 -0
- package/node/locales/faIR.js +28 -0
- package/node/locales/fiFI.js +28 -0
- package/node/locales/frFR.js +26 -0
- package/node/locales/heIL.js +30 -2
- package/node/locales/huHU.js +28 -0
- package/node/locales/itIT.js +28 -0
- package/node/locales/jaJP.js +28 -0
- package/node/locales/koKR.js +28 -0
- package/node/locales/nbNO.js +28 -0
- package/node/locales/nlNL.js +26 -0
- package/node/locales/plPL.js +28 -0
- package/node/locales/ptBR.js +28 -0
- package/node/locales/roRO.js +28 -0
- package/node/locales/ruRU.js +28 -0
- package/node/locales/skSK.js +28 -0
- package/node/locales/svSE.js +28 -0
- package/node/locales/trTR.js +28 -0
- package/node/locales/ukUA.js +28 -0
- package/node/locales/urPK.js +28 -0
- package/node/locales/viVN.js +27 -0
- package/node/locales/zhCN.js +28 -0
- package/node/locales/zhTW.js +28 -0
- package/node/material/index.js +2 -0
- package/node/models/api/gridHeaderFilteringApi.js +5 -0
- package/node/models/gridFilterItem.js +1 -1
- package/node/models/gridHeaderFilteringModel.js +5 -0
- package/node/models/index.js +0 -11
- package/package.json +4 -4
- package/components/GridScrollArea.d.ts +0 -10
- package/components/GridScrollArea.js +0 -117
- package/legacy/components/GridScrollArea.js +0 -119
- package/legacy/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/index.d.ts +0 -18
- package/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/types.d.ts +0 -9
- package/modern/components/GridScrollArea.js +0 -117
- package/modern/lib/createDetectElementResize/index.js +0 -145
- package/node/components/GridScrollArea.js +0 -126
- package/node/lib/createDetectElementResize/index.js +0 -151
|
@@ -64,9 +64,7 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
|
64
64
|
role: "grid",
|
|
65
65
|
"aria-colcount": visibleColumns.length,
|
|
66
66
|
"aria-rowcount": headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
|
|
67
|
-
"aria-multiselectable": !rootProps.disableMultipleRowSelection
|
|
68
|
-
"aria-label": rootProps['aria-label'],
|
|
69
|
-
"aria-labelledby": rootProps['aria-labelledby']
|
|
67
|
+
"aria-multiselectable": !rootProps.disableMultipleRowSelection
|
|
70
68
|
}, other, {
|
|
71
69
|
children: children
|
|
72
70
|
}));
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export interface GridMenuProps extends Omit<PopperProps, 'onKeyDown' | 'children
|
|
|
11
11
|
onExited?: GrowProps['onExited'];
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
declare function GridMenu(props: GridMenuProps): JSX.Element;
|
|
14
|
+
declare function GridMenu(props: GridMenuProps): React.JSX.Element;
|
|
15
15
|
declare namespace GridMenu {
|
|
16
16
|
var propTypes: any;
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export interface GridColumnHeaderMenuProps {
|
|
|
10
10
|
target: HTMLElement | null;
|
|
11
11
|
onExited?: GridMenuProps['onExited'];
|
|
12
12
|
}
|
|
13
|
-
declare function GridColumnHeaderMenu({ columnMenuId, columnMenuButtonId, ContentComponent, contentComponentProps, field, open, target, onExited, }: GridColumnHeaderMenuProps): JSX.Element | null;
|
|
13
|
+
declare function GridColumnHeaderMenu({ columnMenuId, columnMenuButtonId, ContentComponent, contentComponentProps, field, open, target, onExited, }: GridColumnHeaderMenuProps): React.JSX.Element | null;
|
|
14
14
|
declare namespace GridColumnHeaderMenu {
|
|
15
15
|
var propTypes: any;
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuColumnsItem(props: GridColumnMenuItemProps): JSX.Element;
|
|
3
|
+
declare function GridColumnMenuColumnsItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
4
4
|
declare namespace GridColumnMenuColumnsItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuFilterItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuFilterItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuFilterItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuHideItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuHideItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuHideItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuManageItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuManageItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuManageItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuSortItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuSortItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuSortItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridPanelWrapperProps } from './GridPanelWrapper';
|
|
3
3
|
import type { GridColDef } from '../../models/colDef/gridColDef';
|
|
4
4
|
export interface GridColumnsPanelProps extends GridPanelWrapperProps {
|
|
@@ -16,7 +16,7 @@ export interface GridColumnsPanelProps extends GridPanelWrapperProps {
|
|
|
16
16
|
*/
|
|
17
17
|
getTogglableColumns?: (columns: GridColDef[]) => GridColDef['field'][];
|
|
18
18
|
}
|
|
19
|
-
declare function GridColumnsPanel(props: GridColumnsPanelProps): JSX.Element;
|
|
19
|
+
declare function GridColumnsPanel(props: GridColumnsPanelProps): React.JSX.Element;
|
|
20
20
|
declare namespace GridColumnsPanel {
|
|
21
21
|
var propTypes: any;
|
|
22
22
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelContent(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelContent {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelFooter(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelFooter {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelHeader {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -17,7 +17,9 @@ export const GridPreferencesPanel = /*#__PURE__*/React.forwardRef(function GridP
|
|
|
17
17
|
return /*#__PURE__*/_jsx(rootProps.slots.panel, _extends({
|
|
18
18
|
ref: ref,
|
|
19
19
|
as: rootProps.slots.basePopper,
|
|
20
|
-
open: columns.length > 0 && preferencePanelState.open
|
|
20
|
+
open: columns.length > 0 && preferencePanelState.open,
|
|
21
|
+
id: preferencePanelState.panelId,
|
|
22
|
+
"aria-labelledby": preferencePanelState.labelId
|
|
21
23
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.panel, props, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.basePopper, {
|
|
22
24
|
children: panelContent
|
|
23
25
|
}));
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
|
-
export
|
|
4
|
+
export type GridFilterInputBooleanProps = GridFilterInputValueProps & TextFieldProps & {
|
|
5
|
+
headerFilterMenu?: React.ReactNode | null;
|
|
6
|
+
clearButton?: React.ReactNode | null;
|
|
7
|
+
/**
|
|
8
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
9
|
+
* required is selected (e.g. `isEmpty`)
|
|
10
|
+
*/
|
|
11
|
+
isFilterActive?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps): React.JSX.Element;
|
|
14
|
+
declare namespace GridFilterInputBoolean {
|
|
15
|
+
var propTypes: any;
|
|
16
|
+
}
|
|
17
|
+
export { GridFilterInputBoolean };
|
|
@@ -1,18 +1,30 @@
|
|
|
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"];
|
|
3
|
+
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "headerFilterMenu", "isFilterActive", "clearButton", "tabIndex", "label"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
7
|
+
import { styled } from '@mui/material/styles';
|
|
6
8
|
import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
11
|
+
const BooleanOperatorContainer = styled('div')({
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'flex-end',
|
|
14
|
+
width: '100%'
|
|
15
|
+
});
|
|
16
|
+
function GridFilterInputBoolean(props) {
|
|
10
17
|
var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2, _rootProps$slotProps3;
|
|
11
18
|
const {
|
|
12
19
|
item,
|
|
13
20
|
applyValue,
|
|
14
21
|
apiRef,
|
|
15
|
-
focusElementRef
|
|
22
|
+
focusElementRef,
|
|
23
|
+
headerFilterMenu,
|
|
24
|
+
isFilterActive,
|
|
25
|
+
clearButton,
|
|
26
|
+
tabIndex,
|
|
27
|
+
label: labelProp
|
|
16
28
|
} = props,
|
|
17
29
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
18
30
|
const [filterValueState, setFilterValueState] = React.useState(item.value || '');
|
|
@@ -32,39 +44,71 @@ export function GridFilterInputBoolean(props) {
|
|
|
32
44
|
React.useEffect(() => {
|
|
33
45
|
setFilterValueState(item.value || '');
|
|
34
46
|
}, [item.value]);
|
|
35
|
-
const label = apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
36
|
-
return /*#__PURE__*/_jsxs(
|
|
37
|
-
children: [/*#__PURE__*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
inputProps: {
|
|
52
|
-
ref: focusElementRef
|
|
53
|
-
}
|
|
54
|
-
}, others, baseSelectProps, {
|
|
55
|
-
children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
47
|
+
const label = labelProp != null ? labelProp : apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
48
|
+
return /*#__PURE__*/_jsxs(BooleanOperatorContainer, {
|
|
49
|
+
children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
|
|
50
|
+
fullWidth: true,
|
|
51
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseInputLabel, {
|
|
52
|
+
id: labelId,
|
|
53
|
+
shrink: true,
|
|
54
|
+
variant: "standard",
|
|
55
|
+
children: label
|
|
56
|
+
})), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
|
|
57
|
+
labelId: labelId,
|
|
58
|
+
id: selectId,
|
|
59
|
+
label: label,
|
|
60
|
+
value: filterValueState,
|
|
61
|
+
onChange: onFilterChange,
|
|
62
|
+
variant: "standard",
|
|
56
63
|
native: isSelectNative,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
displayEmpty: true,
|
|
65
|
+
startAdornment: isFilterActive ? headerFilterMenu : null,
|
|
66
|
+
inputProps: {
|
|
67
|
+
ref: focusElementRef,
|
|
68
|
+
tabIndex
|
|
69
|
+
}
|
|
70
|
+
}, others, baseSelectProps, {
|
|
71
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
72
|
+
native: isSelectNative,
|
|
73
|
+
value: "",
|
|
74
|
+
children: apiRef.current.getLocaleText('filterValueAny')
|
|
75
|
+
})), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
76
|
+
native: isSelectNative,
|
|
77
|
+
value: "true",
|
|
78
|
+
children: apiRef.current.getLocaleText('filterValueTrue')
|
|
79
|
+
})), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
80
|
+
native: isSelectNative,
|
|
81
|
+
value: "false",
|
|
82
|
+
children: apiRef.current.getLocaleText('filterValueFalse')
|
|
83
|
+
}))]
|
|
67
84
|
}))]
|
|
68
|
-
})
|
|
85
|
+
}), clearButton]
|
|
69
86
|
});
|
|
70
|
-
}
|
|
87
|
+
}
|
|
88
|
+
process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
89
|
+
// ----------------------------- Warning --------------------------------
|
|
90
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
91
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
92
|
+
// ----------------------------------------------------------------------
|
|
93
|
+
apiRef: PropTypes.shape({
|
|
94
|
+
current: PropTypes.object.isRequired
|
|
95
|
+
}).isRequired,
|
|
96
|
+
applyValue: PropTypes.func.isRequired,
|
|
97
|
+
clearButton: PropTypes.node,
|
|
98
|
+
focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
99
|
+
current: PropTypes.any.isRequired
|
|
100
|
+
})]),
|
|
101
|
+
headerFilterMenu: PropTypes.node,
|
|
102
|
+
/**
|
|
103
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
104
|
+
* required is selected (e.g. `isEmpty`)
|
|
105
|
+
*/
|
|
106
|
+
isFilterActive: PropTypes.bool,
|
|
107
|
+
item: PropTypes.shape({
|
|
108
|
+
field: PropTypes.string.isRequired,
|
|
109
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
110
|
+
operator: PropTypes.string.isRequired,
|
|
111
|
+
value: PropTypes.any
|
|
112
|
+
}).isRequired
|
|
113
|
+
} : void 0;
|
|
114
|
+
export { GridFilterInputBoolean };
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputDateProps = GridFilterInputValueProps & TextFieldProps & {
|
|
5
5
|
type?: 'date' | 'datetime-local';
|
|
6
|
+
headerFilterMenu?: React.ReactNode | null;
|
|
7
|
+
clearButton?: React.ReactNode | null;
|
|
8
|
+
/**
|
|
9
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
10
|
+
* required is selected (e.g. `isEmpty`)
|
|
11
|
+
*/
|
|
12
|
+
isFilterActive?: boolean;
|
|
6
13
|
};
|
|
7
14
|
export declare const SUBMIT_FILTER_DATE_STROKE_TIME = 500;
|
|
8
|
-
declare function GridFilterInputDate(props: GridFilterInputDateProps): JSX.Element;
|
|
15
|
+
declare function GridFilterInputDate(props: GridFilterInputDateProps): React.JSX.Element;
|
|
9
16
|
declare namespace GridFilterInputDate {
|
|
10
17
|
var propTypes: any;
|
|
11
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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", "InputProps"];
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps", "headerFilterMenu", "isFilterActive", "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';
|
|
@@ -15,7 +15,12 @@ function GridFilterInputDate(props) {
|
|
|
15
15
|
type,
|
|
16
16
|
apiRef,
|
|
17
17
|
focusElementRef,
|
|
18
|
-
InputProps
|
|
18
|
+
InputProps,
|
|
19
|
+
headerFilterMenu,
|
|
20
|
+
isFilterActive,
|
|
21
|
+
clearButton,
|
|
22
|
+
tabIndex,
|
|
23
|
+
disabled
|
|
19
24
|
} = props,
|
|
20
25
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
21
26
|
const filterTimeout = React.useRef();
|
|
@@ -46,6 +51,7 @@ function GridFilterInputDate(props) {
|
|
|
46
51
|
setFilterValueState(String(itemValue));
|
|
47
52
|
}, [item.value]);
|
|
48
53
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
|
|
54
|
+
fullWidth: true,
|
|
49
55
|
id: id,
|
|
50
56
|
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
51
57
|
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
@@ -57,11 +63,19 @@ function GridFilterInputDate(props) {
|
|
|
57
63
|
shrink: true
|
|
58
64
|
},
|
|
59
65
|
inputRef: focusElementRef,
|
|
60
|
-
InputProps: _extends({}, applying ? {
|
|
61
|
-
endAdornment: /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
|
|
62
|
-
|
|
66
|
+
InputProps: _extends({}, applying || clearButton ? {
|
|
67
|
+
endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
|
|
68
|
+
fontSize: "small",
|
|
69
|
+
color: "action"
|
|
70
|
+
}) : clearButton
|
|
71
|
+
} : {}, headerFilterMenu && isFilterActive ? {
|
|
72
|
+
startAdornment: headerFilterMenu
|
|
73
|
+
} : {}, {
|
|
74
|
+
disabled
|
|
75
|
+
}, InputProps, {
|
|
63
76
|
inputProps: _extends({
|
|
64
|
-
max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31'
|
|
77
|
+
max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',
|
|
78
|
+
tabIndex
|
|
65
79
|
}, InputProps == null ? void 0 : InputProps.inputProps)
|
|
66
80
|
})
|
|
67
81
|
}, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
|
|
@@ -75,7 +89,14 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
75
89
|
current: PropTypes.object.isRequired
|
|
76
90
|
}).isRequired,
|
|
77
91
|
applyValue: PropTypes.func.isRequired,
|
|
92
|
+
clearButton: PropTypes.node,
|
|
78
93
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
94
|
+
headerFilterMenu: PropTypes.node,
|
|
95
|
+
/**
|
|
96
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
97
|
+
* required is selected (e.g. `isEmpty`)
|
|
98
|
+
*/
|
|
99
|
+
isFilterActive: PropTypes.bool,
|
|
79
100
|
item: PropTypes.shape({
|
|
80
101
|
field: PropTypes.string.isRequired,
|
|
81
102
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
import type { GridSingleSelectColDef, ValueOptions } from '../../../models/colDef/gridColDef';
|
|
5
5
|
export interface GridFilterInputMultipleSingleSelectProps extends Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options' | 'renderInput' | 'onChange' | 'value' | 'id' | 'filterOptions' | 'isOptionEqualToValue' | 'multiple' | 'color' | 'getOptionLabel'>, Pick<GridSingleSelectColDef, 'getOptionLabel' | 'getOptionValue'>, GridFilterInputValueProps {
|
|
6
6
|
type?: 'singleSelect';
|
|
7
7
|
}
|
|
8
|
-
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): JSX.Element;
|
|
8
|
+
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element;
|
|
9
9
|
declare namespace GridFilterInputMultipleSingleSelect {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputMultipleValueProps = {
|
|
5
5
|
type?: 'text' | 'number';
|
|
6
6
|
} & GridFilterInputValueProps & Omit<AutocompleteProps<string, true, false, true>, 'options' | 'renderInput'>;
|
|
7
|
-
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): JSX.Element;
|
|
7
|
+
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): React.JSX.Element;
|
|
8
8
|
declare namespace GridFilterInputMultipleValue {
|
|
9
9
|
var propTypes: any;
|
|
10
10
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
import { GridSingleSelectColDef } from '../../../models/colDef/gridColDef';
|
|
5
5
|
export type GridFilterInputSingleSelectProps = GridFilterInputValueProps & TextFieldProps & Pick<GridSingleSelectColDef, 'getOptionLabel' | 'getOptionValue'> & {
|
|
6
|
+
headerFilterMenu?: React.ReactNode | null;
|
|
7
|
+
clearButton?: React.ReactNode | null;
|
|
8
|
+
/**
|
|
9
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
10
|
+
* required is selected (e.g. `isEmpty`)
|
|
11
|
+
*/
|
|
12
|
+
isFilterActive?: boolean;
|
|
6
13
|
type?: 'singleSelect';
|
|
7
14
|
};
|
|
8
|
-
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps): JSX.Element | null;
|
|
15
|
+
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps): React.JSX.Element | null;
|
|
9
16
|
declare namespace GridFilterInputSingleSelect {
|
|
10
17
|
var propTypes: any;
|
|
11
18
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "getOptionLabel", "getOptionValue"];
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "getOptionLabel", "getOptionValue", "placeholder", "tabIndex", "label", "headerFilterMenu", "isFilterActive", "clearButton"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
7
|
+
import { styled } from '@mui/material/styles';
|
|
7
8
|
import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
|
|
8
9
|
import { getValueFromValueOptions, isSingleSelectColDef } from './filterPanelUtils';
|
|
9
10
|
import { createElement as _createElement } from "react";
|
|
@@ -33,6 +34,11 @@ const renderSingleSelectOptions = ({
|
|
|
33
34
|
}), label);
|
|
34
35
|
});
|
|
35
36
|
};
|
|
37
|
+
const SingleSelectOperatorContainer = styled('div')({
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'flex-end',
|
|
40
|
+
width: '100%'
|
|
41
|
+
});
|
|
36
42
|
function GridFilterInputSingleSelect(props) {
|
|
37
43
|
var _item$value, _rootProps$slotProps$, _rootProps$slotProps, _rootProps$slotProps$2, _resolvedColumn, _resolvedColumn2, _rootProps$slotProps2, _rootProps$slotProps3, _rootProps$slotProps4;
|
|
38
44
|
const {
|
|
@@ -42,7 +48,13 @@ function GridFilterInputSingleSelect(props) {
|
|
|
42
48
|
apiRef,
|
|
43
49
|
focusElementRef,
|
|
44
50
|
getOptionLabel: getOptionLabelProp,
|
|
45
|
-
getOptionValue: getOptionValueProp
|
|
51
|
+
getOptionValue: getOptionValueProp,
|
|
52
|
+
placeholder,
|
|
53
|
+
tabIndex,
|
|
54
|
+
label: labelProp,
|
|
55
|
+
headerFilterMenu,
|
|
56
|
+
isFilterActive,
|
|
57
|
+
clearButton
|
|
46
58
|
} = props,
|
|
47
59
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
48
60
|
const [filterValueState, setFilterValueState] = React.useState((_item$value = item.value) != null ? _item$value : '');
|
|
@@ -101,36 +113,41 @@ function GridFilterInputSingleSelect(props) {
|
|
|
101
113
|
if (!isSingleSelectColDef(resolvedColumn)) {
|
|
102
114
|
return null;
|
|
103
115
|
}
|
|
104
|
-
const label = apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
105
|
-
return /*#__PURE__*/_jsxs(
|
|
106
|
-
children: [/*#__PURE__*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
116
|
+
const label = labelProp != null ? labelProp : apiRef.current.getLocaleText('filterPanelInputLabel');
|
|
117
|
+
return /*#__PURE__*/_jsxs(SingleSelectOperatorContainer, {
|
|
118
|
+
children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
|
|
119
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseInputLabel, {
|
|
120
|
+
id: labelId,
|
|
121
|
+
htmlFor: id,
|
|
122
|
+
shrink: true,
|
|
123
|
+
variant: "standard",
|
|
124
|
+
children: label
|
|
125
|
+
})), /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({
|
|
126
|
+
id: id,
|
|
127
|
+
label: label,
|
|
128
|
+
labelId: labelId,
|
|
129
|
+
value: filterValueState,
|
|
130
|
+
onChange: onFilterChange,
|
|
131
|
+
startAdornment: isFilterActive ? headerFilterMenu : null,
|
|
132
|
+
variant: "standard",
|
|
133
|
+
type: type || 'text',
|
|
134
|
+
inputProps: {
|
|
135
|
+
tabIndex,
|
|
136
|
+
ref: focusElementRef,
|
|
137
|
+
placeholder: placeholder != null ? placeholder : apiRef.current.getLocaleText('filterPanelInputPlaceholder')
|
|
138
|
+
},
|
|
139
|
+
native: isSelectNative
|
|
140
|
+
}, others, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseSelect, {
|
|
141
|
+
children: renderSingleSelectOptions({
|
|
142
|
+
column: resolvedColumn,
|
|
143
|
+
OptionComponent: rootProps.slots.baseSelectOption,
|
|
144
|
+
getOptionLabel,
|
|
145
|
+
getOptionValue,
|
|
146
|
+
isSelectNative,
|
|
147
|
+
baseSelectOptionProps: (_rootProps$slotProps4 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps4.baseSelectOption
|
|
148
|
+
})
|
|
149
|
+
}))]
|
|
150
|
+
}), clearButton]
|
|
134
151
|
});
|
|
135
152
|
}
|
|
136
153
|
process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes = {
|
|
@@ -142,6 +159,7 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
|
|
|
142
159
|
current: PropTypes.object.isRequired
|
|
143
160
|
}).isRequired,
|
|
144
161
|
applyValue: PropTypes.func.isRequired,
|
|
162
|
+
clearButton: PropTypes.node,
|
|
145
163
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
146
164
|
/**
|
|
147
165
|
* Used to determine the label displayed for a given value option.
|
|
@@ -155,6 +173,12 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
|
|
|
155
173
|
* @returns {string} The value to be used.
|
|
156
174
|
*/
|
|
157
175
|
getOptionValue: PropTypes.func,
|
|
176
|
+
headerFilterMenu: PropTypes.node,
|
|
177
|
+
/**
|
|
178
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
179
|
+
* required is selected (e.g. `isEmpty`)
|
|
180
|
+
*/
|
|
181
|
+
isFilterActive: PropTypes.bool,
|
|
158
182
|
item: PropTypes.shape({
|
|
159
183
|
field: PropTypes.string.isRequired,
|
|
160
184
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export declare const SUBMIT_FILTER_STROKE_TIME = 500;
|
|
5
|
-
export
|
|
5
|
+
export type GridTypeFilterInputValueProps = GridFilterInputValueProps & TextFieldProps & {
|
|
6
6
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
headerFilterMenu?: React.ReactNode | null;
|
|
8
|
+
clearButton?: React.ReactNode | null;
|
|
9
|
+
/**
|
|
10
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
11
|
+
* required is selected (e.g. `isEmpty`)
|
|
12
|
+
*/
|
|
13
|
+
isFilterActive?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps): React.JSX.Element;
|
|
9
16
|
declare namespace GridFilterInputValue {
|
|
10
17
|
var propTypes: any;
|
|
11
18
|
}
|