Skip to content

Commit d4774c4

Browse files
author
Brett Smith
committed
changes to implement semantic-ui over material-ui
1 parent b070bbd commit d4774c4

File tree

81 files changed

+21572
-15665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+21572
-15665
lines changed

README.md

+11-2,415
Large diffs are not rendered by default.

images.d.ts

-7
This file was deleted.

package-lock.json

+20,847-12,192
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+44-36
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
11
{
2-
"name": "updraftcms",
2+
"name": "dc-updraft-cms",
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@material-ui/core": "^4.6.0",
7-
"@material-ui/icons": "^4.5.1",
8-
"classnames": "^2.2.6",
9-
"draft-js": "^0.11.2",
10-
"prop-types": "^15.6.2",
11-
"react": "^16.11.0",
12-
"react-beautiful-dnd": "^11.0.5",
13-
"react-dom": "^16.11.0",
14-
"react-redux": "^7.1.3",
6+
"draft-js": "^0.11.5",
7+
"node-sass": "^4.13.1",
8+
"react": "^16.13.1",
9+
"react-beautiful-dnd": "^12.2.0",
10+
"react-dom": "^16.13.1",
11+
"react-redux": "^7.2.0",
1512
"react-router": "^5.1.2",
1613
"react-router-dom": "^5.1.2",
17-
"react-scripts-ts": "^4.0.8",
18-
"react-select": "^3.0.8",
19-
"redux": "^4.0.4",
14+
"react-scripts": "3.3.1",
15+
"redux": "^4.0.5",
2016
"redux-thunk": "^2.3.0",
21-
"uuid": "^3.3.3"
17+
"semantic-ui-css": "^2.4.1",
18+
"semantic-ui-react": "^0.88.2",
19+
"typescript": "^3.8.3",
20+
"uuid": "^3.4.0"
2221
},
2322
"scripts": {
24-
"start": "react-scripts-ts start",
25-
"build": "react-scripts-ts build",
26-
"test": "react-scripts-ts test --env=jsdom",
27-
"eject": "react-scripts-ts eject"
23+
"start": "react-scripts start",
24+
"build": "react-scripts build",
25+
"test": "react-scripts test",
26+
"eject": "react-scripts eject"
2827
},
2928
"devDependencies": {
30-
"@material-ui/lab": "^4.0.0-alpha.31",
31-
"@types/draft-js": "^0.10.37",
32-
"@types/jest": "^24.0.22",
33-
"@types/node": "^12.12.6",
34-
"@types/react": "^16.9.11",
35-
"@types/react-beautiful-dnd": "^11.0.3",
36-
"@types/react-dom": "^16.9.3",
37-
"@types/react-redux": "^7.1.5",
38-
"@types/react-router-dom": "^4.3.5",
39-
"@types/react-select": "^3.0.8",
40-
"@types/uuid": "^3.4.6",
41-
"typescript": "^3.7.2"
29+
"@testing-library/jest-dom": "^4.2.4",
30+
"@testing-library/react": "^9.5.0",
31+
"@testing-library/user-event": "^7.2.1",
32+
"@types/draft-js": "^0.10.38",
33+
"@types/jest": "^24.9.1",
34+
"@types/node": "^12.12.35",
35+
"@types/react": "^16.9.34",
36+
"@types/react-beautiful-dnd": "^12.1.2",
37+
"@types/react-dom": "^16.9.6",
38+
"@types/react-redux": "^7.1.7",
39+
"@types/react-router-dom": "^5.1.3",
40+
"@types/uuid": "^3.4.8"
4241
},
43-
"browserslist": [
44-
">0.2%",
45-
"not dead",
46-
"not ie <= 11",
47-
"not op_mini all"
48-
]
42+
"eslintConfig": {
43+
"extends": "react-app"
44+
},
45+
"browserslist": {
46+
"production": [
47+
">0.2%",
48+
"not dead",
49+
"not op_mini all"
50+
],
51+
"development": [
52+
"last 1 chrome version",
53+
"last 1 firefox version",
54+
"last 1 safari version"
55+
]
56+
}
4957
}

public/favicon.ico

-720 Bytes
Binary file not shown.

public/index.html

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6-
<meta name="theme-color" content="#000000">
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
713
<!--
8-
manifest.json provides metadata used when your web app is added to the
9-
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1016
-->
11-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
12-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1318
<!--
1419
Notice the use of %PUBLIC_URL% in the tags above.
1520
It will be replaced with the URL of the `public` folder during the build.
@@ -22,9 +27,7 @@
2227
<title>React App</title>
2328
</head>
2429
<body>
25-
<noscript>
26-
You need to enable JavaScript to run this app.
27-
</noscript>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
2831
<div id="root"></div>
2932
<!--
3033
This HTML file is a template.

public/logo192.png

5.22 KB
Loading

public/logo512.png

9.44 KB
Loading

public/manifest.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66
"src": "favicon.ico",
77
"sizes": "64x64 32x32 24x24 16x16",
88
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
919
}
1020
],
11-
"start_url": "./index.html",
21+
"start_url": ".",
1222
"display": "standalone",
1323
"theme_color": "#000000",
1424
"background_color": "#ffffff"

public/robots.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *

src/App.Routing.tsx

+15-13
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ import * as React from "react";
22
import { connect } from 'react-redux';
33
import { Route } from "react-router-dom";
44

5-
import { IAppState, IContentDocumentState, IObjectModelState } from 'src/Store/State';
5+
import { IAppState } from 'Store/State';
6+
import { IObjectModelState } from './Store/State/IObjectModel';
7+
import { IContentDocumentState } from './Store/State/IContentDocument';
68

7-
import { AppActionsCreators } from 'src/Store/ActionCreators';
9+
import { AppActionsCreators } from 'Store/ActionCreators';
810

9-
import ContentDocumentIndexContainer from 'src/Containers/ContentDocuments';
10-
import MediaObjectIndexContainer from 'src/Containers/MediaObjects';
11-
import ObjectModelIndexContainer from "src/Containers/ObjectModels";
11+
import ContentDocumentIndexContainer from 'Containers/ContentDocuments';
12+
import MediaObjectIndexContainer from 'Containers/MediaObjects';
13+
import ObjectModelIndexContainer from "Containers/ObjectModels";
1214

1315
type IAppRoutingProps =
1416
IObjectModelState &
@@ -43,11 +45,11 @@ class AppRouting extends React.Component<IAppRoutingProps, {}> {
4345
<ContentDocumentIndexContainer {...renderProps} {...this.props} />
4446
)}
4547
/> <Route
46-
path="/media-library"
47-
render={renderProps => (
48-
<MediaObjectIndexContainer {...renderProps} {...this.props} />
49-
)}
50-
/>
48+
path="/media-library"
49+
render={renderProps => (
50+
<MediaObjectIndexContainer {...renderProps} {...this.props} />
51+
)}
52+
/>
5153
</>
5254
);
5355
}
@@ -56,6 +58,6 @@ class AppRouting extends React.Component<IAppRoutingProps, {}> {
5658
export default connect((state: IAppState) => {
5759
return { ...state.contentDocument, ...state.objectModel }
5860
}, {
59-
...AppActionsCreators.ObjectModel,
60-
...AppActionsCreators.ContentDocument
61-
})(AppRouting);
61+
...AppActionsCreators.ObjectModel,
62+
...AppActionsCreators.ContentDocument
63+
})(AppRouting);

src/App.Styles.tsx

Whitespace-only changes.

src/App.Theme.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tslint:disable:object-literal-sort-keys
22

3-
import { createMuiTheme } from "@material-ui/core/styles";
43

54
const msTheme = {
65
palette: {
@@ -34,7 +33,7 @@ const msTheme = {
3433
}
3534
};
3635

37-
export default createMuiTheme({
36+
export default ({
3837
palette: {
3938
primary: {
4039
main: msTheme.palette.themePrimary

src/App.css

-28
This file was deleted.

src/App.tsx

+5-9
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ import * as React from "react";
33

44
import { BrowserRouter as Router } from "react-router-dom";
55

6-
import { ThemeProvider } from '@material-ui/core/styles'
76

87
// import Constants from "./Constants";
98

109
import UpdraftStore from './Store'
1110

1211
import AppRouting from "./App.Routing";
13-
import theme from "./App.Theme";
1412

1513
import Layout from "./Presentation/_Layout";
1614

@@ -20,13 +18,11 @@ export default class App extends React.Component<any, any> {
2018

2119
public render() {
2220
return <UpdraftStore DataPersistenceMiddleware={new LocalStorageData}>
23-
<ThemeProvider theme={theme}>
24-
<Router>
25-
<Layout>
26-
<AppRouting />
27-
</Layout>
28-
</Router>
29-
</ThemeProvider>
21+
<Router>
22+
<Layout>
23+
<AppRouting />
24+
</Layout>
25+
</Router>
3026
</UpdraftStore>
3127
}
3228
}

src/Containers/ContentDocuments/index.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import * as React from "react";
22
import { Route } from "react-router-dom";
33

4-
import { AppActionsCreators } from 'src/Store/ActionCreators';
5-
import { IContentDocumentState } from 'src/Store/State';
4+
import { AppActionsCreators } from 'Store/ActionCreators';
65

7-
import ContentDocumentEdit from 'src/Presentation/ContentDocuments/ContentDocumentEdit';
8-
import ContentDocumentList from "src/Presentation/ContentDocuments/ContentDocumentList";
6+
import ContentDocumentEdit from 'Presentation/ContentDocuments/ContentDocumentEdit';
7+
import ContentDocumentList from "Presentation/ContentDocuments/ContentDocumentList";
98

10-
import { defaultContentDocument } from 'src/Store/State/IContentDocument';
11-
import { IObjectModelState } from 'src/Store/State/IObjectModel';
12-
import { IContentDocument } from 'src/Types';
9+
import { defaultContentDocument, IContentDocumentState } from 'Store/State/IContentDocument';
10+
import { IObjectModelState } from 'Store/State/IObjectModel';
11+
import { IContentDocument } from 'Types';
1312

1413
type IContentDocumentContainerProps =
1514
IContentDocumentState &
@@ -69,7 +68,7 @@ class ContentDocumentContainer extends React.Component<IContentDocumentContainer
6968
private loadContentDocument = (id: string, objectModelId?: string): IContentDocument => {
7069
const { contentDocuments, objectModels } = this.props;
7170

72-
const contentDocument = contentDocuments.get(id) || { ...defaultContentDocument, id };
71+
const contentDocument: IContentDocument = contentDocuments.get(id) || { ...defaultContentDocument, id };
7372
if (!objectModelId) { return contentDocument; }
7473

7574
const objectModel = objectModels.get(objectModelId)

src/Containers/MediaObjects/index.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import * as React from "react";
33
import { connect } from 'react-redux';
44
import { Route } from "react-router-dom";
55

6-
import { AppActionsCreators } from 'src/Store/ActionCreators';
7-
import { IAppState, IMediaObjectState } from 'src/Store/State';
6+
import { AppActionsCreators } from 'Store/ActionCreators';
7+
import { IAppState } from 'Store/State';
88

9-
import MediaObjectList from 'src/Presentation/MediaObjects/MediaObjectList';
9+
import MediaObjectList from 'Presentation/MediaObjects/MediaObjectList';
10+
import { IMediaObjectState } from 'Store/State/IMediaObject';
1011

1112

1213

src/Containers/ObjectModels/index.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
/* tslint:disable */
33
import * as React from "react";
44
import { connect } from 'react-redux';
5-
import { Route } from "react-router-dom";
5+
import { Route, Switch } from "react-router-dom";
66

7-
import { AppActionsCreators } from 'src/Store/ActionCreators';
8-
import { IAppState, IObjectModelState } from 'src/Store/State';
7+
import { AppActionsCreators } from 'Store/ActionCreators';
8+
import { IAppState } from 'Store/State';
99

10-
import ObjectModelEdit from "src/Presentation/ObjectModels/ObjectModelEdit";
11-
import ObjectModelList from "src/Presentation/ObjectModels/ObjectModelList";
12-
import { defaultObjectModel } from 'src/Store/State/IObjectModel';
10+
import ObjectModelEdit from "Presentation/ObjectModels/ObjectModelEdit";
11+
import ObjectModelList from "Presentation/ObjectModels/ObjectModelList";
12+
import { defaultObjectModel, IObjectModelState } from 'Store/State/IObjectModel';
1313

1414

1515
type IObjectModelContainerProps = IObjectModelState & typeof AppActionsCreators.ObjectModel
@@ -19,7 +19,7 @@ class ObjectModelContainer extends React.Component<IObjectModelContainerProps, {
1919
public render() {
2020
const { objectModels } = this.props;
2121
return (
22-
<React.Fragment>
22+
<Switch>
2323
<Route
2424
path="/object-models"
2525
exact={true}
@@ -37,13 +37,13 @@ class ObjectModelContainer extends React.Component<IObjectModelContainerProps, {
3737
deleteObjectModel={this.props.deleteObjectModel} />
3838
}}
3939
/>
40-
</React.Fragment>
40+
</Switch>
4141
);
4242
}
4343
}
4444

4545
export default connect((state: IAppState) => {
4646
return { ...state.objectModel }
4747
}, {
48-
...AppActionsCreators.ObjectModel
49-
})(ObjectModelContainer);
48+
...AppActionsCreators.ObjectModel
49+
})(ObjectModelContainer);

0 commit comments

Comments
 (0)