@mui/x-data-grid 8.0.0-beta.1 → 8.0.0-beta.3
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 +235 -0
- package/DataGrid/DataGrid.js +10 -2
- package/DataGrid/useDataGridProps.js +1 -1
- package/components/GridRow.js +3 -8
- package/components/GridScrollArea.js +4 -4
- package/components/GridShadowScrollArea.js +43 -35
- package/components/GridSkeletonLoadingOverlay.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +24 -13
- package/components/cell/GridActionsCellItem.js +5 -2
- package/components/cell/GridBooleanCell.d.ts +1 -2
- package/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/components/containers/GridToolbarContainer.js +5 -3
- package/components/export/ExportCsv.js +4 -129
- package/components/export/ExportPrint.js +4 -129
- package/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/quickFilter/QuickFilter.d.ts +26 -3
- package/components/quickFilter/QuickFilter.js +103 -19
- package/components/quickFilter/QuickFilterClear.js +13 -104
- package/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/components/quickFilter/QuickFilterControl.js +36 -12
- package/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/components/quickFilter/QuickFilterTrigger.js +86 -0
- package/components/quickFilter/index.d.ts +2 -1
- package/components/quickFilter/index.js +11 -0
- package/components/toolbar/GridToolbar.js +4 -1
- package/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/components/toolbar/GridToolbarQuickFilter.js +100 -41
- package/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/components/toolbarV8/GridToolbar.js +85 -27
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/toolbarV8/Toolbar.js +78 -23
- package/components/toolbarV8/ToolbarButton.js +37 -114
- package/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/constants/cssVariables.d.ts +3 -0
- package/constants/cssVariables.js +2 -1
- package/constants/gridClasses.d.ts +20 -0
- package/constants/gridClasses.js +1 -1
- package/esm/DataGrid/DataGrid.js +10 -2
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/components/GridRow.js +4 -9
- package/esm/components/GridScrollArea.js +4 -4
- package/esm/components/GridShadowScrollArea.js +43 -35
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
- package/esm/components/cell/GridActionsCellItem.d.ts +24 -13
- package/esm/components/cell/GridActionsCellItem.js +4 -3
- package/esm/components/cell/GridBooleanCell.d.ts +1 -2
- package/esm/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/esm/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/esm/components/containers/GridToolbarContainer.js +5 -3
- package/esm/components/export/ExportCsv.js +4 -129
- package/esm/components/export/ExportPrint.js +4 -129
- package/esm/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/esm/components/panel/GridPanel.d.ts +2 -2
- package/esm/components/panel/GridPanel.js +1 -1
- package/esm/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilter.d.ts +26 -3
- package/esm/components/quickFilter/QuickFilter.js +101 -17
- package/esm/components/quickFilter/QuickFilterClear.js +13 -104
- package/esm/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/esm/components/quickFilter/QuickFilterControl.js +36 -12
- package/esm/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterTrigger.js +79 -0
- package/esm/components/quickFilter/index.d.ts +2 -1
- package/esm/components/quickFilter/index.js +2 -1
- package/esm/components/toolbar/GridToolbar.js +4 -1
- package/esm/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/esm/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/esm/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/esm/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/esm/components/toolbar/GridToolbarQuickFilter.js +101 -44
- package/esm/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/esm/components/toolbarV8/GridToolbar.js +83 -27
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/toolbarV8/Toolbar.js +77 -22
- package/esm/components/toolbarV8/ToolbarButton.js +37 -114
- package/esm/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +2 -2
- package/esm/constants/cssVariables.d.ts +3 -0
- package/esm/constants/cssVariables.js +2 -1
- package/esm/constants/gridClasses.d.ts +20 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/core/gridCoreSelector.d.ts +1 -1
- package/esm/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/esm/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/esm/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/esm/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +2 -3
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/esm/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/esm/hooks/features/density/densitySelector.d.ts +2 -2
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/esm/hooks/features/dimensions/useGridDimensions.js +5 -5
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/esm/hooks/features/editing/useGridCellEditing.js +8 -8
- package/esm/hooks/features/editing/useGridRowEditing.js +9 -9
- package/esm/hooks/features/events/useGridEvents.js +18 -18
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/esm/hooks/features/filter/useGridFilter.js +7 -7
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/esm/hooks/features/focus/useGridFocus.js +10 -10
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/esm/hooks/features/listView/useGridListView.d.ts +4 -4
- package/esm/hooks/features/listView/useGridListView.js +9 -9
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/esm/hooks/features/pagination/useGridPaginationModel.js +7 -7
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -2
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/esm/hooks/features/rowSelection/utils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/esm/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/esm/hooks/features/rows/gridRowsSelector.js +7 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -2
- package/esm/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/esm/hooks/features/rows/useGridRows.js +5 -5
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -2
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/esm/hooks/features/sorting/useGridSorting.js +6 -6
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +19 -8
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useGridAriaAttributes.js +6 -0
- package/esm/hooks/utils/{useGridApiEventHandler.d.ts → useGridEvent.d.ts} +2 -2
- package/{modern/hooks/utils/useGridApiEventHandler.js → esm/hooks/utils/useGridEvent.js} +3 -3
- package/esm/hooks/utils/useGridNativeEventListener.js +2 -2
- package/esm/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/esm/index.js +1 -1
- package/esm/locales/deDE.js +13 -13
- package/esm/material/augmentation.d.ts +74 -0
- package/esm/material/augmentation.js +1 -0
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +262 -141
- package/esm/material/variables.js +2 -0
- package/esm/models/colDef/gridColDef.d.ts +1 -1
- package/esm/models/colDef/index.d.ts +1 -1
- package/esm/models/gridBaseSlots.d.ts +25 -36
- package/esm/models/gridSlotsComponentsProps.d.ts +1 -19
- package/esm/models/props/DataGridProps.d.ts +20 -10
- package/esm/utils/utils.d.ts +0 -27
- package/esm/utils/utils.js +0 -122
- package/hooks/core/gridCoreSelector.d.ts +1 -1
- package/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +2 -2
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/hooks/features/columns/useGridColumns.js +2 -3
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/hooks/features/dataSource/useGridDataSource.js +2 -2
- package/hooks/features/density/densitySelector.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/hooks/features/dimensions/useGridDimensions.js +6 -6
- package/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/hooks/features/editing/useGridCellEditing.js +8 -8
- package/hooks/features/editing/useGridRowEditing.js +9 -9
- package/hooks/features/events/useGridEvents.js +18 -18
- package/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/hooks/features/filter/useGridFilter.js +9 -9
- package/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/hooks/features/focus/useGridFocus.js +10 -10
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/hooks/features/listView/useGridListView.d.ts +4 -4
- package/hooks/features/listView/useGridListView.js +9 -9
- package/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/hooks/features/pagination/useGridPaginationModel.js +7 -7
- package/hooks/features/pagination/useGridRowCount.js +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/hooks/features/rowSelection/utils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/hooks/features/rows/gridRowsSelector.js +8 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/hooks/features/rows/useGridRows.js +4 -4
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +17 -6
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -8
- package/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{modern/hooks/utils/useGridApiEventHandler.d.ts → hooks/utils/useGridEvent.d.ts} +2 -2
- package/hooks/utils/{useGridApiEventHandler.js → useGridEvent.js} +5 -5
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/index.js +1 -1
- package/locales/deDE.js +13 -13
- package/material/augmentation.d.ts +74 -0
- package/material/augmentation.js +5 -0
- package/material/index.d.ts +1 -0
- package/material/index.js +261 -141
- package/material/variables.js +2 -0
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/colDef/index.d.ts +1 -1
- package/models/gridBaseSlots.d.ts +25 -36
- package/models/gridSlotsComponentsProps.d.ts +1 -19
- package/models/props/DataGridProps.d.ts +20 -10
- package/modern/DataGrid/DataGrid.js +10 -2
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/components/GridRow.js +4 -9
- package/modern/components/GridScrollArea.js +4 -4
- package/modern/components/GridShadowScrollArea.js +43 -35
- package/modern/components/GridSkeletonLoadingOverlay.js +2 -2
- package/modern/components/cell/GridActionsCellItem.d.ts +24 -13
- package/modern/components/cell/GridActionsCellItem.js +4 -3
- package/modern/components/cell/GridBooleanCell.d.ts +1 -2
- package/modern/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +1 -1
- package/modern/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/modern/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/modern/components/containers/GridToolbarContainer.js +5 -3
- package/modern/components/export/ExportCsv.js +4 -129
- package/modern/components/export/ExportPrint.js +4 -129
- package/modern/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/modern/components/panel/GridPanel.d.ts +2 -2
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/modern/components/quickFilter/QuickFilter.d.ts +26 -3
- package/modern/components/quickFilter/QuickFilter.js +101 -17
- package/modern/components/quickFilter/QuickFilterClear.js +13 -104
- package/modern/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/modern/components/quickFilter/QuickFilterControl.js +36 -12
- package/modern/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterTrigger.js +79 -0
- package/modern/components/quickFilter/index.d.ts +2 -1
- package/modern/components/quickFilter/index.js +2 -1
- package/modern/components/toolbar/GridToolbar.js +4 -1
- package/modern/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/modern/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/modern/components/toolbar/GridToolbarQuickFilter.js +101 -44
- package/modern/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/modern/components/toolbarV8/GridToolbar.js +83 -27
- package/modern/components/toolbarV8/Toolbar.d.ts +1 -1
- package/modern/components/toolbarV8/Toolbar.js +77 -22
- package/modern/components/toolbarV8/ToolbarButton.js +37 -114
- package/modern/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/constants/cssVariables.d.ts +3 -0
- package/modern/constants/cssVariables.js +2 -1
- package/modern/constants/gridClasses.d.ts +20 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/gridCoreSelector.d.ts +1 -1
- package/modern/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/modern/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/modern/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/modern/hooks/features/columns/useGridColumns.js +2 -3
- package/modern/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/modern/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/modern/hooks/features/density/densitySelector.d.ts +2 -2
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/modern/hooks/features/dimensions/useGridDimensions.js +5 -5
- package/modern/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -8
- package/modern/hooks/features/editing/useGridRowEditing.js +9 -9
- package/modern/hooks/features/events/useGridEvents.js +18 -18
- package/modern/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/modern/hooks/features/filter/useGridFilter.js +7 -7
- package/modern/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/modern/hooks/features/focus/useGridFocus.js +10 -10
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/modern/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/modern/hooks/features/listView/useGridListView.d.ts +4 -4
- package/modern/hooks/features/listView/useGridListView.js +9 -9
- package/modern/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/modern/hooks/features/pagination/useGridPaginationModel.js +7 -7
- package/modern/hooks/features/pagination/useGridRowCount.js +2 -2
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/modern/hooks/features/rowSelection/utils.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/modern/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/modern/hooks/features/rows/gridRowsSelector.js +7 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -2
- package/modern/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/modern/hooks/features/rows/useGridRows.js +5 -5
- package/modern/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/modern/hooks/features/scroll/useGridScroll.js +2 -2
- package/modern/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/modern/hooks/features/sorting/useGridSorting.js +6 -6
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +19 -8
- package/modern/hooks/utils/index.d.ts +1 -1
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{hooks/utils/useGridApiEventHandler.d.ts → modern/hooks/utils/useGridEvent.d.ts} +2 -2
- package/{esm/hooks/utils/useGridApiEventHandler.js → modern/hooks/utils/useGridEvent.js} +3 -3
- package/modern/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/modern/index.js +1 -1
- package/modern/locales/deDE.js +13 -13
- package/modern/material/augmentation.d.ts +74 -0
- package/modern/material/augmentation.js +1 -0
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +262 -141
- package/modern/material/variables.js +2 -0
- package/modern/models/colDef/gridColDef.d.ts +1 -1
- package/modern/models/colDef/index.d.ts +1 -1
- package/modern/models/gridBaseSlots.d.ts +25 -36
- package/modern/models/gridSlotsComponentsProps.d.ts +1 -19
- package/modern/models/props/DataGridProps.d.ts +20 -10
- package/modern/utils/utils.d.ts +0 -27
- package/modern/utils/utils.js +0 -122
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/utils.d.ts +0 -27
- package/utils/utils.js +0 -123
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
type Ref<T = HTMLElement> = React.RefCallback<T | null> | React.RefObject<T | null> | null;
|
|
2
|
+
type CommonProps<T = HTMLElement> = React.DOMAttributes<T> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
[k: `aria-${string}`]: any;
|
|
6
|
+
[k: `data-${string}`]: any;
|
|
7
|
+
};
|
|
2
8
|
export interface AutocompleteFilterOptionsState<Value> {
|
|
3
9
|
inputValue: string;
|
|
4
10
|
getOptionLabel: (option: Value) => string;
|
|
@@ -54,7 +60,7 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
|
|
|
54
60
|
textField: TextFieldProps;
|
|
55
61
|
};
|
|
56
62
|
};
|
|
57
|
-
export type BadgeProps = {
|
|
63
|
+
export type BadgeProps = CommonProps & {
|
|
58
64
|
badgeContent?: React.ReactNode;
|
|
59
65
|
children: React.ReactNode;
|
|
60
66
|
color?: 'primary' | 'default' | 'error';
|
|
@@ -63,23 +69,19 @@ export type BadgeProps = {
|
|
|
63
69
|
variant?: 'dot';
|
|
64
70
|
style?: React.CSSProperties;
|
|
65
71
|
};
|
|
66
|
-
export type ButtonProps = {
|
|
67
|
-
ref?: Ref
|
|
72
|
+
export type ButtonProps = CommonProps & {
|
|
73
|
+
ref?: Ref<HTMLButtonElement>;
|
|
68
74
|
children?: React.ReactNode;
|
|
69
|
-
className?: string;
|
|
70
75
|
disabled?: boolean;
|
|
71
76
|
id?: string;
|
|
72
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
73
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
74
77
|
role?: string;
|
|
75
78
|
size?: 'small' | 'medium' | 'large';
|
|
76
79
|
startIcon?: React.ReactNode;
|
|
77
|
-
style?: React.CSSProperties;
|
|
78
80
|
tabIndex?: number;
|
|
79
81
|
title?: string;
|
|
80
82
|
touchRippleRef?: any;
|
|
81
83
|
};
|
|
82
|
-
export type CheckboxProps = {
|
|
84
|
+
export type CheckboxProps = CommonProps & {
|
|
83
85
|
ref?: Ref<HTMLButtonElement>;
|
|
84
86
|
id?: string;
|
|
85
87
|
autoFocus?: boolean;
|
|
@@ -91,9 +93,7 @@ export type CheckboxProps = {
|
|
|
91
93
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
92
94
|
name?: string;
|
|
93
95
|
label?: React.ReactNode;
|
|
94
|
-
onClick?: React.MouseEventHandler;
|
|
95
96
|
onChange?: React.ChangeEventHandler;
|
|
96
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
97
97
|
size?: 'small' | 'medium';
|
|
98
98
|
density?: 'standard' | 'compact';
|
|
99
99
|
slotProps?: {
|
|
@@ -109,24 +109,22 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
|
|
|
109
109
|
edge?: 'start' | 'end' | false;
|
|
110
110
|
};
|
|
111
111
|
export type DividerProps = {
|
|
112
|
+
className?: string;
|
|
112
113
|
orientation?: 'horizontal' | 'vertical';
|
|
113
114
|
};
|
|
114
|
-
export type MenuListProps = {
|
|
115
|
+
export type MenuListProps = CommonProps & {
|
|
115
116
|
ref?: Ref<HTMLUListElement>;
|
|
116
117
|
id?: string;
|
|
117
|
-
className?: string;
|
|
118
118
|
children?: React.ReactNode;
|
|
119
119
|
autoFocus?: boolean;
|
|
120
120
|
autoFocusItem?: boolean;
|
|
121
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
122
121
|
};
|
|
123
|
-
export type MenuItemProps = {
|
|
122
|
+
export type MenuItemProps = CommonProps & {
|
|
124
123
|
autoFocus?: boolean;
|
|
125
124
|
children?: React.ReactNode;
|
|
126
125
|
/** For items that aren't interactive themselves (but may contain an interactive widget) */
|
|
127
126
|
inert?: boolean;
|
|
128
127
|
disabled?: boolean;
|
|
129
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
130
128
|
iconStart?: React.ReactNode;
|
|
131
129
|
iconEnd?: React.ReactNode;
|
|
132
130
|
selected?: boolean;
|
|
@@ -139,7 +137,7 @@ type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';
|
|
|
139
137
|
type Placement = AutoPlacement | BasePlacement | VariationPlacement;
|
|
140
138
|
type ClickAwayMouseEventHandler = 'onClick' | 'onMouseDown' | 'onMouseUp' | 'onPointerDown' | 'onPointerUp';
|
|
141
139
|
type ClickAwayTouchEventHandler = 'onTouchStart' | 'onTouchEnd';
|
|
142
|
-
export type PaginationProps = {
|
|
140
|
+
export type PaginationProps = CommonProps & {
|
|
143
141
|
count: number;
|
|
144
142
|
page: number;
|
|
145
143
|
rowsPerPage: number;
|
|
@@ -151,10 +149,10 @@ export type PaginationProps = {
|
|
|
151
149
|
onRowsPerPageChange?: (rowsPerPage: number) => void;
|
|
152
150
|
disabled?: boolean;
|
|
153
151
|
};
|
|
154
|
-
export type PopperProps = {
|
|
152
|
+
export type PopperProps = CommonProps & {
|
|
153
|
+
ref?: Ref<HTMLDivElement>;
|
|
155
154
|
open: boolean;
|
|
156
155
|
children?: React.ReactNode;
|
|
157
|
-
className?: string;
|
|
158
156
|
clickAwayTouchEvent?: false | ClickAwayTouchEventHandler;
|
|
159
157
|
clickAwayMouseEvent?: false | ClickAwayMouseEventHandler;
|
|
160
158
|
flip?: boolean;
|
|
@@ -164,13 +162,12 @@ export type PopperProps = {
|
|
|
164
162
|
onDidShow?: () => void;
|
|
165
163
|
onDidHide?: () => void;
|
|
166
164
|
id?: string;
|
|
167
|
-
ref?: Ref;
|
|
168
165
|
target?: Element | null;
|
|
169
166
|
transition?: boolean;
|
|
170
167
|
/** @default 'bottom' */
|
|
171
168
|
placement?: Placement;
|
|
172
169
|
};
|
|
173
|
-
export type CircularProgressProps = {
|
|
170
|
+
export type CircularProgressProps = CommonProps & {
|
|
174
171
|
/**
|
|
175
172
|
* Pixels or CSS value.
|
|
176
173
|
* @default 40
|
|
@@ -179,11 +176,10 @@ export type CircularProgressProps = {
|
|
|
179
176
|
/** @default 'primary' */
|
|
180
177
|
color?: 'inherit' | 'primary';
|
|
181
178
|
};
|
|
182
|
-
export type LinearProgressProps = {};
|
|
183
|
-
export type InputProps = {
|
|
179
|
+
export type LinearProgressProps = CommonProps & {};
|
|
180
|
+
export type InputProps = CommonProps & {
|
|
184
181
|
ref?: React.Ref<HTMLElement>;
|
|
185
182
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
186
|
-
className?: string;
|
|
187
183
|
fullWidth?: boolean;
|
|
188
184
|
type?: React.HTMLInputTypeAttribute;
|
|
189
185
|
value?: string;
|
|
@@ -195,7 +191,7 @@ export type InputProps = {
|
|
|
195
191
|
htmlInput?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
196
192
|
};
|
|
197
193
|
};
|
|
198
|
-
export type SelectProps = {
|
|
194
|
+
export type SelectProps = CommonProps & {
|
|
199
195
|
ref?: Ref;
|
|
200
196
|
id?: string;
|
|
201
197
|
value?: any;
|
|
@@ -203,9 +199,6 @@ export type SelectProps = {
|
|
|
203
199
|
error?: boolean;
|
|
204
200
|
disabled?: boolean;
|
|
205
201
|
onChange?: React.ChangeEventHandler;
|
|
206
|
-
onFocus?: React.FocusEventHandler;
|
|
207
|
-
onBlur?: React.FocusEventHandler;
|
|
208
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
209
202
|
onOpen?: (event: React.SyntheticEvent) => void;
|
|
210
203
|
onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
|
|
211
204
|
label?: React.ReactNode;
|
|
@@ -218,28 +211,26 @@ export type SelectProps = {
|
|
|
218
211
|
ref?: Ref;
|
|
219
212
|
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
220
213
|
};
|
|
221
|
-
style?: React.CSSProperties;
|
|
222
214
|
children?: React.ReactNode;
|
|
223
215
|
};
|
|
224
|
-
export type SelectOptionProps = {
|
|
216
|
+
export type SelectOptionProps = CommonProps & {
|
|
225
217
|
native: boolean;
|
|
226
218
|
value: any;
|
|
227
219
|
children?: React.ReactNode;
|
|
228
220
|
};
|
|
229
|
-
export type SkeletonProps = {
|
|
221
|
+
export type SkeletonProps = CommonProps & {
|
|
230
222
|
variant?: 'circular' | 'text';
|
|
231
223
|
width?: number | string;
|
|
232
224
|
height?: number | string;
|
|
233
225
|
};
|
|
234
|
-
export type SwitchProps = {
|
|
226
|
+
export type SwitchProps = CommonProps & {
|
|
235
227
|
checked?: boolean;
|
|
236
228
|
onChange?: React.ChangeEventHandler;
|
|
237
229
|
size?: 'small' | 'medium';
|
|
238
230
|
};
|
|
239
|
-
export type TextFieldProps = {
|
|
231
|
+
export type TextFieldProps = CommonProps & {
|
|
240
232
|
role?: string;
|
|
241
233
|
autoComplete?: string;
|
|
242
|
-
className?: string;
|
|
243
234
|
color?: 'primary' | 'error';
|
|
244
235
|
disabled?: boolean;
|
|
245
236
|
error?: boolean;
|
|
@@ -249,7 +240,6 @@ export type TextFieldProps = {
|
|
|
249
240
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
250
241
|
label?: React.ReactNode;
|
|
251
242
|
onChange?: React.ChangeEventHandler;
|
|
252
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
253
243
|
placeholder?: string;
|
|
254
244
|
size?: 'small' | 'medium';
|
|
255
245
|
slotProps?: {
|
|
@@ -257,13 +247,12 @@ export type TextFieldProps = {
|
|
|
257
247
|
inputLabel?: {};
|
|
258
248
|
htmlInput?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
259
249
|
};
|
|
260
|
-
style?: React.CSSProperties;
|
|
261
250
|
tabIndex?: number;
|
|
262
251
|
type?: React.HTMLInputTypeAttribute;
|
|
263
252
|
value?: string;
|
|
264
253
|
ref?: Ref<HTMLInputElement>;
|
|
265
254
|
};
|
|
266
|
-
export type TooltipProps = {
|
|
255
|
+
export type TooltipProps = CommonProps & {
|
|
267
256
|
children: React.ReactElement<any, any>;
|
|
268
257
|
enterDelay?: number;
|
|
269
258
|
title: React.ReactNode;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { BadgeProps as MUIBadgeProps } from '@mui/material/Badge';
|
|
3
|
-
import type { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
4
|
-
import type { CircularProgressProps as MUICircularProgressProps } from '@mui/material/CircularProgress';
|
|
5
|
-
import type { LinearProgressProps as MUILinearProgressProps } from '@mui/material/LinearProgress';
|
|
6
|
-
import type { MenuItemProps as MUIMenuItemProps } from '@mui/material/MenuItem';
|
|
7
|
-
import type { IconButtonProps as MUIIconButtonProps } from '@mui/material/IconButton';
|
|
8
|
-
import type { TooltipProps as MUITooltipProps } from '@mui/material/Tooltip';
|
|
9
2
|
import type { GridToolbarProps } from '../components/toolbar/GridToolbar';
|
|
10
3
|
import type { ColumnHeaderFilterIconButtonProps } from '../components/columnHeaders/GridColumnHeaderFilterIconButton';
|
|
11
4
|
import type { GridColumnMenuProps } from '../components/menu/columnMenu/GridColumnMenuProps';
|
|
@@ -91,15 +84,6 @@ interface BaseSlotProps {
|
|
|
91
84
|
baseSelectOption: SelectOptionProps & BaseSelectOptionPropsOverrides;
|
|
92
85
|
baseSkeleton: SkeletonProps & BaseSkeletonPropsOverrides;
|
|
93
86
|
}
|
|
94
|
-
interface MaterialSlotProps {
|
|
95
|
-
baseBadge: MUIBadgeProps;
|
|
96
|
-
baseButton: MUIButtonProps;
|
|
97
|
-
baseIconButton: MUIIconButtonProps;
|
|
98
|
-
baseLinearProgress: MUILinearProgressProps;
|
|
99
|
-
baseCircularProgress: MUICircularProgressProps;
|
|
100
|
-
baseMenuItem: MUIMenuItemProps;
|
|
101
|
-
baseTooltip: MUITooltipProps;
|
|
102
|
-
}
|
|
103
87
|
interface ElementSlotProps {
|
|
104
88
|
bottomContainer: GridBottomContainerProps & BottomContainerPropsOverrides;
|
|
105
89
|
cell: GridCellProps & CellPropsOverrides;
|
|
@@ -132,9 +116,7 @@ interface ElementSlotProps {
|
|
|
132
116
|
*/
|
|
133
117
|
root: RootProps;
|
|
134
118
|
}
|
|
135
|
-
type
|
|
136
|
-
type Merge<A, B> = { [K in keyof A | keyof B]: K extends 'ref' ? Select<A, B, 'ref'> : K extends keyof A & keyof B ? A[K] & B[K] : K extends keyof B ? B[K] : K extends keyof A ? A[K] : never };
|
|
137
|
-
export type GridSlotProps = Merge<BaseSlotProps, MaterialSlotProps> & ElementSlotProps;
|
|
119
|
+
export type GridSlotProps = BaseSlotProps & ElementSlotProps;
|
|
138
120
|
/**
|
|
139
121
|
* Overridable components props dynamically passed to the component at rendering.
|
|
140
122
|
*/
|
|
@@ -2,7 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { RefObject } from '@mui/x-internals/types';
|
|
3
3
|
import { SxProps } from '@mui/system';
|
|
4
4
|
import { Theme } from '@mui/material/styles';
|
|
5
|
-
import { CommonProps } from '@mui/material/OverridableComponent';
|
|
6
5
|
import { GridDensity } from "../gridDensity.js";
|
|
7
6
|
import { GridEditMode } from "../gridEditRowModel.js";
|
|
8
7
|
import { GridFeatureMode } from "../gridFeatureMode.js";
|
|
@@ -13,7 +12,7 @@ import { GridRowId, GridRowIdGetter, GridRowsProp, GridValidRowModel } from "../
|
|
|
13
12
|
import { GridEventListener } from "../events/index.js";
|
|
14
13
|
import { GridCallbackDetails, GridLocaleText } from "../api/index.js";
|
|
15
14
|
import { GridApiCommunity } from "../api/gridApiCommunity.js";
|
|
16
|
-
import type { GridColDef,
|
|
15
|
+
import type { GridColDef, GridListViewColDef } from '../colDef/gridColDef';
|
|
17
16
|
import { GridClasses } from "../../constants/gridClasses.js";
|
|
18
17
|
import { GridRowHeightParams, GridRowHeightReturnValue, GridRowParams, GridRowSpacing, GridRowSpacingParams, GridRowClassNameParams } from "../params/index.js";
|
|
19
18
|
import { GridCellParams } from "../params/gridCellParams.js";
|
|
@@ -29,6 +28,10 @@ import type { GridAutosizeOptions } from '../../hooks/features/columnResize';
|
|
|
29
28
|
import type { GridDataSource, GridDataSourceCache } from '../gridDataSource';
|
|
30
29
|
import type { GridRowSelectionPropagation } from '../gridRowSelectionModel';
|
|
31
30
|
import type { GridGetRowsError, GridUpdateRowError } from '../../hooks/features/dataSource/gridDataSourceError';
|
|
31
|
+
type CommonProps = {
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
};
|
|
32
35
|
export interface GridExperimentalFeatures {
|
|
33
36
|
/**
|
|
34
37
|
* Emits a warning if the cell receives focus without also syncing the focus state.
|
|
@@ -46,7 +49,7 @@ export type DataGridProps<R extends GridValidRowModel = any> = Omit<Partial<Data
|
|
|
46
49
|
* The props of the Data Grid component after the pre-processing phase that the user should not be able to override.
|
|
47
50
|
* Those are usually used in feature-hook for which the pro-plan has more advanced features (eg: multi-sorting, multi-filtering, ...).
|
|
48
51
|
*/
|
|
49
|
-
export type DataGridForcedPropsKey = 'checkboxSelectionVisibleOnly' | 'disableMultipleColumnsFiltering' | 'disableMultipleColumnsSorting' | 'disableColumnReorder' | 'keepColumnPositionIfDraggedOutside' | 'throttleRowsMs' | 'hideFooterRowCount' | 'pagination' | 'signature' | '
|
|
52
|
+
export type DataGridForcedPropsKey = 'checkboxSelectionVisibleOnly' | 'disableMultipleColumnsFiltering' | 'disableMultipleColumnsSorting' | 'disableColumnReorder' | 'keepColumnPositionIfDraggedOutside' | 'throttleRowsMs' | 'hideFooterRowCount' | 'pagination' | 'signature' | 'listView';
|
|
50
53
|
/**
|
|
51
54
|
* The Data Grid options with a default value that must be merged with the value given through props.
|
|
52
55
|
*/
|
|
@@ -721,13 +724,19 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
721
724
|
*/
|
|
722
725
|
onSortModelChange?: (model: GridSortModel, details: GridCallbackDetails) => void;
|
|
723
726
|
/**
|
|
724
|
-
* The label of the Data Grid.
|
|
727
|
+
* The `aria-label` of the Data Grid.
|
|
725
728
|
*/
|
|
726
729
|
'aria-label'?: string;
|
|
727
730
|
/**
|
|
728
|
-
* The id of the element containing a label for the Data Grid.
|
|
731
|
+
* The `id` of the element containing a label for the Data Grid.
|
|
729
732
|
*/
|
|
730
733
|
'aria-labelledby'?: string;
|
|
734
|
+
/**
|
|
735
|
+
* The label of the Data Grid.
|
|
736
|
+
* If the `showToolbar` prop is `true`, the label will be displayed in the toolbar and applied to the `aria-label` attribute of the grid.
|
|
737
|
+
* If the `showToolbar` prop is `false`, the label will not be visible but will be applied to the `aria-label` attribute of the grid.
|
|
738
|
+
*/
|
|
739
|
+
label?: string;
|
|
731
740
|
/**
|
|
732
741
|
* Set of columns of type [[GridColDef]][].
|
|
733
742
|
*/
|
|
@@ -828,10 +837,10 @@ export interface DataGridProSharedPropsWithDefaultValue {
|
|
|
828
837
|
rowSelectionPropagation: GridRowSelectionPropagation;
|
|
829
838
|
/**
|
|
830
839
|
* If `true`, displays the data in a list view.
|
|
831
|
-
* Use in combination with `
|
|
840
|
+
* Use in combination with `listViewColumn`.
|
|
832
841
|
* @default false
|
|
833
842
|
*/
|
|
834
|
-
|
|
843
|
+
listView: boolean;
|
|
835
844
|
}
|
|
836
845
|
export interface DataGridProSharedPropsWithoutDefaultValue<R extends GridValidRowModel = any> {
|
|
837
846
|
/**
|
|
@@ -839,9 +848,9 @@ export interface DataGridProSharedPropsWithoutDefaultValue<R extends GridValidRo
|
|
|
839
848
|
*/
|
|
840
849
|
headerFilterHeight?: number;
|
|
841
850
|
/**
|
|
842
|
-
* Definition of the column rendered when the `
|
|
851
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
843
852
|
*/
|
|
844
|
-
|
|
853
|
+
listViewColumn?: GridListViewColDef<R>;
|
|
845
854
|
}
|
|
846
855
|
export interface DataGridPremiumSharedPropsWithDefaultValue {
|
|
847
856
|
/**
|
|
@@ -853,4 +862,5 @@ export interface DataGridPremiumSharedPropsWithDefaultValue {
|
|
|
853
862
|
/**
|
|
854
863
|
* The props of the Data Grid component after the pre-processing phase.
|
|
855
864
|
*/
|
|
856
|
-
export interface DataGridProcessedProps<R extends GridValidRowModel = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithoutDefaultValue<R>, DataGridProSharedPropsWithoutDefaultValue, Partial<DataGridProSharedPropsWithDefaultValue>, Partial<DataGridPremiumSharedPropsWithDefaultValue> {}
|
|
865
|
+
export interface DataGridProcessedProps<R extends GridValidRowModel = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithoutDefaultValue<R>, DataGridProSharedPropsWithoutDefaultValue, Partial<DataGridProSharedPropsWithDefaultValue>, Partial<DataGridPremiumSharedPropsWithDefaultValue> {}
|
|
866
|
+
export {};
|
package/modern/utils/utils.d.ts
CHANGED
|
@@ -12,33 +12,6 @@ export declare const clamp: (value: number, min: number, max: number) => number;
|
|
|
12
12
|
* Create an array containing the range [from, to[
|
|
13
13
|
*/
|
|
14
14
|
export declare function range(from: number, to: number): number[];
|
|
15
|
-
/**
|
|
16
|
-
* Based on `fast-deep-equal`
|
|
17
|
-
*
|
|
18
|
-
* MIT License
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) 2017 Evgeny Poberezkin
|
|
21
|
-
*
|
|
22
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
23
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
24
|
-
* in the Software without restriction, including without limitation the rights
|
|
25
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
26
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
27
|
-
* furnished to do so, subject to the following conditions:
|
|
28
|
-
*
|
|
29
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
30
|
-
* copies or substantial portions of the Software.
|
|
31
|
-
*
|
|
32
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
33
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
34
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
35
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
36
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
37
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
38
|
-
* SOFTWARE.
|
|
39
|
-
* We only type the public interface to avoid dozens of `as` in the function.
|
|
40
|
-
*/
|
|
41
|
-
export declare function isDeepEqual<T>(actual: any, expected: T): actual is T;
|
|
42
15
|
/**
|
|
43
16
|
* Create a random number generator from a seed. The seed
|
|
44
17
|
* ensures that the random number generator produces the
|
package/modern/utils/utils.js
CHANGED
|
@@ -39,128 +39,6 @@ export function range(from, to) {
|
|
|
39
39
|
}).map((_, i) => from + i);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* Based on `fast-deep-equal`
|
|
44
|
-
*
|
|
45
|
-
* MIT License
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) 2017 Evgeny Poberezkin
|
|
48
|
-
*
|
|
49
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
50
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
51
|
-
* in the Software without restriction, including without limitation the rights
|
|
52
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
53
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
54
|
-
* furnished to do so, subject to the following conditions:
|
|
55
|
-
*
|
|
56
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
57
|
-
* copies or substantial portions of the Software.
|
|
58
|
-
*
|
|
59
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
60
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
61
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
62
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
63
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
64
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
65
|
-
* SOFTWARE.
|
|
66
|
-
* We only type the public interface to avoid dozens of `as` in the function.
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
export function isDeepEqual(a, b) {
|
|
70
|
-
if (a === b) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
if (a && b && typeof a === 'object' && typeof b === 'object') {
|
|
74
|
-
if (a.constructor !== b.constructor) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
if (Array.isArray(a)) {
|
|
78
|
-
const length = a.length;
|
|
79
|
-
if (length !== b.length) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
for (let i = 0; i < length; i += 1) {
|
|
83
|
-
if (!isDeepEqual(a[i], b[i])) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
if (a instanceof Map && b instanceof Map) {
|
|
90
|
-
if (a.size !== b.size) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
const entriesA = Array.from(a.entries());
|
|
94
|
-
for (let i = 0; i < entriesA.length; i += 1) {
|
|
95
|
-
if (!b.has(entriesA[i][0])) {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
for (let i = 0; i < entriesA.length; i += 1) {
|
|
100
|
-
const entryA = entriesA[i];
|
|
101
|
-
if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
if (a instanceof Set && b instanceof Set) {
|
|
108
|
-
if (a.size !== b.size) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
const entries = Array.from(a.entries());
|
|
112
|
-
for (let i = 0; i < entries.length; i += 1) {
|
|
113
|
-
if (!b.has(entries[i][0])) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
120
|
-
const length = a.length;
|
|
121
|
-
if (length !== b.length) {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
for (let i = 0; i < length; i += 1) {
|
|
125
|
-
if (a[i] !== b[i]) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
if (a.constructor === RegExp) {
|
|
132
|
-
return a.source === b.source && a.flags === b.flags;
|
|
133
|
-
}
|
|
134
|
-
if (a.valueOf !== Object.prototype.valueOf) {
|
|
135
|
-
return a.valueOf() === b.valueOf();
|
|
136
|
-
}
|
|
137
|
-
if (a.toString !== Object.prototype.toString) {
|
|
138
|
-
return a.toString() === b.toString();
|
|
139
|
-
}
|
|
140
|
-
const keys = Object.keys(a);
|
|
141
|
-
const length = keys.length;
|
|
142
|
-
if (length !== Object.keys(b).length) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
for (let i = 0; i < length; i += 1) {
|
|
146
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
for (let i = 0; i < length; i += 1) {
|
|
151
|
-
const key = keys[i];
|
|
152
|
-
if (!isDeepEqual(a[key], b[key])) {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// true if both NaN, false otherwise
|
|
160
|
-
// eslint-disable-next-line no-self-compare
|
|
161
|
-
return a !== a && b !== b;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
42
|
// Pseudo random number. See https://stackoverflow.com/a/47593316
|
|
165
43
|
function mulberry32(a) {
|
|
166
44
|
return () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.3",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"directory": "packages/x-data-grid"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/runtime": "^7.
|
|
41
|
-
"@mui/utils": "^7.0.0
|
|
40
|
+
"@babel/runtime": "^7.27.0",
|
|
41
|
+
"@mui/utils": "^7.0.0",
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^5.1.1",
|
|
45
45
|
"use-sync-external-store": "^1.4.0",
|
|
46
|
-
"@mui/x-internals": "8.0.0-beta.
|
|
46
|
+
"@mui/x-internals": "8.0.0-beta.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
|
50
50
|
"@emotion/styled": "^11.8.1",
|
|
51
|
-
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
52
|
-
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
51
|
+
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
52
|
+
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
53
53
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
54
54
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|