@mui/x-data-grid 8.19.0 → 8.20.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/components/GridRow.js +4 -1
  3. package/components/GridRowDragAndDropOverlay.d.ts +7 -0
  4. package/components/GridRowDragAndDropOverlay.js +73 -0
  5. package/components/containers/GridRootStyles.js +16 -39
  6. package/constants/gridClasses.d.ts +0 -8
  7. package/constants/gridClasses.js +1 -1
  8. package/esm/components/GridRow.js +4 -1
  9. package/esm/components/GridRowDragAndDropOverlay.d.ts +7 -0
  10. package/esm/components/GridRowDragAndDropOverlay.js +66 -0
  11. package/esm/components/containers/GridRootStyles.js +16 -39
  12. package/esm/constants/gridClasses.d.ts +0 -8
  13. package/esm/constants/gridClasses.js +1 -1
  14. package/esm/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +4 -3
  15. package/esm/hooks/features/dataSource/useGridDataSourceBase.js +2 -2
  16. package/esm/hooks/features/editing/useGridCellEditing.js +1 -1
  17. package/esm/hooks/features/editing/useGridRowEditing.js +1 -1
  18. package/esm/hooks/features/export/serializers/csvSerializer.js +2 -4
  19. package/esm/hooks/features/filter/gridFilterUtils.js +5 -11
  20. package/esm/hooks/features/filter/index.d.ts +1 -1
  21. package/esm/hooks/features/filter/index.js +1 -1
  22. package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +19 -0
  23. package/esm/hooks/features/rowReorder/gridRowReorderSelector.d.ts +20 -1
  24. package/esm/hooks/features/rowReorder/gridRowReorderSelector.js +19 -1
  25. package/esm/hooks/features/rowSelection/useGridRowSelection.js +9 -1
  26. package/esm/hooks/features/rows/useGridRows.js +3 -1
  27. package/esm/hooks/features/rows/useGridRowsOverridableMethods.d.ts +1 -0
  28. package/esm/hooks/features/rows/useGridRowsOverridableMethods.js +57 -7
  29. package/esm/hooks/features/sorting/gridSortingUtils.js +1 -3
  30. package/esm/hooks/utils/useGridSelector.js +2 -4
  31. package/esm/index.js +1 -1
  32. package/esm/internals/index.d.ts +5 -4
  33. package/esm/internals/index.js +3 -3
  34. package/esm/material/index.js +1 -4
  35. package/esm/models/api/gridRowApi.d.ts +14 -1
  36. package/esm/models/api/index.d.ts +1 -1
  37. package/esm/models/api/index.js +0 -1
  38. package/esm/models/configuration/gridConfiguration.d.ts +2 -2
  39. package/esm/models/configuration/gridRowConfiguration.d.ts +6 -5
  40. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +4 -3
  41. package/hooks/features/dataSource/useGridDataSourceBase.js +2 -2
  42. package/hooks/features/editing/useGridCellEditing.js +1 -1
  43. package/hooks/features/editing/useGridRowEditing.js +1 -1
  44. package/hooks/features/export/serializers/csvSerializer.js +2 -4
  45. package/hooks/features/filter/gridFilterUtils.js +5 -11
  46. package/hooks/features/filter/index.d.ts +1 -1
  47. package/hooks/features/filter/index.js +6 -0
  48. package/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +19 -0
  49. package/hooks/features/rowReorder/gridRowReorderSelector.d.ts +20 -1
  50. package/hooks/features/rowReorder/gridRowReorderSelector.js +20 -2
  51. package/hooks/features/rowSelection/useGridRowSelection.js +9 -1
  52. package/hooks/features/rows/useGridRows.js +3 -1
  53. package/hooks/features/rows/useGridRowsOverridableMethods.d.ts +1 -0
  54. package/hooks/features/rows/useGridRowsOverridableMethods.js +57 -7
  55. package/hooks/features/sorting/gridSortingUtils.js +1 -3
  56. package/hooks/utils/useGridSelector.js +2 -4
  57. package/index.js +1 -1
  58. package/internals/index.d.ts +5 -4
  59. package/internals/index.js +16 -9
  60. package/material/index.js +1 -4
  61. package/models/api/gridRowApi.d.ts +14 -1
  62. package/models/api/index.d.ts +1 -1
  63. package/models/api/index.js +0 -11
  64. package/models/configuration/gridConfiguration.d.ts +2 -2
  65. package/models/configuration/gridRowConfiguration.d.ts +6 -5
  66. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,68 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.20.0
9
+
10
+ _Nov 26, 2025_
11
+
12
+ We'd like to extend a big thank you to the 8 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔃 Data Grid tree data now supports row reordering. See the [Drag-and-drop tree data reordering](https://mui.com/x/react-data-grid/tree-data/#drag-and-drop-tree-data-reordering) section for more details.
15
+ - 🐞 Bugfixes
16
+
17
+ The following team members contributed to this release:
18
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @siriwatknp, @JCQuintas, @MBilalShafi, @prakhargupta1
19
+
20
+ ### Data Grid
21
+
22
+ #### `@mui/x-data-grid@8.20.0`
23
+
24
+ - [DataGrid] Fix RTL virtualization to display columns when viewport width is larger than the grid (#20409) @siriwatknp
25
+ - [DataGrid] Fix row range selection (#20442) @arminmeh
26
+ - [DataGrid] Initialize data grid core packages (#20276) @cherniavskii
27
+ - [DataGrid] Improve accessibility of the sort icon (#20430) @arminmeh
28
+ - [DataGrid] Use `viewport` as a boundary for the `BasePopper` flip (#20311) @arminmeh
29
+
30
+ #### `@mui/x-data-grid-pro@8.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@8.20.0`, plus:
33
+
34
+ - [DataGridPro] Avoid automatic scroll back to the focused header filter after it leaves the viewport (#20416) @arminmeh
35
+ - [DataGridPro] Tree data row reordering (#19401) @MBilalShafi
36
+
37
+ #### `@mui/x-data-grid-premium@8.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
38
+
39
+ Same changes as in `@mui/x-data-grid-pro@8.20.0`.
40
+
41
+ ### Charts
42
+
43
+ #### `@mui/x-charts@8.20.0`
44
+
45
+ - [charts] Fix item tooltip position with node anchor (#20421) @alexfauquette
46
+ - [charts] Fix radar item tooltip closing bug (#20429) @alexfauquette
47
+ - [charts] Move series processing to selector (#20388) @JCQuintas
48
+ - [charts] Prevent pointer out from removing controlled highlight (#20385) @alexfauquette
49
+
50
+ #### `@mui/x-charts-pro@8.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
51
+
52
+ Same changes as in `@mui/x-charts@8.20.0`, plus:
53
+
54
+ - [charts-pro] Fix Content-Security-Policy nonce not being correctly set on export (#20395) @bernardobelchior
55
+ - [charts-pro] Improve vertical zoom slider thumb on mobile (#20439) @bernardobelchior
56
+ - [charts-pro] Provide arguments to the `AreaPlotRoot` styled component (#20414) @arminmeh
57
+ - [charts-pro] Remove grid outside the drawing area (#20412) @alexfauquette
58
+
59
+ #### `@mui/x-charts-premium@8.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
60
+
61
+ Same changes as in `@mui/x-charts-pro@8.20.0`, plus:
62
+
63
+ - [charts-premium] Add explicit return type to `ChartsRenderer` for better compatibility with React 18 (#20413) @arminmeh
64
+
65
+ ### Docs
66
+
67
+ - [docs] Add `llms.txt` link to the sidebar (#20312) @siriwatknp
68
+ - [docs] Add a line chart demo for the Overview section (#20239) @prakhargupta1
69
+
8
70
  ## 8.19.0
9
71
 
10
72
  _Nov 20, 2025_
@@ -32,6 +32,7 @@ var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelecto
32
32
  var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
33
33
  var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
34
34
  var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
35
+ var _GridRowDragAndDropOverlay = require("./GridRowDragAndDropOverlay");
35
36
  var _getPinnedCellOffset = require("../internals/utils/getPinnedCellOffset");
36
37
  var _useGridConfiguration = require("../hooks/utils/useGridConfiguration");
37
38
  var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
@@ -315,7 +316,9 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
315
316
  }), cells, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
316
317
  role: "presentation",
317
318
  className: (0, _clsx.default)(_gridClasses.gridClasses.cell, _gridClasses.gridClasses.cellEmpty)
318
- }), rightCells]
319
+ }), rightCells, /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridRowDragAndDropOverlay.GridRowDragAndDropOverlay, {
320
+ rowId: rowId
321
+ })]
319
322
  }));
320
323
  });
321
324
  if (process.env.NODE_ENV !== "production") GridRow.displayName = "GridRow";
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import type { GridRowId } from "../models/gridRows.js";
3
+ export interface GridRowDragAndDropOverlayProps {
4
+ rowId: GridRowId;
5
+ className?: string;
6
+ }
7
+ export declare const GridRowDragAndDropOverlay: React.NamedExoticComponent<GridRowDragAndDropOverlayProps>;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.GridRowDragAndDropOverlay = void 0;
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _styles = require("@mui/material/styles");
13
+ var _createStyled = require("@mui/system/createStyled");
14
+ var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
15
+ var _useGridSelector = require("../hooks/utils/useGridSelector");
16
+ var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ const GridRowDragAndDropOverlayRoot = (0, _styles.styled)('div', {
19
+ name: 'MuiDataGrid',
20
+ slot: 'RowDragOverlay',
21
+ shouldForwardProp: prop => (0, _createStyled.shouldForwardProp)(prop) && prop !== 'action'
22
+ })(({
23
+ theme,
24
+ action
25
+ }) => (0, _extends2.default)({
26
+ position: 'absolute',
27
+ left: 0,
28
+ right: 0,
29
+ top: 0,
30
+ bottom: 0,
31
+ pointerEvents: 'none',
32
+ zIndex: 1
33
+ }, action === 'above' && {
34
+ '&::before': {
35
+ pointerEvents: 'none',
36
+ content: '""',
37
+ position: 'absolute',
38
+ top: 0,
39
+ left: 0,
40
+ right: 0,
41
+ height: '2px',
42
+ backgroundColor: (theme.vars || theme).palette.primary.main
43
+ }
44
+ }, action === 'below' && {
45
+ '&::after': {
46
+ pointerEvents: 'none',
47
+ content: '""',
48
+ position: 'absolute',
49
+ bottom: '-2px',
50
+ left: 0,
51
+ right: 0,
52
+ height: '2px',
53
+ backgroundColor: (theme.vars || theme).palette.primary.main
54
+ }
55
+ }, action === 'inside' && {
56
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / 0.1)` : (0, _styles.alpha)(theme.palette.primary.main, 0.1)
57
+ }));
58
+ const GridRowDragAndDropOverlay = exports.GridRowDragAndDropOverlay = /*#__PURE__*/React.memo(function GridRowDragAndDropOverlay(props) {
59
+ const {
60
+ rowId,
61
+ className
62
+ } = props;
63
+ const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
64
+ const dropPosition = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowReorderSelector.gridRowDropPositionSelector, rowId);
65
+ if (!dropPosition) {
66
+ return null;
67
+ }
68
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridRowDragAndDropOverlayRoot, {
69
+ action: dropPosition,
70
+ className: className
71
+ });
72
+ });
73
+ if (process.env.NODE_ENV !== "production") GridRowDragAndDropOverlay.displayName = "GridRowDragAndDropOverlay";
@@ -239,10 +239,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
239
239
  [`& .${_gridClasses.gridClasses.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
240
240
  }, {
241
241
  [`& .${_gridClasses.gridClasses.withBorderColor}`]: styles.withBorderColor
242
- }, {
243
- [`& .${_gridClasses.gridClasses['row--dropAbove']}`]: styles['row--dropAbove']
244
- }, {
245
- [`& .${_gridClasses.gridClasses['row--dropBelow']}`]: styles['row--dropBelow']
246
242
  }, {
247
243
  [`& .${_gridClasses.gridClasses['row--beingDragged']}`]: styles['row--beingDragged']
248
244
  }]
@@ -420,6 +416,9 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
420
416
  alignItems: 'center',
421
417
  backgroundColor: headerBackground
422
418
  },
419
+ [`& .${_gridClasses.gridClasses.columnHeader} .${_gridClasses.gridClasses.sortButton}`]: {
420
+ backgroundColor: _cssVariables.vars.header.background.base
421
+ },
423
422
  [`& .${_gridClasses.gridClasses['columnHeader--filter']}`]: {
424
423
  paddingTop: 8,
425
424
  paddingBottom: 8,
@@ -519,7 +518,16 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
519
518
  [`& .${_gridClasses.gridClasses.columnHeader}:not(.${_gridClasses.gridClasses['columnHeader--sorted']}):hover .${_gridClasses.gridClasses.sortButton},
520
519
  & .${_gridClasses.gridClasses.pivotPanelField}:not(.${_gridClasses.gridClasses['pivotPanelField--sorted']}):hover .${_gridClasses.gridClasses.sortButton},
521
520
  & .${_gridClasses.gridClasses.pivotPanelField}:not(.${_gridClasses.gridClasses['pivotPanelField--sorted']}) .${_gridClasses.gridClasses.sortButton}:focus-visible`]: {
522
- opacity: 0.5
521
+ opacity: 1
522
+ },
523
+ // Add opacity only to the button content to avoid affecting the background color
524
+ [`& .${_gridClasses.gridClasses.columnHeader}:not(.${_gridClasses.gridClasses['columnHeader--sorted']}):hover .${_gridClasses.gridClasses.sortButton} > *,
525
+ & .${_gridClasses.gridClasses.pivotPanelField}:not(.${_gridClasses.gridClasses['pivotPanelField--sorted']}):hover .${_gridClasses.gridClasses.sortButton} > *,
526
+ & .${_gridClasses.gridClasses.pivotPanelField}:not(.${_gridClasses.gridClasses['pivotPanelField--sorted']}) .${_gridClasses.gridClasses.sortButton}:focus-visible > *`]: {
527
+ opacity: 0.78
528
+ },
529
+ [`& .${_gridClasses.gridClasses.pivotPanelFieldActionContainer} button:hover`]: {
530
+ backgroundColor: _cssVariables.vars.colors.background.base
523
531
  }
524
532
  },
525
533
  '@media (hover: none)': {
@@ -534,7 +542,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
534
542
  }
535
543
  },
536
544
  [`& .${_gridClasses.gridClasses.pivotPanelField}:not(.${_gridClasses.gridClasses['pivotPanelField--sorted']}) .${_gridClasses.gridClasses.sortButton}`]: {
537
- opacity: 0.5
545
+ opacity: 0.78
538
546
  }
539
547
  },
540
548
  // Hide the column separator when the column has border and it is not resizable
@@ -628,7 +636,8 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
628
636
  [`&.${_gridClasses.gridClasses.rowSkeleton}:hover`]: {
629
637
  backgroundColor: 'transparent'
630
638
  },
631
- '&.Mui-selected': selectedStyles
639
+ '&.Mui-selected': selectedStyles,
640
+ position: 'relative'
632
641
  },
633
642
  /* Cell styles */
634
643
  [`& .${_gridClasses.gridClasses.cell}`]: {
@@ -873,38 +882,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
873
882
  display: 'none'
874
883
  }
875
884
  },
876
- [`& .${_gridClasses.gridClasses['row--dropAbove']}`]: {
877
- position: 'relative',
878
- '&::before': {
879
- pointerEvents: 'none',
880
- content: '""',
881
- position: 'absolute',
882
- top: 0,
883
- left: 0,
884
- width: '100%',
885
- height: '2px',
886
- backgroundColor: _cssVariables.vars.colors.interactive.selected
887
- }
888
- },
889
- [`& .${_gridClasses.gridClasses['row--dropBelow']}`]: {
890
- position: 'relative',
891
- '&::after': {
892
- zIndex: 100,
893
- pointerEvents: 'none',
894
- content: '""',
895
- position: 'absolute',
896
- bottom: '-2px',
897
- left: 0,
898
- width: '100%',
899
- height: '2px',
900
- backgroundColor: _cssVariables.vars.colors.interactive.selected
901
- },
902
- [`&.${_gridClasses.gridClasses['row--lastVisible']}`]: {
903
- '&::after': {
904
- bottom: 'calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)'
905
- }
906
- }
907
- },
908
885
  [`& .${_gridClasses.gridClasses['row--beingDragged']}`]: {
909
886
  color: _cssVariables.vars.colors.foreground.disabled,
910
887
  '&:hover': {
@@ -572,14 +572,6 @@ export interface GridClasses {
572
572
  * Styles applied to the floating special row reorder cell element when it is dragged.
573
573
  */
574
574
  'row--dragging': string;
575
- /**
576
- * Styles applied to the row element when it is a drop target above.
577
- */
578
- 'row--dropAbove': string;
579
- /**
580
- * Styles applied to the row element when it is a drop target below.
581
- */
582
- 'row--dropBelow': string;
583
575
  /**
584
576
  * Styles applied to the row element when it is being dragged (entire row).
585
577
  */
@@ -13,4 +13,4 @@ function getDataGridUtilityClass(slot) {
13
13
  }
14
14
  const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
15
15
  // TODO v9: Rename to `cell--dragging`
16
- 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
16
+ 'row--dragging', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
@@ -26,6 +26,7 @@ import { gridSortModelSelector } from "../hooks/features/sorting/gridSortingSele
26
26
  import { gridRowNodeSelector } from "../hooks/features/rows/gridRowsSelector.js";
27
27
  import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "../hooks/features/editing/gridEditingSelectors.js";
28
28
  import { gridIsRowDragActiveSelector } from "../hooks/features/rowReorder/gridRowReorderSelector.js";
29
+ import { GridRowDragAndDropOverlay } from "./GridRowDragAndDropOverlay.js";
29
30
  import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
30
31
  import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
31
32
  import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
@@ -308,7 +309,9 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
308
309
  }), cells, /*#__PURE__*/_jsx("div", {
309
310
  role: "presentation",
310
311
  className: clsx(gridClasses.cell, gridClasses.cellEmpty)
311
- }), rightCells]
312
+ }), rightCells, /*#__PURE__*/_jsx(GridRowDragAndDropOverlay, {
313
+ rowId: rowId
314
+ })]
312
315
  }));
313
316
  });
314
317
  if (process.env.NODE_ENV !== "production") GridRow.displayName = "GridRow";
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import type { GridRowId } from "../models/gridRows.js";
3
+ export interface GridRowDragAndDropOverlayProps {
4
+ rowId: GridRowId;
5
+ className?: string;
6
+ }
7
+ export declare const GridRowDragAndDropOverlay: React.NamedExoticComponent<GridRowDragAndDropOverlayProps>;
@@ -0,0 +1,66 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import * as React from 'react';
5
+ import { styled, alpha } from '@mui/material/styles';
6
+ import { shouldForwardProp } from '@mui/system/createStyled';
7
+ import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
8
+ import { useGridSelector } from "../hooks/utils/useGridSelector.js";
9
+ import { gridRowDropPositionSelector } from "../hooks/features/rowReorder/gridRowReorderSelector.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ const GridRowDragAndDropOverlayRoot = styled('div', {
12
+ name: 'MuiDataGrid',
13
+ slot: 'RowDragOverlay',
14
+ shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'action'
15
+ })(({
16
+ theme,
17
+ action
18
+ }) => _extends({
19
+ position: 'absolute',
20
+ left: 0,
21
+ right: 0,
22
+ top: 0,
23
+ bottom: 0,
24
+ pointerEvents: 'none',
25
+ zIndex: 1
26
+ }, action === 'above' && {
27
+ '&::before': {
28
+ pointerEvents: 'none',
29
+ content: '""',
30
+ position: 'absolute',
31
+ top: 0,
32
+ left: 0,
33
+ right: 0,
34
+ height: '2px',
35
+ backgroundColor: (theme.vars || theme).palette.primary.main
36
+ }
37
+ }, action === 'below' && {
38
+ '&::after': {
39
+ pointerEvents: 'none',
40
+ content: '""',
41
+ position: 'absolute',
42
+ bottom: '-2px',
43
+ left: 0,
44
+ right: 0,
45
+ height: '2px',
46
+ backgroundColor: (theme.vars || theme).palette.primary.main
47
+ }
48
+ }, action === 'inside' && {
49
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / 0.1)` : alpha(theme.palette.primary.main, 0.1)
50
+ }));
51
+ export const GridRowDragAndDropOverlay = /*#__PURE__*/React.memo(function GridRowDragAndDropOverlay(props) {
52
+ const {
53
+ rowId,
54
+ className
55
+ } = props;
56
+ const apiRef = useGridPrivateApiContext();
57
+ const dropPosition = useGridSelector(apiRef, gridRowDropPositionSelector, rowId);
58
+ if (!dropPosition) {
59
+ return null;
60
+ }
61
+ return /*#__PURE__*/_jsx(GridRowDragAndDropOverlayRoot, {
62
+ action: dropPosition,
63
+ className: className
64
+ });
65
+ });
66
+ if (process.env.NODE_ENV !== "production") GridRowDragAndDropOverlay.displayName = "GridRowDragAndDropOverlay";
@@ -233,10 +233,6 @@ export const GridRootStyles = styled('div', {
233
233
  [`& .${c.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
234
234
  }, {
235
235
  [`& .${c.withBorderColor}`]: styles.withBorderColor
236
- }, {
237
- [`& .${c['row--dropAbove']}`]: styles['row--dropAbove']
238
- }, {
239
- [`& .${c['row--dropBelow']}`]: styles['row--dropBelow']
240
236
  }, {
241
237
  [`& .${c['row--beingDragged']}`]: styles['row--beingDragged']
242
238
  }]
@@ -414,6 +410,9 @@ export const GridRootStyles = styled('div', {
414
410
  alignItems: 'center',
415
411
  backgroundColor: headerBackground
416
412
  },
413
+ [`& .${c.columnHeader} .${c.sortButton}`]: {
414
+ backgroundColor: vars.header.background.base
415
+ },
417
416
  [`& .${c['columnHeader--filter']}`]: {
418
417
  paddingTop: 8,
419
418
  paddingBottom: 8,
@@ -513,7 +512,16 @@ export const GridRootStyles = styled('div', {
513
512
  [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortButton},
514
513
  & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}):hover .${c.sortButton},
515
514
  & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}:focus-visible`]: {
516
- opacity: 0.5
515
+ opacity: 1
516
+ },
517
+ // Add opacity only to the button content to avoid affecting the background color
518
+ [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortButton} > *,
519
+ & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}):hover .${c.sortButton} > *,
520
+ & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}:focus-visible > *`]: {
521
+ opacity: 0.78
522
+ },
523
+ [`& .${c.pivotPanelFieldActionContainer} button:hover`]: {
524
+ backgroundColor: vars.colors.background.base
517
525
  }
518
526
  },
519
527
  '@media (hover: none)': {
@@ -528,7 +536,7 @@ export const GridRootStyles = styled('div', {
528
536
  }
529
537
  },
530
538
  [`& .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}`]: {
531
- opacity: 0.5
539
+ opacity: 0.78
532
540
  }
533
541
  },
534
542
  // Hide the column separator when the column has border and it is not resizable
@@ -622,7 +630,8 @@ export const GridRootStyles = styled('div', {
622
630
  [`&.${c.rowSkeleton}:hover`]: {
623
631
  backgroundColor: 'transparent'
624
632
  },
625
- '&.Mui-selected': selectedStyles
633
+ '&.Mui-selected': selectedStyles,
634
+ position: 'relative'
626
635
  },
627
636
  /* Cell styles */
628
637
  [`& .${c.cell}`]: {
@@ -867,38 +876,6 @@ export const GridRootStyles = styled('div', {
867
876
  display: 'none'
868
877
  }
869
878
  },
870
- [`& .${c['row--dropAbove']}`]: {
871
- position: 'relative',
872
- '&::before': {
873
- pointerEvents: 'none',
874
- content: '""',
875
- position: 'absolute',
876
- top: 0,
877
- left: 0,
878
- width: '100%',
879
- height: '2px',
880
- backgroundColor: vars.colors.interactive.selected
881
- }
882
- },
883
- [`& .${c['row--dropBelow']}`]: {
884
- position: 'relative',
885
- '&::after': {
886
- zIndex: 100,
887
- pointerEvents: 'none',
888
- content: '""',
889
- position: 'absolute',
890
- bottom: '-2px',
891
- left: 0,
892
- width: '100%',
893
- height: '2px',
894
- backgroundColor: vars.colors.interactive.selected
895
- },
896
- [`&.${c['row--lastVisible']}`]: {
897
- '&::after': {
898
- bottom: 'calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)'
899
- }
900
- }
901
- },
902
879
  [`& .${c['row--beingDragged']}`]: {
903
880
  color: vars.colors.foreground.disabled,
904
881
  '&:hover': {
@@ -572,14 +572,6 @@ export interface GridClasses {
572
572
  * Styles applied to the floating special row reorder cell element when it is dragged.
573
573
  */
574
574
  'row--dragging': string;
575
- /**
576
- * Styles applied to the row element when it is a drop target above.
577
- */
578
- 'row--dropAbove': string;
579
- /**
580
- * Styles applied to the row element when it is a drop target below.
581
- */
582
- 'row--dropBelow': string;
583
575
  /**
584
576
  * Styles applied to the row element when it is being dragged (entire row).
585
577
  */
@@ -5,4 +5,4 @@ export function getDataGridUtilityClass(slot) {
5
5
  }
6
6
  export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
7
7
  // TODO v9: Rename to `cell--dragging`
8
- 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
8
+ 'row--dragging', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
@@ -8,6 +8,7 @@ import { GridHydrateRowsValue } from "../../features/rows/gridRowsInterfaces.js"
8
8
  import { GridPreferencePanelsValue } from "../../features/preferencesPanel/index.js";
9
9
  import { GridGetRowsParams, GridGetRowsResponse } from "../../../models/gridDataSource.js";
10
10
  import { HeightEntry } from "../../features/rows/gridRowsMetaInterfaces.js";
11
+ import type { RowReorderDropPosition } from "../../../models/api/gridRowApi.js";
11
12
  export type GridPipeProcessorGroup = keyof GridPipeProcessingLookup;
12
13
  export interface GridPipeProcessingLookup {
13
14
  columnMenu: {
@@ -97,12 +98,12 @@ export interface GridPipeProcessingLookup {
97
98
  * - For example before first row is `0` and after the last row is `rows.length`.
98
99
  * If the reorder is invalid, it returns `-1`.
99
100
  */
100
- getRowReorderTargetIndex: {
101
- value: number;
101
+ isRowReorderValid: {
102
+ value: boolean;
102
103
  context: {
103
104
  sourceRowId: GridRowId;
104
105
  targetRowId: GridRowId;
105
- dropPosition: 'above' | 'below';
106
+ dropPosition: RowReorderDropPosition;
106
107
  dragDirection: 'up' | 'down';
107
108
  };
108
109
  };
@@ -115,7 +115,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
115
115
  params: fetchParams,
116
116
  cause: originalError
117
117
  }));
118
- } else if (process.env.NODE_ENV !== 'production') {
118
+ } else {
119
119
  warnOnce(['MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
120
120
  }
121
121
  }
@@ -170,7 +170,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
170
170
  params,
171
171
  cause: errorThrown
172
172
  }));
173
- } else if (process.env.NODE_ENV !== 'production') {
173
+ } else {
174
174
  warnOnce(['MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
175
175
  }
176
176
  throw errorThrown; // Let the caller handle the error further
@@ -364,7 +364,7 @@ export const useGridCellEditing = (apiRef, props) => {
364
364
  });
365
365
  if (onProcessRowUpdateError) {
366
366
  onProcessRowUpdateError(errorThrown);
367
- } else if (process.env.NODE_ENV !== 'production') {
367
+ } else {
368
368
  warnOnce(['MUI X: A call to `processRowUpdate()` threw an error which was not handled because `onProcessRowUpdateError()` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError()` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
369
369
  }
370
370
  };
@@ -448,7 +448,7 @@ export const useGridRowEditing = (apiRef, props) => {
448
448
  }
449
449
  if (onProcessRowUpdateError) {
450
450
  onProcessRowUpdateError(errorThrown);
451
- } else if (process.env.NODE_ENV !== 'production') {
451
+ } else {
452
452
  warnOnce(['MUI X: A call to `processRowUpdate()` threw an error which was not handled because `onProcessRowUpdateError()` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError()` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
453
453
  }
454
454
  };
@@ -76,10 +76,8 @@ const serializeRow = ({
76
76
  });
77
77
  columns.forEach(column => {
78
78
  const cellParams = getCellParams(id, column.field);
79
- if (process.env.NODE_ENV !== 'production') {
80
- if (String(cellParams.formattedValue) === '[object Object]') {
81
- warnOnce(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
82
- }
79
+ if (String(cellParams.formattedValue) === '[object Object]') {
80
+ warnOnce(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
83
81
  }
84
82
  row.addValue(serializeCellValue(cellParams, {
85
83
  ignoreValueFormatter,