@mui/x-codemod 7.21.0 → 8.0.0-alpha.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/README.md +125 -7
- package/package.json +7 -6
- package/v8.0.0/charts/preset-safe/index.js +14 -0
- package/v8.0.0/charts/rename-legend-to-slots-legend/index.js +52 -0
- package/v8.0.0/charts/rename-responsive-chart-container/index.js +35 -0
- package/v8.0.0/pickers/preset-safe/index.js +12 -0
- package/v8.0.0/pickers/rename-and-move-field-value-type/index.js +27 -0
- package/v8.0.0/preset-safe/index.js +14 -0
- package/v8.0.0/tree-view/preset-safe/index.js +14 -0
- package/v8.0.0/tree-view/rename-tree-item-2/index.js +91 -0
- package/v8.0.0/tree-view/rename-tree-view-simple-tree-view/index.js +13 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ This repository contains a collection of codemod scripts based for use with
|
|
|
13
13
|
<!-- #default-branch-switch -->
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npx @mui/x-codemod@
|
|
16
|
+
npx @mui/x-codemod@next <codemod> <paths...>
|
|
17
17
|
|
|
18
18
|
Applies a `@mui/x-codemod` to the specified paths
|
|
19
19
|
|
|
@@ -29,8 +29,8 @@ Options:
|
|
|
29
29
|
--jscodeshift Pass options directly to jscodeshift [array]
|
|
30
30
|
|
|
31
31
|
Examples:
|
|
32
|
-
npx @mui/x-codemod@
|
|
33
|
-
npx @mui/x-codemod@
|
|
32
|
+
npx @mui/x-codemod@next v7.0.0/preset-safe src
|
|
33
|
+
npx @mui/x-codemod@next v6.0.0/component-rename-prop src --
|
|
34
34
|
--component=DataGrid --from=prop --to=newProp
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -40,9 +40,9 @@ To pass more options directly to jscodeshift, use `--jscodeshift=...`. For examp
|
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
// single option
|
|
43
|
-
npx @mui/x-codemod@
|
|
43
|
+
npx @mui/x-codemod@next --jscodeshift=--run-in-band
|
|
44
44
|
// multiple options
|
|
45
|
-
npx @mui/x-codemod@
|
|
45
|
+
npx @mui/x-codemod@next --jscodeshift=--cpus=1 --jscodeshift=--print --jscodeshift=--dry --jscodeshift=--verbose=2
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
See all available options [here](https://github.com/facebook/jscodeshift#usage-cli).
|
|
@@ -53,9 +53,127 @@ Options to [recast](https://github.com/benjamn/recast)'s printer can be provided
|
|
|
53
53
|
through jscodeshift's `printOptions` command line argument
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx @mui/x-codemod@
|
|
56
|
+
npx @mui/x-codemod@next <transform> <path> --jscodeshift="--printOptions='{\"quote\":\"double\"}'"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## v8.0.0
|
|
60
|
+
|
|
61
|
+
### 🚀 `preset-safe` for v8.0.0
|
|
62
|
+
|
|
63
|
+
A combination of all important transformers for migrating v7 to v8.
|
|
64
|
+
⚠️ This codemod should be run only once.
|
|
65
|
+
It runs codemods for all MUI X packages (Data Grid, Date and Time Pickers, Tree View, and Charts).
|
|
66
|
+
To run codemods for a specific package, refer to the respective section.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx @mui/x-codemod@latest v8.0.0/preset-safe <path|folder>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The corresponding sub-sections are listed below
|
|
73
|
+
|
|
74
|
+
- [`preset-safe-for-tree-view`](#preset-safe-for-tree-view-v800)
|
|
75
|
+
- [`preset-safe-for-charts`](#preset-safe-for-charts-v800)
|
|
76
|
+
|
|
77
|
+
### Tree View codemods
|
|
78
|
+
|
|
79
|
+
#### `preset-safe` for tree view v8.0.0
|
|
80
|
+
|
|
81
|
+
The `preset-safe` codemods for tree view.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx @mui/x-codemod@latest v8.0.0/tree-view/preset-safe <path|folder>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The list includes these transformers
|
|
88
|
+
|
|
89
|
+
- [`rename-tree-view-simple-tree-view`](#rename-tree-view-simple-tree-view)
|
|
90
|
+
- [`rename-tree-item-2`](#rename-tree-item-2)
|
|
91
|
+
|
|
92
|
+
#### `rename-tree-view-simple-tree-view`
|
|
93
|
+
|
|
94
|
+
Renames the Tree View component to Simple Tree View
|
|
95
|
+
|
|
96
|
+
```diff
|
|
97
|
+
-import { TreeView } from '@mui/x-tree-view';
|
|
98
|
+
+import { SimpleTreeView } from '@mui/x-tree-view';
|
|
99
|
+
|
|
100
|
+
-import { TreeView } from '@mui/x-tree-view/TreeView';
|
|
101
|
+
+import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView';
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
- <TreeView>
|
|
105
|
+
+ <SimpleTreeView>
|
|
106
|
+
<TreeItem itemId="1" label="First item" />
|
|
107
|
+
- </TreeView>
|
|
108
|
+
+ </SimpleTreeView>
|
|
109
|
+
);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### `rename-tree-item-2`
|
|
113
|
+
|
|
114
|
+
Renames the `TreeItem2` component to `TreeItem` (same for any subcomponents or utils like `useTreeItem2` or `TreeItem2Icon`).
|
|
115
|
+
|
|
116
|
+
```diff
|
|
117
|
+
-import { TreeItem2 } from '@mui/x-tree-view';
|
|
118
|
+
+import { TreeItem } from '@mui/x-tree-view';
|
|
119
|
+
|
|
120
|
+
-import { TreeItem2 } from '@mui/x-tree-view/TreeItem2';
|
|
121
|
+
+import { TreeItem } from '@mui/x-tree-view/TreeItem';
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Charts codemods
|
|
125
|
+
|
|
126
|
+
#### `preset-safe` for charts v8.0.0
|
|
127
|
+
|
|
128
|
+
The `preset-safe` codemods for charts.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx @mui/x-codemod@latest v8.0.0/charts/preset-safe <path|folder>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The list includes these transformers
|
|
135
|
+
|
|
136
|
+
- [`rename-legend-to-slots-legend`](#rename-legend-to-slots-legend)
|
|
137
|
+
- [`rename-responsive-chart-container`](#rename-responsive-chart-container)
|
|
138
|
+
|
|
139
|
+
#### `rename-legend-to-slots-legend`
|
|
140
|
+
|
|
141
|
+
Renames legend props to the corresponding slotProps.
|
|
142
|
+
|
|
143
|
+
```diff
|
|
144
|
+
<LineChart
|
|
145
|
+
- legend={{ hiden: true}}
|
|
146
|
+
+ slotProps={{ legend: { hiden: true} }}
|
|
147
|
+
/>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### `rename-responsive-chart-container`
|
|
151
|
+
|
|
152
|
+
Renames `ResponsiveChartContainer` and `ResponsiveChartContainerPro` by `ChartContainer` and `ChartContainerPro` which have the same behavior in v8.
|
|
153
|
+
|
|
154
|
+
```diff
|
|
155
|
+
- import { ResponsiveChartContainer } from '@mui/x-charts/ResponsiveChartContainer';
|
|
156
|
+
+ import { ChartContainer } from '@mui/x-charts/ChartContainer';
|
|
157
|
+
|
|
158
|
+
- <ResponsiveChartContainer>
|
|
159
|
+
+ <ChartContainer>
|
|
160
|
+
<BarPlot />
|
|
161
|
+
- </ResponsiveChartContainer>
|
|
162
|
+
+ </ChartContainer>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
:::warning
|
|
166
|
+
If you imported both `ResponsiveChartContainer` and `ChartContainer` in the same file, you might end up with duplicated import.
|
|
167
|
+
Verify the git diff to remove the duplicate.
|
|
168
|
+
|
|
169
|
+
```diff
|
|
170
|
+
import { ChartContainer } from '@mui/x-charts/ChartContainer';
|
|
171
|
+
- import { ResponsiveChartContainer } from '@mui/x-charts/ResponsiveChartContainer';
|
|
172
|
+
+ import { ChartContainer } from '@mui/x-charts/ChartContainer';
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
:::
|
|
176
|
+
|
|
59
177
|
## v7.0.0
|
|
60
178
|
|
|
61
179
|
### 🚀 `preset-safe` for v7.0.0
|
|
@@ -237,7 +355,7 @@ npx @mui/x-codemod@latest v7.0.0/tree-view/preset-safe <path|folder>
|
|
|
237
355
|
|
|
238
356
|
The list includes these transformers
|
|
239
357
|
|
|
240
|
-
- [`rename-tree-view-simple-tree-view`](#rename-tree-view-simple-tree-view)
|
|
358
|
+
- [`rename-tree-view-simple-tree-view`](#rename-tree-view-simple-tree-view-1)
|
|
241
359
|
- [`rename-use-tree-item`](#rename-use-tree-item)
|
|
242
360
|
- [`rename-expansion-props`](#rename-expansion-props)
|
|
243
361
|
- [`rename-selection-props`](#rename-selection-props)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-codemod",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.1",
|
|
4
4
|
"bin": "./codemod.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "MUI Team",
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
"url": "https://opencollective.com/mui-org"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@babel/core": "^7.
|
|
29
|
-
"@babel/runtime": "^7.
|
|
30
|
-
"@babel/traverse": "^7.25.
|
|
31
|
-
"jscodeshift": "17.
|
|
32
|
-
"yargs": "^17.7.2"
|
|
28
|
+
"@babel/core": "^7.26.0",
|
|
29
|
+
"@babel/runtime": "^7.26.0",
|
|
30
|
+
"@babel/traverse": "^7.25.9",
|
|
31
|
+
"jscodeshift": "17.1.1",
|
|
32
|
+
"yargs": "^17.7.2",
|
|
33
|
+
"@mui/x-internals": "8.0.0-alpha.1"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@types/jscodeshift": "^0.12.0",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _renameLegendToSlotsLegend = _interopRequireDefault(require("../rename-legend-to-slots-legend"));
|
|
9
|
+
var _renameResponsiveChartContainer = _interopRequireDefault(require("../rename-responsive-chart-container"));
|
|
10
|
+
function transformer(file, api, options) {
|
|
11
|
+
file.source = (0, _renameLegendToSlotsLegend.default)(file, api, options);
|
|
12
|
+
file.source = (0, _renameResponsiveChartContainer.default)(file, api, options);
|
|
13
|
+
return file.source;
|
|
14
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = transformer;
|
|
7
|
+
var _addComponentsSlots = require("../../../util/addComponentsSlots");
|
|
8
|
+
/**
|
|
9
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
10
|
+
* @param {import('jscodeshift').API} api
|
|
11
|
+
*/
|
|
12
|
+
function transformer(file, api, options) {
|
|
13
|
+
const j = api.jscodeshift;
|
|
14
|
+
const printOptions = options.printOptions;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
root.find(j.ImportDeclaration).filter(({
|
|
17
|
+
node
|
|
18
|
+
}) => {
|
|
19
|
+
return typeof node.source.value === 'string' && node.source.value.startsWith('@mui/x-charts');
|
|
20
|
+
}).forEach(path => {
|
|
21
|
+
path.node.specifiers?.forEach(node => {
|
|
22
|
+
root.findJSXElements(node.local?.name).forEach(elementPath => {
|
|
23
|
+
if (elementPath.node.type !== 'JSXElement') {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const legendProps = elementPath.node.openingElement.attributes?.find(elementNode => elementNode.type === 'JSXAttribute' && elementNode.name.name === 'legend');
|
|
27
|
+
if (!legendProps) {
|
|
28
|
+
// No legend props to manage
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const slotProps = elementPath.node.openingElement.attributes?.find(elementNode => elementNode.type === 'JSXAttribute' && elementNode.name.name === 'slotProps');
|
|
32
|
+
if (slotProps === null) {
|
|
33
|
+
// We create a new slotProps object
|
|
34
|
+
elementPath.node.openingElement.attributes?.push(j.jsxAttribute(j.jsxIdentifier('slotProps'), j.jsxExpressionContainer(j.objectExpression([
|
|
35
|
+
// @ts-ignore legend receives an object.
|
|
36
|
+
j.objectProperty(j.identifier('legend'), legendProps.value.expression)]))));
|
|
37
|
+
} else {
|
|
38
|
+
(0, _addComponentsSlots.transformNestedProp)(elementPath, 'slotProps', 'legend',
|
|
39
|
+
// @ts-ignore legend receives an object.
|
|
40
|
+
legendProps.value.expression, j);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Remove the legend prop
|
|
44
|
+
j(elementPath).find(j.JSXAttribute).filter(a => a.value.name.name === 'legend').forEach(pathToRemove => {
|
|
45
|
+
j(pathToRemove).remove();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const transformed = root.findJSXElements();
|
|
51
|
+
return transformed.toSource(printOptions);
|
|
52
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = transformer;
|
|
7
|
+
var _renameImports = require("../../../util/renameImports");
|
|
8
|
+
function transformer(file, api, options) {
|
|
9
|
+
const j = api.jscodeshift;
|
|
10
|
+
const root = j(file.source);
|
|
11
|
+
const printOptions = options.printOptions || {
|
|
12
|
+
quote: 'single',
|
|
13
|
+
trailingComma: true,
|
|
14
|
+
wrapColumn: 40
|
|
15
|
+
};
|
|
16
|
+
(0, _renameImports.renameImports)({
|
|
17
|
+
j,
|
|
18
|
+
root,
|
|
19
|
+
packageNames: ['@mui/x-charts', '@mui/x-charts-pro'],
|
|
20
|
+
imports: [{
|
|
21
|
+
oldEndpoint: 'ResponsiveChartContainer',
|
|
22
|
+
newEndpoint: 'ChartContainer',
|
|
23
|
+
importsMapping: {
|
|
24
|
+
ResponsiveChartContainer: 'ChartContainer'
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
oldEndpoint: 'ResponsiveChartContainerPro',
|
|
28
|
+
newEndpoint: 'ChartContainerPro',
|
|
29
|
+
importsMapping: {
|
|
30
|
+
ResponsiveChartContainerPro: 'ChartContainerPro'
|
|
31
|
+
}
|
|
32
|
+
}]
|
|
33
|
+
});
|
|
34
|
+
return root.toSource(printOptions);
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _renameAndMoveFieldValueType = _interopRequireDefault(require("../rename-and-move-field-value-type"));
|
|
9
|
+
function transformer(file, api, options) {
|
|
10
|
+
file.source = (0, _renameAndMoveFieldValueType.default)(file, api, options);
|
|
11
|
+
return file.source;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = transformer;
|
|
7
|
+
var _renameImports = require("../../../util/renameImports");
|
|
8
|
+
function transformer(file, api, options) {
|
|
9
|
+
const j = api.jscodeshift;
|
|
10
|
+
const root = j(file.source);
|
|
11
|
+
const printOptions = options.printOptions || {
|
|
12
|
+
quote: 'single',
|
|
13
|
+
trailingComma: true
|
|
14
|
+
};
|
|
15
|
+
(0, _renameImports.renameImports)({
|
|
16
|
+
j,
|
|
17
|
+
root,
|
|
18
|
+
packageNames: ['@mui/x-date-pickers', '@mui/x-date-pickers-pro'],
|
|
19
|
+
imports: [{
|
|
20
|
+
oldEndpoint: 'models',
|
|
21
|
+
importsMapping: {
|
|
22
|
+
FieldValueType: 'PickerValueType'
|
|
23
|
+
}
|
|
24
|
+
}]
|
|
25
|
+
});
|
|
26
|
+
return root.toSource(printOptions);
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _presetSafe = _interopRequireDefault(require("../tree-view/preset-safe"));
|
|
9
|
+
var _presetSafe2 = _interopRequireDefault(require("../charts/preset-safe"));
|
|
10
|
+
function transformer(file, api, options) {
|
|
11
|
+
file.source = (0, _presetSafe.default)(file, api, options);
|
|
12
|
+
file.source = (0, _presetSafe2.default)(file, api, options);
|
|
13
|
+
return file.source;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _renameTreeViewSimpleTreeView = _interopRequireDefault(require("../rename-tree-view-simple-tree-view"));
|
|
9
|
+
var _renameTreeItem = _interopRequireDefault(require("../rename-tree-item-2"));
|
|
10
|
+
function transformer(file, api, options) {
|
|
11
|
+
file.source = (0, _renameTreeViewSimpleTreeView.default)(file, api, options);
|
|
12
|
+
file.source = (0, _renameTreeItem.default)(file, api, options);
|
|
13
|
+
return file.source;
|
|
14
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = transformer;
|
|
7
|
+
var _renameImports = require("../../../util/renameImports");
|
|
8
|
+
function transformer(file, api, options) {
|
|
9
|
+
const j = api.jscodeshift;
|
|
10
|
+
const root = j(file.source);
|
|
11
|
+
const printOptions = options.printOptions || {
|
|
12
|
+
quote: 'single',
|
|
13
|
+
trailingComma: true,
|
|
14
|
+
wrapColumn: 40
|
|
15
|
+
};
|
|
16
|
+
(0, _renameImports.renameImports)({
|
|
17
|
+
j,
|
|
18
|
+
root,
|
|
19
|
+
packageNames: ['@mui/x-tree-view', '@mui/x-tree-view-pro'],
|
|
20
|
+
imports: [{
|
|
21
|
+
oldEndpoint: 'TreeItem2',
|
|
22
|
+
newEndpoint: 'TreeItem',
|
|
23
|
+
importsMapping: {
|
|
24
|
+
TreeItem2: 'TreeItem',
|
|
25
|
+
TreeItem2Root: 'TreeItemRoot',
|
|
26
|
+
TreeItem2Content: 'TreeItemContent',
|
|
27
|
+
TreeItem2IconContainer: 'TreeItemIconContainer',
|
|
28
|
+
TreeItem2GroupTransition: 'TreeItemGroupTransition',
|
|
29
|
+
TreeItem2Checkbox: 'TreeItemCheckbox',
|
|
30
|
+
TreeItem2Label: 'TreeItemLabel',
|
|
31
|
+
TreeItem2Props: 'TreeItemProps',
|
|
32
|
+
TreeItem2Slots: 'TreeItemSlots',
|
|
33
|
+
TreeItem2SlotProps: 'TreeItemSlotProps'
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
oldEndpoint: 'useTreeItem2',
|
|
37
|
+
newEndpoint: 'useTreeItem',
|
|
38
|
+
importsMapping: {
|
|
39
|
+
useTreeItem2: 'useTreeItem',
|
|
40
|
+
unstable_useTreeItem2: 'useTreeItem',
|
|
41
|
+
UseTreeItem2Parameters: 'UseTreeItemParameters',
|
|
42
|
+
UseTreeItem2ReturnValue: 'UseTreeItemReturnValue',
|
|
43
|
+
UseTreeItem2Status: 'UseTreeItemStatus',
|
|
44
|
+
UseTreeItem2RootSlotOwnProps: 'UseTreeItemRootSlotOwnProps',
|
|
45
|
+
UseTreeItem2ContentSlotOwnProps: 'UseTreeItemContentSlotOwnProps',
|
|
46
|
+
UseTreeItem2LabelInputSlotOwnProps: 'UseTreeItemLabelInputSlotOwnProps',
|
|
47
|
+
UseTreeItem2LabelSlotOwnProps: 'UseTreeItemLabelSlotOwnProps',
|
|
48
|
+
UseTreeItem2CheckboxSlotOwnProps: 'UseTreeItemCheckboxSlotOwnProps',
|
|
49
|
+
UseTreeItem2IconContainerSlotOwnProps: 'UseTreeItemIconContainerSlotOwnProps',
|
|
50
|
+
UseTreeItem2GroupTransitionSlotOwnProps: 'UseTreeItemGroupTransitionSlotOwnProps',
|
|
51
|
+
UseTreeItem2DragAndDropOverlaySlotOwnProps: 'UseTreeItemDragAndDropOverlaySlotOwnProps'
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
oldEndpoint: 'TreeItem2Provider',
|
|
55
|
+
newEndpoint: 'TreeItemProvider',
|
|
56
|
+
importsMapping: {
|
|
57
|
+
TreeItem2Provider: 'TreeItemProvider',
|
|
58
|
+
TreeItem2ProviderProps: 'TreeItemProviderProps'
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
oldEndpoint: 'TreeItem2Icon',
|
|
62
|
+
newEndpoint: 'TreeItemIcon',
|
|
63
|
+
importsMapping: {
|
|
64
|
+
TreeItem2Icon: 'TreeItemIcon',
|
|
65
|
+
TreeItem2IconProps: 'TreeItemIconProps',
|
|
66
|
+
TreeItem2IconSlots: 'TreeItemIconSlots',
|
|
67
|
+
TreeItem2IconSlotProps: 'TreeItemIconSlotProps'
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
oldEndpoint: 'TreeItem2DragAndDropOverlay',
|
|
71
|
+
newEndpoint: 'TreeItemDragAndDropOverlay',
|
|
72
|
+
importsMapping: {
|
|
73
|
+
TreeItem2DragAndDropOverlay: 'TreeItemDragAndDropOverlay',
|
|
74
|
+
TreeItem2DragAndDropOverlayProps: 'TreeItemDragAndDropOverlayProps'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
oldEndpoint: 'TreeItem2LabelInput',
|
|
78
|
+
newEndpoint: 'TreeItemLabelInput',
|
|
79
|
+
importsMapping: {
|
|
80
|
+
TreeItem2LabelInput: 'TreeItemLabelInput',
|
|
81
|
+
TreeItem2LabelInputProps: 'TreeItemLabelInputProps'
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
oldEndpoint: 'hooks',
|
|
85
|
+
importsMapping: {
|
|
86
|
+
useTreeItem2Utils: 'useTreeItemUtils'
|
|
87
|
+
}
|
|
88
|
+
}]
|
|
89
|
+
});
|
|
90
|
+
return root.toSource(printOptions);
|
|
91
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _renameTreeViewSimpleTreeView.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _renameTreeViewSimpleTreeView = _interopRequireDefault(require("../../../v7.0.0/tree-view/rename-tree-view-simple-tree-view"));
|