@agilemotion/oui-react-js 1.3.1 → 1.3.3

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 (96) hide show
  1. package/dist/ApplicationContext.js +148 -39
  2. package/dist/BasicApp.js +12 -5
  3. package/dist/BasicAppHome.js +18 -12
  4. package/dist/BusinessPortalApp.css +37 -0
  5. package/dist/BusinessPortalApp.js +90 -0
  6. package/dist/BusinessPortalAppHome.js +160 -0
  7. package/dist/RestUtils.js +65 -40
  8. package/dist/Utils.js +47 -1
  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/components/AlertBar.js +40 -11
  13. package/dist/components/ConfirmationDialog.js +54 -8
  14. package/dist/components/DataGrid.css +3 -1
  15. package/dist/components/DataGrid.js +149 -82
  16. package/dist/components/DataGridFilter.js +85 -8
  17. package/dist/components/Dialog.js +258 -0
  18. package/dist/components/Graph.js +26 -18
  19. package/dist/components/GraphNode.js +0 -2
  20. package/dist/components/HtmlPanel.js +103 -4
  21. package/dist/components/Icon.js +60 -0
  22. package/dist/components/PopupView.js +55 -6
  23. package/dist/components/SignaturePanel.js +147 -0
  24. package/dist/components/StepperTitleBar.bck.css +85 -0
  25. package/dist/components/StepperTitleBar.css +53 -54
  26. package/dist/components/StepperTitleBar.js +42 -29
  27. package/dist/components/TabPanel.js +10 -11
  28. package/dist/components/TableCellContent.js +6 -3
  29. package/dist/components/TemplateDesigner.css +13 -0
  30. package/dist/components/TemplateDesigner.js +494 -0
  31. package/dist/components/TemplateItemEventHandler.js +440 -0
  32. package/dist/components/TemplateTable.js +222 -0
  33. package/dist/components/TitleBar.js +21 -14
  34. package/dist/components/Toolbar.js +7 -5
  35. package/dist/components/Tree.js +5 -2
  36. package/dist/components/dashboard/{BasicBusinessApp.js → BasicBusinessAppDashboard.js} +30 -25
  37. package/dist/components/dashboard/BusinessPortalAppDashboard.css +5 -0
  38. package/dist/components/dashboard/BusinessPortalAppDashboard.js +236 -0
  39. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +23 -12
  40. package/dist/components/dashboard/components/portal/Timeline.js +17 -0
  41. package/dist/components/dashboard/components/portal/Workspace.css +25 -0
  42. package/dist/components/dashboard/components/portal/Workspace.js +48 -0
  43. package/dist/components/dashboard/components/portal/portal-dashboard.css +25 -0
  44. package/dist/components/footer/Footer.js +43 -10
  45. package/dist/components/form/AddressSearch.js +140 -0
  46. package/dist/components/form/BaseField.js +42 -8
  47. package/dist/components/form/Checkbox.js +3 -0
  48. package/dist/components/form/DatePicker.js +70 -4
  49. package/dist/components/form/FieldSet.js +247 -72
  50. package/dist/components/form/Form.js +178 -127
  51. package/dist/components/form/GridField.js +3 -2
  52. package/dist/components/form/ImageEditor.js +461 -0
  53. package/dist/components/form/LabelField.js +2 -2
  54. package/dist/components/form/LookupField.js +16 -4
  55. package/dist/components/form/RadioGroup.js +107 -0
  56. package/dist/components/form/Section.js +58 -19
  57. package/dist/components/form/SelectItem.js +14 -5
  58. package/dist/components/form/SignatureTemplateDesignerField.js +46 -0
  59. package/dist/components/form/TextField.js +5 -9
  60. package/dist/components/form/TransferList.js +7 -7
  61. package/dist/components/form/UploadField.js +184 -55
  62. package/dist/components/form/noimage-person.png +0 -0
  63. package/dist/components/form/noimage.png +0 -0
  64. package/dist/components/form/transparent.jpeg +0 -0
  65. package/dist/components/layout/CollapsiblePanel.js +0 -6
  66. package/dist/components/layout/Layout.js +49 -19
  67. package/dist/components/layout/View.css +43 -0
  68. package/dist/components/layout/View.js +76 -156
  69. package/dist/components/layout/ViewPort.js +32 -49
  70. package/dist/components/menu/MenuLink.js +7 -0
  71. package/dist/components/navbars/HomeNavbar.js +29 -14
  72. package/dist/components/navbars/PortalNavbar.css +75 -0
  73. package/dist/components/navbars/PortalNavbar.js +227 -0
  74. package/dist/components/signatures/AgilitySignaturePanel.js +312 -0
  75. package/dist/components/signatures/DocumentContainer.css +33 -0
  76. package/dist/components/signatures/DocumentContainer.js +206 -0
  77. package/dist/components/signatures/ImageSignatureInput.js +265 -0
  78. package/dist/components/signatures/ResponsiveTable.js +1 -3
  79. package/dist/components/signatures/SignatureInput.js +303 -0
  80. package/dist/components/signatures/SignatureInputProps.js +17 -11
  81. package/dist/components/signatures/SignatureTemplateDesigner.js +192 -81
  82. package/dist/components/signatures/transparent.jpeg +0 -0
  83. package/dist/event/LoadDataActionHandler.js +1 -1
  84. package/dist/event/Observable.js +1 -1
  85. package/dist/event/RouteActionHandler.js +18 -5
  86. package/dist/event/ServiceCallActionHandler.js +7 -3
  87. package/dist/js/Addresses.js +16 -9
  88. package/dist/view/Dashboard.js +27 -19
  89. package/dist/view/PortalDashboard.js +33 -0
  90. package/dist/view/security/ChangePasswordBasic.js +1 -0
  91. package/dist/view/security/ForgotPasswordBasic.js +1 -0
  92. package/dist/view/security/LoginBasic.js +6 -1
  93. package/dist/view/security/LoginBusinessPortal.js +268 -0
  94. package/dist/view/security/ResetPasswordBasic.js +1 -0
  95. package/package.json +25 -21
  96. package/dist/assets/img/flogo.png +0 -0
@@ -46,8 +46,8 @@ exports.LEGEND_ARROW_ICON = LEGEND_ARROW_ICON;
46
46
 
47
47
  class ApplicationContext {
48
48
  constructor() {
49
- _defineProperty(this, "setConfirmDialogHandler", handler => {
50
- this.props.dialogHandler = handler;
49
+ _defineProperty(this, "setConfirmDialogHandler", controller => {
50
+ this.props.confirmationDialogController = controller;
51
51
  });
52
52
 
53
53
  _defineProperty(this, "registerLibrary", (name, lib) => {
@@ -123,7 +123,18 @@ class ApplicationContext {
123
123
  legendValue += "</span>";
124
124
  this.props.appBarTitle = legendValue;
125
125
  } else if (!view.popUp) {
126
- this.props.appBarTitle = "".concat(this.navHistory[0].title).concat(legendIconArrow, "<span>").concat(this.graphs[0].title, "</span>");
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
+ legendPath = legendPath.length > 0 ? legendPath + legendIconArrow : '';
137
+ this.props.appBarTitle = "".concat(legendPath, "<span>").concat(this.graphs[0].title, "</span>");
127
138
  this.graphs[0].setCurrentNodeTitle(titleValue);
128
139
  }
129
140
 
@@ -232,7 +243,7 @@ class ApplicationContext {
232
243
  this.navHistory.pop();
233
244
  }
234
245
  } else {
235
- this.props.dialogHandler.openPopupView(view);
246
+ this.props.confirmationDialogController.openPopupView(view);
236
247
  }
237
248
 
238
249
  if (view.parent) {
@@ -244,7 +255,10 @@ class ApplicationContext {
244
255
  try {
245
256
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
246
257
  const contextView = _step5.value;
247
- this.closeView(contextView.handle.api.id, forward);
258
+
259
+ if (!_Utils.default.isNull(contextView) && !_Utils.default.isNull(contextView.handle.api)) {
260
+ this.closeView(contextView.handle.api.id, forward);
261
+ }
248
262
  }
249
263
  } catch (err) {
250
264
  _iterator5.e(err);
@@ -267,7 +281,7 @@ class ApplicationContext {
267
281
  _defineProperty(this, "closeCurrentView", forward => {
268
282
  let currentView = this.views[this.views.length - 1];
269
283
 
270
- if (!_Utils.default.isNull(currentView)) {
284
+ if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle.api)) {
271
285
  this.closeView(currentView.handle.api.id, forward);
272
286
  }
273
287
  });
@@ -299,7 +313,7 @@ class ApplicationContext {
299
313
  if (!view.popUp && !view.parent && (_Utils.default.isNull(forward) || forward === false)) {
300
314
  this.navHistory.pop();
301
315
  } else if (view.popUp) {
302
- this.props.dialogHandler.closePopupView();
316
+ this.props.confirmationDialogController.closePopupView();
303
317
  }
304
318
  }
305
319
 
@@ -357,7 +371,7 @@ class ApplicationContext {
357
371
 
358
372
  let currentView = this.views[this.views.length - 1];
359
373
 
360
- if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle)) {
374
+ if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle) && !_Utils.default.isNull(currentView.handle.api)) {
361
375
  if (id === currentView.handle.api.id) {
362
376
  return currentView.handle.api;
363
377
  }
@@ -424,21 +438,23 @@ class ApplicationContext {
424
438
  return template;
425
439
  });
426
440
 
427
- _defineProperty(this, "resolveExpressionValue", expression => {
441
+ _defineProperty(this, "resolveExpressionValue", (expression, eventData = null) => {
428
442
  let paramExpression = expression.match(/\(([^)]*)\)/);
429
- let baseExpression = !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
443
+ let isEvent = expression.startsWith('$event.data');
444
+ let baseExpression = isEvent ? "$event.data" : !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
430
445
  let expresionContent = baseExpression.substring(baseExpression.indexOf('{') + 1, baseExpression.indexOf('}'));
431
446
  let isComponent = baseExpression.startsWith('@#{');
432
447
  let isLib = baseExpression.startsWith('@@{');
433
448
  let tokens = expresionContent.split('.');
434
449
  let idToken = tokens[0];
435
450
 
436
- if (isComponent) {
437
- let value = this.resolveComponentApi(expresionContent);
438
- let index = expression.indexOf('}.');
451
+ if (isComponent || isEvent) {
452
+ let value = isEvent ? eventData : this.resolveComponentApi(expresionContent);
453
+ let expressionClosure = isEvent ? 'data.' : '}.';
454
+ let index = expression.indexOf(expressionClosure);
439
455
 
440
456
  if (index > 0) {
441
- let propertyChain = expression.substring(index + 2);
457
+ let propertyChain = expression.substring(index + expressionClosure.length);
442
458
  let props = propertyChain.split(".");
443
459
 
444
460
  var _iterator11 = _createForOfIteratorHelper(props),
@@ -530,7 +546,42 @@ class ApplicationContext {
530
546
  }
531
547
  });
532
548
 
533
- _defineProperty(this, "resolveParameterValue", parameterConfig => {
549
+ _defineProperty(this, "resolveParameterValue", (parameterConfig, eventData = null) => {
550
+ let expression = parameterConfig.value.toString();
551
+ let isEvent = expression.startsWith('$event.data');
552
+
553
+ if (isEvent) {
554
+ let value = eventData;
555
+ let expressionClosure = 'data.';
556
+ let index = expression.indexOf(expressionClosure);
557
+
558
+ if (index > 0) {
559
+ let propertyChain = expression.substring(index + expressionClosure.length);
560
+ let props = propertyChain.split(".");
561
+
562
+ var _iterator12 = _createForOfIteratorHelper(props),
563
+ _step12;
564
+
565
+ try {
566
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
567
+ const prop = _step12.value;
568
+
569
+ if (_Utils.default.isNull(value)) {
570
+ return null;
571
+ }
572
+
573
+ value = value[prop];
574
+ }
575
+ } catch (err) {
576
+ _iterator12.e(err);
577
+ } finally {
578
+ _iterator12.f();
579
+ }
580
+ }
581
+
582
+ return value;
583
+ }
584
+
534
585
  let val = null;
535
586
 
536
587
  if (_Utils.default.isNull(parameterConfig.value)) {
@@ -593,6 +644,14 @@ class ApplicationContext {
593
644
 
594
645
  closeCurrentView() {
595
646
  instance.closeCurrentView();
647
+ },
648
+
649
+ refreshUserAvatar(avatar) {
650
+ instance.refreshUserAvatar(avatar);
651
+ },
652
+
653
+ alert(message, messageType) {
654
+ instance.alert(message, messageType);
596
655
  }
597
656
 
598
657
  };
@@ -653,22 +712,31 @@ class ApplicationContext {
653
712
  this.listeners.push(listener);
654
713
  }
655
714
 
715
+ alert(message, messageType) {
716
+ let event = new _Event.default(this, this.getCurrentView().config.id, {
717
+ messageType: messageType,
718
+ message: message
719
+ });
720
+
721
+ _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
722
+ }
723
+
656
724
  refreshUserAvatar(avatar) {
657
- var _iterator12 = _createForOfIteratorHelper(this.listeners),
658
- _step12;
725
+ var _iterator13 = _createForOfIteratorHelper(this.listeners),
726
+ _step13;
659
727
 
660
728
  try {
661
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
662
- const listener = _step12.value;
729
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
730
+ const listener = _step13.value;
663
731
 
664
732
  if (listener.type === AVATAR_LISTENER_TYPE) {
665
733
  listener.handler(avatar);
666
734
  }
667
735
  }
668
736
  } catch (err) {
669
- _iterator12.e(err);
737
+ _iterator13.e(err);
670
738
  } finally {
671
- _iterator12.f();
739
+ _iterator13.f();
672
740
  }
673
741
  }
674
742
 
@@ -682,11 +750,15 @@ class ApplicationContext {
682
750
  }
683
751
 
684
752
  openConfirmDialog(message, resultCallback) {
685
- return this.props.dialogHandler.openDialog(message, resultCallback);
753
+ return this.props.confirmationDialogController.openDialog(message, {
754
+ execute: result => {
755
+ resultCallback(result);
756
+ }
757
+ });
686
758
  }
687
759
 
688
760
  isExpression(objValue) {
689
- return !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
761
+ return objValue && objValue.toString().startsWith("$event.data") || !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
690
762
  }
691
763
  /**
692
764
  * Returns a view configuration with a particular id
@@ -694,47 +766,84 @@ class ApplicationContext {
694
766
  */
695
767
 
696
768
 
769
+ loadAnchor(graph) {
770
+ this.navHistory.splice(graph.initialNavHistoryDepth - 1, this.navHistory.length);
771
+ this.addView(graph.anchorView, graph.anchorHistoryElement.path, true);
772
+ this.getViewPortHistory().push("/switch");
773
+ this.getViewPortHistory().push("/view/" + graph.anchorView.config.id);
774
+ }
775
+
697
776
  removeLoadedGraph() {
698
- this.closeCurrentView(false);
699
- this.graphs.splice(0, this.graphs.length);
777
+ if (this.graphs.length > 0) {
778
+ this.closeCurrentView(false);
779
+ let graph = this.graphs[this.graphs.length - 1];
780
+
781
+ if (!_Utils.default.isNull(graph.anchorHistoryElement)) {
782
+ this.loadAnchor(graph);
783
+ }
784
+
785
+ this.graphs.splice(0, this.graphs.length);
786
+ }
700
787
  }
701
788
 
702
- loadGraph(isParent, isPopup, config) {
789
+ loadGraph(isParent, isPopup, config, parameterValues) {
703
790
  if (isParent && !isPopup) {
704
791
  this.navHistory.splice(0, this.navHistory.length);
705
792
 
706
- var _iterator13 = _createForOfIteratorHelper(this.views),
707
- _step13;
793
+ var _iterator14 = _createForOfIteratorHelper(this.views),
794
+ _step14;
708
795
 
709
796
  try {
710
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
711
- const contextView = _step13.value;
797
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
798
+ const contextView = _step14.value;
712
799
  this.closeView(contextView.handle.api.id, false);
713
800
  }
714
801
  } catch (err) {
715
- _iterator13.e(err);
802
+ _iterator14.e(err);
716
803
  } finally {
717
- _iterator13.f();
804
+ _iterator14.f();
718
805
  }
719
806
 
720
807
  this.getViewPortHistory().push("/switch");
721
808
  }
722
809
 
723
810
  let graph = new _Graph.default(_Utils.default.parseConfig(config));
811
+ graph.initialNavHistoryDepth = this.navHistory.length;
812
+
813
+ if (this.navHistory.length > 0) {
814
+ graph.anchorView = this.getCurrentView();
815
+ graph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
816
+ }
817
+
724
818
  graph.init();
819
+
820
+ var _iterator15 = _createForOfIteratorHelper(parameterValues),
821
+ _step15;
822
+
823
+ try {
824
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
825
+ const parameterValue = _step15.value;
826
+ graph.model[parameterValue.name] = parameterValue.value;
827
+ }
828
+ } catch (err) {
829
+ _iterator15.e(err);
830
+ } finally {
831
+ _iterator15.f();
832
+ }
833
+
725
834
  this.graphs.push(graph);
726
835
  }
727
836
 
728
837
  signalGraph(id, event) {
729
838
  if (this.graphs.length > 0) {
730
- let graphToSignal = this.graphs[0];
839
+ let graphToSignal = this.graphs[this.graphs.length - 1];
731
840
 
732
- var _iterator14 = _createForOfIteratorHelper(this.graphs),
733
- _step14;
841
+ var _iterator16 = _createForOfIteratorHelper(this.graphs),
842
+ _step16;
734
843
 
735
844
  try {
736
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
737
- const graph = _step14.value;
845
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
846
+ const graph = _step16.value;
738
847
 
739
848
  if (id === graph.id) {
740
849
  graphToSignal = graph;
@@ -742,9 +851,9 @@ class ApplicationContext {
742
851
  }
743
852
  }
744
853
  } catch (err) {
745
- _iterator14.e(err);
854
+ _iterator16.e(err);
746
855
  } finally {
747
- _iterator14.f();
856
+ _iterator16.f();
748
857
  }
749
858
 
750
859
  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
- 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",
@@ -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.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
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
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
 
@@ -29,6 +29,8 @@ var _core = require("@material-ui/core");
29
29
 
30
30
  var _ThemeProvider = _interopRequireDefault(require("@material-ui/styles/ThemeProvider"));
31
31
 
32
+ var _RestUtils = require("./RestUtils");
33
+
32
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
35
 
34
36
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
@@ -54,7 +56,7 @@ class BasicAppHome extends _react.Component {
54
56
  dashboardSettings: null,
55
57
  message: "",
56
58
  open: false,
57
- avatarUrl: null,
59
+ avatarUrl: location + this.props.contextRoot + this.props.authUrl + "/user/avatar?" + "access_token=" + sessionStorage.getItem("accessToken") + "&idToken=" + sessionStorage.getItem("idToken"),
58
60
  tokenRefreshMonitorStarted: false
59
61
  };
60
62
  }
@@ -121,14 +123,18 @@ class BasicAppHome extends _react.Component {
121
123
  }
122
124
 
123
125
  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');
126
+ (0, _RestUtils.sendRequest)(location + this.props.contextRoot + this.props.authUrl + "/logout", response => {
127
+ sessionStorage.removeItem("accessToken");
128
+ sessionStorage.removeItem("refreshToken");
129
+ sessionStorage.removeItem("idToken");
130
+ sessionStorage.removeItem("lastLogin");
131
+
132
+ _ApplicationContext.default.clear();
133
+
134
+ this.props.history.push('/login');
135
+ }, e => {
136
+ console.error('Error loging out');
137
+ }, true);
132
138
  }
133
139
 
134
140
  render() {
@@ -147,12 +153,12 @@ class BasicAppHome extends _react.Component {
147
153
  }
148
154
  }
149
155
  })
150
- }, /*#__PURE__*/_react.default.createElement(_BasicBusinessApp.default, {
156
+ }, /*#__PURE__*/_react.default.createElement(_BasicBusinessAppDashboard.default, {
151
157
  logoutCallBack: () => {
152
158
  this.logout();
153
159
  },
154
160
  settings: this.state.dashboardSettings,
155
- avatar: !_Utils.default.isNull(this.state.avatarUrl) ? this.state.avatarUrl : null,
161
+ avatar: this.state.avatarUrl,
156
162
  logo: this.state.dashboardSettings.logo,
157
163
  appLogoPath: this.props.appLogoPath
158
164
  })) : null), /*#__PURE__*/_react.default.createElement(_LoadingIndicator.default, {
@@ -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,90 @@
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 _reactRouterDom = require("react-router-dom");
13
+
14
+ var _LoginBusinessPortal = _interopRequireDefault(require("./view/security/LoginBusinessPortal"));
15
+
16
+ var _ForgotPasswordBasic = _interopRequireDefault(require("./view/security/ForgotPasswordBasic"));
17
+
18
+ var _ResetPasswordBasic = _interopRequireDefault(require("./view/security/ResetPasswordBasic"));
19
+
20
+ var _ChangePasswordBasic = _interopRequireDefault(require("./view/security/ChangePasswordBasic"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
25
+
26
+ 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; }
27
+
28
+ const location = window.location.protocol + "//" + window.location.hostname;
29
+
30
+ class BusinessPortalApp extends _react.Component {
31
+ render() {
32
+ return /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, {
33
+ basename: "/"
34
+ }, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
35
+ path: "/",
36
+ exact: true,
37
+ component: this.props.home
38
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
39
+ path: "/home",
40
+ component: this.props.home
41
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
42
+ path: "/login",
43
+ render: props => /*#__PURE__*/_react.default.createElement(_LoginBusinessPortal.default, {
44
+ url: location + this.props.contextRoot + this.props.implConfig.authUrl + "/login",
45
+ background: this.props.implConfig.loginBackgroundColor,
46
+ textColor: this.props.implConfig.loginTextColor,
47
+ footerLogo: this.props.implConfig.footerLogo,
48
+ footerText: this.props.implConfig.footerText,
49
+ footerWidth: this.props.implConfig.footerWidth,
50
+ footerSplitterColor: this.props.implConfig.footerSplitterColor,
51
+ title: this.props.implConfig.loginTitle,
52
+ logo: this.props.implConfig.appLogo
53
+ })
54
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
55
+ path: "/forgot-password",
56
+ render: () => /*#__PURE__*/_react.default.createElement(_ForgotPasswordBasic.default, {
57
+ url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/forgot",
58
+ background: this.props.implConfig.loginBackgroundColor,
59
+ textColor: this.props.implConfig.loginTextColor,
60
+ title: this.props.implConfig.loginTitle,
61
+ logo: this.props.implConfig.appLogo
62
+ })
63
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
64
+ path: "/reset-password",
65
+ render: () => /*#__PURE__*/_react.default.createElement(_ResetPasswordBasic.default, {
66
+ url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/confirmForgot",
67
+ background: this.props.implConfig.loginBackgroundColor,
68
+ textColor: this.props.implConfig.loginTextColor,
69
+ title: this.props.implConfig.loginTitle,
70
+ logo: this.props.implConfig.appLogo
71
+ })
72
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
73
+ path: "/change-password",
74
+ render: () => /*#__PURE__*/_react.default.createElement(_ChangePasswordBasic.default, {
75
+ url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/challenge",
76
+ background: this.props.implConfig.loginBackgroundColor,
77
+ textColor: this.props.implConfig.loginTextColor,
78
+ title: this.props.implConfig.loginTitle,
79
+ logo: this.props.implConfig.appLogo
80
+ })
81
+ }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
82
+ to: "/home"
83
+ })));
84
+ }
85
+
86
+ }
87
+
88
+ var _default = (0, _reactRouterDom.withRouter)(BusinessPortalApp);
89
+
90
+ exports.default = _default;