@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
|
@@ -4,8 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
+
useGridApiEventHandler: true,
|
|
8
|
+
useGridApiOptionHandler: true,
|
|
9
|
+
unstable_resetCleanupTracking: true,
|
|
7
10
|
useGridSelector: true
|
|
8
11
|
};
|
|
12
|
+
Object.defineProperty(exports, "unstable_resetCleanupTracking", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _useGridApiEventHandler.unstable_resetCleanupTracking;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useGridApiEventHandler", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _useGridApiEventHandler.useGridApiEventHandler;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "useGridApiOptionHandler", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _useGridApiEventHandler.useGridApiOptionHandler;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
9
30
|
Object.defineProperty(exports, "useGridSelector", {
|
|
10
31
|
enumerable: true,
|
|
11
32
|
get: function () {
|
|
@@ -13,17 +34,6 @@ Object.defineProperty(exports, "useGridSelector", {
|
|
|
13
34
|
}
|
|
14
35
|
});
|
|
15
36
|
var _useGridApiEventHandler = require("./useGridApiEventHandler");
|
|
16
|
-
Object.keys(_useGridApiEventHandler).forEach(function (key) {
|
|
17
|
-
if (key === "default" || key === "__esModule") return;
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _useGridApiEventHandler[key]) return;
|
|
20
|
-
Object.defineProperty(exports, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return _useGridApiEventHandler[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
37
|
var _useGridApiMethod = require("./useGridApiMethod");
|
|
28
38
|
Object.keys(_useGridApiMethod).forEach(function (key) {
|
|
29
39
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -4,39 +4,59 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.useGridApiEventHandler =
|
|
7
|
+
exports.internal_registryContainer = void 0;
|
|
8
|
+
exports.unstable_resetCleanupTracking = unstable_resetCleanupTracking;
|
|
9
|
+
exports.useGridApiEventHandler = useGridApiEventHandler;
|
|
10
10
|
exports.useGridApiOptionHandler = useGridApiOptionHandler;
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _TimerBasedCleanupTracking = require("../../utils/cleanupTracking/TimerBasedCleanupTracking");
|
|
13
13
|
var _FinalizationRegistryBasedCleanupTracking = require("../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking");
|
|
14
|
-
/**
|
|
15
|
-
* Signal to the underlying logic what version of the public component API
|
|
16
|
-
* of the Data Grid is exposed.
|
|
17
|
-
*/
|
|
18
|
-
var GridSignature = exports.GridSignature = /*#__PURE__*/function (GridSignature) {
|
|
19
|
-
GridSignature["DataGrid"] = "DataGrid";
|
|
20
|
-
GridSignature["DataGridPro"] = "DataGridPro";
|
|
21
|
-
GridSignature["DataGridPremium"] = "DataGridPremium";
|
|
22
|
-
return GridSignature;
|
|
23
|
-
}(GridSignature || {});
|
|
24
|
-
// We use class to make it easier to detect in heap snapshots by name
|
|
25
|
-
class ObjectToBeRetainedByReact {}
|
|
26
|
-
|
|
27
14
|
// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
|
|
28
15
|
// Check https://github.com/facebook/react/issues/15317 to get more information
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
|
|
17
|
+
// We use class to make it easier to detect in heap snapshots by name
|
|
18
|
+
class ObjectToBeRetainedByReact {
|
|
19
|
+
static create() {
|
|
20
|
+
return new ObjectToBeRetainedByReact();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const registryContainer = {
|
|
24
|
+
current: createRegistry()
|
|
25
|
+
};
|
|
26
|
+
let cleanupTokensCounter = 0;
|
|
27
|
+
function useGridApiEventHandler(apiRef, eventName, handler, options) {
|
|
28
|
+
const objectRetainedByReact = React.useState(ObjectToBeRetainedByReact.create)[0];
|
|
29
|
+
const subscription = React.useRef(null);
|
|
30
|
+
const handlerRef = React.useRef(null);
|
|
31
|
+
handlerRef.current = handler;
|
|
32
|
+
const cleanupTokenRef = React.useRef(null);
|
|
33
|
+
if (!subscription.current && handlerRef.current) {
|
|
34
|
+
const enhancedHandler = (params, event, details) => {
|
|
35
|
+
if (!event.defaultMuiPrevented) {
|
|
36
|
+
handlerRef.current?.(params, event, details);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
|
40
|
+
cleanupTokensCounter += 1;
|
|
41
|
+
cleanupTokenRef.current = {
|
|
42
|
+
cleanupToken: cleanupTokensCounter
|
|
43
|
+
};
|
|
44
|
+
registryContainer.current.register(objectRetainedByReact,
|
|
45
|
+
// The callback below will be called once this reference stops being retained
|
|
46
|
+
() => {
|
|
47
|
+
subscription.current?.();
|
|
48
|
+
subscription.current = null;
|
|
49
|
+
cleanupTokenRef.current = null;
|
|
50
|
+
}, cleanupTokenRef.current);
|
|
51
|
+
} else if (!handlerRef.current && subscription.current) {
|
|
52
|
+
subscription.current();
|
|
53
|
+
subscription.current = null;
|
|
54
|
+
if (cleanupTokenRef.current) {
|
|
55
|
+
registryContainer.current.unregister(cleanupTokenRef.current);
|
|
56
|
+
cleanupTokenRef.current = null;
|
|
34
57
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const handlerRef = React.useRef();
|
|
38
|
-
handlerRef.current = handler;
|
|
39
|
-
const cleanupTokenRef = React.useRef(null);
|
|
58
|
+
}
|
|
59
|
+
React.useEffect(() => {
|
|
40
60
|
if (!subscription.current && handlerRef.current) {
|
|
41
61
|
const enhancedHandler = (params, event, details) => {
|
|
42
62
|
if (!event.defaultMuiPrevented) {
|
|
@@ -44,62 +64,35 @@ function createUseGridApiEventHandler(registryContainer) {
|
|
|
44
64
|
}
|
|
45
65
|
};
|
|
46
66
|
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
|
47
|
-
cleanupTokensCounter += 1;
|
|
48
|
-
cleanupTokenRef.current = {
|
|
49
|
-
cleanupToken: cleanupTokensCounter
|
|
50
|
-
};
|
|
51
|
-
registryContainer.registry.register(objectRetainedByReact,
|
|
52
|
-
// The callback below will be called once this reference stops being retained
|
|
53
|
-
() => {
|
|
54
|
-
subscription.current?.();
|
|
55
|
-
subscription.current = null;
|
|
56
|
-
cleanupTokenRef.current = null;
|
|
57
|
-
}, cleanupTokenRef.current);
|
|
58
|
-
} else if (!handlerRef.current && subscription.current) {
|
|
59
|
-
subscription.current();
|
|
60
|
-
subscription.current = null;
|
|
61
|
-
if (cleanupTokenRef.current) {
|
|
62
|
-
registryContainer.registry.unregister(cleanupTokenRef.current);
|
|
63
|
-
cleanupTokenRef.current = null;
|
|
64
|
-
}
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// so we can trust the cleanup function to remove the listener.
|
|
78
|
-
registryContainer.registry.unregister(cleanupTokenRef.current);
|
|
79
|
-
cleanupTokenRef.current = null;
|
|
80
|
-
}
|
|
81
|
-
return () => {
|
|
82
|
-
subscription.current?.();
|
|
83
|
-
subscription.current = null;
|
|
84
|
-
};
|
|
85
|
-
}, [apiRef, eventName, options]);
|
|
86
|
-
};
|
|
68
|
+
if (cleanupTokenRef.current && registryContainer.current) {
|
|
69
|
+
// If the effect was called, it means that this render was committed
|
|
70
|
+
// so we can trust the cleanup function to remove the listener.
|
|
71
|
+
registryContainer.current.unregister(cleanupTokenRef.current);
|
|
72
|
+
cleanupTokenRef.current = null;
|
|
73
|
+
}
|
|
74
|
+
return () => {
|
|
75
|
+
subscription.current?.();
|
|
76
|
+
subscription.current = null;
|
|
77
|
+
};
|
|
78
|
+
}, [apiRef, eventName, options]);
|
|
87
79
|
}
|
|
88
|
-
const
|
|
89
|
-
|
|
80
|
+
const OPTIONS_IS_FIRST = {
|
|
81
|
+
isFirst: true
|
|
90
82
|
};
|
|
83
|
+
function useGridApiOptionHandler(apiRef, eventName, handler) {
|
|
84
|
+
useGridApiEventHandler(apiRef, eventName, handler, OPTIONS_IS_FIRST);
|
|
85
|
+
}
|
|
91
86
|
|
|
92
87
|
// TODO: move to @mui/x-data-grid/internals
|
|
93
88
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
94
|
-
|
|
95
|
-
registryContainer.
|
|
96
|
-
registryContainer.
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function useGridApiOptionHandler(apiRef, eventName, handler) {
|
|
104
|
-
useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);
|
|
89
|
+
function unstable_resetCleanupTracking() {
|
|
90
|
+
registryContainer.current?.reset();
|
|
91
|
+
registryContainer.current = createRegistry();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
95
|
+
const internal_registryContainer = exports.internal_registryContainer = registryContainer;
|
|
96
|
+
function createRegistry() {
|
|
97
|
+
return typeof FinalizationRegistry !== 'undefined' ? new _FinalizationRegistryBasedCleanupTracking.FinalizationRegistryBasedCleanupTracking() : new _TimerBasedCleanupTracking.TimerBasedCleanupTracking();
|
|
105
98
|
}
|
|
@@ -4,29 +4,20 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.useGridSelector = exports.objectShallowCompare = exports.argsEqual = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
10
10
|
var _warning = require("@mui/x-internals/warning");
|
|
11
|
+
var _shim = require("use-sync-external-store/shim");
|
|
11
12
|
var _useLazyRef = require("./useLazyRef");
|
|
12
|
-
var _useOnMount = require("./useOnMount");
|
|
13
13
|
function isOutputSelector(selector) {
|
|
14
14
|
return selector.acceptsApiRef;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
function applySelector(apiRef, selector) {
|
|
18
|
-
if (isOutputSelector(selector)) {
|
|
19
|
-
return selector(apiRef);
|
|
20
|
-
}
|
|
21
|
-
return selector(apiRef.current.state);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// TODO v8: Rename this function to `applySelector`
|
|
25
|
-
function applySelectorV8(apiRef, selector, args, instanceId) {
|
|
16
|
+
function applySelector(apiRef, selector, args, instanceId) {
|
|
26
17
|
if (isOutputSelector(selector)) {
|
|
27
18
|
return selector(apiRef, args);
|
|
28
19
|
}
|
|
29
|
-
return selector(apiRef.current.state, instanceId);
|
|
20
|
+
return selector(apiRef.current.state, args, instanceId);
|
|
30
21
|
}
|
|
31
22
|
const defaultCompare = Object.is;
|
|
32
23
|
const objectShallowCompare = exports.objectShallowCompare = _fastObjectShallowCompare.fastObjectShallowCompare;
|
|
@@ -50,11 +41,11 @@ const createRefs = () => ({
|
|
|
50
41
|
state: null,
|
|
51
42
|
equals: null,
|
|
52
43
|
selector: null,
|
|
53
|
-
args:
|
|
44
|
+
args: undefined
|
|
54
45
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
46
|
+
const EMPTY = [];
|
|
47
|
+
const emptyGetSnapshot = () => null;
|
|
48
|
+
const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
58
49
|
if (process.env.NODE_ENV !== 'production') {
|
|
59
50
|
if (!apiRef.current.state) {
|
|
60
51
|
(0, _warning.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.']);
|
|
@@ -64,56 +55,44 @@ const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
|
64
55
|
const didInit = refs.current.selector !== null;
|
|
65
56
|
const [state, setState] = React.useState(
|
|
66
57
|
// We don't use an initialization function to avoid allocations
|
|
67
|
-
didInit ? null : applySelector(apiRef, selector));
|
|
68
|
-
refs.current.state = state;
|
|
69
|
-
refs.current.equals = equals;
|
|
70
|
-
refs.current.selector = selector;
|
|
71
|
-
(0, _useOnMount.useOnMount)(() => {
|
|
72
|
-
return apiRef.current.store.subscribe(() => {
|
|
73
|
-
const newState = applySelector(apiRef, refs.current.selector);
|
|
74
|
-
if (!refs.current.equals(refs.current.state, newState)) {
|
|
75
|
-
refs.current.state = newState;
|
|
76
|
-
setState(newState);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
return state;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// TODO v8: Rename this function to `useGridSelector`
|
|
84
|
-
exports.useGridSelector = useGridSelector;
|
|
85
|
-
const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
86
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
87
|
-
if (!apiRef.current.state) {
|
|
88
|
-
(0, _warning.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.']);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const refs = (0, _useLazyRef.useLazyRef)(createRefs);
|
|
92
|
-
const didInit = refs.current.selector !== null;
|
|
93
|
-
const [state, setState] = React.useState(
|
|
94
|
-
// We don't use an initialization function to avoid allocations
|
|
95
|
-
didInit ? null : applySelectorV8(apiRef, selector, args, apiRef.current.instanceId));
|
|
58
|
+
didInit ? null : applySelector(apiRef, selector, args, apiRef.current.instanceId));
|
|
96
59
|
refs.current.state = state;
|
|
97
60
|
refs.current.equals = equals;
|
|
98
61
|
refs.current.selector = selector;
|
|
99
62
|
const prevArgs = refs.current.args;
|
|
100
63
|
refs.current.args = args;
|
|
101
64
|
if (didInit && !argsEqual(prevArgs, args)) {
|
|
102
|
-
const newState =
|
|
65
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
103
66
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
104
67
|
refs.current.state = newState;
|
|
105
68
|
setState(newState);
|
|
106
69
|
}
|
|
107
70
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
71
|
+
const subscribe = React.useCallback(() => {
|
|
72
|
+
if (refs.current.subscription) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
refs.current.subscription = apiRef.current.store.subscribe(() => {
|
|
76
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
111
77
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
112
78
|
refs.current.state = newState;
|
|
113
79
|
setState(newState);
|
|
114
80
|
}
|
|
115
81
|
});
|
|
116
|
-
|
|
82
|
+
return null;
|
|
83
|
+
},
|
|
84
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
|
+
EMPTY);
|
|
86
|
+
const unsubscribe = React.useCallback(() => {
|
|
87
|
+
return () => {
|
|
88
|
+
if (refs.current.subscription) {
|
|
89
|
+
refs.current.subscription();
|
|
90
|
+
refs.current.subscription = undefined;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
|
+
}, EMPTY);
|
|
95
|
+
(0, _shim.useSyncExternalStore)(unsubscribe, subscribe, emptyGetSnapshot);
|
|
117
96
|
return state;
|
|
118
97
|
};
|
|
119
|
-
exports.
|
|
98
|
+
exports.useGridSelector = useGridSelector;
|
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.useGridVisibleRows = exports.getVisibleRows = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
7
|
var _gridPaginationSelector = require("../features/pagination/gridPaginationSelector");
|
|
10
|
-
var
|
|
8
|
+
var _ = require(".");
|
|
11
9
|
const getVisibleRows = (apiRef, props) => {
|
|
12
|
-
|
|
13
|
-
let range;
|
|
14
|
-
if (props.pagination && props.paginationMode === 'client') {
|
|
15
|
-
range = (0, _gridPaginationSelector.gridPaginationRowRangeSelector)(apiRef);
|
|
16
|
-
rows = (0, _gridPaginationSelector.gridPaginatedVisibleSortedGridRowEntriesSelector)(apiRef);
|
|
17
|
-
} else {
|
|
18
|
-
rows = (0, _gridFilterSelector.gridExpandedSortedRowEntriesSelector)(apiRef);
|
|
19
|
-
if (rows.length === 0) {
|
|
20
|
-
range = null;
|
|
21
|
-
} else {
|
|
22
|
-
range = {
|
|
23
|
-
firstRowIndex: 0,
|
|
24
|
-
lastRowIndex: rows.length - 1
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
rows,
|
|
30
|
-
range
|
|
31
|
-
};
|
|
10
|
+
return (0, _gridPaginationSelector.gridVisibleRowsSelector)(apiRef);
|
|
32
11
|
};
|
|
33
12
|
|
|
34
13
|
/**
|
|
@@ -40,10 +19,6 @@ const getVisibleRows = (apiRef, props) => {
|
|
|
40
19
|
*/
|
|
41
20
|
exports.getVisibleRows = getVisibleRows;
|
|
42
21
|
const useGridVisibleRows = (apiRef, props) => {
|
|
43
|
-
|
|
44
|
-
return React.useMemo(() => ({
|
|
45
|
-
rows: response.rows,
|
|
46
|
-
range: response.range
|
|
47
|
-
}), [response.rows, response.range]);
|
|
22
|
+
return (0, _.useGridSelector)(apiRef, _gridPaginationSelector.gridVisibleRowsSelector);
|
|
48
23
|
};
|
|
49
24
|
exports.useGridVisibleRows = useGridVisibleRows;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useIsSSR = void 0;
|
|
7
|
+
var _shim = require("use-sync-external-store/shim");
|
|
8
|
+
const emptySubscribe = () => () => {};
|
|
9
|
+
const clientSnapshot = () => false;
|
|
10
|
+
const serverSnapshot = () => true;
|
|
11
|
+
const useIsSSR = () => (0, _shim.useSyncExternalStore)(emptySubscribe, clientSnapshot, serverSnapshot);
|
|
12
|
+
exports.useIsSSR = useIsSSR;
|
package/node/index.js
CHANGED
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.GRID_TREE_DATA_GROUPING_FIELD = exports.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = void 0;
|
|
6
|
+
exports.PinnedColumnPosition = exports.GRID_TREE_DATA_GROUPING_FIELD = exports.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = void 0;
|
|
7
7
|
const GRID_TREE_DATA_GROUPING_FIELD = exports.GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
|
|
8
8
|
const GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = exports.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = '__row_group_by_columns_group__';
|
|
9
|
-
const GRID_DETAIL_PANEL_TOGGLE_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
|
|
9
|
+
const GRID_DETAIL_PANEL_TOGGLE_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
|
|
10
|
+
let PinnedColumnPosition = exports.PinnedColumnPosition = /*#__PURE__*/function (PinnedColumnPosition) {
|
|
11
|
+
PinnedColumnPosition[PinnedColumnPosition["NONE"] = 0] = "NONE";
|
|
12
|
+
PinnedColumnPosition[PinnedColumnPosition["LEFT"] = 1] = "LEFT";
|
|
13
|
+
PinnedColumnPosition[PinnedColumnPosition["RIGHT"] = 2] = "RIGHT";
|
|
14
|
+
PinnedColumnPosition[PinnedColumnPosition["VIRTUAL"] = 3] = "VIRTUAL";
|
|
15
|
+
return PinnedColumnPosition;
|
|
16
|
+
}({});
|
package/node/internals/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var _exportNames = {
|
|
|
14
14
|
getValueOptions: true,
|
|
15
15
|
isSingleSelectColDef: true,
|
|
16
16
|
useGridRegisterPipeProcessor: true,
|
|
17
|
+
GridStrategyGroup: true,
|
|
17
18
|
useGridRegisterStrategyProcessor: true,
|
|
18
19
|
GRID_DEFAULT_STRATEGY: true,
|
|
19
20
|
useGridInitialization: true,
|
|
@@ -34,6 +35,7 @@ var _exportNames = {
|
|
|
34
35
|
useGridPrintExport: true,
|
|
35
36
|
useGridFilter: true,
|
|
36
37
|
filterStateInitializer: true,
|
|
38
|
+
defaultGridFilterLookup: true,
|
|
37
39
|
passFilterLogic: true,
|
|
38
40
|
gridFilteredChildrenCountLookupSelector: true,
|
|
39
41
|
gridExpandedSortedRowTreeLevelPositionLookupSelector: true,
|
|
@@ -58,7 +60,6 @@ var _exportNames = {
|
|
|
58
60
|
buildRootGroup: true,
|
|
59
61
|
getRowIdFromRowModel: true,
|
|
60
62
|
GRID_ID_AUTOGENERATED: true,
|
|
61
|
-
calculatePinnedRowsHeight: true,
|
|
62
63
|
useGridRowsMeta: true,
|
|
63
64
|
rowsMetaStateInitializer: true,
|
|
64
65
|
useGridParamsApi: true,
|
|
@@ -72,6 +73,7 @@ var _exportNames = {
|
|
|
72
73
|
useGridRowSelectionPreProcessors: true,
|
|
73
74
|
useGridSorting: true,
|
|
74
75
|
sortingStateInitializer: true,
|
|
76
|
+
gridSortedRowIndexLookupSelector: true,
|
|
75
77
|
useGridScroll: true,
|
|
76
78
|
useGridEvents: true,
|
|
77
79
|
dimensionsStateInitializer: true,
|
|
@@ -91,10 +93,7 @@ var _exportNames = {
|
|
|
91
93
|
getColumnsToExport: true,
|
|
92
94
|
defaultGetRowsToExport: true,
|
|
93
95
|
createSelector: true,
|
|
94
|
-
createSelectorV8: true,
|
|
95
96
|
createSelectorMemoized: true,
|
|
96
|
-
createSelectorMemoizedV8: true,
|
|
97
|
-
useGridSelectorV8: true,
|
|
98
97
|
findParentElementFromClassName: true,
|
|
99
98
|
getActiveElement: true,
|
|
100
99
|
isEventTargetInPortal: true,
|
|
@@ -141,6 +140,12 @@ Object.defineProperty(exports, "GridHeaders", {
|
|
|
141
140
|
return _GridHeaders.GridHeaders;
|
|
142
141
|
}
|
|
143
142
|
});
|
|
143
|
+
Object.defineProperty(exports, "GridStrategyGroup", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () {
|
|
146
|
+
return _strategyProcessing.GridStrategyGroup;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
144
149
|
Object.defineProperty(exports, "GridVirtualScroller", {
|
|
145
150
|
enumerable: true,
|
|
146
151
|
get: function () {
|
|
@@ -171,12 +176,6 @@ Object.defineProperty(exports, "buildRootGroup", {
|
|
|
171
176
|
return _gridRowsUtils.buildRootGroup;
|
|
172
177
|
}
|
|
173
178
|
});
|
|
174
|
-
Object.defineProperty(exports, "calculatePinnedRowsHeight", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
-
return _gridRowsUtils.calculatePinnedRowsHeight;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
179
|
Object.defineProperty(exports, "columnGroupsStateInitializer", {
|
|
181
180
|
enumerable: true,
|
|
182
181
|
get: function () {
|
|
@@ -213,22 +212,16 @@ Object.defineProperty(exports, "createSelectorMemoized", {
|
|
|
213
212
|
return _createSelector.createSelectorMemoized;
|
|
214
213
|
}
|
|
215
214
|
});
|
|
216
|
-
Object.defineProperty(exports, "
|
|
217
|
-
enumerable: true,
|
|
218
|
-
get: function () {
|
|
219
|
-
return _createSelector.createSelectorMemoizedV8;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
Object.defineProperty(exports, "createSelectorV8", {
|
|
215
|
+
Object.defineProperty(exports, "defaultGetRowsToExport", {
|
|
223
216
|
enumerable: true,
|
|
224
217
|
get: function () {
|
|
225
|
-
return
|
|
218
|
+
return _utils2.defaultGetRowsToExport;
|
|
226
219
|
}
|
|
227
220
|
});
|
|
228
|
-
Object.defineProperty(exports, "
|
|
221
|
+
Object.defineProperty(exports, "defaultGridFilterLookup", {
|
|
229
222
|
enumerable: true,
|
|
230
223
|
get: function () {
|
|
231
|
-
return
|
|
224
|
+
return _gridFilterState.defaultGridFilterLookup;
|
|
232
225
|
}
|
|
233
226
|
});
|
|
234
227
|
Object.defineProperty(exports, "densityStateInitializer", {
|
|
@@ -363,6 +356,12 @@ Object.defineProperty(exports, "gridRowGroupsToFetchSelector", {
|
|
|
363
356
|
return _gridRowsSelector.gridRowGroupsToFetchSelector;
|
|
364
357
|
}
|
|
365
358
|
});
|
|
359
|
+
Object.defineProperty(exports, "gridSortedRowIndexLookupSelector", {
|
|
360
|
+
enumerable: true,
|
|
361
|
+
get: function () {
|
|
362
|
+
return _gridSortingSelector.gridSortedRowIndexLookupSelector;
|
|
363
|
+
}
|
|
364
|
+
});
|
|
366
365
|
Object.defineProperty(exports, "headerFilteringStateInitializer", {
|
|
367
366
|
enumerable: true,
|
|
368
367
|
get: function () {
|
|
@@ -669,12 +668,6 @@ Object.defineProperty(exports, "useGridScroll", {
|
|
|
669
668
|
return _useGridScroll.useGridScroll;
|
|
670
669
|
}
|
|
671
670
|
});
|
|
672
|
-
Object.defineProperty(exports, "useGridSelectorV8", {
|
|
673
|
-
enumerable: true,
|
|
674
|
-
get: function () {
|
|
675
|
-
return _useGridSelector.useGridSelectorV8;
|
|
676
|
-
}
|
|
677
|
-
});
|
|
678
671
|
Object.defineProperty(exports, "useGridSorting", {
|
|
679
672
|
enumerable: true,
|
|
680
673
|
get: function () {
|
|
@@ -711,6 +704,18 @@ var _GridVirtualScrollerRenderZone = require("../components/virtualization/GridV
|
|
|
711
704
|
var _GridHeaders = require("../components/GridHeaders");
|
|
712
705
|
var _GridBaseColumnHeaders = require("../components/columnHeaders/GridBaseColumnHeaders");
|
|
713
706
|
var _defaultGridSlotsComponents = require("../constants/defaultGridSlotsComponents");
|
|
707
|
+
var _signature = require("../constants/signature");
|
|
708
|
+
Object.keys(_signature).forEach(function (key) {
|
|
709
|
+
if (key === "default" || key === "__esModule") return;
|
|
710
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
711
|
+
if (key in exports && exports[key] === _signature[key]) return;
|
|
712
|
+
Object.defineProperty(exports, key, {
|
|
713
|
+
enumerable: true,
|
|
714
|
+
get: function () {
|
|
715
|
+
return _signature[key];
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
});
|
|
714
719
|
var _GridFilterPanel = require("../components/panel/filterPanel/GridFilterPanel");
|
|
715
720
|
var _filterPanelUtils = require("../components/panel/filterPanel/filterPanelUtils");
|
|
716
721
|
var _pipeProcessing = require("../hooks/core/pipeProcessing");
|
|
@@ -763,6 +768,7 @@ var _useGridDensity = require("../hooks/features/density/useGridDensity");
|
|
|
763
768
|
var _useGridCsvExport = require("../hooks/features/export/useGridCsvExport");
|
|
764
769
|
var _useGridPrintExport = require("../hooks/features/export/useGridPrintExport");
|
|
765
770
|
var _useGridFilter = require("../hooks/features/filter/useGridFilter");
|
|
771
|
+
var _gridFilterState = require("../hooks/features/filter/gridFilterState");
|
|
766
772
|
var _gridFilterUtils = require("../hooks/features/filter/gridFilterUtils");
|
|
767
773
|
var _gridFilterSelector = require("../hooks/features/filter/gridFilterSelector");
|
|
768
774
|
var _useGridFocus = require("../hooks/features/focus/useGridFocus");
|
|
@@ -784,9 +790,22 @@ var _useGridHeaderFiltering = require("../hooks/features/headerFiltering/useGrid
|
|
|
784
790
|
var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
|
|
785
791
|
var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
|
|
786
792
|
var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
|
|
793
|
+
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
787
794
|
var _useGridScroll = require("../hooks/features/scroll/useGridScroll");
|
|
788
795
|
var _useGridEvents = require("../hooks/features/events/useGridEvents");
|
|
789
796
|
var _useGridDimensions = require("../hooks/features/dimensions/useGridDimensions");
|
|
797
|
+
var _gridDimensionsSelectors = require("../hooks/features/dimensions/gridDimensionsSelectors");
|
|
798
|
+
Object.keys(_gridDimensionsSelectors).forEach(function (key) {
|
|
799
|
+
if (key === "default" || key === "__esModule") return;
|
|
800
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
801
|
+
if (key in exports && exports[key] === _gridDimensionsSelectors[key]) return;
|
|
802
|
+
Object.defineProperty(exports, key, {
|
|
803
|
+
enumerable: true,
|
|
804
|
+
get: function () {
|
|
805
|
+
return _gridDimensionsSelectors[key];
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
});
|
|
790
809
|
var _useGridStatePersistence = require("../hooks/features/statePersistence/useGridStatePersistence");
|
|
791
810
|
var _useGridVirtualScroller = require("../hooks/features/virtualization/useGridVirtualScroller");
|
|
792
811
|
var _virtualization = require("../hooks/features/virtualization");
|
|
@@ -820,8 +839,19 @@ Object.keys(_createControllablePromise).forEach(function (key) {
|
|
|
820
839
|
}
|
|
821
840
|
});
|
|
822
841
|
});
|
|
842
|
+
var _rtlFlipSide = require("../utils/rtlFlipSide");
|
|
843
|
+
Object.keys(_rtlFlipSide).forEach(function (key) {
|
|
844
|
+
if (key === "default" || key === "__esModule") return;
|
|
845
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
846
|
+
if (key in exports && exports[key] === _rtlFlipSide[key]) return;
|
|
847
|
+
Object.defineProperty(exports, key, {
|
|
848
|
+
enumerable: true,
|
|
849
|
+
get: function () {
|
|
850
|
+
return _rtlFlipSide[key];
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
});
|
|
823
854
|
var _createSelector = require("../utils/createSelector");
|
|
824
|
-
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
825
855
|
var _domUtils = require("../utils/domUtils");
|
|
826
856
|
var _keyboardUtils = require("../utils/keyboardUtils");
|
|
827
857
|
var _utils3 = require("../utils/utils");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.attachPinnedStyle = attachPinnedStyle;
|
|
7
|
+
var _rtlFlipSide = require("../../utils/rtlFlipSide");
|
|
8
|
+
function attachPinnedStyle(style, isRtl, pinnedPosition, pinnedOffset) {
|
|
9
|
+
const side = (0, _rtlFlipSide.rtlFlipSide)(pinnedPosition, isRtl);
|
|
10
|
+
if (!side || pinnedOffset === undefined) {
|
|
11
|
+
return style;
|
|
12
|
+
}
|
|
13
|
+
style[side] = pinnedOffset;
|
|
14
|
+
return style;
|
|
15
|
+
}
|