@agilemotion/oui-react-js 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/ApplicationManager.js +675 -1044
  2. package/dist/BasicApp.js +7 -27
  3. package/dist/BasicAppHome.js +27 -101
  4. package/dist/DynamicJS.js +109 -197
  5. package/dist/InteractionPortalApp.js +7 -27
  6. package/dist/InteractionPortalAppHome.js +21 -87
  7. package/dist/InteractionPortalApp_old.js +60 -122
  8. package/dist/RestUtils.js +269 -410
  9. package/dist/TypedValue.js +20 -26
  10. package/dist/Utils.js +295 -481
  11. package/dist/WithRouter.js +9 -17
  12. package/dist/assets/jss/components/authNavbarStyle.js +168 -171
  13. package/dist/assets/jss/components/buttonStyle.js +2 -5
  14. package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
  15. package/dist/assets/jss/components/cardBodyStyle.js +2 -5
  16. package/dist/assets/jss/components/cardFooterStyle.js +2 -5
  17. package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
  18. package/dist/assets/jss/components/cardIconStyle.js +2 -5
  19. package/dist/assets/jss/components/cardStyle.js +2 -5
  20. package/dist/assets/jss/components/cardTextStyle.js +2 -5
  21. package/dist/assets/jss/components/customDropdownStyle.js +171 -173
  22. package/dist/assets/jss/components/customInputStyle.js +5 -13
  23. package/dist/assets/jss/components/dropdownStyle.js +71 -74
  24. package/dist/assets/jss/components/footerStyle.js +14 -23
  25. package/dist/assets/jss/components/headerLinksStyle.js +52 -53
  26. package/dist/assets/jss/components/headerStyle.js +68 -73
  27. package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
  28. package/dist/assets/jss/components/navbarStyle.js +79 -84
  29. package/dist/assets/jss/components/sidebarStyle.js +438 -441
  30. package/dist/assets/jss/components/typographyStyle.js +5 -13
  31. package/dist/assets/jss/rootStyle.js +85 -151
  32. package/dist/assets/jss/views/layoutStyle.js +45 -51
  33. package/dist/assets/jss/views/loginBasicStyle.js +2 -5
  34. package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
  35. package/dist/assets/jss/views/loginStyle.js +80 -87
  36. package/dist/components/AlertBar.js +20 -75
  37. package/dist/components/AlertItem.js +13 -49
  38. package/dist/components/AlertTemplate.js +12 -18
  39. package/dist/components/Button.js +41 -112
  40. package/dist/components/Calendar.js +99 -208
  41. package/dist/components/ConfirmationDialog.js +13 -54
  42. package/dist/components/DataGrid.js +271 -695
  43. package/dist/components/DataGridColumn.js +24 -74
  44. package/dist/components/DataGridFilter.js +107 -245
  45. package/dist/components/DataGridHeading.js +34 -78
  46. package/dist/components/Dialog.js +37 -130
  47. package/dist/components/DocumentTemplateDesigner.js +16 -57
  48. package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
  49. package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
  50. package/dist/components/DocumentViewer.js +25 -65
  51. package/dist/components/DocumentViewerComponent.js +13 -44
  52. package/dist/components/ElementResizeHandler.js +148 -200
  53. package/dist/components/FileThumb.js +15 -56
  54. package/dist/components/Graph.js +98 -203
  55. package/dist/components/GraphNode.js +20 -61
  56. package/dist/components/HtmlPanel.js +38 -105
  57. package/dist/components/Icon.js +174 -253
  58. package/dist/components/LoadingIndicator.js +4 -11
  59. package/dist/components/LottieIcon.js +63 -60
  60. package/dist/components/PopupView.js +21 -60
  61. package/dist/components/Portlet.js +18 -60
  62. package/dist/components/RegularButton.js +34 -42
  63. package/dist/components/SignaturePanel.js +19 -67
  64. package/dist/components/SocketManager.js +133 -228
  65. package/dist/components/StepperTitleBar.js +48 -99
  66. package/dist/components/TabPage.js +30 -47
  67. package/dist/components/TabPanel.js +35 -122
  68. package/dist/components/TableCellContent.js +34 -98
  69. package/dist/components/TemplateDesigner.js +115 -230
  70. package/dist/components/TemplateItemEventHandler.js +298 -481
  71. package/dist/components/TemplateTable.js +117 -218
  72. package/dist/components/TitleBar.js +15 -53
  73. package/dist/components/Toolbar.js +44 -110
  74. package/dist/components/Tooltip.js +37 -56
  75. package/dist/components/Tree.js +50 -143
  76. package/dist/components/UseIsVisible.js +5 -25
  77. package/dist/components/card/Card.js +35 -39
  78. package/dist/components/card/CardAvatar.js +21 -32
  79. package/dist/components/card/CardBody.js +29 -36
  80. package/dist/components/card/CardFooter.js +26 -35
  81. package/dist/components/card/CardHeader.js +29 -36
  82. package/dist/components/card/CardIcon.js +15 -29
  83. package/dist/components/card/CardText.js +15 -29
  84. package/dist/components/customInput/CustomInput.js +38 -40
  85. package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
  86. package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
  87. package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
  88. package/dist/components/dashboard/components/Header.js +15 -52
  89. package/dist/components/dashboard/components/LeftDrawer.js +9 -23
  90. package/dist/components/dashboard/components/UserIdentity.js +4 -12
  91. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
  92. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
  93. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
  94. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
  95. package/dist/components/dashboard/components/portal/Timeline.js +3 -8
  96. package/dist/components/dashboard/components/portal/Workspace.js +4 -13
  97. package/dist/components/footer/Footer.js +23 -45
  98. package/dist/components/footer/HomeFooter.js +38 -78
  99. package/dist/components/form/AddressSearch.js +26 -76
  100. package/dist/components/form/AutoComplete.js +54 -168
  101. package/dist/components/form/BaseField.js +59 -189
  102. package/dist/components/form/Checkbox.js +11 -24
  103. package/dist/components/form/DatePicker.js +28 -82
  104. package/dist/components/form/FieldSet.js +84 -300
  105. package/dist/components/form/Form.js +206 -501
  106. package/dist/components/form/GridField.js +83 -243
  107. package/dist/components/form/IconField.js +10 -21
  108. package/dist/components/form/ImageEditor.js +98 -208
  109. package/dist/components/form/LabelField.js +13 -28
  110. package/dist/components/form/LookupField.js +36 -102
  111. package/dist/components/form/MultiFileUploadField.js +67 -134
  112. package/dist/components/form/RadioGroup.js +20 -57
  113. package/dist/components/form/Section.js +33 -118
  114. package/dist/components/form/SelectItem.js +36 -83
  115. package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
  116. package/dist/components/form/Switch.js +11 -24
  117. package/dist/components/form/TextField.js +19 -55
  118. package/dist/components/form/TimePicker.js +18 -43
  119. package/dist/components/form/TransferList.js +76 -200
  120. package/dist/components/form/UploadField.js +134 -256
  121. package/dist/components/grid/GridContainer.js +10 -23
  122. package/dist/components/grid/GridItem.js +10 -23
  123. package/dist/components/layout/CollapsiblePanel.js +20 -59
  124. package/dist/components/layout/Layout.js +40 -149
  125. package/dist/components/layout/View.js +65 -195
  126. package/dist/components/layout/ViewContainer.js +13 -33
  127. package/dist/components/layout/ViewPort.js +14 -48
  128. package/dist/components/layout/Window.js +62 -135
  129. package/dist/components/layout/WindowViewPort.js +18 -63
  130. package/dist/components/media/ClosablePanel.js +9 -18
  131. package/dist/components/media/LobbyWaitingList.js +11 -17
  132. package/dist/components/media/MediaSoupHelper.js +173 -401
  133. package/dist/components/media/SideBarContent.js +17 -34
  134. package/dist/components/media/SocketRequest.js +7 -18
  135. package/dist/components/media/SocketResponse.js +5 -14
  136. package/dist/components/media/Timer.js +18 -54
  137. package/dist/components/media/Toolbar.js +97 -254
  138. package/dist/components/media/ToolbarButton.js +34 -95
  139. package/dist/components/media/Toolbar_bck.js +70 -186
  140. package/dist/components/media/Tracks.js +19 -33
  141. package/dist/components/media/TrainingRoom.js +121 -374
  142. package/dist/components/media/Transports.js +17 -29
  143. package/dist/components/media/VCEventManager.js +45 -116
  144. package/dist/components/media/VCEventType.js +82 -168
  145. package/dist/components/media/VCParticipantList.js +16 -51
  146. package/dist/components/media/VCParticipantListItem.js +44 -141
  147. package/dist/components/media/VCRoom.js +14 -58
  148. package/dist/components/media/VCRoomParticipant.js +235 -556
  149. package/dist/components/media/VCRoomRecorder.js +106 -204
  150. package/dist/components/media/VCRoomWorkspace.js +248 -584
  151. package/dist/components/media/Video.js +27 -112
  152. package/dist/components/media/VideoPlayer.js +23 -91
  153. package/dist/components/media/chat/ChatRoom.js +143 -361
  154. package/dist/components/media/chat/ChatRoomItem.js +17 -58
  155. package/dist/components/media/chat/ChatRoomList.js +15 -60
  156. package/dist/components/menu/CollapsibleMenu.js +22 -52
  157. package/dist/components/menu/MenuBars.js +50 -116
  158. package/dist/components/menu/MenuButton.js +53 -130
  159. package/dist/components/menu/MenuItem.js +11 -51
  160. package/dist/components/menu/MenuLink.js +13 -41
  161. package/dist/components/menu/PopupMenu.js +13 -25
  162. package/dist/components/navbars/AuthNavbar.js +21 -56
  163. package/dist/components/navbars/HomeNavbar.js +213 -290
  164. package/dist/components/navbars/PortalNavbar.js +26 -81
  165. package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
  166. package/dist/components/signatures/AlertItem.js +14 -50
  167. package/dist/components/signatures/Card.js +6 -16
  168. package/dist/components/signatures/DocumentContainer.js +57 -165
  169. package/dist/components/signatures/ImageSignatureInput.js +64 -124
  170. package/dist/components/signatures/MenuButton.js +28 -63
  171. package/dist/components/signatures/Prompt.js +6 -41
  172. package/dist/components/signatures/ResponsiveTable.js +181 -370
  173. package/dist/components/signatures/SearchView.js +34 -112
  174. package/dist/components/signatures/SignatorySearch.js +11 -44
  175. package/dist/components/signatures/SignatorySearchForm.js +19 -50
  176. package/dist/components/signatures/SignatureInput.js +28 -91
  177. package/dist/components/signatures/SignatureInputProps.js +49 -144
  178. package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
  179. package/dist/components/signatures/Toolbar.js +99 -173
  180. package/dist/components/signatures/ViewUtils.js +207 -313
  181. package/dist/components/typography/Danger.js +6 -11
  182. package/dist/components/typography/Info.js +7 -11
  183. package/dist/components/typography/Link.js +6 -12
  184. package/dist/event/ActionHandlers.js +48 -87
  185. package/dist/event/Event.js +21 -25
  186. package/dist/event/EventListener.js +54 -48
  187. package/dist/event/EventType.js +18 -40
  188. package/dist/event/LoadDataActionHandler.js +10 -31
  189. package/dist/event/Observable.js +204 -396
  190. package/dist/event/RouteActionHandler.js +119 -171
  191. package/dist/event/ScriptActionHandler.js +10 -32
  192. package/dist/event/ServiceCallActionHandler.js +37 -64
  193. package/dist/event/SignalGraphActionHandler.js +9 -31
  194. package/dist/js/Addresses.js +23 -42
  195. package/dist/js/Calendar.js +41 -89
  196. package/dist/js/DynamicLib.js +11 -23
  197. package/dist/js/Media.js +80 -174
  198. package/dist/js/Validators.js +6 -12
  199. package/dist/js/Windows.js +22 -40
  200. package/dist/redux/store/ConfigureStore.js +12 -29
  201. package/dist/redux/store/DashboardStore.js +47 -120
  202. package/dist/redux/store/History.js +2 -5
  203. package/dist/redux/store/SecurityStore.js +22 -65
  204. package/dist/security/TokenManager.js +29 -53
  205. package/dist/theme-default.js +3 -8
  206. package/dist/view/Dashboard.js +140 -308
  207. package/dist/view/PortalDashboard.js +6 -13
  208. package/dist/view/Settings.js +3 -11
  209. package/dist/view/Views.js +15 -35
  210. package/dist/view/security/ChangePasswordBasic.js +41 -147
  211. package/dist/view/security/ForgotPassword.js +26 -106
  212. package/dist/view/security/ForgotPasswordBasic.js +22 -96
  213. package/dist/view/security/Login.js +29 -117
  214. package/dist/view/security/LoginBasic.js +28 -108
  215. package/dist/view/security/LoginInteractionPortal.js +28 -106
  216. package/dist/view/security/ResetPassword.js +25 -110
  217. package/dist/view/security/ResetPasswordBasic.js +39 -142
  218. package/dist/view/security/Security.js +14 -26
  219. package/package.json +26 -21
@@ -4,224 +4,119 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
9
-
10
8
  var _ActionHandlers = _interopRequireDefault(require("../event/ActionHandlers"));
11
-
12
9
  var _GraphNode = _interopRequireDefault(require("./GraphNode"));
13
-
14
10
  var _Utils = _interopRequireDefault(require("../Utils"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- 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; } } }; }
19
-
20
- 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); }
21
-
22
- 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; }
23
-
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
- 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); } }
27
-
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
29
-
30
- 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; }
31
-
32
- var Graph = /*#__PURE__*/function () {
33
- function Graph(config) {
34
- var _this = this;
35
-
36
- _classCallCheck(this, Graph);
37
-
38
- _defineProperty(this, "getCurrentNodeIndex", function () {
39
- var index = 0;
40
- var collection = _this.config.stepperMode === null || _this.config.stepperMode === "DYNAMIC" ? _this.path : _this.config.nodes;
41
-
42
- var _iterator = _createForOfIteratorHelper(collection),
43
- _step;
44
-
45
- try {
46
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
47
- var element = _step.value;
48
-
49
- if (_this.current.config.name === element.name) {
50
- return index;
51
- }
52
-
53
- index++;
54
- }
55
- } catch (err) {
56
- _iterator.e(err);
57
- } finally {
58
- _iterator.f();
59
- }
60
-
61
- return null;
62
- });
63
-
64
- _defineProperty(this, "init", function () {
65
- var root = _this.config.nodes[0];
66
- _this.current = new _GraphNode.default(_this.config.nodes[0]);
67
-
68
- _this.addNodeToPath(_this.current);
69
-
70
- if (root.action.actionType === 'route') {
71
- root.action.window = _this.config.isWindow;
72
- }
73
-
74
- _ActionHandlers.default.invokeHandler(root.action, null, null, _this.config.id);
75
- });
76
-
77
- _defineProperty(this, "signal", function (event) {
78
- var nextNodeName = _this.current.getNextNode(event);
79
-
80
- if (_this.current.config.last && nextNodeName === null) {
81
- _ApplicationManager.default.removeLoadedGraph(true);
82
- } else {
83
- if (!_Utils.default.isNull(nextNodeName)) {
84
- var _iterator2 = _createForOfIteratorHelper(_this.config.nodes),
85
- _step2;
86
-
87
- try {
88
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
89
- var node = _step2.value;
90
-
91
- if (node.name === nextNodeName) {
92
- _this.current = new _GraphNode.default(node);
93
-
94
- _this.addNodeToPath(_this.current);
95
-
96
- if (node.action.actionType === 'route') {
97
- node.action.window = _this.config.isWindow;
98
- }
99
-
100
- _ActionHandlers.default.invokeHandler(node.action, null, null, _this.config.id);
101
-
102
- break;
103
- }
104
- }
105
- } catch (err) {
106
- _iterator2.e(err);
107
- } finally {
108
- _iterator2.f();
109
- }
110
- }
111
-
112
- if (_this.current === null) {
113
- console.error("Node name could not be found : " + nextNodeName);
114
- }
115
- }
116
- });
117
-
118
- _defineProperty(this, "setCurrentNodeTitle", function (title) {
119
- if (_this.current !== null) {
120
- _this.current.title = title;
121
- }
122
- });
123
-
124
- _defineProperty(this, "addNodeToPath", function (node) {
125
- if (_this.path.length === 0) {
126
- _this.path.push(node);
127
- } else {
128
- var lastNode = _this.path[_this.path.length - 1];
129
-
130
- if (lastNode.config.name === node.config.name) {
131
- _this.path.pop();
132
- } else {
133
- _this.path.push(node);
134
- }
135
- }
136
- });
137
-
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ class Graph {
13
+ constructor(config) {
138
14
  this.config = config;
139
15
  this.modelData = {};
140
16
  this.current = null;
141
17
  this.path = [];
142
18
  }
143
-
144
- _createClass(Graph, [{
145
- key: "getTitleStack",
146
- value: function getTitleStack() {
147
- var titleStack = [];
148
- var index = 0;
149
-
150
- if (this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC") {
151
- var _iterator3 = _createForOfIteratorHelper(this.path),
152
- _step3;
153
-
154
- try {
155
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
156
- var pathElement = _step3.value;
157
- var stackItem = {};
158
- stackItem.title = pathElement.title;
159
- stackItem.index = index++;
160
- titleStack.push(stackItem);
161
- }
162
- } catch (err) {
163
- _iterator3.e(err);
164
- } finally {
165
- _iterator3.f();
166
- }
167
- } else {
168
- var _iterator4 = _createForOfIteratorHelper(this.config.nodes),
169
- _step4;
170
-
171
- try {
172
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
173
- var node = _step4.value;
174
- var _stackItem = {};
175
- _stackItem.title = node.title;
176
- _stackItem.index = index++;
177
- titleStack.push(_stackItem);
178
- }
179
- } catch (err) {
180
- _iterator4.e(err);
181
- } finally {
182
- _iterator4.f();
183
- }
19
+ getTitleStack() {
20
+ let titleStack = [];
21
+ let index = 0;
22
+ if (this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC") {
23
+ for (const pathElement of this.path) {
24
+ let stackItem = {};
25
+ stackItem.title = pathElement.title;
26
+ stackItem.index = index++;
27
+ titleStack.push(stackItem);
28
+ }
29
+ } else {
30
+ for (const node of this.config.nodes) {
31
+ let stackItem = {};
32
+ stackItem.title = node.title;
33
+ stackItem.index = index++;
34
+ titleStack.push(stackItem);
184
35
  }
185
-
186
- return titleStack;
187
36
  }
188
- }, {
189
- key: "title",
190
- get: function get() {
191
- return this.config.title;
37
+ return titleStack;
38
+ }
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++;
192
47
  }
193
- }, {
194
- key: "value",
195
- get: function get() {
196
- if (_Utils.default.isNull(this.config.valueObjectType)) {
197
- var value = {};
198
-
199
- for (var _i = 0, _Object$keys = Object.keys(this.modelData); _i < _Object$keys.length; _i++) {
200
- var key = _Object$keys[_i];
201
- value[key] = this.modelData[key];
48
+ return null;
49
+ };
50
+ get title() {
51
+ return this.config.title;
52
+ }
53
+ init = () => {
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
+ }
60
+ _ActionHandlers.default.invokeHandler(root.action, null, null, this.config.id);
61
+ };
62
+ signal = event => {
63
+ let nextNodeName = this.current.getNextNode(event);
64
+ if (this.current.config.last && nextNodeName === null) {
65
+ _ApplicationManager.default.removeLoadedGraph(true);
66
+ } else {
67
+ if (!_Utils.default.isNull(nextNodeName)) {
68
+ for (const node of this.config.nodes) {
69
+ if (node.name === nextNodeName) {
70
+ this.current = new _GraphNode.default(node);
71
+ this.addNodeToPath(this.current);
72
+ if (node.action.actionType === 'route') {
73
+ node.action.window = this.config.isWindow;
74
+ }
75
+ _ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
76
+ break;
77
+ }
202
78
  }
203
-
204
- return value;
205
79
  }
206
-
207
- return this.modelData;
80
+ if (this.current === null) {
81
+ console.error("Node name could not be found : " + nextNodeName);
82
+ }
208
83
  }
209
- }, {
210
- key: "model",
211
- get: function get() {
212
- return this.modelData;
213
- },
214
- set: function set(model) {
215
- this.modelData = model;
84
+ };
85
+ setCurrentNodeTitle = title => {
86
+ if (this.current !== null) {
87
+ this.current.title = title;
216
88
  }
217
- }, {
218
- key: "id",
219
- get: function get() {
220
- return this.config.id;
89
+ };
90
+ addNodeToPath = node => {
91
+ if (this.path.length === 0) {
92
+ this.path.push(node);
93
+ } else {
94
+ let lastNode = this.path[this.path.length - 1];
95
+ if (lastNode.config.name === node.config.name) {
96
+ this.path.pop();
97
+ } else {
98
+ this.path.push(node);
99
+ }
221
100
  }
222
- }]);
223
-
224
- return Graph;
225
- }();
226
-
101
+ };
102
+ get value() {
103
+ if (_Utils.default.isNull(this.config.valueObjectType)) {
104
+ let value = {};
105
+ for (const key of Object.keys(this.modelData)) {
106
+ value[key] = this.modelData[key];
107
+ }
108
+ return value;
109
+ }
110
+ return this.modelData;
111
+ }
112
+ get model() {
113
+ return this.modelData;
114
+ }
115
+ set model(model) {
116
+ this.modelData = model;
117
+ }
118
+ get id() {
119
+ return this.config.id;
120
+ }
121
+ }
227
122
  exports.default = Graph;
@@ -4,94 +4,53 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
9
-
10
8
  var _ActionHandlers = _interopRequireDefault(require("../event/ActionHandlers"));
11
-
12
9
  var _DynamicJS = _interopRequireDefault(require("./../DynamicJS"));
13
-
14
10
  var _Utils = _interopRequireDefault(require("./../Utils"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _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; } } }; }
19
-
20
- 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); }
21
-
22
- 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; }
23
-
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
- 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; }
27
-
28
- var GraphNode = function GraphNode(config) {
29
- var _this = this;
30
-
31
- _classCallCheck(this, GraphNode);
32
-
33
- _defineProperty(this, "evaluateEdge", function (edge, event) {
34
- var totalEdgeCount = _this.config.edges.length;
35
-
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ class GraphNode {
13
+ constructor(config) {
14
+ this.config = config;
15
+ }
16
+ evaluateEdge = (edge, event) => {
17
+ let totalEdgeCount = this.config.edges.length;
36
18
  if (_Utils.default.isNull(edge.condition) && totalEdgeCount === 0) {
37
19
  return true;
38
20
  }
39
-
40
21
  if (_Utils.default.isNull(edge.condition) && totalEdgeCount > 0) {
41
22
  console.error("Missing required condition for link : " + JSON.stringify(edge));
42
23
  return false;
43
24
  }
44
-
45
25
  if (!_Utils.default.isNull(edge.condition)) {
46
- var eventSource = edge.condition.eventSource;
47
- var expression = edge.condition.expression;
48
-
26
+ let eventSource = edge.condition.eventSource;
27
+ let expression = edge.condition.expression;
49
28
  if (_Utils.default.isNull(eventSource) && _Utils.default.isNull(expression)) {
50
29
  console.error("Empty condition for link : " + JSON.stringify(edge));
51
30
  return false;
52
31
  }
53
-
54
- var sourceId = event.source.api.id;
55
-
32
+ let sourceId = event.source.api.id;
56
33
  if (totalEdgeCount === 0) {
57
34
  return (_Utils.default.isNull(eventSource) || sourceId === eventSource) && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
58
35
  } else {
59
36
  return sourceId === eventSource && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
60
37
  }
61
38
  }
62
- });
63
-
64
- _defineProperty(this, "getNextNode", function (event) {
65
- var activeEdge = null;
66
-
67
- if (!_Utils.default.isNull(_this.config.edges)) {
68
- var _iterator = _createForOfIteratorHelper(_this.config.edges),
69
- _step;
70
-
71
- try {
72
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
73
- var edge = _step.value;
74
-
75
- if (_this.evaluateEdge(edge, event)) {
76
- activeEdge = edge;
77
- break;
78
- }
39
+ };
40
+ getNextNode = event => {
41
+ let activeEdge = null;
42
+ if (!_Utils.default.isNull(this.config.edges)) {
43
+ for (const edge of this.config.edges) {
44
+ if (this.evaluateEdge(edge, event)) {
45
+ activeEdge = edge;
46
+ break;
79
47
  }
80
- } catch (err) {
81
- _iterator.e(err);
82
- } finally {
83
- _iterator.f();
84
48
  }
85
49
  }
86
-
87
50
  if (activeEdge !== null) {
88
51
  return activeEdge.targetNodeName;
89
52
  }
90
-
91
53
  return null;
92
- });
93
-
94
- this.config = config;
95
- };
96
-
54
+ };
55
+ }
97
56
  exports.default = GraphNode;
@@ -4,173 +4,108 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _Utils = _interopRequireDefault(require("../Utils"));
11
-
12
9
  var _reactHtmlRenderer = _interopRequireDefault(require("react-html-renderer"));
13
-
14
10
  var _Observable = _interopRequireDefault(require("../event/Observable"));
15
-
16
11
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
17
-
18
12
  var _reactPromiseTracker = require("react-promise-tracker");
19
-
20
13
  var _Event = _interopRequireDefault(require("../event/Event"));
21
-
22
14
  var _EventType = _interopRequireDefault(require("../event/EventType"));
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
28
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
-
30
- 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); }
31
-
32
- 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; }
33
-
34
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- var Handlebars = require('handlebars');
39
-
40
- var status = function status(response) {
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const Handlebars = require('handlebars');
17
+ const status = response => {
41
18
  if (response.ok) {
42
19
  return Promise.resolve(response);
43
20
  } else {
44
- var error = new Error(response.statusText);
21
+ let error = new Error(response.statusText);
45
22
  error.code = response.status;
46
23
  return Promise.reject(error);
47
24
  }
48
25
  };
49
-
50
- var json = function json(response) {
26
+ const json = response => {
51
27
  return response.text();
52
28
  };
53
-
54
- var location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
55
-
56
- var HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
57
- var _React$useState = _react.default.useState(null),
58
- _React$useState2 = _slicedToArray(_React$useState, 2),
59
- template = _React$useState2[0],
60
- setTemplate = _React$useState2[1];
61
-
62
- var _React$useState3 = _react.default.useState(null),
63
- _React$useState4 = _slicedToArray(_React$useState3, 2),
64
- content = _React$useState4[0],
65
- setContent = _React$useState4[1];
66
-
67
- var _React$useState5 = _react.default.useState(false),
68
- _React$useState6 = _slicedToArray(_React$useState5, 2),
69
- visible = _React$useState6[0],
70
- setVisible = _React$useState6[1];
71
-
72
- _react.default.useEffect(function () {
29
+ const location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
30
+ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
31
+ const [template, setTemplate] = _react.default.useState(null);
32
+ const [content, setContent] = _react.default.useState(null);
33
+ const [visible, setVisible] = _react.default.useState(false);
34
+ _react.default.useEffect(() => {
73
35
  props.handle.api = api();
74
36
  });
75
-
76
- _react.default.useEffect(function () {
37
+ _react.default.useEffect(() => {
77
38
  if (template) {
78
- var event = new _Event.default(props.handle, props.viewId, null);
79
-
39
+ let event = new _Event.default(props.handle, props.viewId, null);
80
40
  _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
81
41
  }
82
42
  }, [template]);
83
-
84
- _react.default.useEffect(function () {
85
- var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
86
-
43
+ _react.default.useEffect(() => {
44
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
87
45
  _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
88
-
89
46
  _Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
90
-
91
- var configTemplate = props.config.template;
92
-
47
+ let configTemplate = props.config.template;
93
48
  if (configTemplate && configTemplate.endsWith('.html')) {
94
- var fetchConfig = {
49
+ let fetchConfig = {
95
50
  method: 'GET'
96
51
  };
97
- (0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(function (data) {
52
+ (0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data => {
98
53
  setTemplate(data);
99
- }).catch(function (e) {
54
+ }).catch(e => {
100
55
  console.error(e);
101
56
  }));
102
57
  } else {
103
- setTemplate(configTemplate); // TODO : Process template
104
-
58
+ setTemplate(configTemplate);
59
+ // TODO : Process template
105
60
  setContent(configTemplate);
106
61
  }
107
-
108
62
  Handlebars.registerHelper({
109
- eq: function eq(v1, v2) {
110
- return v1 === v2;
111
- },
112
- ne: function ne(v1, v2) {
113
- return v1 !== v2;
114
- },
115
- lt: function lt(v1, v2) {
116
- return v1 < v2;
117
- },
118
- gt: function gt(v1, v2) {
119
- return v1 > v2;
120
- },
121
- lte: function lte(v1, v2) {
122
- return v1 <= v2;
123
- },
124
- gte: function gte(v1, v2) {
125
- return v1 >= v2;
126
- },
127
- and: function and() {
63
+ eq: (v1, v2) => v1 === v2,
64
+ ne: (v1, v2) => v1 !== v2,
65
+ lt: (v1, v2) => v1 < v2,
66
+ gt: (v1, v2) => v1 > v2,
67
+ lte: (v1, v2) => v1 <= v2,
68
+ gte: (v1, v2) => v1 >= v2,
69
+ and() {
128
70
  return Array.prototype.every.call(arguments, Boolean);
129
71
  },
130
- or: function or() {
72
+ or() {
131
73
  return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
132
74
  }
133
75
  });
134
76
  props.handle.api.refresh();
135
- return function () {
77
+ return () => {
136
78
  _Observable.default.clearComponentEventListeners(props.handle);
137
79
  };
138
80
  }, []);
139
-
140
- var api = function api() {
81
+ const api = () => {
141
82
  return {
142
83
  get id() {
143
84
  return props.config.id;
144
85
  },
145
-
146
- loadData: function loadData(actionConfig) {
86
+ loadData: actionConfig => {
147
87
  if (actionConfig && actionConfig.value) {
148
- var data = _ApplicationManager.default.resolveExpressionValue(actionConfig.value);
149
-
150
- var templateScript = Handlebars.compile(template);
88
+ let data = _ApplicationManager.default.resolveExpressionValue(actionConfig.value);
89
+ let templateScript = Handlebars.compile(template);
151
90
  setContent(templateScript(data));
152
91
  }
153
92
  },
154
- refresh: function refresh() {
155
- var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
156
-
93
+ refresh() {
94
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
157
95
  if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(parsedConfig.visible)) {
158
96
  setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
159
97
  } else {
160
98
  setVisible(true);
161
99
  }
162
100
  },
163
- getChildren: function getChildren() {
101
+ getChildren: () => {
164
102
  return [];
165
103
  },
166
-
167
104
  set visible(visible) {
168
105
  setVisible(visible);
169
106
  }
170
-
171
107
  };
172
108
  };
173
-
174
109
  return /*#__PURE__*/_react.default.createElement("div", {
175
110
  ref: ref,
176
111
  style: {
@@ -180,6 +115,4 @@ var HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
180
115
  html: content
181
116
  }) : null);
182
117
  }));
183
-
184
- var _default = HtmlPanel;
185
- exports.default = _default;
118
+ var _default = exports.default = HtmlPanel;