@mui/x-tree-view-pro 7.29.0 → 7.29.1

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,83 @@
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.29.1
7
+
8
+ _Apr 23, 2025_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+
14
+ Special thanks go out to the community contributors who have helped make this release possible:
15
+ @lhilgert9
16
+
17
+ Following are all team members who have contributed to this release:
18
+ @arminmeh, @cherniavskii, @flaviendelangle, @LukasTy, @romgrk.
19
+
20
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
21
+
22
+ ### Data Grid
23
+
24
+ #### `@mui/x-data-grid@7.29.1`
25
+
26
+ - [DataGrid] Prevent scrollbars from showing on top (#17410) @romgrk
27
+
28
+ #### `@mui/x-data-grid-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
29
+
30
+ Same changes as in `@mui/x-data-grid@7.29.1`, plus:
31
+
32
+ - [DataGridPro] Avoid proptypes warnings with header filters in React 17 (#17492) @cherniavskii
33
+ - [DataGridPro] Fix expandable rows detail content height updates (#17509) @arminmeh
34
+ - [DataGridPro] Fix row virtualization not working in list view (#17404) @cherniavskii
35
+ - [DataGridPro] Move locales re-export to allow proper tree shaking (#17438) @lhilgert9
36
+
37
+ #### `@mui/x-data-grid-premium@7.29.1` [![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@7.29.1`, plus:
40
+
41
+ - [DataGridPremium] Use `groupingValueGetter` for row grouping on the server (#17423) @cherniavskii
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@7.29.1`
46
+
47
+ Internal changes.
48
+
49
+ #### `@mui/x-date-pickers-pro@7.29.1` [![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-date-pickers@7.29.1`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@7.29.1`
56
+
57
+ Internal changes.
58
+
59
+ #### `@mui/x-charts-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
60
+
61
+ Same changes as in `@mui/x-charts@7.29.1`.
62
+
63
+ ### Tree View
64
+
65
+ #### `@mui/x-tree-view@7.29.1`
66
+
67
+ Internal changes.
68
+
69
+ #### `@mui/x-tree-view-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
70
+
71
+ Same changes as in `@mui/x-tree-view@7.29.1`, plus:
72
+
73
+ - [RichTreeViewPro] Fix drag and drop issue with label editing (#17415) @flaviendelangle
74
+
75
+ ### Docs
76
+
77
+ - [docs] Use MUI X v7 packages in CodeSandbox and StackBlitz (#17516) @cherniavskii
78
+
79
+ ### Core
80
+
81
+ - [core] Bump monorepo (#17437) @LukasTy
82
+
6
83
  ## 7.29.0
7
84
 
8
85
  _Apr 16, 2025_
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.29.0
2
+ * @mui/x-tree-view-pro v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -13,12 +13,15 @@ export const useTreeViewItemsReordering = ({
13
13
  if (!params.itemsReordering) {
14
14
  return false;
15
15
  }
16
+ if (state.editedItemId != null) {
17
+ return false;
18
+ }
16
19
  const isItemReorderable = params.isItemReorderable;
17
20
  if (isItemReorderable) {
18
21
  return isItemReorderable(itemId);
19
22
  }
20
23
  return true;
21
- }, [params.itemsReordering, params.isItemReorderable]);
24
+ }, [params.itemsReordering, params.isItemReorderable, state.editedItemId]);
22
25
  const getDroppingTargetValidActions = React.useCallback(itemId => {
23
26
  const itemsReordering = state.itemsReordering;
24
27
  if (!itemsReordering) {
@@ -81,14 +84,19 @@ export const useTreeViewItemsReordering = ({
81
84
  return validActions;
82
85
  }, [instance, state.itemsReordering, params.canMoveItemToNewPosition]);
83
86
  const startDraggingItem = React.useCallback(itemId => {
84
- setState(prevState => _extends({}, prevState, {
85
- itemsReordering: {
86
- targetItemId: itemId,
87
- draggedItemId: itemId,
88
- action: null,
89
- newPosition: null
87
+ setState(prevState => {
88
+ if (prevState.editedItemId != null) {
89
+ return prevState;
90
90
  }
91
- }));
91
+ return _extends({}, prevState, {
92
+ itemsReordering: {
93
+ targetItemId: itemId,
94
+ draggedItemId: itemId,
95
+ action: null,
96
+ newPosition: null
97
+ }
98
+ });
99
+ });
92
100
  }, [setState]);
93
101
  const stopDraggingItem = React.useCallback(itemId => {
94
102
  if (state.itemsReordering == null || state.itemsReordering.draggedItemId !== itemId) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { DefaultizedProps, TreeViewPluginSignature, UseTreeViewItemsSignature } from '@mui/x-tree-view/internals';
2
+ import { DefaultizedProps, TreeViewPluginSignature, UseTreeViewItemsSignature, UseTreeViewLabelSignature } from '@mui/x-tree-view/internals';
3
3
  import { TreeViewItemId, TreeViewItemsReorderingAction, TreeViewCancellableEventHandler } from '@mui/x-tree-view/models';
4
4
  import { TreeItem2DragAndDropOverlayProps } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay';
5
5
  export interface UseTreeViewItemsReorderingInstance {
@@ -116,6 +116,7 @@ export type UseTreeViewItemsReorderingSignature = TreeViewPluginSignature<{
116
116
  contextValue: UseTreeViewItemsReorderingContextValue;
117
117
  experimentalFeatures: 'itemsReordering';
118
118
  dependencies: [UseTreeViewItemsSignature];
119
+ optionalDependencies: [UseTreeViewLabelSignature];
119
120
  }>;
120
121
  export interface UseTreeItem2RootSlotPropsFromItemsReordering {
121
122
  draggable?: true;
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTc0NDc1NDQwMDAwMA==";
3
+ const releaseInfo = "MTc0NTM1OTIwMDAwMA==";
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/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.29.0
2
+ * @mui/x-tree-view-pro v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -13,12 +13,15 @@ export const useTreeViewItemsReordering = ({
13
13
  if (!params.itemsReordering) {
14
14
  return false;
15
15
  }
16
+ if (state.editedItemId != null) {
17
+ return false;
18
+ }
16
19
  const isItemReorderable = params.isItemReorderable;
17
20
  if (isItemReorderable) {
18
21
  return isItemReorderable(itemId);
19
22
  }
20
23
  return true;
21
- }, [params.itemsReordering, params.isItemReorderable]);
24
+ }, [params.itemsReordering, params.isItemReorderable, state.editedItemId]);
22
25
  const getDroppingTargetValidActions = React.useCallback(itemId => {
23
26
  const itemsReordering = state.itemsReordering;
24
27
  if (!itemsReordering) {
@@ -81,14 +84,19 @@ export const useTreeViewItemsReordering = ({
81
84
  return validActions;
82
85
  }, [instance, state.itemsReordering, params.canMoveItemToNewPosition]);
83
86
  const startDraggingItem = React.useCallback(itemId => {
84
- setState(prevState => _extends({}, prevState, {
85
- itemsReordering: {
86
- targetItemId: itemId,
87
- draggedItemId: itemId,
88
- action: null,
89
- newPosition: null
87
+ setState(prevState => {
88
+ if (prevState.editedItemId != null) {
89
+ return prevState;
90
90
  }
91
- }));
91
+ return _extends({}, prevState, {
92
+ itemsReordering: {
93
+ targetItemId: itemId,
94
+ draggedItemId: itemId,
95
+ action: null,
96
+ newPosition: null
97
+ }
98
+ });
99
+ });
92
100
  }, [setState]);
93
101
  const stopDraggingItem = React.useCallback(itemId => {
94
102
  if (state.itemsReordering == null || state.itemsReordering.draggedItemId !== itemId) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTc0NDc1NDQwMDAwMA==";
3
+ const releaseInfo = "MTc0NTM1OTIwMDAwMA==";
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/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.29.0
2
+ * @mui/x-tree-view-pro v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -21,12 +21,15 @@ const useTreeViewItemsReordering = ({
21
21
  if (!params.itemsReordering) {
22
22
  return false;
23
23
  }
24
+ if (state.editedItemId != null) {
25
+ return false;
26
+ }
24
27
  const isItemReorderable = params.isItemReorderable;
25
28
  if (isItemReorderable) {
26
29
  return isItemReorderable(itemId);
27
30
  }
28
31
  return true;
29
- }, [params.itemsReordering, params.isItemReorderable]);
32
+ }, [params.itemsReordering, params.isItemReorderable, state.editedItemId]);
30
33
  const getDroppingTargetValidActions = React.useCallback(itemId => {
31
34
  const itemsReordering = state.itemsReordering;
32
35
  if (!itemsReordering) {
@@ -89,14 +92,19 @@ const useTreeViewItemsReordering = ({
89
92
  return validActions;
90
93
  }, [instance, state.itemsReordering, params.canMoveItemToNewPosition]);
91
94
  const startDraggingItem = React.useCallback(itemId => {
92
- setState(prevState => (0, _extends2.default)({}, prevState, {
93
- itemsReordering: {
94
- targetItemId: itemId,
95
- draggedItemId: itemId,
96
- action: null,
97
- newPosition: null
95
+ setState(prevState => {
96
+ if (prevState.editedItemId != null) {
97
+ return prevState;
98
98
  }
99
- }));
99
+ return (0, _extends2.default)({}, prevState, {
100
+ itemsReordering: {
101
+ targetItemId: itemId,
102
+ draggedItemId: itemId,
103
+ action: null,
104
+ newPosition: null
105
+ }
106
+ });
107
+ });
100
108
  }, [setState]);
101
109
  const stopDraggingItem = React.useCallback(itemId => {
102
110
  if (state.itemsReordering == null || state.itemsReordering.draggedItemId !== itemId) {
@@ -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 = "MTc0NDc1NDQwMDAwMA==";
9
+ const releaseInfo = "MTc0NTM1OTIwMDAwMA==";
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-tree-view-pro",
3
- "version": "7.29.0",
3
+ "version": "7.29.1",
4
4
  "description": "The Pro plan edition of the Tree View components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -40,8 +40,8 @@
40
40
  "prop-types": "^15.8.1",
41
41
  "react-transition-group": "^4.4.5",
42
42
  "@mui/x-internals": "7.29.0",
43
- "@mui/x-license": "7.29.0",
44
- "@mui/x-tree-view": "7.29.0"
43
+ "@mui/x-license": "7.29.1",
44
+ "@mui/x-tree-view": "7.29.1"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@emotion/react": "^11.9.0",