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