@agilemotion/oui-react-js 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/ApplicationManager.js +675 -1044
  2. package/dist/BasicApp.js +7 -27
  3. package/dist/BasicAppHome.js +27 -101
  4. package/dist/DynamicJS.js +109 -197
  5. package/dist/InteractionPortalApp.js +7 -27
  6. package/dist/InteractionPortalAppHome.js +21 -87
  7. package/dist/InteractionPortalApp_old.js +60 -122
  8. package/dist/RestUtils.js +269 -410
  9. package/dist/TypedValue.js +20 -26
  10. package/dist/Utils.js +295 -481
  11. package/dist/WithRouter.js +9 -17
  12. package/dist/assets/jss/components/authNavbarStyle.js +168 -171
  13. package/dist/assets/jss/components/buttonStyle.js +2 -5
  14. package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
  15. package/dist/assets/jss/components/cardBodyStyle.js +2 -5
  16. package/dist/assets/jss/components/cardFooterStyle.js +2 -5
  17. package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
  18. package/dist/assets/jss/components/cardIconStyle.js +2 -5
  19. package/dist/assets/jss/components/cardStyle.js +2 -5
  20. package/dist/assets/jss/components/cardTextStyle.js +2 -5
  21. package/dist/assets/jss/components/customDropdownStyle.js +171 -173
  22. package/dist/assets/jss/components/customInputStyle.js +5 -13
  23. package/dist/assets/jss/components/dropdownStyle.js +71 -74
  24. package/dist/assets/jss/components/footerStyle.js +14 -23
  25. package/dist/assets/jss/components/headerLinksStyle.js +52 -53
  26. package/dist/assets/jss/components/headerStyle.js +68 -73
  27. package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
  28. package/dist/assets/jss/components/navbarStyle.js +79 -84
  29. package/dist/assets/jss/components/sidebarStyle.js +438 -441
  30. package/dist/assets/jss/components/typographyStyle.js +5 -13
  31. package/dist/assets/jss/rootStyle.js +85 -151
  32. package/dist/assets/jss/views/layoutStyle.js +45 -51
  33. package/dist/assets/jss/views/loginBasicStyle.js +2 -5
  34. package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
  35. package/dist/assets/jss/views/loginStyle.js +80 -87
  36. package/dist/components/AlertBar.js +20 -75
  37. package/dist/components/AlertItem.js +13 -49
  38. package/dist/components/AlertTemplate.js +12 -18
  39. package/dist/components/Button.js +41 -112
  40. package/dist/components/Calendar.js +99 -208
  41. package/dist/components/ConfirmationDialog.js +13 -54
  42. package/dist/components/DataGrid.js +271 -695
  43. package/dist/components/DataGridColumn.js +24 -74
  44. package/dist/components/DataGridFilter.js +107 -245
  45. package/dist/components/DataGridHeading.js +34 -78
  46. package/dist/components/Dialog.js +37 -130
  47. package/dist/components/DocumentTemplateDesigner.js +16 -57
  48. package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
  49. package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
  50. package/dist/components/DocumentViewer.js +25 -65
  51. package/dist/components/DocumentViewerComponent.js +13 -44
  52. package/dist/components/ElementResizeHandler.js +148 -200
  53. package/dist/components/FileThumb.js +15 -56
  54. package/dist/components/Graph.js +98 -203
  55. package/dist/components/GraphNode.js +20 -61
  56. package/dist/components/HtmlPanel.js +38 -105
  57. package/dist/components/Icon.js +174 -253
  58. package/dist/components/LoadingIndicator.js +4 -11
  59. package/dist/components/LottieIcon.js +63 -60
  60. package/dist/components/PopupView.js +21 -60
  61. package/dist/components/Portlet.js +18 -60
  62. package/dist/components/RegularButton.js +34 -42
  63. package/dist/components/SignaturePanel.js +19 -67
  64. package/dist/components/SocketManager.js +133 -228
  65. package/dist/components/StepperTitleBar.js +48 -99
  66. package/dist/components/TabPage.js +30 -47
  67. package/dist/components/TabPanel.js +35 -122
  68. package/dist/components/TableCellContent.js +34 -98
  69. package/dist/components/TemplateDesigner.js +115 -230
  70. package/dist/components/TemplateItemEventHandler.js +298 -481
  71. package/dist/components/TemplateTable.js +117 -218
  72. package/dist/components/TitleBar.js +15 -53
  73. package/dist/components/Toolbar.js +44 -110
  74. package/dist/components/Tooltip.js +37 -56
  75. package/dist/components/Tree.js +50 -143
  76. package/dist/components/UseIsVisible.js +5 -25
  77. package/dist/components/card/Card.js +35 -39
  78. package/dist/components/card/CardAvatar.js +21 -32
  79. package/dist/components/card/CardBody.js +29 -36
  80. package/dist/components/card/CardFooter.js +26 -35
  81. package/dist/components/card/CardHeader.js +29 -36
  82. package/dist/components/card/CardIcon.js +15 -29
  83. package/dist/components/card/CardText.js +15 -29
  84. package/dist/components/customInput/CustomInput.js +38 -40
  85. package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
  86. package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
  87. package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
  88. package/dist/components/dashboard/components/Header.js +15 -52
  89. package/dist/components/dashboard/components/LeftDrawer.js +9 -23
  90. package/dist/components/dashboard/components/UserIdentity.js +4 -12
  91. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
  92. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
  93. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
  94. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
  95. package/dist/components/dashboard/components/portal/Timeline.js +3 -8
  96. package/dist/components/dashboard/components/portal/Workspace.js +4 -13
  97. package/dist/components/footer/Footer.js +23 -45
  98. package/dist/components/footer/HomeFooter.js +38 -78
  99. package/dist/components/form/AddressSearch.js +26 -76
  100. package/dist/components/form/AutoComplete.js +54 -168
  101. package/dist/components/form/BaseField.js +59 -189
  102. package/dist/components/form/Checkbox.js +11 -24
  103. package/dist/components/form/DatePicker.js +28 -82
  104. package/dist/components/form/FieldSet.js +84 -300
  105. package/dist/components/form/Form.js +206 -501
  106. package/dist/components/form/GridField.js +83 -243
  107. package/dist/components/form/IconField.js +10 -21
  108. package/dist/components/form/ImageEditor.js +98 -208
  109. package/dist/components/form/LabelField.js +13 -28
  110. package/dist/components/form/LookupField.js +36 -102
  111. package/dist/components/form/MultiFileUploadField.js +67 -134
  112. package/dist/components/form/RadioGroup.js +20 -57
  113. package/dist/components/form/Section.js +33 -118
  114. package/dist/components/form/SelectItem.js +36 -83
  115. package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
  116. package/dist/components/form/Switch.js +11 -24
  117. package/dist/components/form/TextField.js +19 -55
  118. package/dist/components/form/TimePicker.js +18 -43
  119. package/dist/components/form/TransferList.js +76 -200
  120. package/dist/components/form/UploadField.js +134 -256
  121. package/dist/components/grid/GridContainer.js +10 -23
  122. package/dist/components/grid/GridItem.js +10 -23
  123. package/dist/components/layout/CollapsiblePanel.js +20 -59
  124. package/dist/components/layout/Layout.js +40 -149
  125. package/dist/components/layout/View.js +65 -195
  126. package/dist/components/layout/ViewContainer.js +13 -33
  127. package/dist/components/layout/ViewPort.js +14 -48
  128. package/dist/components/layout/Window.js +62 -135
  129. package/dist/components/layout/WindowViewPort.js +18 -63
  130. package/dist/components/media/ClosablePanel.js +9 -18
  131. package/dist/components/media/LobbyWaitingList.js +11 -17
  132. package/dist/components/media/MediaSoupHelper.js +173 -401
  133. package/dist/components/media/SideBarContent.js +17 -34
  134. package/dist/components/media/SocketRequest.js +7 -18
  135. package/dist/components/media/SocketResponse.js +5 -14
  136. package/dist/components/media/Timer.js +18 -54
  137. package/dist/components/media/Toolbar.js +97 -254
  138. package/dist/components/media/ToolbarButton.js +34 -95
  139. package/dist/components/media/Toolbar_bck.js +70 -186
  140. package/dist/components/media/Tracks.js +19 -33
  141. package/dist/components/media/TrainingRoom.js +121 -374
  142. package/dist/components/media/Transports.js +17 -29
  143. package/dist/components/media/VCEventManager.js +45 -116
  144. package/dist/components/media/VCEventType.js +82 -168
  145. package/dist/components/media/VCParticipantList.js +16 -51
  146. package/dist/components/media/VCParticipantListItem.js +44 -141
  147. package/dist/components/media/VCRoom.js +14 -58
  148. package/dist/components/media/VCRoomParticipant.js +235 -556
  149. package/dist/components/media/VCRoomRecorder.js +106 -204
  150. package/dist/components/media/VCRoomWorkspace.js +248 -584
  151. package/dist/components/media/Video.js +27 -112
  152. package/dist/components/media/VideoPlayer.js +23 -91
  153. package/dist/components/media/chat/ChatRoom.js +143 -361
  154. package/dist/components/media/chat/ChatRoomItem.js +17 -58
  155. package/dist/components/media/chat/ChatRoomList.js +15 -60
  156. package/dist/components/menu/CollapsibleMenu.js +22 -52
  157. package/dist/components/menu/MenuBars.js +50 -116
  158. package/dist/components/menu/MenuButton.js +53 -130
  159. package/dist/components/menu/MenuItem.js +11 -51
  160. package/dist/components/menu/MenuLink.js +13 -41
  161. package/dist/components/menu/PopupMenu.js +13 -25
  162. package/dist/components/navbars/AuthNavbar.js +21 -56
  163. package/dist/components/navbars/HomeNavbar.js +213 -290
  164. package/dist/components/navbars/PortalNavbar.js +26 -81
  165. package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
  166. package/dist/components/signatures/AlertItem.js +14 -50
  167. package/dist/components/signatures/Card.js +6 -16
  168. package/dist/components/signatures/DocumentContainer.js +57 -165
  169. package/dist/components/signatures/ImageSignatureInput.js +64 -124
  170. package/dist/components/signatures/MenuButton.js +28 -63
  171. package/dist/components/signatures/Prompt.js +6 -41
  172. package/dist/components/signatures/ResponsiveTable.js +181 -370
  173. package/dist/components/signatures/SearchView.js +34 -112
  174. package/dist/components/signatures/SignatorySearch.js +11 -44
  175. package/dist/components/signatures/SignatorySearchForm.js +19 -50
  176. package/dist/components/signatures/SignatureInput.js +28 -91
  177. package/dist/components/signatures/SignatureInputProps.js +49 -144
  178. package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
  179. package/dist/components/signatures/Toolbar.js +99 -173
  180. package/dist/components/signatures/ViewUtils.js +207 -313
  181. package/dist/components/typography/Danger.js +6 -11
  182. package/dist/components/typography/Info.js +7 -11
  183. package/dist/components/typography/Link.js +6 -12
  184. package/dist/event/ActionHandlers.js +48 -87
  185. package/dist/event/Event.js +21 -25
  186. package/dist/event/EventListener.js +54 -48
  187. package/dist/event/EventType.js +18 -40
  188. package/dist/event/LoadDataActionHandler.js +10 -31
  189. package/dist/event/Observable.js +204 -396
  190. package/dist/event/RouteActionHandler.js +119 -171
  191. package/dist/event/ScriptActionHandler.js +10 -32
  192. package/dist/event/ServiceCallActionHandler.js +37 -64
  193. package/dist/event/SignalGraphActionHandler.js +9 -31
  194. package/dist/js/Addresses.js +23 -42
  195. package/dist/js/Calendar.js +41 -89
  196. package/dist/js/DynamicLib.js +11 -23
  197. package/dist/js/Media.js +80 -174
  198. package/dist/js/Validators.js +6 -12
  199. package/dist/js/Windows.js +22 -40
  200. package/dist/redux/store/ConfigureStore.js +12 -29
  201. package/dist/redux/store/DashboardStore.js +47 -120
  202. package/dist/redux/store/History.js +2 -5
  203. package/dist/redux/store/SecurityStore.js +22 -65
  204. package/dist/security/TokenManager.js +29 -53
  205. package/dist/theme-default.js +3 -8
  206. package/dist/view/Dashboard.js +140 -308
  207. package/dist/view/PortalDashboard.js +6 -13
  208. package/dist/view/Settings.js +3 -11
  209. package/dist/view/Views.js +15 -35
  210. package/dist/view/security/ChangePasswordBasic.js +41 -147
  211. package/dist/view/security/ForgotPassword.js +26 -106
  212. package/dist/view/security/ForgotPasswordBasic.js +22 -96
  213. package/dist/view/security/Login.js +29 -117
  214. package/dist/view/security/LoginBasic.js +28 -108
  215. package/dist/view/security/LoginInteractionPortal.js +28 -106
  216. package/dist/view/security/ResetPassword.js +25 -110
  217. package/dist/view/security/ResetPasswordBasic.js +39 -142
  218. package/dist/view/security/Security.js +14 -26
  219. package/package.json +26 -21
@@ -4,198 +4,146 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _RestUtils = require("../RestUtils");
11
-
12
9
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
13
-
14
10
  var _Utils = _interopRequireDefault(require("../Utils"));
15
-
16
11
  var _DynamicJS = _interopRequireDefault(require("../DynamicJS"));
17
-
18
12
  var _Observable = _interopRequireDefault(require("../event/Observable"));
19
-
20
13
  var _EventType = _interopRequireDefault(require("./EventType"));
21
-
22
14
  var _Event = _interopRequireDefault(require("./Event"));
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- 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); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
31
-
32
- var location = window.location.protocol + '//' + window.location.hostname;
33
-
34
- var RouteActionHandler = /*#__PURE__*/function () {
35
- function RouteActionHandler() {
36
- _classCallCheck(this, RouteActionHandler);
37
-
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const location = window.location.protocol + '//' + window.location.hostname;
17
+ class RouteActionHandler {
18
+ constructor() {
38
19
  if (!RouteActionHandler.instance) {
39
20
  RouteActionHandler.instance = this;
40
21
  }
41
-
42
22
  return RouteActionHandler.instance;
43
23
  }
44
-
45
- _createClass(RouteActionHandler, [{
46
- key: "execute",
47
- value: function execute(actionConfig, event, component, currentViewId) {
48
- var _this = this;
49
-
50
- // TODO : Implement this full URL
51
- //String url = webUrl + "?version=1.0" + (viewPath != null ? "&id=" + URL.encodeQueryString(viewPath) : "")
52
- // + (viewPathRequestDto != null ? "&serviceRequest=" + URL.encodeQueryString(requestDtoWriter.write(viewPathRequestDto)) : "")
53
- // + (portalCurrentOrg != null ? "&profile=" + portalCurrentOrg : "");
54
- _ApplicationManager.default.enableFormMarkers(false);
55
-
56
- var forward = true;
57
- var path = null;
58
- var isParent = _Utils.default.isNull(actionConfig.parent) ? false : actionConfig.parent;
59
- var isPopup = _Utils.default.isNull(actionConfig.popUp) ? false : actionConfig.popUp;
60
- var isWindow = _Utils.default.isNull(actionConfig.window) ? false : actionConfig.window;
61
-
62
- if (!_Utils.default.isNull(actionConfig.pathEvaluator)) {
63
- path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event.source.id, actionConfig.pathEvaluator);
64
- } else {
65
- path = _ApplicationManager.default.isExpression(actionConfig.path) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
66
-
67
- if ('@#{history.back}' === actionConfig.path && _ApplicationManager.default.graphs.length === 0) {
68
- var historyElement = _ApplicationManager.default.getPreviousHistoryElement();
69
-
70
- if (historyElement === null) {
71
- console.error('Invalid path. Cannot go back in history');
72
- return;
73
- }
74
-
75
- path = historyElement.path;
76
- isParent = historyElement.parent;
77
- forward = false;
24
+ execute(actionConfig, event, component, currentViewId) {
25
+ // TODO : Implement this full URL
26
+ //String url = webUrl + "?version=1.0" + (viewPath != null ? "&id=" + URL.encodeQueryString(viewPath) : "")
27
+ // + (viewPathRequestDto != null ? "&serviceRequest=" + URL.encodeQueryString(requestDtoWriter.write(viewPathRequestDto)) : "")
28
+ // + (portalCurrentOrg != null ? "&profile=" + portalCurrentOrg : "");
29
+
30
+ _ApplicationManager.default.enableFormMarkers(false);
31
+ let forward = true;
32
+ let path = null;
33
+ let isParent = _Utils.default.isNull(actionConfig.parent) ? false : actionConfig.parent;
34
+ let isPopup = _Utils.default.isNull(actionConfig.popUp) ? false : actionConfig.popUp;
35
+ let isWindow = _Utils.default.isNull(actionConfig.window) ? false : actionConfig.window;
36
+ if (!_Utils.default.isNull(actionConfig.pathEvaluator)) {
37
+ path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event.source.id, actionConfig.pathEvaluator);
38
+ } else {
39
+ path = _ApplicationManager.default.isExpression(actionConfig.path) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
40
+ if ('@#{history.back}' === actionConfig.path && _ApplicationManager.default.graphs.length === 0) {
41
+ let historyElement = _ApplicationManager.default.getPreviousHistoryElement();
42
+ if (historyElement === null) {
43
+ console.error('Invalid path. Cannot go back in history');
44
+ return;
78
45
  }
46
+ path = historyElement.path;
47
+ isParent = historyElement.parent;
48
+ forward = false;
79
49
  }
80
-
81
- var parameterValues = [];
82
-
83
- if (!_Utils.default.isNull(actionConfig.parameters)) {
84
- for (var i = 0; i < actionConfig.parameters.length; i++) {
85
- var parameter = actionConfig.parameters[i];
86
-
87
- var parameterValue = _ApplicationManager.default.resolveParameterValue(parameter, event.data);
88
-
89
- var validator = parameter.validator;
90
-
91
- if (_Utils.default.isNull(parameterValue) && !_Utils.default.isNull(validator) && _Utils.default.evaluateBooleanExpression(validator.nullable, parameter.name) === false) {
92
- console.error('Routing to path ' + path + ', failed. A null value for a NON-NULLABLE parameter was found - ' + JSON.stringify(parameter)); // TODO : Display the configured error message at the correct error panel
93
-
94
- return;
95
- }
96
-
97
- var param = {};
98
- param.name = parameter.name;
99
- param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
100
- parameterValues.push(param);
50
+ }
51
+ let parameterValues = [];
52
+ if (!_Utils.default.isNull(actionConfig.parameters)) {
53
+ for (let i = 0; i < actionConfig.parameters.length; i++) {
54
+ let parameter = actionConfig.parameters[i];
55
+ let parameterValue = _ApplicationManager.default.resolveParameterValue(parameter, event.data);
56
+ let validator = parameter.validator;
57
+ if (_Utils.default.isNull(parameterValue) && !_Utils.default.isNull(validator) && _Utils.default.evaluateBooleanExpression(validator.nullable, parameter.name) === false) {
58
+ console.error('Routing to path ' + path + ', failed. A null value for a NON-NULLABLE parameter was found - ' + JSON.stringify(parameter));
59
+ // TODO : Display the configured error message at the correct error panel
60
+ return;
101
61
  }
62
+ let param = {};
63
+ param.name = parameter.name;
64
+ param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
65
+ parameterValues.push(param);
102
66
  }
103
-
104
- var currentGraph = _ApplicationManager.default.graphs.length > 0 ? _ApplicationManager.default.graphs[_ApplicationManager.default.graphs.length - 1] : null;
105
-
106
- if ('@#{home}' === actionConfig.path) {
107
- _ApplicationManager.default.navigate('/view/unload');
108
-
109
- _ApplicationManager.default.navigate('/view/dashboard');
110
- } else if ('@#{history.back}' === actionConfig.path && currentGraph) {
111
- if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
112
- _ApplicationManager.default.removeLoadedGraph(true);
113
- }
114
- } else {
115
- var url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/view/get?version=1.0&id=' + path;
116
- (0, _RestUtils.sendRequest)(url, function (data) {
117
- if (isParent && currentGraph) {
118
- if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
119
- _ApplicationManager.default.removeLoadedGraph(false);
120
- }
67
+ }
68
+ let currentGraph = _ApplicationManager.default.graphs.length > 0 ? _ApplicationManager.default.graphs[_ApplicationManager.default.graphs.length - 1] : null;
69
+ if ('@#{home}' === actionConfig.path) {
70
+ _ApplicationManager.default.navigate('/view/unload');
71
+ _ApplicationManager.default.navigate('/view/dashboard');
72
+ } else if ('@#{history.back}' === actionConfig.path && currentGraph) {
73
+ if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
74
+ _ApplicationManager.default.removeLoadedGraph(true);
75
+ }
76
+ } else {
77
+ let url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/view/get?version=1.0&id=' + path;
78
+ (0, _RestUtils.sendRequest)(url, data => {
79
+ if (isParent && currentGraph) {
80
+ if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
81
+ _ApplicationManager.default.removeLoadedGraph(false);
121
82
  }
122
-
123
- if (data.type === 'view') {
124
- var currentView = isWindow ? _ApplicationManager.default.getTopWindowView() : _ApplicationManager.default.getTopAnchorView();
125
-
126
- if (_Utils.default.isNull(currentView) || !currentView.popUp) {
127
- var view = {};
128
- var defaultModel = {};
129
-
130
- _Utils.default.updateModel(parameterValues, defaultModel);
131
-
132
- view.config = data;
133
- view.parameters = parameterValues;
134
- view.parent = isParent;
135
- view.popUp = isPopup;
136
- view.window = isWindow;
137
- view.config.window = isWindow;
138
- view.handle = {
139
- api: {
140
- get id() {
141
- return data.id;
142
- },
143
-
144
- get model() {
145
- return defaultModel;
146
- },
147
-
148
- getChild: function getChild(id) {
149
- return null;
150
- },
151
- updateModel: function updateModel(values) {
152
- _Utils.default.updateModel(values, defaultModel);
153
- },
154
- setModelValue: function setModelValue(key, value) {
155
- _this.defaultModel.key = value;
156
- },
157
- getModelValue: function getModelValue(key) {
158
- return _this.defaultModel[key];
159
- },
160
- loaded: function loaded() {
161
- return false;
162
- }
163
- }
164
- };
165
-
166
- _ApplicationManager.default.addView(view, path, forward); // None-existing route to ensure that the current view unloads
167
-
168
-
169
- if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
170
- if (!isWindow) {
171
- _ApplicationManager.default.navigate('/view/unload');
172
-
173
- _ApplicationManager.default.navigate('/view/' + data.id);
83
+ }
84
+ if (data.type === 'view') {
85
+ let currentView = isWindow ? _ApplicationManager.default.getTopWindowView() : _ApplicationManager.default.getTopAnchorView();
86
+ if (_Utils.default.isNull(currentView) || !currentView.popUp) {
87
+ let view = {};
88
+ let defaultModel = {};
89
+ _Utils.default.updateModel(parameterValues, defaultModel);
90
+ view.config = data;
91
+ view.parameters = parameterValues;
92
+ view.parent = isParent;
93
+ view.popUp = isPopup;
94
+ view.window = isWindow;
95
+ view.config.window = isWindow;
96
+ view.handle = {
97
+ api: {
98
+ get id() {
99
+ return data.id;
100
+ },
101
+ get model() {
102
+ return defaultModel;
103
+ },
104
+ getChild: id => {
105
+ return null;
106
+ },
107
+ updateModel: values => {
108
+ _Utils.default.updateModel(values, defaultModel);
109
+ },
110
+ setModelValue: (key, value) => {
111
+ this.defaultModel.key = value;
112
+ },
113
+ getModelValue: key => {
114
+ return this.defaultModel[key];
115
+ },
116
+ loaded: () => {
117
+ return false;
174
118
  }
175
119
  }
176
- } else {
177
- /*applicationManager.closeCurrentView(false);
178
- currentView = applicationManager.getCurrentView();
179
- if (currentView) {
180
- currentView.handle.api.updateModel(parameterValues);
181
- let event = new Event(currentView.handle, currentView.config.id, null);
182
- eventManager.fireEvent(EventType.COMPONENT_LOAD, event);
183
- }*/
120
+ };
121
+ _ApplicationManager.default.addView(view, path, forward);
122
+ // None-existing route to ensure that the current view unloads
123
+ if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
124
+ if (!isWindow) {
125
+ _ApplicationManager.default.navigate('/view/unload');
126
+ _ApplicationManager.default.navigate('/view/' + data.id);
127
+ }
184
128
  }
185
- } else if (data.type === 'graph') {
186
- _ApplicationManager.default.loadGraph(isParent, isPopup, isWindow, data, parameterValues);
129
+ } else {
130
+ /*applicationManager.closeCurrentView(false);
131
+ currentView = applicationManager.getCurrentView();
132
+ if (currentView) {
133
+ currentView.handle.api.updateModel(parameterValues);
134
+ let event = new Event(currentView.handle, currentView.config.id, null);
135
+ eventManager.fireEvent(EventType.COMPONENT_LOAD, event);
136
+ }*/
187
137
  }
188
- }, function (e) {
189
- console.error(e);
190
- }, true, false);
191
- }
138
+ } else if (data.type === 'graph') {
139
+ _ApplicationManager.default.loadGraph(isParent, isPopup, isWindow, data, parameterValues);
140
+ }
141
+ }, e => {
142
+ console.error(e);
143
+ }, true, false);
192
144
  }
193
- }]);
194
-
195
- return RouteActionHandler;
196
- }();
197
-
198
- var instance = new RouteActionHandler();
145
+ }
146
+ }
147
+ const instance = new RouteActionHandler();
199
148
  Object.freeze(instance);
200
- var _default = instance;
201
- exports.default = _default;
149
+ var _default = exports.default = instance;
@@ -4,43 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _DynamicJS = _interopRequireDefault(require("../DynamicJS"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
-
16
- 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); } }
17
-
18
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
19
-
20
- var ScriptActionHandler = /*#__PURE__*/function () {
21
- function ScriptActionHandler() {
22
- _classCallCheck(this, ScriptActionHandler);
23
-
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ class ScriptActionHandler {
11
+ constructor() {
24
12
  if (!ScriptActionHandler.instance) {
25
13
  ScriptActionHandler.instance = this;
26
14
  }
27
-
28
15
  return ScriptActionHandler.instance;
29
16
  }
30
-
31
- _createClass(ScriptActionHandler, [{
32
- key: "execute",
33
- value: function execute(actionConfig, event, component, currentViewId) {
34
- var componentId = event.getSource().api.id;
35
-
36
- _DynamicJS.default.executeScriptObject(currentViewId + '_' + componentId + '_script', actionConfig.script, componentId, {}, event);
37
- }
38
- }]);
39
-
40
- return ScriptActionHandler;
41
- }();
42
-
43
- var instance = new ScriptActionHandler();
17
+ execute(actionConfig, event, component, currentViewId) {
18
+ let componentId = event.getSource().api.id;
19
+ _DynamicJS.default.executeScriptObject(currentViewId + '_' + componentId + '_script', actionConfig.script, componentId, {}, event);
20
+ }
21
+ }
22
+ const instance = new ScriptActionHandler();
44
23
  Object.freeze(instance);
45
- var _default = instance;
46
- exports.default = _default;
24
+ var _default = exports.default = instance;
@@ -4,79 +4,52 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _RestUtils = require("../RestUtils");
11
-
12
9
  var _DynamicJS = _interopRequireDefault(require("./../DynamicJS"));
13
-
14
10
  var _Utils = _interopRequireDefault(require("./../Utils"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- 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); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
-
24
- var ServiceCallActionHandler = /*#__PURE__*/function () {
25
- function ServiceCallActionHandler() {
26
- _classCallCheck(this, ServiceCallActionHandler);
27
-
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ class ServiceCallActionHandler {
13
+ constructor() {
28
14
  if (!ServiceCallActionHandler.instance) {
29
15
  ServiceCallActionHandler.instance = this;
30
16
  }
31
-
32
17
  return ServiceCallActionHandler.instance;
33
18
  }
34
-
35
- _createClass(ServiceCallActionHandler, [{
36
- key: "execute",
37
- value: function execute(actionConfig, event, component, currentViewId, successCallback, errorCallback, invalidParameterCallback) {
38
- if (actionConfig.service.type === 'rpc' || actionConfig.service.type === 'rest') {
39
- var method = actionConfig.service.type === 'rpc' ? _RestUtils.invokeRpc : _RestUtils.invokeRest;
40
- method(actionConfig.service, component, currentViewId, function (result) {
41
- var handle = !_Utils.default.isNull(component) && !_Utils.default.isNull(component.current) ? component.current : component;
42
-
43
- if (!_Utils.default.isNull(actionConfig.postScript)) {
44
- try {
45
- var valuesMap = {};
46
- valuesMap.response = result.data ? result.data : result;
47
-
48
- _DynamicJS.default.executeScriptObject('postScript_' + currentViewId + '_' + handle.api.id, actionConfig.postScript, handle.api.id, valuesMap, {
49
- data: result.data ? result.data : result
50
- });
51
- } catch (e) {
52
- console.error(e);
53
- }
19
+ execute(actionConfig, event, component, currentViewId, successCallback, errorCallback, invalidParameterCallback) {
20
+ if (actionConfig.service.type === 'rpc' || actionConfig.service.type === 'rest') {
21
+ let method = actionConfig.service.type === 'rpc' ? _RestUtils.invokeRpc : _RestUtils.invokeRest;
22
+ method(actionConfig.service, component, currentViewId, result => {
23
+ let handle = !_Utils.default.isNull(component) && !_Utils.default.isNull(component.current) ? component.current : component;
24
+ if (!_Utils.default.isNull(actionConfig.postScript)) {
25
+ try {
26
+ let valuesMap = {};
27
+ valuesMap.response = result.data ? result.data : result;
28
+ _DynamicJS.default.executeScriptObject('postScript_' + currentViewId + '_' + handle.api.id, actionConfig.postScript, handle.api.id, valuesMap, {
29
+ data: result.data ? result.data : result
30
+ });
31
+ } catch (e) {
32
+ console.error(e);
54
33
  }
55
-
56
- if (!_Utils.default.isNull(successCallback)) {
57
- successCallback(result);
58
- }
59
- }, function (e) {
60
- _Utils.default.publishErrorMessage(e, currentViewId, component);
61
-
62
- if (!_Utils.default.isNull(errorCallback)) {
63
- errorCallback(e);
64
- }
65
- }, function () {
66
- if (invalidParameterCallback) {
67
- invalidParameterCallback();
68
- }
69
- }, actionConfig.returnValueBinding, actionConfig.successMessage, event);
70
- } else {
71
- console.error("Unknown service type : " + actionConfig.service.type);
72
- }
34
+ }
35
+ if (!_Utils.default.isNull(successCallback)) {
36
+ successCallback(result);
37
+ }
38
+ }, e => {
39
+ _Utils.default.publishErrorMessage(e, currentViewId, component);
40
+ if (!_Utils.default.isNull(errorCallback)) {
41
+ errorCallback(e);
42
+ }
43
+ }, () => {
44
+ if (invalidParameterCallback) {
45
+ invalidParameterCallback();
46
+ }
47
+ }, actionConfig.returnValueBinding, actionConfig.successMessage, event);
48
+ } else {
49
+ console.error("Unknown service type : " + actionConfig.service.type);
73
50
  }
74
- }]);
75
-
76
- return ServiceCallActionHandler;
77
- }();
78
-
79
- var instance = new ServiceCallActionHandler();
51
+ }
52
+ }
53
+ const instance = new ServiceCallActionHandler();
80
54
  Object.freeze(instance);
81
- var _default = instance;
82
- exports.default = _default;
55
+ var _default = exports.default = instance;
@@ -4,43 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _Utils = _interopRequireDefault(require("./../Utils"));
11
-
12
9
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
-
18
- 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); } }
19
-
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
21
-
22
- var SignalGraphActionHandler = /*#__PURE__*/function () {
23
- function SignalGraphActionHandler() {
24
- _classCallCheck(this, SignalGraphActionHandler);
25
-
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ class SignalGraphActionHandler {
12
+ constructor() {
26
13
  if (!SignalGraphActionHandler.instance) {
27
14
  SignalGraphActionHandler.instance = this;
28
15
  }
29
-
30
16
  return SignalGraphActionHandler.instance;
31
17
  }
32
-
33
- _createClass(SignalGraphActionHandler, [{
34
- key: "execute",
35
- value: function execute(actionConfig, event, component, currentViewId) {
36
- _ApplicationManager.default.signalGraph(actionConfig.graphId, event);
37
- }
38
- }]);
39
-
40
- return SignalGraphActionHandler;
41
- }();
42
-
43
- var instance = new SignalGraphActionHandler();
18
+ execute(actionConfig, event, component, currentViewId) {
19
+ _ApplicationManager.default.signalGraph(actionConfig.graphId, event);
20
+ }
21
+ }
22
+ const instance = new SignalGraphActionHandler();
44
23
  Object.freeze(instance);
45
- var _default = instance;
46
- exports.default = _default;
24
+ var _default = exports.default = instance;
@@ -4,49 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9
-
10
- 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); } }
11
-
12
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
13
-
14
- var Addresses = /*#__PURE__*/function () {
15
- function Addresses(resolver) {
16
- _classCallCheck(this, Addresses);
17
-
7
+ class Addresses {
8
+ constructor(resolver) {
18
9
  this.resolver = resolver;
19
10
  }
20
-
21
- _createClass(Addresses, [{
22
- key: "copy",
23
- value: function copy(from, to, checked) {
24
- var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'line';
25
-
26
- if (checked) {
27
- var _this$resolver$resolv, _this$resolver$resolv2, _this$resolver$resolv3, _this$resolver$resolv4, _this$resolver$resolv5, _this$resolver$resolv6, _this$resolver$resolv7, _this$resolver$resolv8;
28
-
29
- var street = (_this$resolver$resolv = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.street' : '.line1'))) === null || _this$resolver$resolv === void 0 ? void 0 : _this$resolver$resolv.value;
30
- var suburb = (_this$resolver$resolv2 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.suburb' : '.line2'))) === null || _this$resolver$resolv2 === void 0 ? void 0 : _this$resolver$resolv2.value;
31
- var city = (_this$resolver$resolv3 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.city' : '.line3'))) === null || _this$resolver$resolv3 === void 0 ? void 0 : _this$resolver$resolv3.value;
32
- var municipality = (_this$resolver$resolv4 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.municipality' : '.line4'))) === null || _this$resolver$resolv4 === void 0 ? void 0 : _this$resolver$resolv4.value;
33
- var province = (_this$resolver$resolv5 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.province' : '.line5'))) === null || _this$resolver$resolv5 === void 0 ? void 0 : _this$resolver$resolv5.value;
34
- var country = (_this$resolver$resolv6 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.country' : '.line6'))) === null || _this$resolver$resolv6 === void 0 ? void 0 : _this$resolver$resolv6.value;
35
- var code = (_this$resolver$resolv7 = this.resolver.resolveComponentApi(from + '.code')) === null || _this$resolver$resolv7 === void 0 ? void 0 : _this$resolver$resolv7.value;
36
- var building = (_this$resolver$resolv8 = this.resolver.resolveComponentApi(from + '.building')) === null || _this$resolver$resolv8 === void 0 ? void 0 : _this$resolver$resolv8.value;
37
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.street' : '.line1')).value = street;
38
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.suburb' : '.line2')).value = suburb;
39
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.city' : '.line3')).value = city;
40
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.municipality' : '.line4')).value = municipality;
41
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.province' : '.line5')).value = province;
42
- this.resolver.resolveComponentApi(to + (mode === 'street' ? '.country' : '.line6')).value = country;
43
- this.resolver.resolveComponentApi(to + '.code').value = code;
44
- this.resolver.resolveComponentApi(to + '.building').value = building;
45
- }
11
+ copy(from, to, checked) {
12
+ let mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'line';
13
+ if (checked) {
14
+ let street = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.street' : '.line1'))?.value;
15
+ let suburb = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.suburb' : '.line2'))?.value;
16
+ let city = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.city' : '.line3'))?.value;
17
+ let municipality = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.municipality' : '.line4'))?.value;
18
+ let province = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.province' : '.line5'))?.value;
19
+ let country = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.country' : '.line6'))?.value;
20
+ let code = this.resolver.resolveComponentApi(from + '.code')?.value;
21
+ let building = this.resolver.resolveComponentApi(from + '.building')?.value;
22
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.street' : '.line1')).value = street;
23
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.suburb' : '.line2')).value = suburb;
24
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.city' : '.line3')).value = city;
25
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.municipality' : '.line4')).value = municipality;
26
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.province' : '.line5')).value = province;
27
+ this.resolver.resolveComponentApi(to + (mode === 'street' ? '.country' : '.line6')).value = country;
28
+ this.resolver.resolveComponentApi(to + '.code').value = code;
29
+ this.resolver.resolveComponentApi(to + '.building').value = building;
46
30
  }
47
- }]);
48
-
49
- return Addresses;
50
- }();
51
-
31
+ }
32
+ }
52
33
  exports.default = Addresses;