@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
|
@@ -4,17 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.shouldCellShowRightBorder = exports.shouldCellShowLeftBorder = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _constants = require("../internals/constants");
|
|
8
8
|
const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller) => {
|
|
9
9
|
const isSectionLastCell = indexInSection === sectionLength - 1;
|
|
10
|
-
if (pinnedPosition ===
|
|
10
|
+
if (pinnedPosition === _constants.PinnedColumnPosition.LEFT && isSectionLastCell) {
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
if (showCellVerticalBorderRootProp) {
|
|
14
|
-
if (pinnedPosition ===
|
|
14
|
+
if (pinnedPosition === _constants.PinnedColumnPosition.LEFT) {
|
|
15
15
|
return true;
|
|
16
16
|
}
|
|
17
|
-
if (pinnedPosition ===
|
|
17
|
+
if (pinnedPosition === _constants.PinnedColumnPosition.RIGHT) {
|
|
18
18
|
return !isSectionLastCell;
|
|
19
19
|
}
|
|
20
20
|
// pinnedPosition === undefined, middle section
|
|
@@ -24,6 +24,6 @@ const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength
|
|
|
24
24
|
};
|
|
25
25
|
exports.shouldCellShowRightBorder = shouldCellShowRightBorder;
|
|
26
26
|
const shouldCellShowLeftBorder = (pinnedPosition, indexInSection) => {
|
|
27
|
-
return pinnedPosition ===
|
|
27
|
+
return pinnedPosition === _constants.PinnedColumnPosition.RIGHT && indexInSection === 0;
|
|
28
28
|
};
|
|
29
29
|
exports.shouldCellShowLeftBorder = shouldCellShowLeftBorder;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.createSelectorMemoized = exports.createSelector = void 0;
|
|
7
7
|
var _reselect = require("reselect");
|
|
8
8
|
var _warning = require("@mui/x-internals/warning");
|
|
9
9
|
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
@@ -14,19 +14,6 @@ const reselectCreateSelector = (0, _reselect.createSelectorCreator)({
|
|
|
14
14
|
equalityCheck: Object.is
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
// TODO v8: Remove this type
|
|
19
|
-
|
|
20
|
-
// TODO v8: Rename this type to `OutputSelector`
|
|
21
|
-
|
|
22
|
-
// TODO v8: Remove this type
|
|
23
|
-
|
|
24
|
-
// TODO v8: Rename this type to `SelectorArgs`
|
|
25
|
-
|
|
26
|
-
// TODO v8: Remove this type
|
|
27
|
-
|
|
28
|
-
// TODO v8: Rename this type to `CreateSelectorFunction`
|
|
29
|
-
|
|
30
17
|
const cache = new WeakMap();
|
|
31
18
|
function checkIsAPIRef(value) {
|
|
32
19
|
return 'current' in value && 'instanceId' in value.current;
|
|
@@ -34,84 +21,12 @@ function checkIsAPIRef(value) {
|
|
|
34
21
|
const DEFAULT_INSTANCE_ID = {
|
|
35
22
|
id: 'default'
|
|
36
23
|
};
|
|
37
|
-
|
|
38
|
-
// TODO v8: Remove this function
|
|
39
24
|
const createSelector = (a, b, c, d, e, f, ...other) => {
|
|
40
25
|
if (other.length > 0) {
|
|
41
26
|
throw new Error('Unsupported number of selectors');
|
|
42
27
|
}
|
|
43
28
|
let selector;
|
|
44
29
|
|
|
45
|
-
// eslint-disable-next-line id-denylist
|
|
46
|
-
if (a && b && c && d && e && f) {
|
|
47
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
48
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
49
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
50
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
51
|
-
const va = a(state, instanceId);
|
|
52
|
-
const vb = b(state, instanceId);
|
|
53
|
-
const vc = c(state, instanceId);
|
|
54
|
-
const vd = d(state, instanceId);
|
|
55
|
-
const ve = e(state, instanceId);
|
|
56
|
-
return f(va, vb, vc, vd, ve);
|
|
57
|
-
};
|
|
58
|
-
// eslint-disable-next-line id-denylist
|
|
59
|
-
} else if (a && b && c && d && e) {
|
|
60
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
61
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
62
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
63
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
64
|
-
const va = a(state, instanceId);
|
|
65
|
-
const vb = b(state, instanceId);
|
|
66
|
-
const vc = c(state, instanceId);
|
|
67
|
-
const vd = d(state, instanceId);
|
|
68
|
-
return e(va, vb, vc, vd);
|
|
69
|
-
};
|
|
70
|
-
} else if (a && b && c && d) {
|
|
71
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
72
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
73
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
74
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
75
|
-
const va = a(state, instanceId);
|
|
76
|
-
const vb = b(state, instanceId);
|
|
77
|
-
const vc = c(state, instanceId);
|
|
78
|
-
return d(va, vb, vc);
|
|
79
|
-
};
|
|
80
|
-
} else if (a && b && c) {
|
|
81
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
82
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
83
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
84
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
85
|
-
const va = a(state, instanceId);
|
|
86
|
-
const vb = b(state, instanceId);
|
|
87
|
-
return c(va, vb);
|
|
88
|
-
};
|
|
89
|
-
} else if (a && b) {
|
|
90
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
91
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
92
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
93
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
94
|
-
const va = a(state, instanceId);
|
|
95
|
-
return b(va);
|
|
96
|
-
};
|
|
97
|
-
} else {
|
|
98
|
-
throw new Error('Missing arguments');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// We use this property to detect if the selector was created with createSelector
|
|
102
|
-
// or it's only a simple function the receives the state and returns part of it.
|
|
103
|
-
selector.acceptsApiRef = true;
|
|
104
|
-
return selector;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// TODO v8: Rename this function to `createSelector`
|
|
108
|
-
exports.createSelector = createSelector;
|
|
109
|
-
const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
|
|
110
|
-
if (other.length > 0) {
|
|
111
|
-
throw new Error('Unsupported number of selectors');
|
|
112
|
-
}
|
|
113
|
-
let selector;
|
|
114
|
-
|
|
115
30
|
// eslint-disable-next-line id-denylist
|
|
116
31
|
if (a && b && c && d && e && f) {
|
|
117
32
|
selector = (stateOrApiRef, args, instanceIdParam) => {
|
|
@@ -173,51 +88,15 @@ const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
|
|
|
173
88
|
selector.acceptsApiRef = true;
|
|
174
89
|
return selector;
|
|
175
90
|
};
|
|
176
|
-
|
|
177
|
-
// TODO v8: Remove this function
|
|
178
|
-
exports.createSelectorV8 = createSelectorV8;
|
|
91
|
+
exports.createSelector = createSelector;
|
|
179
92
|
const createSelectorMemoized = (...args) => {
|
|
180
|
-
const selector = (stateOrApiRef, instanceId) => {
|
|
181
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
182
|
-
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
|
|
183
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
184
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
185
|
-
if (cacheKey.id === 'default') {
|
|
186
|
-
(0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
const cacheArgsInit = cache.get(cacheKey);
|
|
190
|
-
const cacheArgs = cacheArgsInit ?? new Map();
|
|
191
|
-
const cacheFn = cacheArgs?.get(args);
|
|
192
|
-
if (cacheArgs && cacheFn) {
|
|
193
|
-
// We pass the cache key because the called selector might have as
|
|
194
|
-
// dependency another selector created with this `createSelector`.
|
|
195
|
-
return cacheFn(state, cacheKey);
|
|
196
|
-
}
|
|
197
|
-
const fn = reselectCreateSelector(...args);
|
|
198
|
-
if (!cacheArgsInit) {
|
|
199
|
-
cache.set(cacheKey, cacheArgs);
|
|
200
|
-
}
|
|
201
|
-
cacheArgs.set(args, fn);
|
|
202
|
-
return fn(state, cacheKey);
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
// We use this property to detect if the selector was created with createSelector
|
|
206
|
-
// or it's only a simple function the receives the state and returns part of it.
|
|
207
|
-
selector.acceptsApiRef = true;
|
|
208
|
-
return selector;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// TODO v8: Rename this function to `createSelectorMemoized`
|
|
212
|
-
exports.createSelectorMemoized = createSelectorMemoized;
|
|
213
|
-
const createSelectorMemoizedV8 = (...args) => {
|
|
214
93
|
const selector = (stateOrApiRef, selectorArgs, instanceId) => {
|
|
215
94
|
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
216
95
|
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
|
|
217
96
|
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
218
97
|
if (process.env.NODE_ENV !== 'production') {
|
|
219
98
|
if (cacheKey.id === 'default') {
|
|
220
|
-
(0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
99
|
+
(0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, args, apiRef.current.instanceId)`.']);
|
|
221
100
|
}
|
|
222
101
|
}
|
|
223
102
|
const cacheArgsInit = cache.get(cacheKey);
|
|
@@ -250,4 +129,4 @@ const createSelectorMemoizedV8 = (...args) => {
|
|
|
250
129
|
selector.acceptsApiRef = true;
|
|
251
130
|
return selector;
|
|
252
131
|
};
|
|
253
|
-
exports.
|
|
132
|
+
exports.createSelectorMemoized = createSelectorMemoized;
|
package/node/utils/domUtils.js
CHANGED
|
@@ -179,7 +179,7 @@ const findPinnedHeaders = ({
|
|
|
179
179
|
const elements = [];
|
|
180
180
|
api.columnHeadersContainerRef.current.querySelectorAll(`.${_gridClasses.gridClasses[position === 'left' ? 'columnHeader--pinnedLeft' : 'columnHeader--pinnedRight']}`).forEach(element => {
|
|
181
181
|
const currentColIndex = parseCellColIndex(element);
|
|
182
|
-
if (currentColIndex !== null && filterFn(currentColIndex)) {
|
|
182
|
+
if (currentColIndex !== null && filterFn(currentColIndex, element)) {
|
|
183
183
|
elements.push(element);
|
|
184
184
|
}
|
|
185
185
|
});
|
|
@@ -200,7 +200,12 @@ function findRightPinnedHeadersBeforeCol(api, col, isRtl) {
|
|
|
200
200
|
api,
|
|
201
201
|
position: isRtl ? 'left' : 'right',
|
|
202
202
|
colIndex,
|
|
203
|
-
filterFn: index =>
|
|
203
|
+
filterFn: (index, element) => {
|
|
204
|
+
if (element.classList.contains(_gridClasses.gridClasses['columnHeader--last'])) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
return isRtl ? index > colIndex : index < colIndex;
|
|
208
|
+
}
|
|
204
209
|
});
|
|
205
210
|
}
|
|
206
211
|
function findGridHeader(api, field) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.rtlFlipSide = void 0;
|
|
7
|
+
var _constants = require("../internals/constants");
|
|
8
|
+
const rtlFlipSide = (position, isRtl) => {
|
|
9
|
+
if (!position) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
if (!isRtl) {
|
|
13
|
+
if (position === _constants.PinnedColumnPosition.LEFT) {
|
|
14
|
+
return 'left';
|
|
15
|
+
}
|
|
16
|
+
if (position === _constants.PinnedColumnPosition.RIGHT) {
|
|
17
|
+
return 'right';
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
if (position === _constants.PinnedColumnPosition.LEFT) {
|
|
21
|
+
return 'right';
|
|
22
|
+
}
|
|
23
|
+
if (position === _constants.PinnedColumnPosition.RIGHT) {
|
|
24
|
+
return 'left';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
};
|
|
29
|
+
exports.rtlFlipSide = rtlFlipSide;
|
package/node/utils/utils.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.isNumber = isNumber;
|
|
|
14
14
|
exports.isObject = isObject;
|
|
15
15
|
exports.localStorageAvailable = localStorageAvailable;
|
|
16
16
|
exports.range = range;
|
|
17
|
+
exports.runIf = void 0;
|
|
17
18
|
function isNumber(value) {
|
|
18
19
|
return typeof value === 'number' && !Number.isNaN(value);
|
|
19
20
|
}
|
|
@@ -213,4 +214,10 @@ function deepClone(obj) {
|
|
|
213
214
|
* of a `eslint-disable-next-line react-hooks/exhaustive-deps` because
|
|
214
215
|
* that hint disables checks on all values instead of just one.
|
|
215
216
|
*/
|
|
216
|
-
function eslintUseValue(_) {}
|
|
217
|
+
function eslintUseValue(_) {}
|
|
218
|
+
const runIf = (condition, fn) => params => {
|
|
219
|
+
if (condition) {
|
|
220
|
+
fn(params);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
exports.runIf = runIf;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.10",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
"directory": "packages/x-data-grid"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/runtime": "^7.26.
|
|
40
|
+
"@babel/runtime": "^7.26.7",
|
|
41
41
|
"@mui/utils": "^5.16.6 || ^6.0.0",
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^5.1.1",
|
|
45
|
-
"@mui/x-internals": "8.0.0-alpha.
|
|
45
|
+
"@mui/x-internals": "8.0.0-alpha.10"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@emotion/react": "^11.9.0",
|
|
49
49
|
"@emotion/styled": "^11.8.1",
|
|
50
50
|
"@mui/material": "^5.15.14 || ^6.0.0",
|
|
51
51
|
"@mui/system": "^5.15.14 || ^6.0.0",
|
|
52
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
53
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
52
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@emotion/react": {
|
|
@@ -5,10 +5,15 @@ export interface DataGridComponentNameToClassKey {
|
|
|
5
5
|
declare module '@mui/material/styles' {
|
|
6
6
|
interface ComponentNameToClassKey extends DataGridComponentNameToClassKey {
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
interface PaletteDataGrid {
|
|
9
|
+
bg?: string;
|
|
10
|
+
headerBg?: string;
|
|
11
|
+
pinnedBg?: string;
|
|
12
|
+
}
|
|
13
|
+
interface CssVarsPalette {
|
|
14
|
+
DataGrid: PaletteDataGrid;
|
|
15
|
+
}
|
|
16
|
+
interface PaletteOptions {
|
|
17
|
+
DataGrid?: Partial<PaletteDataGrid>;
|
|
13
18
|
}
|
|
14
19
|
}
|
package/utils/assert.js
ADDED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const shouldCellShowRightBorder: (pinnedPosition:
|
|
3
|
-
export declare const shouldCellShowLeftBorder: (pinnedPosition:
|
|
1
|
+
import { PinnedColumnPosition } from '../internals/constants';
|
|
2
|
+
export declare const shouldCellShowRightBorder: (pinnedPosition: PinnedColumnPosition | undefined, indexInSection: number, sectionLength: number, showCellVerticalBorderRootProp: boolean, gridHasFiller: boolean) => boolean;
|
|
3
|
+
export declare const shouldCellShowLeftBorder: (pinnedPosition: PinnedColumnPosition | undefined, indexInSection: number) => boolean;
|
package/utils/cellBorderUtils.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PinnedColumnPosition } from "../internals/constants.js";
|
|
2
2
|
export const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller) => {
|
|
3
3
|
const isSectionLastCell = indexInSection === sectionLength - 1;
|
|
4
|
-
if (pinnedPosition ===
|
|
4
|
+
if (pinnedPosition === PinnedColumnPosition.LEFT && isSectionLastCell) {
|
|
5
5
|
return true;
|
|
6
6
|
}
|
|
7
7
|
if (showCellVerticalBorderRootProp) {
|
|
8
|
-
if (pinnedPosition ===
|
|
8
|
+
if (pinnedPosition === PinnedColumnPosition.LEFT) {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
|
-
if (pinnedPosition ===
|
|
11
|
+
if (pinnedPosition === PinnedColumnPosition.RIGHT) {
|
|
12
12
|
return !isSectionLastCell;
|
|
13
13
|
}
|
|
14
14
|
// pinnedPosition === undefined, middle section
|
|
@@ -17,5 +17,5 @@ export const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectio
|
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
19
|
export const shouldCellShowLeftBorder = (pinnedPosition, indexInSection) => {
|
|
20
|
-
return pinnedPosition ===
|
|
20
|
+
return pinnedPosition === PinnedColumnPosition.RIGHT && indexInSection === 0;
|
|
21
21
|
};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { Selector, SelectorResultArray } from 'reselect';
|
|
3
3
|
import type { GridCoreApi } from '../models/api/gridCoreApi';
|
|
4
|
-
export interface OutputSelector<State, Result> {
|
|
5
|
-
(apiRef:
|
|
4
|
+
export interface OutputSelector<State, Args, Result> {
|
|
5
|
+
(apiRef: RefObject<{
|
|
6
6
|
state: State;
|
|
7
7
|
instanceId: GridCoreApi['instanceId'];
|
|
8
|
-
}
|
|
9
|
-
(state: State, instanceId
|
|
10
|
-
acceptsApiRef: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface OutputSelectorV8<State, Args, Result> {
|
|
13
|
-
(apiRef: React.MutableRefObject<{
|
|
14
|
-
state: State;
|
|
15
|
-
instanceId: GridCoreApi['instanceId'];
|
|
16
|
-
}>, args?: Args): Result;
|
|
17
|
-
(state: State, instanceId: GridCoreApi['instanceId']): Result;
|
|
8
|
+
} | null>, args?: Args): Result;
|
|
9
|
+
(state: State, args?: Args, instanceId?: GridCoreApi['instanceId']): Result;
|
|
18
10
|
acceptsApiRef: boolean;
|
|
19
11
|
}
|
|
20
12
|
type StateFromSelector<T> = T extends (first: infer F, ...args: any[]) => any ? F extends {
|
|
@@ -24,19 +16,15 @@ type StateFromSelectorList<Selectors extends readonly any[]> = Selectors extends
|
|
|
24
16
|
f: infer F,
|
|
25
17
|
...other: infer R
|
|
26
18
|
] ? StateFromSelector<F> extends StateFromSelectorList<R> ? StateFromSelector<F> : StateFromSelectorList<R> : {};
|
|
27
|
-
type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Result> = [selectors: [...Selectors], combiner: (...args: SelectorResultArray<Selectors>) => Result] | [...Selectors, (...args: SelectorResultArray<Selectors>) => Result];
|
|
28
19
|
type SelectorResultArrayWithArgs<Selectors extends ReadonlyArray<Selector<any>>, Args> = [
|
|
29
20
|
...SelectorResultArray<Selectors>,
|
|
30
21
|
Args
|
|
31
22
|
];
|
|
32
|
-
type
|
|
23
|
+
type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Args, Result> = [
|
|
33
24
|
selectors: [...Selectors],
|
|
34
25
|
combiner: (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result
|
|
35
26
|
] | [...Selectors, (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result];
|
|
36
|
-
type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Result>(...items: SelectorArgs<Selectors, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Result>;
|
|
37
|
-
type CreateSelectorFunctionV8 = <Selectors extends ReadonlyArray<Selector<any>>, Args, Result>(...items: SelectorArgsV8<Selectors, Args, Result>) => OutputSelectorV8<StateFromSelectorList<Selectors>, Args, Result>;
|
|
27
|
+
type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Args, Result>(...items: SelectorArgs<Selectors, Args, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Args, Result>;
|
|
38
28
|
export declare const createSelector: CreateSelectorFunction;
|
|
39
|
-
export declare const createSelectorV8: CreateSelectorFunctionV8;
|
|
40
29
|
export declare const createSelectorMemoized: CreateSelectorFunction;
|
|
41
|
-
export declare const createSelectorMemoizedV8: CreateSelectorFunctionV8;
|
|
42
30
|
export {};
|
package/utils/createSelector.js
CHANGED
|
@@ -8,19 +8,6 @@ const reselectCreateSelector = createSelectorCreator({
|
|
|
8
8
|
equalityCheck: Object.is
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
// TODO v8: Remove this type
|
|
13
|
-
|
|
14
|
-
// TODO v8: Rename this type to `OutputSelector`
|
|
15
|
-
|
|
16
|
-
// TODO v8: Remove this type
|
|
17
|
-
|
|
18
|
-
// TODO v8: Rename this type to `SelectorArgs`
|
|
19
|
-
|
|
20
|
-
// TODO v8: Remove this type
|
|
21
|
-
|
|
22
|
-
// TODO v8: Rename this type to `CreateSelectorFunction`
|
|
23
|
-
|
|
24
11
|
const cache = new WeakMap();
|
|
25
12
|
function checkIsAPIRef(value) {
|
|
26
13
|
return 'current' in value && 'instanceId' in value.current;
|
|
@@ -28,83 +15,12 @@ function checkIsAPIRef(value) {
|
|
|
28
15
|
const DEFAULT_INSTANCE_ID = {
|
|
29
16
|
id: 'default'
|
|
30
17
|
};
|
|
31
|
-
|
|
32
|
-
// TODO v8: Remove this function
|
|
33
18
|
export const createSelector = (a, b, c, d, e, f, ...other) => {
|
|
34
19
|
if (other.length > 0) {
|
|
35
20
|
throw new Error('Unsupported number of selectors');
|
|
36
21
|
}
|
|
37
22
|
let selector;
|
|
38
23
|
|
|
39
|
-
// eslint-disable-next-line id-denylist
|
|
40
|
-
if (a && b && c && d && e && f) {
|
|
41
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
42
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
43
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
44
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
45
|
-
const va = a(state, instanceId);
|
|
46
|
-
const vb = b(state, instanceId);
|
|
47
|
-
const vc = c(state, instanceId);
|
|
48
|
-
const vd = d(state, instanceId);
|
|
49
|
-
const ve = e(state, instanceId);
|
|
50
|
-
return f(va, vb, vc, vd, ve);
|
|
51
|
-
};
|
|
52
|
-
// eslint-disable-next-line id-denylist
|
|
53
|
-
} else if (a && b && c && d && e) {
|
|
54
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
55
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
56
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
57
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
58
|
-
const va = a(state, instanceId);
|
|
59
|
-
const vb = b(state, instanceId);
|
|
60
|
-
const vc = c(state, instanceId);
|
|
61
|
-
const vd = d(state, instanceId);
|
|
62
|
-
return e(va, vb, vc, vd);
|
|
63
|
-
};
|
|
64
|
-
} else if (a && b && c && d) {
|
|
65
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
66
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
67
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
68
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
69
|
-
const va = a(state, instanceId);
|
|
70
|
-
const vb = b(state, instanceId);
|
|
71
|
-
const vc = c(state, instanceId);
|
|
72
|
-
return d(va, vb, vc);
|
|
73
|
-
};
|
|
74
|
-
} else if (a && b && c) {
|
|
75
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
76
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
77
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
78
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
79
|
-
const va = a(state, instanceId);
|
|
80
|
-
const vb = b(state, instanceId);
|
|
81
|
-
return c(va, vb);
|
|
82
|
-
};
|
|
83
|
-
} else if (a && b) {
|
|
84
|
-
selector = (stateOrApiRef, instanceIdParam) => {
|
|
85
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
86
|
-
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
87
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
88
|
-
const va = a(state, instanceId);
|
|
89
|
-
return b(va);
|
|
90
|
-
};
|
|
91
|
-
} else {
|
|
92
|
-
throw new Error('Missing arguments');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// We use this property to detect if the selector was created with createSelector
|
|
96
|
-
// or it's only a simple function the receives the state and returns part of it.
|
|
97
|
-
selector.acceptsApiRef = true;
|
|
98
|
-
return selector;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// TODO v8: Rename this function to `createSelector`
|
|
102
|
-
export const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
|
|
103
|
-
if (other.length > 0) {
|
|
104
|
-
throw new Error('Unsupported number of selectors');
|
|
105
|
-
}
|
|
106
|
-
let selector;
|
|
107
|
-
|
|
108
24
|
// eslint-disable-next-line id-denylist
|
|
109
25
|
if (a && b && c && d && e && f) {
|
|
110
26
|
selector = (stateOrApiRef, args, instanceIdParam) => {
|
|
@@ -166,49 +82,14 @@ export const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
|
|
|
166
82
|
selector.acceptsApiRef = true;
|
|
167
83
|
return selector;
|
|
168
84
|
};
|
|
169
|
-
|
|
170
|
-
// TODO v8: Remove this function
|
|
171
85
|
export const createSelectorMemoized = (...args) => {
|
|
172
|
-
const selector = (stateOrApiRef, instanceId) => {
|
|
173
|
-
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
174
|
-
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
|
|
175
|
-
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
176
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
177
|
-
if (cacheKey.id === 'default') {
|
|
178
|
-
warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
const cacheArgsInit = cache.get(cacheKey);
|
|
182
|
-
const cacheArgs = cacheArgsInit ?? new Map();
|
|
183
|
-
const cacheFn = cacheArgs?.get(args);
|
|
184
|
-
if (cacheArgs && cacheFn) {
|
|
185
|
-
// We pass the cache key because the called selector might have as
|
|
186
|
-
// dependency another selector created with this `createSelector`.
|
|
187
|
-
return cacheFn(state, cacheKey);
|
|
188
|
-
}
|
|
189
|
-
const fn = reselectCreateSelector(...args);
|
|
190
|
-
if (!cacheArgsInit) {
|
|
191
|
-
cache.set(cacheKey, cacheArgs);
|
|
192
|
-
}
|
|
193
|
-
cacheArgs.set(args, fn);
|
|
194
|
-
return fn(state, cacheKey);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
// We use this property to detect if the selector was created with createSelector
|
|
198
|
-
// or it's only a simple function the receives the state and returns part of it.
|
|
199
|
-
selector.acceptsApiRef = true;
|
|
200
|
-
return selector;
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
// TODO v8: Rename this function to `createSelectorMemoized`
|
|
204
|
-
export const createSelectorMemoizedV8 = (...args) => {
|
|
205
86
|
const selector = (stateOrApiRef, selectorArgs, instanceId) => {
|
|
206
87
|
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
207
88
|
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
|
|
208
89
|
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
209
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
210
91
|
if (cacheKey.id === 'default') {
|
|
211
|
-
warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
92
|
+
warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, args, apiRef.current.instanceId)`.']);
|
|
212
93
|
}
|
|
213
94
|
}
|
|
214
95
|
const cacheArgsInit = cache.get(cacheKey);
|
package/utils/domUtils.js
CHANGED
|
@@ -153,7 +153,7 @@ const findPinnedHeaders = ({
|
|
|
153
153
|
const elements = [];
|
|
154
154
|
api.columnHeadersContainerRef.current.querySelectorAll(`.${gridClasses[position === 'left' ? 'columnHeader--pinnedLeft' : 'columnHeader--pinnedRight']}`).forEach(element => {
|
|
155
155
|
const currentColIndex = parseCellColIndex(element);
|
|
156
|
-
if (currentColIndex !== null && filterFn(currentColIndex)) {
|
|
156
|
+
if (currentColIndex !== null && filterFn(currentColIndex, element)) {
|
|
157
157
|
elements.push(element);
|
|
158
158
|
}
|
|
159
159
|
});
|
|
@@ -174,7 +174,12 @@ export function findRightPinnedHeadersBeforeCol(api, col, isRtl) {
|
|
|
174
174
|
api,
|
|
175
175
|
position: isRtl ? 'left' : 'right',
|
|
176
176
|
colIndex,
|
|
177
|
-
filterFn: index =>
|
|
177
|
+
filterFn: (index, element) => {
|
|
178
|
+
if (element.classList.contains(gridClasses['columnHeader--last'])) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
return isRtl ? index > colIndex : index < colIndex;
|
|
182
|
+
}
|
|
178
183
|
});
|
|
179
184
|
}
|
|
180
185
|
export function findGridHeader(api, field) {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
1
2
|
import type { GridPrivateApiCommunity } from '../models/api/gridApiCommunity';
|
|
2
|
-
export declare function getPublicApiRef<PrivateApi extends GridPrivateApiCommunity>(apiRef:
|
|
3
|
+
export declare function getPublicApiRef<PrivateApi extends GridPrivateApiCommunity>(apiRef: RefObject<PrivateApi>): RefObject<ReturnType<PrivateApi["getPublicApi"]>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isJSDOM: boolean;
|
package/utils/isJSDOM.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isJSDOM = typeof window !== 'undefined' && /jsdom|HappyDOM/.test(window.navigator.userAgent);
|
package/utils/keyboardUtils.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export declare const isCellExitEditModeKeys: (key: string) => boolean;
|
|
|
9
9
|
export declare const isCellEditCommitKeys: (key: string) => boolean;
|
|
10
10
|
export declare const isNavigationKey: (key: string) => boolean;
|
|
11
11
|
export declare const isKeyboardEvent: (event: any) => event is React.KeyboardEvent<HTMLElement>;
|
|
12
|
-
export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "
|
|
12
|
+
export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "Escape" | "Tab";
|
|
13
13
|
export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
|
|
14
14
|
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function roundToDecimalPlaces(value: number, decimals: number): number;
|