@mui/codemod 7.3.0 → 7.3.3
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 +168 -4
- package/README.md +21 -1
- package/package.json +6 -28
- package/util/migrateToVariants.js +5 -5
- package/v1.0.0/color-imports.js +1 -1
- package/v4.0.0/optimal-imports.js +0 -5
- package/v4.0.0/top-level-imports.js +1 -4
- package/v5.0.0/base-remove-component-prop.test/actual.js +1 -1
- package/v5.0.0/base-remove-component-prop.test/expected.js +1 -1
- package/v5.0.0/jss-to-styled.test/first.actual.js +15 -6
- package/v5.0.0/jss-to-styled.test/first.expected.js +15 -6
- package/v5.0.0/jss-to-styled.test/sixth.actual.js +5 -3
- package/v5.0.0/jss-to-styled.test/sixth.expected.js +5 -3
- package/v5.0.0/optimal-imports.js +0 -5
- package/v5.0.0/path-imports.js +90 -0
- package/v5.0.0/path-imports.test/actual.js +8 -0
- package/v5.0.0/path-imports.test/expected.js +66 -0
- package/v5.0.0/theme-spacing.test/large-actual.js +2 -2
- package/v5.0.0/theme-spacing.test/large-expected.js +2 -2
- package/v5.0.0/top-level-imports.js +5 -6
- package/v6.0.0/styled/styled-v6.js +1 -1
- package/v6.0.0/theme-v6/theme-v6.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,169 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 7.3.3
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v7.3.2..master -->
|
|
6
|
+
|
|
7
|
+
_Sep 30, 2025_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 14 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@7.3.3`
|
|
12
|
+
|
|
13
|
+
- [Autocomplete] Sync highlighted index when popup is opened (#46894) @ZeeshanTamboli
|
|
14
|
+
- [CircularProgress] Add track slot via enableTrackSlot (#46907) @monam2
|
|
15
|
+
- [locale] Split locales into separate files (#46933) @christopherschroer
|
|
16
|
+
- [Tabs] Fix not scrolling to correct tab after refresh when auto scrollable (#46869) @Jayesh-11
|
|
17
|
+
|
|
18
|
+
### Docs
|
|
19
|
+
|
|
20
|
+
- Add a guide for building extensible themes (#46896) @siriwatknp
|
|
21
|
+
- Add v7 community course to resources page (#46944) @alelthomas
|
|
22
|
+
- Improve performance of Default Theme Viewer (#46841) @sai6855
|
|
23
|
+
- Fix typo in blog component MainContent (#46868) @jonyen
|
|
24
|
+
- [Steppers] Replace TransitionProps with slotProps.transition (#46898) @sai6855
|
|
25
|
+
|
|
26
|
+
### Core
|
|
27
|
+
|
|
28
|
+
- [blog] Fix year in Punta Cana retreat post (#46943) @mapache-salvaje
|
|
29
|
+
- [blog] Punta Cana retreat post (#46892) @mapache-salvaje
|
|
30
|
+
- [code-infra] Publish from CI (#46851) @Janpot
|
|
31
|
+
- [code-infra] Convert reportBrokenLink script to ts (#47002) @brijeshb42
|
|
32
|
+
- [code-infra] Update module resolution for typescript@next (#46940) @Janpot
|
|
33
|
+
- [code-infra] Run continuous releases during ci-check (#46948) @Janpot
|
|
34
|
+
- [code-infra] Fix github actions check for continuous release (#46941) @Janpot
|
|
35
|
+
- [code-infra] Address high/critical dependabot reports (#46937) @Janpot
|
|
36
|
+
- [code-infra] Update ci.yml triggers (#46860) @Janpot
|
|
37
|
+
- [code-infra] Exact match for renovate file name (#46916) @Janpot
|
|
38
|
+
- [code-infra] Disable dependency update for `@material-ui/core` in codemod (#46899) @Janpot
|
|
39
|
+
- [code-infra] Transpile `assertion-error` in karma tests (#46909) @Janpot
|
|
40
|
+
- [code-infra] Disable browserstack on circleci cron jobs (#46905) @Janpot
|
|
41
|
+
- [code-infra] Remove `copy-files` command usage from packages (#46902) @brijeshb42
|
|
42
|
+
- [code-infra] Low-hanging ts conversion (#46903) @Janpot
|
|
43
|
+
- [code-infra] Bring batch of changes from vitest PR (#46795) @Janpot
|
|
44
|
+
- [code-infra] Remove dependency on `fs-extra` (#46755) @bernardobelchior
|
|
45
|
+
- [code-infra] Make error code extraction independent of build (#46865) @brijeshb42
|
|
46
|
+
- [docs-infra] Fix markdown generation script to find correct files (#46954) @siriwatknp
|
|
47
|
+
- [docs-infra] Fix unnecessary redirects (#46951) @Janpot
|
|
48
|
+
- [docs-infra] Remove `dangerouslySetInnerHTML` for ad description (#46936) @Janpot
|
|
49
|
+
- [docs-infra] Display "View as Markdown" only on Material UI (#46861) @siriwatknp
|
|
50
|
+
- [infra] Fix JSON files not being imported in TS demos (#47000) @bernardobelchior
|
|
51
|
+
- [infra] Turn `literal | (string & {})` to `PropTypes.string` (#46934) @siriwatknp
|
|
52
|
+
- [infra] Bump node.js version and make local usage strict (#46834) @brijeshb42
|
|
53
|
+
- [infra] Remove "main" fields from publishable packages (#46856) @brijeshb42
|
|
54
|
+
- [internal] Refactor `useForkRef` TS types: tighten `cleanupRef` and simplify ref typing (#46967) @wo-o29
|
|
55
|
+
- [internal] Fix naming to match convention (2099cb0) @oliviertassinari
|
|
56
|
+
- [internal] Fix naming to match convention (29aad62) @oliviertassinari
|
|
57
|
+
- [internal] Use same option as other repositories (eabda77) @oliviertassinari
|
|
58
|
+
- [internal] Normalize <meta name='viewport' (9d1922a) @oliviertassinari
|
|
59
|
+
- [internal] Normalize charset='utf-8' (f1aae00) @oliviertassinari
|
|
60
|
+
- [test] Split infinitive (0237fda) @oliviertassinari
|
|
61
|
+
|
|
62
|
+
All contributors of this release in alphabetical order: @alelthomas, @bernardobelchior, @brijeshb42, @christopherschroer, @Janpot, @Jayesh-11, @jonyen, @mapache-salvaje, @monam2, @oliviertassinari, @sai6855, @siriwatknp, @wo-o29, @ZeeshanTamboli
|
|
63
|
+
|
|
64
|
+
## 7.3.2
|
|
65
|
+
|
|
66
|
+
<!-- generated comparing v7.3.1..master -->
|
|
67
|
+
|
|
68
|
+
_Sep 1, 2025_
|
|
69
|
+
|
|
70
|
+
A big thanks to the 16 contributors who made this release possible.
|
|
71
|
+
|
|
72
|
+
### `@mui/material@7.3.2`
|
|
73
|
+
|
|
74
|
+
- [Chip] Remove unnecessary optional chaining from key event handlers (#46752) @ZeeshanTamboli
|
|
75
|
+
- [Drawer] Add dialog role and aria-modal for `temporary` variant (#46690) @Yashkanekar
|
|
76
|
+
- [PaginationItem] Add slot descriptions and default components in API documentation (#46677) @sai6855
|
|
77
|
+
- [utils] Remove duplicate isHostComponent function (#46721) @frontman-git
|
|
78
|
+
|
|
79
|
+
### `@mui/codemod@7.3.2`
|
|
80
|
+
|
|
81
|
+
- Add codemod to convert top-level to path imports (#46657) @neemski
|
|
82
|
+
|
|
83
|
+
### Docs
|
|
84
|
+
|
|
85
|
+
- Remove outdated Next.js lint command (#46847) @oliviertassinari
|
|
86
|
+
- Add `View as Markdown` to component link header (#46835) @siriwatknp
|
|
87
|
+
- Add a link to open `llms.txt` (#46832) @siriwatknp
|
|
88
|
+
- Fix typos in Material UI API docs (#46787) @noritaka1166
|
|
89
|
+
- Fix typo extra "to" word (#46783) @danpeleg4
|
|
90
|
+
- Remove past employees from about page (#46780) @Janpot
|
|
91
|
+
- Fix typos in `docs/pages` folder (#46761) @noritaka1166
|
|
92
|
+
- Add clarification on `react-is` resolution with Material UI v6 and v7 for React 18 and below (#46633) @alisasanib
|
|
93
|
+
- Fix typos in `joy` and `utils` package (#46713) @noritaka1166
|
|
94
|
+
- [autocomplete] Fix console in unstyled demo (#46804) @oliviertassinari
|
|
95
|
+
- [autocomplete] Fix Google Maps brand attribution (#46803) @oliviertassinari
|
|
96
|
+
- [autocomplete] Fix header sentence case (#46805) @oliviertassinari
|
|
97
|
+
- [autocomplete] Fix Google Maps demo (#46793) @oliviertassinari
|
|
98
|
+
- [Select] Fix labeling issues in grouped select demo (#46722) @mj12albert
|
|
99
|
+
- [table] Remove outdated unstyled section (#46786) @mj12albert
|
|
100
|
+
- [TextField] Add note about removal of `sizeMedium` class from InputLabel in v7 upgrade guide (#46693) @checcoux
|
|
101
|
+
|
|
102
|
+
### Core
|
|
103
|
+
|
|
104
|
+
- Update `cipher-base` transitive dependency (#46800) @Janpot
|
|
105
|
+
- [charts] Marked Treemap chart as Pro (#46691) @prakhargupta1
|
|
106
|
+
- [code-infra] Remove some csbci references (#46797) @Janpot
|
|
107
|
+
- [code-infra] update build tool (#46801) @Janpot
|
|
108
|
+
- [code-infra] Align pkg.pr.new with other projects (#46467) @Janpot
|
|
109
|
+
- [code-infra] Prepare for incoming `execa` update (#46781) @Janpot
|
|
110
|
+
- [code-infra] Remove `@mui/internal-babel-plugin-resolve-imports` override config (#46754) @ZeeshanTamboli
|
|
111
|
+
- [core] Fix typo in `docs/mui-vale` folder (#46760) @noritaka1166
|
|
112
|
+
- [core] Fix typos in `docs/data/material` folder (#46757) @noritaka1166
|
|
113
|
+
- [core] Fix typos in `netlify` folder (#46756) @noritaka1166
|
|
114
|
+
- [core] Upgrade brace-expansion (#46747) @oliviertassinari
|
|
115
|
+
- [core] Fix typos in Joy UI docs and `test` folder (#46738) @noritaka1166
|
|
116
|
+
- [core] Upgrade KaTeX (#46731) @oliviertassinari
|
|
117
|
+
- [core] Avoid Polynomial regex backtracking (#46732) @oliviertassinari
|
|
118
|
+
- [core] Remove dead @toolpad/core dependency (#46730) @oliviertassinari
|
|
119
|
+
- [core] Fix typos in `markdown` and `system` packages (#46720) @noritaka1166
|
|
120
|
+
- [core] Fix typos in `api-docs-builder` package (#46719) @noritaka1166
|
|
121
|
+
- [core] Fix typos in `codemod` package (#46715) @noritaka1166
|
|
122
|
+
- [core] pnpm prettier:all (#46685) @oliviertassinari
|
|
123
|
+
- [docs-infra] Set origin to generated `llms.txt` (#46833) @siriwatknp
|
|
124
|
+
- [docs-infra] Fix AbortController error (#46408) @oliviertassinari
|
|
125
|
+
- [docs-infra] Block than more feedback submissions (#46824) @oliviertassinari
|
|
126
|
+
- [docs-infra] Fix ESLint references (#46680) @oliviertassinari
|
|
127
|
+
- [infra] Migrate away from airbnb's eslint config (#46794) @brijeshb42
|
|
128
|
+
- [infra] Remove `fs-extra` from docs scripts (#46749) @bernardobelchior
|
|
129
|
+
- [infra] Remove dependency on `react-spring` (but keep `@react-spring/web`) (#46748) @bernardobelchior
|
|
130
|
+
- [infra] Remove `fs-extra` from `mui-icons-material` (#46745) @bernardobelchior
|
|
131
|
+
- [infra] Remove `api-docs-builder` dependency on `fs-extra` (#46742) @bernardobelchior
|
|
132
|
+
- [infra] Migrate build command to code-infra (#46614) @brijeshb42
|
|
133
|
+
- [infra] move testBuiltTypes step (#46735) @Janpot
|
|
134
|
+
- [infra] Remove `fs-extra` from `netlify-plugin-cache-docs` (#46740) @bernardobelchior
|
|
135
|
+
- [infra] Supply `document` to `userEvent.setup()` (#46714) @Janpot
|
|
136
|
+
- [infra] Remove useless test step (#46679) @Janpot
|
|
137
|
+
- [infra] Stagger daily cron jobs to avoid browserstack timeouts (#46676) @Janpot
|
|
138
|
+
- [internal] Improve useControlled() strict mode handling (#46807) @oliviertassinari
|
|
139
|
+
- [internal] Sentence case (55a9d8f) @oliviertassinari
|
|
140
|
+
- [internal] Fix typos in code comments (#46784) @noritaka1166
|
|
141
|
+
- [internal] Fix console regression in dev mode (925f02b) @oliviertassinari
|
|
142
|
+
- [internal] Prettier all if dependencies changes (1f63b03) @oliviertassinari
|
|
143
|
+
- [internal] Fix renovate.json (84be632) @oliviertassinari
|
|
144
|
+
- [internal] Polish renovate schedule (#46727) @oliviertassinari
|
|
145
|
+
- [internal] Update link to GitHub labels (8ab4813) @oliviertassinari
|
|
146
|
+
- [internal] Bump brace-expansion (06de338) @oliviertassinari
|
|
147
|
+
- [internal] Normalize Action description (4a2fbcb) @oliviertassinari
|
|
148
|
+
- [toolpad] Remove it from website and docs (#46595) @prakhargupta1
|
|
149
|
+
|
|
150
|
+
All contributors of this release in alphabetical order: @alisasanib, @bernardobelchior, @brijeshb42, @checcoux, @danpeleg4, @frontman-git, @Janpot, @mj12albert, @neemski, @noritaka1166, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp, @Yashkanekar, @ZeeshanTamboli
|
|
151
|
+
|
|
152
|
+
## 7.3.1
|
|
153
|
+
|
|
154
|
+
<!-- generated comparing v7.3.0..master -->
|
|
155
|
+
|
|
156
|
+
_Aug 6, 2025_
|
|
157
|
+
|
|
158
|
+
A big thanks to the 2 contributors who made this release possible.
|
|
159
|
+
|
|
160
|
+
### `@mui/material@7.3.1`
|
|
161
|
+
|
|
162
|
+
- [PaginationItem] Fix inheritance of component (#46666) @sai6855
|
|
163
|
+
- [Select] Revert - Implement pointer cancellation PR 45789 (#46672) @ZeeshanTamboli
|
|
164
|
+
|
|
165
|
+
All contributors of this release in alphabetical order: @sai6855, @ZeeshanTamboli
|
|
166
|
+
|
|
3
167
|
## 7.3.0
|
|
4
168
|
|
|
5
169
|
<!-- generated comparing v7.2.0..master -->
|
|
@@ -56,7 +220,7 @@ A big thanks to the 24 contributors who made this release possible. Here are som
|
|
|
56
220
|
- Fix unpinned version regression (#46438) @oliviertassinari
|
|
57
221
|
- [code-infra] Accomodate build requirements from mui-x (#46551) @brijeshb42
|
|
58
222
|
- [code-infra] Extend renovate preset from infra repo (#46483) @brijeshb42
|
|
59
|
-
- [code-infra] Use flat
|
|
223
|
+
- [code-infra] Use flat ESLint config (#46258) @brijeshb42
|
|
60
224
|
- [docs-infra] Remove comment saving in G-sheet option (#46617) @alexfauquette
|
|
61
225
|
- [docs-infra] Move `Open in MUI Chat` to Demo toolbar and adjust styles (#46579) @siriwatknp
|
|
62
226
|
- [docs-infra] Fix codeblock issues (#46323) @atharva3333
|
|
@@ -128,11 +292,11 @@ A big thanks to the 17 contributors who made this release possible. Here are the
|
|
|
128
292
|
### Core
|
|
129
293
|
|
|
130
294
|
- pnpm docs:sync-team (3641a0b) @oliviertassinari
|
|
131
|
-
- Add cross-env to
|
|
295
|
+
- Add cross-env to ESLint script (#46358) @ZeeshanTamboli
|
|
132
296
|
- Support merging of className and style from theme (#45975) @sai6855
|
|
133
297
|
- [code-infra] Create bundle size package (#45911) @Janpot
|
|
134
298
|
- [docs-infra] Add a script to generate Material UI `llms.txt` and docs markdown. (#46308) @siriwatknp
|
|
135
|
-
- [docs-infra] Fix
|
|
299
|
+
- [docs-infra] Fix StackBlitz for js projects (#46220) @Janpot
|
|
136
300
|
- [infra] Add emotion as external for bundle monitor (#46372) @Janpot
|
|
137
301
|
- [infra] Create update PR on every canary publish for internal packages (#46367) @Janpot
|
|
138
302
|
- [infra] Remove deprecated esmExternals (#46365) @Janpot
|
|
@@ -210,7 +374,7 @@ A big thanks to the 15 contributors who made this release possible.
|
|
|
210
374
|
### Core
|
|
211
375
|
|
|
212
376
|
- [code-infra] Add plugin to check for index file access (#46178) @Janpot
|
|
213
|
-
- [code-infra] Bump
|
|
377
|
+
- [code-infra] Bump ESLint to v9 (#46222) @brijeshb42
|
|
214
378
|
- [code-infra] Move packages to mui/mui-public (#46155) @Janpot
|
|
215
379
|
- [code-infra] Move `chai` to peerDep (#46227) @JCQuintas
|
|
216
380
|
- [code-infra] Avoid loading barrel file during type checking (#46177) @Janpot
|
package/README.md
CHANGED
|
@@ -3466,6 +3466,26 @@ npx @mui/codemod@latest v5.0.0/pagination-round-circular <path>
|
|
|
3466
3466
|
|
|
3467
3467
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#pagination).
|
|
3468
3468
|
|
|
3469
|
+
#### `path-imports`
|
|
3470
|
+
|
|
3471
|
+
Converts all `@mui/material` & `@mui/icons-material` top-level imports to path imports (essentially the reverse of `top-level-imports`, with the addition of `@mui/icons-material`):
|
|
3472
|
+
|
|
3473
|
+
```diff
|
|
3474
|
+
-import { List, Grid } from '@mui/material';
|
|
3475
|
+
+import List from '@mui/material/List';
|
|
3476
|
+
+import Grid from '@mui/material/Grid';
|
|
3477
|
+
|
|
3478
|
+
-import { Delete, People as PeopleIcon } from '@mui/icons-material';
|
|
3479
|
+
+import Delete from '@mui/icons-material/Delete';
|
|
3480
|
+
+import PeopleIcon from '@mui/icons-material/People';
|
|
3481
|
+
```
|
|
3482
|
+
|
|
3483
|
+
```bash
|
|
3484
|
+
npx @mui/codemod@latest v5.0.0/path-imports <path>
|
|
3485
|
+
```
|
|
3486
|
+
|
|
3487
|
+
Head to https://mui.com/material-ui/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
3488
|
+
|
|
3469
3489
|
#### `optimal-imports`
|
|
3470
3490
|
|
|
3471
3491
|
Fix private import paths.
|
|
@@ -3719,7 +3739,7 @@ Converts all `@mui/material` submodule imports to the root module:
|
|
|
3719
3739
|
npx @mui/codemod@latest v5.0.0/top-level-imports <path>
|
|
3720
3740
|
```
|
|
3721
3741
|
|
|
3722
|
-
Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
3742
|
+
Head to https://mui.com/material-ui/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
3723
3743
|
|
|
3724
3744
|
#### `transitions`
|
|
3725
3745
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/codemod",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.3",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Codemod scripts for Material UI.",
|
|
6
6
|
"bin": "./codemod.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://opencollective.com/mui-org"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/core": "^7.28.
|
|
27
|
-
"@babel/runtime": "^7.28.
|
|
28
|
-
"@babel/traverse": "^7.28.
|
|
26
|
+
"@babel/core": "^7.28.4",
|
|
27
|
+
"@babel/runtime": "^7.28.4",
|
|
28
|
+
"@babel/traverse": "^7.28.4",
|
|
29
29
|
"jscodeshift": "^17.1.2",
|
|
30
30
|
"jscodeshift-add-imports": "^1.0.11",
|
|
31
31
|
"postcss": "^8.5.6",
|
|
@@ -39,30 +39,8 @@
|
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=14.0.0"
|
|
41
41
|
},
|
|
42
|
-
"
|
|
42
|
+
"type": "commonjs",
|
|
43
43
|
"exports": {
|
|
44
|
-
"./package.json": "./package.json"
|
|
45
|
-
".": {
|
|
46
|
-
"require": {
|
|
47
|
-
"types": "./index.d.ts",
|
|
48
|
-
"default": "./index.js"
|
|
49
|
-
},
|
|
50
|
-
"import": {
|
|
51
|
-
"types": "./esm/index.d.ts",
|
|
52
|
-
"default": "./esm/index.js"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"./*": {
|
|
56
|
-
"require": {
|
|
57
|
-
"types": "./*/index.d.ts",
|
|
58
|
-
"default": "./*/index.js"
|
|
59
|
-
},
|
|
60
|
-
"import": {
|
|
61
|
-
"types": "./esm/*/index.d.ts",
|
|
62
|
-
"default": "./esm/*/index.js"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"./esm": null,
|
|
66
|
-
"./modern": null
|
|
44
|
+
"./package.json": "./package.json"
|
|
67
45
|
}
|
|
68
46
|
}
|
|
@@ -121,9 +121,9 @@ const getObjectToArrowFunction = j => {
|
|
|
121
121
|
/**
|
|
122
122
|
*
|
|
123
123
|
* @param {import('jscodeshift').ObjectExpression} objectExpression
|
|
124
|
-
* @param {import('jscodeshift').BinaryExpression}
|
|
124
|
+
* @param {import('jscodeshift').BinaryExpression} additional
|
|
125
125
|
*/
|
|
126
|
-
function objectToArrowFunction(objectExpression,
|
|
126
|
+
function objectToArrowFunction(objectExpression, additional) {
|
|
127
127
|
const paramKeys = new Set();
|
|
128
128
|
let left;
|
|
129
129
|
objectExpression.properties.forEach((prop, index) => {
|
|
@@ -135,10 +135,10 @@ const getObjectToArrowFunction = j => {
|
|
|
135
135
|
left = j.logicalExpression('&&', left, result);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
-
if (
|
|
139
|
-
paramKeys.add(getObjectKey(
|
|
138
|
+
if (additional) {
|
|
139
|
+
paramKeys.add(getObjectKey(additional.left).name);
|
|
140
140
|
}
|
|
141
|
-
return buildArrowFunctionAST(paramKeys,
|
|
141
|
+
return buildArrowFunctionAST(paramKeys, additional ? j.logicalExpression('&&', left, additional) : left);
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
};
|
package/v1.0.0/color-imports.js
CHANGED
|
@@ -30,7 +30,7 @@ function colorImportPath(colorPalette) {
|
|
|
30
30
|
/**
|
|
31
31
|
* Replace all expressions that use identifier to access color palettes.
|
|
32
32
|
* e.g. colors.amber100 -> colors.amber['100']
|
|
33
|
-
* @param {
|
|
33
|
+
* @param {string} identifier
|
|
34
34
|
* @param {jscodeshift_api_object} j
|
|
35
35
|
* @param {jscodeshift_ast_object} root
|
|
36
36
|
*/
|
|
@@ -8,11 +8,6 @@ exports.default = transformer;
|
|
|
8
8
|
var _path = require("path");
|
|
9
9
|
var _jscodeshiftAddImports = _interopRequireDefault(require("jscodeshift-add-imports"));
|
|
10
10
|
var _getJSExports = _interopRequireDefault(require("../util/getJSExports"));
|
|
11
|
-
// istanbul ignore next
|
|
12
|
-
if (process.env.NODE_ENV === 'test') {
|
|
13
|
-
const resolve = require.resolve;
|
|
14
|
-
require.resolve = source => resolve(source.replace(/^@material-ui\/core\/es/, '../../../mui-material/src'));
|
|
15
|
-
}
|
|
16
11
|
function transformer(fileInfo, api, options) {
|
|
17
12
|
const j = api.jscodeshift;
|
|
18
13
|
const importModule = options.importModule || '@material-ui/core';
|
|
@@ -10,10 +10,7 @@ function transformer(fileInfo, api, options) {
|
|
|
10
10
|
const j = api.jscodeshift;
|
|
11
11
|
const importModule = options.importModule || '@material-ui/core';
|
|
12
12
|
const targetModule = options.targetModule || '@material-ui/core';
|
|
13
|
-
|
|
14
|
-
if (process.env.NODE_ENV === 'test') {
|
|
15
|
-
requirePath = requirePath.replace(/^@material-ui\/core/, '../../../mui-material/src');
|
|
16
|
-
}
|
|
13
|
+
const requirePath = importModule;
|
|
17
14
|
|
|
18
15
|
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
19
16
|
const whitelist = require(requirePath);
|
|
@@ -164,7 +164,9 @@ class AppAppBar extends React.Component {
|
|
|
164
164
|
essential: essential,
|
|
165
165
|
position: position,
|
|
166
166
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
167
|
-
className: (0, _clsx.default)(classes.wrap,
|
|
167
|
+
className: (0, _clsx.default)(classes.wrap, {
|
|
168
|
+
[classes.wrapOpened]: menuOpen
|
|
169
|
+
}),
|
|
168
170
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
169
171
|
to: "/",
|
|
170
172
|
"aria-label": "Back to homepage",
|
|
@@ -173,7 +175,10 @@ class AppAppBar extends React.Component {
|
|
|
173
175
|
color: menuOpen ? 'inherit' : 'textPrimary'
|
|
174
176
|
})
|
|
175
177
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
176
|
-
className: (0, _clsx.default)(classes.content,
|
|
178
|
+
className: (0, _clsx.default)(classes.content, {
|
|
179
|
+
[classes.contentOpened]: menuOpen,
|
|
180
|
+
'mui-fixed': menuOpen
|
|
181
|
+
}),
|
|
177
182
|
children: [children || /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
178
183
|
className: classes.grow
|
|
179
184
|
}), essential ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
@@ -197,9 +202,13 @@ class AppAppBar extends React.Component {
|
|
|
197
202
|
href: "#",
|
|
198
203
|
onClick: this.handleToggleMenu,
|
|
199
204
|
children: menuOpen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
|
|
200
|
-
className: (0, _clsx.default)(classes.menuIcon, classes.closeIcon, classes.white,
|
|
205
|
+
className: (0, _clsx.default)(classes.menuIcon, classes.closeIcon, classes.white, {
|
|
206
|
+
[classes.hide]: menuOpen
|
|
207
|
+
})
|
|
201
208
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {
|
|
202
|
-
className: (0, _clsx.default)(classes.menuIcon, classes.burgerIcon,
|
|
209
|
+
className: (0, _clsx.default)(classes.menuIcon, classes.burgerIcon, {
|
|
210
|
+
[classes.hide]: menuOpen
|
|
211
|
+
})
|
|
203
212
|
})
|
|
204
213
|
})
|
|
205
214
|
})]
|
|
@@ -207,13 +216,13 @@ class AppAppBar extends React.Component {
|
|
|
207
216
|
});
|
|
208
217
|
}
|
|
209
218
|
}
|
|
210
|
-
|
|
219
|
+
AppAppBar.propTypes = {
|
|
211
220
|
children: _propTypes.default.node,
|
|
212
221
|
classes: _propTypes.default.object.isRequired,
|
|
213
222
|
essential: _propTypes.default.bool,
|
|
214
223
|
position: _propTypes.default.string,
|
|
215
224
|
user: _propTypes.default.object
|
|
216
|
-
}
|
|
225
|
+
};
|
|
217
226
|
var _default = exports.default = (0, _recompose.compose)((0, _withStyles.default)(styles, {
|
|
218
227
|
name: 'AppAppBar'
|
|
219
228
|
}), (0, _reactRedux.connect)(state => ({
|
|
@@ -179,7 +179,9 @@ class AppAppBar extends React.Component {
|
|
|
179
179
|
essential: essential,
|
|
180
180
|
position: position,
|
|
181
181
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
182
|
-
className: (0, _clsx.default)(classes.wrap,
|
|
182
|
+
className: (0, _clsx.default)(classes.wrap, {
|
|
183
|
+
[classes.wrapOpened]: menuOpen
|
|
184
|
+
}),
|
|
183
185
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
184
186
|
to: "/",
|
|
185
187
|
"aria-label": "Back to homepage",
|
|
@@ -188,7 +190,10 @@ class AppAppBar extends React.Component {
|
|
|
188
190
|
color: menuOpen ? 'inherit' : 'textPrimary'
|
|
189
191
|
})
|
|
190
192
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
191
|
-
className: (0, _clsx.default)(classes.content,
|
|
193
|
+
className: (0, _clsx.default)(classes.content, {
|
|
194
|
+
[classes.contentOpened]: menuOpen,
|
|
195
|
+
'mui-fixed': menuOpen
|
|
196
|
+
}),
|
|
192
197
|
children: [children || /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
193
198
|
className: classes.grow
|
|
194
199
|
}), essential ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
@@ -212,9 +217,13 @@ class AppAppBar extends React.Component {
|
|
|
212
217
|
href: "#",
|
|
213
218
|
onClick: this.handleToggleMenu,
|
|
214
219
|
children: menuOpen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
|
|
215
|
-
className: (0, _clsx.default)(classes.menuIcon, classes.closeIcon, classes.white,
|
|
220
|
+
className: (0, _clsx.default)(classes.menuIcon, classes.closeIcon, classes.white, {
|
|
221
|
+
[classes.hide]: menuOpen
|
|
222
|
+
})
|
|
216
223
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {
|
|
217
|
-
className: (0, _clsx.default)(classes.menuIcon, classes.burgerIcon,
|
|
224
|
+
className: (0, _clsx.default)(classes.menuIcon, classes.burgerIcon, {
|
|
225
|
+
[classes.hide]: menuOpen
|
|
226
|
+
})
|
|
218
227
|
})
|
|
219
228
|
})
|
|
220
229
|
})]
|
|
@@ -222,13 +231,13 @@ class AppAppBar extends React.Component {
|
|
|
222
231
|
});
|
|
223
232
|
}
|
|
224
233
|
}
|
|
225
|
-
|
|
234
|
+
AppAppBar.propTypes = {
|
|
226
235
|
children: _propTypes.default.node,
|
|
227
236
|
classes: _propTypes.default.object.isRequired,
|
|
228
237
|
essential: _propTypes.default.bool,
|
|
229
238
|
position: _propTypes.default.string,
|
|
230
239
|
user: _propTypes.default.object
|
|
231
|
-
}
|
|
240
|
+
};
|
|
232
241
|
var _default = exports.default = (0, _recompose.compose)((0, _reactRedux.connect)(state => ({
|
|
233
242
|
user: state.data.user
|
|
234
243
|
})))(AppAppBar);
|
|
@@ -68,7 +68,9 @@ function AppAppBarCart(props) {
|
|
|
68
68
|
}), count > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
69
69
|
color: "primary",
|
|
70
70
|
classes: {
|
|
71
|
-
badge: (0, _clsx.default)(classes.badge,
|
|
71
|
+
badge: (0, _clsx.default)(classes.badge, {
|
|
72
|
+
[classes.transparentBadge]: transparent
|
|
73
|
+
})
|
|
72
74
|
},
|
|
73
75
|
badgeContent: count > 9 ? '+9' : count,
|
|
74
76
|
children: ''
|
|
@@ -76,12 +78,12 @@ function AppAppBarCart(props) {
|
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
AppAppBarCart.displayName = 'AppAppBarCart';
|
|
79
|
-
|
|
81
|
+
AppAppBarCart.propTypes = {
|
|
80
82
|
classes: _propTypes.default.object.isRequired,
|
|
81
83
|
className: _propTypes.default.string,
|
|
82
84
|
variant: _propTypes.default.oneOf(['text', 'icon']),
|
|
83
85
|
transparent: _propTypes.default.bool
|
|
84
|
-
}
|
|
86
|
+
};
|
|
85
87
|
AppAppBarCart.defaultProps = {
|
|
86
88
|
variant: 'icon'
|
|
87
89
|
};
|
|
@@ -76,7 +76,9 @@ function AppAppBarCart(props) {
|
|
|
76
76
|
}), count > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
77
77
|
color: "primary",
|
|
78
78
|
classes: {
|
|
79
|
-
badge: (0, _clsx.default)(classes.badge,
|
|
79
|
+
badge: (0, _clsx.default)(classes.badge, {
|
|
80
|
+
[classes.transparentBadge]: transparent
|
|
81
|
+
})
|
|
80
82
|
},
|
|
81
83
|
badgeContent: count > 9 ? '+9' : count,
|
|
82
84
|
children: ''
|
|
@@ -84,12 +86,12 @@ function AppAppBarCart(props) {
|
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
88
|
AppAppBarCart.displayName = 'AppAppBarCart';
|
|
87
|
-
|
|
89
|
+
AppAppBarCart.propTypes = {
|
|
88
90
|
classes: _propTypes.default.object.isRequired,
|
|
89
91
|
className: _propTypes.default.string,
|
|
90
92
|
variant: _propTypes.default.oneOf(['text', 'icon']),
|
|
91
93
|
transparent: _propTypes.default.bool
|
|
92
|
-
}
|
|
94
|
+
};
|
|
93
95
|
AppAppBarCart.defaultProps = {
|
|
94
96
|
variant: 'icon'
|
|
95
97
|
};
|
|
@@ -8,11 +8,6 @@ exports.default = transformer;
|
|
|
8
8
|
var _path = require("path");
|
|
9
9
|
var _jscodeshiftAddImports = _interopRequireDefault(require("jscodeshift-add-imports"));
|
|
10
10
|
var _getJSExports = _interopRequireDefault(require("../util/getJSExports"));
|
|
11
|
-
// istanbul ignore next
|
|
12
|
-
if (process.env.NODE_ENV === 'test') {
|
|
13
|
-
const resolve = require.resolve;
|
|
14
|
-
require.resolve = source => resolve(source.replace(/^@material-ui\/core\/es/, '../../../mui-material/src').replace(/^@material-ui\/core\/modern/, '../../../mui-material/src'));
|
|
15
|
-
}
|
|
16
11
|
function transformer(fileInfo, api, options) {
|
|
17
12
|
const j = api.jscodeshift;
|
|
18
13
|
const importModule = options.importModule || '@material-ui/core';
|
|
@@ -0,0 +1,90 @@
|
|
|
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 _jscodeshiftAddImports = _interopRequireDefault(require("jscodeshift-add-imports"));
|
|
9
|
+
// istanbul ignore next
|
|
10
|
+
if (process.env.NODE_ENV === 'test') {
|
|
11
|
+
const resolve = require.resolve;
|
|
12
|
+
require.resolve = source => resolve(source.replace(/^@mui\/material\/modern/, '../../../mui-material/src'));
|
|
13
|
+
}
|
|
14
|
+
const barrelImportsToTransform = {
|
|
15
|
+
material: {},
|
|
16
|
+
'icons-material': {}
|
|
17
|
+
};
|
|
18
|
+
const muiImportRegExp = /^@mui\/([^/]+)$/;
|
|
19
|
+
function transformer(fileInfo, api, options) {
|
|
20
|
+
const j = api.jscodeshift;
|
|
21
|
+
const printOptions = options.printOptions || {
|
|
22
|
+
quote: 'single',
|
|
23
|
+
trailingComma: true
|
|
24
|
+
};
|
|
25
|
+
const root = j(fileInfo.source);
|
|
26
|
+
root.find(j.ImportDeclaration).forEach(path => {
|
|
27
|
+
if (!path.node.specifiers.length) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (path.value.importKind && path.value.importKind !== 'value') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const importPath = path.value.source.value;
|
|
34
|
+
const match = importPath.match(muiImportRegExp);
|
|
35
|
+
if (!match) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const moduleName = match[1];
|
|
39
|
+
const importsToAdd = barrelImportsToTransform[moduleName];
|
|
40
|
+
if (!importsToAdd) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const indexesToPrune = [];
|
|
44
|
+
path.node.specifiers.forEach((specifier, index) => {
|
|
45
|
+
if (specifier.importKind && specifier.importKind !== 'value') {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (specifier.type === 'ImportNamespaceSpecifier') {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (specifier.type === 'ImportSpecifier') {
|
|
52
|
+
const name = specifier.imported.name;
|
|
53
|
+
if (moduleName === 'material') {
|
|
54
|
+
if (name === 'ThemeProvider' || name === 'createTheme') {
|
|
55
|
+
importsToAdd.styles ?? (importsToAdd.styles = []);
|
|
56
|
+
importsToAdd.styles.push(specifier);
|
|
57
|
+
indexesToPrune.push(index);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (name.endsWith('Classes')) {
|
|
61
|
+
const base = name.replace(/Classes$/, '');
|
|
62
|
+
const componentName = base.charAt(0).toUpperCase() + base.slice(1); // autocomplete → Autocomplete
|
|
63
|
+
importsToAdd[componentName] ?? (importsToAdd[componentName] = []);
|
|
64
|
+
importsToAdd[componentName].push(j.importSpecifier(specifier.imported, specifier.local));
|
|
65
|
+
indexesToPrune.push(index);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
importsToAdd[name] ?? (importsToAdd[name] = []);
|
|
70
|
+
importsToAdd[name].push(j.importDefaultSpecifier(specifier.local));
|
|
71
|
+
indexesToPrune.push(index);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// We prune imports starting with the highest index as otherwise subsequent indexes would become
|
|
76
|
+
// invalid once an index that comes before it gets pruned.
|
|
77
|
+
indexesToPrune.sort((a, b) => a - b).reverse();
|
|
78
|
+
indexesToPrune.forEach(index => path.get('specifiers', index).prune());
|
|
79
|
+
if (!path.node.specifiers.length) {
|
|
80
|
+
path.prune();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
Object.entries(barrelImportsToTransform).forEach(([moduleName, importsToAdd]) => {
|
|
84
|
+
Object.entries(importsToAdd).forEach(([module, specifiers]) => {
|
|
85
|
+
const fullTargetModule = `@mui/${moduleName}/${module}`;
|
|
86
|
+
(0, _jscodeshiftAddImports.default)(root, j.importDeclaration(specifiers, j.stringLiteral(fullTargetModule)));
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
return root.toSource(printOptions);
|
|
90
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var React = _interopRequireWildcard(require("react"));
|
|
5
|
+
var _styles = require("@mui/styles");
|
|
6
|
+
var _colors = require("@mui/material/colors");
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _iconsMaterial = require("@mui/icons-material");
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var React = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _styles = require("@mui/styles");
|
|
7
|
+
var _colors = require("@mui/material/colors");
|
|
8
|
+
var _styles2 = require("@mui/material/styles");
|
|
9
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
10
|
+
var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
|
|
11
|
+
var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
|
|
12
|
+
var _Autocomplete = require("@mui/material/Autocomplete");
|
|
13
|
+
var _BottomNavigationAction = _interopRequireDefault(require("@mui/material/BottomNavigationAction"));
|
|
14
|
+
var _BottomNavigation = _interopRequireDefault(require("@mui/material/BottomNavigation"));
|
|
15
|
+
var _CardContent = _interopRequireDefault(require("@mui/material/CardContent"));
|
|
16
|
+
var _CardActions = _interopRequireDefault(require("@mui/material/CardActions"));
|
|
17
|
+
var _Card = _interopRequireDefault(require("@mui/material/Card"));
|
|
18
|
+
var _CardMedia = _interopRequireDefault(require("@mui/material/CardMedia"));
|
|
19
|
+
var _CardHeader = _interopRequireDefault(require("@mui/material/CardHeader"));
|
|
20
|
+
var _Collapse = _interopRequireDefault(require("@mui/material/Collapse"));
|
|
21
|
+
var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
|
|
22
|
+
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
23
|
+
var _ListItemAvatar = _interopRequireDefault(require("@mui/material/ListItemAvatar"));
|
|
24
|
+
var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
|
|
25
|
+
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
26
|
+
var _List = _interopRequireDefault(require("@mui/material/List"));
|
|
27
|
+
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
28
|
+
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
29
|
+
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
30
|
+
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
31
|
+
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
32
|
+
var _Slide = _interopRequireDefault(require("@mui/material/Slide"));
|
|
33
|
+
var _RadioGroup = _interopRequireDefault(require("@mui/material/RadioGroup"));
|
|
34
|
+
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
35
|
+
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
36
|
+
var _AccordionActions = _interopRequireDefault(require("@mui/material/AccordionActions"));
|
|
37
|
+
var _AccordionDetails = _interopRequireDefault(require("@mui/material/AccordionDetails"));
|
|
38
|
+
var _AccordionSummary = _interopRequireDefault(require("@mui/material/AccordionSummary"));
|
|
39
|
+
var _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
|
|
40
|
+
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
41
|
+
var _LinearProgress = _interopRequireDefault(require("@mui/material/LinearProgress"));
|
|
42
|
+
var _FormHelperText = _interopRequireDefault(require("@mui/material/FormHelperText"));
|
|
43
|
+
var _FormGroup = _interopRequireDefault(require("@mui/material/FormGroup"));
|
|
44
|
+
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
45
|
+
var _FormLabel = _interopRequireDefault(require("@mui/material/FormLabel"));
|
|
46
|
+
var _Fade = _interopRequireDefault(require("@mui/material/Fade"));
|
|
47
|
+
var _StepContent = _interopRequireDefault(require("@mui/material/StepContent"));
|
|
48
|
+
var _StepButton = _interopRequireDefault(require("@mui/material/StepButton"));
|
|
49
|
+
var _Step = _interopRequireDefault(require("@mui/material/Step"));
|
|
50
|
+
var _Stepper = _interopRequireDefault(require("@mui/material/Stepper"));
|
|
51
|
+
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
52
|
+
var _TablePagination = _interopRequireDefault(require("@mui/material/TablePagination"));
|
|
53
|
+
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
54
|
+
var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
|
|
55
|
+
var _Table = _interopRequireDefault(require("@mui/material/Table"));
|
|
56
|
+
var _TableHead = _interopRequireDefault(require("@mui/material/TableHead"));
|
|
57
|
+
var _Tooltip = require("@mui/material/Tooltip");
|
|
58
|
+
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
59
|
+
var _Input = _interopRequireDefault(require("@mui/material/Input"));
|
|
60
|
+
var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
|
|
61
|
+
var _TableFooter = _interopRequireDefault(require("@mui/material/TableFooter"));
|
|
62
|
+
var _Zoom = _interopRequireDefault(require("@mui/material/Zoom"));
|
|
63
|
+
var _ClickAwayListener = _interopRequireDefault(require("@mui/material/ClickAwayListener"));
|
|
64
|
+
var _ListSubheader = _interopRequireDefault(require("@mui/material/ListSubheader"));
|
|
65
|
+
var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
|
|
66
|
+
var _People = _interopRequireDefault(require("@mui/icons-material/People"));
|
|
@@ -236,10 +236,10 @@ function DocSearchHit(props) {
|
|
|
236
236
|
children: children
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
DocSearchHit.propTypes = {
|
|
240
240
|
children: _propTypes.default.node,
|
|
241
241
|
hit: _propTypes.default.object.isRequired
|
|
242
|
-
}
|
|
242
|
+
};
|
|
243
243
|
function AppSearch() {
|
|
244
244
|
(0, _useLazyCSS.default)('https://cdn.jsdelivr.net/npm/@docsearch/css@3.0.0-alpha.40/dist/style.min.css', '#app-search');
|
|
245
245
|
const FADE_DURATION = 100; // ms
|
|
@@ -236,10 +236,10 @@ function DocSearchHit(props) {
|
|
|
236
236
|
children: children
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
DocSearchHit.propTypes = {
|
|
240
240
|
children: _propTypes.default.node,
|
|
241
241
|
hit: _propTypes.default.object.isRequired
|
|
242
|
-
}
|
|
242
|
+
};
|
|
243
243
|
function AppSearch() {
|
|
244
244
|
(0, _useLazyCSS.default)('https://cdn.jsdelivr.net/npm/@docsearch/css@3.0.0-alpha.40/dist/style.min.css', '#app-search');
|
|
245
245
|
const FADE_DURATION = 100; // ms
|
|
@@ -8,16 +8,15 @@ exports.default = transformer;
|
|
|
8
8
|
var _path = require("path");
|
|
9
9
|
var _jscodeshiftAddImports = _interopRequireDefault(require("jscodeshift-add-imports"));
|
|
10
10
|
var _getJSExports = _interopRequireDefault(require("../util/getJSExports"));
|
|
11
|
-
// istanbul ignore next
|
|
12
|
-
if (process.env.NODE_ENV === 'test') {
|
|
13
|
-
const resolve = require.resolve;
|
|
14
|
-
require.resolve = source => resolve(source.replace(/^@mui\/material\/modern/, '../../../mui-material/src'));
|
|
15
|
-
}
|
|
16
11
|
function transformer(fileInfo, api, options) {
|
|
17
12
|
const j = api.jscodeshift;
|
|
18
13
|
const importModule = options.importModule || '@mui/material';
|
|
19
14
|
const targetModule = options.targetModule || '@mui/material';
|
|
20
|
-
|
|
15
|
+
let resolveModule = importModule;
|
|
16
|
+
if (process.env.NODE_ENV === 'test') {
|
|
17
|
+
resolveModule = resolveModule.replace(/^@mui\/material/, '@mui/material-v5');
|
|
18
|
+
}
|
|
19
|
+
const whitelist = (0, _getJSExports.default)(require.resolve(`${resolveModule}/modern`, {
|
|
21
20
|
paths: [(0, _path.dirname)(fileInfo.path)]
|
|
22
21
|
}));
|
|
23
22
|
const printOptions = options.printOptions || {
|
|
@@ -29,7 +29,7 @@ function styledV6(file, api, options) {
|
|
|
29
29
|
args = path.node.arguments;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// 1. collecting styles that should be
|
|
32
|
+
// 1. collecting styles that should be transformed
|
|
33
33
|
args.forEach(arg => {
|
|
34
34
|
if (arg.type === 'ArrowFunctionExpression' && arg.params[0] && arg.params[0].type === 'ObjectPattern') {
|
|
35
35
|
styles.push(arg);
|
|
@@ -23,7 +23,7 @@ function themeV6(file, api, options) {
|
|
|
23
23
|
args = [path.node];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// 1. collecting styles that should be
|
|
26
|
+
// 1. collecting styles that should be transformed
|
|
27
27
|
args.forEach(arg => {
|
|
28
28
|
if (arg.type === 'ArrowFunctionExpression' && arg.params[0] && arg.params[0].type === 'ObjectPattern') {
|
|
29
29
|
styles.push(arg);
|