@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
@@ -39,24 +39,6 @@ var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
39
39
 
40
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
41
 
42
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
43
-
44
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
45
-
46
- 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; }
47
-
48
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
49
-
50
- 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."); }
51
-
52
- 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); }
53
-
54
- 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; }
55
-
56
- 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; }
57
-
58
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
59
-
60
42
  const useStyles = (0, _styles.makeStyles)(theme => ({
61
43
  paper: {
62
44
  display: 'flex',
@@ -98,20 +80,11 @@ const StyledToggleButtonGroup = (0, _styles.withStyles)(theme => ({
98
80
  const utils = new _ViewUtils.default();
99
81
 
100
82
  const EnhancedToolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
101
- const _React$useState = _react.default.useState('left'),
102
- _React$useState2 = _slicedToArray(_React$useState, 2),
103
- alignment = _React$useState2[0],
104
- setAlignment = _React$useState2[1];
83
+ const [alignment, setAlignment] = _react.default.useState('left');
105
84
 
106
- const _React$useState3 = _react.default.useState({}),
107
- _React$useState4 = _slicedToArray(_React$useState3, 2),
108
- buttonDisability = _React$useState4[0],
109
- setButtonDisability = _React$useState4[1];
85
+ const [buttonDisability, setButtonDisability] = _react.default.useState({});
110
86
 
111
- const _React$useState5 = _react.default.useState(props.config),
112
- _React$useState6 = _slicedToArray(_React$useState5, 2),
113
- config = _React$useState6[0],
114
- setConfig = _React$useState6[1];
87
+ const [config, setConfig] = _react.default.useState(props.config);
115
88
 
116
89
  let itemKeyCounter = 0;
117
90
  let buttonKeyCounter = 0;
@@ -120,18 +93,18 @@ const EnhancedToolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
120
93
  setAlignment(newAlignment);
121
94
  };
122
95
 
123
- const _setButtonDisabled = (name, disabled) => {
96
+ const setButtonDisabled = (name, disabled) => {
124
97
  buttonDisability[name] = disabled; // Force a refresh
125
98
  //setButtonDisability(JSON.parse(JSON.stringify(buttonDisability)));
126
99
 
127
- setButtonDisability(_objectSpread(_objectSpread({}, buttonDisability), {}, {
100
+ setButtonDisability({ ...buttonDisability,
128
101
  ["key"]: Math.random()
129
- }));
102
+ });
130
103
  };
131
104
 
132
105
  _react.default.useImperativeHandle(ref, () => ({
133
106
  setButtonDisabled: (name, disabled) => {
134
- return _setButtonDisabled(name, disabled);
107
+ return setButtonDisabled(name, disabled);
135
108
  }
136
109
  }));
137
110
 
@@ -7,10 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _reactPromiseTracker = require("react-promise-tracker");
9
9
 
10
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
11
-
12
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
13
-
14
10
  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
11
 
16
12
  class ViewUtils {
@@ -221,9 +217,9 @@ class ViewUtils {
221
217
  let tempDate = stateDate;
222
218
 
223
219
  if (this.isNull(stateDate) || stateDate.getTime() !== newDate.getTime()) {
224
- viewRef.setState(_objectSpread(_objectSpread({}, viewRef.state), {}, {
220
+ viewRef.setState({ ...viewRef.state,
225
221
  [refDateName]: newDate
226
- }), () => {
222
+ }, () => {
227
223
  if (!this.isNull(tempDate) && !this.isNull(viewRef.state.id)) {
228
224
  let autoFillDate = this.offsetDate(newDate, yearOffset, monthOffset, dayOffset);
229
225
  formRef.current.setValue(autoFillDateName, autoFillDate);
@@ -20,7 +20,9 @@ const useStyles = (0, _styles.makeStyles)(_typographyStyle.default);
20
20
 
21
21
  function Danger(props) {
22
22
  const classes = useStyles();
23
- const children = props.children;
23
+ const {
24
+ children
25
+ } = props;
24
26
  return /*#__PURE__*/_react.default.createElement("div", {
25
27
  className: classes.defaultFontStyle + " " + classes.dangerText
26
28
  }, children);
@@ -21,7 +21,9 @@ const useStyles = (0, _styles.makeStyles)(_typographyStyle.default);
21
21
 
22
22
  function Info(props) {
23
23
  const classes = useStyles();
24
- const children = props.children;
24
+ const {
25
+ children
26
+ } = props;
25
27
  return /*#__PURE__*/_react.default.createElement("div", {
26
28
  className: classes.defaultFontStyle + " " + classes.infoText
27
29
  }, children);
@@ -11,13 +11,17 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _typographyStyle = _interopRequireDefault(require("../../assets/jss/components/typographyStyle"));
13
13
 
14
+ var _styles = require("@material-ui/core/styles");
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
- const useStyles = makeStyles(_typographyStyle.default);
18
+ const useStyles = (0, _styles.makeStyles)(_typographyStyle.default);
17
19
 
18
20
  function Info(props) {
19
21
  const classes = useStyles();
20
- const children = props.children;
22
+ const {
23
+ children
24
+ } = props;
21
25
  return /*#__PURE__*/_react.default.createElement("div", {
22
26
  className: classes.defaultFontStyle + " " + classes.infoText
23
27
  }, children);
@@ -70,11 +70,11 @@ class ActionHandlers {
70
70
  invokeHandler(action, be, component, viewId) {
71
71
  let actionHandler = this.getActionHandler(action.actionType);
72
72
  let message = action.confirmationMessage;
73
- let preCondition = action.preCondition;
73
+ let condition = action.condition;
74
74
  let shouldRun = true;
75
75
 
76
- if (!_Utils.default.isNull(preCondition)) {
77
- shouldRun = _DynamicJS.default.executeScript(Math.random() + "_" + viewId + "_" + (component ? component.api.id : "NO_COMPONENT") + "_action_pre_condition", preCondition);
76
+ if (!_Utils.default.isNull(condition)) {
77
+ shouldRun = _DynamicJS.default.executeScript(Math.random() + "_" + viewId + "_" + (component ? component.api.id : "NO_COMPONENT") + "_action_pre_condition", condition, component.api.id, true, be);
78
78
  }
79
79
 
80
80
  if (shouldRun) {
@@ -33,4 +33,10 @@ _defineProperty(EventType, "APPLICATION_CONTEXT_CHANGE", "APPLICATION_CONTEXT_CH
33
33
 
34
34
  _defineProperty(EventType, "MESSAGE_ARRIVED", "MESSAGE_ARRIVED");
35
35
 
36
- _defineProperty(EventType, "DATA_ARRIVED", "DATA_ARRIVED");
36
+ _defineProperty(EventType, "DATA_ARRIVED", "DATA_ARRIVED");
37
+
38
+ _defineProperty(EventType, "CALENDAR_DATE_CLICK", "CALENDAR_DATE_CLICK");
39
+
40
+ _defineProperty(EventType, "CALENDAR_EVENT_START", "CALENDAR_EVENT_START");
41
+
42
+ _defineProperty(EventType, "SOCKET_CONNECT", "SOCKET_CONNECT");
@@ -21,7 +21,7 @@ class LoadDataActionHandler {
21
21
  }
22
22
 
23
23
  execute(actionConfig, event, component, currentViewId) {
24
- if (!_Utils.default.isNull(component)) {
24
+ if (!_Utils.default.isNull(component) && !_Utils.default.isNull(component.api)) {
25
25
  component.api.loadData(actionConfig, event);
26
26
  }
27
27
  }
@@ -15,22 +15,12 @@ var _ApplicationContext = _interopRequireWildcard(require("../ApplicationContext
15
15
 
16
16
  var _DynamicJS = require("../DynamicJS");
17
17
 
18
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
18
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
19
19
 
20
20
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- 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); } }
25
-
26
- 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); }); }; }
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(_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; } } }; }
29
-
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
33
-
34
24
  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; }
35
25
 
36
26
  class Observable {
@@ -41,61 +31,31 @@ class Observable {
41
31
  if (!_Utils.default.isNull(eventHandlingConfig)) {
42
32
  let subscriptions = eventHandlingConfig.subscriptions;
43
33
 
44
- var _iterator = _createForOfIteratorHelper(subscriptions),
45
- _step;
46
-
47
- try {
48
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
49
- const subscription = _step.value;
50
- this.addSubscription(new _EventListener.default(componentHandle, viewId, !_Utils.default.isNull(subscription.publisher) ? subscription.publisher : componentHandle.api.id, subscription.eventType, subscription.actions));
51
- }
52
- } catch (err) {
53
- _iterator.e(err);
54
- } finally {
55
- _iterator.f();
34
+ for (const subscription of subscriptions) {
35
+ this.addSubscription(new _EventListener.default(componentHandle, viewId, !_Utils.default.isNull(subscription.publisher) ? subscription.publisher : componentHandle.api.id, subscription.eventType, subscription.actions));
56
36
  }
57
37
  }
58
38
  });
59
39
 
60
40
  _defineProperty(this, "addSystemSubscriptions", config => {
61
- if (!_Utils.default.isNull(config.disabled)) {
41
+ if (!_Utils.default.isNull(config.disabled) && typeof config.disabled === 'string') {
62
42
  let matches = config.disabled.match(_DynamicJS.TEMPLATE_REGEX);
63
43
 
64
44
  if (!_Utils.default.isNull(matches)) {
65
- var _iterator2 = _createForOfIteratorHelper(matches),
66
- _step2;
67
-
68
- try {
69
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
70
- const match = _step2.value;
71
- let component = match.replace("@#{", "").replace("}", "");
72
- this.addSystemGeneratedSubscription(component, config.id);
73
- }
74
- } catch (err) {
75
- _iterator2.e(err);
76
- } finally {
77
- _iterator2.f();
45
+ for (const match of matches) {
46
+ let component = match.replace("@#{", "").replace("}", "");
47
+ this.addSystemGeneratedSubscription(component, config.id);
78
48
  }
79
49
  }
80
50
  }
81
51
 
82
- if (!_Utils.default.isNull(config.visible)) {
52
+ if (!_Utils.default.isNull(config.visible) && typeof config.visible === 'string') {
83
53
  let matches = config.visible.match(_DynamicJS.TEMPLATE_REGEX);
84
54
 
85
55
  if (!_Utils.default.isNull(matches)) {
86
- var _iterator3 = _createForOfIteratorHelper(matches),
87
- _step3;
88
-
89
- try {
90
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
91
- const match = _step3.value;
92
- let component = match.replace("@#{", "").replace("}", "");
93
- this.addSystemGeneratedSubscription(component, config.id);
94
- }
95
- } catch (err) {
96
- _iterator3.e(err);
97
- } finally {
98
- _iterator3.f();
56
+ for (const match of matches) {
57
+ let component = match.replace("@#{", "").replace("}", "");
58
+ this.addSystemGeneratedSubscription(component, config.id);
99
59
  }
100
60
  }
101
61
  }
@@ -104,19 +64,9 @@ class Observable {
104
64
  let matches = config.validator.nullable.match(_DynamicJS.TEMPLATE_REGEX);
105
65
 
106
66
  if (!_Utils.default.isNull(matches)) {
107
- var _iterator4 = _createForOfIteratorHelper(matches),
108
- _step4;
109
-
110
- try {
111
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
112
- const match = _step4.value;
113
- let component = match.replace("@#{", "").replace("}", "");
114
- this.addSystemGeneratedSubscription(component, config.id);
115
- }
116
- } catch (err) {
117
- _iterator4.e(err);
118
- } finally {
119
- _iterator4.f();
67
+ for (const match of matches) {
68
+ let component = match.replace("@#{", "").replace("}", "");
69
+ this.addSystemGeneratedSubscription(component, config.id);
120
70
  }
121
71
  }
122
72
  }
@@ -126,29 +76,18 @@ class Observable {
126
76
  let component = _ApplicationContext.default.resolveComponentApi(componentId);
127
77
 
128
78
  if (!_Utils.default.isNull(component)) {
129
- var _iterator5 = _createForOfIteratorHelper(this.systemGeneratedSubscriptions),
130
- _step5;
131
-
132
- try {
133
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
134
- const subscription = _step5.value;
135
-
136
- if (subscription.publisher === componentId) {
137
- let component = _ApplicationContext.default.resolveComponentApi(subscription.subscriber);
138
-
139
- if (!_Utils.default.isNull(component)) {
140
- if (!_Utils.default.isNull(subscription.callback)) {
141
- subscription.callback();
142
- } else if (!_Utils.default.isNull(component.refresh)) {
143
- component.refresh();
144
- }
79
+ for (const subscription of this.systemGeneratedSubscriptions) {
80
+ if (subscription.publisher === componentId) {
81
+ let component = _ApplicationContext.default.resolveComponentApi(subscription.subscriber);
82
+
83
+ if (!_Utils.default.isNull(component)) {
84
+ if (!_Utils.default.isNull(subscription.callback)) {
85
+ subscription.callback();
86
+ } else if (!_Utils.default.isNull(component.refresh)) {
87
+ component.refresh();
145
88
  }
146
89
  }
147
90
  }
148
- } catch (err) {
149
- _iterator5.e(err);
150
- } finally {
151
- _iterator5.f();
152
91
  }
153
92
  }
154
93
  });
@@ -158,21 +97,10 @@ class Observable {
158
97
 
159
98
  let currentViewid = _ApplicationContext.default.getCurrentView().config.id;
160
99
 
161
- var _iterator6 = _createForOfIteratorHelper(this.systemGeneratedSubscriptions),
162
- _step6;
163
-
164
- try {
165
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
166
- const systemGeneratedSubscription = _step6.value;
167
-
168
- if (publisher === systemGeneratedSubscription.publisher && subscriber === systemGeneratedSubscription.subscriber && currentViewid === systemGeneratedSubscription.viewId) {
169
- found = true;
170
- }
100
+ for (const systemGeneratedSubscription of this.systemGeneratedSubscriptions) {
101
+ if (publisher === systemGeneratedSubscription.publisher && subscriber === systemGeneratedSubscription.subscriber && currentViewid === systemGeneratedSubscription.viewId) {
102
+ found = true;
171
103
  }
172
- } catch (err) {
173
- _iterator6.e(err);
174
- } finally {
175
- _iterator6.f();
176
104
  }
177
105
 
178
106
  if (!found) {
@@ -207,85 +135,45 @@ class Observable {
207
135
  * @param be the base event
208
136
  * @return false if any subscriptions cancel the event.
209
137
  */
210
- fireEvent(eventType, be) {
211
- var _this = this;
212
-
213
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
214
- var sourceId, viewId, _iterator7, _step7, subscription, j, action;
215
-
216
- return regeneratorRuntime.wrap(function _callee$(_context) {
217
- while (1) switch (_context.prev = _context.next) {
218
- case 0:
219
- // Components could be unloading on the cases where screens are busy closing,
220
- // meaning the "current" object may be nullified, so we need the null check
221
- // This happens on async events such as RPC_CALL. If there is no view masking,
222
- // the REST call may return while the component has been destroyed, and the source's current could be null
223
- // Proper masking when doing REST CALL should prevent this from happening. The null check provides the sort of defence
224
- if (!_Utils.default.isNull(be.getSource()) && !_Utils.default.isNull(be.getSource().api)) {
225
- sourceId = be.getSource().api.id;
226
- viewId = be.viewId;
227
-
228
- if (!_Utils.default.isNull(sourceId)) {
229
- _iterator7 = _createForOfIteratorHelper(_this.subscriptions);
230
-
231
- try {
232
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
233
- subscription = _step7.value;
234
-
235
- /*if (sourceId === 'jobTitlesMenuIem') {
236
- console.log("CHECKING VIEW [" + subscription.getViewId() + " - " + viewId + "], PUB : ["
237
- + subscription.getPublisher() + " - " + sourceId + "], EVENT: [" + subscription.getEventType() + " - " + eventType + "]");
238
- }*/
239
- if ((subscription.getViewId() === viewId || _ApplicationContext.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType) {
240
- if (!_Utils.default.isNull(subscription.getActions())) {
241
- for (j = 0; j < subscription.getActions().length; j++) {
242
- action = subscription.getActions()[j];
243
-
244
- _ActionHandlers.default.invoke(action, be, subscription);
245
- }
246
- } else if (!_Utils.default.isNull(subscription.getCallback())) {
247
- subscription.getCallback()(be);
248
- }
249
- }
250
- }
251
- } catch (err) {
252
- _iterator7.e(err);
253
- } finally {
254
- _iterator7.f();
255
- }
256
-
257
- _this.processSystemGeneratedSubscriptions(sourceId);
138
+ async fireEvent(eventType, be) {
139
+ // Components could be unloading on the cases where screens are busy closing,
140
+ // meaning the "current" object may be nullified, so we need the null check
141
+ // This happens on async events such as RPC_CALL. If there is no view masking,
142
+ // the REST call may return while the component has been destroyed, and the source's current could be null
143
+ // Proper masking when doing REST CALL should prevent this from happening. The null check provides the sort of defence
144
+ if (!_Utils.default.isNull(be.getSource()) && !_Utils.default.isNull(be.getSource().api)) {
145
+ let sourceId = be.getSource().api.id;
146
+ let viewId = be.viewId;
147
+
148
+ if (!_Utils.default.isNull(sourceId)) {
149
+ for (const subscription of this.subscriptions) {
150
+ if ((subscription.getViewId() === viewId || _ApplicationContext.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType) {
151
+ if (!_Utils.default.isNull(subscription.getActions())) {
152
+ for (let j = 0; j < subscription.getActions().length; j++) {
153
+ let action = subscription.getActions()[j];
154
+
155
+ _ActionHandlers.default.invoke(action, be, subscription);
258
156
  }
157
+ } else if (!_Utils.default.isNull(subscription.getCallback())) {
158
+ subscription.getCallback()(be);
259
159
  }
260
-
261
- case 1:
262
- case "end":
263
- return _context.stop();
160
+ }
264
161
  }
265
- }, _callee);
266
- }))();
162
+
163
+ this.processSystemGeneratedSubscriptions(sourceId);
164
+ }
165
+ }
267
166
  }
268
167
 
269
168
  getNextIndexToRemove(val, prop, listenerCollection) {
270
169
  let counter = 0;
271
170
 
272
- var _iterator8 = _createForOfIteratorHelper(listenerCollection),
273
- _step8;
274
-
275
- try {
276
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
277
- const listener = _step8.value;
278
-
279
- if (listener[prop] === val) {
280
- return counter;
281
- }
282
-
283
- counter++;
171
+ for (const listener of listenerCollection) {
172
+ if (listener[prop] === val) {
173
+ return counter;
284
174
  }
285
- } catch (err) {
286
- _iterator8.e(err);
287
- } finally {
288
- _iterator8.f();
175
+
176
+ counter++;
289
177
  }
290
178
 
291
179
  return -1;
@@ -23,7 +23,7 @@ var _Event = _interopRequireDefault(require("./Event"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- const location = window.location.protocol + "//" + window.location.hostname;
26
+ const location = window.location.protocol + '//' + window.location.hostname;
27
27
 
28
28
  class RouteActionHandler {
29
29
  constructor() {
@@ -45,17 +45,18 @@ class RouteActionHandler {
45
45
  let path = null;
46
46
  let isParent = _Utils.default.isNull(actionConfig.parent) ? false : actionConfig.parent;
47
47
  let isPopup = _Utils.default.isNull(actionConfig.popUp) ? false : actionConfig.popUp;
48
+ let isWindow = _Utils.default.isNull(actionConfig.window) ? false : actionConfig.window;
48
49
 
49
50
  if (!_Utils.default.isNull(actionConfig.pathEvaluator)) {
50
51
  path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event.source.id, actionConfig.pathEvaluator);
51
52
  } else {
52
53
  path = _ApplicationContext.default.isExpression(actionConfig.path) ? _ApplicationContext.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
53
54
 
54
- if ("@#{history.back}" === actionConfig.path && _ApplicationContext.default.graphs.length === 0) {
55
+ if ('@#{history.back}' === actionConfig.path && _ApplicationContext.default.graphs.length === 0) {
55
56
  let historyElement = _ApplicationContext.default.getPreviousHistoryElement();
56
57
 
57
58
  if (historyElement === null) {
58
- console.error("Invalid path. Cannot got back in history");
59
+ console.error('Invalid path. Cannot got back in history');
59
60
  return;
60
61
  }
61
62
 
@@ -82,18 +83,18 @@ class RouteActionHandler {
82
83
 
83
84
  let param = {};
84
85
  param.name = parameter.name;
85
- param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === "TypedValue" ? parameterValue.value : parameterValue;
86
+ param.value = _Utils.default.isNull(parameterValue) ? null : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue;
86
87
  parameterValues.push(param);
87
88
  }
88
89
  }
89
90
 
90
- if ("@#{history.back}" === actionConfig.path && _ApplicationContext.default.graphs.length > 0) {
91
- _ApplicationContext.default.removeLoadedGraph();
91
+ if ('@#{history.back}' === actionConfig.path && _ApplicationContext.default.graphs.length > 0) {
92
+ _ApplicationContext.default.removeLoadedGraph(true);
92
93
  } else {
93
- let url = location + _ApplicationContext.default.getBaseApiUrl() + _ApplicationContext.default.getUIConfigPath() + "/view?version=1.0&id=" + path;
94
+ let url = location + _ApplicationContext.default.getContextRoot() + _ApplicationContext.default.getUIConfigPath() + '/view/get?version=1.0&id=' + path;
94
95
  (0, _RestUtils.sendRequest)(url, data => {
95
96
  if (isParent) {
96
- _ApplicationContext.default.removeLoadedGraph();
97
+ _ApplicationContext.default.removeLoadedGraph(false);
97
98
  }
98
99
 
99
100
  if (data.type === 'view') {
@@ -101,19 +102,52 @@ class RouteActionHandler {
101
102
 
102
103
  if (_Utils.default.isNull(currentView) || !currentView.popUp) {
103
104
  let view = {};
105
+ let defaultModel = {};
106
+
107
+ _Utils.default.updateModel(parameterValues, defaultModel);
108
+
104
109
  view.config = data;
105
- view.handle = {};
106
110
  view.parameters = parameterValues;
107
111
  view.parent = isParent;
108
112
  view.popUp = isPopup;
113
+ view.window = isWindow;
114
+ view.handle = {
115
+ api: {
116
+ get id() {
117
+ return data.id;
118
+ },
119
+
120
+ get model() {
121
+ return defaultModel;
122
+ },
123
+
124
+ getChild: id => {
125
+ return null;
126
+ },
127
+ updateModel: values => {
128
+ _Utils.default.updateModel(values, defaultModel);
129
+ },
130
+ setModelValue: (key, value) => {
131
+ this.defaultModel.key = value;
132
+ },
133
+ getModelValue: key => {
134
+ return this.defaultModel[key];
135
+ },
136
+ loaded: () => {
137
+ return false;
138
+ }
139
+ }
140
+ };
109
141
 
110
142
  _ApplicationContext.default.addView(view, path, forward); // None-existing route to ensure that the current view unloads
111
143
 
112
144
 
113
145
  if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
114
- _ApplicationContext.default.getViewPortHistory().push("/switch");
146
+ console.log("\n\n\n\n\nLOADED VIEW, ", view);
147
+
148
+ _ApplicationContext.default.getViewPortHistory().push('/switch');
115
149
 
116
- _ApplicationContext.default.getViewPortHistory().push("/view/" + data.id);
150
+ _ApplicationContext.default.getViewPortHistory().push('/view/' + data.id);
117
151
  }
118
152
  } else {
119
153
  _ApplicationContext.default.closeCurrentView(false);