@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.
- package/dist/ApplicationContext.js +148 -39
- package/dist/BasicApp.js +12 -5
- package/dist/BasicAppHome.js +18 -12
- package/dist/BusinessPortalApp.css +37 -0
- package/dist/BusinessPortalApp.js +90 -0
- package/dist/BusinessPortalAppHome.js +160 -0
- package/dist/RestUtils.js +65 -40
- package/dist/Utils.js +47 -1
- 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/AlertBar.js +40 -11
- package/dist/components/ConfirmationDialog.js +54 -8
- package/dist/components/DataGrid.css +3 -1
- package/dist/components/DataGrid.js +149 -82
- package/dist/components/DataGridFilter.js +85 -8
- package/dist/components/Dialog.js +258 -0
- package/dist/components/Graph.js +26 -18
- package/dist/components/GraphNode.js +0 -2
- package/dist/components/HtmlPanel.js +103 -4
- package/dist/components/Icon.js +60 -0
- package/dist/components/PopupView.js +55 -6
- package/dist/components/SignaturePanel.js +147 -0
- package/dist/components/StepperTitleBar.bck.css +85 -0
- package/dist/components/StepperTitleBar.css +53 -54
- package/dist/components/StepperTitleBar.js +42 -29
- package/dist/components/TabPanel.js +10 -11
- package/dist/components/TableCellContent.js +6 -3
- package/dist/components/TemplateDesigner.css +13 -0
- package/dist/components/TemplateDesigner.js +494 -0
- package/dist/components/TemplateItemEventHandler.js +440 -0
- package/dist/components/TemplateTable.js +222 -0
- package/dist/components/TitleBar.js +21 -14
- package/dist/components/Toolbar.js +7 -5
- package/dist/components/Tree.js +5 -2
- package/dist/components/dashboard/{BasicBusinessApp.js → BasicBusinessAppDashboard.js} +30 -25
- package/dist/components/dashboard/BusinessPortalAppDashboard.css +5 -0
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +236 -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/AddressSearch.js +140 -0
- package/dist/components/form/BaseField.js +42 -8
- package/dist/components/form/Checkbox.js +3 -0
- package/dist/components/form/DatePicker.js +70 -4
- package/dist/components/form/FieldSet.js +247 -72
- package/dist/components/form/Form.js +178 -127
- package/dist/components/form/GridField.js +3 -2
- package/dist/components/form/ImageEditor.js +461 -0
- package/dist/components/form/LabelField.js +2 -2
- package/dist/components/form/LookupField.js +16 -4
- package/dist/components/form/RadioGroup.js +107 -0
- package/dist/components/form/Section.js +58 -19
- package/dist/components/form/SelectItem.js +14 -5
- package/dist/components/form/SignatureTemplateDesignerField.js +46 -0
- package/dist/components/form/TextField.js +5 -9
- package/dist/components/form/TransferList.js +7 -7
- package/dist/components/form/UploadField.js +184 -55
- package/dist/components/form/noimage-person.png +0 -0
- package/dist/components/form/noimage.png +0 -0
- package/dist/components/form/transparent.jpeg +0 -0
- package/dist/components/layout/CollapsiblePanel.js +0 -6
- package/dist/components/layout/Layout.js +49 -19
- package/dist/components/layout/View.css +43 -0
- package/dist/components/layout/View.js +76 -156
- package/dist/components/layout/ViewPort.js +32 -49
- package/dist/components/menu/MenuLink.js +7 -0
- package/dist/components/navbars/HomeNavbar.js +29 -14
- package/dist/components/navbars/PortalNavbar.css +75 -0
- package/dist/components/navbars/PortalNavbar.js +227 -0
- package/dist/components/signatures/AgilitySignaturePanel.js +312 -0
- package/dist/components/signatures/DocumentContainer.css +33 -0
- package/dist/components/signatures/DocumentContainer.js +206 -0
- package/dist/components/signatures/ImageSignatureInput.js +265 -0
- package/dist/components/signatures/ResponsiveTable.js +1 -3
- package/dist/components/signatures/SignatureInput.js +303 -0
- package/dist/components/signatures/SignatureInputProps.js +17 -11
- package/dist/components/signatures/SignatureTemplateDesigner.js +192 -81
- package/dist/components/signatures/transparent.jpeg +0 -0
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +1 -1
- package/dist/event/RouteActionHandler.js +18 -5
- package/dist/event/ServiceCallActionHandler.js +7 -3
- package/dist/js/Addresses.js +16 -9
- package/dist/view/Dashboard.js +27 -19
- 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 +268 -0
- package/dist/view/security/ResetPasswordBasic.js +1 -0
- package/package.json +25 -21
- 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",
|
|
50
|
-
this.props.
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
|
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
|
|
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 +
|
|
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
|
|
658
|
-
|
|
725
|
+
var _iterator13 = _createForOfIteratorHelper(this.listeners),
|
|
726
|
+
_step13;
|
|
659
727
|
|
|
660
728
|
try {
|
|
661
|
-
for (
|
|
662
|
-
const listener =
|
|
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
|
-
|
|
737
|
+
_iterator13.e(err);
|
|
670
738
|
} finally {
|
|
671
|
-
|
|
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.
|
|
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.
|
|
699
|
-
|
|
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
|
|
707
|
-
|
|
793
|
+
var _iterator14 = _createForOfIteratorHelper(this.views),
|
|
794
|
+
_step14;
|
|
708
795
|
|
|
709
796
|
try {
|
|
710
|
-
for (
|
|
711
|
-
const contextView =
|
|
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
|
-
|
|
802
|
+
_iterator14.e(err);
|
|
716
803
|
} finally {
|
|
717
|
-
|
|
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[
|
|
839
|
+
let graphToSignal = this.graphs[this.graphs.length - 1];
|
|
731
840
|
|
|
732
|
-
var
|
|
733
|
-
|
|
841
|
+
var _iterator16 = _createForOfIteratorHelper(this.graphs),
|
|
842
|
+
_step16;
|
|
734
843
|
|
|
735
844
|
try {
|
|
736
|
-
for (
|
|
737
|
-
const graph =
|
|
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
|
-
|
|
854
|
+
_iterator16.e(err);
|
|
746
855
|
} finally {
|
|
747
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -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:
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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(
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_BasicBusinessAppDashboard.default, {
|
|
151
157
|
logoutCallBack: () => {
|
|
152
158
|
this.logout();
|
|
153
159
|
},
|
|
154
160
|
settings: this.state.dashboardSettings,
|
|
155
|
-
avatar:
|
|
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;
|