@mui/x-data-grid 9.14.0 → 9.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +176 -0
- package/DataGrid/DataGrid.js +8 -0
- package/DataGrid/DataGrid.mjs +9 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/DataGrid/useDataGridComponent.mjs +2 -2
- package/DataGrid/useDataGridProps.mjs +1 -1
- package/colDef/gridActionsColDef.mjs +1 -1
- package/colDef/gridBooleanColDef.mjs +1 -1
- package/colDef/gridCheckboxSelectionColDef.mjs +1 -1
- package/colDef/gridDateColDef.mjs +1 -1
- package/colDef/gridDefaultColumnTypes.mjs +1 -1
- package/colDef/gridLongTextColDef.mjs +1 -1
- package/colDef/gridNumericColDef.mjs +1 -1
- package/colDef/gridSingleSelectColDef.mjs +1 -1
- package/components/GridColumnHeaders.mjs +2 -2
- package/components/GridColumnSortButton.mjs +2 -2
- package/components/GridColumnUnsortedIcon.mjs +2 -2
- package/components/GridFooter.mjs +1 -1
- package/components/GridHeader.mjs +1 -1
- package/components/GridHeaders.mjs +1 -1
- package/components/GridLoadingOverlay.mjs +2 -2
- package/components/GridNoColumnsOverlay.mjs +1 -1
- package/components/GridNoResultsOverlay.mjs +1 -1
- package/components/GridNoRowsOverlay.mjs +1 -1
- package/components/GridPagination.js +9 -1
- package/components/GridPagination.mjs +10 -2
- package/components/GridRow.mjs +2 -2
- package/components/GridRowCount.mjs +2 -2
- package/components/GridRowDragAndDropOverlay.mjs +1 -1
- package/components/GridScrollArea.mjs +1 -1
- package/components/GridSelectedRowCount.mjs +2 -2
- package/components/GridShadowScrollArea.mjs +2 -2
- package/components/GridSkeletonLoadingOverlay.mjs +2 -2
- package/components/base/GridFooterPlaceholder.mjs +1 -1
- package/components/base/GridOverlays.mjs +1 -1
- package/components/cell/GridActionsCell.js +2 -2
- package/components/cell/GridActionsCell.mjs +5 -5
- package/components/cell/GridActionsCellItem.d.mts +20 -6
- package/components/cell/GridActionsCellItem.d.ts +20 -6
- package/components/cell/GridActionsCellItem.js +30 -7
- package/components/cell/GridActionsCellItem.mjs +32 -9
- package/components/cell/GridBooleanCell.mjs +2 -2
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridCell.mjs +3 -3
- package/components/cell/GridEditBooleanCell.mjs +2 -2
- package/components/cell/GridEditDateCell.mjs +2 -2
- package/components/cell/GridEditInputCell.mjs +2 -2
- package/components/cell/GridEditLongTextCell.mjs +1 -1
- package/components/cell/GridEditSingleSelectCell.mjs +2 -2
- package/components/cell/GridFooterCell.mjs +2 -2
- package/components/cell/GridLongTextCell.mjs +1 -1
- package/components/cell/GridSkeletonCell.mjs +2 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.mjs +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.mjs +2 -2
- package/components/columnHeaders/GridColumnGroupHeader.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.d.mts +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.mjs +2 -2
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +17 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +18 -1
- package/components/columnHeaders/GridColumnHeaderTitle.mjs +2 -2
- package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +2 -2
- package/components/columnHeaders/GridIconButtonContainer.mjs +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.mjs +2 -2
- package/components/columnSelection/GridHeaderCheckbox.mjs +2 -2
- package/components/columnSelection/GridRowCheckbox.js +1 -3
- package/components/columnSelection/GridRowCheckbox.mjs +3 -5
- package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.mjs +2 -2
- package/components/containers/GridFooterContainer.mjs +2 -2
- package/components/containers/GridOverlay.mjs +2 -2
- package/components/containers/GridRoot.mjs +2 -2
- package/components/containers/GridRootStyles.js +22 -10
- package/components/containers/GridRootStyles.mjs +22 -10
- package/components/containers/GridToolbarContainer.mjs +2 -2
- package/components/export/ExportCsv.mjs +2 -2
- package/components/export/ExportPrint.js +4 -1
- package/components/export/ExportPrint.mjs +6 -3
- package/components/filterPanel/FilterPanelTrigger.mjs +2 -2
- package/components/menu/GridMenu.mjs +2 -2
- package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
- package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
- package/components/menu/columnMenu/GridColumnMenuContainer.mjs +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
- package/components/panel/GridColumnsPanel.mjs +1 -1
- package/components/panel/GridPanel.mjs +2 -2
- package/components/panel/GridPanelContent.mjs +2 -2
- package/components/panel/GridPanelContext.mjs +1 -1
- package/components/panel/GridPanelFooter.mjs +2 -2
- package/components/panel/GridPanelHeader.mjs +2 -2
- package/components/panel/GridPanelWrapper.mjs +2 -2
- package/components/panel/GridPreferencesPanel.mjs +1 -1
- package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
- package/components/panel/filterPanel/GridFilterFormBase.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -12
- package/components/panel/filterPanel/GridFilterInputBoolean.mjs +3 -14
- package/components/panel/filterPanel/GridFilterInputDate.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -12
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +3 -14
- package/components/panel/filterPanel/GridFilterInputValue.mjs +2 -2
- package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
- package/components/panel/filterPanel/GridFilterPanelBase.mjs +2 -2
- package/components/panel/filterPanel/filterPanelUtils.mjs +1 -1
- package/components/quickFilter/QuickFilter.mjs +2 -2
- package/components/quickFilter/QuickFilterClear.js +17 -0
- package/components/quickFilter/QuickFilterClear.mjs +19 -2
- package/components/quickFilter/QuickFilterControl.mjs +2 -2
- package/components/quickFilter/QuickFilterTrigger.mjs +2 -2
- package/components/toolbar/GridToolbar.mjs +2 -2
- package/components/toolbar/GridToolbarColumnsButton.mjs +1 -1
- package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
- package/components/toolbar/GridToolbarExport.js +4 -1
- package/components/toolbar/GridToolbarExport.mjs +6 -3
- package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
- package/components/toolbar/GridToolbarFilterButton.mjs +1 -1
- package/components/toolbar/GridToolbarQuickFilter.mjs +2 -2
- package/components/toolbarV8/GridToolbar.mjs +2 -2
- package/components/toolbarV8/Toolbar.mjs +2 -2
- package/components/toolbarV8/ToolbarButton.js +17 -0
- package/components/toolbarV8/ToolbarButton.mjs +19 -2
- package/components/virtualization/GridBottomContainer.mjs +1 -1
- package/components/virtualization/GridMainContainer.mjs +1 -1
- package/components/virtualization/GridTopContainer.mjs +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -2
- package/components/virtualization/GridVirtualScrollbar.mjs +2 -2
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/components/virtualization/GridVirtualScroller.mjs +3 -3
- package/components/virtualization/GridVirtualScrollerContent.mjs +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.mjs +1 -1
- package/constants/cssVariables.mjs +1 -1
- package/constants/defaultGridSlotsComponents.mjs +1 -1
- package/constants/signature.d.mts +1 -1
- package/constants/signature.d.ts +1 -1
- package/hooks/core/pipeProcessing/useGridPipeProcessing.mjs +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.mjs +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.mjs +2 -2
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +1 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -2
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -2
- package/hooks/core/useGridApiInitialization.js +1 -1
- package/hooks/core/useGridApiInitialization.mjs +1 -1
- package/hooks/core/useGridIsRtl.mjs +1 -1
- package/hooks/core/useGridProps.mjs +1 -1
- package/hooks/core/useGridStateInitialization.mjs +1 -1
- package/hooks/core/useGridVirtualizer.d.mts +2 -2
- package/hooks/core/useGridVirtualizer.d.ts +2 -2
- package/hooks/core/useGridVirtualizer.js +6 -6
- package/hooks/core/useGridVirtualizer.mjs +4 -4
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.mjs +2 -2
- package/hooks/features/columnGrouping/useGridColumnGrouping.mjs +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.mjs +1 -1
- package/hooks/features/columnMenu/getColumnMenuItemKeys.mjs +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.mjs +1 -1
- package/hooks/features/columnMenu/useGridColumnMenuSlots.mjs +2 -2
- package/hooks/features/columnResize/useGridColumnResize.mjs +1 -1
- package/hooks/features/columns/gridColumnsInterfaces.d.mts +1 -1
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.mjs +1 -1
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/columns/useGridColumns.mjs +2 -2
- package/hooks/features/dataSource/cache.js +1 -1
- package/hooks/features/dataSource/cache.mjs +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +13 -28
- package/hooks/features/dataSource/useGridDataSourceBase.mjs +16 -31
- package/hooks/features/dataSource/useGridDataSourcePolling.d.mts +29 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.d.ts +29 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.js +62 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.mjs +54 -0
- package/hooks/features/dataSource/utils.d.mts +1 -1
- package/hooks/features/dataSource/utils.d.ts +1 -1
- package/hooks/features/dataSource/utils.mjs +1 -1
- package/hooks/features/density/useGridDensity.mjs +1 -1
- package/hooks/features/dimensions/useGridDimensions.d.mts +1 -1
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +3 -3
- package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
- package/hooks/features/editing/useGridCellEditing.js +1 -1
- package/hooks/features/editing/useGridCellEditing.mjs +5 -5
- package/hooks/features/editing/useGridEditing.mjs +1 -1
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/editing/useGridRowEditing.mjs +5 -5
- package/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/hooks/features/export/serializers/csvSerializer.mjs +5 -5
- package/hooks/features/export/useGridPrintExport.js +44 -20
- package/hooks/features/export/useGridPrintExport.mjs +45 -21
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/gridFilterUtils.mjs +5 -5
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/filter/useGridFilter.mjs +3 -3
- package/hooks/features/focus/useGridFocus.mjs +1 -1
- package/hooks/features/headerFiltering/useGridHeaderFiltering.mjs +1 -1
- package/hooks/features/listView/useGridListView.d.mts +2 -2
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +1 -1
- package/hooks/features/listView/useGridListView.mjs +2 -2
- package/hooks/features/pagination/useGridPagination.mjs +1 -1
- package/hooks/features/pagination/useGridPaginationMeta.mjs +1 -1
- package/hooks/features/pagination/useGridPaginationModel.mjs +1 -1
- package/hooks/features/pagination/useGridRowCount.js +2 -2
- package/hooks/features/pagination/useGridRowCount.mjs +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.mts +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.mjs +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.mjs +1 -1
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.js +2 -2
- package/hooks/features/rows/gridRowsUtils.mjs +3 -3
- package/hooks/features/rows/useGridRowSpanning.mjs +1 -1
- package/hooks/features/rows/useGridRows.mjs +1 -1
- package/hooks/features/rows/useGridRowsMeta.mjs +1 -1
- package/hooks/features/rows/useGridRowsOverridableMethods.mjs +1 -1
- package/hooks/features/rows/useGridRowsPreProcessors.mjs +1 -1
- package/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/hooks/features/sorting/gridSortingUtils.mjs +3 -3
- package/hooks/features/sorting/useGridSorting.js +2 -2
- package/hooks/features/sorting/useGridSorting.mjs +3 -3
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.mjs +1 -1
- package/hooks/features/virtualization/useGridVirtualization.mjs +1 -1
- package/hooks/utils/index.d.mts +1 -1
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -12
- package/hooks/utils/index.mjs +2 -1
- package/hooks/utils/useGridSelector.js +2 -2
- package/hooks/utils/useGridSelector.mjs +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/constants.d.mts +1 -1
- package/internals/constants.d.ts +1 -1
- package/internals/index.d.mts +1 -0
- package/internals/index.d.ts +1 -0
- package/internals/index.js +8 -0
- package/internals/index.mjs +1 -0
- package/internals/utils/cache.d.mts +0 -1
- package/internals/utils/cache.d.ts +0 -1
- package/internals/utils/cache.js +1 -3
- package/internals/utils/cache.mjs +1 -3
- package/internals/utils/computeSlots.mjs +1 -1
- package/internals/utils/propValidation.js +2 -2
- package/internals/utils/propValidation.mjs +3 -3
- package/material/index.mjs +2 -2
- package/models/api/gridCoreApi.d.mts +1 -1
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/api/gridEditingApi.d.mts +6 -6
- package/models/api/gridEditingApi.d.ts +6 -6
- package/models/api/gridPrintExportApi.d.mts +2 -1
- package/models/api/gridPrintExportApi.d.ts +2 -1
- package/models/events/gridEventLookup.d.mts +5 -5
- package/models/events/gridEventLookup.d.ts +5 -5
- package/models/gridBaseSlots.d.mts +18 -1
- package/models/gridBaseSlots.d.ts +18 -1
- package/models/gridEditRowModel.d.mts +3 -3
- package/models/gridEditRowModel.d.ts +3 -3
- package/models/gridExport.d.mts +13 -0
- package/models/gridExport.d.ts +13 -0
- package/models/gridFilterItem.d.mts +2 -2
- package/models/gridFilterItem.d.ts +2 -2
- package/models/index.d.mts +2 -1
- package/models/index.d.ts +2 -1
- package/models/params/gridEditCellParams.d.mts +2 -2
- package/models/params/gridEditCellParams.d.ts +2 -2
- package/models/params/gridRowParams.d.mts +2 -2
- package/models/params/gridRowParams.d.ts +2 -2
- package/models/props/DataGridProps.d.mts +8 -0
- package/models/props/DataGridProps.d.ts +8 -0
- package/package.json +5 -5
- package/utils/createSelector.d.mts +1 -1
- package/utils/createSelector.d.ts +1 -1
- package/utils/createSelector.js +1 -1
- package/utils/createSelector.mjs +1 -1
- package/hooks/utils/useFirstRender.d.mts +0 -1
- package/hooks/utils/useFirstRender.d.ts +0 -1
- package/hooks/utils/useFirstRender.js +0 -16
- package/hooks/utils/useFirstRender.mjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["logicOperators", "columnsSort", "filterFormProps", "getColumnForNewFilter", "children", "disableAddFilterButton", "disableRemoveAllButton", "disableDebounce", "filterModel", "onFilterModelChange", "onClose"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["render", "className", "parser", "formatter", "debounceMs", "defaultExpanded", "expanded", "onExpandedChange"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -67,10 +67,23 @@ process.env.NODE_ENV !== "production" ? QuickFilterClear.propTypes /* remove-pro
|
|
|
67
67
|
*/
|
|
68
68
|
className: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
|
|
69
69
|
color: _propTypes.default.oneOf(['default', 'inherit', 'primary']),
|
|
70
|
+
/**
|
|
71
|
+
* The component used for the root node. Either a string to use an HTML element or a component.
|
|
72
|
+
*/
|
|
73
|
+
component: _propTypes.default.elementType,
|
|
70
74
|
disabled: _propTypes.default.bool,
|
|
71
75
|
edge: _propTypes.default.oneOf(['end', 'start', false]),
|
|
76
|
+
/**
|
|
77
|
+
* The URL to link to. If set, and `component` is not set, the component renders as an anchor tag.
|
|
78
|
+
*/
|
|
79
|
+
href: _propTypes.default.string,
|
|
72
80
|
id: _propTypes.default.string,
|
|
73
81
|
label: _propTypes.default.string,
|
|
82
|
+
/**
|
|
83
|
+
* The relationship of the linked URL.
|
|
84
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
85
|
+
*/
|
|
86
|
+
rel: _propTypes.default.string,
|
|
74
87
|
/**
|
|
75
88
|
* A function to customize rendering of the component.
|
|
76
89
|
*/
|
|
@@ -79,6 +92,10 @@ process.env.NODE_ENV !== "production" ? QuickFilterClear.propTypes /* remove-pro
|
|
|
79
92
|
size: _propTypes.default.oneOf(['large', 'medium', 'small']),
|
|
80
93
|
style: _propTypes.default.object,
|
|
81
94
|
tabIndex: _propTypes.default.number,
|
|
95
|
+
/**
|
|
96
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
97
|
+
*/
|
|
98
|
+
target: _propTypes.default.string,
|
|
82
99
|
title: _propTypes.default.string,
|
|
83
100
|
touchRippleRef: _propTypes.default.any
|
|
84
101
|
} : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["render", "className", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -59,10 +59,23 @@ process.env.NODE_ENV !== "production" ? QuickFilterClear.propTypes /* remove-pro
|
|
|
59
59
|
*/
|
|
60
60
|
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
61
61
|
color: PropTypes.oneOf(['default', 'inherit', 'primary']),
|
|
62
|
+
/**
|
|
63
|
+
* The component used for the root node. Either a string to use an HTML element or a component.
|
|
64
|
+
*/
|
|
65
|
+
component: PropTypes.elementType,
|
|
62
66
|
disabled: PropTypes.bool,
|
|
63
67
|
edge: PropTypes.oneOf(['end', 'start', false]),
|
|
68
|
+
/**
|
|
69
|
+
* The URL to link to. If set, and `component` is not set, the component renders as an anchor tag.
|
|
70
|
+
*/
|
|
71
|
+
href: PropTypes.string,
|
|
64
72
|
id: PropTypes.string,
|
|
65
73
|
label: PropTypes.string,
|
|
74
|
+
/**
|
|
75
|
+
* The relationship of the linked URL.
|
|
76
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
77
|
+
*/
|
|
78
|
+
rel: PropTypes.string,
|
|
66
79
|
/**
|
|
67
80
|
* A function to customize rendering of the component.
|
|
68
81
|
*/
|
|
@@ -71,6 +84,10 @@ process.env.NODE_ENV !== "production" ? QuickFilterClear.propTypes /* remove-pro
|
|
|
71
84
|
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
72
85
|
style: PropTypes.object,
|
|
73
86
|
tabIndex: PropTypes.number,
|
|
87
|
+
/**
|
|
88
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
89
|
+
*/
|
|
90
|
+
target: PropTypes.string,
|
|
74
91
|
title: PropTypes.string,
|
|
75
92
|
touchRippleRef: PropTypes.any
|
|
76
93
|
} : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["render", "className", "slotProps", "onKeyDown", "onChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["render", "className", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
@@ -68,7 +68,9 @@ function GridPrintExportMenuItem(props) {
|
|
|
68
68
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
69
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, (0, _extends2.default)({
|
|
70
70
|
onClick: () => {
|
|
71
|
-
apiRef.current.exportDataAsPrint(options)
|
|
71
|
+
apiRef.current.exportDataAsPrint(options).catch(error => {
|
|
72
|
+
console.error('MUI X Data Grid: Error exporting the grid as print:', error);
|
|
73
|
+
});
|
|
72
74
|
hideMenu?.();
|
|
73
75
|
}
|
|
74
76
|
}, other, {
|
|
@@ -92,6 +94,7 @@ process.env.NODE_ENV !== "production" ? GridPrintExportMenuItem.propTypes /* rem
|
|
|
92
94
|
hideFooter: _propTypes.default.bool,
|
|
93
95
|
hideToolbar: _propTypes.default.bool,
|
|
94
96
|
includeCheckboxes: _propTypes.default.bool,
|
|
97
|
+
onStylesheetError: _propTypes.default.func,
|
|
95
98
|
pageStyle: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string])
|
|
96
99
|
})
|
|
97
100
|
} : void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["hideMenu", "options"],
|
|
6
6
|
_excluded2 = ["hideMenu", "options"],
|
|
7
7
|
_excluded3 = ["csvOptions", "printOptions", "excelOptions"];
|
|
@@ -59,7 +59,9 @@ function GridPrintExportMenuItem(props) {
|
|
|
59
59
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
60
60
|
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({
|
|
61
61
|
onClick: () => {
|
|
62
|
-
apiRef.current.exportDataAsPrint(options)
|
|
62
|
+
apiRef.current.exportDataAsPrint(options).catch(error => {
|
|
63
|
+
console.error('MUI X Data Grid: Error exporting the grid as print:', error);
|
|
64
|
+
});
|
|
63
65
|
hideMenu?.();
|
|
64
66
|
}
|
|
65
67
|
}, other, {
|
|
@@ -83,6 +85,7 @@ process.env.NODE_ENV !== "production" ? GridPrintExportMenuItem.propTypes /* rem
|
|
|
83
85
|
hideFooter: PropTypes.bool,
|
|
84
86
|
hideToolbar: PropTypes.bool,
|
|
85
87
|
includeCheckboxes: PropTypes.bool,
|
|
88
|
+
onStylesheetError: PropTypes.func,
|
|
86
89
|
pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
87
90
|
})
|
|
88
91
|
} : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
4
4
|
const _excluded = ["quickFilterParser", "quickFilterFormatter", "debounceMs", "className", "slotProps"],
|
|
5
5
|
_excluded2 = ["ref", "slotProps"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className"],
|
|
6
6
|
_excluded2 = ["className"],
|
|
7
7
|
_excluded3 = ["showQuickFilter", "quickFilterProps", "csvOptions", "printOptions", "mainControls", "additionalExportMenuItems"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["render", "className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -61,10 +61,23 @@ process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-propty
|
|
|
61
61
|
// ----------------------------------------------------------------------
|
|
62
62
|
className: _propTypes.default.string,
|
|
63
63
|
color: _propTypes.default.oneOf(['default', 'inherit', 'primary']),
|
|
64
|
+
/**
|
|
65
|
+
* The component used for the root node. Either a string to use an HTML element or a component.
|
|
66
|
+
*/
|
|
67
|
+
component: _propTypes.default.elementType,
|
|
64
68
|
disabled: _propTypes.default.bool,
|
|
65
69
|
edge: _propTypes.default.oneOf(['end', 'start', false]),
|
|
70
|
+
/**
|
|
71
|
+
* The URL to link to. If set, and `component` is not set, the component renders as an anchor tag.
|
|
72
|
+
*/
|
|
73
|
+
href: _propTypes.default.string,
|
|
66
74
|
id: _propTypes.default.string,
|
|
67
75
|
label: _propTypes.default.string,
|
|
76
|
+
/**
|
|
77
|
+
* The relationship of the linked URL.
|
|
78
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
79
|
+
*/
|
|
80
|
+
rel: _propTypes.default.string,
|
|
68
81
|
/**
|
|
69
82
|
* A function to customize rendering of the component.
|
|
70
83
|
*/
|
|
@@ -73,6 +86,10 @@ process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-propty
|
|
|
73
86
|
size: _propTypes.default.oneOf(['large', 'medium', 'small']),
|
|
74
87
|
style: _propTypes.default.object,
|
|
75
88
|
tabIndex: _propTypes.default.number,
|
|
89
|
+
/**
|
|
90
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
91
|
+
*/
|
|
92
|
+
target: _propTypes.default.string,
|
|
76
93
|
title: _propTypes.default.string,
|
|
77
94
|
touchRippleRef: _propTypes.default.any
|
|
78
95
|
} : void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["render", "onKeyDown", "onFocus", "onBlur", "disabled", "aria-disabled"],
|
|
6
6
|
_excluded2 = ["tabIndex"];
|
|
7
7
|
import * as React from 'react';
|
|
@@ -54,10 +54,23 @@ process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-propty
|
|
|
54
54
|
// ----------------------------------------------------------------------
|
|
55
55
|
className: PropTypes.string,
|
|
56
56
|
color: PropTypes.oneOf(['default', 'inherit', 'primary']),
|
|
57
|
+
/**
|
|
58
|
+
* The component used for the root node. Either a string to use an HTML element or a component.
|
|
59
|
+
*/
|
|
60
|
+
component: PropTypes.elementType,
|
|
57
61
|
disabled: PropTypes.bool,
|
|
58
62
|
edge: PropTypes.oneOf(['end', 'start', false]),
|
|
63
|
+
/**
|
|
64
|
+
* The URL to link to. If set, and `component` is not set, the component renders as an anchor tag.
|
|
65
|
+
*/
|
|
66
|
+
href: PropTypes.string,
|
|
59
67
|
id: PropTypes.string,
|
|
60
68
|
label: PropTypes.string,
|
|
69
|
+
/**
|
|
70
|
+
* The relationship of the linked URL.
|
|
71
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
72
|
+
*/
|
|
73
|
+
rel: PropTypes.string,
|
|
61
74
|
/**
|
|
62
75
|
* A function to customize rendering of the component.
|
|
63
76
|
*/
|
|
@@ -66,6 +79,10 @@ process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-propty
|
|
|
66
79
|
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
67
80
|
style: PropTypes.object,
|
|
68
81
|
tabIndex: PropTypes.number,
|
|
82
|
+
/**
|
|
83
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
84
|
+
*/
|
|
85
|
+
target: PropTypes.string,
|
|
69
86
|
title: PropTypes.string,
|
|
70
87
|
touchRippleRef: PropTypes.any
|
|
71
88
|
} : void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
@@ -11,7 +11,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
13
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
14
|
-
var _platform = require("@
|
|
14
|
+
var _platform = require("@base-ui/utils/platform");
|
|
15
15
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
16
16
|
var _hooks = require("../../hooks");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -47,7 +47,7 @@ const Scrollbar = (0, _styles.styled)('div', {
|
|
|
47
47
|
// [iOS-scrollbar-swap]
|
|
48
48
|
// On iOS, native scrollbars of the `GridVirtualScroller` are shown instead,
|
|
49
49
|
// so hide these to avoid a duplicate thumb.
|
|
50
|
-
[_platform.
|
|
50
|
+
[_platform.platform.mediaQuery.iOS]: {
|
|
51
51
|
display: 'none'
|
|
52
52
|
}
|
|
53
53
|
});
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
-
import {
|
|
7
|
+
import { platform } from '@base-ui/utils/platform';
|
|
8
8
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
|
|
9
9
|
import { gridDimensionsSelector, useGridSelector } from "../../hooks/index.mjs";
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
|
|
@@ -40,7 +40,7 @@ const Scrollbar = styled('div', {
|
|
|
40
40
|
// [iOS-scrollbar-swap]
|
|
41
41
|
// On iOS, native scrollbars of the `GridVirtualScroller` are shown instead,
|
|
42
42
|
// so hide these to avoid a duplicate thumb.
|
|
43
|
-
[
|
|
43
|
+
[platform.mediaQuery.iOS]: {
|
|
44
44
|
display: 'none'
|
|
45
45
|
}
|
|
46
46
|
});
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
|
-
var _platform = require("@
|
|
13
|
+
var _platform = require("@base-ui/utils/platform");
|
|
14
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
15
|
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
16
16
|
var _gridDimensionsSelectors = require("../../hooks/features/dimensions/gridDimensionsSelectors");
|
|
@@ -72,7 +72,7 @@ const Scroller = (0, _styles.styled)('div', {
|
|
|
72
72
|
// https://github.com/mui/mui-x/issues/22386
|
|
73
73
|
// So keep this scroller's own native scrollbars and hide the ones in `GridVirtualScrollbar`
|
|
74
74
|
// instead to avoid a duplicate thumb.
|
|
75
|
-
[_platform.
|
|
75
|
+
[_platform.platform.mediaQuery.iOS]: {
|
|
76
76
|
scrollbarWidth: 'auto',
|
|
77
77
|
'&::-webkit-scrollbar': {
|
|
78
78
|
display: 'block'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
-
import {
|
|
5
|
+
import { platform } from '@base-ui/utils/platform';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { LayoutDataGrid, Virtualization } from '@mui/x-virtualizer';
|
|
8
8
|
import { gridHasBottomFillerSelector, gridHasScrollXSelector, gridHasScrollYSelector } from "../../hooks/features/dimensions/gridDimensionsSelectors.mjs";
|
|
@@ -64,7 +64,7 @@ const Scroller = styled('div', {
|
|
|
64
64
|
// https://github.com/mui/mui-x/issues/22386
|
|
65
65
|
// So keep this scroller's own native scrollbars and hide the ones in `GridVirtualScrollbar`
|
|
66
66
|
// instead to avoid a duplicate thumb.
|
|
67
|
-
[
|
|
67
|
+
[platform.mediaQuery.iOS]: {
|
|
68
68
|
scrollbarWidth: 'auto',
|
|
69
69
|
'&::-webkit-scrollbar': {
|
|
70
70
|
display: 'block'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
// NOTE: Breakpoints can't come from the theme because we need access to them at
|
|
3
3
|
// initialization time and media-queries can't use CSS variables. For users with
|
|
4
4
|
// custom breakpoints, we might want to provide a way to configure them globally
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon, GridNoColumnsOverlay, GridRowCheckbox } from "../components/index.mjs";
|
|
3
3
|
import { GridCell } from "../components/cell/GridCell.mjs";
|
|
4
4
|
import { GridColumnHeaders } from "../components/GridColumnHeaders.mjs";
|
package/constants/signature.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
4
|
-
import _toPropertyKey from "@babel/runtime/helpers/
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
4
|
+
import _toPropertyKey from "@babel/runtime/helpers/toPropertyKey";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.mjs";
|
|
7
7
|
/**
|
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.useGridRegisterPipeApplier = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _useOnFirstRender = require("@base-ui/utils/useOnFirstRender");
|
|
11
11
|
const useGridRegisterPipeApplier = (apiRef, group, callback) => {
|
|
12
12
|
const cleanup = React.useRef(null);
|
|
13
13
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
14
14
|
const registerPreProcessor = React.useCallback(() => {
|
|
15
15
|
cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
|
|
16
16
|
}, [apiRef, callback, group]);
|
|
17
|
-
(0,
|
|
17
|
+
(0, _useOnFirstRender.useOnFirstRender)(() => {
|
|
18
18
|
registerPreProcessor();
|
|
19
19
|
});
|
|
20
20
|
const isFirstRender = React.useRef(true);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';
|
|
5
5
|
export const useGridRegisterPipeApplier = (apiRef, group, callback) => {
|
|
6
6
|
const cleanup = React.useRef(null);
|
|
7
7
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
8
8
|
const registerPreProcessor = React.useCallback(() => {
|
|
9
9
|
cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
|
|
10
10
|
}, [apiRef, callback, group]);
|
|
11
|
-
|
|
11
|
+
useOnFirstRender(() => {
|
|
12
12
|
registerPreProcessor();
|
|
13
13
|
});
|
|
14
14
|
const isFirstRender = React.useRef(true);
|
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.useGridRegisterPipeProcessor = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _useOnFirstRender = require("@base-ui/utils/useOnFirstRender");
|
|
11
11
|
const useGridRegisterPipeProcessor = (apiRef, group, callback, enabled = true) => {
|
|
12
12
|
const cleanup = React.useRef(null);
|
|
13
13
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
14
14
|
const registerPreProcessor = React.useCallback(() => {
|
|
15
15
|
cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
|
|
16
16
|
}, [apiRef, callback, group]);
|
|
17
|
-
(0,
|
|
17
|
+
(0, _useOnFirstRender.useOnFirstRender)(() => {
|
|
18
18
|
if (enabled) {
|
|
19
19
|
registerPreProcessor();
|
|
20
20
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';
|
|
5
5
|
export const useGridRegisterPipeProcessor = (apiRef, group, callback, enabled = true) => {
|
|
6
6
|
const cleanup = React.useRef(null);
|
|
7
7
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
8
8
|
const registerPreProcessor = React.useCallback(() => {
|
|
9
9
|
cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
|
|
10
10
|
}, [apiRef, callback, group]);
|
|
11
|
-
|
|
11
|
+
useOnFirstRender(() => {
|
|
12
12
|
if (enabled) {
|
|
13
13
|
registerPreProcessor();
|
|
14
14
|
}
|
|
@@ -6,7 +6,7 @@ import type { GridRowId } from "../../../models/gridRows.mjs";
|
|
|
6
6
|
export type GridStrategyProcessorName = keyof GridStrategyProcessingLookup;
|
|
7
7
|
export declare enum GridStrategyGroup {
|
|
8
8
|
DataSource = "dataSource",
|
|
9
|
-
RowTree = "rowTree"
|
|
9
|
+
RowTree = "rowTree"
|
|
10
10
|
}
|
|
11
11
|
export type GridStrategyGroupValue = `${GridStrategyGroup}`;
|
|
12
12
|
export interface GridStrategyProcessingLookup {
|
|
@@ -6,7 +6,7 @@ import type { GridRowId } from "../../../models/gridRows.js";
|
|
|
6
6
|
export type GridStrategyProcessorName = keyof GridStrategyProcessingLookup;
|
|
7
7
|
export declare enum GridStrategyGroup {
|
|
8
8
|
DataSource = "dataSource",
|
|
9
|
-
RowTree = "rowTree"
|
|
9
|
+
RowTree = "rowTree"
|
|
10
10
|
}
|
|
11
11
|
export type GridStrategyGroupValue = `${GridStrategyGroup}`;
|
|
12
12
|
export interface GridStrategyProcessingLookup {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.useGridRegisterStrategyProcessor = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _useOnFirstRender = require("@base-ui/utils/useOnFirstRender");
|
|
11
11
|
const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
|
12
12
|
const registerPreProcessor = React.useCallback(() => {
|
|
13
13
|
// NOTE: the unregister fn is intentionally discarded. Unlike pipe processors
|
|
@@ -18,7 +18,7 @@ const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor
|
|
|
18
18
|
// api, so nothing leaks; `void` documents the deliberate discard.
|
|
19
19
|
void apiRef.current.registerStrategyProcessor(strategyName, group, processor);
|
|
20
20
|
}, [apiRef, processor, group, strategyName]);
|
|
21
|
-
(0,
|
|
21
|
+
(0, _useOnFirstRender.useOnFirstRender)(() => {
|
|
22
22
|
registerPreProcessor();
|
|
23
23
|
});
|
|
24
24
|
const isFirstRender = React.useRef(true);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';
|
|
5
5
|
export const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
|
6
6
|
const registerPreProcessor = React.useCallback(() => {
|
|
7
7
|
// NOTE: the unregister fn is intentionally discarded. Unlike pipe processors
|
|
@@ -12,7 +12,7 @@ export const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, pr
|
|
|
12
12
|
// api, so nothing leaks; `void` documents the deliberate discard.
|
|
13
13
|
void apiRef.current.registerStrategyProcessor(strategyName, group, processor);
|
|
14
14
|
}, [apiRef, processor, group, strategyName]);
|
|
15
|
-
|
|
15
|
+
useOnFirstRender(() => {
|
|
16
16
|
registerPreProcessor();
|
|
17
17
|
});
|
|
18
18
|
const isFirstRender = React.useRef(true);
|