summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/helpApp
diff options
context:
space:
mode:
authorsai-neetha <sai-neetha.phulmali@highstreet-technologies.com>2023-03-20 08:05:47 +0100
committerhighstreetherbert <herbert.eiselt@highstreet-technologies.com>2023-03-29 19:06:25 +0200
commit15e2d3a29b0d1a304965e34f114a911e5a7abdb3 (patch)
tree711ef5616aceb115a1081cccd152eeae0e87bc79 /sdnr/wt/odlux/apps/helpApp
parentac5e2dc8f1ee4d5549f7260374e8164d52b07f55 (diff)
Odlux Update
Add eslint and custom icons update Issue-ID: CCSDK-3871 Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com> Change-Id: If6b676128cc9cff0437a5dc54f85eaafd3b8c586 Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/helpApp')
-rw-r--r--sdnr/wt/odlux/apps/helpApp/pom.xml3
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/assets/icons/helpAppIcon.svg27
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx10
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts3
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/plugin.tsx16
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx4
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx4
-rw-r--r--sdnr/wt/odlux/apps/helpApp/tsconfig.json2
-rw-r--r--sdnr/wt/odlux/apps/helpApp/webpack.config.js10
9 files changed, 59 insertions, 20 deletions
diff --git a/sdnr/wt/odlux/apps/helpApp/pom.xml b/sdnr/wt/odlux/apps/helpApp/pom.xml
index 9da030913..07ac09164 100644
--- a/sdnr/wt/odlux/apps/helpApp/pom.xml
+++ b/sdnr/wt/odlux/apps/helpApp/pom.xml
@@ -19,6 +19,7 @@
~ ============LICENSE_END=======================================================
~
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -139,7 +140,7 @@
<!-- optional: default phase is "generate-resources" -->
<phase>initialize</phase>
<configuration>
- <nodeVersion>v12.13.0</nodeVersion>
+ <nodeVersion>v12.22.0</nodeVersion>
<yarnVersion>v1.22.10</yarnVersion>
</configuration>
</execution>
diff --git a/sdnr/wt/odlux/apps/helpApp/src/assets/icons/helpAppIcon.svg b/sdnr/wt/odlux/apps/helpApp/src/assets/icons/helpAppIcon.svg
new file mode 100644
index 000000000..298eaa162
--- /dev/null
+++ b/sdnr/wt/odlux/apps/helpApp/src/assets/icons/helpAppIcon.svg
@@ -0,0 +1,27 @@
+<!-- highstreet technologies GmbH colour scheme
+ Grey #565656
+ LBlue #36A9E1
+ DBlue #246DA2
+ Green #003F2C / #006C4B
+ Yellw #C8D400
+ Red #D81036
+-->
+
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="310 250 400 400">
+
+<g transform="translate(0,1024) scale(0.1,-0.1)">
+
+<path fill="#565656" d="M4926 7634 c-126 -17 -209 -38 -318 -79 -79 -31 -195 -89 -208 -104
+-10 -12 -69 -51 -77 -51 -4 0 -42 -28 -83 -63 -227 -190 -375 -475 -375 -722
+0 -81 3 -95 30 -143 111 -201 365 -252 514 -103 46 46 88 124 121 226 28 87
+109 255 153 315 67 95 172 168 275 192 86 20 268 21 346 2 113 -28 152 -50
+240 -137 64 -63 88 -95 104 -137 49 -125 52 -225 12 -332 -38 -102 -132 -209
+-360 -409 -153 -134 -329 -309 -375 -374 -97 -136 -148 -274 -166 -448 -19
+-192 12 -305 104 -379 64 -50 141 -72 228 -65 82 7 125 24 177 71 49 45 73
+100 105 241 59 258 63 263 528 687 218 198 295 284 374 419 134 230 138 543 9
+803 -101 202 -252 349 -474 461 -246 124 -573 172 -884 129z"/>
+
+<path fill="#36A9E1" d="M 5098 4587 C 4582 4587 4582 3845 5098 3845 C 5614 3847 5614 4585 5098 4587 Z"/>
+
+</g>
+</svg>
diff --git a/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx b/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx
index fd4cd3fa4..985b404a7 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/components/helpStatus.tsx
@@ -15,7 +15,8 @@
* the License.
* ============LICENSE_END==========================================================================
*/
-import * as React from 'react';
+import React from 'react';
+import { withRouter, RouteComponentProps } from 'react-router';
import { Theme } from '@mui/material/styles';
import { WithStyles } from '@mui/styles';
@@ -23,13 +24,12 @@ 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 '@mui/material/Typography';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
-import { withRouter, RouteComponentProps } from 'react-router';
+
+import { connect, Connect } from '../../../../framework/src/flux/connect';
+import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
const styles = (theme: Theme) => createStyles({
icon: {
diff --git a/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts b/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
index cc6a98488..29e07959a 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
@@ -18,9 +18,10 @@
// main state handler
import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
-import { TocTreeNode } from 'models/tocNode';
import { IActionHandler } from '../../../../framework/src/flux/action';
+
import { LoadTocAction, TocLoadedAction, LoadDocumentAction, DocumentLoadedAction } from '../actions/helpActions';
+import { TocTreeNode } from '../models/tocNode';
export interface IHelpAppStoreState {
busy: boolean;
diff --git a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
index 50a264b15..5d860e530 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
@@ -17,14 +17,12 @@
*/
// app configuration and main entry point for the app
-import * as React from "react";
+import React from "react";
import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom';
-import { faFirstAid } from '@fortawesome/free-solid-svg-icons'; // select app icon
-
import applicationManager from '../../../framework/src/services/applicationManager';
import { IApplicationStoreState } from "../../../framework/src/store/applicationStore";
-import connect, { Connect, IDispatcher } from '../../../framework/src/flux/connect';
+import { connect, Connect, IDispatcher } from '../../../framework/src/flux/connect';
import { requestTocAsyncAction, requestDocumentAsyncActionCreator } from "./actions/helpActions";
import { helpAppRootHandler } from './handlers/helpAppRootHandler';
@@ -35,11 +33,13 @@ import { HelpStatus } from "./components/helpStatus";
import '!style-loader!css-loader!highlight.js/styles/default.css';
import HelpTocApp from "./views/helpTocApp";
+const appIcon = require('./assets/icons/helpAppIcon.svg'); // select app icon
+
const mapProps = (state: IApplicationStoreState) => ({
});
-const mapDisp = (dispatcher: IDispatcher) => ({
+const mapDispatch = (dispatcher: IDispatcher) => ({
requestDocument: (path: string) => {
dispatcher.dispatch(requestDocumentAsyncActionCreator(path));
}
@@ -47,7 +47,7 @@ const mapDisp = (dispatcher: IDispatcher) => ({
let currentHelpPath: string | undefined = undefined;
-const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDisp>) => {
+const HelpApplicationRouteAdapter = connect(mapProps, mapDispatch)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDispatch>) => {
if (currentHelpPath !== props.match.params["0"]) {
// route parameter has changed
@@ -76,7 +76,7 @@ const App = withRouter((props: RouteComponentProps) => (
export async function register() {
const applicationApi = applicationManager.registerApplication({
name: "help",
- icon: faFirstAid,
+ icon: appIcon,
rootComponent: App,
rootActionHandler: helpAppRootHandler,
statusBarElement: HelpStatus,
@@ -84,7 +84,7 @@ export async function register() {
//subMenuEntry: SubMenuEntry
});
- // start the initial toc request after the application store is initalized
+ // start the initial toc request after the application store is initialized
const store = await applicationApi.applicationStoreInitialized;
store.dispatch(requestTocAsyncAction);
diff --git a/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx b/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
index eab44b4ca..5940517b4 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
@@ -15,13 +15,13 @@
* the License.
* ============LICENSE_END==========================================================================
*/
-import * as React from 'react';
+import React from 'react';
import * as marked from 'marked';
import { resolvePath } from '../utilities/path';
import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
-import connect, { Connect } from '../../../../framework/src/flux/connect';
+import { connect, Connect } from '../../../../framework/src/flux/connect';
import { Markdown } from "../components/markdown";
diff --git a/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx b/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx
index e1de4d0f5..6a6a89123 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/views/helpTocApp.tsx
@@ -16,10 +16,10 @@
* ============LICENSE_END==========================================================================
*/
-import connect, { Connect, IDispatcher } from "../../../../framework/src/flux/connect";
+import React from 'react'
+import {connect, Connect, IDispatcher } from "../../../../framework/src/flux/connect";
import { NavigateToApplication } from "../../../../framework/src/actions/navigationActions";
-import * as React from 'react'
import { FunctionComponent } from "react";
import { IApplicationStoreState } from "../../../../framework/src/store/applicationStore";
import TocEntry from "../components/tocEntry";
diff --git a/sdnr/wt/odlux/apps/helpApp/tsconfig.json b/sdnr/wt/odlux/apps/helpApp/tsconfig.json
index a66b5d828..ca65092e0 100644
--- a/sdnr/wt/odlux/apps/helpApp/tsconfig.json
+++ b/sdnr/wt/odlux/apps/helpApp/tsconfig.json
@@ -4,7 +4,7 @@
"outDir": "./dist",
"sourceMap": true,
"forceConsistentCasingInFileNames": true,
- "allowSyntheticDefaultImports": false,
+ "allowSyntheticDefaultImports": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noFallthroughCasesInSwitch": true,
diff --git a/sdnr/wt/odlux/apps/helpApp/webpack.config.js b/sdnr/wt/odlux/apps/helpApp/webpack.config.js
index b069c2a31..a48f7b976 100644
--- a/sdnr/wt/odlux/apps/helpApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/helpApp/webpack.config.js
@@ -74,6 +74,16 @@ module.exports = (env) => {
plugins: () => [autoprefixer]
}
}]
+ }, {
+ //don't minify images
+ test: /\.(png|gif|jpg|svg)$/,
+ use: [{
+ loader: 'url-loader',
+ options: {
+ limit: 10,
+ name: './images/[name].[ext]'
+ }
+ }]
}]
},