@agilemotion/oui-react-js 1.6.0 → 1.6.2

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 (229) hide show
  1. package/dist/ApplicationManager.js +698 -421
  2. package/dist/BasicApp.js +5 -5
  3. package/dist/BasicAppHome.js +55 -26
  4. package/dist/DynamicJS.js +147 -65
  5. package/dist/InteractionPortalApp.css +1 -1
  6. package/dist/InteractionPortalApp.js +5 -5
  7. package/dist/InteractionPortalAppHome.js +65 -18
  8. package/dist/InteractionPortalApp_old.js +107 -61
  9. package/dist/RestUtils.js +339 -287
  10. package/dist/TypedValue.js +18 -15
  11. package/dist/Utils.js +375 -276
  12. package/dist/WithRouter.js +6 -6
  13. package/dist/assets/jss/components/authNavbarStyle.js +166 -164
  14. package/dist/assets/jss/components/buttonStyle.js +1 -1
  15. package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
  16. package/dist/assets/jss/components/cardBodyStyle.js +1 -1
  17. package/dist/assets/jss/components/cardFooterStyle.js +1 -1
  18. package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
  19. package/dist/assets/jss/components/cardIconStyle.js +1 -1
  20. package/dist/assets/jss/components/cardStyle.js +1 -1
  21. package/dist/assets/jss/components/cardTextStyle.js +1 -1
  22. package/dist/assets/jss/components/customDropdownStyle.js +168 -169
  23. package/dist/assets/jss/components/customInputStyle.js +9 -3
  24. package/dist/assets/jss/components/dropdownStyle.js +69 -69
  25. package/dist/assets/jss/components/footerStyle.js +19 -13
  26. package/dist/assets/jss/components/headerLinksStyle.js +45 -48
  27. package/dist/assets/jss/components/headerStyle.js +68 -65
  28. package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
  29. package/dist/assets/jss/components/navbarStyle.js +79 -76
  30. package/dist/assets/jss/components/sidebarStyle.js +436 -436
  31. package/dist/assets/jss/components/typographyStyle.js +9 -3
  32. package/dist/assets/jss/rootStyle.js +96 -81
  33. package/dist/assets/jss/views/layoutStyle.js +44 -41
  34. package/dist/assets/jss/views/loginBasicStyle.js +1 -1
  35. package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
  36. package/dist/assets/jss/views/loginStyle.js +82 -77
  37. package/dist/components/AlertBar.js +50 -17
  38. package/dist/components/AlertItem.js +35 -12
  39. package/dist/components/AlertTemplate.js +30 -29
  40. package/dist/components/Button.js +62 -34
  41. package/dist/components/Calendar.js +140 -91
  42. package/dist/components/ConfirmationDialog.js +36 -11
  43. package/dist/components/DataGrid.js +512 -270
  44. package/dist/components/DataGridColumn.js +47 -22
  45. package/dist/components/DataGridFilter.js +186 -105
  46. package/dist/components/DataGridHeading.js +50 -32
  47. package/dist/components/Dialog.js +90 -35
  48. package/dist/components/DocumentTemplateDesigner.js +34 -16
  49. package/dist/components/DocumentTemplateDesignerComponent.css +0 -157
  50. package/dist/components/DocumentTemplateDesignerComponent.js +118 -62
  51. package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
  52. package/dist/components/DocumentViewer.js +34 -18
  53. package/dist/components/DocumentViewerComponent.js +26 -9
  54. package/dist/components/ElementResizeHandler.js +229 -207
  55. package/dist/components/FileThumb.js +32 -10
  56. package/dist/components/Graph.js +153 -85
  57. package/dist/components/GraphNode.js +58 -38
  58. package/dist/components/HtmlPanel.js +67 -39
  59. package/dist/components/Icon.js +206 -166
  60. package/dist/components/LoadingIndicator.js +3 -3
  61. package/dist/components/LottieIcon.js +1 -1
  62. package/dist/components/PopupView.js +39 -19
  63. package/dist/components/Portlet.js +35 -19
  64. package/dist/components/RegularButton.js +28 -32
  65. package/dist/components/SignaturePanel.js +37 -17
  66. package/dist/components/SocketManager.js +178 -119
  67. package/dist/components/StepperTitleBar.js +62 -42
  68. package/dist/components/TabPage.js +30 -25
  69. package/dist/components/TabPanel.js +86 -33
  70. package/dist/components/TableCellContent.js +51 -32
  71. package/dist/components/TemplateDesigner.js +173 -121
  72. package/dist/components/TemplateItemEventHandler.js +335 -221
  73. package/dist/components/TemplateTable.js +183 -118
  74. package/dist/components/TitleBar.js +26 -11
  75. package/dist/components/Toolbar.js +67 -38
  76. package/dist/components/Tooltip.js +43 -35
  77. package/dist/components/Tree.js +85 -44
  78. package/dist/components/UseIsVisible.js +25 -4
  79. package/dist/components/card/Card.js +27 -33
  80. package/dist/components/card/CardAvatar.js +20 -19
  81. package/dist/components/card/CardBody.js +24 -27
  82. package/dist/components/card/CardFooter.js +23 -24
  83. package/dist/components/card/CardHeader.js +24 -27
  84. package/dist/components/card/CardIcon.js +17 -13
  85. package/dist/components/card/CardText.js +17 -13
  86. package/dist/components/customInput/CustomInput.js +22 -36
  87. package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
  88. package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
  89. package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
  90. package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
  91. package/dist/components/dashboard/components/Header.js +29 -12
  92. package/dist/components/dashboard/components/LeftDrawer.js +3 -5
  93. package/dist/components/dashboard/components/UserIdentity.js +2 -2
  94. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
  95. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
  96. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
  97. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
  98. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
  99. package/dist/components/dashboard/components/portal/Timeline.js +1 -1
  100. package/dist/components/dashboard/components/portal/Workspace.js +5 -11
  101. package/dist/components/footer/Footer.js +31 -24
  102. package/dist/components/footer/HomeFooter.js +68 -34
  103. package/dist/components/form/AddressSearch.js +78 -42
  104. package/dist/components/form/AutoComplete.js +136 -55
  105. package/dist/components/form/BaseField.js +108 -56
  106. package/dist/components/form/Checkbox.js +10 -8
  107. package/dist/components/form/DatePicker.js +47 -25
  108. package/dist/components/form/FieldSet.js +217 -84
  109. package/dist/components/form/Form.js +334 -200
  110. package/dist/components/form/GridField.js +185 -82
  111. package/dist/components/form/IconField.js +9 -7
  112. package/dist/components/form/ImageEditor.js +141 -92
  113. package/dist/components/form/LabelField.js +12 -10
  114. package/dist/components/form/LookupField.js +54 -32
  115. package/dist/components/form/MultiFileUploadField.js +101 -67
  116. package/dist/components/form/RadioGroup.js +33 -16
  117. package/dist/components/form/Section.js +84 -34
  118. package/dist/components/form/SelectItem.js +55 -33
  119. package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
  120. package/dist/components/form/Switch.js +10 -8
  121. package/dist/components/form/TextField.js +34 -16
  122. package/dist/components/form/TimePicker.js +19 -15
  123. package/dist/components/form/TransferList.js +153 -75
  124. package/dist/components/form/UploadField.js +183 -128
  125. package/dist/components/grid/GridContainer.js +12 -8
  126. package/dist/components/grid/GridItem.js +12 -8
  127. package/dist/components/layout/CollapsiblePanel.js +44 -18
  128. package/dist/components/layout/Layout.js +81 -40
  129. package/dist/components/layout/VC.css +1 -1
  130. package/dist/components/layout/View.js +136 -62
  131. package/dist/components/layout/ViewContainer.js +13 -11
  132. package/dist/components/layout/ViewPort.js +25 -10
  133. package/dist/components/layout/Window.js +87 -53
  134. package/dist/components/layout/WindowViewPort.js +38 -16
  135. package/dist/components/media/ClosablePanel.js +7 -7
  136. package/dist/components/media/LobbyWaitingList.js +7 -9
  137. package/dist/components/media/MediaSoupHelper.js +379 -187
  138. package/dist/components/media/SideBarContent.js +22 -14
  139. package/dist/components/media/SocketRequest.js +5 -1
  140. package/dist/components/media/SocketResponse.js +5 -1
  141. package/dist/components/media/Timer.js +35 -15
  142. package/dist/components/media/Toolbar.css +5 -0
  143. package/dist/components/media/Toolbar.js +220 -102
  144. package/dist/components/media/ToolbarButton.js +82 -33
  145. package/dist/components/media/Toolbar_bck.js +142 -70
  146. package/dist/components/media/Tracks.js +31 -28
  147. package/dist/components/media/TrainingRoom.js +284 -121
  148. package/dist/components/media/Transports.js +27 -24
  149. package/dist/components/media/VCEventManager.js +95 -31
  150. package/dist/components/media/VCEventType.js +5 -1
  151. package/dist/components/media/VCParticipantList.js +40 -14
  152. package/dist/components/media/VCParticipantListItem.js +92 -41
  153. package/dist/components/media/VCRoom.js +29 -11
  154. package/dist/components/media/VCRoomParticipant.js +488 -242
  155. package/dist/components/media/VCRoomRecorder.js +236 -175
  156. package/dist/components/media/VCRoomWorkspace.js +505 -245
  157. package/dist/components/media/Video.js +89 -25
  158. package/dist/components/media/VideoPlayer.js +56 -22
  159. package/dist/components/media/chat/ChatRoom.js +255 -132
  160. package/dist/components/media/chat/ChatRoomItem.js +35 -14
  161. package/dist/components/media/chat/ChatRoomList.js +43 -13
  162. package/dist/components/menu/CollapsibleMenu.js +39 -20
  163. package/dist/components/menu/MenuBars.js +81 -48
  164. package/dist/components/menu/MenuButton.js +95 -60
  165. package/dist/components/menu/MenuItem.js +28 -9
  166. package/dist/components/menu/MenuLink.js +12 -10
  167. package/dist/components/menu/PopupMenu.js +16 -12
  168. package/dist/components/navbars/AuthNavbar.js +27 -18
  169. package/dist/components/navbars/HomeNavbar.js +243 -194
  170. package/dist/components/navbars/PortalNavbar.js +50 -26
  171. package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
  172. package/dist/components/signatures/AlertItem.js +36 -13
  173. package/dist/components/signatures/Card.js +4 -4
  174. package/dist/components/signatures/DocumentContainer.js +141 -57
  175. package/dist/components/signatures/ImageSignatureInput.js +90 -59
  176. package/dist/components/signatures/MenuButton.js +53 -33
  177. package/dist/components/signatures/Prompt.js +26 -5
  178. package/dist/components/signatures/ResponsiveTable.js +302 -197
  179. package/dist/components/signatures/SearchView.js +77 -36
  180. package/dist/components/signatures/SignatorySearch.js +30 -10
  181. package/dist/components/signatures/SignatorySearchForm.js +35 -18
  182. package/dist/components/signatures/SignatureInput.js +56 -26
  183. package/dist/components/signatures/SignatureInputProps.js +107 -55
  184. package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
  185. package/dist/components/signatures/Toolbar.js +135 -94
  186. package/dist/components/signatures/ViewUtils.js +273 -224
  187. package/dist/components/typography/Danger.js +3 -5
  188. package/dist/components/typography/Info.js +3 -5
  189. package/dist/components/typography/Link.js +3 -5
  190. package/dist/event/ActionHandlers.js +57 -43
  191. package/dist/event/Event.js +16 -13
  192. package/dist/event/EventListener.js +39 -36
  193. package/dist/event/EventType.js +5 -1
  194. package/dist/event/LoadDataActionHandler.js +20 -8
  195. package/dist/event/Observable.js +323 -142
  196. package/dist/event/RouteActionHandler.js +139 -125
  197. package/dist/event/ScriptActionHandler.js +20 -8
  198. package/dist/event/ServiceCallActionHandler.js +51 -39
  199. package/dist/event/SignalGraphActionHandler.js +19 -7
  200. package/dist/js/Addresses.js +38 -24
  201. package/dist/js/Calendar.js +168 -161
  202. package/dist/js/DynamicLib.js +14 -11
  203. package/dist/js/Media.js +213 -120
  204. package/dist/js/Validators.js +6 -5
  205. package/dist/js/Windows.js +48 -47
  206. package/dist/redux/store/ConfigureStore.js +17 -9
  207. package/dist/redux/store/DashboardStore.js +110 -43
  208. package/dist/redux/store/History.js +1 -1
  209. package/dist/redux/store/SecurityStore.js +59 -20
  210. package/dist/security/TokenManager.js +44 -30
  211. package/dist/theme-default.js +1 -1
  212. package/dist/view/Dashboard.js +230 -137
  213. package/dist/view/PortalDashboard.js +5 -5
  214. package/dist/view/Settings.js +4 -2
  215. package/dist/view/Views.js +27 -14
  216. package/dist/view/security/ChangePasswordBasic.js +97 -40
  217. package/dist/view/security/ForgotPassword.js +59 -22
  218. package/dist/view/security/ForgotPasswordBasic.js +62 -21
  219. package/dist/view/security/Login.js +64 -24
  220. package/dist/view/security/LoginBasic.js +65 -26
  221. package/dist/view/security/LoginInteractionPortal.js +62 -25
  222. package/dist/view/security/ResetPassword.js +65 -23
  223. package/dist/view/security/ResetPasswordBasic.js +91 -37
  224. package/dist/view/security/Security.js +12 -12
  225. package/package.json +1 -2
  226. package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -154
  227. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
  228. /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
  229. /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
package/dist/RestUtils.js CHANGED
@@ -19,10 +19,24 @@ var _EventType = _interopRequireDefault(require("./event/EventType"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const location = window.location.protocol + '//' + window.location.hostname;
22
+ 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); }
23
+
24
+ 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; } } }; }
25
+
26
+ 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); }
27
+
28
+ 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; }
29
+
30
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31
+
32
+ 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); } }
33
+
34
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
35
+
36
+ var location = window.location.protocol + '//' + window.location.hostname;
23
37
  exports.location = location;
24
38
 
25
- const status = response => {
39
+ var status = function status(response) {
26
40
  if (response.ok) {
27
41
  return Promise.resolve(response);
28
42
  } else {
@@ -30,397 +44,435 @@ const status = response => {
30
44
  }
31
45
  };
32
46
 
33
- const json = response => {
47
+ var json = function json(response) {
34
48
  return response.text();
35
49
  };
36
50
 
37
- class RestUtils {
38
- isParamValueNull(paramValue) {
39
- if (_Utils.default.isNull(paramValue)) {
40
- return true;
41
- }
42
-
43
- return paramValue.hasOwnProperty('value') ? _Utils.default.isNull(paramValue.value) : false;
51
+ var RestUtils = /*#__PURE__*/function () {
52
+ function RestUtils() {
53
+ _classCallCheck(this, RestUtils);
44
54
  }
45
55
 
46
- invokeRest(service, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event = null) {
47
- let url = service.url.startsWith('http://') || service.url.startsWith('https://') ? service.url : location + "".concat(_ApplicationManager.default.getContextRoot() + service.url);
48
- let requestBody = null;
56
+ _createClass(RestUtils, [{
57
+ key: "isParamValueNull",
58
+ value: function isParamValueNull(paramValue) {
59
+ if (_Utils.default.isNull(paramValue)) {
60
+ return true;
61
+ }
49
62
 
50
- if (!_Utils.default.isNull(service.parameters)) {
51
- let queryString = '';
52
- let pathParameters = '';
53
- let requestBodyParamFound = false;
63
+ return paramValue.hasOwnProperty('value') ? _Utils.default.isNull(paramValue.value) : false;
64
+ }
65
+ }, {
66
+ key: "invokeRest",
67
+ value: function invokeRest(service, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage) {
68
+ var _this = this;
54
69
 
55
- for (const parameter of service.parameters) {
56
- let parameterValue = _ApplicationManager.default.resolveParameterValue(parameter, event ? event.data : null);
70
+ var event = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
71
+ var url = service.url.startsWith('http://') || service.url.startsWith('https://') ? service.url : location + "".concat(_ApplicationManager.default.getContextRoot() + service.url);
72
+ var requestBody = null;
57
73
 
58
- if (!_Utils.default.isNull(parameter.validator) && !_Utils.default.evaluateBooleanExpression(parameter.validator.nullable, parameter.name) && this.isParamValueNull(parameterValue)) {
59
- if (!_Utils.default.isNull(invalidParamCallback)) {
60
- console.error('INVALID PARAMETER : ', parameter);
61
- invalidParamCallback(parameter);
62
- }
74
+ if (!_Utils.default.isNull(service.parameters)) {
75
+ var queryString = '';
76
+ var pathParameters = '';
77
+ var requestBodyParamFound = false;
63
78
 
64
- return;
65
- }
79
+ var _iterator = _createForOfIteratorHelper(service.parameters),
80
+ _step;
66
81
 
67
- let httpParameterType = parameter.httpParameterType;
82
+ try {
83
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
84
+ var parameter = _step.value;
68
85
 
69
- if (_Utils.default.isNull(httpParameterType)) {
70
- httpParameterType = 'QUERY_PARAMETER';
71
- }
86
+ var parameterValue = _ApplicationManager.default.resolveParameterValue(parameter, event ? event.data : null);
72
87
 
73
- if (httpParameterType === 'QUERY_PARAMETER') {
74
- if (!_Utils.default.isNull(parameterValue)) {
75
- if (queryString.length > 0) {
76
- queryString += '&';
77
- }
88
+ if (!_Utils.default.isNull(parameter.validator) && !_Utils.default.evaluateBooleanExpression(parameter.validator.nullable, parameter.name) && this.isParamValueNull(parameterValue)) {
89
+ if (!_Utils.default.isNull(invalidParamCallback)) {
90
+ console.error('INVALID PARAMETER : ', parameter);
91
+ invalidParamCallback(parameter);
92
+ }
78
93
 
79
- if (!_Utils.default.isNull(service.includeParameterTypes) && service.includeParameterTypes === true) {
80
- queryString += parameterValue.type + ':';
94
+ return;
81
95
  }
82
96
 
83
- if (parameterValue.type === 'MapObject') {
84
- parameterValue.value.type = 'MapEntityDto';
97
+ var httpParameterType = parameter.httpParameterType;
98
+
99
+ if (_Utils.default.isNull(httpParameterType)) {
100
+ httpParameterType = 'QUERY_PARAMETER';
85
101
  }
86
102
 
87
- queryString += parameter.name + '=';
88
- queryString += typeof parameterValue.value === 'string' || typeof parameterValue.value === 'number' ? parameterValue.value : JSON.stringify(parameterValue.value);
89
- }
90
- }
103
+ if (httpParameterType === 'QUERY_PARAMETER') {
104
+ if (!_Utils.default.isNull(parameterValue)) {
105
+ if (queryString.length > 0) {
106
+ queryString += '&';
107
+ }
91
108
 
92
- if (httpParameterType === 'PATH_VARIABLE') {
93
- if (!_Utils.default.isNull(parameterValue)) {
94
- pathParameters += '/' + (typeof parameterValue.value === 'object' ? JSON.stringify(parameterValue.value) : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue);
95
- }
96
- }
109
+ if (!_Utils.default.isNull(service.includeParameterTypes) && service.includeParameterTypes === true) {
110
+ queryString += parameterValue.type + ':';
111
+ }
97
112
 
98
- if (httpParameterType === 'REQUEST_BODY') {
99
- if (requestBodyParamFound) {
100
- console.error('Only one request body is permitted');
101
- return;
102
- } else {
103
- if (!this.isParamValueNull(parameterValue)) {
104
- requestBody = parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
113
+ if (parameterValue.type === 'MapObject') {
114
+ parameterValue.value.type = 'MapEntityDto';
115
+ }
116
+
117
+ queryString += parameter.name + '=';
118
+ queryString += typeof parameterValue.value === 'string' || typeof parameterValue.value === 'number' ? parameterValue.value : JSON.stringify(parameterValue.value);
119
+ }
120
+ }
105
121
 
106
- if (parameterValue.type === 'MapObject') {
107
- requestBody.type = 'MapEntityDto';
122
+ if (httpParameterType === 'PATH_VARIABLE') {
123
+ if (!_Utils.default.isNull(parameterValue)) {
124
+ pathParameters += '/' + (_typeof(parameterValue.value) === 'object' ? JSON.stringify(parameterValue.value) : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue);
125
+ }
126
+ }
127
+
128
+ if (httpParameterType === 'REQUEST_BODY') {
129
+ if (requestBodyParamFound) {
130
+ console.error('Only one request body is permitted');
131
+ return;
108
132
  } else {
109
- if (typeof requestBody === 'object') {
110
- requestBody.type = parameterValue.type;
133
+ if (!this.isParamValueNull(parameterValue)) {
134
+ requestBody = parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
135
+
136
+ if (parameterValue.type === 'MapObject') {
137
+ requestBody.type = 'MapEntityDto';
138
+ } else {
139
+ if (_typeof(requestBody) === 'object') {
140
+ requestBody.type = parameterValue.type;
141
+ }
142
+ }
111
143
  }
112
144
  }
113
145
  }
114
146
  }
147
+ } catch (err) {
148
+ _iterator.e(err);
149
+ } finally {
150
+ _iterator.f();
115
151
  }
116
- }
117
152
 
118
- if (pathParameters.length > 0) {
119
- url += pathParameters;
120
- }
153
+ if (pathParameters.length > 0) {
154
+ url += pathParameters;
155
+ }
121
156
 
122
- if (queryString.length > 0) {
123
- url += '?';
124
- url += queryString;
157
+ if (queryString.length > 0) {
158
+ url += '?';
159
+ url += queryString;
160
+ }
125
161
  }
126
- }
127
162
 
128
- let headers = service.headers;
129
- let contentType = null;
163
+ var headers = service.headers;
164
+ var contentType = null;
130
165
 
131
- if (!_Utils.default.isNull(headers)) {
132
- contentType = headers['Content-Type'];
133
- }
166
+ if (!_Utils.default.isNull(headers)) {
167
+ contentType = headers['Content-Type'];
168
+ }
134
169
 
135
- if (requestBody !== null && service.method === 'GET') {
136
- throw new Error('A request body parameter cannot be specified for a GET request');
137
- }
170
+ if (requestBody !== null && service.method === 'GET') {
171
+ throw new Error('A request body parameter cannot be specified for a GET request');
172
+ }
138
173
 
139
- if (requestBody !== null || service.method === 'POST') {
140
- console.log("POSTING REST REQUEST BODY : ", requestBody);
141
- postData(url, response => {
142
- if (!_Utils.default.isNull(successCallback)) {
143
- this.processSuccessfulResponseData(component, response, successCallback, viewId, successMessage);
144
- }
174
+ if (requestBody !== null || service.method === 'POST') {
175
+ console.log("POSTING REST REQUEST BODY : ", requestBody);
176
+ postData(url, function (response) {
177
+ if (!_Utils.default.isNull(successCallback)) {
178
+ _this.processSuccessfulResponseData(component, response, successCallback, viewId, successMessage);
179
+ }
145
180
 
146
- let path = _Utils.default.getPropertyChainPath(returnValueBinding);
181
+ var path = _Utils.default.getPropertyChainPath(returnValueBinding);
147
182
 
148
- if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
149
- path.valueObject[path.property] = response;
150
- }
183
+ if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
184
+ path.valueObject[path.property] = response;
185
+ }
151
186
 
152
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, response);
153
- }, e => {
154
- if (!_Utils.default.isNull(errorCallback)) {
155
- errorCallback(e);
156
- }
187
+ _this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, response);
188
+ }, function (e) {
189
+ if (!_Utils.default.isNull(errorCallback)) {
190
+ errorCallback(e);
191
+ }
157
192
 
158
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
159
- }, !service.url.startsWith('http://'), requestBody);
160
- } else if (contentType === 'application/pdf' || contentType === 'application/vnd.ms-excel') {
161
- download(url, data => {}, e => {
162
- if (!_Utils.default.isNull(errorCallback)) {
163
- errorCallback(e);
164
- }
165
- });
166
- } else {
167
- sendRequest(url, data => {
168
- let path = _Utils.default.getPropertyChainPath(returnValueBinding);
193
+ _this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
194
+ }, !service.url.startsWith('http://'), requestBody);
195
+ } else if (contentType === 'application/pdf' || contentType === 'application/vnd.ms-excel') {
196
+ download(url, function (data) {}, function (e) {
197
+ if (!_Utils.default.isNull(errorCallback)) {
198
+ errorCallback(e);
199
+ }
200
+ });
201
+ } else {
202
+ sendRequest(url, function (data) {
203
+ var path = _Utils.default.getPropertyChainPath(returnValueBinding);
169
204
 
170
- if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
171
- path.valueObject[path.property] = data;
172
- }
205
+ if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
206
+ path.valueObject[path.property] = data;
207
+ }
173
208
 
174
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, data);
209
+ _this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, data);
175
210
 
176
- if (!_Utils.default.isNull(successCallback)) {
177
- successCallback(data);
178
- }
179
- }, e => {
180
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
211
+ if (!_Utils.default.isNull(successCallback)) {
212
+ successCallback(data);
213
+ }
214
+ }, function (e) {
215
+ _this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
181
216
 
182
- if (!_Utils.default.isNull(errorCallback)) {
183
- errorCallback(e);
184
- }
185
- }, !service.url.startsWith('http://'));
217
+ if (!_Utils.default.isNull(errorCallback)) {
218
+ errorCallback(e);
219
+ }
220
+ }, !service.url.startsWith('http://'));
221
+ }
186
222
  }
187
- }
188
-
189
- invokeRpc(rpcDetails, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event = null) {
190
- let request = {};
191
- request.id = viewId;
192
- let split = rpcDetails.serviceId.split('.');
193
- request.service = split[1];
194
- request.method = rpcDetails.procedureName;
195
- let module = split[0].toLowerCase();
223
+ }, {
224
+ key: "invokeRpc",
225
+ value: function invokeRpc(rpcDetails, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage) {
226
+ var _this2 = this;
227
+
228
+ var event = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
229
+ var request = {};
230
+ request.id = viewId;
231
+ var split = rpcDetails.serviceId.split('.');
232
+ request.service = split[1];
233
+ request.method = rpcDetails.procedureName;
234
+ var module = split[0].toLowerCase();
235
+
236
+ if (!_Utils.default.isNull(rpcDetails.parameters) && rpcDetails.parameters.length > 0) {
237
+ request.parameters = [];
238
+
239
+ for (var i = 0; i < rpcDetails.parameters.length; i++) {
240
+ var parameterConfig = rpcDetails.parameters[i];
241
+ var parameter = {};
242
+ parameter.name = parameterConfig.name;
243
+ parameter.index = parameterConfig.index;
244
+
245
+ var val = _ApplicationManager.default.resolveParameterValue(parameterConfig, event ? event.data : null);
246
+
247
+ if (!_Utils.default.isNull(val)) {
248
+ parameter.value = val.value;
249
+ parameter.type = val.type;
250
+ }
196
251
 
197
- if (!_Utils.default.isNull(rpcDetails.parameters) && rpcDetails.parameters.length > 0) {
198
- request.parameters = [];
252
+ if (typeof parameter.value === 'undefined') {
253
+ parameter.value = null;
254
+ }
199
255
 
200
- for (let i = 0; i < rpcDetails.parameters.length; i++) {
201
- let parameterConfig = rpcDetails.parameters[i];
202
- let parameter = {};
203
- parameter.name = parameterConfig.name;
204
- parameter.index = parameterConfig.index;
256
+ if (_Utils.default.isNull(parameter.type)) {
257
+ parameter.type = 'String';
258
+ }
205
259
 
206
- let val = _ApplicationManager.default.resolveParameterValue(parameterConfig, event ? event.data : null);
260
+ if (!_Utils.default.isNull(parameterConfig.validator) && _Utils.default.evaluateBooleanExpression(parameterConfig.validator.nullable, parameterConfig.name) === false && this.isParamValueNull(parameter)) {
261
+ if (!_Utils.default.isNull(invalidParamCallback)) {
262
+ console.error('INVALID PARAMETER : ', parameter);
263
+ invalidParamCallback(parameter);
264
+ }
207
265
 
208
- if (!_Utils.default.isNull(val)) {
209
- parameter.value = val.value;
210
- parameter.type = val.type;
211
- }
266
+ return;
267
+ }
212
268
 
213
- if (typeof parameter.value === 'undefined') {
214
- parameter.value = null;
269
+ request.parameters.push(parameter);
215
270
  }
271
+ }
216
272
 
217
- if (_Utils.default.isNull(parameter.type)) {
218
- parameter.type = 'String';
219
- }
273
+ this.doFetch(location + _ApplicationManager.default.getContextRoot() + '/' + module + '/api/v1/rpc/invoke', function (response) {
274
+ if (!_Utils.default.isNull(viewId) && !_Utils.default.isNull(component)) {
275
+ var path = _Utils.default.getPropertyChainPath(returnValueBinding);
220
276
 
221
- if (!_Utils.default.isNull(parameterConfig.validator) && _Utils.default.evaluateBooleanExpression(parameterConfig.validator.nullable, parameterConfig.name) === false && this.isParamValueNull(parameter)) {
222
- if (!_Utils.default.isNull(invalidParamCallback)) {
223
- console.error('INVALID PARAMETER : ', parameter);
224
- invalidParamCallback(parameter);
277
+ if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
278
+ path.valueObject[path.property] = response;
225
279
  }
226
280
 
227
- return;
281
+ _this2.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, response.data);
282
+
283
+ if (successCallback !== null) {
284
+ successCallback(response);
285
+ }
286
+ }
287
+ }, function (e) {
288
+ if (errorCallback !== null) {
289
+ errorCallback(e);
228
290
  }
229
291
 
230
- request.parameters.push(parameter);
231
- }
292
+ if (!_Utils.default.isNull(viewId) && !_Utils.default.isNull(component)) {
293
+ _this2.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
294
+ }
295
+ }, true, 'POST', false, request, viewId, successMessage, true);
232
296
  }
233
-
234
- this.doFetch(location + _ApplicationManager.default.getContextRoot() + '/' + module + '/api/v1/rpc/invoke', response => {
235
- if (!_Utils.default.isNull(viewId) && !_Utils.default.isNull(component)) {
236
- let path = _Utils.default.getPropertyChainPath(returnValueBinding);
237
-
238
- if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
239
- path.valueObject[path.property] = response;
297
+ }, {
298
+ key: "doPostData",
299
+ value: function doPostData(url, successCallback, errorCallback, secure, data, viewId, successMessage) {
300
+ this.fetchWithCustomConfig(url, successCallback, errorCallback, secure, null, 'POST', false, data, 'rest');
301
+ }
302
+ }, {
303
+ key: "doFetch",
304
+ value: function doFetch(url, successCallback, errorCallback, secure, method, download, body, viewId, successMessage, track) {
305
+ this.fetchWithCustomConfig(url, successCallback, errorCallback, secure, null, method, download, body, null, viewId, successMessage, track);
306
+ }
307
+ }, {
308
+ key: "fetchWithCustomConfig",
309
+ value: function fetchWithCustomConfig(url, successCallback, errorCallback, secure, config, method, download, body, serviceType, viewId, successMessage, track) {
310
+ var accessToken = sessionStorage.getItem('accessToken');
311
+ var idToken = sessionStorage.getItem('idToken');
312
+ var data = body ? JSON.stringify(body) : null;
313
+ var fetchConfig = config;
314
+
315
+ if (_Utils.default.isNull(fetchConfig)) {
316
+ if (_Utils.default.isNull(secure) || secure === true) {
317
+ fetchConfig = {
318
+ method: _Utils.default.isNull(method) ? 'GET' : method,
319
+ headers: {
320
+ 'Content-Type': 'application/x-www-form-urlencoded',
321
+ 'Authorization': 'Bearer ' + accessToken,
322
+ 'idToken': idToken
323
+ },
324
+ body: data
325
+ };
326
+ } else {
327
+ fetchConfig = {
328
+ method: _Utils.default.isNull(method) ? 'GET' : method,
329
+ headers: {
330
+ 'Content-Type': 'application/json',
331
+ 'Accept': 'application/json'
332
+ },
333
+ body: data
334
+ };
240
335
  }
241
336
 
242
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, response.data);
243
-
244
- if (successCallback !== null) {
245
- successCallback(response);
337
+ if ('rest' === serviceType) {
338
+ fetchConfig.headers['Content-Type'] = 'application/json; charset=utf-8';
246
339
  }
247
340
  }
248
- }, e => {
249
- if (errorCallback !== null) {
250
- errorCallback(e);
251
- }
252
-
253
- if (!_Utils.default.isNull(viewId) && !_Utils.default.isNull(component)) {
254
- this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_FAILURE);
255
- }
256
- }, true, 'POST', false, request, viewId, successMessage, true);
257
- }
258
-
259
- doPostData(url, successCallback, errorCallback, secure, data, viewId, successMessage) {
260
- this.fetchWithCustomConfig(url, successCallback, errorCallback, secure, null, 'POST', false, data, 'rest');
261
- }
262
-
263
- doFetch(url, successCallback, errorCallback, secure, method, download, body, viewId, successMessage, track) {
264
- this.fetchWithCustomConfig(url, successCallback, errorCallback, secure, null, method, download, body, null, viewId, successMessage, track);
265
- }
266
-
267
- fetchWithCustomConfig(url, successCallback, errorCallback, secure, config, method, download, body, serviceType, viewId, successMessage, track) {
268
- const accessToken = sessionStorage.getItem('accessToken');
269
- const idToken = sessionStorage.getItem('idToken');
270
- let data = body ? JSON.stringify(body) : null;
271
- let fetchConfig = config;
272
-
273
- if (_Utils.default.isNull(fetchConfig)) {
274
- if (_Utils.default.isNull(secure) || secure === true) {
275
- fetchConfig = {
276
- method: _Utils.default.isNull(method) ? 'GET' : method,
277
- headers: {
278
- 'Content-Type': 'application/x-www-form-urlencoded',
279
- 'Authorization': 'Bearer ' + accessToken,
280
- 'idToken': idToken
281
- },
282
- body: data
283
- };
284
- } else {
285
- fetchConfig = {
286
- method: _Utils.default.isNull(method) ? 'GET' : method,
287
- headers: {
288
- 'Content-Type': 'application/json',
289
- 'Accept': 'application/json'
290
- },
291
- body: data
292
- };
293
- }
294
-
295
- if ('rest' === serviceType) {
296
- fetchConfig.headers['Content-Type'] = 'application/json; charset=utf-8';
297
- }
298
- }
299
341
 
300
- if (download) {
301
- if (url.indexOf('?') < 0) {
302
- url += '?';
303
- } else {
304
- url += '&';
305
- }
342
+ if (download) {
343
+ if (url.indexOf('?') < 0) {
344
+ url += '?';
345
+ } else {
346
+ url += '&';
347
+ }
306
348
 
307
- url += 'access_token=' + accessToken;
308
- url += '&idToken=' + idToken;
309
- url += '&themePrimaryColor=' + encodeURIComponent(_ApplicationManager.default.getApplicationPrimaryColor());
310
- url += '&themeSecondaryColor=' + encodeURIComponent(_ApplicationManager.default.getApplicationSecondaryColor());
311
- window.open(encodeURI(url), '_blank');
312
- } else {
313
- if (_Utils.default.isNull(track) || track === true) {
314
- (0, _reactPromiseTracker.trackPromise)(this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback));
349
+ url += 'access_token=' + accessToken;
350
+ url += '&idToken=' + idToken;
351
+ url += '&themePrimaryColor=' + encodeURIComponent(_ApplicationManager.default.getApplicationPrimaryColor());
352
+ url += '&themeSecondaryColor=' + encodeURIComponent(_ApplicationManager.default.getApplicationSecondaryColor());
353
+ window.open(encodeURI(url), '_blank');
315
354
  } else {
316
- this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback);
355
+ if (_Utils.default.isNull(track) || track === true) {
356
+ (0, _reactPromiseTracker.trackPromise)(this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback));
357
+ } else {
358
+ this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback);
359
+ }
317
360
  }
318
361
  }
319
- }
320
-
321
- executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback) {
322
- return fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data => {
323
- this.processSuccessfulResponseData(null, data, successCallback, viewId, successMessage);
324
- }).catch(e => {
325
- console.error(e);
362
+ }, {
363
+ key: "executeFetch",
364
+ value: function executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback) {
365
+ var _this3 = this;
326
366
 
327
- if (e.status === 401 && !url.endsWith('/logout')) {
328
- errorCallback(e);
367
+ return fetch(encodeURI(url), fetchConfig).then(status).then(json).then(function (data) {
368
+ _this3.processSuccessfulResponseData(null, data, successCallback, viewId, successMessage);
369
+ }).catch(function (e) {
370
+ console.error(e);
329
371
 
330
- _ApplicationManager.default.clear();
372
+ if (e.status === 401 && !url.endsWith('/logout')) {
373
+ errorCallback(e);
331
374
 
332
- _ApplicationManager.default.navigate('/login');
333
- }
375
+ _ApplicationManager.default.clear();
334
376
 
335
- if (errorCallback !== null) {
336
- errorCallback(e);
337
- }
338
- });
339
- }
377
+ _ApplicationManager.default.navigate('/login');
378
+ }
340
379
 
341
- processSuccessfulResponseData(component, data, successCallback, viewId, successMessage) {
342
- let response;
343
-
344
- if (!_Utils.default.isNull(data) && data.toString().trim().length === 0) {
345
- response = null;
346
- } else if (typeof data === 'object' || _Utils.default.isNull(data) || data.toString().trim().length === 0) {
347
- response = data;
348
- } else {
349
- try {
350
- response = JSON.parse(data);
351
- } catch (ignored) {
380
+ if (errorCallback !== null) {
381
+ errorCallback(e);
382
+ }
383
+ });
384
+ }
385
+ }, {
386
+ key: "processSuccessfulResponseData",
387
+ value: function processSuccessfulResponseData(component, data, successCallback, viewId, successMessage) {
388
+ var response;
389
+
390
+ if (!_Utils.default.isNull(data) && data.toString().trim().length === 0) {
391
+ response = null;
392
+ } else if (_typeof(data) === 'object' || _Utils.default.isNull(data) || data.toString().trim().length === 0) {
352
393
  response = data;
394
+ } else {
395
+ try {
396
+ response = JSON.parse(data);
397
+ } catch (ignored) {
398
+ response = data;
399
+ }
353
400
  }
354
- }
355
401
 
356
- if (successCallback !== null) {
357
- let responseData = response ? response.data : null;
402
+ if (successCallback !== null) {
403
+ var responseData = response ? response.data : null;
358
404
 
359
- if (response && responseData && response.dataType === 'message') {
360
- let event = new _Event.default(_ApplicationManager.default, viewId, responseData);
405
+ if (response && responseData && response.dataType === 'message') {
406
+ var event = new _Event.default(_ApplicationManager.default, viewId, responseData);
361
407
 
362
- _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
408
+ _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
363
409
 
364
- if (component !== null) {
365
- event = new _Event.default(component, viewId, responseData);
410
+ if (component !== null) {
411
+ event = new _Event.default(component, viewId, responseData);
366
412
 
367
- _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
368
- }
369
- } else if (!_Utils.default.isNull(successMessage)) {
370
- let message = {
371
- messageType: 'SUCCESS',
372
- message: _ApplicationManager.default.populateTemplate(successMessage, response ? response.data : null)
373
- };
374
- let event = new _Event.default(_ApplicationManager.default, viewId, message);
413
+ _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
414
+ }
415
+ } else if (!_Utils.default.isNull(successMessage)) {
416
+ var message = {
417
+ messageType: 'SUCCESS',
418
+ message: _ApplicationManager.default.populateTemplate(successMessage, response ? response.data : null)
419
+ };
375
420
 
376
- _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
421
+ var _event = new _Event.default(_ApplicationManager.default, viewId, message);
377
422
 
378
- if (component !== null) {
379
- event = new _Event.default(component, viewId, message);
423
+ _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, _event);
380
424
 
381
- _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
425
+ if (component !== null) {
426
+ _event = new _Event.default(component, viewId, message);
427
+
428
+ _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, _event);
429
+ }
382
430
  }
383
- }
384
431
 
385
- successCallback(response);
432
+ successCallback(response);
433
+ }
386
434
  }
387
- }
435
+ }, {
436
+ key: "fireEvent",
437
+ value: function fireEvent(viewId, component, eventType, response) {
438
+ var event = new _Event.default(component, viewId, response);
388
439
 
389
- fireEvent(viewId, component, eventType, response) {
390
- let event = new _Event.default(component, viewId, response);
391
-
392
- _Observable.default.fireEvent(eventType, event);
393
- }
440
+ _Observable.default.fireEvent(eventType, event);
441
+ }
442
+ }]);
394
443
 
395
- }
444
+ return RestUtils;
445
+ }();
396
446
 
397
- const instance = new RestUtils();
447
+ var instance = new RestUtils();
398
448
 
399
- const postData = (url, successCallback, errorCallback, secure, data) => {
449
+ var postData = function postData(url, successCallback, errorCallback, secure, data) {
400
450
  instance.doPostData(url, successCallback, errorCallback, secure, data);
401
451
  };
402
452
 
403
453
  exports.postData = postData;
404
454
 
405
- const sendRequest = (url, successCallback, errorCallback, secure, track) => {
455
+ var sendRequest = function sendRequest(url, successCallback, errorCallback, secure, track) {
406
456
  instance.doFetch(url, successCallback, errorCallback, secure, null, null, null, null, null, track);
407
457
  };
408
458
 
409
459
  exports.sendRequest = sendRequest;
410
460
 
411
- const download = (url, successCallback, errorCallback, secure) => {
461
+ var download = function download(url, successCallback, errorCallback, secure) {
412
462
  instance.doFetch(url, successCallback, errorCallback, secure, 'GET', true);
413
463
  };
414
464
 
415
465
  exports.download = download;
416
466
 
417
- const invokeRpc = (rpcDetails, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event = null) => {
467
+ var invokeRpc = function invokeRpc(rpcDetails, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage) {
468
+ var event = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
418
469
  instance.invokeRpc(rpcDetails, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event);
419
470
  };
420
471
 
421
472
  exports.invokeRpc = invokeRpc;
422
473
 
423
- const invokeRest = (serviceConfig, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event = null) => {
474
+ var invokeRest = function invokeRest(serviceConfig, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage) {
475
+ var event = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
424
476
  instance.invokeRest(serviceConfig, component, viewId, successCallback, errorCallback, invalidParamCallback, returnValueBinding, successMessage, event);
425
477
  };
426
478