@agilemotion/oui-react-js 1.8.56 → 1.8.58

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 (187) hide show
  1. package/dist/ApplicationManager.js +446 -472
  2. package/dist/BasicApp.js +30 -0
  3. package/dist/BasicAppHome.js +2 -3
  4. package/dist/DateUtils.js +2 -2
  5. package/dist/DynamicJS.js +93 -101
  6. package/dist/InteractionPortalAppHome.js +1 -1
  7. package/dist/InteractionPortalApp_old.js +1 -2
  8. package/dist/MouseTracker.js +23 -0
  9. package/dist/RestService.js +13 -11
  10. package/dist/RestUtils.js +1 -1
  11. package/dist/TypedValue.js +15 -14
  12. package/dist/Utils.js +121 -114
  13. package/dist/ViewContext.js +152 -159
  14. package/dist/assets/jss/components/authNavbarStyle.js +34 -37
  15. package/dist/assets/jss/components/cardHeaderStyle.js +11 -18
  16. package/dist/assets/jss/components/customDropdownStyle.js +25 -27
  17. package/dist/assets/jss/components/customInputStyle.js +7 -3
  18. package/dist/assets/jss/components/dropdownStyle.js +14 -11
  19. package/dist/assets/jss/components/footerStyle.js +17 -12
  20. package/dist/assets/jss/components/headerLinksStyle.js +12 -9
  21. package/dist/assets/jss/components/headerStyle.js +24 -26
  22. package/dist/assets/jss/components/navbarLinksStyle.js +12 -9
  23. package/dist/assets/jss/components/navbarStyle.js +24 -26
  24. package/dist/assets/jss/components/sidebarStyle.js +42 -42
  25. package/dist/assets/jss/components/typographyStyle.js +7 -3
  26. package/dist/assets/jss/rootStyle.js +30 -34
  27. package/dist/assets/jss/views/layoutStyle.js +12 -9
  28. package/dist/assets/jss/views/loginStyle.js +9 -6
  29. package/dist/components/AlertBar.js +1 -1
  30. package/dist/components/Button.js +18 -11
  31. package/dist/components/Calendar.js +9 -6
  32. package/dist/components/Chart.js +1 -1
  33. package/dist/components/DataGrid.css +12 -3
  34. package/dist/components/DataGrid.js +115 -56
  35. package/dist/components/DataGridColumn.js +22 -4
  36. package/dist/components/DocumentTemplateDesigner.js +9 -5
  37. package/dist/components/DocumentTemplateDesignerComponent.js +49 -549
  38. package/dist/components/DocumentTemplatePlaceholderDialog.js +3 -4
  39. package/dist/components/DocumentViewer.js +19 -6
  40. package/dist/components/ElementResizeHandler.js +177 -174
  41. package/dist/components/FaceApi.js +2 -2
  42. package/dist/components/FileThumb.js +5 -5
  43. package/dist/components/Graph.js +77 -74
  44. package/dist/components/GraphNode.js +39 -36
  45. package/dist/components/HtmlPanel.js +2 -1
  46. package/dist/components/Icon.js +1 -2
  47. package/dist/components/PDFViewer.js +2 -3
  48. package/dist/components/PopupView.js +1 -1
  49. package/dist/components/Portlet.js +3 -2
  50. package/dist/components/RegularButton.js +17 -14
  51. package/dist/components/SocketManager.js +97 -94
  52. package/dist/components/StepperTitleBar.js +7 -6
  53. package/dist/components/TabPage.js +10 -7
  54. package/dist/components/TabPanel.js +11 -6
  55. package/dist/components/TableCellContent.js +13 -9
  56. package/dist/components/TemplateDesigner.js +2 -2
  57. package/dist/components/TemplateItemEventHandler.js +232 -228
  58. package/dist/components/TemplateTable.js +32 -29
  59. package/dist/components/TitleBar.js +2 -2
  60. package/dist/components/Toolbar.js +58 -22
  61. package/dist/components/Tree.js +3 -3
  62. package/dist/components/WordDocumentViewer.css +7 -0
  63. package/dist/components/WordDocumentViewer.js +329 -109
  64. package/dist/components/card/Card.js +18 -15
  65. package/dist/components/card/CardAvatar.js +11 -8
  66. package/dist/components/card/CardBody.js +16 -13
  67. package/dist/components/card/CardFooter.js +15 -12
  68. package/dist/components/card/CardHeader.js +16 -13
  69. package/dist/components/card/CardIcon.js +9 -6
  70. package/dist/components/card/CardText.js +9 -6
  71. package/dist/components/customInput/File.js +4 -5
  72. package/dist/components/dashboard/FoldingSideTabDashboard.bck.js +1 -1
  73. package/dist/components/dashboard/FoldingSideTabDashboard.js +2 -3
  74. package/dist/components/dashboard/components/Header.js +6 -4
  75. package/dist/components/dashboard/components/LeftDrawer.js +2 -2
  76. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +26 -28
  77. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.bck.js +182 -188
  78. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +27 -30
  79. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +12 -14
  80. package/dist/components/drag-spec-design.json +15 -0
  81. package/dist/components/facialRecognition/FaceRecognitionComponent.js +10 -11
  82. package/dist/components/facialRecognition/service/faceApi.js +3 -3
  83. package/dist/components/form/AddressSearch.js +8 -5
  84. package/dist/components/form/AutoComplete.js +4 -4
  85. package/dist/components/form/BaseField.js +3 -2
  86. package/dist/components/form/CurrencyField.js +8 -8
  87. package/dist/components/form/DatePicker.js +3 -2
  88. package/dist/components/form/FieldSet.js +2 -1
  89. package/dist/components/form/Form.css +1 -1
  90. package/dist/components/form/Form.js +11 -8
  91. package/dist/components/form/GridField.js +4 -3
  92. package/dist/components/form/IconField.js +2 -1
  93. package/dist/components/form/ImageEditor.js +13 -8
  94. package/dist/components/form/LookupField.js +8 -7
  95. package/dist/components/form/MultiFileUploadField.js +14 -8
  96. package/dist/components/form/SelectItem.js +7 -6
  97. package/dist/components/form/TextField.js +6 -6
  98. package/dist/components/form/TimePicker.js +3 -2
  99. package/dist/components/form/TransferList.js +2 -2
  100. package/dist/components/form/UploadField.js +5 -5
  101. package/dist/components/grid/GridContainer.js +7 -4
  102. package/dist/components/grid/GridItem.js +7 -4
  103. package/dist/components/layout/CollapsiblePanel.js +7 -5
  104. package/dist/components/layout/Layout.js +5 -5
  105. package/dist/components/layout/View.js +6 -5
  106. package/dist/components/layout/ViewContainer.js +1 -2
  107. package/dist/components/layout/ViewPort.js +1 -1
  108. package/dist/components/layout/Window.js +2 -3
  109. package/dist/components/layout/WindowDialog.js +9 -7
  110. package/dist/components/layout/WindowViewPort.js +3 -3
  111. package/dist/components/media/Chat.js +2 -1
  112. package/dist/components/media/MediaSoupHelper.js +57 -53
  113. package/dist/components/media/SocketRequest.js +9 -7
  114. package/dist/components/media/SocketResponse.js +7 -5
  115. package/dist/components/media/Timer.js +1 -2
  116. package/dist/components/media/Toolbar.js +3 -3
  117. package/dist/components/media/ToolbarButton.js +23 -24
  118. package/dist/components/media/Toolbar_bck.js +3 -3
  119. package/dist/components/media/Tracks.js +24 -19
  120. package/dist/components/media/TrainingRoom.js +3 -4
  121. package/dist/components/media/Transports.js +21 -17
  122. package/dist/components/media/VCEventManager.js +25 -24
  123. package/dist/components/media/VCEventType.js +81 -79
  124. package/dist/components/media/VCParticipantList.js +1 -2
  125. package/dist/components/media/VCParticipantListItem.js +2 -3
  126. package/dist/components/media/VCRoomParticipant.js +4 -5
  127. package/dist/components/media/VCRoomRecorder.js +163 -160
  128. package/dist/components/media/VCRoomWorkspace.js +3 -4
  129. package/dist/components/media/Video.js +1 -2
  130. package/dist/components/media/VideoPlayer.js +1 -2
  131. package/dist/components/media/chat/ChatPoll.js +15 -15
  132. package/dist/components/media/chat/ChatRoom.js +15 -15
  133. package/dist/components/media/chat/ChatRoomItem.js +2 -3
  134. package/dist/components/media/chat/ChatRoomList.js +1 -2
  135. package/dist/components/media/chat/ChatRoomWrapper.js +1 -1
  136. package/dist/components/media/chat/PollContainer.js +14 -8
  137. package/dist/components/media/chat/PollResult.js +1 -2
  138. package/dist/components/menu/MenuBars.js +8 -5
  139. package/dist/components/menu/MenuButton.js +11 -5
  140. package/dist/components/menu/MenuItem.js +13 -6
  141. package/dist/components/menu/MenuLink.js +2 -1
  142. package/dist/components/navbars/HomeNavbar.js +43 -41
  143. package/dist/components/navbars/PortalNavbar.js +1 -2
  144. package/dist/components/signatures/AgilitySignaturePanel.js +39 -15
  145. package/dist/components/signatures/{DocumentContainer.js → HtmlSignatureDocumentContainer.js} +4 -4
  146. package/dist/components/signatures/ImageSignatureInput.js +27 -16
  147. package/dist/components/signatures/ResponsiveTable.js +1 -1
  148. package/dist/components/signatures/SearchView.js +1 -1
  149. package/dist/components/signatures/SignatureInput.js +42 -98
  150. package/dist/components/signatures/SignatureInputProps.js +1 -1
  151. package/dist/components/signatures/SignatureTemplateDesigner.js +13 -10
  152. package/dist/components/signatures/Toolbar.js +7 -3
  153. package/dist/components/signatures/ViewUtils.js +21 -16
  154. package/dist/event/ActionHandlers.js +10 -7
  155. package/dist/event/Event.js +15 -13
  156. package/dist/event/EventListener.js +39 -41
  157. package/dist/event/EventType.js +24 -19
  158. package/dist/event/Observable.js +120 -125
  159. package/dist/event/RouteActionHandler.js +4 -4
  160. package/dist/event/ScriptActionHandler.js +1 -1
  161. package/dist/event/ServiceCallActionHandler.js +1 -1
  162. package/dist/interaction/CursorOverlay.js +48 -0
  163. package/dist/interaction/DragContext.js +39 -0
  164. package/dist/interaction/GrabContext.js +40 -0
  165. package/dist/js/Addresses.js +9 -8
  166. package/dist/js/Calendar.js +152 -149
  167. package/dist/js/Docs.js +92 -87
  168. package/dist/js/DynamicLib.js +9 -6
  169. package/dist/js/Media.js +134 -131
  170. package/dist/js/ProcurementMeetings.js +81 -78
  171. package/dist/js/Validators.js +53 -50
  172. package/dist/js/Windows.js +35 -32
  173. package/dist/redux/store/ConfigureStore.js +8 -5
  174. package/dist/redux/store/DashboardStore.js +13 -12
  175. package/dist/redux/store/SecurityStore.js +9 -6
  176. package/dist/security/TokenManager.js +1 -1
  177. package/dist/view/Dashboard.js +11 -12
  178. package/dist/view/security/ForgotPassword.js +3 -3
  179. package/dist/view/security/ForgotPasswordBasic.js +1 -1
  180. package/dist/view/security/Login.js +4 -4
  181. package/dist/view/security/LoginBasic.js +2 -2
  182. package/dist/view/security/LoginInteractionPortal.js +2 -2
  183. package/dist/view/security/ResetPassword.js +1 -1
  184. package/dist/view/security/ResetPasswordBasic.js +1 -1
  185. package/dist/view/security/Security.js +4 -4
  186. package/package.json +10 -10
  187. package/dist/components/DocumentTemplateDesignerComponent2.js +0 -585
@@ -9,8 +9,85 @@ var _ActionHandlers = _interopRequireDefault(require("../event/ActionHandlers"))
9
9
  var _GraphNode = _interopRequireDefault(require("./GraphNode"));
10
10
  var _Utils = _interopRequireDefault(require("../Utils"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
15
  class Graph {
13
16
  constructor(config) {
17
+ _defineProperty(this, "getCurrentNodeIndex", () => {
18
+ let index = 0;
19
+ let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
20
+ for (const element of collection) {
21
+ if (this.current.config.name === element.name) {
22
+ return index;
23
+ }
24
+ index++;
25
+ }
26
+ return null;
27
+ });
28
+ _defineProperty(this, "init", async () => {
29
+ let root = this.config.nodes[0];
30
+ this.current = new _GraphNode.default(this.config.nodes[0]);
31
+ this.addNodeToPath(this.current);
32
+ if (root.action.actionType === 'route') {
33
+ root.action.window = this.config.isWindow;
34
+ root.action.graphId = this.config.id;
35
+ root.action.pinned = this.config.pinned;
36
+ root.action.defaultDisplayState = this.config.defaultDisplayState;
37
+ }
38
+ if (root.onStart) {
39
+ for (const action of root.onStart.actions) {
40
+ await _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
41
+ }
42
+ }
43
+ await _ActionHandlers.default.invokeHandler(root.action, null, null, this.config.id);
44
+ });
45
+ _defineProperty(this, "signal", event => {
46
+ let nextNodeName = this.current.getNextNode(event);
47
+ if (this.current.config.last && nextNodeName === null) {
48
+ _ApplicationManager.default.removeLoadedGraph(this.config.isWindow ? 'window' : 'main');
49
+ } else {
50
+ if (!_Utils.default.isNull(nextNodeName)) {
51
+ for (const node of this.config.nodes) {
52
+ if (node.name === nextNodeName) {
53
+ this.current = new _GraphNode.default(node);
54
+ this.addNodeToPath(this.current);
55
+ if (node.action.actionType === 'route') {
56
+ node.action.window = this.config.isWindow;
57
+ node.action.graphId = this.config.id;
58
+ }
59
+ if (node.onStart) {
60
+ for (const action of node.onStart.actions) {
61
+ _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
62
+ }
63
+ }
64
+ _ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
65
+ break;
66
+ }
67
+ }
68
+ }
69
+ if (this.current === null) {
70
+ console.error("Node name could not be found : " + nextNodeName);
71
+ }
72
+ }
73
+ });
74
+ _defineProperty(this, "setCurrentNodeTitle", title => {
75
+ if (this.current !== null) {
76
+ this.current.title = title;
77
+ }
78
+ });
79
+ _defineProperty(this, "addNodeToPath", node => {
80
+ if (this.path.length === 0) {
81
+ this.path.push(node);
82
+ } else {
83
+ let lastNode = this.path[this.path.length - 1];
84
+ if (lastNode.config.name === node.config.name) {
85
+ this.path.pop();
86
+ } else {
87
+ this.path.push(node);
88
+ }
89
+ }
90
+ });
14
91
  this.config = config;
15
92
  this.modelData = {};
16
93
  this.current = null;
@@ -36,83 +113,9 @@ class Graph {
36
113
  }
37
114
  return titleStack;
38
115
  }
39
- getCurrentNodeIndex = () => {
40
- let index = 0;
41
- let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
42
- for (const element of collection) {
43
- if (this.current.config.name === element.name) {
44
- return index;
45
- }
46
- index++;
47
- }
48
- return null;
49
- };
50
116
  get title() {
51
117
  return this.config.title;
52
118
  }
53
- init = async () => {
54
- let root = this.config.nodes[0];
55
- this.current = new _GraphNode.default(this.config.nodes[0]);
56
- this.addNodeToPath(this.current);
57
- if (root.action.actionType === 'route') {
58
- root.action.window = this.config.isWindow;
59
- root.action.graphId = this.config.id;
60
- root.action.pinned = this.config.pinned;
61
- root.action.defaultDisplayState = this.config.defaultDisplayState;
62
- }
63
- if (root.onStart) {
64
- for (const action of root.onStart.actions) {
65
- await _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
66
- }
67
- }
68
- await _ActionHandlers.default.invokeHandler(root.action, null, null, this.config.id);
69
- };
70
- signal = event => {
71
- let nextNodeName = this.current.getNextNode(event);
72
- if (this.current.config.last && nextNodeName === null) {
73
- _ApplicationManager.default.removeLoadedGraph(this.config.isWindow ? 'window' : 'main');
74
- } else {
75
- if (!_Utils.default.isNull(nextNodeName)) {
76
- for (const node of this.config.nodes) {
77
- if (node.name === nextNodeName) {
78
- this.current = new _GraphNode.default(node);
79
- this.addNodeToPath(this.current);
80
- if (node.action.actionType === 'route') {
81
- node.action.window = this.config.isWindow;
82
- node.action.graphId = this.config.id;
83
- }
84
- if (node.onStart) {
85
- for (const action of node.onStart.actions) {
86
- _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
87
- }
88
- }
89
- _ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
90
- break;
91
- }
92
- }
93
- }
94
- if (this.current === null) {
95
- console.error("Node name could not be found : " + nextNodeName);
96
- }
97
- }
98
- };
99
- setCurrentNodeTitle = title => {
100
- if (this.current !== null) {
101
- this.current.title = title;
102
- }
103
- };
104
- addNodeToPath = node => {
105
- if (this.path.length === 0) {
106
- this.path.push(node);
107
- } else {
108
- let lastNode = this.path[this.path.length - 1];
109
- if (lastNode.config.name === node.config.name) {
110
- this.path.pop();
111
- } else {
112
- this.path.push(node);
113
- }
114
- }
115
- };
116
119
  get value() {
117
120
  if (_Utils.default.isNull(this.config.valueObjectType)) {
118
121
  let value = {};
@@ -7,48 +7,51 @@ exports.default = void 0;
7
7
  var _DynamicJS = _interopRequireDefault(require("./../DynamicJS"));
8
8
  var _Utils = _interopRequireDefault(require("./../Utils"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
12
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
13
  class GraphNode {
11
14
  constructor(config) {
12
- this.config = config;
13
- }
14
- evaluateEdge = (edge, event) => {
15
- let totalEdgeCount = this.config.edges.length;
16
- if (_Utils.default.isNull(edge.condition) && totalEdgeCount === 0) {
17
- return true;
18
- }
19
- if (_Utils.default.isNull(edge.condition) && totalEdgeCount > 0) {
20
- console.error("Missing required condition for link : " + JSON.stringify(edge));
21
- return false;
22
- }
23
- if (!_Utils.default.isNull(edge.condition)) {
24
- let eventSource = edge.condition.eventSource;
25
- let expression = edge.condition.expression;
26
- if (_Utils.default.isNull(eventSource) && _Utils.default.isNull(expression)) {
27
- console.error("Empty condition for link : " + JSON.stringify(edge));
15
+ _defineProperty(this, "evaluateEdge", (edge, event) => {
16
+ let totalEdgeCount = this.config.edges.length;
17
+ if (_Utils.default.isNull(edge.condition) && totalEdgeCount === 0) {
18
+ return true;
19
+ }
20
+ if (_Utils.default.isNull(edge.condition) && totalEdgeCount > 0) {
21
+ console.error("Missing required condition for link : " + JSON.stringify(edge));
28
22
  return false;
29
23
  }
30
- let sourceId = event.source.api.id;
31
- if (totalEdgeCount === 0) {
32
- return (_Utils.default.isNull(eventSource) || sourceId === eventSource) && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
33
- } else {
34
- return sourceId === eventSource && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
24
+ if (!_Utils.default.isNull(edge.condition)) {
25
+ let eventSource = edge.condition.eventSource;
26
+ let expression = edge.condition.expression;
27
+ if (_Utils.default.isNull(eventSource) && _Utils.default.isNull(expression)) {
28
+ console.error("Empty condition for link : " + JSON.stringify(edge));
29
+ return false;
30
+ }
31
+ let sourceId = event.source.api.id;
32
+ if (totalEdgeCount === 0) {
33
+ return (_Utils.default.isNull(eventSource) || sourceId === eventSource) && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
34
+ } else {
35
+ return sourceId === eventSource && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
36
+ }
35
37
  }
36
- }
37
- };
38
- getNextNode = event => {
39
- let activeEdge = null;
40
- if (!_Utils.default.isNull(this.config.edges)) {
41
- for (const edge of this.config.edges) {
42
- if (this.evaluateEdge(edge, event)) {
43
- activeEdge = edge;
44
- break;
38
+ });
39
+ _defineProperty(this, "getNextNode", event => {
40
+ let activeEdge = null;
41
+ if (!_Utils.default.isNull(this.config.edges)) {
42
+ for (const edge of this.config.edges) {
43
+ if (this.evaluateEdge(edge, event)) {
44
+ activeEdge = edge;
45
+ break;
46
+ }
45
47
  }
46
48
  }
47
- }
48
- if (activeEdge !== null) {
49
- return activeEdge.targetNodeName;
50
- }
51
- return null;
52
- };
49
+ if (activeEdge !== null) {
50
+ return activeEdge.targetNodeName;
51
+ }
52
+ return null;
53
+ });
54
+ this.config = config;
55
+ }
53
56
  }
54
57
  exports.default = GraphNode;
@@ -85,10 +85,11 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
85
85
  },
86
86
  loadData: (actionConfig, event) => {
87
87
  if (actionConfig && actionConfig.value) {
88
+ var _applicationManager$r;
88
89
  let parameterConfig = {
89
90
  value: actionConfig.value
90
91
  };
91
- let data = _ApplicationManager.default.resolveParameterConfigValue(parameterConfig, event?.data)?.value;
92
+ let data = (_applicationManager$r = _ApplicationManager.default.resolveParameterConfigValue(parameterConfig, event === null || event === void 0 ? void 0 : event.data)) === null || _applicationManager$r === void 0 ? void 0 : _applicationManager$r.value;
92
93
  let templateScript = Handlebars.compile(template);
93
94
  setContent(templateScript(data));
94
95
  }
@@ -49,8 +49,7 @@ var _Phone = _interopRequireDefault(require("@mui/icons-material/Phone"));
49
49
  var _Cancel = _interopRequireDefault(require("@mui/icons-material/Cancel"));
50
50
  var _colors = require("@mui/material/colors");
51
51
  var _iconsMaterial = require("@mui/icons-material");
52
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
53
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
52
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
54
53
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
55
54
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
56
55
  class Icon extends _react.Component {
@@ -8,9 +8,8 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactPdf = require("react-pdf");
9
9
  var _Utils = _interopRequireDefault(require("../Utils"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- _reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${_reactPdf.pdfjs.version}/pdf.worker.js`;
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ _reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
14
13
  const PDFViewer = props => {
15
14
  const [pageNumber, setPageNumber] = _react.default.useState(1);
16
15
  const [numPages, setNumPages] = _react.default.useState(null);
@@ -52,7 +52,7 @@ function PopupViewDialog(props) {
52
52
  handle: props.view.handle,
53
53
  loadCallback: () => {
54
54
  if (parsedConfig.windowTitle) {
55
- setTitle(_ApplicationManager.default.isExpression(parsedConfig.windowTitle) ? _DynamicJS.default.executeScript(`popupTitle_${props.view.id}`, parsedConfig.windowTitle, parsedConfig.id) : parsedConfig.windowTitle);
55
+ setTitle(_ApplicationManager.default.isExpression(parsedConfig.windowTitle) ? _DynamicJS.default.executeScript("popupTitle_".concat(props.view.id), parsedConfig.windowTitle, parsedConfig.id) : parsedConfig.windowTitle);
56
56
  }
57
57
  }
58
58
  })));
@@ -10,6 +10,7 @@ var _Observable = _interopRequireDefault(require("../event/Observable"));
10
10
  require("./Portlet.css");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  const Portlet = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
13
+ var _props$config$attribu, _props$config$attribu2;
13
14
  const [url, setUrl] = _react.default.useState(null);
14
15
  const [visible, setVisible] = _react.default.useState(true);
15
16
  const urlTemp = _react.default.useRef(null);
@@ -70,8 +71,8 @@ const Portlet = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.for
70
71
  src: url,
71
72
  title: "eProcurement",
72
73
  className: 'portlet-iframe',
73
- sandbox: props.config.attributes?.sandbox,
74
- allow: props.config.attributes?.allow,
74
+ sandbox: (_props$config$attribu = props.config.attributes) === null || _props$config$attribu === void 0 ? void 0 : _props$config$attribu.sandbox,
75
+ allow: (_props$config$attribu2 = props.config.attributes) === null || _props$config$attribu2 === void 0 ? void 0 : _props$config$attribu2.allow,
75
76
  id: props.config.id
76
77
  }));
77
78
  }));
@@ -10,26 +10,29 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _styles = require("@mui/styles");
11
11
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
12
12
  var _buttonStyle = _interopRequireDefault(require("../assets/jss/components/buttonStyle"));
13
+ const _excluded = ["color", "round", "children", "fullWidth", "disabled", "simple", "size", "block", "link", "justIcon", "className", "muiClasses"];
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
16
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
17
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
15
18
  const useStyles = (0, _styles.makeStyles)(_buttonStyle.default);
16
19
  const RegularButton = props => {
17
20
  const classes = useStyles();
18
21
  const {
19
- color,
20
- round,
21
- children,
22
- fullWidth,
23
- disabled,
24
- simple,
25
- size,
26
- block,
27
- link,
28
- justIcon,
29
- className,
30
- muiClasses,
31
- ...rest
32
- } = props;
22
+ color,
23
+ round,
24
+ children,
25
+ fullWidth,
26
+ disabled,
27
+ simple,
28
+ size,
29
+ block,
30
+ link,
31
+ justIcon,
32
+ className,
33
+ muiClasses
34
+ } = props,
35
+ rest = _objectWithoutProperties(props, _excluded);
33
36
  const btnClasses = (0, _classnames.default)({
34
37
  [classes.button]: true,
35
38
  [classes[size]]: size,
@@ -13,91 +13,117 @@ var _Event = _interopRequireDefault(require("../event/Event"));
13
13
  var _VCEventType = require("./media/VCEventType");
14
14
  var _Observable = _interopRequireDefault(require("../event/Observable"));
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
19
  class SocketManager {
17
20
  constructor() {
18
- this.usersOnline = [];
19
- }
20
- emitEvent = (eventType, data) => {
21
- return new Promise((resolve, reject) => {
22
- if (this.socket) {
23
- console.log("EMITTING EVENT : " + eventType);
24
- let response = this.socket.emit(eventType, data, data => {
25
- console.log("EMITTING EVENT RESULT : " + eventType, data);
26
- if (data.status === 'SUCCESS') {
27
- resolve(data);
28
- } else {
29
- console.log("ERROR EMITTING EVENT : " + eventType);
30
- reject(new Error(data.status));
21
+ _defineProperty(this, "emitEvent", (eventType, data) => {
22
+ return new Promise((resolve, reject) => {
23
+ if (this.socket) {
24
+ console.log("EMITTING EVENT : " + eventType);
25
+ let response = this.socket.emit(eventType, data, data => {
26
+ console.log("EMITTING EVENT RESULT : " + eventType, data);
27
+ if (data.status === 'SUCCESS') {
28
+ resolve(data);
29
+ } else {
30
+ console.log("ERROR EMITTING EVENT : " + eventType);
31
+ reject(new Error(data.status));
32
+ }
33
+ });
34
+ if (!response.connected) {
35
+ reject(new Error("CONNECTION_ERROR"));
31
36
  }
32
- });
33
- if (!response.connected) {
37
+ } else {
34
38
  reject(new Error("CONNECTION_ERROR"));
35
39
  }
40
+ });
41
+ });
42
+ _defineProperty(this, "init", async () => {
43
+ let DEFAULT_SOCKET_SERVER_URL = 'https://sockets.e-procurementsystem.co.za';
44
+ if (!process.env.REACT_APP_SOCKET_SERVER_URL) {
45
+ console.log("SOCKET SERVER URL NOT SET. DEFAULTING TO - [https://sockets.e-procurementsystem.co.za]");
36
46
  } else {
37
- reject(new Error("CONNECTION_ERROR"));
47
+ console.log("CONNECTING TO ENV SOCKET SERVER URL");
38
48
  }
39
- });
40
- };
41
- init = async () => {
42
- let DEFAULT_SOCKET_SERVER_URL = 'https://sockets.e-procurementsystem.co.za';
43
- if (!process.env.REACT_APP_SOCKET_SERVER_URL) {
44
- console.log("SOCKET SERVER URL NOT SET. DEFAULTING TO - [https://sockets.e-procurementsystem.co.za]");
45
- } else {
46
- console.log("CONNECTING TO ENV SOCKET SERVER URL");
47
- }
48
- let url = process.env.REACT_APP_SOCKET_SERVER_URL || DEFAULT_SOCKET_SERVER_URL;
49
- console.log("======= SOCKET MANAGER CONNECTING TO ========= [" + url + "]");
50
- let socket = _socket.default.connect(url);
51
- this.socket = socket;
52
- socket.on("connect", () => {
53
- this.registerOnline();
54
- });
55
- socket.on('disconnect', () => {
56
- _VCEventManager.default.fireEvent(_VCEventType.VCEventType.SOCKET_DISCONNECT, {});
57
- });
58
- for (const value of Object.keys(_VCEventType.VCEventType)) {
59
- socket.on(value, payload => {
60
- console.log('EVENT: ', value);
61
- if (value !== _VCEventType.VCEventType.USERS_ONLINE && value !== _VCEventType.VCEventType.USER_ONLINE && value !== _VCEventType.VCEventType.USER_OFFLINE) {
62
- _VCEventManager.default.fireEvent(value, {
63
- socket: this.socket,
64
- payload: payload
65
- });
66
- let event = new _Event.default(_ApplicationManager.default, 'SYSTEM_EVENT', payload);
67
- _Observable.default.fireEvent(value, event);
68
- }
49
+ let url = process.env.REACT_APP_SOCKET_SERVER_URL || DEFAULT_SOCKET_SERVER_URL;
50
+ console.log("======= SOCKET MANAGER CONNECTING TO ========= [" + url + "]");
51
+ let socket = _socket.default.connect(url);
52
+ this.socket = socket;
53
+ socket.on("connect", () => {
54
+ this.registerOnline();
69
55
  });
70
- }
71
- socket.on(_VCEventType.VCEventType.USERS_ONLINE, payload => {
72
- this.usersOnline.splice(0, this.usersOnline.length);
73
- for (const payloadElement of payload) {
74
- this.usersOnline.push(payloadElement);
56
+ socket.on('disconnect', () => {
57
+ _VCEventManager.default.fireEvent(_VCEventType.VCEventType.SOCKET_DISCONNECT, {});
58
+ });
59
+ for (const value of Object.keys(_VCEventType.VCEventType)) {
60
+ socket.on(value, payload => {
61
+ console.log('EVENT: ', value);
62
+ if (value !== _VCEventType.VCEventType.USERS_ONLINE && value !== _VCEventType.VCEventType.USER_ONLINE && value !== _VCEventType.VCEventType.USER_OFFLINE) {
63
+ _VCEventManager.default.fireEvent(value, {
64
+ socket: this.socket,
65
+ payload: payload
66
+ });
67
+ let event = new _Event.default(_ApplicationManager.default, 'SYSTEM_EVENT', payload);
68
+ _Observable.default.fireEvent(value, event);
69
+ }
70
+ });
75
71
  }
76
- _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USERS_ONLINE, {
77
- socket: this.socket,
78
- payload: payload
72
+ socket.on(_VCEventType.VCEventType.USERS_ONLINE, payload => {
73
+ this.usersOnline.splice(0, this.usersOnline.length);
74
+ for (const payloadElement of payload) {
75
+ this.usersOnline.push(payloadElement);
76
+ }
77
+ _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USERS_ONLINE, {
78
+ socket: this.socket,
79
+ payload: payload
80
+ });
79
81
  });
80
- });
81
- socket.on(_VCEventType.VCEventType.USER_ONLINE, payload => {
82
- this.usersOnline.push(payload);
83
- _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_ONLINE, {
84
- socket: this.socket,
85
- payload: payload
82
+ socket.on(_VCEventType.VCEventType.USER_ONLINE, payload => {
83
+ this.usersOnline.push(payload);
84
+ _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_ONLINE, {
85
+ socket: this.socket,
86
+ payload: payload
87
+ });
86
88
  });
87
- });
88
- socket.on(_VCEventType.VCEventType.USER_OFFLINE, payload => {
89
- for (let i = 0; i < this.usersOnline.length; i++) {
90
- console.log(this.usersOnline[i].userId + " === " + payload.userId);
91
- if (this.usersOnline[i].userId === payload.userId) {
92
- this.usersOnline.splice(i, 1);
89
+ socket.on(_VCEventType.VCEventType.USER_OFFLINE, payload => {
90
+ for (let i = 0; i < this.usersOnline.length; i++) {
91
+ console.log(this.usersOnline[i].userId + " === " + payload.userId);
92
+ if (this.usersOnline[i].userId === payload.userId) {
93
+ this.usersOnline.splice(i, 1);
94
+ }
93
95
  }
94
- }
95
- _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_OFFLINE, {
96
- socket: this.socket,
97
- payload: payload
96
+ _VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_OFFLINE, {
97
+ socket: this.socket,
98
+ payload: payload
99
+ });
98
100
  });
99
101
  });
100
- };
102
+ _defineProperty(this, "leaveMeeting", meetingId => {
103
+ if (this.socket) {
104
+ this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
105
+ userId: _ApplicationManager.default.getUserDetails().username,
106
+ meetingId: meetingId
107
+ }).catch(error => {});
108
+ }
109
+ _ApplicationManager.default.setHasActiveMeeting(false);
110
+ });
111
+ _defineProperty(this, "endSession", meetingId => {
112
+ if (this.socket) {
113
+ this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
114
+ userId: _ApplicationManager.default.getUserDetails().username,
115
+ meetingId: meetingId
116
+ }).then(() => {
117
+ this.emitEvent(_VCEventType.VCEventType.END_SESSION, {
118
+ userId: _ApplicationManager.default.getUserDetails().username,
119
+ meetingId: meetingId
120
+ }).catch(error => {});
121
+ }).catch(error => {});
122
+ }
123
+ _ApplicationManager.default.setHasActiveMeeting(false);
124
+ });
125
+ this.usersOnline = [];
126
+ }
101
127
  registerOnline() {
102
128
  let userDetails = _ApplicationManager.default.getUserDetails();
103
129
  // TODO : Resolve the hardcoding
@@ -119,29 +145,6 @@ class SocketManager {
119
145
  console.log(exp);
120
146
  });
121
147
  }
122
- leaveMeeting = meetingId => {
123
- if (this.socket) {
124
- this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
125
- userId: _ApplicationManager.default.getUserDetails().username,
126
- meetingId: meetingId
127
- }).catch(error => {});
128
- }
129
- _ApplicationManager.default.setHasActiveMeeting(false);
130
- };
131
- endSession = meetingId => {
132
- if (this.socket) {
133
- this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
134
- userId: _ApplicationManager.default.getUserDetails().username,
135
- meetingId: meetingId
136
- }).then(() => {
137
- this.emitEvent(_VCEventType.VCEventType.END_SESSION, {
138
- userId: _ApplicationManager.default.getUserDetails().username,
139
- meetingId: meetingId
140
- }).catch(error => {});
141
- }).catch(error => {});
142
- }
143
- _ApplicationManager.default.setHasActiveMeeting(false);
144
- };
145
148
  createEvent() {
146
149
  let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
147
150
  return new _Event.default({