@mui/x-data-grid-pro 7.14.0 → 7.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 CHANGED
@@ -3,6 +3,75 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.15.0
7
+
8
+ _Aug 29, 2024_
9
+
10
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 Support Material UI v6 (`@mui/material@6`) peer dependency (#14142) @cherniavskii
13
+
14
+ You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
15
+
16
+ - 🐞 Bugfixes
17
+
18
+ ### Data Grid
19
+
20
+ #### `@mui/x-data-grid-pro@7.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
21
+
22
+ - [DataGridPro] Export `GridRowReorderCell` component (#14079) @genepaul
23
+
24
+ #### `@mui/x-data-grid-premium@7.15.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
25
+
26
+ Same changes as in `@mui/x-data-grid-pro@7.15.0`.
27
+
28
+ ### Date and Time Pickers
29
+
30
+ #### `@mui/x-date-pickers@7.15.0`
31
+
32
+ - [pickers] Add `onTouchStart` handler for `TimeClock` (#14305) @arthurbalduini
33
+
34
+ #### `@mui/x-date-pickers-pro@7.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
35
+
36
+ Same changes as in `@mui/x-date-pickers@7.15.0`, plus:
37
+
38
+ - [DateTimeRangePicker] Fix date format resolving from views on 24hr locales (#14341) @arthurbalduini
39
+
40
+ ### Charts
41
+
42
+ #### `@mui/x-charts@7.15.0`
43
+
44
+ - [charts] Add missing `themeAugmentation` in pro plan (#14313) @lhilgert9
45
+ - [charts] Fix `LineChart` transition stopping before completion (#14366) @JCQuintas
46
+ - [charts] Fix tooltip with horizontal layout (#14337) @alexfauquette
47
+ - [charts] Keep axis root classe usage explicit (#14378) @alexfauquette
48
+
49
+ #### `@mui/x-charts-pro@7.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-charts@7.15.0`, plus:
52
+
53
+ - [charts pro] Avoid relative reference to `@mui/x-charts` package (#14335) @LukasTy
54
+
55
+ ### Docs
56
+
57
+ - [docs] Fix sentence case `h2` @oliviertassinari
58
+ - [docs] Clarify contribution guide references @oliviertassinari
59
+ - [docs] Fix Stack Overflow issue canned response @oliviertassinari
60
+ - [docs] Fix outdated link to support page @oliviertassinari
61
+ - [docs] Fix use of Material UI @oliviertassinari
62
+ - [docs] Update deprecated props in docs (#14295) @JCQuintas
63
+
64
+ ### Core
65
+
66
+ - [core] Allow only v5.x for `MUI Core` renovate group (#14382) @LukasTy
67
+ - [core] Avoid visual regression when using `@mui/material@6` (#14357) @cherniavskii
68
+ - [core] Remove renovate rule targeting only `next` releases of `@mui/docs` (#14364) @LukasTy
69
+ - [core] Support `@mui/material@6` peer dependency (#14142) @cherniavskii
70
+ - [core] Use `useRtl` instead of `useTheme` to access direction (#14359) @LukasTy
71
+ - [code-infra] Typecheck nested folders in playground (#14352) @JCQuintas
72
+ - [infra] Fix Issue cleanup action @oliviertassinari
73
+ - [license] Prepare renaming of argument names @oliviertassinari
74
+
6
75
  ## 7.14.0
7
76
 
8
77
  _Aug 23, 2024_
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.GridColumnMenuPinningItem = GridColumnMenuPinningItem;
8
8
  var React = _interopRequireWildcard(require("react"));
9
- var _styles = require("@mui/material/styles");
9
+ var _RtlProvider = require("@mui/system/RtlProvider");
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
12
12
  var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
@@ -24,7 +24,7 @@ function GridColumnMenuPinningItem(props) {
24
24
  } = props;
25
25
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
26
26
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
27
- const theme = (0, _styles.useTheme)();
27
+ const isRtl = (0, _RtlProvider.useRtl)();
28
28
  const pinColumn = React.useCallback(side => event => {
29
29
  apiRef.current.pinColumn(colDef.field, side);
30
30
  onClick(event);
@@ -79,7 +79,7 @@ function GridColumnMenuPinningItem(props) {
79
79
  })]
80
80
  });
81
81
  }
82
- if (theme.direction === 'rtl') {
82
+ if (isRtl) {
83
83
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
84
84
  children: [pinToRightMenuItem, pinToLeftMenuItem]
85
85
  });
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { GridRenderCellParams } from '@mui/x-data-grid';
3
3
  declare function GridRowReorderCell(params: GridRenderCellParams): React.JSX.Element | null;
4
+ declare namespace GridRowReorderCell {
5
+ var propTypes: any;
6
+ }
4
7
  export { GridRowReorderCell };
5
8
  export declare const renderRowReorderCell: (params: GridRenderCellParams) => React.JSX.Element | null;
@@ -8,6 +8,7 @@ exports.GridRowReorderCell = GridRowReorderCell;
8
8
  exports.renderRowReorderCell = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
12
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
12
13
  var _xDataGrid = require("@mui/x-data-grid");
13
14
  var _internals = require("@mui/x-data-grid/internals");
@@ -75,6 +76,71 @@ function GridRowReorderCell(params) {
75
76
  })]
76
77
  }));
77
78
  }
79
+ process.env.NODE_ENV !== "production" ? GridRowReorderCell.propTypes = {
80
+ // ----------------------------- Warning --------------------------------
81
+ // | These PropTypes are generated from the TypeScript type definitions |
82
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
83
+ // ----------------------------------------------------------------------
84
+ /**
85
+ * GridApi that let you manipulate the grid.
86
+ */
87
+ api: _propTypes.default.object.isRequired,
88
+ /**
89
+ * The mode of the cell.
90
+ */
91
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
92
+ /**
93
+ * The column of the row that the current cell belongs to.
94
+ */
95
+ colDef: _propTypes.default.object.isRequired,
96
+ /**
97
+ * The column field of the cell that triggered the event.
98
+ */
99
+ field: _propTypes.default.string.isRequired,
100
+ /**
101
+ * A ref allowing to set imperative focus.
102
+ * It can be passed to the element that should receive focus.
103
+ * @ignore - do not document.
104
+ */
105
+ focusElementRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
106
+ current: _propTypes.default.shape({
107
+ focus: _propTypes.default.func.isRequired
108
+ })
109
+ })]),
110
+ /**
111
+ * The cell value formatted with the column valueFormatter.
112
+ */
113
+ formattedValue: _propTypes.default.any,
114
+ /**
115
+ * If true, the cell is the active element.
116
+ */
117
+ hasFocus: _propTypes.default.bool.isRequired,
118
+ /**
119
+ * The grid row id.
120
+ */
121
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
122
+ /**
123
+ * If true, the cell is editable.
124
+ */
125
+ isEditable: _propTypes.default.bool,
126
+ /**
127
+ * The row model of the row that the current cell belongs to.
128
+ */
129
+ row: _propTypes.default.any.isRequired,
130
+ /**
131
+ * The node of the row that the current cell belongs to.
132
+ */
133
+ rowNode: _propTypes.default.object.isRequired,
134
+ /**
135
+ * the tabIndex value.
136
+ */
137
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
138
+ /**
139
+ * The cell value.
140
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
141
+ */
142
+ value: _propTypes.default.any
143
+ } : void 0;
78
144
  const renderRowReorderCell = params => {
79
145
  if (params.rowNode.type === 'footer' || params.rowNode.type === 'pinnedRow') {
80
146
  return null;
@@ -1,5 +1,6 @@
1
1
  export * from './GridTreeDataGroupingCell';
2
2
  export * from './GridColumnMenuPinningItem';
3
3
  export * from './GridDetailPanelToggleCell';
4
+ export * from './GridRowReorderCell';
4
5
  export * from '../material/icons';
5
6
  export * from './headerFiltering';
@@ -36,6 +36,17 @@ Object.keys(_GridDetailPanelToggleCell).forEach(function (key) {
36
36
  }
37
37
  });
38
38
  });
39
+ var _GridRowReorderCell = require("./GridRowReorderCell");
40
+ Object.keys(_GridRowReorderCell).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _GridRowReorderCell[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _GridRowReorderCell[key];
47
+ }
48
+ });
49
+ });
39
50
  var _icons = require("../material/icons");
40
51
  Object.keys(_icons).forEach(function (key) {
41
52
  if (key === "default" || key === "__esModule") return;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { useTheme } from '@mui/material/styles';
2
+ import { useRtl } from '@mui/system/RtlProvider';
3
3
  import PropTypes from 'prop-types';
4
4
  import MenuItem from '@mui/material/MenuItem';
5
5
  import ListItemIcon from '@mui/material/ListItemIcon';
@@ -15,7 +15,7 @@ function GridColumnMenuPinningItem(props) {
15
15
  } = props;
16
16
  const apiRef = useGridApiContext();
17
17
  const rootProps = useGridRootProps();
18
- const theme = useTheme();
18
+ const isRtl = useRtl();
19
19
  const pinColumn = React.useCallback(side => event => {
20
20
  apiRef.current.pinColumn(colDef.field, side);
21
21
  onClick(event);
@@ -70,7 +70,7 @@ function GridColumnMenuPinningItem(props) {
70
70
  })]
71
71
  });
72
72
  }
73
- if (theme.direction === 'rtl') {
73
+ if (isRtl) {
74
74
  return /*#__PURE__*/_jsxs(React.Fragment, {
75
75
  children: [pinToRightMenuItem, pinToLeftMenuItem]
76
76
  });
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import PropTypes from 'prop-types';
3
4
  import composeClasses from '@mui/utils/composeClasses';
4
5
  import { gridRowMaximumTreeDepthSelector, gridSortModelSelector, useGridApiContext, useGridSelector, getDataGridUtilityClass } from '@mui/x-data-grid';
5
6
  import { gridEditRowsStateSelector, isEventTargetInPortal } from '@mui/x-data-grid/internals';
@@ -65,6 +66,71 @@ function GridRowReorderCell(params) {
65
66
  })]
66
67
  }));
67
68
  }
69
+ process.env.NODE_ENV !== "production" ? GridRowReorderCell.propTypes = {
70
+ // ----------------------------- Warning --------------------------------
71
+ // | These PropTypes are generated from the TypeScript type definitions |
72
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
73
+ // ----------------------------------------------------------------------
74
+ /**
75
+ * GridApi that let you manipulate the grid.
76
+ */
77
+ api: PropTypes.object.isRequired,
78
+ /**
79
+ * The mode of the cell.
80
+ */
81
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
82
+ /**
83
+ * The column of the row that the current cell belongs to.
84
+ */
85
+ colDef: PropTypes.object.isRequired,
86
+ /**
87
+ * The column field of the cell that triggered the event.
88
+ */
89
+ field: PropTypes.string.isRequired,
90
+ /**
91
+ * A ref allowing to set imperative focus.
92
+ * It can be passed to the element that should receive focus.
93
+ * @ignore - do not document.
94
+ */
95
+ focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
96
+ current: PropTypes.shape({
97
+ focus: PropTypes.func.isRequired
98
+ })
99
+ })]),
100
+ /**
101
+ * The cell value formatted with the column valueFormatter.
102
+ */
103
+ formattedValue: PropTypes.any,
104
+ /**
105
+ * If true, the cell is the active element.
106
+ */
107
+ hasFocus: PropTypes.bool.isRequired,
108
+ /**
109
+ * The grid row id.
110
+ */
111
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
112
+ /**
113
+ * If true, the cell is editable.
114
+ */
115
+ isEditable: PropTypes.bool,
116
+ /**
117
+ * The row model of the row that the current cell belongs to.
118
+ */
119
+ row: PropTypes.any.isRequired,
120
+ /**
121
+ * The node of the row that the current cell belongs to.
122
+ */
123
+ rowNode: PropTypes.object.isRequired,
124
+ /**
125
+ * the tabIndex value.
126
+ */
127
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
128
+ /**
129
+ * The cell value.
130
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
131
+ */
132
+ value: PropTypes.any
133
+ } : void 0;
68
134
  export { GridRowReorderCell };
69
135
  export const renderRowReorderCell = params => {
70
136
  if (params.rowNode.type === 'footer' || params.rowNode.type === 'pinnedRow') {
@@ -2,5 +2,6 @@
2
2
  export * from './GridTreeDataGroupingCell';
3
3
  export * from './GridColumnMenuPinningItem';
4
4
  export * from './GridDetailPanelToggleCell';
5
+ export * from './GridRowReorderCell';
5
6
  export * from '../material/icons';
6
7
  export * from './headerFiltering';
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import composeClasses from '@mui/utils/composeClasses';
4
- import { useTheme } from '@mui/material/styles';
4
+ import { useRtl } from '@mui/system/RtlProvider';
5
5
  import { useGridApiEventHandler, getDataGridUtilityClass, useGridLogger, useGridApiOptionHandler } from '@mui/x-data-grid';
6
6
  import { gridColumnReorderDragColSelector } from './columnReorderSelector';
7
7
  const CURSOR_MOVE_DIRECTION_LEFT = 'left';
@@ -42,7 +42,7 @@ export const useGridColumnReorder = (apiRef, props) => {
42
42
  classes: props.classes
43
43
  };
44
44
  const classes = useUtilityClasses(ownerState);
45
- const theme = useTheme();
45
+ const isRtl = useRtl();
46
46
  React.useEffect(() => {
47
47
  return () => {
48
48
  clearTimeout(removeDnDStylesTimeout.current);
@@ -152,8 +152,8 @@ export const useGridColumnReorder = (apiRef, props) => {
152
152
  const visibleColumns = apiRef.current.getVisibleColumns();
153
153
  const allColumns = apiRef.current.getAllColumns();
154
154
  const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
155
- const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
156
- const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
155
+ const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (isRtl ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
156
+ const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (isRtl ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
157
157
  if (hasMovedLeft || hasMovedRight) {
158
158
  let canBeReordered;
159
159
  let indexOffsetInHiddenColumns = 0;
@@ -194,7 +194,7 @@ export const useGridColumnReorder = (apiRef, props) => {
194
194
  }
195
195
  cursorPosition.current = coordinates;
196
196
  }
197
- }, [apiRef, logger, theme.direction]);
197
+ }, [apiRef, logger, isRtl]);
198
198
  const handleDragEnd = React.useCallback((params, event) => {
199
199
  const dragColField = gridColumnReorderDragColSelector(apiRef);
200
200
  if (props.disableColumnReorder || !dragColField) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
3
+ const releaseInfo = "MTcyNDg4MjQwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -8,7 +8,7 @@ exports.useGridColumnReorder = exports.columnReorderStateInitializer = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
11
- var _styles = require("@mui/material/styles");
11
+ var _RtlProvider = require("@mui/system/RtlProvider");
12
12
  var _xDataGrid = require("@mui/x-data-grid");
13
13
  var _columnReorderSelector = require("./columnReorderSelector");
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -52,7 +52,7 @@ const useGridColumnReorder = (apiRef, props) => {
52
52
  classes: props.classes
53
53
  };
54
54
  const classes = useUtilityClasses(ownerState);
55
- const theme = (0, _styles.useTheme)();
55
+ const isRtl = (0, _RtlProvider.useRtl)();
56
56
  React.useEffect(() => {
57
57
  return () => {
58
58
  clearTimeout(removeDnDStylesTimeout.current);
@@ -162,8 +162,8 @@ const useGridColumnReorder = (apiRef, props) => {
162
162
  const visibleColumns = apiRef.current.getVisibleColumns();
163
163
  const allColumns = apiRef.current.getAllColumns();
164
164
  const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
165
- const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
166
- const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
165
+ const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (isRtl ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
166
+ const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (isRtl ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
167
167
  if (hasMovedLeft || hasMovedRight) {
168
168
  let canBeReordered;
169
169
  let indexOffsetInHiddenColumns = 0;
@@ -204,7 +204,7 @@ const useGridColumnReorder = (apiRef, props) => {
204
204
  }
205
205
  cursorPosition.current = coordinates;
206
206
  }
207
- }, [apiRef, logger, theme.direction]);
207
+ }, [apiRef, logger, isRtl]);
208
208
  const handleDragEnd = React.useCallback((params, event) => {
209
209
  const dragColField = (0, _columnReorderSelector.gridColumnReorderDragColSelector)(apiRef);
210
210
  if (props.disableColumnReorder || !dragColField) {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.14.0
2
+ * @mui/x-data-grid-pro v7.15.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { useTheme } from '@mui/material/styles';
2
+ import { useRtl } from '@mui/system/RtlProvider';
3
3
  import PropTypes from 'prop-types';
4
4
  import MenuItem from '@mui/material/MenuItem';
5
5
  import ListItemIcon from '@mui/material/ListItemIcon';
@@ -15,7 +15,7 @@ function GridColumnMenuPinningItem(props) {
15
15
  } = props;
16
16
  const apiRef = useGridApiContext();
17
17
  const rootProps = useGridRootProps();
18
- const theme = useTheme();
18
+ const isRtl = useRtl();
19
19
  const pinColumn = React.useCallback(side => event => {
20
20
  apiRef.current.pinColumn(colDef.field, side);
21
21
  onClick(event);
@@ -70,7 +70,7 @@ function GridColumnMenuPinningItem(props) {
70
70
  })]
71
71
  });
72
72
  }
73
- if (theme.direction === 'rtl') {
73
+ if (isRtl) {
74
74
  return /*#__PURE__*/_jsxs(React.Fragment, {
75
75
  children: [pinToRightMenuItem, pinToLeftMenuItem]
76
76
  });
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import PropTypes from 'prop-types';
3
4
  import composeClasses from '@mui/utils/composeClasses';
4
5
  import { gridRowMaximumTreeDepthSelector, gridSortModelSelector, useGridApiContext, useGridSelector, getDataGridUtilityClass } from '@mui/x-data-grid';
5
6
  import { gridEditRowsStateSelector, isEventTargetInPortal } from '@mui/x-data-grid/internals';
@@ -65,6 +66,71 @@ function GridRowReorderCell(params) {
65
66
  })]
66
67
  }));
67
68
  }
69
+ process.env.NODE_ENV !== "production" ? GridRowReorderCell.propTypes = {
70
+ // ----------------------------- Warning --------------------------------
71
+ // | These PropTypes are generated from the TypeScript type definitions |
72
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
73
+ // ----------------------------------------------------------------------
74
+ /**
75
+ * GridApi that let you manipulate the grid.
76
+ */
77
+ api: PropTypes.object.isRequired,
78
+ /**
79
+ * The mode of the cell.
80
+ */
81
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
82
+ /**
83
+ * The column of the row that the current cell belongs to.
84
+ */
85
+ colDef: PropTypes.object.isRequired,
86
+ /**
87
+ * The column field of the cell that triggered the event.
88
+ */
89
+ field: PropTypes.string.isRequired,
90
+ /**
91
+ * A ref allowing to set imperative focus.
92
+ * It can be passed to the element that should receive focus.
93
+ * @ignore - do not document.
94
+ */
95
+ focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
96
+ current: PropTypes.shape({
97
+ focus: PropTypes.func.isRequired
98
+ })
99
+ })]),
100
+ /**
101
+ * The cell value formatted with the column valueFormatter.
102
+ */
103
+ formattedValue: PropTypes.any,
104
+ /**
105
+ * If true, the cell is the active element.
106
+ */
107
+ hasFocus: PropTypes.bool.isRequired,
108
+ /**
109
+ * The grid row id.
110
+ */
111
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
112
+ /**
113
+ * If true, the cell is editable.
114
+ */
115
+ isEditable: PropTypes.bool,
116
+ /**
117
+ * The row model of the row that the current cell belongs to.
118
+ */
119
+ row: PropTypes.any.isRequired,
120
+ /**
121
+ * The node of the row that the current cell belongs to.
122
+ */
123
+ rowNode: PropTypes.object.isRequired,
124
+ /**
125
+ * the tabIndex value.
126
+ */
127
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
128
+ /**
129
+ * The cell value.
130
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
131
+ */
132
+ value: PropTypes.any
133
+ } : void 0;
68
134
  export { GridRowReorderCell };
69
135
  export const renderRowReorderCell = params => {
70
136
  if (params.rowNode.type === 'footer' || params.rowNode.type === 'pinnedRow') {
@@ -2,5 +2,6 @@
2
2
  export * from './GridTreeDataGroupingCell';
3
3
  export * from './GridColumnMenuPinningItem';
4
4
  export * from './GridDetailPanelToggleCell';
5
+ export * from './GridRowReorderCell';
5
6
  export * from '../material/icons';
6
7
  export * from './headerFiltering';
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import composeClasses from '@mui/utils/composeClasses';
4
- import { useTheme } from '@mui/material/styles';
4
+ import { useRtl } from '@mui/system/RtlProvider';
5
5
  import { useGridApiEventHandler, getDataGridUtilityClass, useGridLogger, useGridApiOptionHandler } from '@mui/x-data-grid';
6
6
  import { gridColumnReorderDragColSelector } from './columnReorderSelector';
7
7
  const CURSOR_MOVE_DIRECTION_LEFT = 'left';
@@ -42,7 +42,7 @@ export const useGridColumnReorder = (apiRef, props) => {
42
42
  classes: props.classes
43
43
  };
44
44
  const classes = useUtilityClasses(ownerState);
45
- const theme = useTheme();
45
+ const isRtl = useRtl();
46
46
  React.useEffect(() => {
47
47
  return () => {
48
48
  clearTimeout(removeDnDStylesTimeout.current);
@@ -152,8 +152,8 @@ export const useGridColumnReorder = (apiRef, props) => {
152
152
  const visibleColumns = apiRef.current.getVisibleColumns();
153
153
  const allColumns = apiRef.current.getAllColumns();
154
154
  const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
155
- const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
156
- const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
155
+ const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (isRtl ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
156
+ const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (isRtl ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
157
157
  if (hasMovedLeft || hasMovedRight) {
158
158
  let canBeReordered;
159
159
  let indexOffsetInHiddenColumns = 0;
@@ -194,7 +194,7 @@ export const useGridColumnReorder = (apiRef, props) => {
194
194
  }
195
195
  cursorPosition.current = coordinates;
196
196
  }
197
- }, [apiRef, logger, theme.direction]);
197
+ }, [apiRef, logger, isRtl]);
198
198
  const handleDragEnd = React.useCallback((params, event) => {
199
199
  const dragColField = gridColumnReorderDragColSelector(apiRef);
200
200
  if (props.disableColumnReorder || !dragColField) {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.14.0
2
+ * @mui/x-data-grid-pro v7.15.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
3
+ const releaseInfo = "MTcyNDg4MjQwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "7.14.0",
3
+ "version": "7.15.0",
4
4
  "description": "The Pro plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -33,21 +33,21 @@
33
33
  "directory": "packages/x-data-grid-pro"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.25.0",
37
- "@mui/system": "^5.16.7",
36
+ "@babel/runtime": "^7.25.4",
38
37
  "@mui/utils": "^5.16.6",
39
38
  "@types/format-util": "^1.0.4",
40
39
  "clsx": "^2.1.1",
41
40
  "prop-types": "^15.8.1",
42
41
  "reselect": "^4.1.8",
43
- "@mui/x-data-grid": "7.14.0",
44
- "@mui/x-internals": "7.14.0",
45
- "@mui/x-license": "7.14.0"
42
+ "@mui/x-internals": "7.15.0",
43
+ "@mui/x-data-grid": "7.15.0",
44
+ "@mui/x-license": "7.15.0"
46
45
  },
47
46
  "peerDependencies": {
48
47
  "@emotion/react": "^11.9.0",
49
48
  "@emotion/styled": "^11.8.1",
50
- "@mui/material": "^5.15.14",
49
+ "@mui/material": "^5.15.14 || ^6.0.0",
50
+ "@mui/system": "^5.15.14 || ^6.0.0",
51
51
  "react": "^17.0.0 || ^18.0.0",
52
52
  "react-dom": "^17.0.0 || ^18.0.0"
53
53
  },
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
9
+ const releaseInfo = "MTcyNDg4MjQwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat