@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
package/dist/event/Observable.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
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); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -15,111 +17,206 @@ var _ApplicationManager = _interopRequireWildcard(require("../ApplicationManager
|
|
|
15
17
|
|
|
16
18
|
var _DynamicJS = require("../DynamicJS");
|
|
17
19
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
19
21
|
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
22
|
+
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; }
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
26
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
27
|
+
|
|
28
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
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
|
+
|
|
24
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; }
|
|
25
43
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
var Observable = /*#__PURE__*/function () {
|
|
45
|
+
function Observable() {
|
|
46
|
+
var _this = this;
|
|
29
47
|
|
|
30
|
-
|
|
48
|
+
_classCallCheck(this, Observable);
|
|
31
49
|
|
|
32
|
-
_defineProperty(this, "
|
|
50
|
+
_defineProperty(this, "addSubscription", function (subscription) {
|
|
51
|
+
return _this.subscriptions.push(subscription);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
_defineProperty(this, "addApplicationContextSubscription", function (subscription) {
|
|
55
|
+
return _this.applicationContextSubscription.push(subscription);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
_defineProperty(this, "addSubscriptions", function (eventHandlingConfig, componentHandle, viewId) {
|
|
33
59
|
if (!_Utils.default.isNull(eventHandlingConfig)) {
|
|
34
|
-
|
|
60
|
+
var subscriptions = eventHandlingConfig.subscriptions;
|
|
61
|
+
|
|
62
|
+
var _iterator = _createForOfIteratorHelper(subscriptions),
|
|
63
|
+
_step;
|
|
35
64
|
|
|
36
|
-
|
|
37
|
-
|
|
65
|
+
try {
|
|
66
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
67
|
+
var subscription = _step.value;
|
|
68
|
+
|
|
69
|
+
_this.addSubscription(new _EventListener.default(componentHandle, viewId, !_Utils.default.isNull(subscription.publisher) ? subscription.publisher : componentHandle.api.id, subscription.eventType, subscription.actions));
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
_iterator.e(err);
|
|
73
|
+
} finally {
|
|
74
|
+
_iterator.f();
|
|
38
75
|
}
|
|
39
76
|
}
|
|
40
77
|
});
|
|
41
78
|
|
|
42
|
-
_defineProperty(this, "addSystemSubscriptions", (viewId, config)
|
|
79
|
+
_defineProperty(this, "addSystemSubscriptions", function (viewId, config) {
|
|
43
80
|
if (!_Utils.default.isNull(config.disabled) && typeof config.disabled === 'string') {
|
|
44
|
-
|
|
81
|
+
var matches = config.disabled.match(_DynamicJS.TEMPLATE_REGEX);
|
|
45
82
|
|
|
46
83
|
if (!_Utils.default.isNull(matches)) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
84
|
+
var _iterator2 = _createForOfIteratorHelper(matches),
|
|
85
|
+
_step2;
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
89
|
+
var match = _step2.value;
|
|
90
|
+
var component = match.replace('@#{', '').replace('}', '');
|
|
91
|
+
|
|
92
|
+
_this.addSystemGeneratedSubscription(viewId, component, config.id);
|
|
93
|
+
}
|
|
94
|
+
} catch (err) {
|
|
95
|
+
_iterator2.e(err);
|
|
96
|
+
} finally {
|
|
97
|
+
_iterator2.f();
|
|
50
98
|
}
|
|
51
99
|
}
|
|
52
100
|
}
|
|
53
101
|
|
|
54
102
|
if (!_Utils.default.isNull(config.visible) && typeof config.visible === 'string') {
|
|
55
|
-
|
|
103
|
+
var _matches = config.visible.match(_DynamicJS.TEMPLATE_REGEX);
|
|
56
104
|
|
|
57
|
-
if (!_Utils.default.isNull(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
105
|
+
if (!_Utils.default.isNull(_matches)) {
|
|
106
|
+
var _iterator3 = _createForOfIteratorHelper(_matches),
|
|
107
|
+
_step3;
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
111
|
+
var _match = _step3.value;
|
|
112
|
+
|
|
113
|
+
var _component = _match.replace('@#{', '').replace('}', '');
|
|
114
|
+
|
|
115
|
+
_this.addSystemGeneratedSubscription(viewId, _component, config.id);
|
|
116
|
+
}
|
|
117
|
+
} catch (err) {
|
|
118
|
+
_iterator3.e(err);
|
|
119
|
+
} finally {
|
|
120
|
+
_iterator3.f();
|
|
61
121
|
}
|
|
62
122
|
}
|
|
63
123
|
}
|
|
64
124
|
|
|
65
125
|
if (!_Utils.default.isNull(config.validator) && !_Utils.default.isNull(config.validator.nullable)) {
|
|
66
|
-
|
|
126
|
+
var _matches2 = config.validator.nullable.match(_DynamicJS.TEMPLATE_REGEX);
|
|
67
127
|
|
|
68
|
-
if (!_Utils.default.isNull(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
128
|
+
if (!_Utils.default.isNull(_matches2)) {
|
|
129
|
+
var _iterator4 = _createForOfIteratorHelper(_matches2),
|
|
130
|
+
_step4;
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
134
|
+
var _match2 = _step4.value;
|
|
135
|
+
|
|
136
|
+
var _component2 = _match2.replace('@#{', '').replace('}', '');
|
|
137
|
+
|
|
138
|
+
_this.addSystemGeneratedSubscription(viewId, _component2, config.id);
|
|
139
|
+
}
|
|
140
|
+
} catch (err) {
|
|
141
|
+
_iterator4.e(err);
|
|
142
|
+
} finally {
|
|
143
|
+
_iterator4.f();
|
|
72
144
|
}
|
|
73
145
|
}
|
|
74
146
|
}
|
|
75
147
|
});
|
|
76
148
|
|
|
77
|
-
_defineProperty(this, "removeApplicationContextSubscriptions", id
|
|
78
|
-
|
|
149
|
+
_defineProperty(this, "removeApplicationContextSubscriptions", function (id) {
|
|
150
|
+
var index = _this.applicationContextSubscription.findIndex(function (sub) {
|
|
151
|
+
return sub.handler.id === id;
|
|
152
|
+
});
|
|
79
153
|
|
|
80
154
|
if (index >= 0) {
|
|
81
|
-
|
|
155
|
+
_this.applicationContextSubscription.splice(index, 1);
|
|
82
156
|
}
|
|
83
157
|
});
|
|
84
158
|
|
|
85
|
-
_defineProperty(this, "processSystemGeneratedSubscriptions", componentId
|
|
86
|
-
|
|
159
|
+
_defineProperty(this, "processSystemGeneratedSubscriptions", function (componentId) {
|
|
160
|
+
var component = _ApplicationManager.default.resolveComponentApi(componentId);
|
|
87
161
|
|
|
88
162
|
if (!_Utils.default.isNull(component)) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
163
|
+
var _iterator5 = _createForOfIteratorHelper(_this.systemGeneratedSubscriptions),
|
|
164
|
+
_step5;
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
168
|
+
var subscription = _step5.value;
|
|
169
|
+
|
|
170
|
+
if (subscription.publisher === componentId) {
|
|
171
|
+
var _component3 = _ApplicationManager.default.resolveComponentApi(subscription.subscriber);
|
|
172
|
+
|
|
173
|
+
if (!_Utils.default.isNull(_component3)) {
|
|
174
|
+
if (!_Utils.default.isNull(subscription.callback)) {
|
|
175
|
+
subscription.callback();
|
|
176
|
+
} else if (!_Utils.default.isNull(_component3.refresh)) {
|
|
177
|
+
_component3.refresh();
|
|
178
|
+
}
|
|
98
179
|
}
|
|
99
180
|
}
|
|
100
181
|
}
|
|
182
|
+
} catch (err) {
|
|
183
|
+
_iterator5.e(err);
|
|
184
|
+
} finally {
|
|
185
|
+
_iterator5.f();
|
|
101
186
|
}
|
|
102
187
|
}
|
|
103
188
|
});
|
|
104
189
|
|
|
105
|
-
_defineProperty(this, "addSystemGeneratedSubscription", (viewId, publisher, subscriber, callback)
|
|
106
|
-
|
|
190
|
+
_defineProperty(this, "addSystemGeneratedSubscription", function (viewId, publisher, subscriber, callback) {
|
|
191
|
+
var found = false;
|
|
192
|
+
|
|
193
|
+
var currentViewId = _ApplicationManager.default.getView(viewId).config.id;
|
|
107
194
|
|
|
108
|
-
|
|
195
|
+
var _iterator6 = _createForOfIteratorHelper(_this.systemGeneratedSubscriptions),
|
|
196
|
+
_step6;
|
|
109
197
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
198
|
+
try {
|
|
199
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
200
|
+
var systemGeneratedSubscription = _step6.value;
|
|
201
|
+
|
|
202
|
+
if (publisher === systemGeneratedSubscription.publisher && subscriber === systemGeneratedSubscription.subscriber && currentViewId === systemGeneratedSubscription.viewId) {
|
|
203
|
+
found = true;
|
|
204
|
+
}
|
|
113
205
|
}
|
|
206
|
+
} catch (err) {
|
|
207
|
+
_iterator6.e(err);
|
|
208
|
+
} finally {
|
|
209
|
+
_iterator6.f();
|
|
114
210
|
}
|
|
115
211
|
|
|
116
212
|
if (!found) {
|
|
117
|
-
|
|
213
|
+
var subscription = {};
|
|
118
214
|
subscription.publisher = publisher;
|
|
119
215
|
subscription.subscriber = subscriber;
|
|
120
216
|
subscription.callback = callback;
|
|
121
217
|
subscription.viewId = currentViewId;
|
|
122
|
-
|
|
218
|
+
|
|
219
|
+
_this.systemGeneratedSubscriptions.push(subscription);
|
|
123
220
|
}
|
|
124
221
|
});
|
|
125
222
|
|
|
@@ -139,125 +236,209 @@ class Observable {
|
|
|
139
236
|
*/
|
|
140
237
|
|
|
141
238
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (!_Utils.default.isNull(subscription.getActions())) {
|
|
174
|
-
for (let j = 0; j < subscription.getActions().length; j++) {
|
|
175
|
-
let action = subscription.getActions()[j];
|
|
176
|
-
|
|
177
|
-
_ActionHandlers.default.invoke(action, be, subscription);
|
|
178
|
-
}
|
|
179
|
-
} else if (!_Utils.default.isNull(subscription.getCallback())) {
|
|
180
|
-
subscription.getCallback()(be);
|
|
239
|
+
_createClass(Observable, [{
|
|
240
|
+
key: "emitContextChangeEvent",
|
|
241
|
+
value: function () {
|
|
242
|
+
var _emitContextChangeEvent = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(context, newValues) {
|
|
243
|
+
var _iterator7, _step7, applicationContextSubscription;
|
|
244
|
+
|
|
245
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
246
|
+
while (1) {
|
|
247
|
+
switch (_context.prev = _context.next) {
|
|
248
|
+
case 0:
|
|
249
|
+
_iterator7 = _createForOfIteratorHelper(this.applicationContextSubscription);
|
|
250
|
+
|
|
251
|
+
try {
|
|
252
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
253
|
+
applicationContextSubscription = _step7.value;
|
|
254
|
+
|
|
255
|
+
if (applicationContextSubscription.handler.api) {
|
|
256
|
+
applicationContextSubscription.handler.api.onContextChange(context, newValues);
|
|
257
|
+
} else {
|
|
258
|
+
applicationContextSubscription.handler.onContextChange(context, newValues);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
} catch (err) {
|
|
262
|
+
_iterator7.e(err);
|
|
263
|
+
} finally {
|
|
264
|
+
_iterator7.f();
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
case 2:
|
|
268
|
+
case "end":
|
|
269
|
+
return _context.stop();
|
|
181
270
|
}
|
|
182
271
|
}
|
|
183
|
-
}
|
|
272
|
+
}, _callee, this);
|
|
273
|
+
}));
|
|
184
274
|
|
|
185
|
-
|
|
275
|
+
function emitContextChangeEvent(_x, _x2) {
|
|
276
|
+
return _emitContextChangeEvent.apply(this, arguments);
|
|
186
277
|
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
278
|
|
|
190
|
-
|
|
191
|
-
|
|
279
|
+
return emitContextChangeEvent;
|
|
280
|
+
}()
|
|
281
|
+
/**
|
|
282
|
+
* Fires an event.
|
|
283
|
+
*
|
|
284
|
+
* @param eventType eventType the event type
|
|
285
|
+
* @param be the base event
|
|
286
|
+
* @return false if any subscriptions cancel the event.
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
}, {
|
|
290
|
+
key: "fireEvent",
|
|
291
|
+
value: function () {
|
|
292
|
+
var _fireEvent = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(eventType, be) {
|
|
293
|
+
var sourceId, viewId, _iterator8, _step8, subscription, j, action;
|
|
294
|
+
|
|
295
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
296
|
+
while (1) {
|
|
297
|
+
switch (_context2.prev = _context2.next) {
|
|
298
|
+
case 0:
|
|
299
|
+
// Components could be unloading on the cases where screens are busy closing,
|
|
300
|
+
// meaning the "current" object may be nullified, so we need the null check
|
|
301
|
+
// This happens on async events such as RPC_CALL. If there is no view masking,
|
|
302
|
+
// the REST call may return while the component has been destroyed, and the source's current could be null
|
|
303
|
+
// Proper masking when doing REST CALL should prevent this from happening. The null check provides the sort of defence
|
|
304
|
+
if (!_Utils.default.isNull(be.getSource()) && !_Utils.default.isNull(be.getSource().api)) {
|
|
305
|
+
sourceId = be.getSource().api.id;
|
|
306
|
+
viewId = be.viewId;
|
|
307
|
+
|
|
308
|
+
if (!_Utils.default.isNull(sourceId)) {
|
|
309
|
+
_iterator8 = _createForOfIteratorHelper(this.subscriptions);
|
|
310
|
+
|
|
311
|
+
try {
|
|
312
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
313
|
+
subscription = _step8.value;
|
|
314
|
+
|
|
315
|
+
if ((subscription.getViewId() === viewId || _ApplicationManager.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType) {
|
|
316
|
+
if (!_Utils.default.isNull(subscription.getActions())) {
|
|
317
|
+
for (j = 0; j < subscription.getActions().length; j++) {
|
|
318
|
+
action = subscription.getActions()[j];
|
|
319
|
+
|
|
320
|
+
_ActionHandlers.default.invoke(action, be, subscription);
|
|
321
|
+
}
|
|
322
|
+
} else if (!_Utils.default.isNull(subscription.getCallback())) {
|
|
323
|
+
subscription.getCallback()(be);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
} catch (err) {
|
|
328
|
+
_iterator8.e(err);
|
|
329
|
+
} finally {
|
|
330
|
+
_iterator8.f();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
this.processSystemGeneratedSubscriptions(sourceId);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
case 1:
|
|
338
|
+
case "end":
|
|
339
|
+
return _context2.stop();
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}, _callee2, this);
|
|
343
|
+
}));
|
|
192
344
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return counter;
|
|
345
|
+
function fireEvent(_x3, _x4) {
|
|
346
|
+
return _fireEvent.apply(this, arguments);
|
|
196
347
|
}
|
|
197
348
|
|
|
198
|
-
|
|
199
|
-
}
|
|
349
|
+
return fireEvent;
|
|
350
|
+
}()
|
|
351
|
+
}, {
|
|
352
|
+
key: "getNextIndexToRemove",
|
|
353
|
+
value: function getNextIndexToRemove(val, prop, listenerCollection) {
|
|
354
|
+
var counter = 0;
|
|
200
355
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Clears all event subscriptions
|
|
205
|
-
*
|
|
206
|
-
*/
|
|
356
|
+
var _iterator9 = _createForOfIteratorHelper(listenerCollection),
|
|
357
|
+
_step9;
|
|
207
358
|
|
|
359
|
+
try {
|
|
360
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
361
|
+
var listener = _step9.value;
|
|
208
362
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
363
|
+
if (listener[prop] === val) {
|
|
364
|
+
return counter;
|
|
365
|
+
}
|
|
213
366
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
let index = -2;
|
|
367
|
+
counter++;
|
|
368
|
+
}
|
|
369
|
+
} catch (err) {
|
|
370
|
+
_iterator9.e(err);
|
|
371
|
+
} finally {
|
|
372
|
+
_iterator9.f();
|
|
373
|
+
}
|
|
222
374
|
|
|
223
|
-
|
|
224
|
-
this.subscriptions.splice(index, 1);
|
|
375
|
+
return -1;
|
|
225
376
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Clears all event subscriptions
|
|
379
|
+
*
|
|
380
|
+
*/
|
|
381
|
+
|
|
382
|
+
}, {
|
|
383
|
+
key: "clearAllEventListeners",
|
|
384
|
+
value: function clearAllEventListeners() {
|
|
385
|
+
this.subscriptions.splice(0, this.subscriptions.length);
|
|
386
|
+
this.systemGeneratedSubscriptions.splice(0, this.systemGeneratedSubscriptions.length);
|
|
233
387
|
}
|
|
234
|
-
}
|
|
388
|
+
}, {
|
|
389
|
+
key: "clearEventListeners",
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Clears all event subscriptions for the specified view
|
|
393
|
+
*
|
|
394
|
+
* @param viewId the view
|
|
395
|
+
*/
|
|
396
|
+
value: function clearEventListeners(viewId) {
|
|
397
|
+
var indexes = [];
|
|
398
|
+
var index = -2;
|
|
399
|
+
|
|
400
|
+
while ((index = this.getNextIndexToRemove(viewId, 'viewId', this.subscriptions)) !== -1) {
|
|
401
|
+
this.subscriptions.splice(index, 1);
|
|
402
|
+
}
|
|
235
403
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
*
|
|
239
|
-
* @param componentId the view
|
|
240
|
-
*/
|
|
241
|
-
clearComponentEventListeners(componentId) {
|
|
242
|
-
let indexes = [];
|
|
243
|
-
let index = -2;
|
|
404
|
+
if (!_Utils.default.isNull(this.systemGeneratedSubscriptions)) {
|
|
405
|
+
index = -2;
|
|
244
406
|
|
|
245
|
-
|
|
246
|
-
|
|
407
|
+
while ((index = this.getNextIndexToRemove(viewId, 'viewId', this.systemGeneratedSubscriptions)) !== -1) {
|
|
408
|
+
this.systemGeneratedSubscriptions.splice(index, 1);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
247
411
|
}
|
|
412
|
+
}, {
|
|
413
|
+
key: "clearComponentEventListeners",
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Clears all event subscriptions for the specified view
|
|
417
|
+
*
|
|
418
|
+
* @param componentId the view
|
|
419
|
+
*/
|
|
420
|
+
value: function clearComponentEventListeners(componentId) {
|
|
421
|
+
var indexes = [];
|
|
422
|
+
var index = -2;
|
|
423
|
+
|
|
424
|
+
while ((index = this.getNextIndexToRemove(componentId, 'subscriber', this.subscriptions)) !== -1) {
|
|
425
|
+
this.subscriptions.splice(index, 1);
|
|
426
|
+
}
|
|
248
427
|
|
|
249
|
-
|
|
250
|
-
|
|
428
|
+
if (!_Utils.default.isNull(this.systemGeneratedSubscriptions)) {
|
|
429
|
+
index = -2;
|
|
251
430
|
|
|
252
|
-
|
|
253
|
-
|
|
431
|
+
while ((index = this.getNextIndexToRemove(componentId, 'subscriber', this.systemGeneratedSubscriptions)) !== -1) {
|
|
432
|
+
this.systemGeneratedSubscriptions.splice(index, 1);
|
|
433
|
+
}
|
|
254
434
|
}
|
|
255
435
|
}
|
|
256
|
-
}
|
|
436
|
+
}]);
|
|
257
437
|
|
|
258
|
-
|
|
438
|
+
return Observable;
|
|
439
|
+
}();
|
|
259
440
|
|
|
260
|
-
|
|
441
|
+
var instance = new Observable();
|
|
261
442
|
Object.freeze(instance);
|
|
262
443
|
var _default = instance;
|
|
263
444
|
exports.default = _default;
|