@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,97 +4,41 @@ 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 _reactstrap = require("reactstrap");
13
-
14
10
  var _Icon = _interopRequireDefault(require("../components/Icon"));
15
-
16
11
  var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
17
-
18
12
  var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
19
-
20
13
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
21
-
22
14
  var _RestUtils = require("../RestUtils");
23
-
24
15
  var _RouteActionHandler = _interopRequireDefault(require("../event/RouteActionHandler"));
25
-
26
16
  var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
27
-
28
17
  var _Event = _interopRequireDefault(require("../event/Event"));
29
-
30
18
  var _Observable = _interopRequireDefault(require("../event/Observable"));
31
-
32
19
  var _EventType = _interopRequireDefault(require("../event/EventType"));
33
-
34
20
  var _AlertBar = _interopRequireDefault(require("../components/AlertBar"));
35
-
36
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
-
38
- 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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
39
-
40
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
-
42
- 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."); }
43
-
44
- 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); }
45
-
46
- 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; }
47
-
48
- 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; }
49
-
50
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
-
52
- var location = window.location.protocol + '//' + window.location.hostname;
53
-
54
- var text = function text(response) {
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ const location = window.location.protocol + '//' + window.location.hostname;
23
+ const text = response => {
55
24
  return response.text();
56
25
  };
57
-
58
- var alertBarHandle = {};
59
-
60
- var DashboardCard = function DashboardCard(props) {
61
- var _React$useState = _react.default.useState(null),
62
- _React$useState2 = _slicedToArray(_React$useState, 2),
63
- path = _React$useState2[0],
64
- setPath = _React$useState2[1];
65
-
66
- var _React$useState3 = _react.default.useState(null),
67
- _React$useState4 = _slicedToArray(_React$useState3, 2),
68
- name = _React$useState4[0],
69
- setName = _React$useState4[1];
70
-
71
- var _React$useState5 = _react.default.useState(null),
72
- _React$useState6 = _slicedToArray(_React$useState5, 2),
73
- displayType = _React$useState6[0],
74
- setDisplayType = _React$useState6[1];
75
-
76
- var settings = props.settings;
77
-
78
- var _React$useState7 = _react.default.useState(props.settings.id),
79
- _React$useState8 = _slicedToArray(_React$useState7, 2),
80
- id = _React$useState8[0],
81
- setId = _React$useState8[1];
82
-
83
- var _React$useState9 = _react.default.useState(null),
84
- _React$useState10 = _slicedToArray(_React$useState9, 2),
85
- content = _React$useState10[0],
86
- setContent = _React$useState10[1];
87
-
88
- var _React$useState11 = _react.default.useState( /*#__PURE__*/_react.default.createRef()),
89
- _React$useState12 = _slicedToArray(_React$useState11, 1),
90
- ref = _React$useState12[0];
91
-
92
- _react.default.useEffect(function () {
93
- var accessToken = sessionStorage.getItem('accessToken');
94
- var idToken = sessionStorage.getItem('idToken');
95
-
26
+ const alertBarHandle = {};
27
+ const DashboardCard = props => {
28
+ const [path, setPath] = _react.default.useState(null);
29
+ const [name, setName] = _react.default.useState(null);
30
+ const [displayType, setDisplayType] = _react.default.useState(null);
31
+ const {
32
+ settings
33
+ } = props;
34
+ const [id, setId] = _react.default.useState(props.settings.id);
35
+ const [content, setContent] = _react.default.useState(null);
36
+ const [ref] = _react.default.useState( /*#__PURE__*/_react.default.createRef());
37
+ _react.default.useEffect(() => {
38
+ const accessToken = sessionStorage.getItem('accessToken');
39
+ const idToken = sessionStorage.getItem('idToken');
96
40
  if (path) {
97
- var fetchConfig = {
41
+ let fetchConfig = {
98
42
  method: 'GET',
99
43
  headers: {
100
44
  'Content-Type': 'text/html',
@@ -103,6 +47,7 @@ var DashboardCard = function DashboardCard(props) {
103
47
  'idToken': idToken
104
48
  }
105
49
  };
50
+
106
51
  /*trackPromise(
107
52
  fetch(encodeURI(path), fetchConfig)
108
53
  .then(text)
@@ -115,81 +60,71 @@ var DashboardCard = function DashboardCard(props) {
115
60
  );*/
116
61
  }
117
62
  }, [path]);
118
-
119
- _react.default.useEffect(function () {
63
+ _react.default.useEffect(() => {
120
64
  if (!path) {
121
65
  // TODO: Make the base URL dynamic
122
- var url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/dashboard/get?version=1.0&id=' + settings.path;
123
- (0, _RestUtils.sendRequest)(url, function (data) {
124
- var defaultDisplayType = !_Utils.default.isNull(settings.parameters.displayType) ? settings.parameters.displayType : data.defaultDisplayType;
125
-
66
+ let url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/dashboard/get?version=1.0&id=' + settings.path;
67
+ (0, _RestUtils.sendRequest)(url, data => {
68
+ let defaultDisplayType = !_Utils.default.isNull(settings.parameters.displayType) ? settings.parameters.displayType : data.defaultDisplayType;
126
69
  if (_Utils.default.isNull(defaultDisplayType)) {
127
70
  console.error('Could not determine display type for dashboard');
128
71
  return;
129
72
  }
130
-
131
73
  setDisplayType(defaultDisplayType);
132
- var defaultName = !_Utils.default.isNull(settings.parameters.dashboardName) ? settings.parameters.dashboardName : data.defaultDashboardName;
133
-
74
+ let defaultName = !_Utils.default.isNull(settings.parameters.dashboardName) ? settings.parameters.dashboardName : data.defaultDashboardName;
134
75
  if (_Utils.default.isNull(defaultDisplayType)) {
135
76
  console.error('Could not determine a default name for dashboard');
136
77
  return;
137
78
  }
138
-
139
79
  setName(defaultName);
140
- var accessToken = sessionStorage.getItem('accessToken');
141
- var idToken = sessionStorage.getItem('idToken');
142
- setPath(location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + data.contentPath + "-".concat(defaultDisplayType.toLowerCase(), ".html&access_token=").concat(accessToken, "&idToken=").concat(idToken));
143
- }, function (e) {
80
+ const accessToken = sessionStorage.getItem('accessToken');
81
+ const idToken = sessionStorage.getItem('idToken');
82
+ setPath(location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + data.contentPath + `-${defaultDisplayType.toLowerCase()}.html&access_token=${accessToken}&idToken=${idToken}`);
83
+ }, e => {
144
84
  console.error(e);
145
85
  });
146
86
  }
147
87
  }, []);
148
-
149
- var saveDashboard = function saveDashboard() {
88
+ const saveDashboard = () => {
150
89
  settings.parameters.displayType = displayType;
151
90
  settings.parameters.dashboardName = name;
152
- var data = {
91
+ let data = {
153
92
  id: settings.id,
154
93
  path: settings.path,
155
94
  parameters: settings.parameters
156
95
  };
157
- var url = "".concat(location + _ApplicationManager.default.getContextRoot(), "/system/api/v1/user/dashboard/save");
158
- (0, _RestUtils.postData)(url, function (response) {
96
+ let url = `${location + _ApplicationManager.default.getContextRoot()}/system/api/v1/user/dashboard/save`;
97
+ (0, _RestUtils.postData)(url, response => {
159
98
  settings.id = response;
160
99
  setId(response);
161
100
  displayAlert('SUCCESS', 'Dashboard saved successfully');
162
- }, function (e) {
101
+ }, e => {
163
102
  console.log(e);
164
103
  displayAlert('ERROR', _Utils.default.SYSTEM_ERROR_MESSAGE);
165
104
  }, true, data);
166
105
  };
167
-
168
- var displayAlert = function displayAlert(messageType, messageText) {
169
- var message = {
106
+ const displayAlert = (messageType, messageText) => {
107
+ let message = {
170
108
  messageType: messageType,
171
109
  message: messageText
172
110
  };
173
- var event = new _Event.default(_ApplicationManager.default, '_sys_dashboard', message);
174
-
111
+ let event = new _Event.default(_ApplicationManager.default, '_sys_dashboard', message);
175
112
  _Observable.default.fireEvent(_EventType.default.MESSAGE_ARRIVED, event);
176
113
  };
177
-
178
- var deleteDashboard = function deleteDashboard() {
114
+ const deleteDashboard = () => {
179
115
  if (!_Utils.default.isNull(settings) && !_Utils.default.isNull(settings.id)) {
180
- _ApplicationManager.default.openConfirmDialog('Are you sure you want to delete this dashboard?', function (result) {
116
+ _ApplicationManager.default.openConfirmDialog('Are you sure you want to delete this dashboard?', result => {
181
117
  if (result === true) {
182
- var url = "".concat(location + _ApplicationManager.default.getContextRoot(), "/system/api/v1/user/dashboard/delete/").concat(settings.id);
183
- (0, _RestUtils.sendRequest)(url, function () {
118
+ let url = `${location + _ApplicationManager.default.getContextRoot()}/system/api/v1/user/dashboard/delete/${settings.id}`;
119
+ (0, _RestUtils.sendRequest)(url, () => {
184
120
  props.onDelete();
185
- }, function (e) {
121
+ }, e => {
186
122
  console.log(e);
187
123
  });
188
124
  }
189
125
  });
190
126
  }
191
127
  };
192
-
193
128
  return /*#__PURE__*/_react.default.createElement(_Paper.default, {
194
129
  style: {
195
130
  minWidth: '200px',
@@ -229,13 +164,12 @@ var DashboardCard = function DashboardCard(props) {
229
164
  tag: "ul"
230
165
  },
231
166
  /*#__PURE__*/
232
-
233
167
  /*Disable this button if id is already saved. After creating dashboard properties such as filters, this button must remain enabled at all times*/
234
168
  _react.default.createElement(_reactstrap.NavLink, {
235
169
  tag: "li"
236
170
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
237
171
  className: "nav-item",
238
- onClick: function onClick() {
172
+ onClick: () => {
239
173
  saveDashboard();
240
174
  },
241
175
  disabled: !_Utils.default.isNull(id)
@@ -243,7 +177,7 @@ var DashboardCard = function DashboardCard(props) {
243
177
  tag: "li"
244
178
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
245
179
  className: "nav-item",
246
- onClick: function onClick() {
180
+ onClick: () => {
247
181
  deleteDashboard();
248
182
  },
249
183
  disabled: _Utils.default.isNull(id)
@@ -273,24 +207,14 @@ var DashboardCard = function DashboardCard(props) {
273
207
  }
274
208
  }) : /*#__PURE__*/_react.default.createElement("p", null, "Loading...")));
275
209
  };
276
-
277
- var WorkFlowCard = function WorkFlowCard(props) {
278
- var _React$useState13 = _react.default.useState(null),
279
- _React$useState14 = _slicedToArray(_React$useState13, 2),
280
- sp = _React$useState14[0],
281
- setSp = _React$useState14[1];
282
-
283
- var _React$useState15 = _react.default.useState(null),
284
- _React$useState16 = _slicedToArray(_React$useState15, 2),
285
- minW = _React$useState16[0],
286
- setMinW = _React$useState16[1];
287
-
288
- var routeAction = {
210
+ const WorkFlowCard = props => {
211
+ const [sp, setSp] = _react.default.useState(null);
212
+ const [minW, setMinW] = _react.default.useState(null);
213
+ const routeAction = {
289
214
  'actionType': 'route',
290
215
  'parent': true
291
216
  };
292
-
293
- _react.default.useEffect(function () {
217
+ _react.default.useEffect(() => {
294
218
  if (window.innerWidth < 400) {
295
219
  setSp(16);
296
220
  setMinW(280);
@@ -299,10 +223,9 @@ var WorkFlowCard = function WorkFlowCard(props) {
299
223
  setMinW(300);
300
224
  }
301
225
  }, []);
302
-
303
226
  return _Utils.default.isNull(sp) || _Utils.default.isNull(minW) ? null : /*#__PURE__*/_react.default.createElement(_Paper.default, {
304
227
  style: {
305
- minWidth: "".concat(minW, "px"),
228
+ minWidth: `${minW}px`,
306
229
  margin: props.margin,
307
230
  height: '152px'
308
231
  },
@@ -316,19 +239,19 @@ var WorkFlowCard = function WorkFlowCard(props) {
316
239
  }
317
240
  }, /*#__PURE__*/_react.default.createElement("div", {
318
241
  style: {
319
- padding: "16px ".concat(sp, "px 16px ").concat(sp, "px"),
242
+ padding: `16px ${sp}px 16px ${sp}px`,
320
243
  height: '8px',
321
244
  color: 'rgba(0, 0, 0, 0.54)'
322
245
  }
323
246
  }, "Work Items"), /*#__PURE__*/_react.default.createElement("div", {
324
247
  style: {
325
- padding: "16px ".concat(sp, "px 48px ").concat(sp, "px"),
248
+ padding: `16px ${sp}px 48px ${sp}px`,
326
249
  height: '0',
327
250
  fontSize: '20px'
328
251
  }
329
252
  }, props.title), /*#__PURE__*/_react.default.createElement("div", {
330
253
  style: {
331
- padding: "0 ".concat(sp, "px 16px ").concat(sp, "px"),
254
+ padding: `0 ${sp}px 16px ${sp}px`,
332
255
  fontSize: '30px'
333
256
  }
334
257
  }, props.itemCount)), /*#__PURE__*/_react.default.createElement("div", {
@@ -341,114 +264,66 @@ var WorkFlowCard = function WorkFlowCard(props) {
341
264
  color: 'primary',
342
265
  size: "large",
343
266
  disabled: parseFloat(props.itemCount) === 0,
344
- onClick: function onClick() {
267
+ onClick: () => {
345
268
  routeAction.path = props.path;
346
-
347
269
  _RouteActionHandler.default.execute(routeAction, null, props.viewRef, '_sys_dashboard');
348
270
  }
349
271
  }, "View"))));
350
272
  };
351
-
352
- var Dashboard = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
353
- var _React$useState17 = _react.default.useState(!_Utils.default.isNull(_ApplicationManager.default.getDashboardSettings().userDashboards) ? _ApplicationManager.default.getDashboardSettings().userDashboards : []),
354
- _React$useState18 = _slicedToArray(_React$useState17, 1),
355
- userDashboards = _React$useState18[0];
356
-
357
- var _React$useState19 = _react.default.useState(_ApplicationManager.default.getDashboardSettings()),
358
- _React$useState20 = _slicedToArray(_React$useState19, 1),
359
- settings = _React$useState20[0];
360
-
361
- var _React$useState21 = _react.default.useState(null),
362
- _React$useState22 = _slicedToArray(_React$useState21, 2),
363
- taskSummary = _React$useState22[0],
364
- setTaskSummary = _React$useState22[1];
365
-
366
- var _React$useState23 = _react.default.useState(null),
367
- _React$useState24 = _slicedToArray(_React$useState23, 2),
368
- menuItems = _React$useState24[0],
369
- setMenuItems = _React$useState24[1];
370
-
371
- var _React$useState25 = _react.default.useState(null),
372
- _React$useState26 = _slicedToArray(_React$useState25, 2),
373
- cardRows = _React$useState26[0],
374
- setCardRows = _React$useState26[1];
375
-
376
- var _React$useState27 = _react.default.useState(null),
377
- _React$useState28 = _slicedToArray(_React$useState27, 2),
378
- cardsPerRow = _React$useState28[0],
379
- setCardsPerRow = _React$useState28[1];
380
-
381
- var dashboardCardCounter = 0;
382
- var keyCounter = 0;
383
- var api = {
273
+ const Dashboard = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
274
+ const [userDashboards] = _react.default.useState(!_Utils.default.isNull(_ApplicationManager.default.getDashboardSettings().userDashboards) ? _ApplicationManager.default.getDashboardSettings().userDashboards : []);
275
+ const [settings] = _react.default.useState(_ApplicationManager.default.getDashboardSettings());
276
+ const [taskSummary, setTaskSummary] = _react.default.useState(null);
277
+ const [menuItems, setMenuItems] = _react.default.useState(null);
278
+ const [cardRows, setCardRows] = _react.default.useState(null);
279
+ const [cardsPerRow, setCardsPerRow] = _react.default.useState(null);
280
+ let dashboardCardCounter = 0;
281
+ let keyCounter = 0;
282
+ const api = {
384
283
  get id() {
385
284
  return '_sys_dashboard';
386
285
  },
387
-
388
- getChildren: function getChildren() {
286
+ getChildren: () => {
389
287
  return [alertBarHandle];
390
288
  },
391
- getChild: function getChild(id) {
289
+ getChild: id => {
392
290
  if (id === 'dashboardAlert') {
393
291
  return alertBarHandle;
394
292
  }
395
-
396
293
  return null;
397
294
  }
398
295
  };
399
- var handle = {
296
+ const handle = {
400
297
  'api': api
401
298
  };
402
-
403
299
  function setupCardRows(exclusion, defaultCardsPerRow) {
404
- var row = null;
405
- var gridRows = [];
300
+ let row = null;
301
+ let gridRows = [];
406
302
  dashboardCardCounter = 0;
407
- var i = cardsPerRow ? cardsPerRow : defaultCardsPerRow;
408
-
409
- var _iterator = _createForOfIteratorHelper(userDashboards),
410
- _step;
411
-
412
- try {
413
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
414
- var userDashboard = _step.value;
415
-
416
- if (dashboardCardCounter++ % i === 0) {
417
- row = [];
418
- gridRows.push(row);
419
- }
420
-
421
- if (userDashboard !== exclusion) {
422
- row.push(userDashboard);
423
- }
303
+ let i = cardsPerRow ? cardsPerRow : defaultCardsPerRow;
304
+ for (const userDashboard of userDashboards) {
305
+ if (dashboardCardCounter++ % i === 0) {
306
+ row = [];
307
+ gridRows.push(row);
308
+ }
309
+ if (userDashboard !== exclusion) {
310
+ row.push(userDashboard);
424
311
  }
425
- } catch (err) {
426
- _iterator.e(err);
427
- } finally {
428
- _iterator.f();
429
312
  }
430
-
431
- var populatedRows = [];
432
-
433
- for (var _i2 = 0, _gridRows = gridRows; _i2 < _gridRows.length; _i2++) {
434
- var gridRow = _gridRows[_i2];
435
-
313
+ let populatedRows = [];
314
+ for (const gridRow of gridRows) {
436
315
  if (gridRow.length > 0) {
437
316
  populatedRows.push(gridRow);
438
317
  }
439
318
  }
440
-
441
- for (var _i3 = 0, _populatedRows = populatedRows; _i3 < _populatedRows.length; _i3++) {
442
- var _gridRow = _populatedRows[_i3];
443
- _gridRow[0].first = true;
319
+ for (const gridRow of populatedRows) {
320
+ gridRow[0].first = true;
444
321
  }
445
-
446
322
  setCardRows(populatedRows);
447
323
  }
448
-
449
- var getDashboardMenu = function getDashboardMenu(path) {
450
- return new Promise(function (resolve) {
451
- var service = {
324
+ const getDashboardMenu = path => {
325
+ return new Promise(resolve => {
326
+ let service = {
452
327
  url: '/ui/api/v1/menu/get',
453
328
  parameters: [{
454
329
  name: 'id',
@@ -466,117 +341,82 @@ var Dashboard = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
466
341
  get id() {
467
342
  return 'dashboard-menus';
468
343
  }
469
-
470
344
  }
471
- }, 'dashboard-menus', function (result) {
345
+ }, 'dashboard-menus', result => {
472
346
  resolve(result.menus);
473
- }, function (e) {
347
+ }, e => {
474
348
  console.error(e);
475
349
  resolve(null);
476
350
  }, null);
477
351
  });
478
352
  };
479
-
480
- _react.default.useEffect(function () {
353
+ _react.default.useEffect(() => {
481
354
  /*let rpcConfig = {
482
355
  "type": "rpc",
483
356
  "procedureName": "getWorkFlowSummary",
484
357
  "serviceId": "BPM.WorkFlow"
485
358
  };*/
486
- var cardsPerRow = 2;
487
359
 
360
+ let cardsPerRow = 2;
488
361
  if (window.innerWidth < 400) {
489
362
  cardsPerRow = 1;
490
363
  }
491
-
492
364
  setCardsPerRow(cardsPerRow);
493
-
494
365
  if (_Utils.default.isNull(taskSummary)) {
495
- (0, _RestUtils.sendRequest)("".concat(location + _ApplicationManager.default.getContextRoot(), "/bpm/api/v1/summary"), function (result) {
366
+ (0, _RestUtils.sendRequest)(`${location + _ApplicationManager.default.getContextRoot()}/bpm/api/v1/summary`, result => {
496
367
  if (!_Utils.default.isNull(result)) {
497
368
  setTaskSummary(result);
498
369
  }
499
- }, function (e) {
500
- console.error(e); // TODO : Show error message
370
+ }, e => {
371
+ console.error(e);
372
+ // TODO : Show error message
501
373
  }, true, true);
502
374
  }
503
-
504
- (0, _RestUtils.sendRequest)("".concat(location + _ApplicationManager.default.getContextRoot(), "/system/api/v1/user/dashboard/list"), function (dashboards) {
375
+ (0, _RestUtils.sendRequest)(`${location + _ApplicationManager.default.getContextRoot()}/system/api/v1/user/dashboard/list`, dashboards => {
505
376
  if (!_Utils.default.isNull(dashboards)) {
506
- var _iterator2 = _createForOfIteratorHelper(dashboards),
507
- _step2;
508
-
509
- try {
510
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
511
- var dashboard = _step2.value;
512
- userDashboards.push(dashboard);
513
- }
514
- } catch (err) {
515
- _iterator2.e(err);
516
- } finally {
517
- _iterator2.f();
377
+ for (const dashboard of dashboards) {
378
+ userDashboards.push(dashboard);
518
379
  }
519
-
520
380
  setupCardRows(null, cardsPerRow);
521
381
  }
522
- }, function (e) {
523
- console.error(e); // TODO : Show error message
382
+ }, e => {
383
+ console.error(e);
384
+ // TODO : Show error message
524
385
  }, true, true);
525
-
526
386
  if (_Utils.default.isNull(menuItems) && !_Utils.default.isNull(settings.systemProfileDto.modules)) {
527
- (function () {
528
- var dashboardMenuitems = [];
529
-
530
- for (var i = 0; i < settings.systemProfileDto.modules.length; i++) {
531
- var module = settings.systemProfileDto.modules[i];
532
-
533
- if (!_Utils.default.isNull(module.dashboardMenu)) {
534
- getDashboardMenu(module.dashboardMenu).then(function (menus) {
535
- if (menus) {
536
- for (var j = 0; j < menus.length; j++) {
537
- var menu = menus[j];
538
-
539
- var _iterator3 = _createForOfIteratorHelper(menu.items),
540
- _step3;
541
-
542
- try {
543
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
544
- var item = _step3.value;
545
- dashboardMenuitems.push(item);
546
- }
547
- } catch (err) {
548
- _iterator3.e(err);
549
- } finally {
550
- _iterator3.f();
551
- }
387
+ let dashboardMenuitems = [];
388
+ for (let i = 0; i < settings.systemProfileDto.modules.length; i++) {
389
+ let module = settings.systemProfileDto.modules[i];
390
+ if (!_Utils.default.isNull(module.dashboardMenu)) {
391
+ getDashboardMenu(module.dashboardMenu).then(menus => {
392
+ if (menus) {
393
+ for (let j = 0; j < menus.length; j++) {
394
+ let menu = menus[j];
395
+ for (const item of menu.items) {
396
+ dashboardMenuitems.push(item);
552
397
  }
553
398
  }
554
- }).catch(function (e) {});
555
- }
399
+ }
400
+ }).catch(e => {});
556
401
  }
557
-
558
- setMenuItems(dashboardMenuitems);
559
- })();
402
+ }
403
+ setMenuItems(dashboardMenuitems);
560
404
  }
561
-
562
405
  if (!_Utils.default.isNull(settings) && !_Utils.default.isNull(userDashboards) && _Utils.default.isNull(cardRows) && !_Utils.default.isNull(cardsPerRow)) {
563
406
  setupCardRows();
564
407
  }
565
-
566
408
  _ApplicationManager.default.setDashboardView({
567
409
  handle: handle
568
410
  });
569
411
  }, []);
570
-
571
- var addDashboardCard = function addDashboardCard(item) {
572
- var path = item.eventHandlingConfig.subscriptions[0].actions[0].path;
573
- var settings = {};
412
+ const addDashboardCard = item => {
413
+ let path = item.eventHandlingConfig.subscriptions[0].actions[0].path;
414
+ let settings = {};
574
415
  settings.path = path;
575
416
  settings.parameters = {};
576
417
  userDashboards.push(settings);
577
418
  setupCardRows();
578
419
  };
579
-
580
420
  return /*#__PURE__*/_react.default.createElement("div", {
581
421
  ref: ref,
582
422
  style: {
@@ -609,17 +449,15 @@ var Dashboard = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
609
449
  className: "dropdown-navbar",
610
450
  right: true,
611
451
  tag: "ul"
612
- }, menuItems.map(function (item) {
613
- return /*#__PURE__*/_react.default.createElement(_reactstrap.NavLink, {
614
- tag: "li",
615
- key: keyCounter++
616
- }, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
617
- className: "nav-item",
618
- onClick: function onClick() {
619
- addDashboardCard(item);
620
- }
621
- }, item.attributes.label, ' '), ' ');
622
- })) : null), ' ')), /*#__PURE__*/_react.default.createElement("div", {
452
+ }, menuItems.map(item => /*#__PURE__*/_react.default.createElement(_reactstrap.NavLink, {
453
+ tag: "li",
454
+ key: keyCounter++
455
+ }, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
456
+ className: "nav-item",
457
+ onClick: () => {
458
+ addDashboardCard(item);
459
+ }
460
+ }, item.attributes.label, ' '), ' '))) : null), ' ')), /*#__PURE__*/_react.default.createElement("div", {
623
461
  style: {
624
462
  overflowY: 'auto',
625
463
  overflowX: 'hidden',
@@ -655,27 +493,21 @@ var Dashboard = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
655
493
  title: 'Due Today',
656
494
  itemCount: taskSummary.dueTodayItemCount,
657
495
  path: '/workflow/due-today-work-items.json'
658
- })), /*#__PURE__*/_react.default.createElement("div", null, !_Utils.default.isNull(cardRows) ? cardRows.map(function (row) {
659
- return /*#__PURE__*/_react.default.createElement("div", {
660
- className: 'row',
661
- style: {
662
- margin: '0 0 16px 0'
663
- },
664
- key: keyCounter++
665
- }, row.map(function (userDashboard) {
666
- return /*#__PURE__*/_react.default.createElement(DashboardCard, {
667
- settings: userDashboard,
668
- index: dashboardCardCounter,
669
- key: dashboardCardCounter++,
670
- onDelete: function onDelete() {
671
- userDashboards.splice(userDashboards.indexOf(userDashboard), 1);
672
- console.log("\n\n\n\nUD : ", userDashboards);
673
- setupCardRows(userDashboard);
674
- }
675
- });
676
- }));
677
- }) : null))));
496
+ })), /*#__PURE__*/_react.default.createElement("div", null, !_Utils.default.isNull(cardRows) ? cardRows.map(row => /*#__PURE__*/_react.default.createElement("div", {
497
+ className: 'row',
498
+ style: {
499
+ margin: '0 0 16px 0'
500
+ },
501
+ key: keyCounter++
502
+ }, row.map(userDashboard => /*#__PURE__*/_react.default.createElement(DashboardCard, {
503
+ settings: userDashboard,
504
+ index: dashboardCardCounter,
505
+ key: dashboardCardCounter++,
506
+ onDelete: () => {
507
+ userDashboards.splice(userDashboards.indexOf(userDashboard), 1);
508
+ console.log("\n\n\n\nUD : ", userDashboards);
509
+ setupCardRows(userDashboard);
510
+ }
511
+ })))) : null))));
678
512
  }));
679
-
680
- var _default = Dashboard;
681
- exports.default = _default;
513
+ var _default = exports.default = Dashboard;