From 1a868116614dd9996c78e69941b537e9da19460b Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Tue, 1 Feb 2022 13:18:42 +0100 Subject: Update ODLUX Updated to Material-ui 5, updated dashboard view, removed NetworkMap, LinkCalculator and LineOfSightApp, small bugfixes Issue-ID: CCSDK-3580 Signed-off-by: Aijana Schumann Change-Id: Id0fc148673e23a755cafc2be1c489248c38ff47c --- sdnr/wt/odlux/apps/helpApp/package.json | 25 ++++++++++++---------- .../apps/helpApp/src/components/helpStatus.tsx | 7 ++++-- .../odlux/apps/helpApp/src/components/tocEntry.tsx | 11 ++++++---- .../wt/odlux/apps/helpApp/src/views/helpTocApp.tsx | 2 +- sdnr/wt/odlux/apps/helpApp/webpack.config.js | 4 ++-- 5 files changed, 29 insertions(+), 20 deletions(-) (limited to 'sdnr/wt/odlux/apps/helpApp') diff --git a/sdnr/wt/odlux/apps/helpApp/package.json b/sdnr/wt/odlux/apps/helpApp/package.json index 51e383b11..5bcfdce7b 100644 --- a/sdnr/wt/odlux/apps/helpApp/package.json +++ b/sdnr/wt/odlux/apps/helpApp/package.json @@ -21,25 +21,28 @@ "author": "Matthias Fischer", "license": "Apache-2.0", "dependencies": { + "@emotion/react": "^11.7.0", + "@emotion/styled": "^11.6.0", + "@mui/icons-material": "^5.2.0", + "@mui/material": "^5.2.2", + "@mui/styles": "^5.2.2", "@odlux/framework": "*", - "marked": "0.6.0", + "@types/highlight.js": "9.12.3", "@types/marked": "0.6.0", + "github-markdown-css": "2.10.0", "highlight.js": "9.13.1", - "@types/highlight.js": "9.12.3", - "github-markdown-css": "2.10.0" + "marked": "0.6.0" }, "peerDependencies": { - "@types/react": "17.0.3", - "@types/react-dom": "17.0.2", - "@types/react-router-dom": "5.1.7", - "@material-ui/core": "4.11.4", - "@material-ui/icons": "4.11.2", "@types/classnames": "2.2.6", "@types/flux": "3.1.8", "@types/jquery": "3.3.10", + "@types/react": "17.0.37", + "@types/react-dom": "17.0.11", + "@types/react-router-dom": "5.1.7", "jquery": "3.3.1", - "react": "17.0.1", - "react-dom": "17.0.1", + "react": "17.0.2", + "react-dom": "17.0.2", "react-router-dom": "5.2.0" } -} \ No newline at end of file +} diff --git a/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx b/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx index 140935715..fd4cd3fa4 100644 --- a/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx +++ b/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx @@ -17,13 +17,16 @@ */ import * as React from 'react'; -import { withStyles, WithStyles, createStyles, Theme } from '@material-ui/core/styles'; +import { Theme } from '@mui/material/styles'; +import { WithStyles } from '@mui/styles'; +import withStyles from '@mui/styles/withStyles'; +import createStyles from '@mui/styles/createStyles'; import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; // select app icon import connect, { Connect } from '../../../../framework/src/flux/connect'; import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore'; -import Typography from '@material-ui/core/Typography'; +import Typography from '@mui/material/Typography'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'; import { withRouter, RouteComponentProps } from 'react-router'; diff --git a/sdnr/wt/odlux/apps/helpApp/src/components/tocEntry.tsx b/sdnr/wt/odlux/apps/helpApp/src/components/tocEntry.tsx index fc7b8dff5..295b3caf9 100644 --- a/sdnr/wt/odlux/apps/helpApp/src/components/tocEntry.tsx +++ b/sdnr/wt/odlux/apps/helpApp/src/components/tocEntry.tsx @@ -18,7 +18,10 @@ import * as React from "react" import { TocTreeNode } from "../models/tocNode" -import { Typography, Link, makeStyles, Theme, createStyles } from "@material-ui/core" +import { Typography, Link, Theme } from "@mui/material"; + +import makeStyles from '@mui/styles/makeStyles'; +import createStyles from '@mui/styles/createStyles'; const useStyles = makeStyles((theme: Theme) => createStyles({ @@ -57,7 +60,7 @@ const TocEntry: React.FunctionComponent = (props) => { return (
{ areNodesEmpty ? - navigate(event, props.overviewUri)} className={classes.link}> {props.label} + navigate(event, props.overviewUri)} className={classes.link}> {props.label} : <> @@ -65,11 +68,11 @@ const TocEntry: React.FunctionComponent = (props) => {
- navigate(event, props.overviewUri)} className={classes.sublink}>Overview + navigate(event, props.overviewUri)} className={classes.sublink}>Overview {props.nodes !== undefined && props.nodes.map((item, index) => - navigate(event, item.uri)} className={classes.sublink}>{item.label} + navigate(event, item.uri)} className={classes.sublink}>{item.label} )}
diff --git a/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx b/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx index 65d4609e2..2d8b0364d 100644 --- a/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx +++ b/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx @@ -23,7 +23,7 @@ import * as React from 'react' import { FunctionComponent } from "react"; import { IApplicationStoreState } from "../../../../framework/src/store/applicationStore"; import TocEntry from "../components/tocEntry"; -import { Typography } from "@material-ui/core"; +import { Typography } from "@mui/material"; const mapProps = (state: IApplicationStoreState) => ({ helpToc: state.help.toc, diff --git a/sdnr/wt/odlux/apps/helpApp/webpack.config.js b/sdnr/wt/odlux/apps/helpApp/webpack.config.js index 14ab528a7..963a99ef3 100644 --- a/sdnr/wt/odlux/apps/helpApp/webpack.config.js +++ b/sdnr/wt/odlux/apps/helpApp/webpack.config.js @@ -103,7 +103,7 @@ module.exports = (env) => { manifest: require(path.resolve(frameworkPath, "app-manifest.json")), sourceType: "umd2" }), - ...(env === "release") ? [ + ...(env === "release" ? [ new webpack.DefinePlugin({ "process.env": { NODE_ENV: "'production'", @@ -121,7 +121,7 @@ module.exports = (env) => { from: 'index.html', to: distPath }]), - ] + ]) ], devServer: { public: "http://localhost:3100", -- cgit 1.2.3-korg