@vidispine/cra-template-vdt 22.1.0 → 22.2.0-pre.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/README.md +2 -0
- package/package.json +9 -9
- package/template/src/components/ErrorBoundary.js +2 -2
- package/template/src/index.js +0 -2
- package/template/src/pages/Login/Login.js +0 -2
- package/template/src/pages/NotFound/NotFound.js +0 -2
- package/template/src/pages/Root/Root.js +2 -2
- package/template/src/pages/Root/components/Drawer.js +0 -2
- package/template/src/pages/Root/components/Header.js +0 -2
- package/template/src/pages/Root/components/Layout.js +2 -2
- package/template/src/pages/SearchCollection/SearchCollection.js +0 -2
- package/template/src/pages/SearchItem/SearchItem.js +0 -2
- package/template.json +21 -11
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ This is a base vdt template for [Create React App](https://github.com/facebook/c
|
|
|
8
8
|
|
|
9
9
|
```shell
|
|
10
10
|
yarn create react-app my-vdt-app --template @vidispine/vdt@latest
|
|
11
|
+
# or "@next" for latest pre-release
|
|
11
12
|
cd my-vdt-app
|
|
12
13
|
REACT_APP_VIDISPINE_URL=https://example.myvidispine.com yarn start
|
|
13
14
|
```
|
|
@@ -18,6 +19,7 @@ _(yarn create is available in Yarn 0.25+)_
|
|
|
18
19
|
|
|
19
20
|
```shell
|
|
20
21
|
npx create-react-app my-vdt-app --template @vidispine/vdt@latest
|
|
22
|
+
# or "@next" for latest pre-release
|
|
21
23
|
cd my-vdt-app
|
|
22
24
|
REACT_APP_VIDISPINE_URL=https://example.myvidispine.com npm start
|
|
23
25
|
```
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/cra-template-vdt",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.2.0-pre.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
|
-
"
|
|
5
|
+
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
+
"description": "CRA template using vdt packages",
|
|
10
|
+
"homepage": "https://vidispine.github.io/vdt?path=/docs/start-here-template-cra--page",
|
|
9
11
|
"repository": {
|
|
10
12
|
"type": "git",
|
|
11
|
-
"url": "
|
|
12
|
-
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/vidispine/vdt/issues"
|
|
13
|
+
"url": "https://github.com/vidispine/vdt.git",
|
|
14
|
+
"directory": "packages/cra-template-vdt"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"lint": "eslint \"{template/**/*,*}.{js,md}\"",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"template.json"
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@vidispine/eslint-config": "^22.
|
|
26
|
-
"@vidispine/prettier-config": "^22.
|
|
25
|
+
"@vidispine/eslint-config": "^22.2.0-pre.3",
|
|
26
|
+
"@vidispine/prettier-config": "^22.2.0-pre.3"
|
|
27
27
|
},
|
|
28
28
|
"eslintConfig": {
|
|
29
29
|
"extends": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"prettier": "@vidispine/prettier-config",
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "817cf85f82123735f459189c73448ed27b45b53b"
|
|
39
39
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Container, Paper } from '@material-ui/core';
|
|
4
4
|
|
|
5
|
-
export default class ErrorBoundary extends
|
|
5
|
+
export default class ErrorBoundary extends Component {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super(props);
|
|
8
8
|
this.state = { hasError: false };
|
package/template/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Route, Redirect, Switch } from 'react-router-dom';
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ import Layout from './components/Layout';
|
|
|
14
14
|
import RootPath from './path';
|
|
15
15
|
|
|
16
16
|
function Root() {
|
|
17
|
-
const [loginError, setLoginError] =
|
|
17
|
+
const [loginError, setLoginError] = useState(!VIDISPINE_URL && 'VIDISPINE_URL is unset');
|
|
18
18
|
const handleLoginError = ({ message }) => {
|
|
19
19
|
setLoginError(message);
|
|
20
20
|
setTimeout(() => setLoginError(), 5000);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { withStyles, Container } from '@material-ui/core';
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ const styles = (theme) => ({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
function Layout({ classes, children }) {
|
|
25
|
-
const [open, setOpen] =
|
|
25
|
+
const [open, setOpen] = useState(true);
|
|
26
26
|
const toggleDrawer = () => setOpen((prevState) => !prevState);
|
|
27
27
|
return (
|
|
28
28
|
<div className={classes.root}>
|
package/template.json
CHANGED
|
@@ -8,29 +8,39 @@
|
|
|
8
8
|
"@material-ui/core": "^4.11.1",
|
|
9
9
|
"@material-ui/icons": "^4.9.1",
|
|
10
10
|
"@material-ui/lab": "^4.0.0-alpha.56",
|
|
11
|
-
"@vidispine/vdt-api": "~22.
|
|
12
|
-
"@vidispine/vdt-materialui": "~22.
|
|
13
|
-
"@vidispine/vdt-react": "~22.
|
|
11
|
+
"@vidispine/vdt-api": "~22.2.0-pre.3",
|
|
12
|
+
"@vidispine/vdt-materialui": "~22.2.0-pre.3",
|
|
13
|
+
"@vidispine/vdt-react": "~22.2.0-pre.3",
|
|
14
14
|
"clsx": "^1.1.1",
|
|
15
|
-
"react": "^
|
|
16
|
-
"react-dom": "^
|
|
15
|
+
"react": "^17.0.2",
|
|
16
|
+
"react-dom": "^17.0.2",
|
|
17
17
|
"react-cookie": "^4.0.3",
|
|
18
18
|
"react-router-dom": "^5.2.0",
|
|
19
19
|
"typeface-roboto": "^0.0.75"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@vidispine/eslint-config": "~22.
|
|
23
|
-
"@vidispine/prettier-config": "~22.
|
|
22
|
+
"@vidispine/eslint-config": "~22.2.0-pre.3",
|
|
23
|
+
"@vidispine/prettier-config": "~22.2.0-pre.3",
|
|
24
24
|
"http-proxy-middleware": "^1.3.1",
|
|
25
25
|
"prettier": "^2.5.1"
|
|
26
26
|
},
|
|
27
27
|
"eslintConfig": {
|
|
28
|
-
"extends": [
|
|
28
|
+
"extends": [
|
|
29
|
+
"@vidispine"
|
|
30
|
+
]
|
|
29
31
|
},
|
|
30
32
|
"prettier": "@vidispine/prettier-config",
|
|
31
33
|
"browserslist": {
|
|
32
|
-
"production": [
|
|
33
|
-
|
|
34
|
+
"production": [
|
|
35
|
+
">0.2%",
|
|
36
|
+
"not dead",
|
|
37
|
+
"not op_mini all"
|
|
38
|
+
],
|
|
39
|
+
"development": [
|
|
40
|
+
"last 1 chrome version",
|
|
41
|
+
"last 1 firefox version",
|
|
42
|
+
"last 1 safari version"
|
|
43
|
+
]
|
|
34
44
|
}
|
|
35
45
|
}
|
|
36
|
-
}
|
|
46
|
+
}
|