@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.11
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 +2007 -230
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +3 -3
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +1 -1
- package/colDef/gridDateOperators.d.ts +2 -1
- package/colDef/gridNumericOperators.d.ts +4 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridHeaders.js +2 -2
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +10 -8
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +7 -4
- package/components/GridRow.d.ts +6 -11
- package/components/GridRow.js +60 -88
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.d.ts +5 -2
- package/components/GridScrollArea.js +33 -24
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +23 -21
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.d.ts +17 -10
- package/components/cell/GridActionsCellItem.js +9 -8
- package/components/cell/GridCell.d.ts +19 -23
- package/components/cell/GridCell.js +49 -92
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +73 -4
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +1 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
- package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/components/columnsManagement/GridColumnsManagement.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +29 -17
- package/components/containers/GridRootStyles.js +163 -53
- 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 +8 -4
- 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 +43 -21
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -4
- package/constants/gridClasses.d.ts +12 -12
- package/constants/gridClasses.js +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.js +2 -1
- package/constants/localeTextConstants.js +1 -1
- package/constants/signature.d.ts +9 -0
- package/constants/signature.js +10 -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 +7 -5
- 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 +3 -3
- 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 +6 -5
- 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 +39 -78
- 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 +11 -16
- package/hooks/features/columns/gridColumnsSelector.js +0 -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 +9 -4
- 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/gridDimensionsSelectors.d.ts +16 -0
- package/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/hooks/features/dimensions/index.d.ts +1 -1
- package/hooks/features/dimensions/index.js +1 -2
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/hooks/features/editing/gridEditingSelectors.d.ts +10 -0
- package/hooks/features/editing/gridEditingSelectors.js +12 -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 +10 -11
- 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 +8 -2
- package/hooks/features/filter/gridFilterState.d.ts +8 -3
- package/hooks/features/filter/gridFilterState.js +5 -0
- 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 +10 -15
- 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 +23 -3
- 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/gridPaginationUtils.js +1 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +6 -4
- 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 +11 -18
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +4 -4
- 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/gridRowsMetaState.d.ts +8 -0
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +3 -7
- package/hooks/features/rows/gridRowsUtils.js +0 -25
- 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 +27 -29
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +36 -19
- 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 +21 -9
- 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 +21 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +9 -19
- package/hooks/utils/useGridApiEventHandler.js +68 -75
- 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 +29 -49
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/hooks/utils/useIsSSR.d.ts +1 -0
- package/hooks/utils/useIsSSR.js +5 -0
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +9 -5
- package/internals/index.js +7 -4
- 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/internals/utils/propValidation.js +1 -1
- package/locales/arSD.js +2 -1
- package/locales/beBY.js +1 -1
- package/locales/bgBG.js +2 -1
- package/locales/csCZ.js +2 -1
- package/locales/daDK.js +2 -1
- package/locales/deDE.js +12 -13
- package/locales/elGR.js +2 -1
- package/locales/esES.js +12 -13
- package/locales/faIR.js +7 -7
- package/locales/fiFI.js +2 -1
- package/locales/frFR.js +2 -1
- package/locales/heIL.js +16 -17
- package/locales/hrHR.js +2 -1
- package/locales/huHU.js +2 -1
- package/locales/isIS.js +2 -1
- package/locales/itIT.js +2 -1
- package/locales/jaJP.js +2 -1
- package/locales/koKR.js +46 -49
- package/locales/nbNO.js +2 -1
- package/locales/nlNL.js +7 -7
- package/locales/nnNO.js +2 -1
- package/locales/plPL.js +2 -1
- package/locales/ptBR.js +12 -13
- package/locales/ptPT.js +12 -13
- package/locales/roRO.js +20 -21
- package/locales/ruRU.js +2 -1
- package/locales/skSK.js +2 -1
- package/locales/svSE.js +2 -1
- package/locales/trTR.js +14 -15
- package/locales/ukUA.js +2 -1
- package/locales/urPK.js +11 -11
- package/locales/viVN.js +2 -1
- package/locales/zhCN.js +12 -13
- package/locales/zhHK.js +2 -1
- package/locales/zhTW.js +2 -1
- package/material/index.js +58 -7
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +7 -7
- package/models/api/gridDensityApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +2 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +34 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +13 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +1 -1
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterInputComponent.d.ts +32 -0
- package/models/gridFilterOperator.d.ts +6 -4
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponent.d.ts +16 -1
- package/models/gridSlotsComponentsProps.d.ts +45 -9
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +12 -24
- package/modern/DataGrid/DataGrid.js +20 -38
- package/modern/DataGrid/useDataGridComponent.js +3 -3
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridLoadingOverlay.js +10 -8
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +7 -4
- package/modern/components/GridRow.js +60 -88
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +33 -24
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +23 -21
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +9 -8
- package/modern/components/cell/GridCell.js +49 -92
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +73 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/cell/GridSkeletonCell.js +1 -2
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/modern/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/containers/GridRootStyles.js +163 -53
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- 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 +43 -21
- 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/index.js +2 -1
- package/modern/constants/localeTextConstants.js +1 -1
- package/modern/constants/signature.js +10 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/core/useGridStateInitialization.js +6 -5
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
- 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/gridColumnsSelector.js +0 -12
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +9 -4
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/modern/hooks/features/dimensions/index.js +1 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/modern/hooks/features/editing/gridEditingSelectors.js +12 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +10 -11
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +8 -2
- package/modern/hooks/features/filter/gridFilterState.js +5 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +10 -15
- 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 +23 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/gridPaginationUtils.js +1 -1
- package/modern/hooks/features/pagination/useGridPagination.js +6 -4
- 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 +11 -18
- package/modern/hooks/features/rowSelection/utils.js +4 -4
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -25
- 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 +27 -29
- package/modern/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/modern/hooks/features/sorting/gridSortingSelector.js +21 -9
- 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 +209 -118
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridApiEventHandler.js +68 -75
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +29 -49
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/hooks/utils/useIsSSR.js +5 -0
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +7 -4
- 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/internals/utils/propValidation.js +1 -1
- package/modern/locales/arSD.js +2 -1
- package/modern/locales/beBY.js +1 -1
- package/modern/locales/bgBG.js +2 -1
- package/modern/locales/csCZ.js +2 -1
- package/modern/locales/daDK.js +2 -1
- package/modern/locales/deDE.js +12 -13
- package/modern/locales/elGR.js +2 -1
- package/modern/locales/esES.js +12 -13
- package/modern/locales/faIR.js +7 -7
- package/modern/locales/fiFI.js +2 -1
- package/modern/locales/frFR.js +2 -1
- package/modern/locales/heIL.js +16 -17
- package/modern/locales/hrHR.js +2 -1
- package/modern/locales/huHU.js +2 -1
- package/modern/locales/isIS.js +2 -1
- package/modern/locales/itIT.js +2 -1
- package/modern/locales/jaJP.js +2 -1
- package/modern/locales/koKR.js +46 -49
- package/modern/locales/nbNO.js +2 -1
- package/modern/locales/nlNL.js +7 -7
- package/modern/locales/nnNO.js +2 -1
- package/modern/locales/plPL.js +2 -1
- package/modern/locales/ptBR.js +12 -13
- package/modern/locales/ptPT.js +12 -13
- package/modern/locales/roRO.js +20 -21
- package/modern/locales/ruRU.js +2 -1
- package/modern/locales/skSK.js +2 -1
- package/modern/locales/svSE.js +2 -1
- package/modern/locales/trTR.js +14 -15
- package/modern/locales/ukUA.js +2 -1
- package/modern/locales/urPK.js +11 -11
- package/modern/locales/viVN.js +2 -1
- package/modern/locales/zhCN.js +12 -13
- package/modern/locales/zhHK.js +2 -1
- package/modern/locales/zhTW.js +2 -1
- package/modern/material/index.js +58 -7
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/models/gridFilterInputComponent.js +1 -0
- package/modern/utils/assert.js +3 -0
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/createSelector.js +1 -120
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/roundToDecimalPlaces.js +3 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/modern/utils/utils.js +6 -1
- package/node/DataGrid/DataGrid.js +18 -36
- package/node/DataGrid/useDataGridComponent.js +3 -3
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridLoadingOverlay.js +10 -8
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +7 -4
- package/node/components/GridRow.js +56 -85
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +32 -24
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +23 -21
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +7 -8
- package/node/components/cell/GridCell.js +48 -91
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +73 -4
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/cell/GridSkeletonCell.js +1 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
- package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/node/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +27 -15
- package/node/components/containers/GridRootStyles.js +163 -53
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- 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 +43 -21
- 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/index.js +11 -0
- package/node/constants/localeTextConstants.js +1 -1
- package/node/constants/signature.js +16 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +4 -4
- package/node/hooks/core/useGridStateInitialization.js +6 -5
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +37 -76
- 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/gridColumnsSelector.js +1 -13
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +9 -4
- package/node/hooks/features/dimensions/gridDimensionsSelectors.js +38 -2
- package/node/hooks/features/dimensions/index.js +13 -11
- package/node/hooks/features/dimensions/useGridDimensions.js +102 -96
- package/node/hooks/features/editing/gridEditingSelectors.js +12 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +8 -9
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +8 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +9 -14
- 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 +25 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/node/hooks/features/pagination/useGridPagination.js +6 -4
- 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 +12 -19
- package/node/hooks/features/rowSelection/utils.js +5 -5
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -26
- 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 +27 -29
- package/node/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/node/hooks/features/sorting/gridSortingSelector.js +22 -10
- 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 +210 -119
- package/node/hooks/utils/index.js +21 -11
- package/node/hooks/utils/useGridApiEventHandler.js +71 -78
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +31 -52
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/hooks/utils/useIsSSR.js +12 -0
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +57 -27
- 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/internals/utils/propValidation.js +2 -2
- package/node/locales/arSD.js +2 -1
- package/node/locales/beBY.js +1 -1
- package/node/locales/bgBG.js +2 -1
- package/node/locales/csCZ.js +2 -1
- package/node/locales/daDK.js +2 -1
- package/node/locales/deDE.js +12 -13
- package/node/locales/elGR.js +2 -1
- package/node/locales/esES.js +12 -13
- package/node/locales/faIR.js +7 -7
- package/node/locales/fiFI.js +2 -1
- package/node/locales/frFR.js +2 -1
- package/node/locales/heIL.js +16 -17
- package/node/locales/hrHR.js +2 -1
- package/node/locales/huHU.js +2 -1
- package/node/locales/isIS.js +2 -1
- package/node/locales/itIT.js +2 -1
- package/node/locales/jaJP.js +2 -1
- package/node/locales/koKR.js +46 -49
- package/node/locales/nbNO.js +2 -1
- package/node/locales/nlNL.js +7 -7
- package/node/locales/nnNO.js +2 -1
- package/node/locales/plPL.js +2 -1
- package/node/locales/ptBR.js +12 -13
- package/node/locales/ptPT.js +12 -13
- package/node/locales/roRO.js +20 -21
- package/node/locales/ruRU.js +2 -1
- package/node/locales/skSK.js +2 -1
- package/node/locales/svSE.js +2 -1
- package/node/locales/trTR.js +14 -15
- package/node/locales/ukUA.js +2 -1
- package/node/locales/urPK.js +11 -11
- package/node/locales/viVN.js +2 -1
- package/node/locales/zhCN.js +12 -13
- package/node/locales/zhHK.js +2 -1
- package/node/locales/zhTW.js +2 -1
- package/node/material/index.js +59 -7
- package/node/models/api/index.js +0 -11
- package/node/models/gridFilterInputComponent.js +5 -0
- package/node/utils/assert.js +9 -0
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/createSelector.js +4 -125
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/roundToDecimalPlaces.js +9 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/node/utils/utils.js +8 -1
- package/package.json +4 -3
- package/themeAugmentation/overrides.d.ts +10 -5
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +3 -0
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +7 -19
- package/utils/createSelector.js +1 -120
- package/utils/domUtils.js +7 -2
- package/utils/getPublicApiRef.d.ts +2 -1
- package/utils/isJSDOM.d.ts +1 -0
- package/utils/isJSDOM.js +1 -0
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/roundToDecimalPlaces.d.ts +1 -0
- package/utils/roundToDecimalPlaces.js +3 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +6 -1
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -389
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -389
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -397
- /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
- /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
- /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
|
@@ -1,32 +1,52 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.js";
|
|
3
3
|
import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js";
|
|
4
|
-
/**
|
|
5
|
-
* Signal to the underlying logic what version of the public component API
|
|
6
|
-
* of the Data Grid is exposed.
|
|
7
|
-
*/
|
|
8
|
-
var GridSignature = /*#__PURE__*/function (GridSignature) {
|
|
9
|
-
GridSignature["DataGrid"] = "DataGrid";
|
|
10
|
-
GridSignature["DataGridPro"] = "DataGridPro";
|
|
11
|
-
GridSignature["DataGridPremium"] = "DataGridPremium";
|
|
12
|
-
return GridSignature;
|
|
13
|
-
}(GridSignature || {});
|
|
14
|
-
// We use class to make it easier to detect in heap snapshots by name
|
|
15
|
-
class ObjectToBeRetainedByReact {}
|
|
16
|
-
|
|
17
4
|
// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
|
|
18
5
|
// Check https://github.com/facebook/react/issues/15317 to get more information
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
|
|
7
|
+
// We use class to make it easier to detect in heap snapshots by name
|
|
8
|
+
class ObjectToBeRetainedByReact {
|
|
9
|
+
static create() {
|
|
10
|
+
return new ObjectToBeRetainedByReact();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const registryContainer = {
|
|
14
|
+
current: createRegistry()
|
|
15
|
+
};
|
|
16
|
+
let cleanupTokensCounter = 0;
|
|
17
|
+
export function useGridApiEventHandler(apiRef, eventName, handler, options) {
|
|
18
|
+
const objectRetainedByReact = React.useState(ObjectToBeRetainedByReact.create)[0];
|
|
19
|
+
const subscription = React.useRef(null);
|
|
20
|
+
const handlerRef = React.useRef(null);
|
|
21
|
+
handlerRef.current = handler;
|
|
22
|
+
const cleanupTokenRef = React.useRef(null);
|
|
23
|
+
if (!subscription.current && handlerRef.current) {
|
|
24
|
+
const enhancedHandler = (params, event, details) => {
|
|
25
|
+
if (!event.defaultMuiPrevented) {
|
|
26
|
+
handlerRef.current?.(params, event, details);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
|
30
|
+
cleanupTokensCounter += 1;
|
|
31
|
+
cleanupTokenRef.current = {
|
|
32
|
+
cleanupToken: cleanupTokensCounter
|
|
33
|
+
};
|
|
34
|
+
registryContainer.current.register(objectRetainedByReact,
|
|
35
|
+
// The callback below will be called once this reference stops being retained
|
|
36
|
+
() => {
|
|
37
|
+
subscription.current?.();
|
|
38
|
+
subscription.current = null;
|
|
39
|
+
cleanupTokenRef.current = null;
|
|
40
|
+
}, cleanupTokenRef.current);
|
|
41
|
+
} else if (!handlerRef.current && subscription.current) {
|
|
42
|
+
subscription.current();
|
|
43
|
+
subscription.current = null;
|
|
44
|
+
if (cleanupTokenRef.current) {
|
|
45
|
+
registryContainer.current.unregister(cleanupTokenRef.current);
|
|
46
|
+
cleanupTokenRef.current = null;
|
|
24
47
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const handlerRef = React.useRef();
|
|
28
|
-
handlerRef.current = handler;
|
|
29
|
-
const cleanupTokenRef = React.useRef(null);
|
|
48
|
+
}
|
|
49
|
+
React.useEffect(() => {
|
|
30
50
|
if (!subscription.current && handlerRef.current) {
|
|
31
51
|
const enhancedHandler = (params, event, details) => {
|
|
32
52
|
if (!event.defaultMuiPrevented) {
|
|
@@ -34,62 +54,35 @@ export function createUseGridApiEventHandler(registryContainer) {
|
|
|
34
54
|
}
|
|
35
55
|
};
|
|
36
56
|
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
|
37
|
-
cleanupTokensCounter += 1;
|
|
38
|
-
cleanupTokenRef.current = {
|
|
39
|
-
cleanupToken: cleanupTokensCounter
|
|
40
|
-
};
|
|
41
|
-
registryContainer.registry.register(objectRetainedByReact,
|
|
42
|
-
// The callback below will be called once this reference stops being retained
|
|
43
|
-
() => {
|
|
44
|
-
subscription.current?.();
|
|
45
|
-
subscription.current = null;
|
|
46
|
-
cleanupTokenRef.current = null;
|
|
47
|
-
}, cleanupTokenRef.current);
|
|
48
|
-
} else if (!handlerRef.current && subscription.current) {
|
|
49
|
-
subscription.current();
|
|
50
|
-
subscription.current = null;
|
|
51
|
-
if (cleanupTokenRef.current) {
|
|
52
|
-
registryContainer.registry.unregister(cleanupTokenRef.current);
|
|
53
|
-
cleanupTokenRef.current = null;
|
|
54
|
-
}
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// so we can trust the cleanup function to remove the listener.
|
|
68
|
-
registryContainer.registry.unregister(cleanupTokenRef.current);
|
|
69
|
-
cleanupTokenRef.current = null;
|
|
70
|
-
}
|
|
71
|
-
return () => {
|
|
72
|
-
subscription.current?.();
|
|
73
|
-
subscription.current = null;
|
|
74
|
-
};
|
|
75
|
-
}, [apiRef, eventName, options]);
|
|
76
|
-
};
|
|
58
|
+
if (cleanupTokenRef.current && registryContainer.current) {
|
|
59
|
+
// If the effect was called, it means that this render was committed
|
|
60
|
+
// so we can trust the cleanup function to remove the listener.
|
|
61
|
+
registryContainer.current.unregister(cleanupTokenRef.current);
|
|
62
|
+
cleanupTokenRef.current = null;
|
|
63
|
+
}
|
|
64
|
+
return () => {
|
|
65
|
+
subscription.current?.();
|
|
66
|
+
subscription.current = null;
|
|
67
|
+
};
|
|
68
|
+
}, [apiRef, eventName, options]);
|
|
77
69
|
}
|
|
78
|
-
const
|
|
79
|
-
|
|
70
|
+
const OPTIONS_IS_FIRST = {
|
|
71
|
+
isFirst: true
|
|
80
72
|
};
|
|
73
|
+
export function useGridApiOptionHandler(apiRef, eventName, handler) {
|
|
74
|
+
useGridApiEventHandler(apiRef, eventName, handler, OPTIONS_IS_FIRST);
|
|
75
|
+
}
|
|
81
76
|
|
|
82
77
|
// TODO: move to @mui/x-data-grid/internals
|
|
83
78
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
84
|
-
export
|
|
85
|
-
registryContainer.
|
|
86
|
-
registryContainer.
|
|
87
|
-
};
|
|
88
|
-
export const useGridApiEventHandler = createUseGridApiEventHandler(registryContainer);
|
|
89
|
-
const optionsSubscriberOptions = {
|
|
90
|
-
isFirst: true
|
|
91
|
-
};
|
|
92
|
-
export function useGridApiOptionHandler(apiRef, eventName, handler) {
|
|
93
|
-
useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);
|
|
79
|
+
export function unstable_resetCleanupTracking() {
|
|
80
|
+
registryContainer.current?.reset();
|
|
81
|
+
registryContainer.current = createRegistry();
|
|
94
82
|
}
|
|
95
|
-
|
|
83
|
+
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
85
|
+
export const internal_registryContainer = registryContainer;
|
|
86
|
+
function createRegistry() {
|
|
87
|
+
return typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistryBasedCleanupTracking() : new TimerBasedCleanupTracking();
|
|
88
|
+
}
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';
|
|
3
3
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
4
|
+
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
4
5
|
import { useLazyRef } from "./useLazyRef.js";
|
|
5
|
-
import { useOnMount } from "./useOnMount.js";
|
|
6
6
|
function isOutputSelector(selector) {
|
|
7
7
|
return selector.acceptsApiRef;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
function applySelector(apiRef, selector) {
|
|
11
|
-
if (isOutputSelector(selector)) {
|
|
12
|
-
return selector(apiRef);
|
|
13
|
-
}
|
|
14
|
-
return selector(apiRef.current.state);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// TODO v8: Rename this function to `applySelector`
|
|
18
|
-
function applySelectorV8(apiRef, selector, args, instanceId) {
|
|
9
|
+
function applySelector(apiRef, selector, args, instanceId) {
|
|
19
10
|
if (isOutputSelector(selector)) {
|
|
20
11
|
return selector(apiRef, args);
|
|
21
12
|
}
|
|
22
|
-
return selector(apiRef.current.state, instanceId);
|
|
13
|
+
return selector(apiRef.current.state, args, instanceId);
|
|
23
14
|
}
|
|
24
15
|
const defaultCompare = Object.is;
|
|
25
16
|
export const objectShallowCompare = fastObjectShallowCompare;
|
|
@@ -42,38 +33,11 @@ const createRefs = () => ({
|
|
|
42
33
|
state: null,
|
|
43
34
|
equals: null,
|
|
44
35
|
selector: null,
|
|
45
|
-
args:
|
|
36
|
+
args: undefined
|
|
46
37
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
50
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
51
|
-
if (!apiRef.current.state) {
|
|
52
|
-
warnOnce(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const refs = useLazyRef(createRefs);
|
|
56
|
-
const didInit = refs.current.selector !== null;
|
|
57
|
-
const [state, setState] = React.useState(
|
|
58
|
-
// We don't use an initialization function to avoid allocations
|
|
59
|
-
didInit ? null : applySelector(apiRef, selector));
|
|
60
|
-
refs.current.state = state;
|
|
61
|
-
refs.current.equals = equals;
|
|
62
|
-
refs.current.selector = selector;
|
|
63
|
-
useOnMount(() => {
|
|
64
|
-
return apiRef.current.store.subscribe(() => {
|
|
65
|
-
const newState = applySelector(apiRef, refs.current.selector);
|
|
66
|
-
if (!refs.current.equals(refs.current.state, newState)) {
|
|
67
|
-
refs.current.state = newState;
|
|
68
|
-
setState(newState);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
return state;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// TODO v8: Rename this function to `useGridSelector`
|
|
76
|
-
export const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
38
|
+
const EMPTY = [];
|
|
39
|
+
const emptyGetSnapshot = () => null;
|
|
40
|
+
export const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
77
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
78
42
|
if (!apiRef.current.state) {
|
|
79
43
|
warnOnce(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
@@ -83,27 +47,43 @@ export const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = d
|
|
|
83
47
|
const didInit = refs.current.selector !== null;
|
|
84
48
|
const [state, setState] = React.useState(
|
|
85
49
|
// We don't use an initialization function to avoid allocations
|
|
86
|
-
didInit ? null :
|
|
50
|
+
didInit ? null : applySelector(apiRef, selector, args, apiRef.current.instanceId));
|
|
87
51
|
refs.current.state = state;
|
|
88
52
|
refs.current.equals = equals;
|
|
89
53
|
refs.current.selector = selector;
|
|
90
54
|
const prevArgs = refs.current.args;
|
|
91
55
|
refs.current.args = args;
|
|
92
56
|
if (didInit && !argsEqual(prevArgs, args)) {
|
|
93
|
-
const newState =
|
|
57
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
94
58
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
95
59
|
refs.current.state = newState;
|
|
96
60
|
setState(newState);
|
|
97
61
|
}
|
|
98
62
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
63
|
+
const subscribe = React.useCallback(() => {
|
|
64
|
+
if (refs.current.subscription) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
refs.current.subscription = apiRef.current.store.subscribe(() => {
|
|
68
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
102
69
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
103
70
|
refs.current.state = newState;
|
|
104
71
|
setState(newState);
|
|
105
72
|
}
|
|
106
73
|
});
|
|
107
|
-
|
|
74
|
+
return null;
|
|
75
|
+
},
|
|
76
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
+
EMPTY);
|
|
78
|
+
const unsubscribe = React.useCallback(() => {
|
|
79
|
+
return () => {
|
|
80
|
+
if (refs.current.subscription) {
|
|
81
|
+
refs.current.subscription();
|
|
82
|
+
refs.current.subscription = undefined;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
+
}, EMPTY);
|
|
87
|
+
useSyncExternalStore(unsubscribe, subscribe, emptyGetSnapshot);
|
|
108
88
|
return state;
|
|
109
89
|
};
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { gridExpandedSortedRowEntriesSelector } from "../features/filter/gridFilterSelector.js";
|
|
1
|
+
import { gridVisibleRowsSelector } from "../features/pagination/gridPaginationSelector.js";
|
|
2
|
+
import { useGridSelector } from "./index.js";
|
|
4
3
|
export const getVisibleRows = (apiRef, props) => {
|
|
5
|
-
|
|
6
|
-
let range;
|
|
7
|
-
if (props.pagination && props.paginationMode === 'client') {
|
|
8
|
-
range = gridPaginationRowRangeSelector(apiRef);
|
|
9
|
-
rows = gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef);
|
|
10
|
-
} else {
|
|
11
|
-
rows = gridExpandedSortedRowEntriesSelector(apiRef);
|
|
12
|
-
if (rows.length === 0) {
|
|
13
|
-
range = null;
|
|
14
|
-
} else {
|
|
15
|
-
range = {
|
|
16
|
-
firstRowIndex: 0,
|
|
17
|
-
lastRowIndex: rows.length - 1
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
rows,
|
|
23
|
-
range
|
|
24
|
-
};
|
|
4
|
+
return gridVisibleRowsSelector(apiRef);
|
|
25
5
|
};
|
|
26
6
|
|
|
27
7
|
/**
|
|
@@ -31,10 +11,7 @@ export const getVisibleRows = (apiRef, props) => {
|
|
|
31
11
|
* - If the row tree has several layers, it contains up to `state.pageSize` top level rows and all their descendants.
|
|
32
12
|
* - If the row tree is flat, it only contains up to `state.pageSize` rows.
|
|
33
13
|
*/
|
|
14
|
+
|
|
34
15
|
export const useGridVisibleRows = (apiRef, props) => {
|
|
35
|
-
|
|
36
|
-
return React.useMemo(() => ({
|
|
37
|
-
rows: response.rows,
|
|
38
|
-
range: response.range
|
|
39
|
-
}), [response.rows, response.range]);
|
|
16
|
+
return useGridSelector(apiRef, gridVisibleRowsSelector);
|
|
40
17
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
2
|
+
const emptySubscribe = () => () => {};
|
|
3
|
+
const clientSnapshot = () => false;
|
|
4
|
+
const serverSnapshot = () => true;
|
|
5
|
+
export const useIsSSR = () => useSyncExternalStore(emptySubscribe, clientSnapshot, serverSnapshot);
|
package/modern/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export const GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
|
|
2
2
|
export const GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = '__row_group_by_columns_group__';
|
|
3
|
-
export const GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
|
|
3
|
+
export const GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
|
|
4
|
+
export let PinnedColumnPosition = /*#__PURE__*/function (PinnedColumnPosition) {
|
|
5
|
+
PinnedColumnPosition[PinnedColumnPosition["NONE"] = 0] = "NONE";
|
|
6
|
+
PinnedColumnPosition[PinnedColumnPosition["LEFT"] = 1] = "LEFT";
|
|
7
|
+
PinnedColumnPosition[PinnedColumnPosition["RIGHT"] = 2] = "RIGHT";
|
|
8
|
+
PinnedColumnPosition[PinnedColumnPosition["VIRTUAL"] = 3] = "VIRTUAL";
|
|
9
|
+
return PinnedColumnPosition;
|
|
10
|
+
}({});
|
|
@@ -4,10 +4,11 @@ export { GridVirtualScrollerRenderZone } from "../components/virtualization/Grid
|
|
|
4
4
|
export { GridHeaders } from "../components/GridHeaders.js";
|
|
5
5
|
export { GridBaseColumnHeaders } from "../components/columnHeaders/GridBaseColumnHeaders.js";
|
|
6
6
|
export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
|
|
7
|
+
export * from "../constants/signature.js";
|
|
7
8
|
export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.js";
|
|
8
9
|
export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
9
10
|
export { useGridRegisterPipeProcessor } from "../hooks/core/pipeProcessing/index.js";
|
|
10
|
-
export { useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from "../hooks/core/strategyProcessing/index.js";
|
|
11
|
+
export { GridStrategyGroup, useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from "../hooks/core/strategyProcessing/index.js";
|
|
11
12
|
export { useGridInitialization } from "../hooks/core/useGridInitialization.js";
|
|
12
13
|
export { unwrapPrivateAPI } from "../hooks/core/useGridApiInitialization.js";
|
|
13
14
|
export { useGridClipboard } from "../hooks/features/clipboard/useGridClipboard.js";
|
|
@@ -23,6 +24,7 @@ export { useGridDensity, densityStateInitializer } from "../hooks/features/densi
|
|
|
23
24
|
export { useGridCsvExport } from "../hooks/features/export/useGridCsvExport.js";
|
|
24
25
|
export { useGridPrintExport } from "../hooks/features/export/useGridPrintExport.js";
|
|
25
26
|
export { useGridFilter, filterStateInitializer } from "../hooks/features/filter/useGridFilter.js";
|
|
27
|
+
export { defaultGridFilterLookup } from "../hooks/features/filter/gridFilterState.js";
|
|
26
28
|
export { passFilterLogic } from "../hooks/features/filter/gridFilterUtils.js";
|
|
27
29
|
export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector } from "../hooks/features/filter/gridFilterSelector.js";
|
|
28
30
|
export { isSingleSelectColDef } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
@@ -43,13 +45,14 @@ export { useGridParamsApi } from "../hooks/features/rows/useGridParamsApi.js";
|
|
|
43
45
|
export { getRowIdFromRowModel, GRID_ID_AUTOGENERATED } from "../hooks/features/rows/gridRowsUtils.js";
|
|
44
46
|
export { gridAdditionalRowGroupsSelector, gridPinnedRowsSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
45
47
|
export { headerFilteringStateInitializer, useGridHeaderFiltering } from "../hooks/features/headerFiltering/useGridHeaderFiltering.js";
|
|
46
|
-
export { calculatePinnedRowsHeight } from "../hooks/features/rows/gridRowsUtils.js";
|
|
47
48
|
export { useGridRowSelection, rowSelectionStateInitializer } from "../hooks/features/rowSelection/useGridRowSelection.js";
|
|
48
49
|
export { useGridRowSelectionPreProcessors } from "../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js";
|
|
49
50
|
export { useGridSorting, sortingStateInitializer } from "../hooks/features/sorting/useGridSorting.js";
|
|
51
|
+
export { gridSortedRowIndexLookupSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
50
52
|
export { useGridScroll } from "../hooks/features/scroll/useGridScroll.js";
|
|
51
53
|
export { useGridEvents } from "../hooks/features/events/useGridEvents.js";
|
|
52
54
|
export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features/dimensions/useGridDimensions.js";
|
|
55
|
+
export * from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
53
56
|
export { useGridStatePersistence } from "../hooks/features/statePersistence/useGridStatePersistence.js";
|
|
54
57
|
export { useGridVirtualScroller, EMPTY_DETAIL_PANELS } from "../hooks/features/virtualization/useGridVirtualScroller.js";
|
|
55
58
|
export * from "../hooks/features/virtualization/index.js";
|
|
@@ -61,8 +64,8 @@ export { useGridVisibleRows, getVisibleRows } from "../hooks/utils/useGridVisibl
|
|
|
61
64
|
export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js";
|
|
62
65
|
export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.js";
|
|
63
66
|
export * from "../utils/createControllablePromise.js";
|
|
64
|
-
export
|
|
65
|
-
export {
|
|
67
|
+
export * from "../utils/rtlFlipSide.js";
|
|
68
|
+
export { createSelector, createSelectorMemoized } from "../utils/createSelector.js";
|
|
66
69
|
export { gridRowGroupsToFetchSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
67
70
|
export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from "../utils/domUtils.js";
|
|
68
71
|
export { isNavigationKey, isPasteShortcut, isCopyShortcut } from "../utils/keyboardUtils.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { rtlFlipSide } from "../../utils/rtlFlipSide.js";
|
|
2
|
+
export function attachPinnedStyle(style, isRtl, pinnedPosition, pinnedOffset) {
|
|
3
|
+
const side = rtlFlipSide(pinnedPosition, isRtl);
|
|
4
|
+
if (!side || pinnedOffset === undefined) {
|
|
5
|
+
return style;
|
|
6
|
+
}
|
|
7
|
+
style[side] = pinnedOffset;
|
|
8
|
+
return style;
|
|
9
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions,
|
|
3
|
-
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
1
|
+
import { PinnedColumnPosition } from "../constants.js";
|
|
2
|
+
export const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth) => {
|
|
4
3
|
let pinnedOffset;
|
|
5
4
|
switch (pinnedPosition) {
|
|
6
|
-
case
|
|
5
|
+
case PinnedColumnPosition.LEFT:
|
|
7
6
|
pinnedOffset = columnPositions[columnIndex];
|
|
8
7
|
break;
|
|
9
|
-
case
|
|
10
|
-
pinnedOffset =
|
|
8
|
+
case PinnedColumnPosition.RIGHT:
|
|
9
|
+
pinnedOffset = columnsTotalWidth - columnPositions[columnIndex] - computedWidth + scrollbarWidth;
|
|
11
10
|
break;
|
|
12
11
|
default:
|
|
13
|
-
pinnedOffset =
|
|
12
|
+
pinnedOffset = undefined;
|
|
14
13
|
break;
|
|
15
14
|
}
|
|
16
15
|
return pinnedOffset;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
2
2
|
import { isNumber } from "../../utils/utils.js";
|
|
3
|
-
import { GridSignature } from "../../
|
|
3
|
+
import { GridSignature } from "../../constants/signature.js";
|
|
4
4
|
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.unstable_dataSource && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
5
5
|
export function validateProps(props, validators) {
|
|
6
6
|
validators.forEach(validator => {
|
package/modern/locales/arSD.js
CHANGED
|
@@ -28,7 +28,6 @@ const arSDGrid = {
|
|
|
28
28
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
29
29
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
30
30
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
31
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
32
31
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
33
32
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
34
33
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -103,6 +102,8 @@ const arSDGrid = {
|
|
|
103
102
|
'headerFilterOperator>=': 'أكبر من او يساوي',
|
|
104
103
|
'headerFilterOperator<': 'اصغر من',
|
|
105
104
|
'headerFilterOperator<=': 'اصغر من او يساوي',
|
|
105
|
+
// headerFilterClear: 'Clear filter',
|
|
106
|
+
|
|
106
107
|
// Filter values text
|
|
107
108
|
filterValueAny: 'أي',
|
|
108
109
|
filterValueTrue: 'صائب',
|
package/modern/locales/beBY.js
CHANGED
|
@@ -42,7 +42,6 @@ const beBYGrid = {
|
|
|
42
42
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
43
43
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
44
44
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
45
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
46
45
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
47
46
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
48
47
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -118,6 +117,7 @@ const beBYGrid = {
|
|
|
118
117
|
// 'headerFilterOperator>=': 'Greater than or equal to',
|
|
119
118
|
// 'headerFilterOperator<': 'Less than',
|
|
120
119
|
// 'headerFilterOperator<=': 'Less than or equal to',
|
|
120
|
+
// headerFilterClear: 'Clear filter',
|
|
121
121
|
|
|
122
122
|
// Filter values text
|
|
123
123
|
filterValueAny: 'усякі',
|
package/modern/locales/bgBG.js
CHANGED
|
@@ -28,7 +28,6 @@ const bgBGGrid = {
|
|
|
28
28
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
29
29
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
30
30
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
31
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
32
31
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
33
32
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
34
33
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -103,6 +102,8 @@ const bgBGGrid = {
|
|
|
103
102
|
'headerFilterOperator>=': 'По-голямо или равно на',
|
|
104
103
|
'headerFilterOperator<': 'По-малко от',
|
|
105
104
|
'headerFilterOperator<=': 'По-малко или равно на',
|
|
105
|
+
// headerFilterClear: 'Clear filter',
|
|
106
|
+
|
|
106
107
|
// Filter values text
|
|
107
108
|
filterValueAny: 'всякакви',
|
|
108
109
|
filterValueTrue: 'вярно',
|
package/modern/locales/csCZ.js
CHANGED
|
@@ -36,7 +36,6 @@ const csCZGrid = {
|
|
|
36
36
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
37
37
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
38
38
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
39
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
40
39
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
41
40
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
42
41
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -111,6 +110,8 @@ const csCZGrid = {
|
|
|
111
110
|
'headerFilterOperator>=': 'Větší než nebo rovno',
|
|
112
111
|
'headerFilterOperator<': 'Menší než',
|
|
113
112
|
'headerFilterOperator<=': 'Menší než nebo rovno',
|
|
113
|
+
// headerFilterClear: 'Clear filter',
|
|
114
|
+
|
|
114
115
|
// Filter values text
|
|
115
116
|
filterValueAny: 'jakýkoliv',
|
|
116
117
|
filterValueTrue: 'ano',
|
package/modern/locales/daDK.js
CHANGED
|
@@ -28,7 +28,6 @@ const daDKGrid = {
|
|
|
28
28
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
29
29
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
30
30
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
31
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
32
31
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
33
32
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
34
33
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -103,6 +102,8 @@ const daDKGrid = {
|
|
|
103
102
|
'headerFilterOperator>=': 'Større end eller lig med',
|
|
104
103
|
'headerFilterOperator<': 'Mindre end',
|
|
105
104
|
'headerFilterOperator<=': 'Mindre end eller lig med',
|
|
105
|
+
// headerFilterClear: 'Clear filter',
|
|
106
|
+
|
|
106
107
|
// Filter values text
|
|
107
108
|
filterValueAny: 'hvilken som helst',
|
|
108
109
|
filterValueTrue: 'positiv',
|
package/modern/locales/deDE.js
CHANGED
|
@@ -24,17 +24,15 @@ const deDEGrid = {
|
|
|
24
24
|
toolbarQuickFilterLabel: 'Suchen',
|
|
25
25
|
toolbarQuickFilterDeleteIconLabel: 'Löschen',
|
|
26
26
|
// Prompt toolbar field
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
|
|
37
|
-
|
|
27
|
+
toolbarPromptControlPlaceholder: 'Prompt eingeben…',
|
|
28
|
+
toolbarPromptControlWithRecordingPlaceholder: 'Prompt eingeben oder aufnehmen…',
|
|
29
|
+
toolbarPromptControlRecordingPlaceholder: 'Hört Prompteingabe zu…',
|
|
30
|
+
toolbarPromptControlLabel: 'Prompteingabe',
|
|
31
|
+
toolbarPromptControlRecordButtonDefaultLabel: 'Aufnahme starten',
|
|
32
|
+
toolbarPromptControlRecordButtonActiveLabel: 'Aufnahme stoppen',
|
|
33
|
+
toolbarPromptControlSendActionLabel: 'Senden',
|
|
34
|
+
toolbarPromptControlSendActionAriaLabel: 'Prompt senden',
|
|
35
|
+
toolbarPromptControlErrorMessage: 'Ein Fehler ist während der Bearbeitung der Anfrage aufgetreten. Bitte versuche es nochmal mit einem anderen Prompt.',
|
|
38
36
|
// Export selector toolbar button text
|
|
39
37
|
toolbarExport: 'Exportieren',
|
|
40
38
|
toolbarExportLabel: 'Exportieren',
|
|
@@ -46,8 +44,7 @@ const deDEGrid = {
|
|
|
46
44
|
columnsManagementNoColumns: 'Keine Spalten',
|
|
47
45
|
columnsManagementShowHideAllText: 'Alle anzeigen/verbergen',
|
|
48
46
|
columnsManagementReset: 'Zurücksetzen',
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
columnsManagementDeleteIconLabel: 'Löschen',
|
|
51
48
|
// Filter panel text
|
|
52
49
|
filterPanelAddFilter: 'Filter hinzufügen',
|
|
53
50
|
filterPanelRemoveAll: 'Alle entfernen',
|
|
@@ -103,6 +100,8 @@ const deDEGrid = {
|
|
|
103
100
|
'headerFilterOperator>=': 'Größer als oder gleich',
|
|
104
101
|
'headerFilterOperator<': 'Kleiner als',
|
|
105
102
|
'headerFilterOperator<=': 'Kleiner als oder gleich',
|
|
103
|
+
// headerFilterClear: 'Clear filter',
|
|
104
|
+
|
|
106
105
|
// Filter values text
|
|
107
106
|
filterValueAny: 'Beliebig',
|
|
108
107
|
filterValueTrue: 'Ja',
|
package/modern/locales/elGR.js
CHANGED
|
@@ -28,7 +28,6 @@ const elGRGrid = {
|
|
|
28
28
|
// toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
|
|
29
29
|
// toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
|
|
30
30
|
// toolbarPromptControlLabel: 'Prompt input',
|
|
31
|
-
// toolbarPromptControlDeleteIconLabel: 'Clear',
|
|
32
31
|
// toolbarPromptControlRecordButtonDefaultLabel: 'Record',
|
|
33
32
|
// toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
|
|
34
33
|
// toolbarPromptControlSendActionLabel: 'Send',
|
|
@@ -103,6 +102,8 @@ const elGRGrid = {
|
|
|
103
102
|
'headerFilterOperator>=': 'Μεγαλύτερο ή ίσο με',
|
|
104
103
|
'headerFilterOperator<': 'Μικρότερο από',
|
|
105
104
|
'headerFilterOperator<=': 'Μικρότερο ή ίσο με',
|
|
105
|
+
// headerFilterClear: 'Clear filter',
|
|
106
|
+
|
|
106
107
|
// Filter values text
|
|
107
108
|
filterValueAny: 'οποιοδήποτε',
|
|
108
109
|
filterValueTrue: 'αληθές',
|