@agilemotion/oui-react-js 1.3.0 → 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.
Files changed (71) hide show
  1. package/dist/ApplicationContext.js +151 -38
  2. package/dist/BasicApp.js +16 -9
  3. package/dist/BasicAppHome.js +6 -4
  4. package/dist/BusinessPortalApp.css +37 -0
  5. package/dist/BusinessPortalApp.js +115 -0
  6. package/dist/BusinessPortalAppHome.js +167 -0
  7. package/dist/RestUtils.js +12 -9
  8. package/dist/assets/css/black-dashboard-react.css +1 -2
  9. package/dist/assets/jss/components/footerStyle.js +7 -4
  10. package/dist/assets/jss/views/loginBasicStyle.js +0 -1
  11. package/dist/assets/jss/views/loginBusinessPortalStyle.js +76 -0
  12. package/dist/assets/scss/black-dashboard-react/bootstrap/_reboot.scss +0 -1
  13. package/dist/components/DocumentView.css +4 -0
  14. package/dist/components/DocumentViewer.js +93 -37
  15. package/dist/components/DocumentViewerComponent.js +93 -0
  16. package/dist/components/ElementResizeHandler.js +232 -0
  17. package/dist/components/Graph.js +120 -16
  18. package/dist/components/GraphNode.js +0 -2
  19. package/dist/components/HtmlPanel.js +45 -4
  20. package/dist/components/Icon.js +8 -0
  21. package/dist/components/SignaturePanel.js +118 -0
  22. package/dist/components/StepperTitleBar.css +85 -0
  23. package/dist/components/StepperTitleBar.js +190 -0
  24. package/dist/components/TitleBar.js +1 -1
  25. package/dist/components/Toolbar.js +6 -3
  26. package/dist/components/dashboard/{BasicBusinessApp.js → BasicBusinessAppDashboard.js} +17 -16
  27. package/dist/components/dashboard/BusinessPortalAppDashboard.css +5 -0
  28. package/dist/components/dashboard/BusinessPortalAppDashboard.js +191 -0
  29. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +23 -12
  30. package/dist/components/dashboard/components/portal/Timeline.js +17 -0
  31. package/dist/components/dashboard/components/portal/Workspace.css +25 -0
  32. package/dist/components/dashboard/components/portal/Workspace.js +48 -0
  33. package/dist/components/dashboard/components/portal/portal-dashboard.css +25 -0
  34. package/dist/components/footer/Footer.js +43 -10
  35. package/dist/components/form/BaseField.js +11 -2
  36. package/dist/components/form/DatePicker.js +62 -1
  37. package/dist/components/form/FieldSet.js +1 -1
  38. package/dist/components/form/Form.js +28 -8
  39. package/dist/components/form/SelectItem.js +10 -3
  40. package/dist/components/form/UploadField.js +122 -44
  41. package/dist/components/layout/Layout.js +30 -15
  42. package/dist/components/layout/ViewPort.js +3 -2
  43. package/dist/components/menu/MenuLink.js +7 -0
  44. package/dist/components/navbars/HomeNavbar.js +0 -10
  45. package/dist/components/navbars/PortalNavbar.css +75 -0
  46. package/dist/components/navbars/PortalNavbar.js +138 -0
  47. package/dist/components/signatures/AlertItem.js +71 -0
  48. package/dist/components/signatures/Card.js +39 -0
  49. package/dist/components/signatures/MenuButton.js +108 -0
  50. package/dist/components/signatures/Prompt.js +78 -0
  51. package/dist/components/signatures/ResponsiveTable.css +91 -0
  52. package/dist/components/signatures/ResponsiveTable.js +568 -0
  53. package/dist/components/signatures/SearchView.js +236 -0
  54. package/dist/components/signatures/SignatorySearch.js +115 -0
  55. package/dist/components/signatures/SignatorySearchForm.js +77 -0
  56. package/dist/components/signatures/SignatureInputProps.js +336 -0
  57. package/dist/components/signatures/SignatureTemplateDesigner.js +890 -0
  58. package/dist/components/signatures/Toolbar.js +208 -0
  59. package/dist/components/signatures/ViewUtils.js +309 -0
  60. package/dist/components/signatures/widgets.css +126 -0
  61. package/dist/event/RouteActionHandler.js +1 -1
  62. package/dist/view/Dashboard.js +17 -13
  63. package/dist/view/PortalDashboard.js +33 -0
  64. package/dist/view/security/ChangePasswordBasic.js +1 -0
  65. package/dist/view/security/ForgotPasswordBasic.js +1 -0
  66. package/dist/view/security/LoginBasic.js +6 -1
  67. package/dist/view/security/LoginBusinessPortal.js +267 -0
  68. package/dist/view/security/ResetPasswordBasic.js +1 -0
  69. package/package.json +26 -24
  70. package/dist/assets/img/flogo.png +0 -0
  71. package/dist/components/SignatureTemplateDesigner.js +0 -168
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.TEMPLATE_TOKEN_REGEX = exports.SYSTEM_EVENT = exports.AVATAR_LISTENER_TYPE = exports.APP_VARIABLE = void 0;
6
+ exports.default = exports.LEGEND_ARROW_ICON = exports.TEMPLATE_TOKEN_REGEX = exports.SYSTEM_EVENT = exports.AVATAR_LISTENER_TYPE = exports.APP_VARIABLE = void 0;
7
7
 
8
8
  var _Observable = _interopRequireDefault(require("./event/Observable"));
9
9
 
@@ -41,6 +41,8 @@ const SYSTEM_EVENT = 'SYSTEM_EVENT';
41
41
  exports.SYSTEM_EVENT = SYSTEM_EVENT;
42
42
  const TEMPLATE_TOKEN_REGEX = new RegExp('(([$]{1}[{]{1})(([a-zA-Z0-9_$.@#{}[\\]]*)+){1}([}]{1}))+', 'g');
43
43
  exports.TEMPLATE_TOKEN_REGEX = TEMPLATE_TOKEN_REGEX;
44
+ const LEGEND_ARROW_ICON = " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:__COLOR__'></i> ";
45
+ exports.LEGEND_ARROW_ICON = LEGEND_ARROW_ICON;
44
46
 
45
47
  class ApplicationContext {
46
48
  constructor() {
@@ -70,16 +72,16 @@ class ApplicationContext {
70
72
 
71
73
  _defineProperty(this, "updateAppBarTitle", (viewId, title) => {
72
74
  let view = this.getView(viewId);
75
+ let legendIconArrow = LEGEND_ARROW_ICON.replace('__COLOR__', this.props.secondaryColor);
76
+ let titleValue = '';
73
77
 
74
- if (!view.popUp) {
75
- let titleValue = '';
76
-
77
- if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
78
- titleValue = title;
79
- } else {
80
- titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
81
- }
78
+ if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
79
+ titleValue = title;
80
+ } else {
81
+ titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
82
+ }
82
83
 
84
+ if (!view.popUp && this.graphs.length === 0) {
83
85
  var _iterator = _createForOfIteratorHelper(this.navHistory),
84
86
  _step;
85
87
 
@@ -109,7 +111,7 @@ class ApplicationContext {
109
111
  legendValue += "".concat(navHistoryElement.title);
110
112
 
111
113
  if (counter++ < this.navHistory.length - 1) {
112
- legendValue += " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:".concat(this.props.secondaryColor, "'></i> ");
114
+ legendValue += legendIconArrow;
113
115
  }
114
116
  }
115
117
  } catch (err) {
@@ -120,9 +122,31 @@ class ApplicationContext {
120
122
 
121
123
  legendValue += "</span>";
122
124
  this.props.appBarTitle = legendValue;
123
- let property = {};
124
- property.name = 'title';
125
- property.value = legendValue;
125
+ } else if (!view.popUp) {
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>");
137
+ this.graphs[0].setCurrentNodeTitle(titleValue);
138
+ }
139
+
140
+ let property = {};
141
+ property.name = 'title';
142
+ property.value = this.props.appBarTitle;
143
+ let event = new _Event.default(this, SYSTEM_EVENT, property);
144
+
145
+ _Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
146
+
147
+ if (!view.popUp && this.graphs.length > 0) {
148
+ property = {};
149
+ property.name = 'stepperTitle';
126
150
  let event = new _Event.default(this, SYSTEM_EVENT, property);
127
151
 
128
152
  _Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
@@ -343,7 +367,7 @@ class ApplicationContext {
343
367
 
344
368
  let currentView = this.views[this.views.length - 1];
345
369
 
346
- 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)) {
347
371
  if (id === currentView.handle.api.id) {
348
372
  return currentView.handle.api;
349
373
  }
@@ -420,7 +444,38 @@ class ApplicationContext {
420
444
  let idToken = tokens[0];
421
445
 
422
446
  if (isComponent) {
423
- return this.resolveComponentApi(expresionContent);
447
+ let value = this.resolveComponentApi(expresionContent);
448
+ let index = expression.indexOf('}.');
449
+
450
+ if (index > 0) {
451
+ let propertyChain = expression.substring(index + 2);
452
+ let props = propertyChain.split(".");
453
+
454
+ var _iterator11 = _createForOfIteratorHelper(props),
455
+ _step11;
456
+
457
+ try {
458
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
459
+ const prop = _step11.value;
460
+
461
+ if (_Utils.default.isNull(value)) {
462
+ return null;
463
+ }
464
+
465
+ value = value[prop];
466
+
467
+ if (typeof value === 'function') {
468
+ value = value();
469
+ }
470
+ }
471
+ } catch (err) {
472
+ _iterator11.e(err);
473
+ } finally {
474
+ _iterator11.f();
475
+ }
476
+ }
477
+
478
+ return value;
424
479
  } else if (isLib) {
425
480
  if (idToken === 'view') {
426
481
  idToken = this.getCurrentView().config.id + '_lib';
@@ -548,6 +603,14 @@ class ApplicationContext {
548
603
 
549
604
  closeCurrentView() {
550
605
  instance.closeCurrentView();
606
+ },
607
+
608
+ refreshUserAvatar(avatar) {
609
+ instance.refreshUserAvatar(avatar);
610
+ },
611
+
612
+ alert(message, messageType) {
613
+ instance.alert(message, messageType);
551
614
  }
552
615
 
553
616
  };
@@ -569,7 +632,7 @@ class ApplicationContext {
569
632
  }
570
633
 
571
634
  getBaseApiUrl() {
572
- return this.props.baseApiUrl;
635
+ return this.props.contextRoot + this.props.baseApiUrl;
573
636
  }
574
637
 
575
638
  setServiceApiPath(serviceApiPath) {
@@ -584,6 +647,14 @@ class ApplicationContext {
584
647
  this.props.uiConfigPath = uiConfigPath;
585
648
  }
586
649
 
650
+ setContextRoot(contextRoot) {
651
+ this.props.contextRoot = contextRoot;
652
+ }
653
+
654
+ getContextRoot() {
655
+ return this.props.contextRoot;
656
+ }
657
+
587
658
  getUIConfigPath() {
588
659
  return this.props.uiConfigPath;
589
660
  }
@@ -600,22 +671,31 @@ class ApplicationContext {
600
671
  this.listeners.push(listener);
601
672
  }
602
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
+
603
683
  refreshUserAvatar(avatar) {
604
- var _iterator11 = _createForOfIteratorHelper(this.listeners),
605
- _step11;
684
+ var _iterator12 = _createForOfIteratorHelper(this.listeners),
685
+ _step12;
606
686
 
607
687
  try {
608
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
609
- const listener = _step11.value;
688
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
689
+ const listener = _step12.value;
610
690
 
611
691
  if (listener.type === AVATAR_LISTENER_TYPE) {
612
692
  listener.handler(avatar);
613
693
  }
614
694
  }
615
695
  } catch (err) {
616
- _iterator11.e(err);
696
+ _iterator12.e(err);
617
697
  } finally {
618
- _iterator11.f();
698
+ _iterator12.f();
619
699
  }
620
700
  }
621
701
 
@@ -641,47 +721,80 @@ class ApplicationContext {
641
721
  */
642
722
 
643
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
+
644
731
  removeLoadedGraph() {
645
- this.closeCurrentView(false);
646
- this.graphs.splice(0, this.graphs.length);
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
+ }
647
738
  }
648
739
 
649
- loadGraph(isParent, isPopup, config) {
740
+ loadGraph(isParent, isPopup, config, parameterValues) {
650
741
  if (isParent && !isPopup) {
651
742
  this.navHistory.splice(0, this.navHistory.length);
652
743
 
653
- var _iterator12 = _createForOfIteratorHelper(this.views),
654
- _step12;
744
+ var _iterator13 = _createForOfIteratorHelper(this.views),
745
+ _step13;
655
746
 
656
747
  try {
657
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
658
- const contextView = _step12.value;
748
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
749
+ const contextView = _step13.value;
659
750
  this.closeView(contextView.handle.api.id, false);
660
751
  }
661
752
  } catch (err) {
662
- _iterator12.e(err);
753
+ _iterator13.e(err);
663
754
  } finally {
664
- _iterator12.f();
755
+ _iterator13.f();
665
756
  }
666
757
 
667
758
  this.getViewPortHistory().push("/switch");
668
759
  }
669
760
 
670
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
+
671
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
+
672
785
  this.graphs.push(graph);
673
786
  }
674
787
 
675
788
  signalGraph(id, event) {
676
789
  if (this.graphs.length > 0) {
677
- let graphToSignal = this.graphs[0];
790
+ let graphToSignal = this.graphs[this.graphs.length - 1];
678
791
 
679
- var _iterator13 = _createForOfIteratorHelper(this.graphs),
680
- _step13;
792
+ var _iterator15 = _createForOfIteratorHelper(this.graphs),
793
+ _step15;
681
794
 
682
795
  try {
683
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
684
- const graph = _step13.value;
796
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
797
+ const graph = _step15.value;
685
798
 
686
799
  if (id === graph.id) {
687
800
  graphToSignal = graph;
@@ -689,9 +802,9 @@ class ApplicationContext {
689
802
  }
690
803
  }
691
804
  } catch (err) {
692
- _iterator13.e(err);
805
+ _iterator15.e(err);
693
806
  } finally {
694
- _iterator13.f();
807
+ _iterator15.f();
695
808
  }
696
809
 
697
810
  graphToSignal.signal(event);
package/dist/BasicApp.js CHANGED
@@ -66,34 +66,41 @@ class BasicApp extends _react.Component {
66
66
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
67
67
  path: "/login",
68
68
  render: props => /*#__PURE__*/_react.default.createElement(_LoginBasic.default, {
69
- url: location + this.props.authUrl + "/login",
69
+ url: location + this.props.contextRoot + this.props.authUrl + "/login",
70
70
  background: 'rgba(0, 0, 0, 0.65)',
71
- title: 'Business Agility',
72
- logo: this.props.logoUrl
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",
76
81
  render: () => /*#__PURE__*/_react.default.createElement(_ForgotPasswordBasic.default, {
77
- url: location + this.props.authUrl + "/password/forgot",
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.logoUrl
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
- url: location + this.props.authUrl + "/password/confirmForgot",
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.logoUrl
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
- url: location + this.props.authUrl + "/password/challenge",
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.logoUrl
103
+ logo: this.props.logo
97
104
  })
98
105
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
99
106
  to: "/home"
@@ -17,7 +17,7 @@ var _DashboardStore = require("./redux/store/DashboardStore");
17
17
 
18
18
  var _LoadingIndicator = _interopRequireDefault(require("./components/LoadingIndicator"));
19
19
 
20
- var _BasicBusinessApp = _interopRequireDefault(require("./components/dashboard/BasicBusinessApp"));
20
+ var _BasicBusinessAppDashboard = _interopRequireDefault(require("./components/dashboard/BasicBusinessAppDashboard"));
21
21
 
22
22
  var _ApplicationContext = _interopRequireWildcard(require("./ApplicationContext"));
23
23
 
@@ -66,11 +66,13 @@ class BasicAppHome extends _react.Component {
66
66
 
67
67
  _ApplicationContext.default.setUIConfigPath(this.props.uiConfigPath);
68
68
 
69
+ _ApplicationContext.default.setContextRoot(this.props.contextRoot);
70
+
69
71
  _ApplicationContext.default.setBaseApiUrl(this.props.baseApiUrl);
70
72
 
71
73
  _ApplicationContext.default.setFilesApiPath(this.props.filesApiPath);
72
74
 
73
- this.props.getDashboardSettings(location + this.props.baseApiUrl + "/ui/setup");
75
+ this.props.getDashboardSettings(location + this.props.contextRoot + this.props.baseApiUrl + "/ui/setup");
74
76
  }
75
77
 
76
78
  componentDidUpdate(prevProps) {
@@ -80,7 +82,7 @@ class BasicAppHome extends _react.Component {
80
82
  });
81
83
 
82
84
  if (!this.state.tokenRefreshMonitorStarted && !_Utils.default.isNull(this.props.dashboardSettings)) {
83
- _TokenManager.default.startTokenRefreshMonitor(location + this.props.authUrl + "/refresh", this.props.dashboardSettings.userName);
85
+ _TokenManager.default.startTokenRefreshMonitor(location + this.props.contextRoot + this.props.authUrl + "/refresh", this.props.dashboardSettings.userName);
84
86
 
85
87
  this.setState({
86
88
  tokenRefreshMonitorStarted: true
@@ -145,7 +147,7 @@ class BasicAppHome extends _react.Component {
145
147
  }
146
148
  }
147
149
  })
148
- }, /*#__PURE__*/_react.default.createElement(_BasicBusinessApp.default, {
150
+ }, /*#__PURE__*/_react.default.createElement(_BasicBusinessAppDashboard.default, {
149
151
  logoutCallBack: () => {
150
152
  this.logout();
151
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;