@agilemotion/oui-react-js 1.3.8 → 1.4.0

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 (230) hide show
  1. package/README.TXT +1 -0
  2. package/dist/{ApplicationContext.js → ApplicationManager.js} +334 -335
  3. package/dist/BasicApp.js +67 -64
  4. package/dist/BasicAppHome.js +90 -110
  5. package/dist/BusinessPortalApp.js +1 -1
  6. package/dist/BusinessPortalAppHome.js +15 -50
  7. package/dist/DynamicJS.js +24 -52
  8. package/dist/RestUtils.js +90 -116
  9. package/dist/Utils.js +49 -37
  10. package/dist/WithRouter.js +34 -0
  11. package/dist/assets/jss/components/authNavbarStyle.js +34 -35
  12. package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
  13. package/dist/assets/jss/components/customDropdownStyle.js +26 -26
  14. package/dist/assets/jss/components/customInputStyle.js +2 -8
  15. package/dist/assets/jss/components/dropdownStyle.js +10 -15
  16. package/dist/assets/jss/components/footerStyle.js +12 -18
  17. package/dist/assets/jss/components/headerLinksStyle.js +7 -13
  18. package/dist/assets/jss/components/headerStyle.js +24 -25
  19. package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
  20. package/dist/assets/jss/components/navbarStyle.js +24 -25
  21. package/dist/assets/jss/components/sidebarStyle.js +41 -43
  22. package/dist/assets/jss/components/typographyStyle.js +2 -8
  23. package/dist/assets/jss/rootStyle.js +32 -47
  24. package/dist/assets/jss/views/layoutStyle.js +6 -11
  25. package/dist/assets/jss/views/loginStyle.js +4 -10
  26. package/dist/assets/lotties/call-loading.json +1 -0
  27. package/dist/assets/lotties/calling-2.json +1 -0
  28. package/dist/assets/lotties/calling.json +1 -0
  29. package/dist/assets/lotties/calling2.json +1 -0
  30. package/dist/assets/lotties/chat.json +1 -0
  31. package/dist/assets/lotties/join.json +1 -0
  32. package/dist/assets/lotties/loading.json +1 -0
  33. package/dist/assets/lotties/msg2.json +1 -0
  34. package/dist/assets/lotties/recording.json +1 -0
  35. package/dist/assets/lotties/waiting.json +1 -0
  36. package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
  37. package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
  38. package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
  39. package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
  40. package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
  41. package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
  42. package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
  43. package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
  44. package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
  45. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
  46. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
  47. package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
  48. package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
  49. package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
  50. package/dist/components/AlertBar.js +39 -80
  51. package/dist/components/AlertItem.js +4 -26
  52. package/dist/components/Button.js +49 -52
  53. package/dist/components/Calendar.js +442 -0
  54. package/dist/components/Calender.css +244 -0
  55. package/dist/components/ConfirmationDialog.js +5 -29
  56. package/dist/components/DataGrid.js +207 -345
  57. package/dist/components/DataGridColumn.js +6 -29
  58. package/dist/components/DataGridFilter.js +48 -116
  59. package/dist/components/DataGridHeading.js +11 -19
  60. package/dist/components/Dialog.js +27 -121
  61. package/dist/components/DocumentViewer.js +12 -38
  62. package/dist/components/DocumentViewerComponent.js +2 -20
  63. package/dist/components/FileThumb.js +126 -0
  64. package/dist/components/Graph.js +33 -75
  65. package/dist/components/GraphNode.js +5 -22
  66. package/dist/components/HtmlPanel.js +68 -82
  67. package/dist/components/Icon.js +107 -1
  68. package/dist/components/LoadingIndicator.js +4 -4
  69. package/dist/components/LottieIcon.js +134 -0
  70. package/dist/components/PopupView.js +3 -21
  71. package/dist/components/Portlet.js +100 -0
  72. package/dist/components/RegularButton.js +15 -19
  73. package/dist/components/SignaturePanel.js +9 -40
  74. package/dist/components/SocketManager.js +170 -0
  75. package/dist/components/StepperTitleBar.js +33 -59
  76. package/dist/components/TabPage.js +6 -9
  77. package/dist/components/TabPanel.js +49 -98
  78. package/dist/components/TableCellContent.js +31 -39
  79. package/dist/components/TemplateDesigner.js +114 -158
  80. package/dist/components/TemplateItemEventHandler.js +33 -100
  81. package/dist/components/TemplateTable.js +6 -42
  82. package/dist/components/TitleBar.js +38 -54
  83. package/dist/components/Toolbar.js +67 -182
  84. package/dist/components/Tree.js +29 -66
  85. package/dist/components/card/Card.js +16 -20
  86. package/dist/components/card/CardAvatar.js +9 -13
  87. package/dist/components/card/CardBody.js +13 -17
  88. package/dist/components/card/CardFooter.js +12 -16
  89. package/dist/components/card/CardHeader.js +13 -17
  90. package/dist/components/card/CardIcon.js +6 -10
  91. package/dist/components/card/CardText.js +6 -10
  92. package/dist/components/customInput/CustomInput.js +12 -10
  93. package/dist/components/dashboard/BasicBusinessAppDashboard.js +85 -159
  94. package/dist/components/dashboard/BusinessPortalAppDashboard.js +30 -75
  95. package/dist/components/dashboard/components/Header.js +9 -26
  96. package/dist/components/dashboard/components/LeftDrawer.js +3 -1
  97. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
  98. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
  99. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +189 -79
  100. package/dist/components/footer/Footer.js +6 -18
  101. package/dist/components/form/AddressSearch.js +32 -66
  102. package/dist/components/form/AutoComplete.js +161 -0
  103. package/dist/components/form/BaseField.js +89 -107
  104. package/dist/components/form/DatePicker.js +8 -23
  105. package/dist/components/form/FieldSet.js +161 -191
  106. package/dist/components/form/Form.css +1 -1
  107. package/dist/components/form/Form.js +153 -479
  108. package/dist/components/form/GridField.js +46 -146
  109. package/dist/components/form/IconField.js +35 -0
  110. package/dist/components/form/ImageEditor.js +22 -60
  111. package/dist/components/form/LookupField.js +8 -29
  112. package/dist/components/form/MultiFileUploadField.js +187 -0
  113. package/dist/components/form/RadioGroup.js +10 -26
  114. package/dist/components/form/Section.js +40 -91
  115. package/dist/components/form/SelectItem.js +14 -33
  116. package/dist/components/form/SignatureTemplateDesignerField.js +0 -1
  117. package/dist/components/form/Switch.js +53 -0
  118. package/dist/components/form/TextField.js +10 -17
  119. package/dist/components/form/TimePicker.js +8 -1
  120. package/dist/components/form/TransferList.css +2 -2
  121. package/dist/components/form/TransferList.js +67 -125
  122. package/dist/components/form/UploadField.js +132 -177
  123. package/dist/components/form/fieldset.css +8 -0
  124. package/dist/components/grid/GridContainer.js +5 -9
  125. package/dist/components/grid/GridItem.js +5 -9
  126. package/dist/components/layout/CollapsiblePanel.js +11 -33
  127. package/dist/components/layout/Layout.js +228 -290
  128. package/dist/components/layout/VC.css +17 -0
  129. package/dist/components/layout/View.css +18 -1
  130. package/dist/components/layout/View.js +80 -200
  131. package/dist/components/layout/ViewContainer.css +3 -0
  132. package/dist/components/layout/ViewContainer.js +59 -0
  133. package/dist/components/layout/ViewPort.js +50 -80
  134. package/dist/components/layout/Window.css +18 -0
  135. package/dist/components/layout/Window.js +287 -0
  136. package/dist/components/layout/WindowViewPort.js +71 -0
  137. package/dist/components/loader.css +1 -1
  138. package/dist/components/media/ClosablePanel.css +37 -0
  139. package/dist/components/media/ClosablePanel.js +53 -0
  140. package/dist/components/media/LobbyWaitingList.js +91 -0
  141. package/dist/components/media/MediaSoupHelper.js +223 -0
  142. package/dist/components/media/Recorder.js +235 -0
  143. package/dist/components/media/SideBarContent.css +54 -0
  144. package/dist/components/media/SideBarContent.js +46 -0
  145. package/dist/components/media/SocketRequest.js +20 -0
  146. package/dist/components/media/SocketResponse.js +16 -0
  147. package/dist/components/media/Timer.css +30 -0
  148. package/dist/components/media/Timer.js +88 -0
  149. package/dist/components/media/Toolbar.css +35 -0
  150. package/dist/components/media/Toolbar.js +494 -0
  151. package/dist/components/media/Tracks.js +39 -0
  152. package/dist/components/media/TrainingRoom.js +608 -0
  153. package/dist/components/media/Transports.js +35 -0
  154. package/dist/components/media/VCEventManager.js +74 -0
  155. package/dist/components/media/VCEventType.js +164 -0
  156. package/dist/components/media/VCParticipantList.css +72 -0
  157. package/dist/components/media/VCParticipantList.js +56 -0
  158. package/dist/components/media/VCParticipantListItem.css +73 -0
  159. package/dist/components/media/VCParticipantListItem.js +319 -0
  160. package/dist/components/media/VCRoom.css +42 -0
  161. package/dist/components/media/VCRoom.js +90 -0
  162. package/dist/components/media/VCRoomParticipant.css +25 -0
  163. package/dist/components/media/VCRoomParticipant.js +808 -0
  164. package/dist/components/media/VCRoomRecorder.js +223 -0
  165. package/dist/components/media/VCRoomWorkspace.css +86 -0
  166. package/dist/components/media/VCRoomWorkspace.js +666 -0
  167. package/dist/components/media/Video.css +4 -0
  168. package/dist/components/media/Video.js +131 -0
  169. package/dist/components/media/VideoPlayer.css +10 -0
  170. package/dist/components/media/VideoPlayer.js +86 -0
  171. package/dist/components/media/chat/ChatRoom.js +926 -0
  172. package/dist/components/media/chat/ChatRoomItem.js +83 -0
  173. package/dist/components/media/chat/ChatRoomList.js +78 -0
  174. package/dist/components/media/chat/ChatRooms.scss +567 -0
  175. package/dist/components/menu/CollapsibleMenu.js +2 -19
  176. package/dist/components/menu/MenuBars.js +6 -33
  177. package/dist/components/menu/MenuButton.js +27 -39
  178. package/dist/components/menu/MenuItem.js +3 -20
  179. package/dist/components/menu/MenuLink.js +22 -13
  180. package/dist/components/navbars/AuthNavbar.js +5 -18
  181. package/dist/components/navbars/HomeNavbar.js +5 -7
  182. package/dist/components/navbars/PortalNavbar.js +7 -25
  183. package/dist/components/signatures/AgilitySignaturePanel.js +38 -104
  184. package/dist/components/signatures/AlertItem.js +3 -24
  185. package/dist/components/signatures/DocumentContainer.js +47 -134
  186. package/dist/components/signatures/ImageSignatureInput.js +11 -38
  187. package/dist/components/signatures/MenuButton.js +1 -16
  188. package/dist/components/signatures/Prompt.js +3 -24
  189. package/dist/components/signatures/ResponsiveTable.js +42 -83
  190. package/dist/components/signatures/SearchView.js +13 -50
  191. package/dist/components/signatures/SignatorySearch.js +83 -99
  192. package/dist/components/signatures/SignatorySearchForm.js +11 -17
  193. package/dist/components/signatures/SignatureInput.js +18 -47
  194. package/dist/components/signatures/SignatureInputProps.js +18 -60
  195. package/dist/components/signatures/SignatureTemplateDesigner.js +151 -239
  196. package/dist/components/signatures/Toolbar.js +7 -34
  197. package/dist/components/signatures/ViewUtils.js +2 -6
  198. package/dist/components/typography/Danger.js +3 -1
  199. package/dist/components/typography/Info.js +3 -1
  200. package/dist/components/typography/Link.js +6 -2
  201. package/dist/event/ActionHandlers.js +6 -6
  202. package/dist/event/EventType.js +7 -1
  203. package/dist/event/LoadDataActionHandler.js +1 -1
  204. package/dist/event/Observable.js +80 -174
  205. package/dist/event/RouteActionHandler.js +74 -31
  206. package/dist/event/ServiceCallActionHandler.js +36 -24
  207. package/dist/event/SignalGraphActionHandler.js +2 -2
  208. package/dist/js/Addresses.js +10 -8
  209. package/dist/js/Calendar.js +220 -0
  210. package/dist/js/Media.js +157 -0
  211. package/dist/redux/store/ConfigureStore.js +3 -9
  212. package/dist/redux/store/DashboardStore.js +42 -94
  213. package/dist/redux/store/SecurityStore.js +15 -50
  214. package/dist/view/Dashboard.js +256 -171
  215. package/dist/view/Views.js +30 -0
  216. package/dist/view/security/ChangePasswordBasic.js +29 -80
  217. package/dist/view/security/ForgotPassword.js +13 -46
  218. package/dist/view/security/ForgotPasswordBasic.js +12 -45
  219. package/dist/view/security/Login.js +15 -51
  220. package/dist/view/security/LoginBasic.js +13 -46
  221. package/dist/view/security/LoginBusinessPortal.js +12 -45
  222. package/dist/view/security/ResetPassword.js +13 -51
  223. package/dist/view/security/ResetPasswordBasic.js +27 -75
  224. package/dist/view/security/Security.js +1 -0
  225. package/package.json +31 -25
  226. package/README.md +0 -1623
  227. package/dist/components/dashboard/BasicApp.js +0 -140
  228. package/dist/components/navbars/NavbarLinks.js +0 -212
  229. package/dist/components/signatures/OLD.js +0 -1138
  230. package/gulpfile.js +0 -77
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _RestUtils = require("../RestUtils");
11
11
 
12
- var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"));
12
+ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
13
13
 
14
14
  var _Utils = _interopRequireDefault(require("../Utils"));
15
15
 
@@ -23,7 +23,7 @@ var _Event = _interopRequireDefault(require("./Event"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- const location = window.location.protocol + "//" + window.location.hostname;
26
+ const location = window.location.protocol + '//' + window.location.hostname;
27
27
 
28
28
  class RouteActionHandler {
29
29
  constructor() {
@@ -39,27 +39,29 @@ class RouteActionHandler {
39
39
  //String url = webUrl + "?version=1.0" + (viewPath != null ? "&id=" + URL.encodeQueryString(viewPath) : "")
40
40
  // + (viewPathRequestDto != null ? "&serviceRequest=" + URL.encodeQueryString(requestDtoWriter.write(viewPathRequestDto)) : "")
41
41
  // + (portalCurrentOrg != null ? "&profile=" + portalCurrentOrg : "");
42
- _ApplicationContext.default.enableFormMarkers(false);
42
+ _ApplicationManager.default.enableFormMarkers(false);
43
43
 
44
44
  let forward = true;
45
45
  let path = null;
46
46
  let isParent = _Utils.default.isNull(actionConfig.parent) ? false : actionConfig.parent;
47
47
  let isPopup = _Utils.default.isNull(actionConfig.popUp) ? false : actionConfig.popUp;
48
+ let isWindow = _Utils.default.isNull(actionConfig.window) ? false : actionConfig.window;
48
49
 
49
50
  if (!_Utils.default.isNull(actionConfig.pathEvaluator)) {
50
51
  path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event.source.id, actionConfig.pathEvaluator);
51
52
  } else {
52
- path = _ApplicationContext.default.isExpression(actionConfig.path) ? _ApplicationContext.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
53
+ path = _ApplicationManager.default.isExpression(actionConfig.path) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
53
54
 
54
- if ("@#{history.back}" === actionConfig.path && _ApplicationContext.default.graphs.length === 0) {
55
- let historyElement = _ApplicationContext.default.getPreviousHistoryElement();
55
+ if ('@#{history.back}' === actionConfig.path && _ApplicationManager.default.graphs.length === 0) {
56
+ let historyElement = _ApplicationManager.default.getPreviousHistoryElement();
56
57
 
57
58
  if (historyElement === null) {
58
- console.error("Invalid path. Cannot got back in history");
59
+ console.error('Invalid path. Cannot go back in history');
59
60
  return;
60
61
  }
61
62
 
62
63
  path = historyElement.path;
64
+ isParent = historyElement.parent;
63
65
  forward = false;
64
66
  }
65
67
  }
@@ -70,7 +72,7 @@ class RouteActionHandler {
70
72
  for (let i = 0; i < actionConfig.parameters.length; i++) {
71
73
  let parameter = actionConfig.parameters[i];
72
74
 
73
- let parameterValue = _ApplicationContext.default.resolveParameterValue(parameter, event.data);
75
+ let parameterValue = _ApplicationManager.default.resolveParameterValue(parameter, event.data);
74
76
 
75
77
  let validator = parameter.validator;
76
78
 
@@ -82,53 +84,94 @@ class RouteActionHandler {
82
84
 
83
85
  let param = {};
84
86
  param.name = parameter.name;
85
- param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === "TypedValue" ? parameterValue.value : parameterValue;
87
+ param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
86
88
  parameterValues.push(param);
87
89
  }
88
90
  }
89
91
 
90
- if ("@#{history.back}" === actionConfig.path && _ApplicationContext.default.graphs.length > 0) {
91
- _ApplicationContext.default.removeLoadedGraph();
92
+ let currentGraph = _ApplicationManager.default.graphs.length > 0 ? _ApplicationManager.default.graphs[_ApplicationManager.default.graphs.length - 1] : null;
93
+
94
+ if ('@#{home}' === actionConfig.path) {
95
+ _ApplicationManager.default.navigate('/view/unload');
96
+
97
+ _ApplicationManager.default.navigate('/view/dashboard');
98
+ } else if ('@#{history.back}' === actionConfig.path && currentGraph) {
99
+ if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
100
+ _ApplicationManager.default.removeLoadedGraph(true);
101
+ }
92
102
  } else {
93
- let url = location + _ApplicationContext.default.getBaseApiUrl() + _ApplicationContext.default.getUIConfigPath() + "/view?version=1.0&id=" + path;
103
+ let url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/view/get?version=1.0&id=' + path;
94
104
  (0, _RestUtils.sendRequest)(url, data => {
95
- if (isParent) {
96
- _ApplicationContext.default.removeLoadedGraph();
105
+ if (isParent && currentGraph) {
106
+ if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
107
+ _ApplicationManager.default.removeLoadedGraph(false);
108
+ }
97
109
  }
98
110
 
99
111
  if (data.type === 'view') {
100
- let currentView = _ApplicationContext.default.getCurrentView();
112
+ let currentView = isWindow ? _ApplicationManager.default.getTopWindowView() : _ApplicationManager.default.getTopAnchorView();
101
113
 
102
114
  if (_Utils.default.isNull(currentView) || !currentView.popUp) {
103
115
  let view = {};
116
+ let defaultModel = {};
117
+
118
+ _Utils.default.updateModel(parameterValues, defaultModel);
119
+
104
120
  view.config = data;
105
- view.handle = {};
106
121
  view.parameters = parameterValues;
107
122
  view.parent = isParent;
108
123
  view.popUp = isPopup;
109
-
110
- _ApplicationContext.default.addView(view, path, forward); // None-existing route to ensure that the current view unloads
124
+ view.window = isWindow;
125
+ view.config.window = isWindow;
126
+ view.handle = {
127
+ api: {
128
+ get id() {
129
+ return data.id;
130
+ },
131
+
132
+ get model() {
133
+ return defaultModel;
134
+ },
135
+
136
+ getChild: id => {
137
+ return null;
138
+ },
139
+ updateModel: values => {
140
+ _Utils.default.updateModel(values, defaultModel);
141
+ },
142
+ setModelValue: (key, value) => {
143
+ this.defaultModel.key = value;
144
+ },
145
+ getModelValue: key => {
146
+ return this.defaultModel[key];
147
+ },
148
+ loaded: () => {
149
+ return false;
150
+ }
151
+ }
152
+ };
153
+
154
+ _ApplicationManager.default.addView(view, path, forward); // None-existing route to ensure that the current view unloads
111
155
 
112
156
 
113
157
  if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
114
- _ApplicationContext.default.getViewPortHistory().push("/switch");
158
+ if (!isWindow) {
159
+ _ApplicationManager.default.navigate('/view/unload');
115
160
 
116
- _ApplicationContext.default.getViewPortHistory().push("/view/" + data.id);
161
+ _ApplicationManager.default.navigate('/view/' + data.id);
162
+ }
117
163
  }
118
164
  } else {
119
- _ApplicationContext.default.closeCurrentView(false);
120
-
121
- currentView = _ApplicationContext.default.getCurrentView();
122
-
123
- if (currentView) {
124
- currentView.handle.api.updateModel(parameterValues);
125
- let event = new _Event.default(currentView.handle, currentView.config.id, null);
126
-
127
- _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
128
- }
165
+ /*applicationManager.closeCurrentView(false);
166
+ currentView = applicationManager.getCurrentView();
167
+ if (currentView) {
168
+ currentView.handle.api.updateModel(parameterValues);
169
+ let event = new Event(currentView.handle, currentView.config.id, null);
170
+ eventManager.fireEvent(EventType.COMPONENT_LOAD, event);
171
+ }*/
129
172
  }
130
173
  } else if (data.type === 'graph') {
131
- _ApplicationContext.default.loadGraph(isParent, isPopup, data, parameterValues);
174
+ _ApplicationManager.default.loadGraph(isParent, isPopup, isWindow, data, parameterValues);
132
175
  }
133
176
  }, e => {
134
177
  console.error(e);
@@ -25,35 +25,47 @@ class ServiceCallActionHandler {
25
25
  }
26
26
 
27
27
  execute(actionConfig, event, component, currentViewId, successCallback, errorCallback, invalidParameterCallback) {
28
- let method = actionConfig.service.type === 'remoteObjectProxy' ? _RestUtils.invokeRpc : _RestUtils.invokeRest;
29
- method(actionConfig.service, component, currentViewId, result => {
30
- let handle = !_Utils.default.isNull(component) && !_Utils.default.isNull(component.current) ? component.current : component;
28
+ if (actionConfig.service.type === 'rpc' || actionConfig.service.type === 'rest') {
29
+ let method = actionConfig.service.type === 'rpc' ? _RestUtils.invokeRpc : _RestUtils.invokeRest;
30
+ method(actionConfig.service, component, currentViewId, result => {
31
+ let handle = !_Utils.default.isNull(component) && !_Utils.default.isNull(component.current) ? component.current : component;
31
32
 
32
- if (!_Utils.default.isNull(actionConfig.postScript)) {
33
- try {
34
- let valuesMap = {};
35
- valuesMap.response = result.data;
33
+ if (!_Utils.default.isNull(actionConfig.postScript)) {
34
+ try {
35
+ let valuesMap = {};
36
+ valuesMap.response = result.data ? result.data : result;
36
37
 
37
- _DynamicJS.default.executeScriptObject('postScript_' + currentViewId + '_' + handle.getId(), actionConfig.postScript, handle.getId(), valuesMap);
38
- } catch (e) {
39
- console.error(e);
38
+ _DynamicJS.default.executeScriptObject('postScript_' + currentViewId + '_' + handle.api.id, actionConfig.postScript, handle.api.id, valuesMap, {
39
+ data: result.data ? result.data : result
40
+ });
41
+ } catch (e) {
42
+ console.error(e);
43
+ }
40
44
  }
41
- }
42
45
 
43
- if (!_Utils.default.isNull(successCallback)) {
44
- successCallback(result);
45
- }
46
- }, e => {
47
- _Utils.default.publishSystemErrorMessage(currentViewId, component);
46
+ if (!_Utils.default.isNull(successCallback)) {
47
+ successCallback(result);
48
+ }
49
+ }, e => {
50
+ if (!e.dataType) {
51
+ _Utils.default.publishSystemErrorMessage(currentViewId, component);
52
+ } else {
53
+ if (e.message) {
54
+ _Utils.default.publishErrorMessage(e.message, currentViewId, component);
55
+ }
56
+ }
48
57
 
49
- if (!_Utils.default.isNull(errorCallback)) {
50
- errorCallback(e);
51
- }
52
- }, () => {
53
- if (invalidParameterCallback) {
54
- invalidParameterCallback();
55
- }
56
- }, actionConfig.returnValueBinding, actionConfig.successMessage, event);
58
+ if (!_Utils.default.isNull(errorCallback)) {
59
+ errorCallback(e);
60
+ }
61
+ }, () => {
62
+ if (invalidParameterCallback) {
63
+ invalidParameterCallback();
64
+ }
65
+ }, actionConfig.returnValueBinding, actionConfig.successMessage, event);
66
+ } else {
67
+ console.error("Unknown service type : " + actionConfig.service.type);
68
+ }
57
69
  }
58
70
 
59
71
  }
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _Utils = _interopRequireDefault(require("./../Utils"));
11
11
 
12
- var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"));
12
+ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
@@ -23,7 +23,7 @@ class SignalGraphActionHandler {
23
23
  }
24
24
 
25
25
  execute(actionConfig, event, component, currentViewId) {
26
- _ApplicationContext.default.signalGraph(actionConfig.graphId, event);
26
+ _ApplicationManager.default.signalGraph(actionConfig.graphId, event);
27
27
  }
28
28
 
29
29
  }
@@ -12,14 +12,16 @@ class Addresses {
12
12
 
13
13
  copy(from, to, checked, mode = 'line') {
14
14
  if (checked) {
15
- let street = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.street' : '.line1')).value;
16
- let suburb = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.suburb' : '.line2')).value;
17
- let city = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.city' : '.line3')).value;
18
- let municipality = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.municipality' : '.line4')).value;
19
- let province = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.province' : '.line5')).value;
20
- let country = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.country' : '.line6')).value;
21
- let code = this.resolver.resolveComponentApi(from + '.code').value;
22
- let building = this.resolver.resolveComponentApi(from + '.building').value;
15
+ 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;
16
+
17
+ let street = (_this$resolver$resolv = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.street' : '.line1'))) === null || _this$resolver$resolv === void 0 ? void 0 : _this$resolver$resolv.value;
18
+ let suburb = (_this$resolver$resolv2 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.suburb' : '.line2'))) === null || _this$resolver$resolv2 === void 0 ? void 0 : _this$resolver$resolv2.value;
19
+ let city = (_this$resolver$resolv3 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.city' : '.line3'))) === null || _this$resolver$resolv3 === void 0 ? void 0 : _this$resolver$resolv3.value;
20
+ let municipality = (_this$resolver$resolv4 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.municipality' : '.line4'))) === null || _this$resolver$resolv4 === void 0 ? void 0 : _this$resolver$resolv4.value;
21
+ let province = (_this$resolver$resolv5 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.province' : '.line5'))) === null || _this$resolver$resolv5 === void 0 ? void 0 : _this$resolver$resolv5.value;
22
+ let country = (_this$resolver$resolv6 = this.resolver.resolveComponentApi(from + (mode === 'street' ? '.country' : '.line6'))) === null || _this$resolver$resolv6 === void 0 ? void 0 : _this$resolver$resolv6.value;
23
+ let code = (_this$resolver$resolv7 = this.resolver.resolveComponentApi(from + '.code')) === null || _this$resolver$resolv7 === void 0 ? void 0 : _this$resolver$resolv7.value;
24
+ let building = (_this$resolver$resolv8 = this.resolver.resolveComponentApi(from + '.building')) === null || _this$resolver$resolv8 === void 0 ? void 0 : _this$resolver$resolv8.value;
23
25
  this.resolver.resolveComponentApi(to + (mode === 'street' ? '.street' : '.line1')).value = street;
24
26
  this.resolver.resolveComponentApi(to + (mode === 'street' ? '.suburb' : '.line2')).value = suburb;
25
27
  this.resolver.resolveComponentApi(to + (mode === 'street' ? '.city' : '.line3')).value = city;
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.Calendar = void 0;
7
+
8
+ var _moment = _interopRequireDefault(require("moment/moment"));
9
+
10
+ var _Utils = _interopRequireDefault(require("../Utils"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ 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; }
15
+
16
+ class Calendar {
17
+ constructor(resolver) {
18
+ _defineProperty(this, "getEndDate", event => {
19
+ if (event.end) {
20
+ return new Date(event.end);
21
+ } else if (event.extendedProps.schedule.rrule) {
22
+ let startDate = new Date(event.start);
23
+ return (0, _moment.default)(startDate).add('minutes', event.extendedProps.duration).toDate();
24
+ }
25
+
26
+ new Date();
27
+ });
28
+
29
+ _defineProperty(this, "generateDefaultStartDate", schedule => {
30
+ if (!schedule.startDate) {
31
+ return null;
32
+ }
33
+
34
+ if (schedule.endDate < schedule.startDate) {
35
+ return schedule.endDate;
36
+ }
37
+
38
+ return schedule.startDate;
39
+ });
40
+
41
+ _defineProperty(this, "generateDefaultEndDate", schedule => {
42
+ if (!schedule.endDate) {
43
+ return null;
44
+ }
45
+
46
+ if (schedule.endDate < schedule.startDate) {
47
+ return schedule.startDate;
48
+ }
49
+
50
+ return schedule.endDate;
51
+ });
52
+
53
+ _defineProperty(this, "generateDefaultEndTime", schedule => {
54
+ if (!schedule.endTime) {
55
+ return null;
56
+ }
57
+
58
+ if (schedule.endTime <= schedule.startTime) {
59
+ let endTime = new Date(schedule.endTime);
60
+ endTime.setHours(schedule.startTime.getHours() + 1);
61
+ return endTime;
62
+ }
63
+
64
+ return schedule.endTime;
65
+ });
66
+
67
+ _defineProperty(this, "generateDefaultStartTime", schedule => {
68
+ if (!schedule.startTime) {
69
+ return null;
70
+ }
71
+
72
+ if (schedule.endTime <= schedule.startTime) {
73
+ let startTime = new Date(schedule.startTime);
74
+ startTime.setHours(schedule.endTime.getHours() - 1);
75
+ return startTime;
76
+ }
77
+
78
+ return schedule.startTime;
79
+ });
80
+
81
+ _defineProperty(this, "validateEndDate", schedule => {
82
+ if (!schedule.endDate) {
83
+ return {
84
+ valid: false,
85
+ message: 'Please specify end date'
86
+ };
87
+ }
88
+
89
+ if (schedule.startTime && schedule.endTime) {
90
+ let startDateTime = this.getDateTime(schedule.startDate);
91
+ let endDateTime = this.getDateTime(schedule.endDate);
92
+
93
+ if (endDateTime < startDateTime) {
94
+ return {
95
+ valid: false,
96
+ message: 'End date must be after the start date'
97
+ };
98
+ }
99
+ }
100
+
101
+ return {
102
+ valid: true
103
+ };
104
+ });
105
+
106
+ _defineProperty(this, "validateEndTime", schedule => {
107
+ if (!schedule.endTime) {
108
+ return {
109
+ valid: false,
110
+ message: 'Please specify end time'
111
+ };
112
+ }
113
+
114
+ if (schedule.startTime) {
115
+ let startDateTime = this.getDateTime(schedule.startDate, schedule.startTime);
116
+ let endDateTime = this.getDateTime(schedule.endDate, schedule.endTime);
117
+
118
+ if (endDateTime <= startDateTime) {
119
+ return {
120
+ valid: false,
121
+ message: 'End time must be after the start time'
122
+ };
123
+ }
124
+ }
125
+
126
+ return {
127
+ valid: true
128
+ };
129
+ });
130
+
131
+ _defineProperty(this, "validateStartTime", schedule => {
132
+ if (!schedule.startTime) {
133
+ return {
134
+ valid: false,
135
+ message: 'Please specify start time'
136
+ };
137
+ }
138
+
139
+ if (schedule.startTime) {
140
+ let startDateTime = this.getDateTime(schedule.startDate, schedule.startTime);
141
+ let endDateTime = this.getDateTime(schedule.endDate, schedule.endTime);
142
+
143
+ if (new Date() > startDateTime) {
144
+ return {
145
+ valid: false,
146
+ message: 'Start time must be in the future'
147
+ };
148
+ }
149
+ }
150
+
151
+ return {
152
+ valid: true
153
+ };
154
+ });
155
+
156
+ _defineProperty(this, "getDateTime", (date, time) => {
157
+ if (typeof date === 'string') {
158
+ date = new Date(date);
159
+ }
160
+
161
+ if (typeof time === 'string') {
162
+ time = new Date('1970-01-01 ' + time);
163
+ }
164
+
165
+ let dateTime = new Date(date);
166
+
167
+ if (time) {
168
+ dateTime.setHours(time.getHours());
169
+ dateTime.setMinutes(time.getMinutes());
170
+ } else {
171
+ dateTime.setHours(0);
172
+ dateTime.setMinutes(0);
173
+ dateTime.setSeconds(0);
174
+ dateTime.setMilliseconds(0);
175
+ }
176
+
177
+ return dateTime;
178
+ });
179
+
180
+ _defineProperty(this, "calendarEventToFormObject", event => {
181
+ let end = this.getEndDate(event);
182
+ return {
183
+ id: event.id,
184
+ title: event.title,
185
+ key: event.extendedProps.key,
186
+ locations: event.extendedProps.locations,
187
+ description: event.extendedProps.description,
188
+ status: event.extendedProps.status,
189
+ host: event.extendedProps.host,
190
+ attendees: event.extendedProps.attendees,
191
+ privacyType: event.extendedProps.privacyType,
192
+ documents: event.extendedProps.documents,
193
+ schedule: {
194
+ startDate: event.start,
195
+ startTime: event.start,
196
+ endDate: end,
197
+ endTime: end,
198
+ scheduleId: event.extendedProps.schedule.id,
199
+ recurringFreq: event.extendedProps.schedule.rrule.freq,
200
+ recurringInterval: event.extendedProps.schedule.rrule.interval,
201
+ recurringDtstart: new Date(event.extendedProps.schedule.rrule.dtstart),
202
+ recurringUntil: new Date(event.extendedProps.schedule.rrule.until),
203
+ recurringByweekday: event.extendedProps.schedule.rrule.byweekday,
204
+ recurringBysetpos: event.extendedProps.schedule.rrule.bysetpos,
205
+ recurringBymonthday: event.extendedProps.schedule.rrule.bymonthday
206
+ },
207
+ askToJoin: _Utils.default.isNull(event.extendedProps.askToJoin) ? false : event.extendedProps.askToJoin,
208
+ lapsed: (0, _moment.default)(new Date()).startOf('day') > (0, _moment.default)(event.start).startOf('day')
209
+ };
210
+ });
211
+
212
+ this.resolver = resolver;
213
+ }
214
+
215
+ }
216
+
217
+ exports.Calendar = Calendar;
218
+ const instance = new Calendar();
219
+ var _default = instance;
220
+ exports.default = _default;
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.Media = void 0;
7
+
8
+ var _SocketResponse = _interopRequireDefault(require("../components/media/SocketResponse"));
9
+
10
+ var _SocketManager = _interopRequireDefault(require("../components/SocketManager"));
11
+
12
+ var _SocketRequest = _interopRequireDefault(require("../components/media/SocketRequest"));
13
+
14
+ var _Event = _interopRequireDefault(require("../event/Event"));
15
+
16
+ var _Observable = _interopRequireDefault(require("../event/Observable"));
17
+
18
+ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
19
+
20
+ var _VCEventType = require("../components/media/VCEventType");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ 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
+
26
+ class Media {
27
+ constructor(resolver) {
28
+ _defineProperty(this, "requestToJoinMeeting", calendarEvent => {
29
+ return new Promise((resolve, reject) => {
30
+ let component = {
31
+ api: _ApplicationManager.default.resolveComponentApi('settingsNext')
32
+ };
33
+ let event = new _Event.default(component, 'vcSettings', null);
34
+
35
+ try {
36
+ if (calendarEvent.host.username === calendarEvent.host.username) {
37
+ resolve(_SocketResponse.default.JOIN_MEETING_PERMIT);
38
+
39
+ _Observable.default.fireEvent(_VCEventType.VCEventType.JOIN_MEETING_PERMIT, event);
40
+ } else {
41
+ _SocketManager.default.emitEvent(_SocketRequest.default.REQUEST_TO_JOIN_MEETING, {
42
+ userId: sessionStorage.getItem("username"),
43
+ hostId: calendarEvent.host.username,
44
+ askToJoin: calendarEvent.askToJoin,
45
+ meetingId: calendarEvent.id
46
+ }).then(result => {
47
+ let outcome = result.outcome;
48
+ resolve(outcome);
49
+
50
+ if (outcome === _SocketResponse.default.JOIN_MEETING_PERMIT) {
51
+ _Observable.default.fireEvent(_VCEventType.VCEventType.JOIN_MEETING_PERMIT, event);
52
+ }
53
+ });
54
+ }
55
+ } catch (e) {
56
+ reject(e);
57
+ }
58
+ });
59
+ });
60
+
61
+ _defineProperty(this, "joinMeeting", (calendarEvent, settings, userFullName) => {
62
+ let result = {};
63
+ return new Promise((resolve, reject) => {
64
+ try {
65
+ _SocketManager.default.emitEvent(_SocketRequest.default.JOIN_MEETING, {
66
+ meetingId: calendarEvent.id,
67
+ userFullName: userFullName,
68
+ userId: sessionStorage.getItem("username"),
69
+ avatarId: sessionStorage.getItem("userAvataId"),
70
+ isHost: sessionStorage.getItem("username") === calendarEvent.host.username,
71
+ settings: settings,
72
+ profile: _SocketManager.default.getProfile()
73
+ }).then(response => {
74
+ result.status = response.status;
75
+
76
+ if (response.status === 'SUCCESS') {
77
+ result.rtpCapabilities = response.data.rtpCapabilities;
78
+ result.shareScreenProducerData = response.data.shareScreenProducerData;
79
+ result.participants = response.data.usersInRoom;
80
+
81
+ if (sessionStorage.getItem("username") === calendarEvent.host.username) {
82
+ _SocketManager.default.emitEvent(_SocketRequest.default.GET_LOBBY, {
83
+ meetingId: calendarEvent.id
84
+ }).then(getLobbyResponse => {
85
+ if (getLobbyResponse.status === 'SUCCESS' && getLobbyResponse.lobby && getLobbyResponse.lobby.people) {
86
+ result.lobby = [];
87
+
88
+ for (const person of getLobbyResponse.lobby.people) {
89
+ result.lobby.push(person);
90
+ }
91
+ }
92
+ });
93
+ }
94
+
95
+ resolve(result);
96
+ } else {
97
+ reject(result);
98
+ }
99
+ }).catch(error => {
100
+ reject(error);
101
+ });
102
+ } catch (e) {
103
+ reject(e);
104
+ }
105
+ });
106
+ });
107
+
108
+ _defineProperty(this, "hasConnectedMediaDevices", () => {
109
+ return new Promise(resolve => {
110
+ navigator.mediaDevices.enumerateDevices().then(devices => {
111
+ try {
112
+ let audioConnected = false;
113
+ let videoConnected = false;
114
+ devices.forEach(device => {
115
+ if ('audioinput' === device.kind) {
116
+ audioConnected = true;
117
+ }
118
+
119
+ if ('videoinput' === device.kind) {
120
+ videoConnected = true;
121
+ }
122
+ });
123
+ resolve({
124
+ audioConnected,
125
+ videoConnected
126
+ });
127
+ } catch (e) {
128
+ resolve({
129
+ audioConnected: false,
130
+ videoConnected: false
131
+ });
132
+ }
133
+ });
134
+ });
135
+ });
136
+
137
+ _defineProperty(this, "getAvStatusMessage", avStatus => {
138
+ let errorMessage = '';
139
+
140
+ if (!avStatus.audioConnected || !avStatus.videoConnected) {
141
+ errorMessage = 'No ' + (!avStatus.audioConnected ? 'audio ' : '');
142
+ errorMessage += !avStatus.videoConnected ? !avStatus.audioConnected ? 'and video' : 'video ' : '';
143
+ errorMessage += ' device' + (!avStatus.audioConnected && !avStatus.videoConnected ? 's' : '') + ' connected';
144
+ }
145
+
146
+ return errorMessage;
147
+ });
148
+
149
+ this.resolver = resolver;
150
+ }
151
+
152
+ }
153
+
154
+ exports.Media = Media;
155
+ const instance = new Media();
156
+ var _default = instance;
157
+ exports.default = _default;