@agilemotion/oui-react-js 1.3.1 → 1.3.2
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/dist/ApplicationContext.js +72 -12
- package/dist/BasicApp.js +12 -5
- package/dist/BasicAppHome.js +2 -2
- package/dist/BusinessPortalApp.css +37 -0
- package/dist/BusinessPortalApp.js +115 -0
- package/dist/BusinessPortalAppHome.js +167 -0
- package/dist/RestUtils.js +1 -5
- package/dist/assets/jss/components/footerStyle.js +7 -4
- package/dist/assets/jss/views/loginBasicStyle.js +0 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +76 -0
- package/dist/components/Graph.js +26 -18
- package/dist/components/GraphNode.js +0 -2
- package/dist/components/Icon.js +8 -0
- package/dist/components/SignaturePanel.js +118 -0
- package/dist/components/StepperTitleBar.js +4 -2
- package/dist/components/dashboard/{BasicBusinessApp.js → BasicBusinessAppDashboard.js} +17 -16
- package/dist/components/dashboard/BusinessPortalAppDashboard.css +5 -0
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +191 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +23 -12
- package/dist/components/dashboard/components/portal/Timeline.js +17 -0
- package/dist/components/dashboard/components/portal/Workspace.css +25 -0
- package/dist/components/dashboard/components/portal/Workspace.js +48 -0
- package/dist/components/dashboard/components/portal/portal-dashboard.css +25 -0
- package/dist/components/footer/Footer.js +43 -10
- package/dist/components/form/BaseField.js +11 -2
- package/dist/components/form/DatePicker.js +62 -1
- package/dist/components/form/FieldSet.js +1 -1
- package/dist/components/form/Form.js +26 -6
- package/dist/components/form/SelectItem.js +10 -3
- package/dist/components/form/UploadField.js +122 -44
- package/dist/components/layout/Layout.js +9 -0
- package/dist/components/layout/ViewPort.js +3 -2
- package/dist/components/menu/MenuLink.js +7 -0
- package/dist/components/navbars/HomeNavbar.js +0 -10
- package/dist/components/navbars/PortalNavbar.css +75 -0
- package/dist/components/navbars/PortalNavbar.js +138 -0
- package/dist/components/signatures/SignatureTemplateDesigner.js +6 -4
- package/dist/event/RouteActionHandler.js +1 -1
- package/dist/view/Dashboard.js +17 -13
- package/dist/view/PortalDashboard.js +33 -0
- package/dist/view/security/ChangePasswordBasic.js +1 -0
- package/dist/view/security/ForgotPasswordBasic.js +1 -0
- package/dist/view/security/LoginBasic.js +6 -1
- package/dist/view/security/LoginBusinessPortal.js +267 -0
- package/dist/view/security/ResetPasswordBasic.js +1 -0
- package/package.json +22 -21
- package/dist/assets/img/flogo.png +0 -0
|
@@ -123,7 +123,17 @@ class ApplicationContext {
|
|
|
123
123
|
legendValue += "</span>";
|
|
124
124
|
this.props.appBarTitle = legendValue;
|
|
125
125
|
} else if (!view.popUp) {
|
|
126
|
-
|
|
126
|
+
let legendPath = "";
|
|
127
|
+
|
|
128
|
+
for (let i = 0; i < this.graphs[0].initialNavHistoryDepth; i++) {
|
|
129
|
+
legendPath += "".concat(this.navHistory[i].title);
|
|
130
|
+
|
|
131
|
+
if (i < this.graphs[0].initialNavHistoryDepth - 1) {
|
|
132
|
+
legendPath += legendIconArrow;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
this.props.appBarTitle = "".concat(legendPath).concat(legendIconArrow, "<span>").concat(this.graphs[0].title, "</span>");
|
|
127
137
|
this.graphs[0].setCurrentNodeTitle(titleValue);
|
|
128
138
|
}
|
|
129
139
|
|
|
@@ -357,7 +367,7 @@ class ApplicationContext {
|
|
|
357
367
|
|
|
358
368
|
let currentView = this.views[this.views.length - 1];
|
|
359
369
|
|
|
360
|
-
if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle)) {
|
|
370
|
+
if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle) && !_Utils.default.isNull(currentView.handle.api)) {
|
|
361
371
|
if (id === currentView.handle.api.id) {
|
|
362
372
|
return currentView.handle.api;
|
|
363
373
|
}
|
|
@@ -593,6 +603,14 @@ class ApplicationContext {
|
|
|
593
603
|
|
|
594
604
|
closeCurrentView() {
|
|
595
605
|
instance.closeCurrentView();
|
|
606
|
+
},
|
|
607
|
+
|
|
608
|
+
refreshUserAvatar(avatar) {
|
|
609
|
+
instance.refreshUserAvatar(avatar);
|
|
610
|
+
},
|
|
611
|
+
|
|
612
|
+
alert(message, messageType) {
|
|
613
|
+
instance.alert(message, messageType);
|
|
596
614
|
}
|
|
597
615
|
|
|
598
616
|
};
|
|
@@ -653,6 +671,15 @@ class ApplicationContext {
|
|
|
653
671
|
this.listeners.push(listener);
|
|
654
672
|
}
|
|
655
673
|
|
|
674
|
+
alert(message, messageType) {
|
|
675
|
+
let event = new _Event.default(this, this.getCurrentView().config.id, {
|
|
676
|
+
messageType: messageType,
|
|
677
|
+
message: message
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
_Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
|
|
681
|
+
}
|
|
682
|
+
|
|
656
683
|
refreshUserAvatar(avatar) {
|
|
657
684
|
var _iterator12 = _createForOfIteratorHelper(this.listeners),
|
|
658
685
|
_step12;
|
|
@@ -694,12 +721,23 @@ class ApplicationContext {
|
|
|
694
721
|
*/
|
|
695
722
|
|
|
696
723
|
|
|
724
|
+
loadAnchor(graph) {
|
|
725
|
+
this.navHistory.splice(graph.initialNavHistoryDepth - 1, this.navHistory.length);
|
|
726
|
+
this.addView(graph.anchorView, graph.anchorHistoryElement.path, true);
|
|
727
|
+
this.getViewPortHistory().push("/switch");
|
|
728
|
+
this.getViewPortHistory().push("/view/" + graph.anchorView.config.id);
|
|
729
|
+
}
|
|
730
|
+
|
|
697
731
|
removeLoadedGraph() {
|
|
698
|
-
this.
|
|
699
|
-
|
|
732
|
+
if (this.graphs.length > 0) {
|
|
733
|
+
this.closeCurrentView(false);
|
|
734
|
+
let graph = this.graphs[this.graphs.length - 1];
|
|
735
|
+
this.loadAnchor(graph);
|
|
736
|
+
this.graphs.splice(0, this.graphs.length);
|
|
737
|
+
}
|
|
700
738
|
}
|
|
701
739
|
|
|
702
|
-
loadGraph(isParent, isPopup, config) {
|
|
740
|
+
loadGraph(isParent, isPopup, config, parameterValues) {
|
|
703
741
|
if (isParent && !isPopup) {
|
|
704
742
|
this.navHistory.splice(0, this.navHistory.length);
|
|
705
743
|
|
|
@@ -721,20 +759,42 @@ class ApplicationContext {
|
|
|
721
759
|
}
|
|
722
760
|
|
|
723
761
|
let graph = new _Graph.default(_Utils.default.parseConfig(config));
|
|
762
|
+
graph.initialNavHistoryDepth = this.navHistory.length;
|
|
763
|
+
|
|
764
|
+
if (this.navHistory.length > 0) {
|
|
765
|
+
graph.anchorView = this.getCurrentView();
|
|
766
|
+
graph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
767
|
+
}
|
|
768
|
+
|
|
724
769
|
graph.init();
|
|
770
|
+
|
|
771
|
+
var _iterator14 = _createForOfIteratorHelper(parameterValues),
|
|
772
|
+
_step14;
|
|
773
|
+
|
|
774
|
+
try {
|
|
775
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
776
|
+
const parameterValue = _step14.value;
|
|
777
|
+
graph.model[parameterValue.name] = parameterValue.value;
|
|
778
|
+
}
|
|
779
|
+
} catch (err) {
|
|
780
|
+
_iterator14.e(err);
|
|
781
|
+
} finally {
|
|
782
|
+
_iterator14.f();
|
|
783
|
+
}
|
|
784
|
+
|
|
725
785
|
this.graphs.push(graph);
|
|
726
786
|
}
|
|
727
787
|
|
|
728
788
|
signalGraph(id, event) {
|
|
729
789
|
if (this.graphs.length > 0) {
|
|
730
|
-
let graphToSignal = this.graphs[
|
|
790
|
+
let graphToSignal = this.graphs[this.graphs.length - 1];
|
|
731
791
|
|
|
732
|
-
var
|
|
733
|
-
|
|
792
|
+
var _iterator15 = _createForOfIteratorHelper(this.graphs),
|
|
793
|
+
_step15;
|
|
734
794
|
|
|
735
795
|
try {
|
|
736
|
-
for (
|
|
737
|
-
const graph =
|
|
796
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
797
|
+
const graph = _step15.value;
|
|
738
798
|
|
|
739
799
|
if (id === graph.id) {
|
|
740
800
|
graphToSignal = graph;
|
|
@@ -742,9 +802,9 @@ class ApplicationContext {
|
|
|
742
802
|
}
|
|
743
803
|
}
|
|
744
804
|
} catch (err) {
|
|
745
|
-
|
|
805
|
+
_iterator15.e(err);
|
|
746
806
|
} finally {
|
|
747
|
-
|
|
807
|
+
_iterator15.f();
|
|
748
808
|
}
|
|
749
809
|
|
|
750
810
|
graphToSignal.signal(event);
|
package/dist/BasicApp.js
CHANGED
|
@@ -68,8 +68,13 @@ class BasicApp extends _react.Component {
|
|
|
68
68
|
render: props => /*#__PURE__*/_react.default.createElement(_LoginBasic.default, {
|
|
69
69
|
url: location + this.props.contextRoot + this.props.authUrl + "/login",
|
|
70
70
|
background: 'rgba(0, 0, 0, 0.65)',
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
textColor: this.props.loginTextColor,
|
|
72
|
+
footerLogo: this.props.footerLogo,
|
|
73
|
+
footerText: this.props.footerText,
|
|
74
|
+
footerWidth: this.props.footerWidth,
|
|
75
|
+
footerSplitterColor: this.props.footerSplitterColor,
|
|
76
|
+
title: this.props.loginTitle,
|
|
77
|
+
logo: this.props.logo
|
|
73
78
|
})
|
|
74
79
|
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
75
80
|
path: "/forgot-password",
|
|
@@ -77,23 +82,25 @@ class BasicApp extends _react.Component {
|
|
|
77
82
|
url: location + this.props.contextRoot + this.props.authUrl + "/password/forgot",
|
|
78
83
|
background: 'rgba(0, 0, 0, 0.65)',
|
|
79
84
|
title: 'Business Agility',
|
|
80
|
-
logo: this.props.
|
|
85
|
+
logo: this.props.logo
|
|
81
86
|
})
|
|
82
87
|
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
83
88
|
path: "/reset-password",
|
|
84
89
|
render: () => /*#__PURE__*/_react.default.createElement(_ResetPasswordBasic.default, {
|
|
85
90
|
url: location + this.props.contextRoot + this.props.authUrl + "/password/confirmForgot",
|
|
86
91
|
background: 'rgba(0, 0, 0, 0.65)',
|
|
92
|
+
textColor: this.props.loginTextColor,
|
|
87
93
|
title: 'Business Agility',
|
|
88
|
-
logo: this.props.
|
|
94
|
+
logo: this.props.logo
|
|
89
95
|
})
|
|
90
96
|
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
91
97
|
path: "/change-password",
|
|
92
98
|
render: () => /*#__PURE__*/_react.default.createElement(_ChangePasswordBasic.default, {
|
|
93
99
|
url: location + this.props.contextRoot + this.props.authUrl + "/password/challenge",
|
|
94
100
|
background: 'rgba(0, 0, 0, 0.65)',
|
|
101
|
+
textColor: this.props.loginTextColor,
|
|
95
102
|
title: 'Business Agility',
|
|
96
|
-
logo: this.props.
|
|
103
|
+
logo: this.props.logo
|
|
97
104
|
})
|
|
98
105
|
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
|
|
99
106
|
to: "/home"
|
package/dist/BasicAppHome.js
CHANGED
|
@@ -17,7 +17,7 @@ var _DashboardStore = require("./redux/store/DashboardStore");
|
|
|
17
17
|
|
|
18
18
|
var _LoadingIndicator = _interopRequireDefault(require("./components/LoadingIndicator"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _BasicBusinessAppDashboard = _interopRequireDefault(require("./components/dashboard/BasicBusinessAppDashboard"));
|
|
21
21
|
|
|
22
22
|
var _ApplicationContext = _interopRequireWildcard(require("./ApplicationContext"));
|
|
23
23
|
|
|
@@ -147,7 +147,7 @@ class BasicAppHome extends _react.Component {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
})
|
|
150
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement(_BasicBusinessAppDashboard.default, {
|
|
151
151
|
logoutCallBack: () => {
|
|
152
152
|
this.logout();
|
|
153
153
|
},
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
animation: App-logo-spin infinite 20s linear;
|
|
7
|
+
height: 80px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.App-header {
|
|
11
|
+
background-color: #f1f1f1;
|
|
12
|
+
height: 150px;
|
|
13
|
+
padding: 20px;
|
|
14
|
+
color: white;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.App-intro {
|
|
18
|
+
font-size: large;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes App-logo-spin {
|
|
22
|
+
from { transform: rotate(0deg); }
|
|
23
|
+
to { transform: rotate(360deg); }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#pdf-frame {
|
|
27
|
+
display: none;
|
|
28
|
+
align-items: stretch;
|
|
29
|
+
position: absolute;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100%
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#root {
|
|
35
|
+
height: 100%;
|
|
36
|
+
background-color: #ffffff;
|
|
37
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./BusinessPortalApp.css");
|
|
11
|
+
|
|
12
|
+
var _themeDefault = _interopRequireDefault(require("./theme-default"));
|
|
13
|
+
|
|
14
|
+
var _MuiThemeProvider = _interopRequireDefault(require("material-ui/styles/MuiThemeProvider"));
|
|
15
|
+
|
|
16
|
+
var _reactRouterDom = require("react-router-dom");
|
|
17
|
+
|
|
18
|
+
var _LoginBusinessPortal = _interopRequireDefault(require("./view/security/LoginBusinessPortal"));
|
|
19
|
+
|
|
20
|
+
var _ForgotPasswordBasic = _interopRequireDefault(require("./view/security/ForgotPasswordBasic"));
|
|
21
|
+
|
|
22
|
+
var _ResetPasswordBasic = _interopRequireDefault(require("./view/security/ResetPasswordBasic"));
|
|
23
|
+
|
|
24
|
+
var _ChangePasswordBasic = _interopRequireDefault(require("./view/security/ChangePasswordBasic"));
|
|
25
|
+
|
|
26
|
+
var _core = require("@material-ui/core");
|
|
27
|
+
|
|
28
|
+
var _ThemeProvider = _interopRequireDefault(require("@material-ui/styles/ThemeProvider"));
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
36
|
+
const location = window.location.protocol + "//" + window.location.hostname;
|
|
37
|
+
const agilityTheme = (0, _core.createMuiTheme)({
|
|
38
|
+
palette: {
|
|
39
|
+
primary: {
|
|
40
|
+
main: '#015588'
|
|
41
|
+
},
|
|
42
|
+
secondary: {
|
|
43
|
+
main: '#000099'
|
|
44
|
+
},
|
|
45
|
+
white: {
|
|
46
|
+
main: '#ffffff'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
class BusinessPortalApp extends _react.Component {
|
|
52
|
+
render() {
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, {
|
|
54
|
+
basename: "/"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_MuiThemeProvider.default, {
|
|
56
|
+
muiTheme: _themeDefault.default
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, {
|
|
58
|
+
theme: agilityTheme
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
60
|
+
path: "/",
|
|
61
|
+
exact: true,
|
|
62
|
+
component: this.props.home
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
64
|
+
path: "/home",
|
|
65
|
+
component: this.props.home
|
|
66
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
67
|
+
path: "/login",
|
|
68
|
+
render: props => /*#__PURE__*/_react.default.createElement(_LoginBusinessPortal.default, {
|
|
69
|
+
url: location + this.props.contextRoot + this.props.authUrl + "/login",
|
|
70
|
+
background: '#fafafa',
|
|
71
|
+
textColor: this.props.loginTextColor,
|
|
72
|
+
footerLogo: this.props.footerLogo,
|
|
73
|
+
footerText: this.props.footerText,
|
|
74
|
+
footerWidth: this.props.footerWidth,
|
|
75
|
+
footerSplitterColor: this.props.footerSplitterColor,
|
|
76
|
+
title: this.props.loginTitle,
|
|
77
|
+
logo: this.props.logo
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
80
|
+
path: "/forgot-password",
|
|
81
|
+
render: () => /*#__PURE__*/_react.default.createElement(_ForgotPasswordBasic.default, {
|
|
82
|
+
url: location + this.props.contextRoot + this.props.authUrl + "/password/forgot",
|
|
83
|
+
background: '#fafafa',
|
|
84
|
+
textColor: this.props.loginTextColor,
|
|
85
|
+
title: this.props.loginTitle,
|
|
86
|
+
logo: this.props.logo
|
|
87
|
+
})
|
|
88
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
89
|
+
path: "/reset-password",
|
|
90
|
+
render: () => /*#__PURE__*/_react.default.createElement(_ResetPasswordBasic.default, {
|
|
91
|
+
url: location + this.props.contextRoot + this.props.authUrl + "/password/confirmForgot",
|
|
92
|
+
background: '#fafafa',
|
|
93
|
+
textColor: this.props.loginTextColor,
|
|
94
|
+
title: this.props.loginTitle,
|
|
95
|
+
logo: this.props.logo
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
98
|
+
path: "/change-password",
|
|
99
|
+
render: () => /*#__PURE__*/_react.default.createElement(_ChangePasswordBasic.default, {
|
|
100
|
+
url: location + this.props.contextRoot + this.props.authUrl + "/password/challenge",
|
|
101
|
+
background: '#fafafa',
|
|
102
|
+
textColor: this.props.loginTextColor,
|
|
103
|
+
title: this.props.loginTitle,
|
|
104
|
+
logo: this.props.logo
|
|
105
|
+
})
|
|
106
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
|
|
107
|
+
to: "/home"
|
|
108
|
+
})))));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
var _default = (0, _reactRouterDom.withRouter)(BusinessPortalApp);
|
|
114
|
+
|
|
115
|
+
exports.default = _default;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactRedux = require("react-redux");
|
|
11
|
+
|
|
12
|
+
var _reactRouterDom = require("react-router-dom");
|
|
13
|
+
|
|
14
|
+
var _redux = require("redux");
|
|
15
|
+
|
|
16
|
+
var _DashboardStore = require("./redux/store/DashboardStore");
|
|
17
|
+
|
|
18
|
+
var _LoadingIndicator = _interopRequireDefault(require("./components/LoadingIndicator"));
|
|
19
|
+
|
|
20
|
+
var _BusinessPortalAppDashboard = _interopRequireDefault(require("./components/dashboard/BusinessPortalAppDashboard"));
|
|
21
|
+
|
|
22
|
+
var _ApplicationContext = _interopRequireWildcard(require("./ApplicationContext"));
|
|
23
|
+
|
|
24
|
+
var _TokenManager = _interopRequireDefault(require("./security/TokenManager"));
|
|
25
|
+
|
|
26
|
+
var _Utils = _interopRequireDefault(require("./Utils"));
|
|
27
|
+
|
|
28
|
+
var _core = require("@material-ui/core");
|
|
29
|
+
|
|
30
|
+
var _ThemeProvider = _interopRequireDefault(require("@material-ui/styles/ThemeProvider"));
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
+
|
|
34
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
35
|
+
|
|
36
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
+
|
|
38
|
+
const location = window.location.protocol + "//" + window.location.hostname;
|
|
39
|
+
|
|
40
|
+
const propHandler = state => {
|
|
41
|
+
let isLoading = state.dashboard.isLoading;
|
|
42
|
+
let dashboardSettings = state.dashboard.dashboardSettings;
|
|
43
|
+
return {
|
|
44
|
+
isLoading: isLoading,
|
|
45
|
+
error: state.error,
|
|
46
|
+
dashboardSettings: dashboardSettings
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
class BusinessPortalAppHome extends _react.Component {
|
|
51
|
+
constructor(props) {
|
|
52
|
+
super(props);
|
|
53
|
+
this.state = {
|
|
54
|
+
dashboardSettings: null,
|
|
55
|
+
message: "",
|
|
56
|
+
open: false,
|
|
57
|
+
avatarUrl: null,
|
|
58
|
+
tokenRefreshMonitorStarted: false
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
componentDidMount() {
|
|
63
|
+
_ApplicationContext.default.setApplicationHistory(this.props.history);
|
|
64
|
+
|
|
65
|
+
_ApplicationContext.default.setServiceApiPath(this.props.serviceApiPath);
|
|
66
|
+
|
|
67
|
+
_ApplicationContext.default.setUIConfigPath(this.props.uiConfigPath);
|
|
68
|
+
|
|
69
|
+
_ApplicationContext.default.setContextRoot(this.props.contextRoot);
|
|
70
|
+
|
|
71
|
+
_ApplicationContext.default.setBaseApiUrl(this.props.baseApiUrl);
|
|
72
|
+
|
|
73
|
+
_ApplicationContext.default.setFilesApiPath(this.props.filesApiPath);
|
|
74
|
+
|
|
75
|
+
this.props.getDashboardSettings(location + this.props.contextRoot + this.props.baseApiUrl + "/ui/setup");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
componentDidUpdate(prevProps) {
|
|
79
|
+
if (JSON.stringify(prevProps.dashboardSettings) !== JSON.stringify(this.props.dashboardSettings) && !this.props.error) {
|
|
80
|
+
this.setState({
|
|
81
|
+
dashboardSettings: this.props.dashboardSettings
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (!this.state.tokenRefreshMonitorStarted && !_Utils.default.isNull(this.props.dashboardSettings)) {
|
|
85
|
+
_TokenManager.default.startTokenRefreshMonitor(location + this.props.contextRoot + this.props.authUrl + "/refresh", this.props.dashboardSettings.userName);
|
|
86
|
+
|
|
87
|
+
this.setState({
|
|
88
|
+
tokenRefreshMonitorStarted: true
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (!_Utils.default.isNull(this.props.dashboardSettings.userAvatar)) {
|
|
92
|
+
this.setState({
|
|
93
|
+
avatarUrl: this.props.dashboardSettings.userAvatar.url
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let avatarListener = {};
|
|
98
|
+
avatarListener.type = _ApplicationContext.AVATAR_LISTENER_TYPE;
|
|
99
|
+
|
|
100
|
+
avatarListener.handler = avatar => {
|
|
101
|
+
this.setState({
|
|
102
|
+
avatarUrl: avatar.url
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
_ApplicationContext.default.addApplicationListener(avatarListener);
|
|
107
|
+
|
|
108
|
+
_ApplicationContext.default.setApplicationThemeColors(this.props.dashboardSettings.primaryColor, this.props.dashboardSettings.secondaryColor);
|
|
109
|
+
|
|
110
|
+
this.setState({
|
|
111
|
+
loadingColor: this.props.dashboardSettings.primaryColor
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (prevProps.error !== this.props.error && this.props.error) {
|
|
117
|
+
this.setState({
|
|
118
|
+
message: "A system error has accured"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
logout() {
|
|
124
|
+
sessionStorage.removeItem("accessToken");
|
|
125
|
+
sessionStorage.removeItem("refreshToken");
|
|
126
|
+
sessionStorage.removeItem("idToken");
|
|
127
|
+
sessionStorage.removeItem("lastLogin");
|
|
128
|
+
|
|
129
|
+
_ApplicationContext.default.clear();
|
|
130
|
+
|
|
131
|
+
this.props.history.push('/login');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
render() {
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
+
className: "main w-100 h-100 d-inline-block"
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: "w-100 h-100"
|
|
139
|
+
}, this.state.dashboardSettings !== null ? /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, {
|
|
140
|
+
theme: (0, _core.createMuiTheme)({
|
|
141
|
+
palette: {
|
|
142
|
+
primary: {
|
|
143
|
+
main: this.state.dashboardSettings.primaryColor
|
|
144
|
+
},
|
|
145
|
+
secondary: {
|
|
146
|
+
main: this.state.dashboardSettings.secondaryColor
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement(_BusinessPortalAppDashboard.default, {
|
|
151
|
+
logoutCallBack: () => {
|
|
152
|
+
this.logout();
|
|
153
|
+
},
|
|
154
|
+
settings: this.state.dashboardSettings,
|
|
155
|
+
avatar: !_Utils.default.isNull(this.state.avatarUrl) ? this.state.avatarUrl : null,
|
|
156
|
+
logo: this.state.dashboardSettings.logo,
|
|
157
|
+
appLogoPath: this.props.appLogoPath
|
|
158
|
+
})) : null), /*#__PURE__*/_react.default.createElement(_LoadingIndicator.default, {
|
|
159
|
+
color: this.state.loadingColor
|
|
160
|
+
})));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(propHandler, dispatch => (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch))(BusinessPortalAppHome));
|
|
166
|
+
|
|
167
|
+
exports.default = _default;
|
package/dist/RestUtils.js
CHANGED
|
@@ -97,9 +97,7 @@ class RestUtils {
|
|
|
97
97
|
|
|
98
98
|
if (httpParameterType === 'PATH_VARIABLE') {
|
|
99
99
|
if (!_Utils.default.isNull(parameterValue)) {
|
|
100
|
-
|
|
101
|
-
pathParameters += '/' + JSON.stringify(parameterValue.value);
|
|
102
|
-
}
|
|
100
|
+
pathParameters += '/' + (typeof parameterValue.value === 'object' ? JSON.stringify(parameterValue.value) : parameterValue.value);
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
|
|
@@ -257,8 +255,6 @@ class RestUtils {
|
|
|
257
255
|
}
|
|
258
256
|
}
|
|
259
257
|
}, e => {
|
|
260
|
-
console.error(e);
|
|
261
|
-
|
|
262
258
|
if (errorCallback !== null) {
|
|
263
259
|
errorCallback(e);
|
|
264
260
|
}
|
|
@@ -16,23 +16,26 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
16
16
|
const footerStyle = {
|
|
17
17
|
block: {},
|
|
18
18
|
left: {
|
|
19
|
-
float: "left!important"
|
|
20
|
-
display: "block"
|
|
19
|
+
float: "left !important"
|
|
21
20
|
},
|
|
22
21
|
right: {
|
|
23
22
|
margin: "0",
|
|
24
23
|
fontSize: "14px",
|
|
25
|
-
float: "right!important",
|
|
24
|
+
float: "right !important",
|
|
26
25
|
padding: "15px",
|
|
27
26
|
paddingRight: "70px"
|
|
28
27
|
},
|
|
29
28
|
footer: _objectSpread(_objectSpread({
|
|
30
29
|
bottom: "0",
|
|
31
|
-
borderTop: "1px solid " + _rootStyle.grayColor[15],
|
|
32
30
|
padding: "15px 0"
|
|
33
31
|
}, _rootStyle.defaultFont), {}, {
|
|
34
32
|
zIndex: 4
|
|
35
33
|
}),
|
|
34
|
+
wrapper: {
|
|
35
|
+
display: "inline-block",
|
|
36
|
+
textAlign: '-webkit-center',
|
|
37
|
+
width: '100%'
|
|
38
|
+
},
|
|
36
39
|
container: _objectSpread(_objectSpread({
|
|
37
40
|
zIndex: 3
|
|
38
41
|
}, _rootStyle.container), {}, {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _colors = require("material-ui/styles/colors");
|
|
9
|
+
|
|
10
|
+
const styles = {
|
|
11
|
+
title: {
|
|
12
|
+
minWidth: 320,
|
|
13
|
+
maxWidth: 400,
|
|
14
|
+
height: 'auto',
|
|
15
|
+
fontSize: '30px'
|
|
16
|
+
},
|
|
17
|
+
loginContainer: {
|
|
18
|
+
minWidth: 320,
|
|
19
|
+
maxWidth: 400,
|
|
20
|
+
padding: '16px',
|
|
21
|
+
height: 'auto'
|
|
22
|
+
},
|
|
23
|
+
paper: {
|
|
24
|
+
padding: 20,
|
|
25
|
+
overflow: 'auto'
|
|
26
|
+
},
|
|
27
|
+
buttonsDiv: {
|
|
28
|
+
display: "inline-block",
|
|
29
|
+
textAlign: "center",
|
|
30
|
+
marginTop: '8px'
|
|
31
|
+
},
|
|
32
|
+
flatButton: {
|
|
33
|
+
color: _colors.grey500
|
|
34
|
+
},
|
|
35
|
+
checkRemember: {
|
|
36
|
+
style: {
|
|
37
|
+
float: 'left',
|
|
38
|
+
maxWidth: 180,
|
|
39
|
+
paddingTop: 5
|
|
40
|
+
},
|
|
41
|
+
labelStyle: {
|
|
42
|
+
color: _colors.grey500
|
|
43
|
+
},
|
|
44
|
+
iconStyle: {
|
|
45
|
+
color: _colors.grey500,
|
|
46
|
+
borderColor: _colors.grey500,
|
|
47
|
+
fill: _colors.grey500
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
componentWrapper: {
|
|
51
|
+
display: "inline",
|
|
52
|
+
textAlign: "center"
|
|
53
|
+
},
|
|
54
|
+
loginBtn: {
|
|
55
|
+
float: 'right'
|
|
56
|
+
},
|
|
57
|
+
btn: {
|
|
58
|
+
background: '#4f81e9',
|
|
59
|
+
color: _colors.white,
|
|
60
|
+
padding: 7,
|
|
61
|
+
borderRadius: 2,
|
|
62
|
+
margin: 2,
|
|
63
|
+
fontSize: 13
|
|
64
|
+
},
|
|
65
|
+
btnFacebook: {
|
|
66
|
+
background: '#4f81e9'
|
|
67
|
+
},
|
|
68
|
+
btnGoogle: {
|
|
69
|
+
background: '#e14441'
|
|
70
|
+
},
|
|
71
|
+
btnSpan: {
|
|
72
|
+
marginLeft: 5
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var _default = styles;
|
|
76
|
+
exports.default = _default;
|