@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
@@ -21,7 +21,7 @@ var _asyncMutex = require("async-mutex");
21
21
 
22
22
  var _Observable = _interopRequireDefault(require("../../event/Observable"));
23
23
 
24
- var _ApplicationContext = _interopRequireDefault(require("../../ApplicationContext"));
24
+ var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
25
25
 
26
26
  var _ServiceCallActionHandler = _interopRequireDefault(require("../../event/ServiceCallActionHandler"));
27
27
 
@@ -33,37 +33,13 @@ var _Event = _interopRequireDefault(require("../../event/Event"));
33
33
 
34
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
35
 
36
- 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; }
37
-
38
- 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; }
39
-
40
- 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; }
41
-
42
- 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); } }
43
-
44
- 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); }); }; }
45
-
46
- 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; } } }; }
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
36
  const useStyles = (0, _styles.makeStyles)(theme => ({
61
37
  container: {
62
38
  display: 'flex',
63
39
  flexWrap: 'wrap',
64
40
  width: '100%',
65
- "& tr td": {
66
- verticalAlign: "top"
41
+ '& tr td': {
42
+ verticalAlign: 'top'
67
43
  }
68
44
  },
69
45
  select: {
@@ -78,51 +54,24 @@ const useStyles = (0, _styles.makeStyles)(theme => ({
78
54
  }));
79
55
 
80
56
  const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
81
- const _React$useState = _react.default.useState(!_Utils.default.isNull(props.values) ? props.values : {}),
82
- _React$useState2 = _slicedToArray(_React$useState, 2),
83
- values = _React$useState2[0],
84
- setValues = _React$useState2[1];
57
+ const values = _react.default.useRef(!_Utils.default.isNull(props.values) ? props.values : {});
85
58
 
86
- const _React$useState3 = _react.default.useState(null),
87
- _React$useState4 = _slicedToArray(_React$useState3, 2),
88
- masterValues = _React$useState4[0],
89
- setMasterValues = _React$useState4[1];
59
+ const [masterValues, setMasterValues] = _react.default.useState(null);
90
60
 
91
- const _React$useState5 = _react.default.useState(null),
92
- _React$useState6 = _slicedToArray(_React$useState5, 2),
93
- config = _React$useState6[0],
94
- setConfig = _React$useState6[1];
61
+ const [config, setConfig] = _react.default.useState(_Utils.default.parseConfig(props.config, props.viewId));
95
62
 
96
- const _React$useState7 = _react.default.useState(_Utils.default.isNull(props.config.binder) ? 'PLAIN_OBJECT' : props.config.binder),
97
- _React$useState8 = _slicedToArray(_React$useState7, 1),
98
- binder = _React$useState8[0];
63
+ const [binder] = _react.default.useState(_Utils.default.isNull(props.config.binder) ? 'PLAIN_OBJECT' : props.config.binder);
99
64
 
100
- const _React$useState9 = _react.default.useState([]),
101
- _React$useState10 = _slicedToArray(_React$useState9, 1),
102
- fields = _React$useState10[0];
65
+ const [fields] = _react.default.useState([]);
103
66
 
104
67
  const containerErrorCallback = _react.default.useRef();
105
68
 
106
- const _React$useState11 = _react.default.useState({}),
107
- _React$useState12 = _slicedToArray(_React$useState11, 1),
108
- sectionHandles = _React$useState12[0];
109
-
110
- const _React$useState13 = _react.default.useState([]),
111
- _React$useState14 = _slicedToArray(_React$useState13, 1),
112
- loadedComponents = _React$useState14[0];
69
+ const [sectionHandles] = _react.default.useState({});
113
70
 
114
- const _React$useState15 = _react.default.useState({}),
115
- _React$useState16 = _slicedToArray(_React$useState15, 1),
116
- fieldParentErrors = _React$useState16[0];
71
+ const [fieldParentErrors] = _react.default.useState({});
117
72
 
118
73
  const loadingRef = _react.default.useRef(true);
119
74
 
120
- const _React$useState17 = _react.default.useState(true),
121
- _React$useState18 = _slicedToArray(_React$useState17, 2),
122
- initializing = _React$useState18[0],
123
- setInitializing = _React$useState18[1];
124
-
125
- const mutex = new _asyncMutex.Mutex();
126
75
  let sectionCounter = 0;
127
76
 
128
77
  const api = () => {
@@ -141,22 +90,22 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
141
90
  doHandleChange(id, value);
142
91
  },
143
92
  handleSelectItemChange: (name, options, selectedId) => {
144
- return _handleSelectItemChange(name, options, selectedId);
93
+ return handleSelectItemChange(name, options, selectedId);
145
94
  },
146
95
  handleChange: (id, value) => {
147
96
  doHandleChange(id, value);
148
97
  },
149
98
  getValuePath: (id, values) => {
150
- return _getValuePath(id, values);
99
+ return getValuePath(id, values);
151
100
  },
152
101
  addField: (id, ref, parentId, bindValueToForm) => {
153
- return _addField(id, ref, parentId, bindValueToForm);
102
+ return addField(id, ref, parentId, bindValueToForm);
154
103
  },
155
104
  removeField: id => {
156
- _removeField(id);
105
+ removeField(id);
157
106
  },
158
107
  loadData: (actionConfig, event) => {
159
- _loadData(actionConfig, config, event ? event.data : null);
108
+ loadData(actionConfig, config, event ? event.data : null);
160
109
  },
161
110
  bindData: data => {
162
111
  doBindData(data);
@@ -196,7 +145,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
196
145
  },
197
146
 
198
147
  get model() {
199
- return values;
148
+ return values.current;
200
149
  },
201
150
 
202
151
  set model(model) {
@@ -207,56 +156,36 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
207
156
  get value() {
208
157
  if (loadingRef.current === false) {
209
158
  let data = null;
210
- let currentValue = values;
211
159
  let valid = true;
212
- let parentErrors = {};
160
+ data = {};
161
+ let map = !_Utils.default.isNull(masterValues) ? JSON.parse(JSON.stringify(masterValues)) : {};
213
162
 
214
- if (binder === 'MAP_OBJECT') {
215
- data = {};
216
- let map = !_Utils.default.isNull(masterValues) ? JSON.parse(JSON.stringify(masterValues.map)) : {};
163
+ if (_Utils.default.isNull(map.id)) {
164
+ map.id = values.current.id;
165
+ }
217
166
 
218
- if (_Utils.default.isNull(map.id)) {
219
- map.id = values.id;
167
+ for (const field of fields) {
168
+ if (field.bindValueToForm === false) {
169
+ continue;
220
170
  }
221
171
 
222
- var _iterator = _createForOfIteratorHelper(fields),
223
- _step;
224
-
225
- try {
226
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
227
- const field = _step.value;
228
-
229
- if (field.bindValueToForm === false) {
230
- continue;
231
- }
232
-
233
- let fieldValid = field.handle.api.validate(values, null);
172
+ let fieldValid = field.handle.api.validate(values.current, null);
234
173
 
235
- if (fieldValid === false) {
236
- doValidateParent(field, !fieldValid);
237
- valid = false;
238
- console.log("INVALID FORM FIELD : " + field.handle.api.id);
239
- } else if (valid) {
240
- let id = field.id;
241
-
242
- let path = _getValuePath(id, values);
243
-
244
- map[id] = field.handle.api.parseValue(path.valueObject[path.valueProperty], false);
245
- }
246
- }
247
- } catch (err) {
248
- _iterator.e(err);
249
- } finally {
250
- _iterator.f();
174
+ if (fieldValid === false) {
175
+ console.log("INVALID : " + field.id);
176
+ doValidateParent(field, !fieldValid, false);
177
+ valid = false;
178
+ } else if (valid) {
179
+ let id = field.id;
180
+ let path = getValuePath(id, values.current);
181
+ path.valueObject[path.valueProperty] = field.handle.api.parseValue(path.valueObject[path.valueProperty], false);
251
182
  }
183
+ }
252
184
 
253
- if (binder === 'MAP_OBJECT') {
254
- data.map = map;
255
- } else {
256
- data = map;
257
- }
258
- } else {
259
- data = values;
185
+ data = values.current;
186
+
187
+ if (!_Utils.default.isNull(containerErrorCallback.current) && _ApplicationManager.default.isFormMarkersEnabled()) {
188
+ containerErrorCallback.current(fieldParentErrors);
260
189
  }
261
190
 
262
191
  return valid ? data : null;
@@ -266,7 +195,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
266
195
  },
267
196
 
268
197
  setFieldError: (id, error) => {
269
- return _setFieldError(id, error);
198
+ return setFieldError(id, error);
270
199
  },
271
200
  getChildren: () => {
272
201
  let children = [];
@@ -283,33 +212,13 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
283
212
 
284
213
  let properties = Object.getOwnPropertyNames(sectionHandles);
285
214
 
286
- var _iterator2 = _createForOfIteratorHelper(properties),
287
- _step2;
288
-
289
- try {
290
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
291
- const property = _step2.value;
292
- let sectionHandle = sectionHandles[property];
293
- children.push(sectionHandle);
215
+ for (const property of properties) {
216
+ let sectionHandle = sectionHandles[property];
217
+ children.push(sectionHandle);
294
218
 
295
- var _iterator3 = _createForOfIteratorHelper(sectionHandle.api.getChildren()),
296
- _step3;
297
-
298
- try {
299
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
300
- const child = _step3.value;
301
- children.push(child);
302
- }
303
- } catch (err) {
304
- _iterator3.e(err);
305
- } finally {
306
- _iterator3.f();
307
- }
219
+ for (const child of sectionHandle.api.getChildren()) {
220
+ children.push(child);
308
221
  }
309
- } catch (err) {
310
- _iterator2.e(err);
311
- } finally {
312
- _iterator2.f();
313
222
  }
314
223
 
315
224
  return children;
@@ -318,22 +227,12 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
318
227
  refresh() {
319
228
  let properties = Object.getOwnPropertyNames(sectionHandles);
320
229
 
321
- var _iterator4 = _createForOfIteratorHelper(properties),
322
- _step4;
230
+ for (const property of properties) {
231
+ let sectionHandle = sectionHandles[property];
323
232
 
324
- try {
325
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
326
- const property = _step4.value;
327
- let sectionHandle = sectionHandles[property];
328
-
329
- if (sectionHandle.api.refresh) {
330
- sectionHandle.api.refresh();
331
- }
233
+ if (sectionHandle.api.refresh) {
234
+ sectionHandle.api.refresh();
332
235
  }
333
- } catch (err) {
334
- _iterator4.e(err);
335
- } finally {
336
- _iterator4.f();
337
236
  }
338
237
  }
339
238
 
@@ -351,12 +250,16 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
351
250
  };
352
251
 
353
252
  function updateViewTitle() {
354
- let currentView = _ApplicationContext.default.getCurrentView();
253
+ if (props.viewId) {
254
+ let view = _ApplicationManager.default.getView(props.viewId);
355
255
 
356
- let title = currentView.config.title;
256
+ if (view) {
257
+ let title = view.config.title;
357
258
 
358
- if (title.includes(props.config.id)) {
359
- _ApplicationContext.default.updateAppBarTitle(currentView.config.id, title);
259
+ if (title.includes(props.config.id)) {
260
+ _ApplicationManager.default.updateAppBarTitle(view.config.id, title);
261
+ }
262
+ }
360
263
  }
361
264
  }
362
265
 
@@ -371,28 +274,17 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
371
274
 
372
275
  _Observable.default.processSystemGeneratedSubscriptions(props.config.id);
373
276
 
374
- var _iterator5 = _createForOfIteratorHelper(fields),
375
- _step5;
376
-
377
- try {
378
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
379
- const field = _step5.value;
380
-
381
- _Observable.default.processSystemGeneratedSubscriptions(field.handle.api.id);
382
- }
383
- } catch (err) {
384
- _iterator5.e(err);
385
- } finally {
386
- _iterator5.f();
277
+ for (const field of fields) {
278
+ _Observable.default.processSystemGeneratedSubscriptions(field.handle.api.id);
387
279
  }
388
280
  }
389
281
 
390
- function _loadData(eventConfig, componentConfig, eventData = null) {
282
+ function loadData(eventConfig, componentConfig, eventData = null) {
391
283
  let service = !_Utils.default.isNull(componentConfig.dataService) ? componentConfig.dataService : eventConfig !== null ? eventConfig.dataService : null;
392
- let componentValue = !_Utils.default.isNull(componentConfig.value) ? componentConfig.value : eventConfig !== null ? eventConfig.value : null;
284
+ let componentValue = !_Utils.default.isNull(componentConfig.value) ? _ApplicationManager.default.resolveParameterConfigValue(componentConfig.value, eventData) : eventConfig !== null ? _ApplicationManager.default.resolveParameterConfigValue(eventConfig.value, eventData) : null;
393
285
 
394
286
  if (!_Utils.default.isNull(service)) {
395
- if (service.type === 'remoteObjectProxy') {
287
+ if (service.type === 'rpc') {
396
288
  (0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result => {
397
289
  try {
398
290
  if (!_Utils.default.isNull(result.data)) {
@@ -431,13 +323,17 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
431
323
  return true;
432
324
  } else {
433
325
  if (!_Utils.default.isNull(componentValue)) {
434
- let isEventData = componentValue.toString().startsWith("$event.data");
326
+ if (!_ApplicationManager.default.isExpression(componentValue)) {
327
+ componentValue = _ApplicationManager.default.fillEventDataValue(componentValue, eventData);
328
+ }
329
+
330
+ let isEventData = componentValue.toString().startsWith('$event.data');
435
331
 
436
- if (_ApplicationContext.default.isExpression(componentValue) && !isEventData) {
332
+ if (_ApplicationManager.default.isExpression(componentValue) && !isEventData) {
437
333
  let path = _Utils.default.getPropertyChainPath(componentValue);
438
334
 
439
335
  if (!_Utils.default.isNull(path.valueObject)) {
440
- _Observable.default.addSystemGeneratedSubscription(props.viewId, props.config.id, () => {
336
+ _Observable.default.addSystemGeneratedSubscription(props.viewId, props.viewId, props.config.id, () => {
441
337
  let value = _DynamicJS.default.executeScript("".concat(props.config.id, "ValueEvaluator"), componentValue);
442
338
 
443
339
  if (!_Utils.default.isNull(value)) {
@@ -454,7 +350,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
454
350
  });
455
351
  }
456
352
  } else {
457
- let val = isEventData ? _ApplicationContext.default.resolveExpressionValue(componentValue, eventData) : componentValue;
353
+ let val = isEventData ? _ApplicationManager.default.resolveExpressionValue(componentValue, eventData) : componentValue;
458
354
 
459
355
  if (binder === 'MAP_OBJECT' && _Utils.default.isNull(componentValue.map)) {
460
356
  val = {};
@@ -473,39 +369,59 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
473
369
  }
474
370
  }
475
371
 
372
+ _react.default.useEffect(() => {
373
+ return () => {
374
+ props.handle.api = null;
375
+ };
376
+ }, []);
377
+
476
378
  _react.default.useEffect(() => {
477
379
  props.handle.api = api();
380
+ });
478
381
 
479
- if (initializing) {
480
- let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
382
+ _react.default.useEffect(() => {
383
+ props.handle.api = api();
384
+ let eventHandlingConfig = _Utils.default.isNull(config.eventHandlingConfig) ? {} : config.eventHandlingConfig;
385
+ eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
386
+
387
+ let autoLoadData = _Utils.default.getComponentAttribute(config, 'autoLoadData', null);
388
+
389
+ if (autoLoadData === null || autoLoadData === true) {
390
+ let subscription = {
391
+ publisher: props.viewId,
392
+ eventType: _EventType.default.COMPONENT_LOAD,
393
+ actions: [{
394
+ actionType: 'loadData'
395
+ }]
396
+ };
397
+ eventHandlingConfig.subscriptions.push(subscription);
398
+ } else {
399
+ handleDataArrived();
400
+ }
481
401
 
482
- let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
483
- eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
402
+ _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
484
403
 
485
- let autoLoadData = _Utils.default.getComponentAttribute(parsedConfig, 'autoLoadData', null);
404
+ _Observable.default.addSystemSubscriptions(props.viewId, config);
486
405
 
487
- if (!_ApplicationContext.default.getCurrentView().handle.api.loaded() && autoLoadData === null || autoLoadData === true) {
488
- let subscription = {
489
- publisher: props.viewId,
490
- eventType: _EventType.default.COMPONENT_LOAD,
491
- actions: [{
492
- actionType: "loadData"
493
- }]
494
- };
495
- eventHandlingConfig.subscriptions.push(subscription);
496
- } else {
497
- loadingRef.current = false;
498
- handleDataArrived();
406
+ setConfig(config);
407
+
408
+ for (const field of fields) {
409
+ let handle = field.handle;
410
+
411
+ if (!_Utils.default.isNull(handle)) {
412
+ handle.api.handleLoadComplete();
499
413
  }
414
+ }
500
415
 
501
- _Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
416
+ loadingRef.current = false;
417
+ let event = new _Event.default(props.handle, props.viewId, null);
502
418
 
503
- _Observable.default.addSystemSubscriptions(parsedConfig);
419
+ _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
504
420
 
505
- setConfig(parsedConfig);
506
- setInitializing(false);
507
- }
508
- });
421
+ return () => {
422
+ _Observable.default.clearComponentEventListeners(props.handle);
423
+ };
424
+ }, []);
509
425
 
510
426
  _react.default.useEffect(() => {
511
427
  if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.values)) {
@@ -522,259 +438,19 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
522
438
  const getFieldsFromTab = tab => {
523
439
  let fields = [];
524
440
 
525
- var _iterator6 = _createForOfIteratorHelper(tab.tabPages),
526
- _step6;
527
-
528
- try {
529
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
530
- const tabPage = _step6.value;
531
-
532
- var _iterator7 = _createForOfIteratorHelper(tabPage.components),
533
- _step7;
534
-
535
- try {
536
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
537
- const component = _step7.value;
538
-
539
- if (component.type === "formSection") {
540
- var _iterator8 = _createForOfIteratorHelper(component.components),
541
- _step8;
542
-
543
- try {
544
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
545
- const fieldset = _step8.value;
546
- fields = fields.concat(fieldset.fields);
547
- }
548
- } catch (err) {
549
- _iterator8.e(err);
550
- } finally {
551
- _iterator8.f();
552
- }
553
- }
441
+ for (const tabPage of tab.tabPages) {
442
+ for (const component of tabPage.components) {
443
+ if (component.type === 'formSection') {
444
+ for (const fieldset of component.components) {
445
+ fields = fields.concat(fieldset.fields);
554
446
  }
555
- } catch (err) {
556
- _iterator7.e(err);
557
- } finally {
558
- _iterator7.f();
559
447
  }
560
448
  }
561
- } catch (err) {
562
- _iterator6.e(err);
563
- } finally {
564
- _iterator6.f();
565
449
  }
566
450
 
567
451
  return fields;
568
452
  };
569
453
 
570
- function loadCompleteHandler(_x) {
571
- return _loadCompleteHandler.apply(this, arguments);
572
- }
573
-
574
- function _loadCompleteHandler() {
575
- _loadCompleteHandler = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(id) {
576
- var release, allLoaded, _iterator9, _step9, section, _iterator11, _step11, component, fields, _iterator12, _step12, field, _iterator10, _step10, handle, event;
577
-
578
- return regeneratorRuntime.wrap(function _callee$(_context) {
579
- while (1) switch (_context.prev = _context.next) {
580
- case 0:
581
- if (_Utils.default.isNull(id)) {
582
- _context.next = 68;
583
- break;
584
- }
585
-
586
- _context.next = 3;
587
- return mutex.acquire();
588
-
589
- case 3:
590
- release = _context.sent;
591
- _context.prev = 4;
592
-
593
- if (loadedComponents.includes(id)) {
594
- _context.next = 65;
595
- break;
596
- }
597
-
598
- loadedComponents.push(id);
599
- allLoaded = true;
600
- _iterator9 = _createForOfIteratorHelper(props.config.sections);
601
- _context.prev = 9;
602
-
603
- _iterator9.s();
604
-
605
- case 11:
606
- if ((_step9 = _iterator9.n()).done) {
607
- _context.next = 55;
608
- break;
609
- }
610
-
611
- section = _step9.value;
612
- _iterator11 = _createForOfIteratorHelper(section.components);
613
- _context.prev = 14;
614
-
615
- _iterator11.s();
616
-
617
- case 16:
618
- if ((_step11 = _iterator11.n()).done) {
619
- _context.next = 43;
620
- break;
621
- }
622
-
623
- component = _step11.value;
624
- fields = null;
625
-
626
- if (component.type === 'tab') {
627
- fields = getFieldsFromTab(component);
628
- } else if (component.type === 'fieldSet') {
629
- fields = component.fields;
630
- }
631
-
632
- if (!fields) {
633
- _context.next = 39;
634
- break;
635
- }
636
-
637
- _iterator12 = _createForOfIteratorHelper(fields);
638
- _context.prev = 22;
639
-
640
- _iterator12.s();
641
-
642
- case 24:
643
- if ((_step12 = _iterator12.n()).done) {
644
- _context.next = 31;
645
- break;
646
- }
647
-
648
- field = _step12.value;
649
-
650
- if (loadedComponents.includes(field.id)) {
651
- _context.next = 29;
652
- break;
653
- }
654
-
655
- allLoaded = false;
656
- return _context.abrupt("break", 31);
657
-
658
- case 29:
659
- _context.next = 24;
660
- break;
661
-
662
- case 31:
663
- _context.next = 36;
664
- break;
665
-
666
- case 33:
667
- _context.prev = 33;
668
- _context.t0 = _context["catch"](22);
669
-
670
- _iterator12.e(_context.t0);
671
-
672
- case 36:
673
- _context.prev = 36;
674
-
675
- _iterator12.f();
676
-
677
- return _context.finish(36);
678
-
679
- case 39:
680
- if (allLoaded) {
681
- _context.next = 41;
682
- break;
683
- }
684
-
685
- return _context.abrupt("break", 43);
686
-
687
- case 41:
688
- _context.next = 16;
689
- break;
690
-
691
- case 43:
692
- _context.next = 48;
693
- break;
694
-
695
- case 45:
696
- _context.prev = 45;
697
- _context.t1 = _context["catch"](14);
698
-
699
- _iterator11.e(_context.t1);
700
-
701
- case 48:
702
- _context.prev = 48;
703
-
704
- _iterator11.f();
705
-
706
- return _context.finish(48);
707
-
708
- case 51:
709
- if (allLoaded) {
710
- _context.next = 53;
711
- break;
712
- }
713
-
714
- return _context.abrupt("break", 55);
715
-
716
- case 53:
717
- _context.next = 11;
718
- break;
719
-
720
- case 55:
721
- _context.next = 60;
722
- break;
723
-
724
- case 57:
725
- _context.prev = 57;
726
- _context.t2 = _context["catch"](9);
727
-
728
- _iterator9.e(_context.t2);
729
-
730
- case 60:
731
- _context.prev = 60;
732
-
733
- _iterator9.f();
734
-
735
- return _context.finish(60);
736
-
737
- case 63:
738
- if (allLoaded) {
739
- _iterator10 = _createForOfIteratorHelper(fields);
740
-
741
- try {
742
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
743
- field = _step10.value;
744
- handle = field.handle;
745
-
746
- if (!_Utils.default.isNull(handle)) {
747
- handle.api.handleLoadComplete();
748
- }
749
- }
750
- } catch (err) {
751
- _iterator10.e(err);
752
- } finally {
753
- _iterator10.f();
754
- }
755
- }
756
-
757
- if (allLoaded && !_Utils.default.isNull(props.loadCompleteHandler)) {
758
- props.loadCompleteHandler(props.config.id);
759
- event = new _Event.default(props.handle, props.viewId, null);
760
-
761
- _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
762
- }
763
-
764
- case 65:
765
- _context.prev = 65;
766
- release();
767
- return _context.finish(65);
768
-
769
- case 68:
770
- case "end":
771
- return _context.stop();
772
- }
773
- }, _callee, null, [[4,, 65, 68], [9, 57, 60, 63], [14, 45, 48, 51], [22, 33, 36, 39]]);
774
- }));
775
- return _loadCompleteHandler.apply(this, arguments);
776
- }
777
-
778
454
  const transformDataObject = data => {
779
455
  let formValues = null;
780
456
 
@@ -823,10 +499,10 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
823
499
  field.handle.api.clear();
824
500
  }
825
501
 
826
- values.id = null;
502
+ values.current = {};
827
503
 
828
504
  if (!_Utils.default.isNull(props.valueChangeHandler)) {
829
- props.valueChangeHandler(values);
505
+ props.valueChangeHandler({});
830
506
  }
831
507
  }
832
508
 
@@ -836,8 +512,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
836
512
  data = data.map;
837
513
  }
838
514
 
839
- for (var _i2 = 0, _Object$keys = Object.keys(data); _i2 < _Object$keys.length; _i2++) {
840
- const key = _Object$keys[_i2];
515
+ for (const key of Object.keys(data)) {
841
516
  let field = getField(key);
842
517
 
843
518
  if (!_Utils.default.isNull(field)) {
@@ -852,19 +527,17 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
852
527
 
853
528
  for (let i = 0; i < fields.length; i++) {
854
529
  let field = fields[i];
855
-
856
- let path = _getValuePath(field.id, parsedValues);
857
-
530
+ let path = getValuePath(field.id, parsedValues);
858
531
  let objectValue = path.valueObject[path.valueProperty];
859
532
 
860
533
  if (!_Utils.default.isNull(field.handle.api)) {
861
534
  path.valueObject[path.valueProperty] = field.handle.api.parseValue(objectValue, true);
862
535
  } else {
863
- console.error("NULL field reference while parsing form value - " + field.id);
536
+ console.error('NULL field reference while parsing form value - ' + field.id);
864
537
  }
865
538
  }
866
539
 
867
- setValues(parsedValues);
540
+ values.current = parsedValues;
868
541
 
869
542
  if (!_Utils.default.isNull(props.dataArrivedHandler)) {
870
543
  props.dataArrivedHandler(parsedValues);
@@ -891,7 +564,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
891
564
  return null;
892
565
  };
893
566
 
894
- const _removeField = id => {
567
+ const removeField = id => {
895
568
  for (let i = 0; i < fields.length; i++) {
896
569
  if (fields[i].id === id) {
897
570
  fields.splice(i, 1);
@@ -899,9 +572,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
899
572
  }
900
573
  };
901
574
 
902
- function doValidateParent(field, invalid) {
903
- let hasErrors = false;
904
-
575
+ function doValidateParent(field, invalid, updateErrors = true) {
905
576
  if (!_Utils.default.isNull(field.parentId)) {
906
577
  let isParentInvalid = invalid;
907
578
 
@@ -911,21 +582,22 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
911
582
  }
912
583
  }
913
584
 
914
- hasErrors = hasErrors || isParentInvalid;
915
585
  fieldParentErrors[field.parentId] = isParentInvalid;
916
586
  }
917
587
 
918
- if (!_Utils.default.isNull(containerErrorCallback.current) && _ApplicationContext.default.isFormMarkersEnabled()) {
588
+ if (updateErrors && !_Utils.default.isNull(containerErrorCallback.current) && _ApplicationManager.default.isFormMarkersEnabled()) {
919
589
  containerErrorCallback.current(fieldParentErrors);
920
590
  }
591
+
592
+ return fieldParentErrors;
921
593
  }
922
594
 
923
595
  const validateField = (field, id, value) => {
924
596
  if (loadingRef.current === false) {
925
597
  field.error = null;
926
- let invalid = field.handle.api.validate(_objectSpread(_objectSpread({}, values), {}, {
598
+ let invalid = field.handle.api.validate({ ...values.current,
927
599
  [id]: value
928
- }), value) === false;
600
+ }, value) === false;
929
601
  doValidateParent(field, invalid);
930
602
  return invalid;
931
603
  }
@@ -933,16 +605,16 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
933
605
  return true;
934
606
  };
935
607
 
936
- const _getValuePath = (id, vals) => {
608
+ const getValuePath = (id, vals) => {
937
609
  let path = {};
938
610
  let currentValues = vals;
939
611
 
940
612
  if (_Utils.default.isNull(vals)) {
941
- currentValues = values;
613
+ currentValues = values.current;
942
614
  }
943
615
 
944
616
  if (!_Utils.default.isNull(currentValues)) {
945
- let tokens = id.split(".");
617
+ let tokens = id.split('.');
946
618
 
947
619
  if (tokens.length === 1) {
948
620
  path.valueObject = currentValues;
@@ -970,7 +642,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
970
642
  };
971
643
 
972
644
  const doHandleChange = (id, value) => {
973
- let path = _getValuePath(id, null);
645
+ let path = getValuePath(id, null);
974
646
 
975
647
  if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.valueProperty) && loadingRef.current === false) {
976
648
  path.valueObject[path.valueProperty] = value;
@@ -987,8 +659,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
987
659
  if (!_Utils.default.isNull(validationGroup)) {
988
660
  if (field !== groupField && validationGroup === field.handle.api.getValidationGroup()) {
989
661
  let groupFieldId = groupField.handle.api.id;
990
-
991
- let gridFieldPath = _getValuePath(groupFieldId, null);
662
+ let gridFieldPath = getValuePath(groupFieldId, null);
992
663
 
993
664
  if (!_Utils.default.isNull(gridFieldPath)) {
994
665
  let groupFieldVal = gridFieldPath.valueObject[gridFieldPath.valueProperty];
@@ -1000,20 +671,20 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1000
671
  }
1001
672
 
1002
673
  if (!_Utils.default.isNull(props.valueChangeHandler)) {
1003
- props.valueChangeHandler(invalid ? null : values, id, value);
674
+ props.valueChangeHandler(invalid ? null : values.current, id, value);
1004
675
  }
1005
676
  }
1006
677
 
1007
- let isMarkersEnabled = _ApplicationContext.default.isFormMarkersEnabled();
1008
-
1009
- _ApplicationContext.default.enableFormMarkers(false);
678
+ _ApplicationManager.default.enableFormMarkers(false);
1010
679
 
1011
680
  _Observable.default.processSystemGeneratedSubscriptions(props.config.id);
1012
681
 
1013
- _ApplicationContext.default.enableFormMarkers(isMarkersEnabled);
682
+ let event = new _Event.default(props.handle, props.viewId, values.current);
683
+
684
+ _Observable.default.fireEvent(_EventType.default.VALUE_CHANGE, event);
1014
685
  };
1015
686
 
1016
- const _setFieldError = (id, error) => {
687
+ const setFieldError = (id, error) => {
1017
688
  let field = getField(id);
1018
689
 
1019
690
  if (!_Utils.default.isNull(field)) {
@@ -1021,14 +692,13 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1021
692
  }
1022
693
  };
1023
694
 
1024
- const _addField = (id, handle, parentId, bindValueToForm) => {
695
+ const addField = (id, handle, parentId, bindValueToForm) => {
1025
696
  let field = getField(id);
1026
697
  let error = null;
1027
698
 
1028
699
  if (!_Utils.default.isNull(field)) {
1029
700
  error = field.error;
1030
-
1031
- _removeField(id);
701
+ removeField(id);
1032
702
  }
1033
703
 
1034
704
  field = {};
@@ -1038,10 +708,15 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1038
708
  field.bindValueToForm = bindValueToForm;
1039
709
  field.parentId = parentId;
1040
710
  fields.push(field);
711
+
712
+ if (values.current) {
713
+ parseValues(values.current);
714
+ }
715
+
1041
716
  return field;
1042
717
  };
1043
718
 
1044
- const _handleSelectItemChange = (name, options, selectedId) => {
719
+ const handleSelectItemChange = (name, options, selectedId) => {
1045
720
  let selectedValue = null;
1046
721
 
1047
722
  for (let i = 0; i < options.length; i++) {
@@ -1055,9 +730,9 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1055
730
  };
1056
731
 
1057
732
  const updateValue = (name, value) => {
1058
- props.valueChangeHandler(_objectSpread(_objectSpread({}, values), {}, {
733
+ props.valueChangeHandler({ ...values.current,
1059
734
  [name]: value
1060
- }));
735
+ });
1061
736
  };
1062
737
 
1063
738
  function render(form) {
@@ -1073,12 +748,11 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1073
748
  config: section,
1074
749
  handle: createSectionHandle(section),
1075
750
  ref: /*#__PURE__*/_react.default.createRef(),
1076
- loadCompleteHandler: loadCompleteHandler,
1077
751
  form: () => {
1078
752
  return !_Utils.default.isNull(props.handle.api) ? props.handle.api : api();
1079
753
  },
1080
754
  viewId: props.viewId,
1081
- values: values
755
+ values: values.current
1082
756
  }));
1083
757
  }));
1084
758
  }
@@ -1092,7 +766,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
1092
766
  overflow: 'auto',
1093
767
  maxHeight: '70vh'
1094
768
  }, props.config) : null
1095
- }, !_Utils.default.isNull(props.config.id) ? !initializing ? render(props.config) : null : /*#__PURE__*/_react.default.createElement("div", null, "ERROR: A form must have an ID"));
769
+ }, !_Utils.default.isNull(props.config.id) ? render(props.config) : /*#__PURE__*/_react.default.createElement("div", null, "ERROR: A form must have an ID"));
1096
770
  }));
1097
771
 
1098
772
  var _default = Form;