@agilemotion/oui-react-js 1.6.1 → 1.6.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/ApplicationManager.js +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +57 -22
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.js +124 -48
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +32 -17
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +4 -4
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +2 -3
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -19,71 +19,99 @@ var _DynamicJS = _interopRequireWildcard(require("./DynamicJS"));
|
|
|
19
19
|
|
|
20
20
|
var _TypedValue = _interopRequireDefault(require("./TypedValue"));
|
|
21
21
|
|
|
22
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
23
23
|
|
|
24
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
24
|
+
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; }
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
29
|
+
|
|
30
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
31
|
+
|
|
32
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
+
|
|
34
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
+
|
|
36
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
|
+
|
|
38
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
39
|
+
|
|
40
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
41
|
+
|
|
28
42
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
43
|
|
|
30
|
-
|
|
44
|
+
var APP_VARIABLE = '__DOLLAR_APPLICATION_OUI_SYS_VAR__';
|
|
31
45
|
exports.APP_VARIABLE = APP_VARIABLE;
|
|
32
|
-
|
|
46
|
+
var AVATAR_LISTENER_TYPE = 'AVATAR_LISTENER';
|
|
33
47
|
exports.AVATAR_LISTENER_TYPE = AVATAR_LISTENER_TYPE;
|
|
34
|
-
|
|
48
|
+
var SYSTEM_EVENT = 'SYSTEM_EVENT';
|
|
35
49
|
exports.SYSTEM_EVENT = SYSTEM_EVENT;
|
|
36
|
-
|
|
50
|
+
var TEMPLATE_TOKEN_REGEX = new RegExp('(([$]{1}[{]{1})(([a-zA-Z0-9_$.@#{}[\\]]*)+){1}([}]{1}))+', 'g');
|
|
37
51
|
exports.TEMPLATE_TOKEN_REGEX = TEMPLATE_TOKEN_REGEX;
|
|
38
|
-
|
|
52
|
+
var LEGEND_ARROW_ICON = " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:__COLOR__'></i> ";
|
|
39
53
|
exports.LEGEND_ARROW_ICON = LEGEND_ARROW_ICON;
|
|
40
|
-
|
|
54
|
+
var applicationContext = {};
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
var ApplicationManager = /*#__PURE__*/function () {
|
|
57
|
+
function ApplicationManager() {
|
|
58
|
+
var _this = this;
|
|
59
|
+
|
|
60
|
+
_classCallCheck(this, ApplicationManager);
|
|
61
|
+
|
|
62
|
+
_defineProperty(this, "addApplicationContextSubscription", function (subscription) {
|
|
63
|
+
return new Promise(function (resolve) {
|
|
46
64
|
_Observable.default.addApplicationContextSubscription(subscription);
|
|
47
65
|
|
|
48
66
|
resolve(applicationContext);
|
|
49
67
|
});
|
|
50
68
|
});
|
|
51
69
|
|
|
52
|
-
_defineProperty(this, "setConfirmDialogHandler", controller
|
|
53
|
-
|
|
70
|
+
_defineProperty(this, "setConfirmDialogHandler", function (controller) {
|
|
71
|
+
_this.props.confirmationDialogController = controller;
|
|
54
72
|
});
|
|
55
73
|
|
|
56
|
-
_defineProperty(this, "registerLibrary", (name, lib)
|
|
57
|
-
|
|
74
|
+
_defineProperty(this, "registerLibrary", function (name, lib) {
|
|
75
|
+
_this.libs[name] = lib;
|
|
58
76
|
});
|
|
59
77
|
|
|
60
|
-
_defineProperty(this, "setApplicationHistory", history
|
|
61
|
-
|
|
78
|
+
_defineProperty(this, "setApplicationHistory", function (history) {
|
|
79
|
+
_this.props.applicationHistory = history;
|
|
62
80
|
});
|
|
63
81
|
|
|
64
|
-
_defineProperty(this, "getApplicationHistory", ()
|
|
65
|
-
return
|
|
82
|
+
_defineProperty(this, "getApplicationHistory", function () {
|
|
83
|
+
return _this.props.applicationHistory;
|
|
66
84
|
});
|
|
67
85
|
|
|
68
|
-
_defineProperty(this, "getAppBarTitle", ()
|
|
69
|
-
return
|
|
86
|
+
_defineProperty(this, "getAppBarTitle", function () {
|
|
87
|
+
return _this.props.appBarTitle;
|
|
70
88
|
});
|
|
71
89
|
|
|
72
|
-
_defineProperty(this, "updateAppBarTitle", (viewId, title)
|
|
73
|
-
console.log('updateAppBarTitle VIEW LENGTH : ',
|
|
90
|
+
_defineProperty(this, "updateAppBarTitle", function (viewId, title) {
|
|
91
|
+
console.log('updateAppBarTitle VIEW LENGTH : ', _this.views.length);
|
|
92
|
+
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(_this.views),
|
|
94
|
+
_step;
|
|
74
95
|
|
|
75
|
-
|
|
76
|
-
|
|
96
|
+
try {
|
|
97
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
98
|
+
var view1 = _step.value;
|
|
99
|
+
console.log('updateAppBarTitle VIEW : ', view1.config.id);
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator.f();
|
|
77
105
|
}
|
|
78
106
|
|
|
79
|
-
|
|
107
|
+
var view = _this.getView(viewId);
|
|
80
108
|
|
|
81
109
|
if (!view) {
|
|
82
110
|
return;
|
|
83
111
|
}
|
|
84
112
|
|
|
85
|
-
|
|
86
|
-
|
|
113
|
+
var legendIconArrow = LEGEND_ARROW_ICON.replace('__COLOR__', _this.props.secondaryColor);
|
|
114
|
+
var titleValue = '';
|
|
87
115
|
|
|
88
116
|
if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
|
|
89
117
|
titleValue = title;
|
|
@@ -91,112 +119,159 @@ class ApplicationManager {
|
|
|
91
119
|
titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
|
|
92
120
|
}
|
|
93
121
|
|
|
94
|
-
if (!view.popUp &&
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
122
|
+
if (!view.popUp && _this.graphs.length === 0) {
|
|
123
|
+
var _iterator2 = _createForOfIteratorHelper(_this.navHistory),
|
|
124
|
+
_step2;
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
128
|
+
var navHistoryElement = _step2.value;
|
|
129
|
+
|
|
130
|
+
if (navHistoryElement.viewId === viewId) {
|
|
131
|
+
navHistoryElement.title = titleValue;
|
|
132
|
+
}
|
|
98
133
|
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
_iterator2.e(err);
|
|
136
|
+
} finally {
|
|
137
|
+
_iterator2.f();
|
|
99
138
|
}
|
|
100
139
|
|
|
101
|
-
|
|
102
|
-
|
|
140
|
+
var legendValue = '<span>';
|
|
141
|
+
var counter = 0;
|
|
142
|
+
|
|
143
|
+
var _iterator3 = _createForOfIteratorHelper(_this.navHistory),
|
|
144
|
+
_step3;
|
|
103
145
|
|
|
104
|
-
|
|
105
|
-
|
|
146
|
+
try {
|
|
147
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
148
|
+
var _navHistoryElement = _step3.value;
|
|
149
|
+
legendValue += "".concat(_navHistoryElement.title);
|
|
106
150
|
|
|
107
|
-
|
|
108
|
-
|
|
151
|
+
if (counter++ < _this.navHistory.length - 1) {
|
|
152
|
+
legendValue += legendIconArrow;
|
|
153
|
+
}
|
|
109
154
|
}
|
|
155
|
+
} catch (err) {
|
|
156
|
+
_iterator3.e(err);
|
|
157
|
+
} finally {
|
|
158
|
+
_iterator3.f();
|
|
110
159
|
}
|
|
111
160
|
|
|
112
161
|
legendValue += '</span>';
|
|
113
|
-
|
|
162
|
+
_this.props.appBarTitle = legendValue;
|
|
114
163
|
} else if (!view.popUp) {
|
|
115
|
-
|
|
164
|
+
var legendPath = '';
|
|
116
165
|
|
|
117
|
-
for (
|
|
118
|
-
legendPath += "".concat(
|
|
166
|
+
for (var i = 0; i < _this.graphs[0].initialNavHistoryDepth && i < _this.navHistory.length; i++) {
|
|
167
|
+
legendPath += "".concat(_this.navHistory[i].title);
|
|
119
168
|
|
|
120
|
-
if (i <
|
|
169
|
+
if (i < _this.graphs[0].initialNavHistoryDepth - 1) {
|
|
121
170
|
legendPath += legendIconArrow;
|
|
122
171
|
}
|
|
123
172
|
}
|
|
124
173
|
|
|
125
174
|
legendPath = legendPath.length > 0 ? legendPath + legendIconArrow : '';
|
|
126
|
-
|
|
127
|
-
|
|
175
|
+
_this.props.appBarTitle = _this.graphs[0].initialNavHistoryDepth === 0 ? titleValue : "".concat(legendPath, "<span>").concat(_this.graphs[0].title, "</span>");
|
|
176
|
+
|
|
177
|
+
_this.graphs[0].setCurrentNodeTitle(titleValue);
|
|
128
178
|
}
|
|
129
179
|
|
|
130
|
-
|
|
180
|
+
var property = {};
|
|
131
181
|
property.name = 'title';
|
|
132
|
-
property.value =
|
|
133
|
-
|
|
182
|
+
property.value = _this.props.appBarTitle;
|
|
183
|
+
var event = new _Event.default(_this, SYSTEM_EVENT, property);
|
|
134
184
|
|
|
135
185
|
_Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
|
|
136
186
|
|
|
137
|
-
if (!view.popUp &&
|
|
187
|
+
if (!view.popUp && _this.graphs.length > 0) {
|
|
138
188
|
property = {};
|
|
139
189
|
property.name = 'stepperTitle';
|
|
140
|
-
let event = new _Event.default(this, SYSTEM_EVENT, property);
|
|
141
190
|
|
|
142
|
-
|
|
191
|
+
var _event = new _Event.default(_this, SYSTEM_EVENT, property);
|
|
192
|
+
|
|
193
|
+
_Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, _event);
|
|
143
194
|
}
|
|
144
195
|
});
|
|
145
196
|
|
|
146
|
-
_defineProperty(this, "setViewPortHistory", history
|
|
147
|
-
|
|
197
|
+
_defineProperty(this, "setViewPortHistory", function (history) {
|
|
198
|
+
_this.props.viewPortHistory = history;
|
|
148
199
|
});
|
|
149
200
|
|
|
150
|
-
_defineProperty(this, "getViewPortHistory", ()
|
|
151
|
-
return
|
|
201
|
+
_defineProperty(this, "getViewPortHistory", function () {
|
|
202
|
+
return _this.props.viewPortHistory;
|
|
152
203
|
});
|
|
153
204
|
|
|
154
|
-
_defineProperty(this, "clear", ()
|
|
205
|
+
_defineProperty(this, "clear", function () {
|
|
155
206
|
_Observable.default.clearAllEventListeners();
|
|
156
207
|
|
|
157
|
-
|
|
158
|
-
|
|
208
|
+
_this.views.splice(0, _this.views.length);
|
|
209
|
+
|
|
210
|
+
_this.fileCache.splice(0, _this.fileCache.length);
|
|
159
211
|
});
|
|
160
212
|
|
|
161
|
-
_defineProperty(this, "getPreviousHistoryElement", ()
|
|
162
|
-
if (
|
|
163
|
-
return
|
|
213
|
+
_defineProperty(this, "getPreviousHistoryElement", function () {
|
|
214
|
+
if (_this.navHistory.length > 1) {
|
|
215
|
+
return _this.navHistory[_this.navHistory.length - 2];
|
|
164
216
|
}
|
|
165
217
|
|
|
166
218
|
return null;
|
|
167
219
|
});
|
|
168
220
|
|
|
169
|
-
_defineProperty(this, "getFileDomainCache", domain
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
221
|
+
_defineProperty(this, "getFileDomainCache", function (domain) {
|
|
222
|
+
var _iterator4 = _createForOfIteratorHelper(_this.fileCache),
|
|
223
|
+
_step4;
|
|
224
|
+
|
|
225
|
+
try {
|
|
226
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
227
|
+
var fileCacheElement = _step4.value;
|
|
228
|
+
|
|
229
|
+
if (fileCacheElement.domain === domain) {
|
|
230
|
+
return fileCacheElement;
|
|
231
|
+
}
|
|
173
232
|
}
|
|
233
|
+
} catch (err) {
|
|
234
|
+
_iterator4.e(err);
|
|
235
|
+
} finally {
|
|
236
|
+
_iterator4.f();
|
|
174
237
|
}
|
|
175
238
|
|
|
176
239
|
return null;
|
|
177
240
|
});
|
|
178
241
|
|
|
179
|
-
_defineProperty(this, "addFile", (domain, file)
|
|
242
|
+
_defineProperty(this, "addFile", function (domain, file) {
|
|
180
243
|
if (_Utils.default.isNull(domain)) {
|
|
181
244
|
console.error('Please specify file domain');
|
|
182
245
|
return;
|
|
183
246
|
}
|
|
184
247
|
|
|
185
|
-
|
|
248
|
+
var fileDomainCache = _this.getFileDomainCache(domain);
|
|
186
249
|
|
|
187
250
|
if (fileDomainCache === null) {
|
|
188
251
|
fileDomainCache = {};
|
|
189
252
|
fileDomainCache.domain = domain;
|
|
190
253
|
fileDomainCache.files = [];
|
|
191
|
-
|
|
254
|
+
|
|
255
|
+
_this.fileCache.push(fileDomainCache);
|
|
192
256
|
}
|
|
193
257
|
|
|
194
|
-
|
|
258
|
+
var cachedFile = null;
|
|
259
|
+
|
|
260
|
+
var _iterator5 = _createForOfIteratorHelper(fileDomainCache.files),
|
|
261
|
+
_step5;
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
265
|
+
var domainFile = _step5.value;
|
|
195
266
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
267
|
+
if (domainFile.correlationId === file.correlationId) {
|
|
268
|
+
cachedFile = domainFile;
|
|
269
|
+
}
|
|
199
270
|
}
|
|
271
|
+
} catch (err) {
|
|
272
|
+
_iterator5.e(err);
|
|
273
|
+
} finally {
|
|
274
|
+
_iterator5.f();
|
|
200
275
|
}
|
|
201
276
|
|
|
202
277
|
if (cachedFile === null) {
|
|
@@ -206,53 +281,65 @@ class ApplicationManager {
|
|
|
206
281
|
}
|
|
207
282
|
});
|
|
208
283
|
|
|
209
|
-
_defineProperty(this, "updateContext", values
|
|
284
|
+
_defineProperty(this, "updateContext", function (values) {
|
|
210
285
|
_Observable.default.emitContextChangeEvent(applicationContext, values);
|
|
211
286
|
|
|
212
|
-
Object.keys(values).forEach(key
|
|
287
|
+
Object.keys(values).forEach(function (key) {
|
|
213
288
|
applicationContext[key] = values[key];
|
|
214
289
|
});
|
|
215
290
|
});
|
|
216
291
|
|
|
217
|
-
_defineProperty(this, "addView", (view, path, forward)
|
|
292
|
+
_defineProperty(this, "addView", function (view, path, forward) {
|
|
218
293
|
if (!view.popUp && !view.window) {
|
|
219
|
-
|
|
294
|
+
var topView = _this.getTopAnchorView();
|
|
220
295
|
|
|
221
296
|
if (topView) {
|
|
222
|
-
|
|
297
|
+
_this.closeView(topView === null || topView === void 0 ? void 0 : topView.config.id);
|
|
223
298
|
}
|
|
224
299
|
} else {
|
|
225
300
|
if (view.popUp) {
|
|
226
|
-
|
|
301
|
+
_this.props.confirmationDialogController.openPopupView(view);
|
|
227
302
|
}
|
|
228
303
|
|
|
229
304
|
if (view.window) {
|
|
230
|
-
|
|
305
|
+
var _topView = _this.getTopWindowView();
|
|
231
306
|
|
|
232
|
-
if (
|
|
233
|
-
|
|
307
|
+
if (_topView) {
|
|
308
|
+
_this.closeView(_topView === null || _topView === void 0 ? void 0 : _topView.config.id);
|
|
234
309
|
}
|
|
235
310
|
}
|
|
236
311
|
}
|
|
237
312
|
|
|
238
313
|
if (view.parent) {
|
|
239
|
-
|
|
314
|
+
_this.navHistory.splice(0, _this.navHistory.length);
|
|
240
315
|
|
|
241
|
-
|
|
242
|
-
|
|
316
|
+
var _iterator6 = _createForOfIteratorHelper(_this.views),
|
|
317
|
+
_step6;
|
|
243
318
|
|
|
244
|
-
|
|
245
|
-
|
|
319
|
+
try {
|
|
320
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
321
|
+
var contextView = _step6.value;
|
|
322
|
+
var shouldClose = view.window && contextView.window || !view.window && !contextView.window;
|
|
323
|
+
|
|
324
|
+
if (!_Utils.default.isNull(contextView) && !_Utils.default.isNull(contextView.handle.api) && shouldClose) {
|
|
325
|
+
_this.closeView(contextView.handle.api.id, forward);
|
|
326
|
+
}
|
|
246
327
|
}
|
|
328
|
+
} catch (err) {
|
|
329
|
+
_iterator6.e(err);
|
|
330
|
+
} finally {
|
|
331
|
+
_iterator6.f();
|
|
247
332
|
}
|
|
248
333
|
}
|
|
249
334
|
|
|
250
|
-
|
|
335
|
+
var historyElement = {};
|
|
251
336
|
historyElement.viewId = view.config.id;
|
|
252
337
|
historyElement.parent = view.parent;
|
|
253
338
|
historyElement.path = path;
|
|
254
|
-
|
|
255
|
-
|
|
339
|
+
|
|
340
|
+
_this.navHistory.push(historyElement);
|
|
341
|
+
|
|
342
|
+
_this.views.push(view);
|
|
256
343
|
|
|
257
344
|
if (view.window) {
|
|
258
345
|
_Observable.default.emitContextChangeEvent(applicationContext, {
|
|
@@ -262,21 +349,33 @@ class ApplicationManager {
|
|
|
262
349
|
applicationContext.windowView = view;
|
|
263
350
|
}
|
|
264
351
|
|
|
265
|
-
|
|
352
|
+
var currentGraph = _this.graphs.length > 0 ? _this.graphs[_this.graphs.length - 1] : null;
|
|
266
353
|
|
|
267
354
|
if (!view.window && view.parent && currentGraph && currentGraph.config.isWindow) {
|
|
268
355
|
currentGraph.anchorView = view;
|
|
269
|
-
currentGraph.anchorHistoryElement =
|
|
356
|
+
currentGraph.anchorHistoryElement = _this.navHistory[_this.navHistory.length - 1];
|
|
270
357
|
currentGraph.initialNavHistoryDepth = 0;
|
|
271
|
-
|
|
358
|
+
|
|
359
|
+
_this.updateContext({
|
|
272
360
|
windowDisplayState: 'PINNED'
|
|
273
361
|
});
|
|
274
362
|
}
|
|
275
363
|
});
|
|
276
364
|
|
|
277
|
-
_defineProperty(this, "closeAllViews", ()
|
|
278
|
-
|
|
279
|
-
|
|
365
|
+
_defineProperty(this, "closeAllViews", function () {
|
|
366
|
+
var _iterator7 = _createForOfIteratorHelper(_this.views),
|
|
367
|
+
_step7;
|
|
368
|
+
|
|
369
|
+
try {
|
|
370
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
371
|
+
var view = _step7.value;
|
|
372
|
+
|
|
373
|
+
_this.closeView(view.config.id, false);
|
|
374
|
+
}
|
|
375
|
+
} catch (err) {
|
|
376
|
+
_iterator7.e(err);
|
|
377
|
+
} finally {
|
|
378
|
+
_iterator7.f();
|
|
280
379
|
}
|
|
281
380
|
|
|
282
381
|
_Observable.default.emitContextChangeEvent(applicationContext, {
|
|
@@ -286,50 +385,75 @@ class ApplicationManager {
|
|
|
286
385
|
applicationContext.windowView = null;
|
|
287
386
|
});
|
|
288
387
|
|
|
289
|
-
_defineProperty(this, "closeView", (viewId, forward)
|
|
290
|
-
|
|
388
|
+
_defineProperty(this, "closeView", function (viewId, forward) {
|
|
389
|
+
var view = _this.getView(viewId);
|
|
291
390
|
|
|
292
391
|
if (view) {
|
|
293
392
|
if (!_Utils.default.isNull(view) && !_Utils.default.isNull(view.handle.api)) {
|
|
294
393
|
_Observable.default.clearEventListeners(viewId);
|
|
295
394
|
|
|
296
|
-
for (
|
|
297
|
-
|
|
395
|
+
for (var i = 0; i < _this.fileCache.length; i++) {
|
|
396
|
+
var cacheElement = _this.fileCache[i];
|
|
298
397
|
|
|
299
398
|
if (cacheElement.domain === viewId) {
|
|
300
|
-
|
|
399
|
+
_this.fileCache.slice(i, 1);
|
|
400
|
+
|
|
301
401
|
break;
|
|
302
402
|
}
|
|
303
403
|
}
|
|
304
404
|
|
|
305
|
-
|
|
405
|
+
var count = 0;
|
|
406
|
+
|
|
407
|
+
var _iterator8 = _createForOfIteratorHelper(_this.views),
|
|
408
|
+
_step8;
|
|
306
409
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
410
|
+
try {
|
|
411
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
412
|
+
var _view = _step8.value;
|
|
310
413
|
|
|
311
|
-
if (
|
|
312
|
-
|
|
414
|
+
if (_view.handle.api.id === viewId) {
|
|
415
|
+
_this.views.splice(count, 1);
|
|
313
416
|
|
|
314
|
-
if (
|
|
315
|
-
|
|
417
|
+
if (!_view.popUp && !_view.parent && (_Utils.default.isNull(forward) || forward === false)) {
|
|
418
|
+
var viewIndex = _this.navHistory.findIndex(function (h) {
|
|
419
|
+
return h.viewId === viewId;
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
if (viewIndex >= 0) {
|
|
423
|
+
_this.navHistory.splice(viewIndex, 1);
|
|
424
|
+
}
|
|
425
|
+
} else if (_view.popUp) {
|
|
426
|
+
_this.props.confirmationDialogController.closePopupView();
|
|
316
427
|
}
|
|
317
|
-
} else if (view.popUp) {
|
|
318
|
-
this.props.confirmationDialogController.closePopupView();
|
|
319
428
|
}
|
|
320
|
-
}
|
|
321
429
|
|
|
322
|
-
|
|
430
|
+
count++;
|
|
431
|
+
}
|
|
432
|
+
} catch (err) {
|
|
433
|
+
_iterator8.e(err);
|
|
434
|
+
} finally {
|
|
435
|
+
_iterator8.f();
|
|
323
436
|
}
|
|
324
437
|
}
|
|
325
438
|
|
|
326
|
-
|
|
439
|
+
var hasWindow = false;
|
|
327
440
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
441
|
+
var _iterator9 = _createForOfIteratorHelper(_this.views),
|
|
442
|
+
_step9;
|
|
443
|
+
|
|
444
|
+
try {
|
|
445
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
446
|
+
var viewsElement = _step9.value;
|
|
447
|
+
|
|
448
|
+
if (viewsElement.window) {
|
|
449
|
+
hasWindow = true;
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
332
452
|
}
|
|
453
|
+
} catch (err) {
|
|
454
|
+
_iterator9.e(err);
|
|
455
|
+
} finally {
|
|
456
|
+
_iterator9.f();
|
|
333
457
|
}
|
|
334
458
|
|
|
335
459
|
if (!hasWindow) {
|
|
@@ -341,30 +465,41 @@ class ApplicationManager {
|
|
|
341
465
|
}
|
|
342
466
|
|
|
343
467
|
if (view.window) {
|
|
344
|
-
|
|
468
|
+
_this.updateContext({
|
|
345
469
|
windowDisplayState: 'CLOSED'
|
|
346
470
|
});
|
|
347
471
|
}
|
|
348
472
|
}
|
|
349
473
|
});
|
|
350
474
|
|
|
351
|
-
_defineProperty(this, "getView", id
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
475
|
+
_defineProperty(this, "getView", function (id) {
|
|
476
|
+
var _iterator10 = _createForOfIteratorHelper(_this.views),
|
|
477
|
+
_step10;
|
|
478
|
+
|
|
479
|
+
try {
|
|
480
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
481
|
+
var view = _step10.value;
|
|
482
|
+
|
|
483
|
+
if (id === view.config.id) {
|
|
484
|
+
return view;
|
|
485
|
+
}
|
|
355
486
|
}
|
|
487
|
+
} catch (err) {
|
|
488
|
+
_iterator10.e(err);
|
|
489
|
+
} finally {
|
|
490
|
+
_iterator10.f();
|
|
356
491
|
}
|
|
357
492
|
|
|
358
493
|
return null;
|
|
359
494
|
});
|
|
360
495
|
|
|
361
|
-
_defineProperty(this, "getViewComponent", (view, id)
|
|
496
|
+
_defineProperty(this, "getViewComponent", function (view, id) {
|
|
362
497
|
if (!_Utils.default.isNull(view) && !_Utils.default.isNull(view.handle) && !_Utils.default.isNull(view.handle.api)) {
|
|
363
498
|
if (id === view.handle.api.id) {
|
|
364
499
|
return view.handle.api;
|
|
365
500
|
}
|
|
366
501
|
|
|
367
|
-
|
|
502
|
+
var handle = view.handle.api.getChild(id);
|
|
368
503
|
|
|
369
504
|
if (handle) {
|
|
370
505
|
return handle.api;
|
|
@@ -380,89 +515,143 @@ class ApplicationManager {
|
|
|
380
515
|
}
|
|
381
516
|
});
|
|
382
517
|
|
|
383
|
-
_defineProperty(this, "resolveComponentApi", id
|
|
518
|
+
_defineProperty(this, "resolveComponentApi", function (id) {
|
|
384
519
|
if (APP_VARIABLE === id) {
|
|
385
|
-
return
|
|
520
|
+
return _this.api;
|
|
386
521
|
}
|
|
387
522
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
523
|
+
var _iterator11 = _createForOfIteratorHelper(_this.graphs),
|
|
524
|
+
_step11;
|
|
525
|
+
|
|
526
|
+
try {
|
|
527
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
528
|
+
var graph = _step11.value;
|
|
529
|
+
|
|
530
|
+
if (graph.id === id) {
|
|
531
|
+
return graph;
|
|
532
|
+
}
|
|
391
533
|
}
|
|
534
|
+
} catch (err) {
|
|
535
|
+
_iterator11.e(err);
|
|
536
|
+
} finally {
|
|
537
|
+
_iterator11.f();
|
|
392
538
|
}
|
|
393
539
|
|
|
394
|
-
if (
|
|
395
|
-
return
|
|
540
|
+
if (_this.views.length === 0) {
|
|
541
|
+
return _this.getViewComponent(_this.props.dashboardView, id);
|
|
396
542
|
}
|
|
397
543
|
|
|
398
|
-
|
|
399
|
-
|
|
544
|
+
var _iterator12 = _createForOfIteratorHelper(_this.views),
|
|
545
|
+
_step12;
|
|
546
|
+
|
|
547
|
+
try {
|
|
548
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
549
|
+
var view = _step12.value;
|
|
550
|
+
|
|
551
|
+
var component = _this.getViewComponent(view, id);
|
|
400
552
|
|
|
401
|
-
|
|
402
|
-
|
|
553
|
+
if (component) {
|
|
554
|
+
return component;
|
|
555
|
+
}
|
|
403
556
|
}
|
|
557
|
+
} catch (err) {
|
|
558
|
+
_iterator12.e(err);
|
|
559
|
+
} finally {
|
|
560
|
+
_iterator12.f();
|
|
404
561
|
}
|
|
405
562
|
|
|
406
563
|
return null;
|
|
407
564
|
});
|
|
408
565
|
|
|
409
|
-
_defineProperty(this, "populateTemplate", (template, eventData)
|
|
410
|
-
|
|
566
|
+
_defineProperty(this, "populateTemplate", function (template, eventData) {
|
|
567
|
+
var matches = template.match(TEMPLATE_TOKEN_REGEX);
|
|
411
568
|
|
|
412
569
|
if (!_Utils.default.isNull(matches)) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
570
|
+
var _iterator13 = _createForOfIteratorHelper(matches),
|
|
571
|
+
_step13;
|
|
572
|
+
|
|
573
|
+
try {
|
|
574
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
575
|
+
var match = _step13.value;
|
|
576
|
+
var expresionContent = match.substring(match.indexOf('{') + 1, match.lastIndexOf('}'));
|
|
577
|
+
var expressionValue = '';
|
|
578
|
+
|
|
579
|
+
if (expresionContent.startsWith('$event.data') && !_Utils.default.isNull(eventData)) {
|
|
580
|
+
var props = expresionContent.replace('$event.data.', '').split('.');
|
|
581
|
+
var vo = eventData;
|
|
582
|
+
|
|
583
|
+
var _iterator14 = _createForOfIteratorHelper(props),
|
|
584
|
+
_step14;
|
|
585
|
+
|
|
586
|
+
try {
|
|
587
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
588
|
+
var prop = _step14.value;
|
|
589
|
+
vo = vo[prop];
|
|
590
|
+
}
|
|
591
|
+
} catch (err) {
|
|
592
|
+
_iterator14.e(err);
|
|
593
|
+
} finally {
|
|
594
|
+
_iterator14.f();
|
|
595
|
+
}
|
|
420
596
|
|
|
421
|
-
|
|
422
|
-
|
|
597
|
+
expressionValue = vo;
|
|
598
|
+
} else {
|
|
599
|
+
expressionValue = _this.resolveExpressionValue(expresionContent);
|
|
423
600
|
}
|
|
424
601
|
|
|
425
|
-
|
|
426
|
-
} else {
|
|
427
|
-
expressionValue = this.resolveExpressionValue(expresionContent);
|
|
602
|
+
template = template.replace(match, expressionValue);
|
|
428
603
|
}
|
|
429
|
-
|
|
430
|
-
|
|
604
|
+
} catch (err) {
|
|
605
|
+
_iterator13.e(err);
|
|
606
|
+
} finally {
|
|
607
|
+
_iterator13.f();
|
|
431
608
|
}
|
|
432
609
|
}
|
|
433
610
|
|
|
434
611
|
return template;
|
|
435
612
|
});
|
|
436
613
|
|
|
437
|
-
_defineProperty(this, "resolveExpressionValue", (expression
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
614
|
+
_defineProperty(this, "resolveExpressionValue", function (expression) {
|
|
615
|
+
var eventData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
616
|
+
var paramExpression = expression.match(/\(([^)]*)\)/);
|
|
617
|
+
var isEvent = expression.startsWith('$event.data');
|
|
618
|
+
var baseExpression = isEvent ? '$event.data' : !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
|
|
619
|
+
var expressionContent = baseExpression.substring(baseExpression.indexOf('{') + 1, baseExpression.indexOf('}'));
|
|
620
|
+
var isComponent = baseExpression.startsWith('@#{');
|
|
621
|
+
var isLib = baseExpression.startsWith('@@{');
|
|
622
|
+
var tokens = expressionContent.split('.');
|
|
623
|
+
var idToken = tokens[0];
|
|
446
624
|
|
|
447
625
|
if (isComponent || isEvent) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
626
|
+
var value = isEvent ? eventData : _this.resolveComponentApi(expressionContent);
|
|
627
|
+
var expressionClosure = isEvent ? 'data.' : '}.';
|
|
628
|
+
var index = expression.indexOf(expressionClosure);
|
|
451
629
|
|
|
452
630
|
if (index > 0) {
|
|
453
|
-
|
|
454
|
-
|
|
631
|
+
var propertyChain = expression.substring(index + expressionClosure.length);
|
|
632
|
+
var props = propertyChain.split('.');
|
|
455
633
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
634
|
+
var _iterator15 = _createForOfIteratorHelper(props),
|
|
635
|
+
_step15;
|
|
636
|
+
|
|
637
|
+
try {
|
|
638
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
639
|
+
var prop = _step15.value;
|
|
460
640
|
|
|
461
|
-
|
|
641
|
+
if (_Utils.default.isNull(value)) {
|
|
642
|
+
return null;
|
|
643
|
+
}
|
|
462
644
|
|
|
463
|
-
|
|
464
|
-
|
|
645
|
+
value = value[prop];
|
|
646
|
+
|
|
647
|
+
if (typeof value === 'function') {
|
|
648
|
+
value = value();
|
|
649
|
+
}
|
|
465
650
|
}
|
|
651
|
+
} catch (err) {
|
|
652
|
+
_iterator15.e(err);
|
|
653
|
+
} finally {
|
|
654
|
+
_iterator15.f();
|
|
466
655
|
}
|
|
467
656
|
}
|
|
468
657
|
|
|
@@ -471,20 +660,21 @@ class ApplicationManager {
|
|
|
471
660
|
/*if (idToken === 'view') {
|
|
472
661
|
idToken = this.getCurrentView().config.id + '_lib';
|
|
473
662
|
}*/
|
|
474
|
-
return
|
|
663
|
+
return _this.libs[idToken];
|
|
475
664
|
}
|
|
476
665
|
|
|
477
666
|
return expression;
|
|
478
667
|
});
|
|
479
668
|
|
|
480
|
-
_defineProperty(this, "setExpressionValues", (obj
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
669
|
+
_defineProperty(this, "setExpressionValues", function (obj) {
|
|
670
|
+
var eventData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
671
|
+
var isArray = Array.isArray(obj);
|
|
672
|
+
var updated = isArray ? [] : {};
|
|
673
|
+
Object.keys(obj).forEach(function (key) {
|
|
674
|
+
if (_typeof(obj[key]) === 'object' && obj[key] !== null) {
|
|
675
|
+
updated[key] = _this.setExpressionValues(obj[key], eventData);
|
|
486
676
|
} else {
|
|
487
|
-
|
|
677
|
+
var objValue = obj[key];
|
|
488
678
|
|
|
489
679
|
if (typeof objValue === 'function') {
|
|
490
680
|
objValue = objValue();
|
|
@@ -494,14 +684,14 @@ class ApplicationManager {
|
|
|
494
684
|
objValue = null;
|
|
495
685
|
}
|
|
496
686
|
|
|
497
|
-
if (
|
|
498
|
-
|
|
687
|
+
if (_this.isExpression(objValue)) {
|
|
688
|
+
var scriptValue = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')), objValue);
|
|
499
689
|
|
|
500
690
|
if (typeof scriptValue === 'undefined') {
|
|
501
691
|
scriptValue = null;
|
|
502
692
|
}
|
|
503
693
|
|
|
504
|
-
|
|
694
|
+
var objKey = key === 'valueExpression' ? 'value' : key;
|
|
505
695
|
updated[objKey] = scriptValue !== null && scriptValue.instanceType === 'TypedValue' ? scriptValue.value : scriptValue;
|
|
506
696
|
|
|
507
697
|
if (typeof updated[objKey] === 'undefined') {
|
|
@@ -515,62 +705,74 @@ class ApplicationManager {
|
|
|
515
705
|
return updated;
|
|
516
706
|
});
|
|
517
707
|
|
|
518
|
-
_defineProperty(this, "resolveParameterConfigValue", (configValue, eventData)
|
|
708
|
+
_defineProperty(this, "resolveParameterConfigValue", function (configValue, eventData) {
|
|
519
709
|
if (!configValue) {
|
|
520
710
|
return configValue;
|
|
521
711
|
}
|
|
522
712
|
|
|
523
|
-
if (
|
|
524
|
-
return
|
|
713
|
+
if (_this.isExpression(configValue)) {
|
|
714
|
+
return _this.resolveExpressionValue(configValue, eventData);
|
|
525
715
|
} else {
|
|
526
|
-
|
|
527
|
-
|
|
716
|
+
var json = JSON.stringify(configValue);
|
|
717
|
+
var matches = json.match(_DynamicJS.TEMPLATE_REGEX);
|
|
528
718
|
|
|
529
719
|
if (!_Utils.default.isNull(matches)) {
|
|
530
|
-
return
|
|
720
|
+
return _this.setExpressionValues(configValue);
|
|
531
721
|
} else {
|
|
532
722
|
return configValue;
|
|
533
723
|
}
|
|
534
724
|
}
|
|
535
725
|
});
|
|
536
726
|
|
|
537
|
-
_defineProperty(this, "resolveParameterValue", (parameterConfig
|
|
538
|
-
|
|
539
|
-
|
|
727
|
+
_defineProperty(this, "resolveParameterValue", function (parameterConfig) {
|
|
728
|
+
var eventData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
729
|
+
var expression = parameterConfig.value.toString();
|
|
730
|
+
var isEvent = expression.startsWith('$event.data');
|
|
540
731
|
|
|
541
732
|
if (isEvent) {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
733
|
+
var value = eventData;
|
|
734
|
+
var expressionClosure = 'data.';
|
|
735
|
+
var index = expression.indexOf(expressionClosure);
|
|
545
736
|
|
|
546
737
|
if (index > 0) {
|
|
547
|
-
|
|
548
|
-
|
|
738
|
+
var propertyChain = expression.substring(index + expressionClosure.length);
|
|
739
|
+
var props = propertyChain.split('.');
|
|
549
740
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
741
|
+
var _iterator16 = _createForOfIteratorHelper(props),
|
|
742
|
+
_step16;
|
|
743
|
+
|
|
744
|
+
try {
|
|
745
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
746
|
+
var prop = _step16.value;
|
|
747
|
+
|
|
748
|
+
if (_Utils.default.isNull(value)) {
|
|
749
|
+
return null;
|
|
750
|
+
}
|
|
554
751
|
|
|
555
|
-
|
|
752
|
+
value = value[prop];
|
|
753
|
+
}
|
|
754
|
+
} catch (err) {
|
|
755
|
+
_iterator16.e(err);
|
|
756
|
+
} finally {
|
|
757
|
+
_iterator16.f();
|
|
556
758
|
}
|
|
557
759
|
}
|
|
558
760
|
|
|
559
761
|
return value;
|
|
560
762
|
}
|
|
561
763
|
|
|
562
|
-
|
|
764
|
+
var val = null;
|
|
563
765
|
|
|
564
766
|
if (_Utils.default.isNull(parameterConfig.value)) {
|
|
565
767
|
console.error('NULL parameter value expression in : ' + JSON.stringify(parameterConfig));
|
|
566
768
|
return null;
|
|
567
769
|
}
|
|
568
770
|
|
|
569
|
-
if (!
|
|
570
|
-
val =
|
|
771
|
+
if (!_this.isExpression(parameterConfig.value)) {
|
|
772
|
+
val = _this.resolveParameterConfigValue(parameterConfig.value);
|
|
571
773
|
} else {
|
|
572
|
-
|
|
573
|
-
val = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')),
|
|
774
|
+
var _expression = parameterConfig.value;
|
|
775
|
+
val = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')), _expression);
|
|
574
776
|
}
|
|
575
777
|
|
|
576
778
|
if (_Utils.default.isNull(val)) {
|
|
@@ -585,24 +787,24 @@ class ApplicationManager {
|
|
|
585
787
|
return val;
|
|
586
788
|
}
|
|
587
789
|
|
|
588
|
-
|
|
790
|
+
var type = null;
|
|
589
791
|
|
|
590
792
|
if (!_Utils.default.isNull(parameterConfig.type)) {
|
|
591
793
|
type = parameterConfig.type;
|
|
592
794
|
} else if (val !== null) {
|
|
593
|
-
type =
|
|
795
|
+
type = _typeof(val);
|
|
594
796
|
}
|
|
595
797
|
|
|
596
798
|
return new _TypedValue.default(type, val);
|
|
597
799
|
});
|
|
598
800
|
|
|
599
|
-
_defineProperty(this, "setModelValue", (key, value, viewId)
|
|
600
|
-
|
|
801
|
+
_defineProperty(this, "setModelValue", function (key, value, viewId) {
|
|
802
|
+
_this.getView(viewId).handle.api.setModelValue(key, value);
|
|
601
803
|
|
|
602
804
|
_Observable.default.processSystemGeneratedSubscriptions(viewId);
|
|
603
805
|
});
|
|
604
806
|
|
|
605
|
-
_defineProperty(this, "getId", ()
|
|
807
|
+
_defineProperty(this, "getId", function () {
|
|
606
808
|
return 'applicationManager';
|
|
607
809
|
});
|
|
608
810
|
|
|
@@ -619,22 +821,18 @@ class ApplicationManager {
|
|
|
619
821
|
return instance.getId();
|
|
620
822
|
},
|
|
621
823
|
|
|
622
|
-
refreshUserAvatar(avatar) {
|
|
824
|
+
refreshUserAvatar: function refreshUserAvatar(avatar) {
|
|
623
825
|
instance.refreshUserAvatar(avatar);
|
|
624
826
|
},
|
|
625
|
-
|
|
626
|
-
alert(viewId, message, messageType) {
|
|
827
|
+
alert: function alert(viewId, message, messageType) {
|
|
627
828
|
instance.alert(viewId, message, messageType);
|
|
628
829
|
},
|
|
629
|
-
|
|
630
|
-
removeLoadedGraph(routeToAnchor) {
|
|
830
|
+
removeLoadedGraph: function removeLoadedGraph(routeToAnchor) {
|
|
631
831
|
instance.removeLoadedGraph(routeToAnchor);
|
|
632
832
|
},
|
|
633
|
-
|
|
634
|
-
hasActiveMeeting() {
|
|
833
|
+
hasActiveMeeting: function hasActiveMeeting() {
|
|
635
834
|
return instance.hasActiveMeeting();
|
|
636
835
|
}
|
|
637
|
-
|
|
638
836
|
};
|
|
639
837
|
|
|
640
838
|
if (!Array.isArray) {
|
|
@@ -649,244 +847,323 @@ class ApplicationManager {
|
|
|
649
847
|
return ApplicationManager.instance;
|
|
650
848
|
}
|
|
651
849
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
850
|
+
_createClass(ApplicationManager, [{
|
|
851
|
+
key: "navigate",
|
|
852
|
+
value: function navigate(path) {
|
|
853
|
+
this.props.navigator(path);
|
|
854
|
+
}
|
|
855
|
+
}, {
|
|
856
|
+
key: "setDashboardSettings",
|
|
857
|
+
value: function setDashboardSettings(dashboardSettings) {
|
|
858
|
+
this.props.dashboardSettings = dashboardSettings;
|
|
859
|
+
}
|
|
860
|
+
}, {
|
|
861
|
+
key: "getDashboardSettings",
|
|
862
|
+
value: function getDashboardSettings() {
|
|
863
|
+
return this.props.dashboardSettings;
|
|
864
|
+
}
|
|
865
|
+
}, {
|
|
866
|
+
key: "setNavigator",
|
|
867
|
+
value: function setNavigator(navigator) {
|
|
868
|
+
this.props.navigator = navigator;
|
|
869
|
+
}
|
|
870
|
+
}, {
|
|
871
|
+
key: "setHasActiveMeeting",
|
|
872
|
+
value: function setHasActiveMeeting(hasActiveMeeting) {
|
|
873
|
+
this.props.hasActiveMeeting = hasActiveMeeting;
|
|
874
|
+
}
|
|
875
|
+
}, {
|
|
876
|
+
key: "hasActiveMeeting",
|
|
877
|
+
value: function hasActiveMeeting() {
|
|
878
|
+
return this.props.hasActiveMeeting;
|
|
879
|
+
}
|
|
880
|
+
}, {
|
|
881
|
+
key: "setServiceApiPath",
|
|
882
|
+
value: function setServiceApiPath(serviceApiPath) {
|
|
883
|
+
this.props.serviceApiPath = serviceApiPath;
|
|
884
|
+
}
|
|
885
|
+
}, {
|
|
886
|
+
key: "getServiceApiPath",
|
|
887
|
+
value: function getServiceApiPath() {
|
|
888
|
+
return this.props.serviceApiPath;
|
|
889
|
+
}
|
|
890
|
+
}, {
|
|
891
|
+
key: "setUIConfigPath",
|
|
892
|
+
value: function setUIConfigPath(uiConfigPath) {
|
|
893
|
+
this.props.uiConfigPath = uiConfigPath;
|
|
894
|
+
}
|
|
895
|
+
}, {
|
|
896
|
+
key: "setContextRoot",
|
|
897
|
+
value: function setContextRoot(contextRoot) {
|
|
898
|
+
this.props.contextRoot = contextRoot;
|
|
899
|
+
}
|
|
900
|
+
}, {
|
|
901
|
+
key: "getContextRoot",
|
|
902
|
+
value: function getContextRoot() {
|
|
903
|
+
return this.props.contextRoot;
|
|
904
|
+
}
|
|
905
|
+
}, {
|
|
906
|
+
key: "getUIConfigPath",
|
|
907
|
+
value: function getUIConfigPath() {
|
|
908
|
+
return this.props.uiConfigPath;
|
|
909
|
+
}
|
|
910
|
+
}, {
|
|
911
|
+
key: "setFilesApiPath",
|
|
912
|
+
value: function setFilesApiPath(filesApiPath) {
|
|
913
|
+
this.props.filesApiPath = filesApiPath;
|
|
914
|
+
}
|
|
915
|
+
}, {
|
|
916
|
+
key: "getFilesApiPath",
|
|
917
|
+
value: function getFilesApiPath() {
|
|
918
|
+
return this.props.filesApiPath;
|
|
919
|
+
}
|
|
920
|
+
}, {
|
|
921
|
+
key: "addApplicationListener",
|
|
922
|
+
value: function addApplicationListener(listener) {
|
|
923
|
+
this.listeners.push(listener);
|
|
924
|
+
}
|
|
925
|
+
}, {
|
|
926
|
+
key: "alert",
|
|
927
|
+
value: function alert(viewId, message, messageType) {
|
|
928
|
+
var event = new _Event.default(this, this.getView(viewId).config.id, {
|
|
929
|
+
messageType: messageType,
|
|
930
|
+
message: message
|
|
931
|
+
});
|
|
720
932
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
933
|
+
_Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
|
|
934
|
+
}
|
|
935
|
+
}, {
|
|
936
|
+
key: "refreshUserAvatar",
|
|
937
|
+
value: function refreshUserAvatar(avatar) {
|
|
938
|
+
var _iterator17 = _createForOfIteratorHelper(this.listeners),
|
|
939
|
+
_step17;
|
|
940
|
+
|
|
941
|
+
try {
|
|
942
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
943
|
+
var listener = _step17.value;
|
|
944
|
+
|
|
945
|
+
if (listener.type === AVATAR_LISTENER_TYPE) {
|
|
946
|
+
listener.handler(avatar);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
} catch (err) {
|
|
950
|
+
_iterator17.e(err);
|
|
951
|
+
} finally {
|
|
952
|
+
_iterator17.f();
|
|
725
953
|
}
|
|
726
954
|
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
955
|
+
}, {
|
|
956
|
+
key: "setApplicationThemeColors",
|
|
957
|
+
value: function setApplicationThemeColors(primary, secondary) {
|
|
958
|
+
this.props.primaryColor = primary;
|
|
959
|
+
this.props.secondaryColor = secondary;
|
|
960
|
+
}
|
|
961
|
+
}, {
|
|
962
|
+
key: "getApplicationPrimaryColor",
|
|
963
|
+
value: function getApplicationPrimaryColor() {
|
|
964
|
+
return this.props.primaryColor;
|
|
965
|
+
}
|
|
966
|
+
}, {
|
|
967
|
+
key: "getApplicationSecondaryColor",
|
|
968
|
+
value: function getApplicationSecondaryColor() {
|
|
969
|
+
return this.props.secondaryColor;
|
|
970
|
+
}
|
|
971
|
+
}, {
|
|
972
|
+
key: "openConfirmDialog",
|
|
973
|
+
value: function openConfirmDialog(message, resultCallback) {
|
|
974
|
+
return this.props.confirmationDialogController.openDialog(message, {
|
|
975
|
+
execute: function execute(result) {
|
|
976
|
+
resultCallback(result);
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
}, {
|
|
981
|
+
key: "fillEventDataValue",
|
|
982
|
+
value: function fillEventDataValue(obj, eventData) {
|
|
983
|
+
var _this2 = this;
|
|
733
984
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
985
|
+
if (obj) {
|
|
986
|
+
Object.keys(obj).forEach(function (key) {
|
|
987
|
+
var val = obj[key];
|
|
737
988
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
989
|
+
if (_typeof(val) === 'object') {
|
|
990
|
+
_this2.fillEventDataValue(val, eventData);
|
|
991
|
+
}
|
|
741
992
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
993
|
+
if (val === '$event.data') {
|
|
994
|
+
obj[key] = eventData;
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
return obj;
|
|
746
998
|
}
|
|
747
|
-
});
|
|
748
|
-
}
|
|
749
999
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Returns a view configuration with a particular id
|
|
1004
|
+
*
|
|
1005
|
+
*/
|
|
1006
|
+
|
|
1007
|
+
}, {
|
|
1008
|
+
key: "isExpression",
|
|
1009
|
+
value: function isExpression(objValue) {
|
|
1010
|
+
return objValue && objValue.toString().startsWith('$event.data') || !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Returns a view configuration with a particular id
|
|
1014
|
+
*
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
1017
|
+
}, {
|
|
1018
|
+
key: "loadAnchor",
|
|
1019
|
+
value: function loadAnchor(graph) {
|
|
1020
|
+
this.navHistory.splice(graph.initialNavHistoryDepth - 1, this.navHistory.length);
|
|
1021
|
+
this.addView(graph.anchorView, graph.anchorHistoryElement.path, true);
|
|
1022
|
+
this.navigate('/view/unload');
|
|
1023
|
+
this.navigate('/view/' + graph.anchorView.config.id);
|
|
1024
|
+
}
|
|
1025
|
+
}, {
|
|
1026
|
+
key: "removeLoadedGraph",
|
|
1027
|
+
value: function removeLoadedGraph(routeBackToAnchor) {
|
|
1028
|
+
if (this.graphs.length > 0) {
|
|
1029
|
+
var graph = this.graphs[this.graphs.length - 1];
|
|
1030
|
+
var view = graph.config.isWindow ? this.getTopWindowView() : this.getTopAnchorView();
|
|
1031
|
+
this.closeView(view.config.id, false);
|
|
754
1032
|
|
|
755
|
-
if (
|
|
756
|
-
this.
|
|
1033
|
+
if (!_Utils.default.isNull(graph.anchorHistoryElement) && routeBackToAnchor) {
|
|
1034
|
+
this.loadAnchor(graph);
|
|
757
1035
|
}
|
|
758
1036
|
|
|
759
|
-
|
|
760
|
-
|
|
1037
|
+
this.graphs.splice(0, this.graphs.length);
|
|
1038
|
+
|
|
1039
|
+
if (!_Utils.default.isNull(graph.anchorHistoryElement)) {
|
|
1040
|
+
this.updateAppBarTitle(graph.anchorView.config.id, graph.anchorView.config.title);
|
|
761
1041
|
}
|
|
762
|
-
});
|
|
763
|
-
return obj;
|
|
764
|
-
}
|
|
765
1042
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
1043
|
+
if (graph.config.isWindow) {
|
|
1044
|
+
this.updateContext({
|
|
1045
|
+
windowDisplayState: 'CLOSED'
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}, {
|
|
1051
|
+
key: "loadGraph",
|
|
1052
|
+
value: function loadGraph(isParent, isPopup, isWindow, config, parameterValues) {
|
|
1053
|
+
if (isParent && !isPopup && !isWindow) {
|
|
1054
|
+
this.navHistory.splice(0, this.navHistory.length);
|
|
772
1055
|
|
|
1056
|
+
var _iterator18 = _createForOfIteratorHelper(this.views),
|
|
1057
|
+
_step18;
|
|
773
1058
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
1059
|
+
try {
|
|
1060
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
1061
|
+
var contextView = _step18.value;
|
|
1062
|
+
this.closeView(contextView.handle.api.id, false);
|
|
1063
|
+
}
|
|
1064
|
+
} catch (err) {
|
|
1065
|
+
_iterator18.e(err);
|
|
1066
|
+
} finally {
|
|
1067
|
+
_iterator18.f();
|
|
1068
|
+
}
|
|
781
1069
|
|
|
1070
|
+
this.getViewPortHistory().push('/switch');
|
|
1071
|
+
}
|
|
782
1072
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
this.navigate('/view/unload');
|
|
787
|
-
this.navigate('/view/' + graph.anchorView.config.id);
|
|
788
|
-
}
|
|
1073
|
+
config.isWindow = isWindow;
|
|
1074
|
+
var graph = new _Graph.default(_Utils.default.parseConfig(config));
|
|
1075
|
+
graph.initialNavHistoryDepth = this.navHistory.length;
|
|
789
1076
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
let graph = this.graphs[this.graphs.length - 1];
|
|
793
|
-
let view = graph.config.isWindow ? this.getTopWindowView() : this.getTopAnchorView();
|
|
794
|
-
this.closeView(view.config.id, false);
|
|
1077
|
+
if (this.navHistory.length > 0) {
|
|
1078
|
+
graph.anchorView = this.getTopAnchorView(); //= this.getCurrentView();
|
|
795
1079
|
|
|
796
|
-
|
|
797
|
-
this.loadAnchor(graph);
|
|
1080
|
+
graph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
798
1081
|
}
|
|
799
1082
|
|
|
800
|
-
|
|
1083
|
+
graph.init();
|
|
801
1084
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
1085
|
+
var _iterator19 = _createForOfIteratorHelper(parameterValues),
|
|
1086
|
+
_step19;
|
|
805
1087
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
1088
|
+
try {
|
|
1089
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
1090
|
+
var parameterValue = _step19.value;
|
|
1091
|
+
graph.model[parameterValue.name] = parameterValue.value;
|
|
1092
|
+
}
|
|
1093
|
+
} catch (err) {
|
|
1094
|
+
_iterator19.e(err);
|
|
1095
|
+
} finally {
|
|
1096
|
+
_iterator19.f();
|
|
810
1097
|
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
loadGraph(isParent, isPopup, isWindow, config, parameterValues) {
|
|
815
|
-
if (isParent && !isPopup && !isWindow) {
|
|
816
|
-
this.navHistory.splice(0, this.navHistory.length);
|
|
817
1098
|
|
|
818
|
-
|
|
819
|
-
|
|
1099
|
+
this.graphs.push(graph);
|
|
1100
|
+
}
|
|
1101
|
+
}, {
|
|
1102
|
+
key: "getTopAnchorView",
|
|
1103
|
+
value: function getTopAnchorView() {
|
|
1104
|
+
for (var i = this.views.length - 1; i >= 0; i--) {
|
|
1105
|
+
if (!this.views[i].window) {
|
|
1106
|
+
return this.views[i];
|
|
1107
|
+
}
|
|
820
1108
|
}
|
|
821
|
-
|
|
822
|
-
this.getViewPortHistory().push('/switch');
|
|
823
1109
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
graph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
1110
|
+
}, {
|
|
1111
|
+
key: "getTopWindowView",
|
|
1112
|
+
value: function getTopWindowView() {
|
|
1113
|
+
for (var i = this.views.length - 1; i >= 0; i--) {
|
|
1114
|
+
if (this.views[i].window) {
|
|
1115
|
+
return this.views[i];
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
833
1118
|
}
|
|
1119
|
+
}, {
|
|
1120
|
+
key: "signalGraph",
|
|
1121
|
+
value: function signalGraph(id, event) {
|
|
1122
|
+
if (this.graphs.length > 0) {
|
|
1123
|
+
var graphToSignal = this.graphs[this.graphs.length - 1];
|
|
834
1124
|
|
|
835
|
-
|
|
1125
|
+
var _iterator20 = _createForOfIteratorHelper(this.graphs),
|
|
1126
|
+
_step20;
|
|
836
1127
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
1128
|
+
try {
|
|
1129
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
1130
|
+
var graph = _step20.value;
|
|
840
1131
|
|
|
841
|
-
|
|
842
|
-
|
|
1132
|
+
if (id === graph.id) {
|
|
1133
|
+
graphToSignal = graph;
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
} catch (err) {
|
|
1138
|
+
_iterator20.e(err);
|
|
1139
|
+
} finally {
|
|
1140
|
+
_iterator20.f();
|
|
1141
|
+
}
|
|
843
1142
|
|
|
844
|
-
|
|
845
|
-
for (let i = this.views.length - 1; i >= 0; i--) {
|
|
846
|
-
if (!this.views[i].window) {
|
|
847
|
-
return this.views[i];
|
|
1143
|
+
graphToSignal.signal(event);
|
|
848
1144
|
}
|
|
849
1145
|
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
if (this.views[i].window) {
|
|
855
|
-
return this.views[i];
|
|
856
|
-
}
|
|
1146
|
+
}, {
|
|
1147
|
+
key: "enableFormMarkers",
|
|
1148
|
+
value: function enableFormMarkers(enabled) {
|
|
1149
|
+
this.props.formMarkersEnabled = enabled;
|
|
857
1150
|
}
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
let graphToSignal = this.graphs[this.graphs.length - 1];
|
|
863
|
-
|
|
864
|
-
for (const graph of this.graphs) {
|
|
865
|
-
if (id === graph.id) {
|
|
866
|
-
graphToSignal = graph;
|
|
867
|
-
break;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
graphToSignal.signal(event);
|
|
1151
|
+
}, {
|
|
1152
|
+
key: "isFormMarkersEnabled",
|
|
1153
|
+
value: function isFormMarkersEnabled() {
|
|
1154
|
+
return this.props.formMarkersEnabled;
|
|
872
1155
|
}
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
isFormMarkersEnabled() {
|
|
880
|
-
return this.props.formMarkersEnabled;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
setDashboardView(view) {
|
|
884
|
-
this.props.dashboardView = view;
|
|
885
|
-
}
|
|
1156
|
+
}, {
|
|
1157
|
+
key: "setDashboardView",
|
|
1158
|
+
value: function setDashboardView(view) {
|
|
1159
|
+
this.props.dashboardView = view;
|
|
1160
|
+
}
|
|
1161
|
+
}]);
|
|
886
1162
|
|
|
887
|
-
|
|
1163
|
+
return ApplicationManager;
|
|
1164
|
+
}();
|
|
888
1165
|
|
|
889
|
-
|
|
1166
|
+
var instance = new ApplicationManager();
|
|
890
1167
|
Object.freeze(instance);
|
|
891
1168
|
var _default = instance;
|
|
892
1169
|
exports.default = _default;
|