@agilemotion/oui-react-js 1.3.8 → 1.4.0

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 (230) hide show
  1. package/README.TXT +1 -0
  2. package/dist/{ApplicationContext.js → ApplicationManager.js} +334 -335
  3. package/dist/BasicApp.js +67 -64
  4. package/dist/BasicAppHome.js +90 -110
  5. package/dist/BusinessPortalApp.js +1 -1
  6. package/dist/BusinessPortalAppHome.js +15 -50
  7. package/dist/DynamicJS.js +24 -52
  8. package/dist/RestUtils.js +90 -116
  9. package/dist/Utils.js +49 -37
  10. package/dist/WithRouter.js +34 -0
  11. package/dist/assets/jss/components/authNavbarStyle.js +34 -35
  12. package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
  13. package/dist/assets/jss/components/customDropdownStyle.js +26 -26
  14. package/dist/assets/jss/components/customInputStyle.js +2 -8
  15. package/dist/assets/jss/components/dropdownStyle.js +10 -15
  16. package/dist/assets/jss/components/footerStyle.js +12 -18
  17. package/dist/assets/jss/components/headerLinksStyle.js +7 -13
  18. package/dist/assets/jss/components/headerStyle.js +24 -25
  19. package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
  20. package/dist/assets/jss/components/navbarStyle.js +24 -25
  21. package/dist/assets/jss/components/sidebarStyle.js +41 -43
  22. package/dist/assets/jss/components/typographyStyle.js +2 -8
  23. package/dist/assets/jss/rootStyle.js +32 -47
  24. package/dist/assets/jss/views/layoutStyle.js +6 -11
  25. package/dist/assets/jss/views/loginStyle.js +4 -10
  26. package/dist/assets/lotties/call-loading.json +1 -0
  27. package/dist/assets/lotties/calling-2.json +1 -0
  28. package/dist/assets/lotties/calling.json +1 -0
  29. package/dist/assets/lotties/calling2.json +1 -0
  30. package/dist/assets/lotties/chat.json +1 -0
  31. package/dist/assets/lotties/join.json +1 -0
  32. package/dist/assets/lotties/loading.json +1 -0
  33. package/dist/assets/lotties/msg2.json +1 -0
  34. package/dist/assets/lotties/recording.json +1 -0
  35. package/dist/assets/lotties/waiting.json +1 -0
  36. package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
  37. package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
  38. package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
  39. package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
  40. package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
  41. package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
  42. package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
  43. package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
  44. package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
  45. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
  46. package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
  47. package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
  48. package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
  49. package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
  50. package/dist/components/AlertBar.js +39 -80
  51. package/dist/components/AlertItem.js +4 -26
  52. package/dist/components/Button.js +49 -52
  53. package/dist/components/Calendar.js +442 -0
  54. package/dist/components/Calender.css +244 -0
  55. package/dist/components/ConfirmationDialog.js +5 -29
  56. package/dist/components/DataGrid.js +207 -345
  57. package/dist/components/DataGridColumn.js +6 -29
  58. package/dist/components/DataGridFilter.js +48 -116
  59. package/dist/components/DataGridHeading.js +11 -19
  60. package/dist/components/Dialog.js +27 -121
  61. package/dist/components/DocumentViewer.js +12 -38
  62. package/dist/components/DocumentViewerComponent.js +2 -20
  63. package/dist/components/FileThumb.js +126 -0
  64. package/dist/components/Graph.js +33 -75
  65. package/dist/components/GraphNode.js +5 -22
  66. package/dist/components/HtmlPanel.js +68 -82
  67. package/dist/components/Icon.js +107 -1
  68. package/dist/components/LoadingIndicator.js +4 -4
  69. package/dist/components/LottieIcon.js +134 -0
  70. package/dist/components/PopupView.js +3 -21
  71. package/dist/components/Portlet.js +100 -0
  72. package/dist/components/RegularButton.js +15 -19
  73. package/dist/components/SignaturePanel.js +9 -40
  74. package/dist/components/SocketManager.js +170 -0
  75. package/dist/components/StepperTitleBar.js +33 -59
  76. package/dist/components/TabPage.js +6 -9
  77. package/dist/components/TabPanel.js +49 -98
  78. package/dist/components/TableCellContent.js +31 -39
  79. package/dist/components/TemplateDesigner.js +114 -158
  80. package/dist/components/TemplateItemEventHandler.js +33 -100
  81. package/dist/components/TemplateTable.js +6 -42
  82. package/dist/components/TitleBar.js +38 -54
  83. package/dist/components/Toolbar.js +67 -182
  84. package/dist/components/Tree.js +29 -66
  85. package/dist/components/card/Card.js +16 -20
  86. package/dist/components/card/CardAvatar.js +9 -13
  87. package/dist/components/card/CardBody.js +13 -17
  88. package/dist/components/card/CardFooter.js +12 -16
  89. package/dist/components/card/CardHeader.js +13 -17
  90. package/dist/components/card/CardIcon.js +6 -10
  91. package/dist/components/card/CardText.js +6 -10
  92. package/dist/components/customInput/CustomInput.js +12 -10
  93. package/dist/components/dashboard/BasicBusinessAppDashboard.js +85 -159
  94. package/dist/components/dashboard/BusinessPortalAppDashboard.js +30 -75
  95. package/dist/components/dashboard/components/Header.js +9 -26
  96. package/dist/components/dashboard/components/LeftDrawer.js +3 -1
  97. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
  98. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
  99. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +189 -79
  100. package/dist/components/footer/Footer.js +6 -18
  101. package/dist/components/form/AddressSearch.js +32 -66
  102. package/dist/components/form/AutoComplete.js +161 -0
  103. package/dist/components/form/BaseField.js +89 -107
  104. package/dist/components/form/DatePicker.js +8 -23
  105. package/dist/components/form/FieldSet.js +161 -191
  106. package/dist/components/form/Form.css +1 -1
  107. package/dist/components/form/Form.js +153 -479
  108. package/dist/components/form/GridField.js +46 -146
  109. package/dist/components/form/IconField.js +35 -0
  110. package/dist/components/form/ImageEditor.js +22 -60
  111. package/dist/components/form/LookupField.js +8 -29
  112. package/dist/components/form/MultiFileUploadField.js +187 -0
  113. package/dist/components/form/RadioGroup.js +10 -26
  114. package/dist/components/form/Section.js +40 -91
  115. package/dist/components/form/SelectItem.js +14 -33
  116. package/dist/components/form/SignatureTemplateDesignerField.js +0 -1
  117. package/dist/components/form/Switch.js +53 -0
  118. package/dist/components/form/TextField.js +10 -17
  119. package/dist/components/form/TimePicker.js +8 -1
  120. package/dist/components/form/TransferList.css +2 -2
  121. package/dist/components/form/TransferList.js +67 -125
  122. package/dist/components/form/UploadField.js +132 -177
  123. package/dist/components/form/fieldset.css +8 -0
  124. package/dist/components/grid/GridContainer.js +5 -9
  125. package/dist/components/grid/GridItem.js +5 -9
  126. package/dist/components/layout/CollapsiblePanel.js +11 -33
  127. package/dist/components/layout/Layout.js +228 -290
  128. package/dist/components/layout/VC.css +17 -0
  129. package/dist/components/layout/View.css +18 -1
  130. package/dist/components/layout/View.js +80 -200
  131. package/dist/components/layout/ViewContainer.css +3 -0
  132. package/dist/components/layout/ViewContainer.js +59 -0
  133. package/dist/components/layout/ViewPort.js +50 -80
  134. package/dist/components/layout/Window.css +18 -0
  135. package/dist/components/layout/Window.js +287 -0
  136. package/dist/components/layout/WindowViewPort.js +71 -0
  137. package/dist/components/loader.css +1 -1
  138. package/dist/components/media/ClosablePanel.css +37 -0
  139. package/dist/components/media/ClosablePanel.js +53 -0
  140. package/dist/components/media/LobbyWaitingList.js +91 -0
  141. package/dist/components/media/MediaSoupHelper.js +223 -0
  142. package/dist/components/media/Recorder.js +235 -0
  143. package/dist/components/media/SideBarContent.css +54 -0
  144. package/dist/components/media/SideBarContent.js +46 -0
  145. package/dist/components/media/SocketRequest.js +20 -0
  146. package/dist/components/media/SocketResponse.js +16 -0
  147. package/dist/components/media/Timer.css +30 -0
  148. package/dist/components/media/Timer.js +88 -0
  149. package/dist/components/media/Toolbar.css +35 -0
  150. package/dist/components/media/Toolbar.js +494 -0
  151. package/dist/components/media/Tracks.js +39 -0
  152. package/dist/components/media/TrainingRoom.js +608 -0
  153. package/dist/components/media/Transports.js +35 -0
  154. package/dist/components/media/VCEventManager.js +74 -0
  155. package/dist/components/media/VCEventType.js +164 -0
  156. package/dist/components/media/VCParticipantList.css +72 -0
  157. package/dist/components/media/VCParticipantList.js +56 -0
  158. package/dist/components/media/VCParticipantListItem.css +73 -0
  159. package/dist/components/media/VCParticipantListItem.js +319 -0
  160. package/dist/components/media/VCRoom.css +42 -0
  161. package/dist/components/media/VCRoom.js +90 -0
  162. package/dist/components/media/VCRoomParticipant.css +25 -0
  163. package/dist/components/media/VCRoomParticipant.js +808 -0
  164. package/dist/components/media/VCRoomRecorder.js +223 -0
  165. package/dist/components/media/VCRoomWorkspace.css +86 -0
  166. package/dist/components/media/VCRoomWorkspace.js +666 -0
  167. package/dist/components/media/Video.css +4 -0
  168. package/dist/components/media/Video.js +131 -0
  169. package/dist/components/media/VideoPlayer.css +10 -0
  170. package/dist/components/media/VideoPlayer.js +86 -0
  171. package/dist/components/media/chat/ChatRoom.js +926 -0
  172. package/dist/components/media/chat/ChatRoomItem.js +83 -0
  173. package/dist/components/media/chat/ChatRoomList.js +78 -0
  174. package/dist/components/media/chat/ChatRooms.scss +567 -0
  175. package/dist/components/menu/CollapsibleMenu.js +2 -19
  176. package/dist/components/menu/MenuBars.js +6 -33
  177. package/dist/components/menu/MenuButton.js +27 -39
  178. package/dist/components/menu/MenuItem.js +3 -20
  179. package/dist/components/menu/MenuLink.js +22 -13
  180. package/dist/components/navbars/AuthNavbar.js +5 -18
  181. package/dist/components/navbars/HomeNavbar.js +5 -7
  182. package/dist/components/navbars/PortalNavbar.js +7 -25
  183. package/dist/components/signatures/AgilitySignaturePanel.js +38 -104
  184. package/dist/components/signatures/AlertItem.js +3 -24
  185. package/dist/components/signatures/DocumentContainer.js +47 -134
  186. package/dist/components/signatures/ImageSignatureInput.js +11 -38
  187. package/dist/components/signatures/MenuButton.js +1 -16
  188. package/dist/components/signatures/Prompt.js +3 -24
  189. package/dist/components/signatures/ResponsiveTable.js +42 -83
  190. package/dist/components/signatures/SearchView.js +13 -50
  191. package/dist/components/signatures/SignatorySearch.js +83 -99
  192. package/dist/components/signatures/SignatorySearchForm.js +11 -17
  193. package/dist/components/signatures/SignatureInput.js +18 -47
  194. package/dist/components/signatures/SignatureInputProps.js +18 -60
  195. package/dist/components/signatures/SignatureTemplateDesigner.js +151 -239
  196. package/dist/components/signatures/Toolbar.js +7 -34
  197. package/dist/components/signatures/ViewUtils.js +2 -6
  198. package/dist/components/typography/Danger.js +3 -1
  199. package/dist/components/typography/Info.js +3 -1
  200. package/dist/components/typography/Link.js +6 -2
  201. package/dist/event/ActionHandlers.js +6 -6
  202. package/dist/event/EventType.js +7 -1
  203. package/dist/event/LoadDataActionHandler.js +1 -1
  204. package/dist/event/Observable.js +80 -174
  205. package/dist/event/RouteActionHandler.js +74 -31
  206. package/dist/event/ServiceCallActionHandler.js +36 -24
  207. package/dist/event/SignalGraphActionHandler.js +2 -2
  208. package/dist/js/Addresses.js +10 -8
  209. package/dist/js/Calendar.js +220 -0
  210. package/dist/js/Media.js +157 -0
  211. package/dist/redux/store/ConfigureStore.js +3 -9
  212. package/dist/redux/store/DashboardStore.js +42 -94
  213. package/dist/redux/store/SecurityStore.js +15 -50
  214. package/dist/view/Dashboard.js +256 -171
  215. package/dist/view/Views.js +30 -0
  216. package/dist/view/security/ChangePasswordBasic.js +29 -80
  217. package/dist/view/security/ForgotPassword.js +13 -46
  218. package/dist/view/security/ForgotPasswordBasic.js +12 -45
  219. package/dist/view/security/Login.js +15 -51
  220. package/dist/view/security/LoginBasic.js +13 -46
  221. package/dist/view/security/LoginBusinessPortal.js +12 -45
  222. package/dist/view/security/ResetPassword.js +13 -51
  223. package/dist/view/security/ResetPasswordBasic.js +27 -75
  224. package/dist/view/security/Security.js +1 -0
  225. package/package.json +31 -25
  226. package/README.md +0 -1623
  227. package/dist/components/dashboard/BasicApp.js +0 -140
  228. package/dist/components/navbars/NavbarLinks.js +0 -212
  229. package/dist/components/signatures/OLD.js +0 -1138
  230. package/gulpfile.js +0 -77
@@ -9,8 +9,8 @@
9
9
  position: relative;
10
10
  width: 100%;
11
11
  min-height: 1px; // Prevent columns from collapsing when empty
12
- padding-right: ($gutter / 2);
13
- padding-left: ($gutter / 2);
12
+ padding-right: ($gutter * 0.5);
13
+ padding-left: ($gutter * 0.5);
14
14
  }
15
15
 
16
16
  @each $breakpoint in map-keys($breakpoints) {
@@ -2,10 +2,12 @@
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
+ @use "sass:math";
6
+
5
7
  @mixin make-container() {
6
8
  width: 100%;
7
- padding-right: ($grid-gutter-width / 2);
8
- padding-left: ($grid-gutter-width / 2);
9
+ padding-right: ($grid-gutter-width * 0.5);
10
+ padding-left: ($grid-gutter-width * 0.5);
9
11
  margin-right: auto;
10
12
  margin-left: auto;
11
13
  }
@@ -23,8 +25,8 @@
23
25
  @mixin make-row() {
24
26
  display: flex;
25
27
  flex-wrap: wrap;
26
- margin-right: ($grid-gutter-width / -2);
27
- margin-left: ($grid-gutter-width / -2);
28
+ margin-right: math.div($grid-gutter-width, -2);
29
+ margin-left: math.div($grid-gutter-width, -2);
28
30
  }
29
31
 
30
32
  @mixin make-col-ready() {
@@ -34,19 +36,19 @@
34
36
  // later on to override this initial width.
35
37
  width: 100%;
36
38
  min-height: 1px; // Prevent collapsing
37
- padding-right: ($grid-gutter-width / 2);
38
- padding-left: ($grid-gutter-width / 2);
39
+ padding-right: ($grid-gutter-width * 0.5);
40
+ padding-left: ($grid-gutter-width * 0.5);
39
41
  }
40
42
 
41
43
  @mixin make-col($size, $columns: $grid-columns) {
42
- flex: 0 0 percentage($size / $columns);
44
+ flex: 0 0 percentage(math.div($size, $columns));
43
45
  // Add a `max-width` to ensure content within each column does not blow out
44
46
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
45
47
  // do not appear to require this.
46
- max-width: percentage($size / $columns);
48
+ max-width: percentage(math.div($size, $columns));
47
49
  }
48
50
 
49
51
  @mixin make-col-offset($size, $columns: $grid-columns) {
50
- $num: $size / $columns;
52
+ $num: math.div($size, $columns);
51
53
  margin-left: if($num == 0, 0, percentage($num));
52
54
  }
@@ -1,5 +1,7 @@
1
1
  // Credit: Nicolas Gallagher and SUIT CSS.
2
2
 
3
+ @use "sass:math";
4
+
3
5
  .embed-responsive {
4
6
  position: relative;
5
7
  display: block;
@@ -29,24 +31,24 @@
29
31
 
30
32
  .embed-responsive-21by9 {
31
33
  &::before {
32
- padding-top: percentage(9 / 21);
34
+ padding-top: percentage(math.div(9, 21));
33
35
  }
34
36
  }
35
37
 
36
38
  .embed-responsive-16by9 {
37
39
  &::before {
38
- padding-top: percentage(9 / 16);
40
+ padding-top: percentage(math.div(9, 16));
39
41
  }
40
42
  }
41
43
 
42
44
  .embed-responsive-4by3 {
43
45
  &::before {
44
- padding-top: percentage(3 / 4);
46
+ padding-top: percentage(3 * 0.25);
45
47
  }
46
48
  }
47
49
 
48
50
  .embed-responsive-1by1 {
49
51
  &::before {
50
- padding-top: percentage(1 / 1);
52
+ padding-top: percentage(math.div(1, 1));
51
53
  }
52
54
  }
@@ -459,7 +459,7 @@
459
459
  }
460
460
 
461
461
  > .content {
462
- padding: 78px 16px 30px 344px;
462
+ padding: 78px 8px 30px 336px;
463
463
  min-height: 100vh;
464
464
  }
465
465
 
@@ -407,7 +407,7 @@ $font-paragraph: 1rem !default;
407
407
  $font-weight-base: $font-weight-normal !default;
408
408
  $shape-height-base: 1.428571 !default;
409
409
 
410
- $headings-margin-bottom: ($spacer / 2);
410
+ $headings-margin-bottom: calc($spacer / 2);
411
411
  $headings-font-family: inherit !default;
412
412
  $headings-font-weight: $font-weight-normal !default;
413
413
  $headings-line-height: 1.2 !default;
@@ -17,88 +17,47 @@ var _Observable = _interopRequireDefault(require("../event/Observable"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- 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; } } }; }
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
20
  const AlertBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
35
- const _React$useState = _react.default.useState(null),
36
- _React$useState2 = _slicedToArray(_React$useState, 2),
37
- message = _React$useState2[0],
38
- setMessage = _React$useState2[1];
39
-
40
- const _React$useState3 = _react.default.useState('info'),
41
- _React$useState4 = _slicedToArray(_React$useState3, 2),
42
- variant = _React$useState4[0],
43
- setVariant = _React$useState4[1];
21
+ const [message, setMessage] = _react.default.useState(props.config.message);
44
22
 
45
- const _React$useState5 = _react.default.useState(true),
46
- _React$useState6 = _slicedToArray(_React$useState5, 2),
47
- initializing = _React$useState6[0],
48
- setInitializing = _React$useState6[1];
23
+ const [variant, setVariant] = _react.default.useState(props.config.variant ? props.config.variant : 'info');
49
24
 
50
25
  _react.default.useEffect(() => {
51
- if (initializing) {
52
- props.handle.api = api();
26
+ props.handle.api = api();
53
27
 
54
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
28
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
55
29
 
56
- let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
57
- let defaultAction = {
58
- actionType: "script",
59
- script: {
60
- lines: ["@#{".concat(props.config.id, "}.message = $event.data.message"), "@#{".concat(props.config.id, "}.variant = $event.data.messageType === 'ERROR' ? 'danger' : $event.data.messageType === 'WARN' ? 'warning' : $event.data.messageType === 'SUCCESS' ? 'success' : 'info' ")]
61
- }
30
+ let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
31
+ let defaultAction = {
32
+ actionType: 'script',
33
+ script: {
34
+ lines: ["@#{".concat(props.config.id, "}.message = $event.data.message"), "@#{".concat(props.config.id, "}.variant = $event.data.messageType === 'ERROR' ? 'danger' : $event.data.messageType === 'WARN' ? 'warning' : $event.data.messageType === 'SUCCESS' ? 'success' : 'info' ")]
35
+ }
36
+ };
37
+
38
+ if (_Utils.default.isNull(eventHandlingConfig.subscriptions)) {
39
+ // Add default subscription
40
+ eventHandlingConfig.subscriptions = [];
41
+ let subscription = {
42
+ publisher: 'applicationManager',
43
+ eventType: _EventType.default.MESSAGE_ARRIVED,
44
+ actions: [defaultAction]
62
45
  };
46
+ eventHandlingConfig.subscriptions.push(subscription);
47
+ } else {
48
+ for (const subscription of eventHandlingConfig.subscriptions) {
49
+ if (_Utils.default.isNull(subscription.actions)) {
50
+ subscription.actions = [];
51
+ }
63
52
 
64
- if (_Utils.default.isNull(eventHandlingConfig.subscriptions)) {
65
- // Add default subscription
66
- eventHandlingConfig.subscriptions = [];
67
- let subscription = {
68
- publisher: "applicationContext",
69
- eventType: _EventType.default.MESSAGE_ARRIVED,
70
- actions: [defaultAction]
71
- };
72
- eventHandlingConfig.subscriptions.push(subscription);
73
- } else {
74
- var _iterator = _createForOfIteratorHelper(eventHandlingConfig.subscriptions),
75
- _step;
76
-
77
- try {
78
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
79
- const subscription = _step.value;
80
-
81
- if (_Utils.default.isNull(subscription.actions)) {
82
- subscription.actions = [];
83
- }
84
-
85
- if (subscription.actions.length === 0) {
86
- subscription.actions.push(defaultAction);
87
- }
88
- }
89
- } catch (err) {
90
- _iterator.e(err);
91
- } finally {
92
- _iterator.f();
53
+ if (subscription.actions.length === 0) {
54
+ subscription.actions.push(defaultAction);
93
55
  }
94
56
  }
95
-
96
- _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
97
-
98
- props.loadCompleteHandler(props.config.id);
99
- setInitializing(false);
100
57
  }
101
- });
58
+
59
+ _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
60
+ }, []);
102
61
 
103
62
  const api = () => {
104
63
  return {
@@ -121,24 +80,24 @@ const AlertBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
121
80
  };
122
81
  };
123
82
 
124
- return /*#__PURE__*/_react.default.createElement("div", {
125
- ref: ref
126
- }, !_Utils.default.isNull(props.config) ? /*#__PURE__*/_react.default.createElement("div", {
127
- style: {
83
+ return !_Utils.default.isNull(props.config) ? /*#__PURE__*/_react.default.createElement("div", {
84
+ style: _Utils.default.mergeStyles({
128
85
  padding: '0 32px 0 32px',
129
- maxHeight: '64px',
130
- borderBottom: '1px solid #e2e2e2'
131
- }
86
+ maxHeight: '64px'
87
+ }, props.config)
132
88
  }, /*#__PURE__*/_react.default.createElement(_Alert.default, {
133
89
  variant: variant,
134
90
  show: !_Utils.default.isNull(message),
135
91
  onClose: () => setMessage(null),
136
- dismissible: true
92
+ dismissible: true,
93
+ style: {
94
+ with: '100%'
95
+ }
137
96
  }, /*#__PURE__*/_react.default.createElement("p", {
138
97
  style: {
139
98
  color: 'rgba(255, 255, 255, 0.8)'
140
99
  }
141
- }, message))) : null);
100
+ }, message))) : null;
142
101
  }));
143
102
 
144
103
  var _default = AlertBar;
@@ -17,19 +17,6 @@ var _Utils = _interopRequireDefault(require("../Utils"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
-
22
- 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."); }
23
-
24
- 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); }
25
-
26
- 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; }
27
-
28
- 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; }
29
-
30
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
-
32
- const utils = new _Utils.default();
33
20
  const useStyles = (0, _styles.makeStyles)(theme => ({
34
21
  root: {
35
22
  width: '100%',
@@ -42,20 +29,11 @@ const useStyles = (0, _styles.makeStyles)(theme => ({
42
29
  function AlertItem(props) {
43
30
  const classes = useStyles();
44
31
 
45
- const _React$useState = _react.default.useState(props.message),
46
- _React$useState2 = _slicedToArray(_React$useState, 2),
47
- message = _React$useState2[0],
48
- setMessage = _React$useState2[1];
32
+ const [message, setMessage] = _react.default.useState(props.message);
49
33
 
50
- const _React$useState3 = _react.default.useState(props.alertStyle),
51
- _React$useState4 = _slicedToArray(_React$useState3, 2),
52
- alertStyle = _React$useState4[0],
53
- setAlertStyle = _React$useState4[1];
34
+ const [alertStyle, setAlertStyle] = _react.default.useState(props.alertStyle);
54
35
 
55
- const _React$useState5 = _react.default.useState(props.alertTitle),
56
- _React$useState6 = _slicedToArray(_React$useState5, 2),
57
- title = _React$useState6[0],
58
- setTitle = _React$useState6[1];
36
+ const [title, setTitle] = _react.default.useState(props.alertTitle);
59
37
 
60
38
  _react.default.useEffect(() => {
61
39
  setMessage(props.message);
@@ -65,7 +43,7 @@ function AlertItem(props) {
65
43
 
66
44
  return /*#__PURE__*/_react.default.createElement("div", {
67
45
  className: classes.root
68
- }, !Utils.isNull(message) && message.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_Alert.default, {
46
+ }, !_Utils.default.isNull(message) && message.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_Alert.default, {
69
47
  severity: alertStyle.toLowerCase()
70
48
  }, /*#__PURE__*/_react.default.createElement(_AlertTitle.default, null, " ", title, " "), message) : "");
71
49
  }
@@ -23,22 +23,10 @@ var _Event = _interopRequireDefault(require("../event/Event"));
23
23
 
24
24
  var _EventType = _interopRequireDefault(require("../event/EventType"));
25
25
 
26
- var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"));
26
+ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
-
32
- 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."); }
33
-
34
- 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); }
35
-
36
- 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; }
37
-
38
- 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; }
39
-
40
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
-
42
30
  const useStyles = (0, _styles.makeStyles)(theme => ({
43
31
  root: {
44
32
  display: 'flex'
@@ -47,53 +35,59 @@ const useStyles = (0, _styles.makeStyles)(theme => ({
47
35
  marginRight: theme.spacing(2)
48
36
  },
49
37
  wrapper: {
50
- maxHeight: "32px",
51
38
  zIndex: 2
52
39
  }
53
40
  }));
54
41
 
55
42
  const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
43
+ var _props$attributes, _props$attributes$sty, _props$config$attribu, _props$config$attribu2, _props$config$attribu3;
44
+
56
45
  const classes = useStyles();
57
46
 
58
- const _React$useState = _react.default.useState(true),
59
- _React$useState2 = _slicedToArray(_React$useState, 2),
60
- initializing = _React$useState2[0],
61
- setInitializing = _React$useState2[1];
47
+ const [disabled, setDisabled] = _react.default.useState(false);
62
48
 
63
- const _React$useState3 = _react.default.useState(false),
64
- _React$useState4 = _slicedToArray(_React$useState3, 2),
65
- disabled = _React$useState4[0],
66
- setDisabled = _React$useState4[1];
49
+ const [visible, setVisible] = _react.default.useState(true);
67
50
 
68
- let color = _Utils.default.getComponentAttribute(props.config, 'color', 'default');
51
+ const [config, setConfig] = _react.default.useState(null);
69
52
 
70
- let width = !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['width']) ? parseInt(props.config.attributes['width'].toString().replace('px', '')) : null;
71
- let height = !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['height']) ? parseInt(props.config.attributes['height'].toString().replace('px', '')) : null;
53
+ let color = _Utils.default.getComponentAttribute(props.config, 'color', 'default');
72
54
 
73
55
  let label = _Utils.default.getComponentAttribute(props.config, 'label', null);
74
56
 
75
57
  _react.default.useEffect(() => {
76
58
  props.handle.api = api();
59
+ });
77
60
 
78
- if (initializing) {
79
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
61
+ _react.default.useEffect(() => {
62
+ return () => {
63
+ props.handle.api = null;
64
+ };
65
+ }, []);
66
+
67
+ _react.default.useEffect(() => {
68
+ if (config) {
69
+ props.handle.api = api();
70
+
71
+ let parsedConfig = _Utils.default.parseConfig(config, props.viewId);
80
72
 
81
73
  _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
82
74
 
83
- _Observable.default.addSystemSubscriptions(parsedConfig);
75
+ _Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
84
76
 
85
- setInitializing(false);
77
+ props.handle.api.refresh();
86
78
  }
87
- });
79
+ }, [config]);
88
80
 
89
81
  _react.default.useEffect(() => {
90
- if (!initializing) {
91
- props.loadCompleteHandler(props.config.id);
92
- }
93
- }, [initializing]);
82
+ var _props$tableRow$id;
83
+
84
+ setConfig(props.tableRow ? { ...props.config,
85
+ id: props.config.id + '_' + ((_props$tableRow$id = props.tableRow.id) === null || _props$tableRow$id === void 0 ? void 0 : _props$tableRow$id.replaceAll('-', ''))
86
+ } : props.config);
87
+ }, []);
94
88
 
95
89
  const handleClick = e => {
96
- _ApplicationContext.default.enableFormMarkers(true);
90
+ _ApplicationManager.default.enableFormMarkers(true);
97
91
 
98
92
  let event = new _Event.default(props.handle, props.viewId);
99
93
 
@@ -103,7 +97,11 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
103
97
  const api = () => {
104
98
  return {
105
99
  get id() {
106
- return props.config.id;
100
+ return config ? config.id : props.config.id;
101
+ },
102
+
103
+ get tableRow() {
104
+ return props.tableRow;
107
105
  },
108
106
 
109
107
  getChildren: () => {
@@ -114,19 +112,25 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
114
112
  setDisabled(disabled);
115
113
  },
116
114
 
115
+ set visible(visible) {
116
+ setVisible(visible);
117
+ },
118
+
117
119
  refresh() {
118
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
120
+ let parsedConfig = _Utils.default.parseConfig(config ? config : props.config, props.viewId);
119
121
 
120
122
  setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id));
123
+ setVisible(_Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
121
124
  }
122
125
 
123
126
  };
124
127
  };
125
128
 
126
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !initializing ? /*#__PURE__*/_react.default.createElement("div", {
129
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
127
130
  className: classes.root,
128
131
  style: {
129
- width: width
132
+ width: (_props$attributes = props.attributes) === null || _props$attributes === void 0 ? void 0 : (_props$attributes$sty = _props$attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : _props$attributes$sty.width,
133
+ display: visible ? 'block' : 'none'
130
134
  }
131
135
  }, /*#__PURE__*/_react.default.createElement("div", {
132
136
  className: classes.wrapper
@@ -135,10 +139,7 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
135
139
  size: "large",
136
140
  color: !_Utils.default.isNull(color) ? color : null,
137
141
  ref: ref,
138
- style: {
139
- width: width,
140
- height: height
141
- },
142
+ style: (_props$config$attribu = props.config.attributes) === null || _props$config$attribu === void 0 ? void 0 : _props$config$attribu.style,
142
143
  disabled: disabled,
143
144
  onClick: handleClick,
144
145
  startIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
@@ -148,26 +149,22 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
148
149
  "aria-controls": "menu-list-grow",
149
150
  ref: ref,
150
151
  disabled: disabled,
151
- style: {
152
- width: width
153
- },
152
+ style: (_props$config$attribu2 = props.config.attributes) === null || _props$config$attribu2 === void 0 ? void 0 : _props$config$attribu2.style,
154
153
  "aria-haspopup": "true",
155
154
  onClick: handleClick
156
155
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
157
- id: props.config.icon
156
+ id: props.config.icon,
157
+ color: 'white'
158
158
  })) : /*#__PURE__*/_react.default.createElement(_Button.default, {
159
159
  variant: color === 'secondary' || color === 'primary' ? 'contained' : 'text',
160
160
  "aria-controls": "menu-list-grow",
161
161
  color: color,
162
162
  ref: ref,
163
- style: {
164
- width: width,
165
- height: height
166
- },
163
+ style: (_props$config$attribu3 = props.config.attributes) === null || _props$config$attribu3 === void 0 ? void 0 : _props$config$attribu3.style,
167
164
  disabled: disabled,
168
165
  onClick: handleClick,
169
166
  "aria-haspopup": "true"
170
- }, label))) : null);
167
+ }, label))));
171
168
  });
172
169
 
173
170
  var _default = Button;