@agilemotion/oui-react-js 1.3.7 → 1.3.9

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 (214) hide show
  1. package/README.TXT +1 -0
  2. package/dist/ApplicationContext.js +161 -284
  3. package/dist/BasicApp.js +1 -1
  4. package/dist/BasicAppHome.js +17 -4
  5. package/dist/BusinessPortalApp.js +4 -4
  6. package/dist/BusinessPortalAppHome.js +10 -39
  7. package/dist/DynamicJS.js +20 -52
  8. package/dist/RestUtils.js +86 -111
  9. package/dist/Utils.js +36 -30
  10. package/dist/assets/jss/components/authNavbarStyle.js +34 -35
  11. package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
  12. package/dist/assets/jss/components/customDropdownStyle.js +26 -26
  13. package/dist/assets/jss/components/customInputStyle.js +2 -8
  14. package/dist/assets/jss/components/dropdownStyle.js +10 -15
  15. package/dist/assets/jss/components/footerStyle.js +12 -18
  16. package/dist/assets/jss/components/headerLinksStyle.js +7 -13
  17. package/dist/assets/jss/components/headerStyle.js +24 -25
  18. package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
  19. package/dist/assets/jss/components/navbarStyle.js +24 -25
  20. package/dist/assets/jss/components/sidebarStyle.js +41 -43
  21. package/dist/assets/jss/components/typographyStyle.js +2 -8
  22. package/dist/assets/jss/rootStyle.js +32 -47
  23. package/dist/assets/jss/views/layoutStyle.js +6 -11
  24. package/dist/assets/jss/views/loginStyle.js +4 -10
  25. package/dist/assets/lotties/call-loading.json +1 -0
  26. package/dist/assets/lotties/calling-2.json +1 -0
  27. package/dist/assets/lotties/calling.json +1 -0
  28. package/dist/assets/lotties/calling2.json +1 -0
  29. package/dist/assets/lotties/chat.json +1 -0
  30. package/dist/assets/lotties/join.json +1 -0
  31. package/dist/assets/lotties/loading.json +1 -0
  32. package/dist/assets/lotties/msg2.json +1 -0
  33. package/dist/assets/lotties/recording.json +1 -0
  34. package/dist/assets/lotties/waiting.json +1 -0
  35. package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
  36. package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
  37. package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
  38. package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
  39. package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
  40. package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
  41. package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
  42. package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
  43. package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
  44. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
  45. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
  46. package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
  47. package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
  48. package/dist/components/AlertBar.js +39 -80
  49. package/dist/components/AlertItem.js +4 -26
  50. package/dist/components/Button.js +24 -36
  51. package/dist/components/Calendar.js +478 -0
  52. package/dist/components/Calender.css +244 -0
  53. package/dist/components/ConfirmationDialog.js +5 -29
  54. package/dist/components/DataGrid.js +169 -338
  55. package/dist/components/DataGridColumn.js +5 -28
  56. package/dist/components/DataGridFilter.js +46 -114
  57. package/dist/components/DataGridHeading.js +11 -19
  58. package/dist/components/Dialog.js +27 -121
  59. package/dist/components/DocumentViewer.js +15 -35
  60. package/dist/components/DocumentViewerComponent.js +2 -20
  61. package/dist/components/FileThumb.js +115 -0
  62. package/dist/components/Graph.js +25 -75
  63. package/dist/components/GraphNode.js +4 -21
  64. package/dist/components/HtmlPanel.js +59 -78
  65. package/dist/components/Icon.js +99 -1
  66. package/dist/components/LoadingIndicator.js +4 -4
  67. package/dist/components/LottieIcon.js +134 -0
  68. package/dist/components/PopupView.js +2 -20
  69. package/dist/components/RegularButton.js +15 -19
  70. package/dist/components/SignaturePanel.js +9 -40
  71. package/dist/components/SocketManager.js +170 -0
  72. package/dist/components/StepperTitleBar.js +30 -56
  73. package/dist/components/TabPage.js +6 -9
  74. package/dist/components/TabPanel.js +41 -98
  75. package/dist/components/TableCellContent.js +30 -38
  76. package/dist/components/TemplateDesigner.css +0 -1
  77. package/dist/components/TemplateDesigner.js +107 -151
  78. package/dist/components/TemplateItemEventHandler.js +33 -100
  79. package/dist/components/TemplateTable.js +6 -42
  80. package/dist/components/TitleBar.js +35 -52
  81. package/dist/components/Toolbar.js +33 -179
  82. package/dist/components/Tree.js +27 -64
  83. package/dist/components/card/Card.js +16 -20
  84. package/dist/components/card/CardAvatar.js +9 -13
  85. package/dist/components/card/CardBody.js +13 -17
  86. package/dist/components/card/CardFooter.js +12 -16
  87. package/dist/components/card/CardHeader.js +13 -17
  88. package/dist/components/card/CardIcon.js +6 -10
  89. package/dist/components/card/CardText.js +6 -10
  90. package/dist/components/customInput/CustomInput.js +12 -10
  91. package/dist/components/dashboard/BasicBusinessAppDashboard.js +81 -158
  92. package/dist/components/dashboard/BusinessPortalAppDashboard.js +33 -79
  93. package/dist/components/dashboard/components/Header.js +8 -25
  94. package/dist/components/dashboard/components/LeftDrawer.js +3 -1
  95. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
  96. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +143 -36
  97. package/dist/components/footer/Footer.js +6 -18
  98. package/dist/components/form/AddressSearch.js +32 -66
  99. package/dist/components/form/AutoComplete.js +160 -0
  100. package/dist/components/form/BaseField.js +66 -96
  101. package/dist/components/form/DatePicker.js +3 -21
  102. package/dist/components/form/FieldSet.js +158 -180
  103. package/dist/components/form/Form.css +1 -1
  104. package/dist/components/form/Form.js +137 -471
  105. package/dist/components/form/GridField.js +46 -146
  106. package/dist/components/form/IconField.js +35 -0
  107. package/dist/components/form/ImageEditor.js +19 -57
  108. package/dist/components/form/LookupField.js +8 -29
  109. package/dist/components/form/MultiFileUploadField.js +186 -0
  110. package/dist/components/form/RadioGroup.js +1 -16
  111. package/dist/components/form/Section.js +31 -92
  112. package/dist/components/form/SelectItem.js +14 -33
  113. package/dist/components/form/SignatureTemplateDesignerField.js +4 -2
  114. package/dist/components/form/Switch.js +53 -0
  115. package/dist/components/form/TextField.js +10 -17
  116. package/dist/components/form/TimePicker.js +7 -1
  117. package/dist/components/form/TransferList.css +2 -2
  118. package/dist/components/form/TransferList.js +67 -125
  119. package/dist/components/form/UploadField.js +27 -79
  120. package/dist/components/form/fieldset.css +8 -0
  121. package/dist/components/grid/GridContainer.js +5 -9
  122. package/dist/components/grid/GridItem.js +5 -9
  123. package/dist/components/layout/CollapsiblePanel.js +11 -33
  124. package/dist/components/layout/Layout.js +175 -290
  125. package/dist/components/layout/VC.css +17 -0
  126. package/dist/components/layout/View.css +17 -1
  127. package/dist/components/layout/View.js +77 -194
  128. package/dist/components/loader.css +1 -1
  129. package/dist/components/media/ClosablePanel.css +37 -0
  130. package/dist/components/media/ClosablePanel.js +53 -0
  131. package/dist/components/media/LobbyWaitingList.js +91 -0
  132. package/dist/components/media/MediaSoupHelper.js +223 -0
  133. package/dist/components/media/Recorder.js +235 -0
  134. package/dist/components/media/SideBarContent.css +54 -0
  135. package/dist/components/media/SideBarContent.js +46 -0
  136. package/dist/components/media/SocketRequest.js +20 -0
  137. package/dist/components/media/SocketResponse.js +16 -0
  138. package/dist/components/media/Timer.css +30 -0
  139. package/dist/components/media/Timer.js +88 -0
  140. package/dist/components/media/Toolbar.css +20 -0
  141. package/dist/components/media/Toolbar.js +470 -0
  142. package/dist/components/media/Tracks.js +39 -0
  143. package/dist/components/media/TrainingRoom.js +531 -0
  144. package/dist/components/media/Transports.js +35 -0
  145. package/dist/components/media/VCEventManager.js +74 -0
  146. package/dist/components/media/VCEventType.js +164 -0
  147. package/dist/components/media/VCParticipantList.css +72 -0
  148. package/dist/components/media/VCParticipantList.js +56 -0
  149. package/dist/components/media/VCParticipantListItem.css +73 -0
  150. package/dist/components/media/VCParticipantListItem.js +319 -0
  151. package/dist/components/media/VCRoom.css +42 -0
  152. package/dist/components/media/VCRoom.js +90 -0
  153. package/dist/components/media/VCRoomParticipant.css +25 -0
  154. package/dist/components/media/VCRoomParticipant.js +806 -0
  155. package/dist/components/media/VCRoomWorkspace.css +86 -0
  156. package/dist/components/media/VCRoomWorkspace.js +653 -0
  157. package/dist/components/media/Video.css +4 -0
  158. package/dist/components/media/Video.js +131 -0
  159. package/dist/components/media/chat/ChatRoom.js +926 -0
  160. package/dist/components/media/chat/ChatRoomItem.js +83 -0
  161. package/dist/components/media/chat/ChatRoomList.js +78 -0
  162. package/dist/components/media/chat/ChatRooms.scss +567 -0
  163. package/dist/components/menu/CollapsibleMenu.js +2 -19
  164. package/dist/components/menu/MenuBars.js +6 -33
  165. package/dist/components/menu/MenuButton.js +7 -35
  166. package/dist/components/menu/MenuItem.js +3 -20
  167. package/dist/components/menu/MenuLink.js +18 -12
  168. package/dist/components/navbars/AuthNavbar.js +5 -18
  169. package/dist/components/navbars/HomeNavbar.js +3 -5
  170. package/dist/components/navbars/PortalNavbar.js +4 -22
  171. package/dist/components/signatures/AgilitySignaturePanel.js +35 -101
  172. package/dist/components/signatures/AlertItem.js +3 -24
  173. package/dist/components/signatures/DocumentContainer.js +47 -135
  174. package/dist/components/signatures/ImageSignatureInput.js +8 -35
  175. package/dist/components/signatures/MenuButton.js +1 -16
  176. package/dist/components/signatures/Prompt.js +3 -24
  177. package/dist/components/signatures/ResponsiveTable.js +75 -96
  178. package/dist/components/signatures/SearchView.js +14 -50
  179. package/dist/components/signatures/SignatorySearch.js +83 -98
  180. package/dist/components/signatures/SignatorySearchForm.js +11 -17
  181. package/dist/components/signatures/SignatureInput.js +15 -44
  182. package/dist/components/signatures/SignatureInputProps.js +20 -60
  183. package/dist/components/signatures/SignatureTemplateDesigner.js +148 -235
  184. package/dist/components/signatures/Toolbar.js +7 -34
  185. package/dist/components/signatures/ViewUtils.js +2 -6
  186. package/dist/components/typography/Danger.js +3 -1
  187. package/dist/components/typography/Info.js +3 -1
  188. package/dist/components/typography/Link.js +6 -2
  189. package/dist/event/ActionHandlers.js +3 -3
  190. package/dist/event/EventType.js +7 -1
  191. package/dist/event/LoadDataActionHandler.js +1 -1
  192. package/dist/event/Observable.js +56 -168
  193. package/dist/event/RouteActionHandler.js +45 -11
  194. package/dist/event/ServiceCallActionHandler.js +34 -24
  195. package/dist/js/Addresses.js +10 -8
  196. package/dist/js/Media.js +157 -0
  197. package/dist/redux/store/ConfigureStore.js +3 -9
  198. package/dist/redux/store/DashboardStore.js +42 -94
  199. package/dist/redux/store/SecurityStore.js +15 -50
  200. package/dist/view/Dashboard.js +242 -163
  201. package/dist/view/security/ChangePasswordBasic.js +23 -76
  202. package/dist/view/security/ForgotPassword.js +9 -42
  203. package/dist/view/security/ForgotPasswordBasic.js +8 -41
  204. package/dist/view/security/Login.js +11 -47
  205. package/dist/view/security/LoginBasic.js +8 -41
  206. package/dist/view/security/LoginBusinessPortal.js +8 -41
  207. package/dist/view/security/ResetPassword.js +9 -47
  208. package/dist/view/security/ResetPasswordBasic.js +21 -71
  209. package/dist/view/security/Security.js +1 -0
  210. package/package.json +29 -13
  211. package/README.md +0 -1623
  212. package/dist/components/dashboard/BasicApp.js +0 -140
  213. package/dist/components/navbars/NavbarLinks.js +0 -212
  214. package/dist/components/signatures/OLD.js +0 -1138
@@ -13,30 +13,12 @@ var _Utils = _interopRequireDefault(require("../Utils"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
-
18
- 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."); }
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 _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; }
25
-
26
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
-
28
16
  _reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
29
17
 
30
18
  const DocumentViewerComponent = props => {
31
- const _React$useState = _react.default.useState(1),
32
- _React$useState2 = _slicedToArray(_React$useState, 2),
33
- pageNumber = _React$useState2[0],
34
- setPageNumber = _React$useState2[1];
19
+ const [pageNumber, setPageNumber] = _react.default.useState(1);
35
20
 
36
- const _React$useState3 = _react.default.useState(null),
37
- _React$useState4 = _slicedToArray(_React$useState3, 2),
38
- numPages = _React$useState4[0],
39
- setNumPages = _React$useState4[1];
21
+ const [numPages, setNumPages] = _react.default.useState(null);
40
22
 
41
23
  const onDocumentLoadSuccess = ({
42
24
  numPages
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
11
+
12
+ var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
13
+
14
+ var _Icon = _interopRequireDefault(require("./Icon"));
15
+
16
+ var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
+
22
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ const location = window.location.protocol + "//" + window.location.hostname;
25
+
26
+ const FileThumb = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
27
+ const [downloadUrl] = (0, _react.useState)(location + _ApplicationContext.default.getContextRoot() + '/docs/api/v1/manager/download/' + props.file.repositoryId + '?access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken"));
28
+
29
+ _react.default.useEffect(() => {}, []);
30
+
31
+ const isImage = () => {
32
+ return props.file.type.startsWith('image/');
33
+ };
34
+
35
+ const getThumbImage = () => {
36
+ return props.file.type === 'application/pdf' ? 'pdf-icon.png' : props.file.type === 'application/msword' ? 'doc.png' : props.file.type.startsWith('video/') ? 'media.png' : props.file.type.startsWith('audio/') ? 'media.png' : props.file.type === 'application/zip' ? 'zip.png' : props.file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ? 'doc.png' : props.file.type === 'application/vnd.ms-excel' ? 'excel.png' : props.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ? 'excel.png' : props.file.type === 'application/vnd.ms-powerpoint' ? 'powerpoint.png' : 'default-file-thumb.png';
37
+ };
38
+
39
+ return /*#__PURE__*/_react.default.createElement("div", {
40
+ className: 'row',
41
+ style: {
42
+ width: '128px',
43
+ height: '128px',
44
+ display: 'flex',
45
+ alignItems: 'center',
46
+ justifyContent: 'center',
47
+ borderRadius: '4px',
48
+ margin: '4px',
49
+ marginLeft: 0,
50
+ marginRight: 0,
51
+ border: '1px solid #aaa'
52
+ }
53
+ }, /*#__PURE__*/_react.default.createElement("div", {
54
+ className: 'row',
55
+ style: {
56
+ width: '100%',
57
+ height: '20%',
58
+ marginLeft: '4px',
59
+ marginRight: '4px'
60
+ }
61
+ }, /*#__PURE__*/_react.default.createElement("div", {
62
+ style: {
63
+ width: "10%"
64
+ }
65
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
66
+ "aria-controls": "menu-list-grow",
67
+ "aria-haspopup": "true",
68
+ style: {
69
+ width: "8px",
70
+ height: "8px"
71
+ },
72
+ onClick: () => props.onDelete(props.file)
73
+ }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
74
+ id: 'DELETE'
75
+ }))), /*#__PURE__*/_react.default.createElement("div", {
76
+ style: {
77
+ overflow: "hidden",
78
+ textOverflow: "ellipsis",
79
+ marginLeft: '10px',
80
+ marginTop: '2px',
81
+ whiteSpace: "nowrap"
82
+ },
83
+ className: 'col'
84
+ }, props.file.repositoryId ? /*#__PURE__*/_react.default.createElement("a", {
85
+ style: {
86
+ cursor: 'pointer'
87
+ },
88
+ target: "_blank",
89
+ href: "".concat(downloadUrl)
90
+ }, props.file.name) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.file.name))), /*#__PURE__*/_react.default.createElement("div", {
91
+ className: 'row',
92
+ style: {
93
+ width: '98%',
94
+ height: '70%',
95
+ marginLeft: 0,
96
+ marginRight: 0
97
+ }
98
+ }, /*#__PURE__*/_react.default.createElement(_Button.default, {
99
+ variant: "contained",
100
+ component: "span",
101
+ disabled: true,
102
+ style: {
103
+ width: '100%',
104
+ height: '100%',
105
+ backgroundRepeat: 'no-repeat',
106
+ backgroundSize: 'contain',
107
+ backgroundPosition: 'center',
108
+ backgroundColor: 'transparent',
109
+ backgroundImage: isImage() ? "url(".concat(props.file.repositoryId ? downloadUrl : props.file.payload, ")") : "url(".concat(require('../../assets/img/' + getThumbImage()), ")")
110
+ }
111
+ })));
112
+ }));
113
+
114
+ var _default = FileThumb;
115
+ exports.default = _default;
@@ -15,12 +15,6 @@ var _Utils = _interopRequireDefault(require("../Utils"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
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
18
  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
19
 
26
20
  class Graph {
@@ -29,23 +23,12 @@ class Graph {
29
23
  let index = 0;
30
24
  let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
31
25
 
32
- var _iterator = _createForOfIteratorHelper(collection),
33
- _step;
34
-
35
- try {
36
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
37
- const element = _step.value;
38
-
39
- if (this.current.config.name === element.name) {
40
- return index;
41
- }
42
-
43
- index++;
26
+ for (const element of collection) {
27
+ if (this.current.config.name === element.name) {
28
+ return index;
44
29
  }
45
- } catch (err) {
46
- _iterator.e(err);
47
- } finally {
48
- _iterator.f();
30
+
31
+ index++;
49
32
  }
50
33
 
51
34
  return null;
@@ -63,29 +46,18 @@ class Graph {
63
46
  let nextNodeName = this.current.getNextNode(event);
64
47
 
65
48
  if (this.current.config.last && nextNodeName === null) {
66
- _ApplicationContext.default.removeLoadedGraph();
49
+ _ApplicationContext.default.removeLoadedGraph(true);
67
50
  } else {
68
51
  if (!_Utils.default.isNull(nextNodeName)) {
69
- var _iterator2 = _createForOfIteratorHelper(this.config.nodes),
70
- _step2;
71
-
72
- try {
73
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
74
- const node = _step2.value;
52
+ for (const node of this.config.nodes) {
53
+ if (node.name === nextNodeName) {
54
+ this.current = new _GraphNode.default(node);
55
+ this.addNodeToPath(this.current);
75
56
 
76
- if (node.name === nextNodeName) {
77
- this.current = new _GraphNode.default(node);
78
- this.addNodeToPath(this.current);
57
+ _ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
79
58
 
80
- _ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
81
-
82
- break;
83
- }
59
+ break;
84
60
  }
85
- } catch (err) {
86
- _iterator2.e(err);
87
- } finally {
88
- _iterator2.f();
89
61
  }
90
62
  }
91
63
 
@@ -126,38 +98,18 @@ class Graph {
126
98
  let index = 0;
127
99
 
128
100
  if (this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC") {
129
- var _iterator3 = _createForOfIteratorHelper(this.path),
130
- _step3;
131
-
132
- try {
133
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
134
- const pathElement = _step3.value;
135
- let stackItem = {};
136
- stackItem.title = pathElement.title;
137
- stackItem.index = index++;
138
- titleStack.push(stackItem);
139
- }
140
- } catch (err) {
141
- _iterator3.e(err);
142
- } finally {
143
- _iterator3.f();
101
+ for (const pathElement of this.path) {
102
+ let stackItem = {};
103
+ stackItem.title = pathElement.title;
104
+ stackItem.index = index++;
105
+ titleStack.push(stackItem);
144
106
  }
145
107
  } else {
146
- var _iterator4 = _createForOfIteratorHelper(this.config.nodes),
147
- _step4;
148
-
149
- try {
150
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
151
- const node = _step4.value;
152
- let stackItem = {};
153
- stackItem.title = node.title;
154
- stackItem.index = index++;
155
- titleStack.push(stackItem);
156
- }
157
- } catch (err) {
158
- _iterator4.e(err);
159
- } finally {
160
- _iterator4.f();
108
+ for (const node of this.config.nodes) {
109
+ let stackItem = {};
110
+ stackItem.title = node.title;
111
+ stackItem.index = index++;
112
+ titleStack.push(stackItem);
161
113
  }
162
114
  }
163
115
 
@@ -169,13 +121,11 @@ class Graph {
169
121
  }
170
122
 
171
123
  get value() {
172
- if (_Utils.default.isNull(this.config.valueObjectType) || this.config.valueObjectType === 'MapObject') {
124
+ if (_Utils.default.isNull(this.config.valueObjectType)) {
173
125
  let value = {};
174
- value.map = {};
175
126
 
176
- for (var _i = 0, _Object$keys = Object.keys(this.modelData); _i < _Object$keys.length; _i++) {
177
- const key = _Object$keys[_i];
178
- value.map[key] = this.modelData[key];
127
+ for (const key of Object.keys(this.modelData)) {
128
+ value[key] = this.modelData[key];
179
129
  }
180
130
 
181
131
  return value;
@@ -15,12 +15,6 @@ var _Utils = _interopRequireDefault(require("./../Utils"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
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
18
  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
19
 
26
20
  class GraphNode {
@@ -60,22 +54,11 @@ class GraphNode {
60
54
  let activeEdge = null;
61
55
 
62
56
  if (!_Utils.default.isNull(this.config.edges)) {
63
- var _iterator = _createForOfIteratorHelper(this.config.edges),
64
- _step;
65
-
66
- try {
67
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
68
- const edge = _step.value;
69
-
70
- if (this.evaluateEdge(edge, event)) {
71
- activeEdge = edge;
72
- break;
73
- }
57
+ for (const edge of this.config.edges) {
58
+ if (this.evaluateEdge(edge, event)) {
59
+ activeEdge = edge;
60
+ break;
74
61
  }
75
- } catch (err) {
76
- _iterator.e(err);
77
- } finally {
78
- _iterator.f();
79
62
  }
80
63
  }
81
64
 
@@ -17,21 +17,13 @@ var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"
17
17
 
18
18
  var _reactPromiseTracker = require("react-promise-tracker");
19
19
 
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
-
24
- 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."); }
25
-
26
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
+ var _Event = _interopRequireDefault(require("../event/Event"));
27
21
 
28
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
+ var _EventType = _interopRequireDefault(require("../event/EventType"));
29
23
 
30
- 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; }
31
-
32
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
25
 
34
- const Handlebars = require("handlebars");
26
+ const Handlebars = require('handlebars');
35
27
 
36
28
  const status = response => {
37
29
  if (response.ok) {
@@ -47,86 +39,70 @@ const json = response => {
47
39
  return response.text();
48
40
  };
49
41
 
50
- const location = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port;
42
+ const location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
51
43
 
52
44
  const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
53
- const _React$useState = _react.default.useState(true),
54
- _React$useState2 = _slicedToArray(_React$useState, 2),
55
- initializing = _React$useState2[0],
56
- setInitializing = _React$useState2[1];
57
-
58
- const _React$useState3 = _react.default.useState(null),
59
- _React$useState4 = _slicedToArray(_React$useState3, 2),
60
- template = _React$useState4[0],
61
- setTemplate = _React$useState4[1];
62
-
63
- const _React$useState5 = _react.default.useState(null),
64
- _React$useState6 = _slicedToArray(_React$useState5, 2),
65
- content = _React$useState6[0],
66
- setContent = _React$useState6[1];
67
-
68
- const _React$useState7 = _react.default.useState(null),
69
- _React$useState8 = _slicedToArray(_React$useState7, 2),
70
- model = _React$useState8[0],
71
- setModel = _React$useState8[1];
72
-
73
- const _React$useState9 = _react.default.useState(_Utils.default.getComponentAttribute(props.config, 'defaultVisibility', false)),
74
- _React$useState10 = _slicedToArray(_React$useState9, 2),
75
- visible = _React$useState10[0],
76
- setVisible = _React$useState10[1];
45
+ const [template, setTemplate] = _react.default.useState(null);
46
+
47
+ const [content, setContent] = _react.default.useState(null);
48
+
49
+ const [visible, setVisible] = _react.default.useState(false);
77
50
 
78
51
  _react.default.useEffect(() => {
79
52
  props.handle.api = api();
53
+ });
80
54
 
81
- if (initializing) {
82
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
55
+ _react.default.useEffect(() => {
56
+ if (template) {
57
+ let event = new _Event.default(props.handle, props.viewId, null);
83
58
 
84
- _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
59
+ _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
60
+ }
61
+ }, [template]);
85
62
 
86
- _Observable.default.addSystemSubscriptions(parsedConfig);
63
+ _react.default.useEffect(() => {
64
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
87
65
 
88
- setInitializing(false);
66
+ _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
89
67
 
90
- if (!_Utils.default.isNull(props.loadCompleteHandler)) {
91
- props.loadCompleteHandler(props.config.id);
92
- }
68
+ _Observable.default.addSystemSubscriptions(parsedConfig);
93
69
 
94
- let configTemplate = props.config.template;
95
-
96
- if (configTemplate && configTemplate.endsWith('.html')) {
97
- let fetchConfig = {
98
- method: 'GET'
99
- };
100
- (0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data => {
101
- setTemplate(data);
102
- }).catch(e => {
103
- console.error(e);
104
- }));
105
- } else {
106
- setTemplate(configTemplate); // TODO : Process template
107
-
108
- setContent(configTemplate);
109
- }
70
+ let configTemplate = props.config.template;
110
71
 
111
- Handlebars.registerHelper({
112
- eq: (v1, v2) => v1 === v2,
113
- ne: (v1, v2) => v1 !== v2,
114
- lt: (v1, v2) => v1 < v2,
115
- gt: (v1, v2) => v1 > v2,
116
- lte: (v1, v2) => v1 <= v2,
117
- gte: (v1, v2) => v1 >= v2,
72
+ if (configTemplate && configTemplate.endsWith('.html')) {
73
+ let fetchConfig = {
74
+ method: 'GET'
75
+ };
76
+ (0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data => {
77
+ setTemplate(data);
78
+ }).catch(e => {
79
+ console.error(e);
80
+ }));
81
+ } else {
82
+ setTemplate(configTemplate); // TODO : Process template
118
83
 
119
- and() {
120
- return Array.prototype.every.call(arguments, Boolean);
121
- },
84
+ setContent(configTemplate);
85
+ }
122
86
 
123
- or() {
124
- return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
125
- }
87
+ Handlebars.registerHelper({
88
+ eq: (v1, v2) => v1 === v2,
89
+ ne: (v1, v2) => v1 !== v2,
90
+ lt: (v1, v2) => v1 < v2,
91
+ gt: (v1, v2) => v1 > v2,
92
+ lte: (v1, v2) => v1 <= v2,
93
+ gte: (v1, v2) => v1 >= v2,
126
94
 
127
- });
128
- }
129
- });
95
+ and() {
96
+ return Array.prototype.every.call(arguments, Boolean);
97
+ },
98
+
99
+ or() {
100
+ return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
101
+ }
102
+
103
+ });
104
+ props.handle.api.refresh();
105
+ }, []);
130
106
 
131
107
  const api = () => {
132
108
  return {
@@ -139,7 +115,7 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
139
115
  let data = _ApplicationContext.default.resolveExpressionValue(actionConfig.value);
140
116
 
141
117
  let templateScript = Handlebars.compile(template);
142
- setContent(templateScript(data.map ? data.map : data));
118
+ setContent(templateScript(data));
143
119
  }
144
120
  },
145
121
 
@@ -153,7 +129,12 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
153
129
 
154
130
  getChildren: () => {
155
131
  return [];
132
+ },
133
+
134
+ set visible(visible) {
135
+ setVisible(visible);
156
136
  }
137
+
157
138
  };
158
139
  };
159
140