@agilemotion/oui-react-js 1.2.6 → 1.2.8

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 (133) hide show
  1. package/dist/ApplicationContext.js +244 -250
  2. package/dist/BasicApp.js +53 -97
  3. package/dist/BasicAppHome.js +86 -122
  4. package/dist/DynamicJS.js +65 -88
  5. package/dist/RestUtils.js +284 -315
  6. package/dist/TypedValue.js +15 -18
  7. package/dist/Utils.js +224 -262
  8. package/dist/assets/jss/components/authNavbarStyle.js +162 -164
  9. package/dist/assets/jss/components/buttonStyle.js +1 -1
  10. package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
  11. package/dist/assets/jss/components/cardBodyStyle.js +1 -1
  12. package/dist/assets/jss/components/cardFooterStyle.js +1 -1
  13. package/dist/assets/jss/components/cardHeaderStyle.js +1 -1
  14. package/dist/assets/jss/components/cardIconStyle.js +1 -1
  15. package/dist/assets/jss/components/cardStyle.js +1 -1
  16. package/dist/assets/jss/components/cardTextStyle.js +1 -1
  17. package/dist/assets/jss/components/customDropdownStyle.js +192 -194
  18. package/dist/assets/jss/components/customInputStyle.js +1 -1
  19. package/dist/assets/jss/components/dropdownStyle.js +107 -109
  20. package/dist/assets/jss/components/footerStyle.js +1 -1
  21. package/dist/assets/jss/components/headerLinksStyle.js +95 -97
  22. package/dist/assets/jss/components/headerStyle.js +60 -62
  23. package/dist/assets/jss/components/navbarLinksStyle.js +137 -139
  24. package/dist/assets/jss/components/navbarStyle.js +71 -73
  25. package/dist/assets/jss/components/sidebarStyle.js +453 -455
  26. package/dist/assets/jss/components/typographyStyle.js +1 -1
  27. package/dist/assets/jss/rootStyle.js +57 -57
  28. package/dist/assets/jss/views/layoutStyle.js +42 -44
  29. package/dist/assets/jss/views/loginBasicStyle.js +1 -1
  30. package/dist/assets/jss/views/loginStyle.js +87 -89
  31. package/dist/components/AlertBar.js +21 -23
  32. package/dist/components/AlertItem.js +23 -25
  33. package/dist/components/AlertTemplate.js +29 -30
  34. package/dist/components/Button.js +35 -37
  35. package/dist/components/ConfirmationDialog.js +3 -3
  36. package/dist/components/DataGrid.js +250 -276
  37. package/dist/components/DataGridColumn.js +34 -36
  38. package/dist/components/DataGridFilter.js +92 -94
  39. package/dist/components/DataGridHeading.js +32 -38
  40. package/dist/components/DocumentViewer.js +12 -11
  41. package/dist/components/Graph.js +34 -50
  42. package/dist/components/GraphNode.js +53 -56
  43. package/dist/components/HtmlPanel.js +6 -8
  44. package/dist/components/Icon.js +28 -58
  45. package/dist/components/LoadingIndicator.js +2 -2
  46. package/dist/components/PopupView.js +15 -17
  47. package/dist/components/RegularButton.js +20 -20
  48. package/dist/components/TabPage.js +23 -25
  49. package/dist/components/TabPanel.js +34 -34
  50. package/dist/components/TableCellContent.js +34 -34
  51. package/dist/components/TitleBar.js +16 -16
  52. package/dist/components/Toolbar.js +112 -118
  53. package/dist/components/Tooltip.js +35 -43
  54. package/dist/components/Tree.js +54 -60
  55. package/dist/components/card/Card.js +17 -17
  56. package/dist/components/card/CardAvatar.js +10 -10
  57. package/dist/components/card/CardBody.js +14 -14
  58. package/dist/components/card/CardFooter.js +13 -13
  59. package/dist/components/card/CardHeader.js +14 -14
  60. package/dist/components/card/CardIcon.js +7 -7
  61. package/dist/components/card/CardText.js +7 -7
  62. package/dist/components/customInput/CustomInput.js +17 -17
  63. package/dist/components/dashboard/BasicApp.js +25 -25
  64. package/dist/components/dashboard/BasicBusinessApp.js +116 -119
  65. package/dist/components/dashboard/components/Header.js +11 -11
  66. package/dist/components/dashboard/components/LeftDrawer.js +3 -3
  67. package/dist/components/dashboard/components/UserIdentity.js +2 -2
  68. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +85 -127
  69. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +151 -191
  70. package/dist/components/footer/Footer.js +8 -8
  71. package/dist/components/footer/HomeFooter.js +34 -66
  72. package/dist/components/form/BaseField.js +78 -78
  73. package/dist/components/form/Checkbox.js +8 -10
  74. package/dist/components/form/DatePicker.js +15 -19
  75. package/dist/components/form/FieldSet.js +62 -88
  76. package/dist/components/form/Form.js +317 -318
  77. package/dist/components/form/GridField.js +81 -86
  78. package/dist/components/form/LabelField.js +10 -12
  79. package/dist/components/form/LookupField.js +40 -42
  80. package/dist/components/form/Section.js +37 -39
  81. package/dist/components/form/SelectItem.js +35 -39
  82. package/dist/components/form/TextField.js +18 -22
  83. package/dist/components/form/TimePicker.js +15 -19
  84. package/dist/components/form/TransferList.js +83 -91
  85. package/dist/components/form/UploadField.js +135 -145
  86. package/dist/components/grid/GridContainer.js +6 -6
  87. package/dist/components/grid/GridItem.js +6 -6
  88. package/dist/components/layout/CollapsiblePanel.js +18 -20
  89. package/dist/components/layout/Layout.js +70 -72
  90. package/dist/components/layout/View.js +134 -136
  91. package/dist/components/layout/ViewPort.js +56 -98
  92. package/dist/components/menu/CollapsibleMenu.js +26 -28
  93. package/dist/components/menu/MenuBars.js +53 -59
  94. package/dist/components/menu/MenuButton.js +70 -77
  95. package/dist/components/menu/MenuItem.js +15 -17
  96. package/dist/components/menu/MenuLink.js +9 -11
  97. package/dist/components/menu/PopupMenu.js +12 -16
  98. package/dist/components/navbars/AuthNavbar.js +12 -12
  99. package/dist/components/navbars/HomeNavbar.js +175 -222
  100. package/dist/components/navbars/NavbarLinks.js +45 -46
  101. package/dist/components/typography/Danger.js +3 -3
  102. package/dist/components/typography/Info.js +3 -3
  103. package/dist/components/typography/Link.js +3 -3
  104. package/dist/event/ActionHandlers.js +43 -57
  105. package/dist/event/Event.js +13 -16
  106. package/dist/event/EventListener.js +36 -39
  107. package/dist/event/EventType.js +1 -5
  108. package/dist/event/LoadDataActionHandler.js +8 -20
  109. package/dist/event/Observable.js +162 -198
  110. package/dist/event/RouteActionHandler.js +76 -88
  111. package/dist/event/ScriptActionHandler.js +8 -20
  112. package/dist/event/ServiceCallActionHandler.js +28 -40
  113. package/dist/event/SignalGraphActionHandler.js +7 -19
  114. package/dist/js/Addresses.js +15 -27
  115. package/dist/js/DynamicLib.js +11 -14
  116. package/dist/js/Validators.js +5 -6
  117. package/dist/redux/store/ConfigureStore.js +6 -6
  118. package/dist/redux/store/DashboardStore.js +83 -95
  119. package/dist/redux/store/History.js +1 -1
  120. package/dist/redux/store/SecurityStore.js +41 -45
  121. package/dist/security/TokenManager.js +30 -44
  122. package/dist/theme-default.js +1 -1
  123. package/dist/view/Dashboard.js +108 -114
  124. package/dist/view/Settings.js +2 -4
  125. package/dist/view/security/ChangePasswordBasic.js +96 -100
  126. package/dist/view/security/ForgotPassword.js +52 -56
  127. package/dist/view/security/ForgotPasswordBasic.js +48 -54
  128. package/dist/view/security/Login.js +58 -62
  129. package/dist/view/security/LoginBasic.js +50 -54
  130. package/dist/view/security/ResetPassword.js +58 -62
  131. package/dist/view/security/ResetPasswordBasic.js +89 -93
  132. package/dist/view/security/Security.js +12 -12
  133. package/package.json +1 -1
@@ -29,60 +29,50 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symb
29
29
 
30
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
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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
-
36
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
37
-
38
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
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; }
39
33
 
40
34
  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
35
 
42
- var APP_VARIABLE = '__DOLLAR_APPLICATION_OUI_SYS_VAR__';
36
+ const APP_VARIABLE = '__DOLLAR_APPLICATION_OUI_SYS_VAR__';
43
37
  exports.APP_VARIABLE = APP_VARIABLE;
44
- var AVATAR_LISTENER_TYPE = 'AVATAR_LISTENER';
38
+ const AVATAR_LISTENER_TYPE = 'AVATAR_LISTENER';
45
39
  exports.AVATAR_LISTENER_TYPE = AVATAR_LISTENER_TYPE;
46
- var SYSTEM_EVENT = 'SYSTEM_EVENT';
40
+ const SYSTEM_EVENT = 'SYSTEM_EVENT';
47
41
  exports.SYSTEM_EVENT = SYSTEM_EVENT;
48
- var TEMPLATE_TOKEN_REGEX = new RegExp('(([$]{1}[{]{1})(([a-zA-Z0-9_$.@#{}[\\]]*)+){1}([}]{1}))+', 'g');
42
+ const TEMPLATE_TOKEN_REGEX = new RegExp('(([$]{1}[{]{1})(([a-zA-Z0-9_$.@#{}[\\]]*)+){1}([}]{1}))+', 'g');
49
43
  exports.TEMPLATE_TOKEN_REGEX = TEMPLATE_TOKEN_REGEX;
50
44
 
51
- var ApplicationContext = /*#__PURE__*/function () {
52
- function ApplicationContext() {
53
- var _this = this;
54
-
55
- _classCallCheck(this, ApplicationContext);
56
-
57
- _defineProperty(this, "setConfirmDialogHandler", function (handler) {
58
- _this.props.dialogHandler = handler;
45
+ class ApplicationContext {
46
+ constructor() {
47
+ _defineProperty(this, "setConfirmDialogHandler", handler => {
48
+ this.props.dialogHandler = handler;
59
49
  });
60
50
 
61
- _defineProperty(this, "registerLibrary", function (name, lib) {
62
- _this.libs[name] = lib;
51
+ _defineProperty(this, "registerLibrary", (name, lib) => {
52
+ this.libs[name] = lib;
63
53
  });
64
54
 
65
- _defineProperty(this, "setApplicationHistory", function (history) {
66
- _this.props.applicationHistory = history;
55
+ _defineProperty(this, "setApplicationHistory", history => {
56
+ this.props.applicationHistory = history;
67
57
  });
68
58
 
69
- _defineProperty(this, "getApplicationHistory", function () {
70
- return _this.props.applicationHistory;
59
+ _defineProperty(this, "getApplicationHistory", () => {
60
+ return this.props.applicationHistory;
71
61
  });
72
62
 
73
- _defineProperty(this, "setViewPortHistory", function (history) {
74
- _this.props.viewPortHistory = history;
63
+ _defineProperty(this, "setViewPortHistory", history => {
64
+ this.props.viewPortHistory = history;
75
65
  });
76
66
 
77
- _defineProperty(this, "getAppBarTitle", function () {
78
- return _this.props.appBarTitle;
67
+ _defineProperty(this, "getAppBarTitle", () => {
68
+ return this.props.appBarTitle;
79
69
  });
80
70
 
81
- _defineProperty(this, "updateAppBarTitle", function (viewId, title) {
82
- var view = _this.getView(viewId);
71
+ _defineProperty(this, "updateAppBarTitle", (viewId, title) => {
72
+ let view = this.getView(viewId);
83
73
 
84
74
  if (!view.popUp) {
85
- var titleValue = '';
75
+ let titleValue = '';
86
76
 
87
77
  if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
88
78
  titleValue = title;
@@ -90,12 +80,12 @@ var ApplicationContext = /*#__PURE__*/function () {
90
80
  titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
91
81
  }
92
82
 
93
- var _iterator = _createForOfIteratorHelper(_this.navHistory),
83
+ var _iterator = _createForOfIteratorHelper(this.navHistory),
94
84
  _step;
95
85
 
96
86
  try {
97
87
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
98
- var navHistoryElement = _step.value;
88
+ const navHistoryElement = _step.value;
99
89
 
100
90
  if (navHistoryElement.viewId === viewId) {
101
91
  navHistoryElement.title = titleValue;
@@ -107,19 +97,19 @@ var ApplicationContext = /*#__PURE__*/function () {
107
97
  _iterator.f();
108
98
  }
109
99
 
110
- var legendValue = "<span>";
111
- var counter = 0;
100
+ let legendValue = "<span>";
101
+ let counter = 0;
112
102
 
113
- var _iterator2 = _createForOfIteratorHelper(_this.navHistory),
103
+ var _iterator2 = _createForOfIteratorHelper(this.navHistory),
114
104
  _step2;
115
105
 
116
106
  try {
117
107
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
118
- var _navHistoryElement = _step2.value;
119
- legendValue += "".concat(_navHistoryElement.title);
108
+ const navHistoryElement = _step2.value;
109
+ legendValue += "".concat(navHistoryElement.title);
120
110
 
121
- if (counter++ < _this.navHistory.length - 1) {
122
- legendValue += " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:".concat(_this.props.secondaryColor, "'></i> ");
111
+ if (counter++ < this.navHistory.length - 1) {
112
+ legendValue += " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:".concat(this.props.secondaryColor, "'></i> ");
123
113
  }
124
114
  }
125
115
  } catch (err) {
@@ -129,43 +119,42 @@ var ApplicationContext = /*#__PURE__*/function () {
129
119
  }
130
120
 
131
121
  legendValue += "</span>";
132
- _this.props.appBarTitle = legendValue;
133
- var property = {};
122
+ this.props.appBarTitle = legendValue;
123
+ let property = {};
134
124
  property.name = 'title';
135
125
  property.value = legendValue;
136
- var event = new _Event.default(_this, SYSTEM_EVENT, property);
126
+ let event = new _Event.default(this, SYSTEM_EVENT, property);
137
127
 
138
128
  _Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
139
129
  }
140
130
  });
141
131
 
142
- _defineProperty(this, "getViewPortHistory", function () {
143
- return _this.props.viewPortHistory;
132
+ _defineProperty(this, "getViewPortHistory", () => {
133
+ return this.props.viewPortHistory;
144
134
  });
145
135
 
146
- _defineProperty(this, "clear", function () {
136
+ _defineProperty(this, "clear", () => {
147
137
  _Observable.default.clearAllEventListeners();
148
138
 
149
- _this.views.splice(0, _this.views.length);
150
-
151
- _this.fileCache.splice(0, _this.fileCache.length);
139
+ this.views.splice(0, this.views.length);
140
+ this.fileCache.splice(0, this.fileCache.length);
152
141
  });
153
142
 
154
- _defineProperty(this, "getPreviousHistoryElement", function () {
155
- if (_this.navHistory.length > 1) {
156
- return _this.navHistory[_this.navHistory.length - 2];
143
+ _defineProperty(this, "getPreviousHistoryElement", () => {
144
+ if (this.navHistory.length > 1) {
145
+ return this.navHistory[this.navHistory.length - 2];
157
146
  }
158
147
 
159
148
  return null;
160
149
  });
161
150
 
162
- _defineProperty(this, "getFileDomainCache", function (domain) {
163
- var _iterator3 = _createForOfIteratorHelper(_this.fileCache),
151
+ _defineProperty(this, "getFileDomainCache", domain => {
152
+ var _iterator3 = _createForOfIteratorHelper(this.fileCache),
164
153
  _step3;
165
154
 
166
155
  try {
167
156
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
168
- var fileCacheElement = _step3.value;
157
+ const fileCacheElement = _step3.value;
169
158
 
170
159
  if (fileCacheElement.domain === domain) {
171
160
  return fileCacheElement;
@@ -180,30 +169,29 @@ var ApplicationContext = /*#__PURE__*/function () {
180
169
  return null;
181
170
  });
182
171
 
183
- _defineProperty(this, "addFile", function (domain, file) {
172
+ _defineProperty(this, "addFile", (domain, file) => {
184
173
  if (_Utils.default.isNull(domain)) {
185
174
  console.error("Please specify file domain");
186
175
  return;
187
176
  }
188
177
 
189
- var fileDomainCache = _this.getFileDomainCache(domain);
178
+ let fileDomainCache = this.getFileDomainCache(domain);
190
179
 
191
180
  if (fileDomainCache === null) {
192
181
  fileDomainCache = {};
193
182
  fileDomainCache.domain = domain;
194
183
  fileDomainCache.files = [];
195
-
196
- _this.fileCache.push(fileDomainCache);
184
+ this.fileCache.push(fileDomainCache);
197
185
  }
198
186
 
199
- var cachedFile = null;
187
+ let cachedFile = null;
200
188
 
201
189
  var _iterator4 = _createForOfIteratorHelper(fileDomainCache.files),
202
190
  _step4;
203
191
 
204
192
  try {
205
193
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
206
- var domainFile = _step4.value;
194
+ const domainFile = _step4.value;
207
195
 
208
196
  if (domainFile.correlationId === file.correlationId) {
209
197
  cachedFile = domainFile;
@@ -222,28 +210,27 @@ var ApplicationContext = /*#__PURE__*/function () {
222
210
  }
223
211
  });
224
212
 
225
- _defineProperty(this, "addView", function (view, path, forward) {
213
+ _defineProperty(this, "addView", (view, path, forward) => {
226
214
  if (!view.popUp) {
227
- _this.closeCurrentView(forward);
215
+ this.closeCurrentView(forward);
228
216
 
229
217
  if (!forward) {
230
- _this.navHistory.pop();
218
+ this.navHistory.pop();
231
219
  }
232
220
  } else {
233
- _this.props.dialogHandler.openPopupView(view);
221
+ this.props.dialogHandler.openPopupView(view);
234
222
  }
235
223
 
236
224
  if (view.parent) {
237
- _this.navHistory.splice(0, _this.navHistory.length);
225
+ this.navHistory.splice(0, this.navHistory.length);
238
226
 
239
- var _iterator5 = _createForOfIteratorHelper(_this.views),
227
+ var _iterator5 = _createForOfIteratorHelper(this.views),
240
228
  _step5;
241
229
 
242
230
  try {
243
231
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
244
- var contextView = _step5.value;
245
-
246
- _this.closeView(contextView.handle.api.id, forward);
232
+ const contextView = _step5.value;
233
+ this.closeView(contextView.handle.api.id, forward);
247
234
  }
248
235
  } catch (err) {
249
236
  _iterator5.e(err);
@@ -252,56 +239,53 @@ var ApplicationContext = /*#__PURE__*/function () {
252
239
  }
253
240
  }
254
241
 
255
- var historyElement = {};
242
+ let historyElement = {};
256
243
  historyElement.viewId = view.config.id;
257
244
  historyElement.path = path;
258
-
259
- _this.navHistory.push(historyElement);
260
-
261
- _this.views.push(view);
245
+ this.navHistory.push(historyElement);
246
+ this.views.push(view);
262
247
  });
263
248
 
264
- _defineProperty(this, "getCurrentView", function () {
265
- return _this.views[_this.views.length - 1];
249
+ _defineProperty(this, "getCurrentView", () => {
250
+ return this.views[this.views.length - 1];
266
251
  });
267
252
 
268
- _defineProperty(this, "closeCurrentView", function (forward) {
269
- var currentView = _this.views[_this.views.length - 1];
253
+ _defineProperty(this, "closeCurrentView", forward => {
254
+ let currentView = this.views[this.views.length - 1];
270
255
 
271
256
  if (!_Utils.default.isNull(currentView)) {
272
- _this.closeView(currentView.handle.api.id, forward);
257
+ this.closeView(currentView.handle.api.id, forward);
273
258
  }
274
259
  });
275
260
 
276
- _defineProperty(this, "closeView", function (viewId, forward) {
261
+ _defineProperty(this, "closeView", (viewId, forward) => {
277
262
  _Observable.default.clearEventListeners(viewId);
278
263
 
279
- for (var i = 0; i < _this.fileCache.length; i++) {
280
- var cacheElement = _this.fileCache[i];
264
+ for (let i = 0; i < this.fileCache.length; i++) {
265
+ let cacheElement = this.fileCache[i];
281
266
 
282
267
  if (cacheElement.domain === viewId) {
283
- _this.fileCache.slice(i, 1);
284
-
268
+ this.fileCache.slice(i, 1);
285
269
  break;
286
270
  }
287
271
  }
288
272
 
289
- var count = 0;
273
+ let count = 0;
290
274
 
291
- var _iterator6 = _createForOfIteratorHelper(_this.views),
275
+ var _iterator6 = _createForOfIteratorHelper(this.views),
292
276
  _step6;
293
277
 
294
278
  try {
295
279
  for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
296
- var view = _step6.value;
280
+ const view = _step6.value;
297
281
 
298
282
  if (view.handle.api.id === viewId) {
299
- _this.views.splice(count, 1);
283
+ this.views.splice(count, 1);
300
284
 
301
285
  if (!view.popUp && !view.parent && (_Utils.default.isNull(forward) || forward === false)) {
302
- _this.navHistory.pop();
286
+ this.navHistory.pop();
303
287
  } else if (view.popUp) {
304
- _this.props.dialogHandler.closePopupView();
288
+ this.props.dialogHandler.closePopupView();
305
289
  }
306
290
  }
307
291
 
@@ -314,13 +298,13 @@ var ApplicationContext = /*#__PURE__*/function () {
314
298
  }
315
299
  });
316
300
 
317
- _defineProperty(this, "getView", function (id) {
318
- var _iterator7 = _createForOfIteratorHelper(_this.views),
301
+ _defineProperty(this, "getView", id => {
302
+ var _iterator7 = _createForOfIteratorHelper(this.views),
319
303
  _step7;
320
304
 
321
305
  try {
322
306
  for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
323
- var view = _step7.value;
307
+ const view = _step7.value;
324
308
 
325
309
  if (id === view.config.id) {
326
310
  return view;
@@ -335,17 +319,17 @@ var ApplicationContext = /*#__PURE__*/function () {
335
319
  return null;
336
320
  });
337
321
 
338
- _defineProperty(this, "resolveComponentApi", function (id) {
322
+ _defineProperty(this, "resolveComponentApi", id => {
339
323
  if (APP_VARIABLE === id) {
340
- return _this.api;
324
+ return this.api;
341
325
  }
342
326
 
343
- var _iterator8 = _createForOfIteratorHelper(_this.graphs),
327
+ var _iterator8 = _createForOfIteratorHelper(this.graphs),
344
328
  _step8;
345
329
 
346
330
  try {
347
331
  for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
348
- var graph = _step8.value;
332
+ const graph = _step8.value;
349
333
 
350
334
  if (graph.id === id) {
351
335
  return graph;
@@ -357,14 +341,14 @@ var ApplicationContext = /*#__PURE__*/function () {
357
341
  _iterator8.f();
358
342
  }
359
343
 
360
- var currentView = _this.views[_this.views.length - 1];
344
+ let currentView = this.views[this.views.length - 1];
361
345
 
362
346
  if (!_Utils.default.isNull(currentView) && !_Utils.default.isNull(currentView.handle)) {
363
347
  if (id === currentView.handle.api.id) {
364
348
  return currentView.handle.api;
365
349
  }
366
350
 
367
- var handle = currentView.handle.api.getChild(id);
351
+ let handle = currentView.handle.api.getChild(id);
368
352
 
369
353
  if (handle !== null) {
370
354
  return handle.api;
@@ -378,8 +362,8 @@ var ApplicationContext = /*#__PURE__*/function () {
378
362
  return null;
379
363
  });
380
364
 
381
- _defineProperty(this, "populateTemplate", function (template, eventData) {
382
- var matches = template.match(TEMPLATE_TOKEN_REGEX);
365
+ _defineProperty(this, "populateTemplate", (template, eventData) => {
366
+ let matches = template.match(TEMPLATE_TOKEN_REGEX);
383
367
 
384
368
  if (!_Utils.default.isNull(matches)) {
385
369
  var _iterator9 = _createForOfIteratorHelper(matches),
@@ -387,20 +371,20 @@ var ApplicationContext = /*#__PURE__*/function () {
387
371
 
388
372
  try {
389
373
  for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
390
- var match = _step9.value;
391
- var expresionContent = match.substring(match.indexOf('{') + 1, match.lastIndexOf('}'));
392
- var expressionValue = "";
374
+ const match = _step9.value;
375
+ let expresionContent = match.substring(match.indexOf('{') + 1, match.lastIndexOf('}'));
376
+ let expressionValue = "";
393
377
 
394
378
  if (expresionContent.startsWith("$event.data") && !_Utils.default.isNull(eventData)) {
395
- var props = expresionContent.replace("$event.data.", "").split(".");
396
- var vo = eventData;
379
+ let props = expresionContent.replace("$event.data.", "").split(".");
380
+ let vo = eventData;
397
381
 
398
382
  var _iterator10 = _createForOfIteratorHelper(props),
399
383
  _step10;
400
384
 
401
385
  try {
402
386
  for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
403
- var prop = _step10.value;
387
+ const prop = _step10.value;
404
388
  vo = vo[prop];
405
389
  }
406
390
  } catch (err) {
@@ -411,7 +395,7 @@ var ApplicationContext = /*#__PURE__*/function () {
411
395
 
412
396
  expressionValue = vo;
413
397
  } else {
414
- expressionValue = _this.resolveExpressionValue(expresionContent);
398
+ expressionValue = this.resolveExpressionValue(expresionContent);
415
399
  }
416
400
 
417
401
  template = template.replace(match, expressionValue);
@@ -426,40 +410,40 @@ var ApplicationContext = /*#__PURE__*/function () {
426
410
  return template;
427
411
  });
428
412
 
429
- _defineProperty(this, "resolveExpressionValue", function (expression) {
430
- var paramExpression = expression.match(/\(([^)]*)\)/);
431
- var baseExpression = !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
432
- var expresionContent = baseExpression.substring(baseExpression.indexOf('{') + 1, baseExpression.indexOf('}'));
433
- var isComponent = baseExpression.startsWith('@#{');
434
- var isLib = baseExpression.startsWith('@@{');
435
- var tokens = expresionContent.split('.');
436
- var idToken = tokens[0];
413
+ _defineProperty(this, "resolveExpressionValue", expression => {
414
+ let paramExpression = expression.match(/\(([^)]*)\)/);
415
+ let baseExpression = !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
416
+ let expresionContent = baseExpression.substring(baseExpression.indexOf('{') + 1, baseExpression.indexOf('}'));
417
+ let isComponent = baseExpression.startsWith('@#{');
418
+ let isLib = baseExpression.startsWith('@@{');
419
+ let tokens = expresionContent.split('.');
420
+ let idToken = tokens[0];
437
421
 
438
422
  if (isComponent) {
439
- return _this.resolveComponentApi(expresionContent);
423
+ return this.resolveComponentApi(expresionContent);
440
424
  } else if (isLib) {
441
425
  if (idToken === 'view') {
442
- idToken = _this.getCurrentView().config.id + '_lib';
426
+ idToken = this.getCurrentView().config.id + '_lib';
443
427
  }
444
428
 
445
- return _this.libs[idToken];
429
+ return this.libs[idToken];
446
430
  }
447
431
 
448
432
  return expression;
449
433
  });
450
434
 
451
- _defineProperty(this, "setExpressionValues", function (obj) {
452
- var isArray = Array.isArray(obj);
453
- var updated = isArray ? [] : {};
454
- Object.keys(obj).forEach(function (key) {
435
+ _defineProperty(this, "setExpressionValues", obj => {
436
+ let isArray = Array.isArray(obj);
437
+ const updated = isArray ? [] : {};
438
+ Object.keys(obj).forEach(key => {
455
439
  if (typeof obj[key] === 'object' && obj[key] !== null) {
456
- updated[key] = _this.setExpressionValues(obj[key]);
440
+ updated[key] = this.setExpressionValues(obj[key]);
457
441
 
458
442
  if (_Utils.default.isNull(updated[key].type)) {
459
443
  updated[key].type = "String";
460
444
  }
461
445
  } else {
462
- var objValue = obj[key];
446
+ let objValue = obj[key];
463
447
 
464
448
  if (typeof objValue === 'function') {
465
449
  objValue = objValue();
@@ -469,14 +453,14 @@ var ApplicationContext = /*#__PURE__*/function () {
469
453
  objValue = null;
470
454
  }
471
455
 
472
- if (_this.isExpression(objValue)) {
473
- var scriptValue = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')), objValue);
456
+ if (this.isExpression(objValue)) {
457
+ let scriptValue = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')), objValue);
474
458
 
475
459
  if (typeof scriptValue === 'undefined') {
476
460
  scriptValue = null;
477
461
  }
478
462
 
479
- var objKey = key === "valueExpression" ? "value" : key;
463
+ let objKey = key === "valueExpression" ? "value" : key;
480
464
  updated[objKey] = !_Utils.default.isNull(scriptValue) && scriptValue.instanceType === 'TypedValue' ? scriptValue.value : scriptValue;
481
465
 
482
466
  if (typeof updated[objKey] === 'undefined') {
@@ -490,29 +474,29 @@ var ApplicationContext = /*#__PURE__*/function () {
490
474
  return updated;
491
475
  });
492
476
 
493
- _defineProperty(this, "resolveParameterConfigValue", function (configValue) {
494
- var json = JSON.stringify(configValue);
495
- var matches = json.match(_DynamicJS.TEMPLATE_REGEX);
477
+ _defineProperty(this, "resolveParameterConfigValue", configValue => {
478
+ let json = JSON.stringify(configValue);
479
+ let matches = json.match(_DynamicJS.TEMPLATE_REGEX);
496
480
 
497
481
  if (!_Utils.default.isNull(matches)) {
498
- return _this.setExpressionValues(configValue);
482
+ return this.setExpressionValues(configValue);
499
483
  } else {
500
484
  return configValue;
501
485
  }
502
486
  });
503
487
 
504
- _defineProperty(this, "resolveParameterValue", function (parameterConfig) {
505
- var val = null;
488
+ _defineProperty(this, "resolveParameterValue", parameterConfig => {
489
+ let val = null;
506
490
 
507
491
  if (_Utils.default.isNull(parameterConfig.value)) {
508
492
  console.error("NULL parameter value expression in : " + JSON.stringify(parameterConfig));
509
493
  return null;
510
494
  }
511
495
 
512
- if (!_this.isExpression(parameterConfig.value)) {
513
- val = _this.resolveParameterConfigValue(parameterConfig.value);
496
+ if (!this.isExpression(parameterConfig.value)) {
497
+ val = this.resolveParameterConfigValue(parameterConfig.value);
514
498
  } else {
515
- var expression = parameterConfig.value;
499
+ let expression = parameterConfig.value;
516
500
  val = _DynamicJS.default.executeScript("resolveParam_".concat(Math.random().toString().replace('.', '_')), expression);
517
501
  }
518
502
 
@@ -528,7 +512,7 @@ var ApplicationContext = /*#__PURE__*/function () {
528
512
  return val;
529
513
  }
530
514
 
531
- var type = null;
515
+ let type = null;
532
516
 
533
517
  if (!_Utils.default.isNull(parameterConfig.type)) {
534
518
  type = parameterConfig.type;
@@ -539,13 +523,13 @@ var ApplicationContext = /*#__PURE__*/function () {
539
523
  return new _TypedValue.default(type, val);
540
524
  });
541
525
 
542
- _defineProperty(this, "setModelValue", function (key, value, viewId) {
543
- _this.getView(viewId).handle.api.setModelValue(key, value);
526
+ _defineProperty(this, "setModelValue", (key, value, viewId) => {
527
+ this.getView(viewId).handle.api.setModelValue(key, value);
544
528
 
545
529
  _Observable.default.processSystemGeneratedSubscriptions(viewId);
546
530
  });
547
531
 
548
- _defineProperty(this, "getId", function () {
532
+ _defineProperty(this, "getId", () => {
549
533
  return "applicationContext";
550
534
  });
551
535
 
@@ -580,132 +564,142 @@ var ApplicationContext = /*#__PURE__*/function () {
580
564
  return ApplicationContext.instance;
581
565
  }
582
566
 
583
- _createClass(ApplicationContext, [{
584
- key: "addApplicationListener",
585
- value: function addApplicationListener(listener) {
586
- this.listeners.push(listener);
587
- }
588
- }, {
589
- key: "refreshUserAvatar",
590
- value: function refreshUserAvatar(avatar) {
591
- var _iterator11 = _createForOfIteratorHelper(this.listeners),
592
- _step11;
567
+ setBaseApiUrl(baseApiUrl) {
568
+ this.props.baseApiUrl = baseApiUrl;
569
+ }
593
570
 
594
- try {
595
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
596
- var listener = _step11.value;
571
+ getBaseApiUrl() {
572
+ return this.props.baseApiUrl;
573
+ }
597
574
 
598
- if (listener.type === AVATAR_LISTENER_TYPE) {
599
- listener.handler(avatar);
600
- }
575
+ setServiceApiPath(serviceApiPath) {
576
+ this.props.serviceApiPath = serviceApiPath;
577
+ }
578
+
579
+ getServiceApiPath() {
580
+ return this.props.serviceApiPath;
581
+ }
582
+
583
+ setUIConfigPath(uiConfigPath) {
584
+ this.props.uiConfigPath = uiConfigPath;
585
+ }
586
+
587
+ getUIConfigPath() {
588
+ return this.props.uiConfigPath;
589
+ }
590
+
591
+ addApplicationListener(listener) {
592
+ this.listeners.push(listener);
593
+ }
594
+
595
+ refreshUserAvatar(avatar) {
596
+ var _iterator11 = _createForOfIteratorHelper(this.listeners),
597
+ _step11;
598
+
599
+ try {
600
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
601
+ const listener = _step11.value;
602
+
603
+ if (listener.type === AVATAR_LISTENER_TYPE) {
604
+ listener.handler(avatar);
601
605
  }
602
- } catch (err) {
603
- _iterator11.e(err);
604
- } finally {
605
- _iterator11.f();
606
606
  }
607
+ } catch (err) {
608
+ _iterator11.e(err);
609
+ } finally {
610
+ _iterator11.f();
607
611
  }
608
- }, {
609
- key: "setApplicationThemeColors",
610
- value: function setApplicationThemeColors(primary, secondary) {
611
- this.props.primaryColor = primary;
612
- this.props.secondaryColor = secondary;
613
- }
614
- }, {
615
- key: "getApplicationPrimaryColor",
616
- value: function getApplicationPrimaryColor() {
617
- return this.props.primaryColor;
618
- }
619
- }, {
620
- key: "openConfirmDialog",
621
- value: function openConfirmDialog(message, resultCallback) {
622
- return this.props.dialogHandler.openDialog(message, resultCallback);
623
- }
624
- }, {
625
- key: "isExpression",
626
- value: function isExpression(objValue) {
627
- return !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
628
- }
629
- /**
630
- * Returns a view configuration with a particular id
631
- *
632
- */
633
-
634
- }, {
635
- key: "removeLoadedGraph",
636
- value: function removeLoadedGraph() {
637
- this.closeCurrentView(false);
638
- this.graphs.splice(0, this.graphs.length);
639
- }
640
- }, {
641
- key: "loadGraph",
642
- value: function loadGraph(isParent, isPopup, config) {
643
- if (isParent && !isPopup) {
644
- this.navHistory.splice(0, this.navHistory.length);
612
+ }
645
613
 
646
- var _iterator12 = _createForOfIteratorHelper(this.views),
647
- _step12;
614
+ setApplicationThemeColors(primary, secondary) {
615
+ this.props.primaryColor = primary;
616
+ this.props.secondaryColor = secondary;
617
+ }
648
618
 
649
- try {
650
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
651
- var contextView = _step12.value;
652
- this.closeView(contextView.handle.api.id, false);
653
- }
654
- } catch (err) {
655
- _iterator12.e(err);
656
- } finally {
657
- _iterator12.f();
658
- }
619
+ getApplicationPrimaryColor() {
620
+ return this.props.primaryColor;
621
+ }
622
+
623
+ openConfirmDialog(message, resultCallback) {
624
+ return this.props.dialogHandler.openDialog(message, resultCallback);
625
+ }
626
+
627
+ isExpression(objValue) {
628
+ return !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
629
+ }
630
+ /**
631
+ * Returns a view configuration with a particular id
632
+ *
633
+ */
659
634
 
660
- this.getViewPortHistory().push("/switch");
661
- var graph = new _Graph.default(_Utils.default.parseConfig(config));
662
- graph.init();
663
- this.graphs.push(graph);
635
+
636
+ removeLoadedGraph() {
637
+ this.closeCurrentView(false);
638
+ this.graphs.splice(0, this.graphs.length);
639
+ }
640
+
641
+ loadGraph(isParent, isPopup, config) {
642
+ if (isParent && !isPopup) {
643
+ this.navHistory.splice(0, this.navHistory.length);
644
+
645
+ var _iterator12 = _createForOfIteratorHelper(this.views),
646
+ _step12;
647
+
648
+ try {
649
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
650
+ const contextView = _step12.value;
651
+ this.closeView(contextView.handle.api.id, false);
652
+ }
653
+ } catch (err) {
654
+ _iterator12.e(err);
655
+ } finally {
656
+ _iterator12.f();
664
657
  }
658
+
659
+ this.getViewPortHistory().push("/switch");
660
+ let graph = new _Graph.default(_Utils.default.parseConfig(config));
661
+ graph.init();
662
+ this.graphs.push(graph);
665
663
  }
666
- }, {
667
- key: "signalGraph",
668
- value: function signalGraph(id, event) {
669
- if (this.graphs.length > 0) {
670
- var graphToSignal = this.graphs[0];
664
+ }
671
665
 
672
- var _iterator13 = _createForOfIteratorHelper(this.graphs),
673
- _step13;
666
+ signalGraph(id, event) {
667
+ if (this.graphs.length > 0) {
668
+ let graphToSignal = this.graphs[0];
674
669
 
675
- try {
676
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
677
- var graph = _step13.value;
670
+ var _iterator13 = _createForOfIteratorHelper(this.graphs),
671
+ _step13;
678
672
 
679
- if (id === graph.id) {
680
- graphToSignal = graph;
681
- break;
682
- }
673
+ try {
674
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
675
+ const graph = _step13.value;
676
+
677
+ if (id === graph.id) {
678
+ graphToSignal = graph;
679
+ break;
683
680
  }
684
- } catch (err) {
685
- _iterator13.e(err);
686
- } finally {
687
- _iterator13.f();
688
681
  }
689
-
690
- graphToSignal.signal(event);
682
+ } catch (err) {
683
+ _iterator13.e(err);
684
+ } finally {
685
+ _iterator13.f();
691
686
  }
687
+
688
+ graphToSignal.signal(event);
692
689
  }
693
- }, {
694
- key: "enableFormMarkers",
695
- value: function enableFormMarkers(enabled) {
696
- this.props.formMarkersEnabled = enabled;
697
- }
698
- }, {
699
- key: "isFormMarkersEnabled",
700
- value: function isFormMarkersEnabled() {
701
- return this.props.formMarkersEnabled;
702
- }
703
- }]);
690
+ }
691
+
692
+ enableFormMarkers(enabled) {
693
+ this.props.formMarkersEnabled = enabled;
694
+ }
695
+
696
+ isFormMarkersEnabled() {
697
+ return this.props.formMarkersEnabled;
698
+ }
704
699
 
705
- return ApplicationContext;
706
- }();
700
+ }
707
701
 
708
- var instance = new ApplicationContext();
702
+ const instance = new ApplicationContext();
709
703
  Object.freeze(instance);
710
704
  var _default = instance;
711
705
  exports.default = _default;