Skip to content

Commit 1c167ba

Browse files
committed
react-admin 4.x upgrade
1 parent 55803a0 commit 1c167ba

13 files changed

+5959
-7706
lines changed

demo/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"name": "test-ra",
33
"version": "1.0.0",
44
"scripts": {
5-
"prestart": "node ./overrides/patch.js",
6-
"start": "PORT=4455 ../node_modules/.bin/react-scripts start",
7-
"build": "CI=false ../node_modules/.bin/react-scripts build && cp ./build/index.html ./build/404.html"
5+
"start": "PORT=4455 yarn --check-files && ../node_modules/.bin/react-scripts start"
86
},
97
"homepage": "http://benwinding.github.io/react-admin-import-csv",
108
"browserslist": {
@@ -18,5 +16,8 @@
1816
"last 1 firefox version",
1917
"last 1 safari version"
2018
]
19+
},
20+
"dependencies": {
21+
"react-admin-import-csv": "file:.."
2122
}
2223
}

demo/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import englishMessages from "ra-language-english";
88
import russianMessages from "ra-language-russian";
99
import spanishMessages from "ra-language-spanish";
1010
import chineseMessages from "ra-language-chinese";
11-
import {i18n as domainMessages} from "./build-watch";
11+
import {i18n as domainMessages} from "react-admin-import-csv";
1212

1313
const App = () => {
1414
const dataProvider = fakeDataProvider({

demo/src/posts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from "react-admin";
1919

2020
// Change this import to: from "react-admin-import-csv"
21-
import { ImportButton } from "./build-watch";
21+
import { ImportButton } from "react-admin-import-csv";
2222
import { CreateButton, ExportButton } from "ra-ui-materialui";
2323

2424
const ListActions = (props) => {

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@
2828
"clean": "rimraf dist"
2929
},
3030
"peerDependencies": {
31-
"react-admin": "3.x"
31+
"react-admin": "4.x"
3232
},
3333
"dependencies": {
3434
"papaparse": "5.x",
35-
"ramda": "^0.27.0"
35+
"ramda": "^0.28.0",
36+
"react-redux": "^8.0.1"
3637
},
3738
"devDependencies": {
38-
"@types/jest": "24.0.11",
39-
"@types/node": "11.12.0",
40-
"@types/papaparse": "4.x",
41-
"@types/ramda": "0.27.34",
42-
"@types/react": "16.8.10",
43-
"@types/react-dom": "16.8.3",
44-
"@types/react-redux": "^7.1.7",
39+
"@types/jest": "27.4.1",
40+
"@types/node": "17.0.25",
41+
"@types/papaparse": "5.x",
42+
"@types/ramda": "0.28.11",
43+
"@types/react": "^17.0.0",
44+
"@types/react-dom": "^17.0.0",
4545
"jest-coverage-badges": "^1.1.2",
46-
"ra-data-fakerest": "^3.2.2",
47-
"ra-language-chinese": "^2.0.5",
46+
"ra-data-fakerest": "^4.0.1",
47+
"ra-language-chinese": "^2.0.10",
4848
"ra-language-russian": "^3.13.5",
4949
"ra-language-spanish": "1.x",
50-
"react": "16.8.6",
51-
"react-admin": "3.10.x",
52-
"react-dom": "16.8.3",
53-
"react-scripts": "^3.4.3",
54-
"source-map-loader": "^0.2.4",
55-
"ts-jest": "^24.x.x",
56-
"typescript": "3.x"
50+
"react": "^17.0.0",
51+
"react-admin": "4.0.x",
52+
"react-dom": "^17.0.0",
53+
"react-scripts": "^5.0.1",
54+
"source-map-loader": "^3.0.1",
55+
"ts-jest": "^27.x.x",
56+
"typescript": "4.x"
5757
}
5858
}

src/components/SharedDialogButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { Button, ListItem } from "@material-ui/core";
2+
import { Button, ListItem } from "@mui/material";
33

44
export function SharedDialogButton(props: {
55
onClick: () => void;

src/components/SharedDialogWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44

55
DialogContent,
66
DialogTitle
7-
} from "@material-ui/core";
7+
} from "@mui/material";
88

99
export function SharedDialogWrapper(props: {
1010
open: boolean;

src/components/SharedLoader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { CircularProgress } from "@material-ui/core";
2+
import { CircularProgress } from "@mui/material";
33

44
export function SharedLoader(props: { loadingTxt: string }) {
55
return (

src/components/import-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22
import { Button as RAButton } from "react-admin";
33

4-
import { Tooltip } from "@material-ui/core";
5-
import GetAppIcon from "@material-ui/icons/GetApp";
4+
import { Tooltip } from "@mui/material";
5+
import { GetApp as GetAppIcon } from "@mui/icons-material";
66
import { translateWrapper } from "../translateWrapper";
77

88
interface ImportButtonProps {

src/components/import-csv-dialog-each-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { SharedDialogButton } from "./SharedDialogButton";
33
import { SharedDialogWrapper } from "./SharedDialogWrapper";
44
import { SharedLoader } from "./SharedLoader";
55
import { translateWrapper } from "../translateWrapper";
6-
import { List } from "@material-ui/core";
7-
import { Done, Undo, Clear, Add } from "@material-ui/icons";
6+
import { List } from "@mui/material";
7+
import { Done, Undo, Clear, Add } from "@mui/icons-material";
88

99
interface ImportCsvDialogEachItemProps {
1010
disableImportNew: boolean;

src/components/import-csv-dialog-strategy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React, { useEffect } from "react";
22
import { SharedDialogWrapper } from "./SharedDialogWrapper";
33
import { SharedLoader } from "./SharedLoader";
44
import { translateWrapper } from "../translateWrapper";
5-
import { List } from "@material-ui/core";
6-
import { Done, Undo, FileCopy } from "@material-ui/icons";
5+
import { List } from "@mui/material";
6+
import { Done, Undo, FileCopy } from "@mui/icons-material";
77
import { SharedDialogButton } from "./SharedDialogButton";
88

99
interface ImportCsvDialogStrategyProps {

0 commit comments

Comments
 (0)