@agilemotion/oui-react-js 1.3.8 → 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 (213) 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 +1 -1
  6. package/dist/BusinessPortalAppHome.js +10 -39
  7. package/dist/DynamicJS.js +20 -52
  8. package/dist/RestUtils.js +83 -108
  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 +8 -34
  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.js +107 -151
  77. package/dist/components/TemplateItemEventHandler.js +33 -100
  78. package/dist/components/TemplateTable.js +6 -42
  79. package/dist/components/TitleBar.js +35 -52
  80. package/dist/components/Toolbar.js +33 -179
  81. package/dist/components/Tree.js +27 -64
  82. package/dist/components/card/Card.js +16 -20
  83. package/dist/components/card/CardAvatar.js +9 -13
  84. package/dist/components/card/CardBody.js +13 -17
  85. package/dist/components/card/CardFooter.js +12 -16
  86. package/dist/components/card/CardHeader.js +13 -17
  87. package/dist/components/card/CardIcon.js +6 -10
  88. package/dist/components/card/CardText.js +6 -10
  89. package/dist/components/customInput/CustomInput.js +12 -10
  90. package/dist/components/dashboard/BasicBusinessAppDashboard.js +79 -155
  91. package/dist/components/dashboard/BusinessPortalAppDashboard.js +30 -75
  92. package/dist/components/dashboard/components/Header.js +8 -25
  93. package/dist/components/dashboard/components/LeftDrawer.js +3 -1
  94. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
  95. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +138 -30
  96. package/dist/components/footer/Footer.js +6 -18
  97. package/dist/components/form/AddressSearch.js +32 -66
  98. package/dist/components/form/AutoComplete.js +160 -0
  99. package/dist/components/form/BaseField.js +66 -96
  100. package/dist/components/form/DatePicker.js +3 -21
  101. package/dist/components/form/FieldSet.js +158 -180
  102. package/dist/components/form/Form.css +1 -1
  103. package/dist/components/form/Form.js +137 -471
  104. package/dist/components/form/GridField.js +46 -146
  105. package/dist/components/form/IconField.js +35 -0
  106. package/dist/components/form/ImageEditor.js +19 -57
  107. package/dist/components/form/LookupField.js +8 -29
  108. package/dist/components/form/MultiFileUploadField.js +186 -0
  109. package/dist/components/form/RadioGroup.js +1 -16
  110. package/dist/components/form/Section.js +31 -92
  111. package/dist/components/form/SelectItem.js +14 -33
  112. package/dist/components/form/SignatureTemplateDesignerField.js +0 -1
  113. package/dist/components/form/Switch.js +53 -0
  114. package/dist/components/form/TextField.js +10 -17
  115. package/dist/components/form/TimePicker.js +7 -1
  116. package/dist/components/form/TransferList.css +2 -2
  117. package/dist/components/form/TransferList.js +67 -125
  118. package/dist/components/form/UploadField.js +27 -79
  119. package/dist/components/form/fieldset.css +8 -0
  120. package/dist/components/grid/GridContainer.js +5 -9
  121. package/dist/components/grid/GridItem.js +5 -9
  122. package/dist/components/layout/CollapsiblePanel.js +11 -33
  123. package/dist/components/layout/Layout.js +175 -290
  124. package/dist/components/layout/VC.css +17 -0
  125. package/dist/components/layout/View.css +17 -1
  126. package/dist/components/layout/View.js +77 -194
  127. package/dist/components/loader.css +1 -1
  128. package/dist/components/media/ClosablePanel.css +37 -0
  129. package/dist/components/media/ClosablePanel.js +53 -0
  130. package/dist/components/media/LobbyWaitingList.js +91 -0
  131. package/dist/components/media/MediaSoupHelper.js +223 -0
  132. package/dist/components/media/Recorder.js +235 -0
  133. package/dist/components/media/SideBarContent.css +54 -0
  134. package/dist/components/media/SideBarContent.js +46 -0
  135. package/dist/components/media/SocketRequest.js +20 -0
  136. package/dist/components/media/SocketResponse.js +16 -0
  137. package/dist/components/media/Timer.css +30 -0
  138. package/dist/components/media/Timer.js +88 -0
  139. package/dist/components/media/Toolbar.css +20 -0
  140. package/dist/components/media/Toolbar.js +470 -0
  141. package/dist/components/media/Tracks.js +39 -0
  142. package/dist/components/media/TrainingRoom.js +531 -0
  143. package/dist/components/media/Transports.js +35 -0
  144. package/dist/components/media/VCEventManager.js +74 -0
  145. package/dist/components/media/VCEventType.js +164 -0
  146. package/dist/components/media/VCParticipantList.css +72 -0
  147. package/dist/components/media/VCParticipantList.js +56 -0
  148. package/dist/components/media/VCParticipantListItem.css +73 -0
  149. package/dist/components/media/VCParticipantListItem.js +319 -0
  150. package/dist/components/media/VCRoom.css +42 -0
  151. package/dist/components/media/VCRoom.js +90 -0
  152. package/dist/components/media/VCRoomParticipant.css +25 -0
  153. package/dist/components/media/VCRoomParticipant.js +806 -0
  154. package/dist/components/media/VCRoomWorkspace.css +86 -0
  155. package/dist/components/media/VCRoomWorkspace.js +653 -0
  156. package/dist/components/media/Video.css +4 -0
  157. package/dist/components/media/Video.js +131 -0
  158. package/dist/components/media/chat/ChatRoom.js +926 -0
  159. package/dist/components/media/chat/ChatRoomItem.js +83 -0
  160. package/dist/components/media/chat/ChatRoomList.js +78 -0
  161. package/dist/components/media/chat/ChatRooms.scss +567 -0
  162. package/dist/components/menu/CollapsibleMenu.js +2 -19
  163. package/dist/components/menu/MenuBars.js +6 -33
  164. package/dist/components/menu/MenuButton.js +7 -35
  165. package/dist/components/menu/MenuItem.js +3 -20
  166. package/dist/components/menu/MenuLink.js +18 -12
  167. package/dist/components/navbars/AuthNavbar.js +5 -18
  168. package/dist/components/navbars/HomeNavbar.js +3 -5
  169. package/dist/components/navbars/PortalNavbar.js +4 -22
  170. package/dist/components/signatures/AgilitySignaturePanel.js +35 -101
  171. package/dist/components/signatures/AlertItem.js +3 -24
  172. package/dist/components/signatures/DocumentContainer.js +47 -134
  173. package/dist/components/signatures/ImageSignatureInput.js +8 -35
  174. package/dist/components/signatures/MenuButton.js +1 -16
  175. package/dist/components/signatures/Prompt.js +3 -24
  176. package/dist/components/signatures/ResponsiveTable.js +42 -83
  177. package/dist/components/signatures/SearchView.js +13 -50
  178. package/dist/components/signatures/SignatorySearch.js +83 -99
  179. package/dist/components/signatures/SignatorySearchForm.js +11 -17
  180. package/dist/components/signatures/SignatureInput.js +15 -44
  181. package/dist/components/signatures/SignatureInputProps.js +18 -60
  182. package/dist/components/signatures/SignatureTemplateDesigner.js +147 -235
  183. package/dist/components/signatures/Toolbar.js +7 -34
  184. package/dist/components/signatures/ViewUtils.js +2 -6
  185. package/dist/components/typography/Danger.js +3 -1
  186. package/dist/components/typography/Info.js +3 -1
  187. package/dist/components/typography/Link.js +6 -2
  188. package/dist/event/ActionHandlers.js +3 -3
  189. package/dist/event/EventType.js +7 -1
  190. package/dist/event/LoadDataActionHandler.js +1 -1
  191. package/dist/event/Observable.js +56 -168
  192. package/dist/event/RouteActionHandler.js +45 -11
  193. package/dist/event/ServiceCallActionHandler.js +34 -24
  194. package/dist/js/Addresses.js +10 -8
  195. package/dist/js/Media.js +157 -0
  196. package/dist/redux/store/ConfigureStore.js +3 -9
  197. package/dist/redux/store/DashboardStore.js +42 -94
  198. package/dist/redux/store/SecurityStore.js +15 -50
  199. package/dist/view/Dashboard.js +242 -163
  200. package/dist/view/security/ChangePasswordBasic.js +23 -76
  201. package/dist/view/security/ForgotPassword.js +9 -42
  202. package/dist/view/security/ForgotPasswordBasic.js +8 -41
  203. package/dist/view/security/Login.js +11 -47
  204. package/dist/view/security/LoginBasic.js +8 -41
  205. package/dist/view/security/LoginBusinessPortal.js +8 -41
  206. package/dist/view/security/ResetPassword.js +9 -47
  207. package/dist/view/security/ResetPasswordBasic.js +21 -71
  208. package/dist/view/security/Security.js +1 -0
  209. package/package.json +29 -13
  210. package/README.md +0 -1623
  211. package/dist/components/dashboard/BasicApp.js +0 -140
  212. package/dist/components/navbars/NavbarLinks.js +0 -212
  213. package/dist/components/signatures/OLD.js +0 -1138
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- 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; } } }; }
9
-
10
- 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); }
11
-
12
- 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; }
13
-
14
8
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
9
 
16
10
  const boundCheck = (pos, mousePos) => {
@@ -38,18 +32,8 @@ class TemplateTable {
38
32
  let tableHeight = tableConfig.defaultRowHeight * tableConfig.defaultNumRows;
39
33
  let tableWidth = 0;
40
34
 
41
- var _iterator = _createForOfIteratorHelper(tableConfig.columns),
42
- _step;
43
-
44
- try {
45
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
46
- const column = _step.value;
47
- tableWidth += column.defaultWidth;
48
- }
49
- } catch (err) {
50
- _iterator.e(err);
51
- } finally {
52
- _iterator.f();
35
+ for (const column of tableConfig.columns) {
36
+ tableWidth += column.defaultWidth;
53
37
  }
54
38
 
55
39
  let table = document.createElement("div");
@@ -124,18 +108,8 @@ class TemplateTable {
124
108
  let elements = this.currentResizeCol.parentElement.parentElement.getElementsByClassName("_item_table_col_".concat(index));
125
109
 
126
110
  if (elements && elements.length > 0) {
127
- var _iterator2 = _createForOfIteratorHelper(elements),
128
- _step2;
129
-
130
- try {
131
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
132
- const element = _step2.value;
133
- element.style.width = width + 'px';
134
- }
135
- } catch (err) {
136
- _iterator2.e(err);
137
- } finally {
138
- _iterator2.f();
111
+ for (const element of elements) {
112
+ element.style.width = width + 'px';
139
113
  }
140
114
  }
141
115
  }
@@ -147,18 +121,8 @@ class TemplateTable {
147
121
  let elements = this.currentResizeCol.parentElement.parentElement.getElementsByClassName("_item_table_col_".concat(index));
148
122
 
149
123
  if (elements && elements.length > 0) {
150
- var _iterator3 = _createForOfIteratorHelper(elements),
151
- _step3;
152
-
153
- try {
154
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
155
- const element = _step3.value;
156
- element.style.borderWidth = width;
157
- }
158
- } catch (err) {
159
- _iterator3.e(err);
160
- } finally {
161
- _iterator3.f();
124
+ for (const element of elements) {
125
+ element.style.borderWidth = width;
162
126
  }
163
127
  }
164
128
  }
@@ -19,62 +19,45 @@ var _reactHtmlRenderer = _interopRequireDefault(require("react-html-renderer"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
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); }
27
-
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; }
29
-
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; }
33
-
34
22
  const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
35
- const _React$useState = _react.default.useState(""),
36
- _React$useState2 = _slicedToArray(_React$useState, 2),
37
- title = _React$useState2[0],
38
- setTitle = _React$useState2[1];
23
+ const [title, setTitle] = _react.default.useState('');
39
24
 
40
- const _React$useState3 = _react.default.useState(true),
41
- _React$useState4 = _slicedToArray(_React$useState3, 2),
42
- initializing = _React$useState4[0],
43
- setInitializing = _React$useState4[1];
25
+ _react.default.useLayoutEffect(() => {
26
+ props.handle.api = api();
27
+ }, []);
44
28
 
45
29
  _react.default.useEffect(() => {
46
- if (initializing) {
47
- props.handle.api = api();
48
-
49
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
50
-
51
- let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
52
- eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
53
-
54
- let titleValue = _Utils.default.getComponentAttribute(props.config, 'title', null);
55
-
56
- if (_Utils.default.isNull(titleValue)) {
57
- let subscription = {
58
- publisher: "applicationContext",
59
- eventType: _EventType.default.APPLICATION_CONTEXT_CHANGE,
60
- actions: [{
61
- actionType: "script",
62
- script: {
63
- lines: ["if($event.data.name === 'title'){", " let component = @#{".concat(props.config.id, "};"), " if(component) {", " component.title = $event.data.value", " }", "}"]
64
- }
65
- }]
66
- };
67
- eventHandlingConfig.subscriptions.push(subscription);
68
-
69
- _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
70
- } else {
71
- setTitle(titleValue);
72
- }
30
+ props.handle.api = api();
31
+ });
73
32
 
74
- props.loadCompleteHandler(props.config.id);
75
- setInitializing(false);
33
+ _react.default.useEffect(() => {
34
+ console.log('TITLE BAR RENDERED : ' + props.config.id);
35
+
36
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
37
+
38
+ let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
39
+ eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
40
+
41
+ let titleValue = _Utils.default.getComponentAttribute(props.config, 'title', null);
42
+
43
+ if (_Utils.default.isNull(titleValue)) {
44
+ let subscription = {
45
+ publisher: 'applicationContext',
46
+ eventType: _EventType.default.APPLICATION_CONTEXT_CHANGE,
47
+ actions: [{
48
+ actionType: 'script',
49
+ script: {
50
+ lines: ["if($event.data.name === 'title'){", " let component = @#{".concat(props.config.id, "};"), " if(component) {", " component.title = $event.data.value", " }", '}']
51
+ }
52
+ }]
53
+ };
54
+ eventHandlingConfig.subscriptions.push(subscription);
55
+
56
+ _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
57
+ } else {
58
+ setTitle(titleValue);
76
59
  }
77
- });
60
+ }, []);
78
61
 
79
62
  const api = () => {
80
63
  return {
@@ -95,7 +78,7 @@ const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
95
78
 
96
79
  return /*#__PURE__*/_react.default.createElement("div", {
97
80
  ref: ref
98
- }, !_Utils.default.isNull(props.config) ? /*#__PURE__*/_react.default.createElement("div", {
81
+ }, /*#__PURE__*/_react.default.createElement("div", {
99
82
  style: {
100
83
  padding: '32px 0 4px 0',
101
84
  fontSize: '24px',
@@ -103,7 +86,7 @@ const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
103
86
  }
104
87
  }, /*#__PURE__*/_react.default.createElement(_reactHtmlRenderer.default, {
105
88
  html: "<p>".concat(title, "</p>")
106
- })) : null);
89
+ })));
107
90
  }));
108
91
 
109
92
  var _default = TitleBar;
@@ -21,28 +21,10 @@ var _Utils = _interopRequireDefault(require("../Utils"));
21
21
 
22
22
  var _styles = require("@material-ui/core/styles");
23
23
 
24
- var _asyncMutex = require("async-mutex");
24
+ var _Icon = _interopRequireDefault(require("./Icon"));
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
28
- 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; } } }; }
29
-
30
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
31
-
32
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
33
-
34
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
-
36
- 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."); }
37
-
38
- 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); }
39
-
40
- 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; }
41
-
42
- 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; }
43
-
44
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
-
46
28
  const useStyles = (0, _styles.makeStyles)(theme => ({
47
29
  spacer: {
48
30
  borderLeft: '2px solid' + theme.palette.secondary.main,
@@ -66,19 +48,10 @@ const StyledToggleButtonGroup = (0, _core.withStyles)(theme => ({
66
48
  const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
67
49
  const classes = useStyles();
68
50
 
69
- const _React$useState = _react.default.useState([]),
70
- _React$useState2 = _slicedToArray(_React$useState, 1),
71
- itemHandles = _React$useState2[0];
72
-
73
- const _React$useState3 = _react.default.useState('left'),
74
- _React$useState4 = _slicedToArray(_React$useState3, 1),
75
- alignment = _React$useState4[0];
51
+ const [itemHandles] = _react.default.useState([]);
76
52
 
77
- const _React$useState5 = _react.default.useState([]),
78
- _React$useState6 = _slicedToArray(_React$useState5, 1),
79
- loadedComponents = _React$useState6[0];
53
+ const [alignment] = _react.default.useState(_Utils.default.getComponentAttribute(props.config, 'alignment', 'left'));
80
54
 
81
- const mutex = new _asyncMutex.Mutex();
82
55
  let itemKeyCounter = 0;
83
56
  let sectionKeyCounter = 0;
84
57
 
@@ -105,149 +78,46 @@ const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
105
78
  config: item,
106
79
  handle: createItemHandle(),
107
80
  ref: /*#__PURE__*/_react.default.createRef(),
108
- viewId: props.viewId,
109
- loadCompleteHandler: loadCompleteHandler
81
+ viewId: props.viewId
110
82
  }) : item.type === 'button' ? /*#__PURE__*/_react.default.createElement(_Button.default, {
111
83
  config: item,
112
84
  handle: createItemHandle(),
113
85
  ref: /*#__PURE__*/_react.default.createRef(),
114
- viewId: props.viewId,
115
- loadCompleteHandler: loadCompleteHandler
86
+ viewId: props.viewId
116
87
  }) : item.type === 'toolbarSpacer' ? /*#__PURE__*/_react.default.createElement("div", {
117
88
  className: classes.spacer
118
- }, "\xA0") : /*#__PURE__*/_react.default.createElement("div", null, "Unsupported toolbar item type " + item.type);
119
- }
120
-
121
- function loadCompleteHandler(_x) {
122
- return _loadCompleteHandler.apply(this, arguments);
123
- }
124
-
125
- function _loadCompleteHandler() {
126
- _loadCompleteHandler = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(id) {
127
- var release, allLoaded, _iterator, _step, section, _iterator2, _step2, item;
128
-
129
- return regeneratorRuntime.wrap(function _callee$(_context) {
130
- while (1) switch (_context.prev = _context.next) {
131
- case 0:
132
- _context.next = 2;
133
- return mutex.acquire();
134
-
135
- case 2:
136
- release = _context.sent;
137
- _context.prev = 3;
138
- loadedComponents.push(id);
139
- allLoaded = true;
140
-
141
- if (!(_Utils.default.isNull(props.config.sections) || _Utils.default.isNull(props.config.sections.length === 0))) {
142
- _context.next = 9;
143
- break;
144
- }
145
-
146
- console.error("Toolbar without sections");
147
- return _context.abrupt("return");
148
-
149
- case 9:
150
- _iterator = _createForOfIteratorHelper(props.config.sections);
151
- _context.prev = 10;
152
-
153
- _iterator.s();
154
-
155
- case 12:
156
- if ((_step = _iterator.n()).done) {
157
- _context.next = 21;
158
- break;
159
- }
160
-
161
- section = _step.value;
162
-
163
- if (!(_Utils.default.isNull(section.items) || _Utils.default.isNull(section.items.length === 0))) {
164
- _context.next = 17;
165
- break;
166
- }
167
-
168
- console.error("Toolbar section without items");
169
- return _context.abrupt("return");
170
-
171
- case 17:
172
- _iterator2 = _createForOfIteratorHelper(section.items);
173
-
174
- try {
175
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
176
- item = _step2.value;
177
-
178
- if (!loadedComponents.includes(item.id) && item.type !== 'toolbarSpacer') {
179
- allLoaded = false;
180
- }
181
- }
182
- } catch (err) {
183
- _iterator2.e(err);
184
- } finally {
185
- _iterator2.f();
186
- }
187
-
188
- case 19:
189
- _context.next = 12;
190
- break;
191
-
192
- case 21:
193
- _context.next = 26;
194
- break;
195
-
196
- case 23:
197
- _context.prev = 23;
198
- _context.t0 = _context["catch"](10);
199
-
200
- _iterator.e(_context.t0);
201
-
202
- case 26:
203
- _context.prev = 26;
204
-
205
- _iterator.f();
206
-
207
- return _context.finish(26);
208
-
209
- case 29:
210
- if (allLoaded === true) {
211
- props.loadCompleteHandler(props.config.id);
212
- }
213
-
214
- case 30:
215
- _context.prev = 30;
216
- release();
217
- return _context.finish(30);
218
-
219
- case 33:
220
- case "end":
221
- return _context.stop();
222
- }
223
- }, _callee, null, [[3,, 30, 33], [10, 23, 26, 29]]);
224
- }));
225
- return _loadCompleteHandler.apply(this, arguments);
89
+ }, "\xA0") : item.type === 'icon' ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
90
+ id: _Utils.default.getComponentAttribute(item, 'iconId', null)
91
+ }) : /*#__PURE__*/_react.default.createElement("div", null, "Unsupported toolbar item type " + item.type);
226
92
  }
227
93
 
228
94
  function renderSection(section, counter) {
229
95
  let itemCounter = 0;
230
96
  return /*#__PURE__*/_react.default.createElement(StyledToggleButtonGroup, {
231
97
  size: "small",
232
- value: alignment,
233
98
  exclusive: true,
234
99
  key: sectionKeyCounter++,
235
- "aria-label": "text alignment"
100
+ "aria-label": "text alignment",
101
+ style: _Utils.default.mergeStyles({
102
+ minWidth: '128px',
103
+ height: '100%',
104
+ marginLeft: 0,
105
+ marginRight: 0
106
+ }, section)
236
107
  }, /*#__PURE__*/_react.default.createElement("div", {
237
108
  className: "row"
238
- }, section.items.map(item => {
239
- return /*#__PURE__*/_react.default.createElement("span", {
240
- style: {
241
- margin: '4px'
242
- },
243
- key: itemKeyCounter++
244
- }, /*#__PURE__*/_react.default.createElement("div", {
109
+ }, section.items.map((item, index) => {
110
+ return /*#__PURE__*/_react.default.createElement("div", {
245
111
  className: 'col-*-*',
246
- style: {
247
- height: _Utils.default.getComponentAttribute(item, 'height', item.type === 'toolbarSpacer' ? '100%' : null),
248
- minWidth: item.type === 'toolbarSpacer' ? '2' : _Utils.default.isNull(item.attributes) || _Utils.default.isNull(item.attributes['label']) ? '60px' : _Utils.default.getComponentAttribute(item, 'width', null)
249
- }
250
- }, renderItem(item, 'toolbar_item_' + counter + '_' + itemCounter++)));
112
+ key: index,
113
+ style: _Utils.default.mergeStyles({
114
+ height: item.type === 'toolbarSpacer' ? '100%' : null,
115
+ minWidth: item.type === 'toolbarSpacer' ? '2' : _Utils.default.isNull(item.attributes) || _Utils.default.isNull(item.attributes['label']) ? '60px' : null,
116
+ marginLeft: item.type === 'toolbarSpacer' ? '4px' : 0,
117
+ marginRight: 0,
118
+ marginTop: item.type === 'toolbarSpacer' ? '6px' : 0
119
+ }, item)
120
+ }, renderItem(item, 'toolbar_item_' + counter + '_' + itemCounter++));
251
121
  })));
252
122
  }
253
123
 
@@ -267,18 +137,12 @@ const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
267
137
  function render(toolbar) {
268
138
  let counter = 0;
269
139
  return /*#__PURE__*/_react.default.createElement("div", {
270
- className: "row",
271
- ref: ref,
272
- style: {
273
- padding: '0 0 8px 0',
274
- width: '100%',
275
- textAlign: _Utils.default.getComponentAttribute(toolbar, 'align', null),
276
- display: "inline-block"
277
- }
278
- }, toolbar.sections.map(section => {
140
+ className: "row no-margin no-padding",
141
+ ref: ref
142
+ }, toolbar.sections.map((section, index) => {
279
143
  return /*#__PURE__*/_react.default.createElement("div", {
280
- className: "col-*-*",
281
- key: ++sectionKeyCounter,
144
+ className: "col no-margin no-padding",
145
+ key: index,
282
146
  style: {
283
147
  textAlign: section.halign ? section.halign.toLowerCase() : null
284
148
  }
@@ -286,21 +150,11 @@ const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
286
150
  }));
287
151
  }
288
152
 
289
- function getBorderBottom() {
290
- let border = _Utils.default.getComponentAttribute(props.config, 'border', null);
291
-
292
- if (border === 'none') {
293
- return 'none';
294
- }
295
-
296
- return _Utils.default.getComponentAttribute(props.config, 'borderBottom', '1px solid #e2e2e2');
297
- }
298
-
299
153
  return /*#__PURE__*/_react.default.createElement("div", {
300
154
  ref: ref,
301
155
  style: _Utils.default.mergeStyles({
302
- borderBottom: getBorderBottom(),
303
- margin: '0'
156
+ borderBottom: '1px solid #e2e2e2',
157
+ padding: '8px 0 16px 0'
304
158
  }, props.config)
305
159
  }, render(props.config));
306
160
  });
@@ -37,20 +37,6 @@ var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"
37
37
 
38
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
39
 
40
- 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; } } }; }
41
-
42
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
43
-
44
- 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."); }
45
-
46
- 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); }
47
-
48
- 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; }
49
-
50
- 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; }
51
-
52
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
-
54
40
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
55
41
 
56
42
  // web.cjs is required for IE 11 support
@@ -138,40 +124,31 @@ const useStyles = (0, _styles.makeStyles)({
138
124
  const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
139
125
  const classes = useStyles();
140
126
 
141
- const _React$useState = _react.default.useState(null),
142
- _React$useState2 = _slicedToArray(_React$useState, 2),
143
- root = _React$useState2[0],
144
- setRoot = _React$useState2[1];
127
+ const [root, setRoot] = _react.default.useState(null);
145
128
 
146
- const _React$useState3 = _react.default.useState([]),
147
- _React$useState4 = _slicedToArray(_React$useState3, 1),
148
- selectedRows = _React$useState4[0];
129
+ const [selectedRows] = _react.default.useState([]);
149
130
 
150
- const _React$useState5 = _react.default.useState([]),
151
- _React$useState6 = _slicedToArray(_React$useState5, 2),
152
- expanded = _React$useState6[0],
153
- setExpanded = _React$useState6[1];
131
+ const [expanded, setExpanded] = _react.default.useState([]);
154
132
 
155
- const _React$useState7 = _react.default.useState(true),
156
- _React$useState8 = _slicedToArray(_React$useState7, 2),
157
- initializing = _React$useState8[0],
158
- setInitializing = _React$useState8[1];
133
+ const [initializing, setInitializing] = _react.default.useState(true);
134
+
135
+ _react.default.useEffect(() => {
136
+ props.handle.api = api();
137
+ });
159
138
 
160
139
  _react.default.useEffect(() => {
161
140
  props.handle.api = api();
162
141
 
163
- if (initializing) {
164
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
142
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
165
143
 
166
- _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, () => {
167
- return ref;
168
- }, props.viewId);
144
+ _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, () => {
145
+ return ref;
146
+ }, props.viewId);
169
147
 
170
- _Observable.default.addSystemSubscriptions(parsedConfig);
148
+ _Observable.default.addSystemSubscriptions(parsedConfig);
171
149
 
172
- setInitializing(false);
173
- }
174
- });
150
+ setInitializing(false);
151
+ }, []);
175
152
 
176
153
  function loadData(eventConfig, componentConfig) {
177
154
  let service = !_Utils.default.isNull(componentConfig.dataService) ? componentConfig.dataService : eventConfig !== null ? eventConfig.dataService : null;
@@ -179,14 +156,12 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
179
156
  if (!_Utils.default.isNull(service)) {
180
157
  (0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result => {
181
158
  try {
182
- props.loadCompleteHandler(props.config.id);
183
-
184
159
  if (result.data) {
185
160
  expand(result.data);
186
161
  setRoot(result.data);
187
162
  }
188
163
  } catch (e) {
189
- props.console.error(e);
164
+ console.error(e);
190
165
 
191
166
  _Utils.default.publishSystemErrorMessage(props.viewId);
192
167
  }
@@ -194,9 +169,7 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
194
169
  props.console.error(e);
195
170
 
196
171
  _Utils.default.publishSystemErrorMessage(props.viewId);
197
- }, parameter => {
198
- props.loadCompleteHandler(props.config.id);
199
- });
172
+ }, parameter => {});
200
173
  } else if (!_Utils.default.isNull(componentConfig.value)) {
201
174
  let value = _ApplicationContext.default.isExpression(componentConfig.value) ? _ApplicationContext.default.resolveExpressionValue(componentConfig.value) : componentConfig.value;
202
175
  }
@@ -224,9 +197,9 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
224
197
  if (!_Utils.default.isNull(root)) {
225
198
  rootReference = {};
226
199
 
227
- if (!_Utils.default.isNull(root.map)) {
228
- rootReference.id = root.map.id;
229
- rootReference.label = root.map.name;
200
+ if (!_Utils.default.isNull(root)) {
201
+ rootReference.id = root.id;
202
+ rootReference.label = root.name;
230
203
  } else {
231
204
  rootReference.id = root.id;
232
205
  rootReference.label = root.name;
@@ -255,12 +228,12 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
255
228
 
256
229
  const render = item => {
257
230
  return /*#__PURE__*/_react.default.createElement(StyledTreeItem, {
258
- nodeId: item.map.id.toString(),
259
- label: item.map.name,
260
- key: item.map.id,
231
+ nodeId: item.id.toString(),
232
+ label: item.name,
233
+ key: item.id,
261
234
  onLabelClick: e => e.preventDefault(),
262
235
  onClick: () => {
263
- handleSelectionChange(item.map.id, item.map.name);
236
+ handleSelectionChange(item.id, item.name);
264
237
  }
265
238
  }, !_Utils.default.isNull(item.children) && item.children.length > 0 ? item.children.map(child => {
266
239
  return render(child);
@@ -268,21 +241,11 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
268
241
  };
269
242
 
270
243
  const expand = item => {
271
- expanded.push("".concat(item.map.id));
244
+ expanded.push("".concat(item.id));
272
245
 
273
246
  if (!_Utils.default.isNull(item.children)) {
274
- var _iterator = _createForOfIteratorHelper(item.children),
275
- _step;
276
-
277
- try {
278
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
279
- const child = _step.value;
280
- expand(child);
281
- }
282
- } catch (err) {
283
- _iterator.e(err);
284
- } finally {
285
- _iterator.f();
247
+ for (const child of item.children) {
248
+ expand(child);
286
249
  }
287
250
  }
288
251
  };