@agilemotion/oui-react-js 1.3.2 → 1.3.4

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 (77) hide show
  1. package/dist/ApplicationContext.js +90 -41
  2. package/dist/BasicAppHome.js +16 -10
  3. package/dist/BusinessPortalApp.js +25 -50
  4. package/dist/BusinessPortalAppHome.js +102 -109
  5. package/dist/RestUtils.js +64 -35
  6. package/dist/Utils.js +47 -1
  7. package/dist/components/AlertBar.js +40 -11
  8. package/dist/components/ConfirmationDialog.js +54 -8
  9. package/dist/components/DataGrid.css +3 -1
  10. package/dist/components/DataGrid.js +149 -82
  11. package/dist/components/DataGridFilter.js +85 -8
  12. package/dist/components/Dialog.js +258 -0
  13. package/dist/components/HtmlPanel.js +103 -4
  14. package/dist/components/Icon.js +52 -0
  15. package/dist/components/PopupView.js +55 -6
  16. package/dist/components/SignaturePanel.js +40 -11
  17. package/dist/components/StepperTitleBar.bck.css +85 -0
  18. package/dist/components/StepperTitleBar.css +53 -54
  19. package/dist/components/StepperTitleBar.js +39 -28
  20. package/dist/components/TabPanel.js +10 -11
  21. package/dist/components/TableCellContent.js +6 -3
  22. package/dist/components/TemplateDesigner.css +13 -0
  23. package/dist/components/TemplateDesigner.js +494 -0
  24. package/dist/components/TemplateItemEventHandler.js +440 -0
  25. package/dist/components/TemplateTable.js +222 -0
  26. package/dist/components/TitleBar.js +21 -14
  27. package/dist/components/Toolbar.js +7 -5
  28. package/dist/components/Tree.js +5 -2
  29. package/dist/components/dashboard/BasicBusinessAppDashboard.js +14 -10
  30. package/dist/components/dashboard/BusinessPortalAppDashboard.js +79 -34
  31. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +1 -1
  32. package/dist/components/dashboard/components/portal/Workspace.css +6 -6
  33. package/dist/components/form/AddressSearch.js +140 -0
  34. package/dist/components/form/BaseField.js +31 -6
  35. package/dist/components/form/Checkbox.js +3 -0
  36. package/dist/components/form/DatePicker.js +12 -7
  37. package/dist/components/form/FieldSet.js +246 -71
  38. package/dist/components/form/Form.js +153 -122
  39. package/dist/components/form/GridField.js +3 -2
  40. package/dist/components/form/ImageEditor.js +461 -0
  41. package/dist/components/form/LabelField.js +2 -2
  42. package/dist/components/form/LookupField.js +16 -4
  43. package/dist/components/form/RadioGroup.js +107 -0
  44. package/dist/components/form/Section.js +58 -19
  45. package/dist/components/form/SelectItem.js +5 -3
  46. package/dist/components/form/SignatureTemplateDesignerField.js +46 -0
  47. package/dist/components/form/TextField.js +5 -9
  48. package/dist/components/form/TransferList.js +7 -7
  49. package/dist/components/form/UploadField.js +93 -42
  50. package/dist/components/form/noimage-person.png +0 -0
  51. package/dist/components/form/noimage.png +0 -0
  52. package/dist/components/form/transparent.jpeg +0 -0
  53. package/dist/components/layout/CollapsiblePanel.js +0 -6
  54. package/dist/components/layout/Layout.js +41 -20
  55. package/dist/components/layout/View.css +43 -0
  56. package/dist/components/layout/View.js +76 -156
  57. package/dist/components/layout/ViewPort.js +29 -47
  58. package/dist/components/navbars/HomeNavbar.js +31 -6
  59. package/dist/components/navbars/PortalNavbar.css +2 -2
  60. package/dist/components/navbars/PortalNavbar.js +125 -36
  61. package/dist/components/signatures/AgilitySignaturePanel.js +312 -0
  62. package/dist/components/signatures/DocumentContainer.css +33 -0
  63. package/dist/components/signatures/DocumentContainer.js +206 -0
  64. package/dist/components/signatures/ImageSignatureInput.js +265 -0
  65. package/dist/components/signatures/ResponsiveTable.js +1 -3
  66. package/dist/components/signatures/SignatureInput.js +303 -0
  67. package/dist/components/signatures/SignatureInputProps.js +17 -11
  68. package/dist/components/signatures/SignatureTemplateDesigner.js +186 -77
  69. package/dist/components/signatures/transparent.jpeg +0 -0
  70. package/dist/event/LoadDataActionHandler.js +1 -1
  71. package/dist/event/Observable.js +1 -1
  72. package/dist/event/RouteActionHandler.js +17 -4
  73. package/dist/event/ServiceCallActionHandler.js +7 -3
  74. package/dist/js/Addresses.js +16 -9
  75. package/dist/view/Dashboard.js +10 -6
  76. package/dist/view/security/LoginBusinessPortal.js +1 -0
  77. package/package.json +4 -1
@@ -0,0 +1,43 @@
1
+ .view {
2
+ padding: 0 32px;
3
+ background-color: #ffffff;
4
+ }
5
+
6
+ /* Smartphones (landscape); */
7
+ @media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
8
+ .view {
9
+ padding: 0 16px;
10
+ }
11
+ }
12
+
13
+ /* Smartphones (portrait); */
14
+ @media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
15
+ .view {
16
+ padding: 0 16px;
17
+ }
18
+ }
19
+
20
+ /* iPads (portrait and landscape); */
21
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
22
+ .view {
23
+ padding: 0 24px;
24
+ }
25
+ }
26
+
27
+ /* iPad 3 */
28
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
29
+ .view {
30
+ padding: 0 24px;
31
+ }
32
+ }
33
+
34
+ /* small desktop screens */
35
+ @media only screen and (max-width : 600px) {
36
+ }
37
+
38
+ /* low resolution desktop */
39
+ @media only screen and (max-width : 1200px) {
40
+ .view {
41
+
42
+ }
43
+ }
@@ -11,8 +11,6 @@ var _Utils = _interopRequireDefault(require("../../Utils"));
11
11
 
12
12
  var _Observable = _interopRequireDefault(require("../../event/Observable"));
13
13
 
14
- var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
15
-
16
14
  var _Layout = require("./Layout");
17
15
 
18
16
  var _ApplicationContext = _interopRequireDefault(require("../../ApplicationContext"));
@@ -27,6 +25,8 @@ var _DynamicJS = _interopRequireWildcard(require("./../../DynamicJS"));
27
25
 
28
26
  var _DynamicLib = _interopRequireDefault(require("../../js/DynamicLib"));
29
27
 
28
+ require("./View.css");
29
+
30
30
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
31
31
 
32
32
  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; }
@@ -54,7 +54,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
54
54
  const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
55
55
  const _React$useState = _react.default.useState({}),
56
56
  _React$useState2 = _slicedToArray(_React$useState, 1),
57
- layoutHandles = _React$useState2[0];
57
+ layoutHandle = _React$useState2[0];
58
58
 
59
59
  const _React$useState3 = _react.default.useState({}),
60
60
  _React$useState4 = _slicedToArray(_React$useState3, 1),
@@ -134,13 +134,8 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
134
134
  props.handle.api = api();
135
135
 
136
136
  if (initializing) {
137
- for (let i = 0; i < props.config.layouts.length; i++) {
138
- let layout = props.config.layouts[i];
139
- layout.key = i;
140
-
141
- if (_Utils.default.isNull(layout.id)) {
142
- layout.id = props.config.id + '_' + i;
143
- }
137
+ if (_Utils.default.isNull(props.config.layout.id)) {
138
+ props.config.layout.id = props.config.id + '_layout';
144
139
  }
145
140
 
146
141
  let parsedConfig = _Utils.default.parseConfig(props.config, props.config.id);
@@ -175,13 +170,13 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
175
170
 
176
171
  function _loadCompleteHandler() {
177
172
  _loadCompleteHandler = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(id) {
178
- var release, currentView, allLoaded, i, layout, properties, _iterator6, _step6, property, children, _iterator7, _step7, child, data, event;
173
+ var release, currentView, children, _iterator4, _step4, child, data, event;
179
174
 
180
175
  return regeneratorRuntime.wrap(function _callee$(_context) {
181
176
  while (1) switch (_context.prev = _context.next) {
182
177
  case 0:
183
178
  if (!(loadingRef.current === true)) {
184
- _context.next = 22;
179
+ _context.next = 6;
185
180
  break;
186
181
  }
187
182
 
@@ -192,120 +187,74 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
192
187
  release = _context.sent;
193
188
  currentView = _ApplicationContext.default.getCurrentView();
194
189
 
195
- if (!(props.config.id === currentView.config.id)) {
196
- _context.next = 22;
197
- break;
198
- }
199
-
200
- _context.prev = 6;
201
- loadedComponents.push(id);
202
- allLoaded = true;
203
- i = 0;
204
-
205
- case 10:
206
- if (!(i < props.config.layouts.length)) {
207
- _context.next = 18;
208
- break;
209
- }
210
-
211
- layout = props.config.layouts[i];
212
-
213
- if (loadedComponents.includes(layout.id)) {
214
- _context.next = 15;
215
- break;
216
- }
217
-
218
- allLoaded = false;
219
- return _context.abrupt("break", 18);
220
-
221
- case 15:
222
- i++;
223
- _context.next = 10;
224
- break;
225
-
226
- case 18:
227
- if (allLoaded === true) {
228
- properties = Object.getOwnPropertyNames(layoutHandles);
229
- _iterator6 = _createForOfIteratorHelper(properties);
230
-
190
+ if (props.config.id === currentView.config.id) {
231
191
  try {
232
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
233
- property = _step6.value;
234
- layout = layoutHandles[property];
235
- children = layout.api.getChildren();
236
- _iterator7 = _createForOfIteratorHelper(children);
192
+ loadedComponents.push(id);
193
+
194
+ if (loadedComponents.includes(props.config.layout.id)) {
195
+ children = layoutHandle.api.getChildren();
196
+ _iterator4 = _createForOfIteratorHelper(children);
237
197
 
238
198
  try {
239
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
240
- child = _step7.value;
199
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
200
+ child = _step4.value;
241
201
 
242
202
  if (!_Utils.default.isNull(child.api) && !_Utils.default.isNull(child.api.refresh)) {
243
203
  child.api.refresh();
244
204
  }
245
205
  }
246
206
  } catch (err) {
247
- _iterator7.e(err);
207
+ _iterator4.e(err);
248
208
  } finally {
249
- _iterator7.f();
209
+ _iterator4.f();
250
210
  }
251
- }
252
- } catch (err) {
253
- _iterator6.e(err);
254
- } finally {
255
- _iterator6.f();
256
- }
257
211
 
258
- if (!props.config.title.match(_DynamicJS.TEMPLATE_REGEX) || props.config.title.includes("@#{view}")) {
259
- _ApplicationContext.default.updateAppBarTitle(props.config.id, props.config.title);
260
- }
212
+ if (!props.config.title.match(_DynamicJS.TEMPLATE_REGEX) || props.config.title.includes("@#{view}")) {
213
+ _ApplicationContext.default.updateAppBarTitle(props.config.id, props.config.title);
214
+ }
261
215
 
262
- data = {};
263
- data.viewId = props.config.id;
264
- event = new _Event.default(props.handle, props.config.id, data);
216
+ data = {};
217
+ data.viewId = props.config.id;
218
+ event = new _Event.default(props.handle, props.config.id, data);
265
219
 
266
- _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
220
+ _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
267
221
 
268
- loadingRef.current = false;
269
- }
222
+ loadingRef.current = false;
270
223
 
271
- case 19:
272
- _context.prev = 19;
273
- release();
274
- return _context.finish(19);
224
+ if (props.loadCallback) {
225
+ props.loadCallback();
226
+ }
227
+ }
228
+ } finally {
229
+ release();
230
+ }
231
+ }
275
232
 
276
- case 22:
233
+ case 6:
277
234
  case "end":
278
235
  return _context.stop();
279
236
  }
280
- }, _callee, null, [[6,, 19, 22]]);
237
+ }, _callee);
281
238
  }));
282
239
  return _loadCompleteHandler.apply(this, arguments);
283
240
  }
284
241
 
285
242
  const createLayoutHandle = (layout, api) => {
286
- if (_Utils.default.isNull(layoutHandles[layout.id])) {
287
- let handle = {};
288
- layoutHandles[layout.id] = handle;
289
- handle.api = api;
290
- return handle;
291
- }
292
-
293
- return layoutHandles[layout.id];
243
+ layoutHandle.api = api;
244
+ return layoutHandle;
294
245
  };
295
246
 
296
- function render(layouts) {
297
- return layouts.map(layout => {
298
- return /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
299
- ref: /*#__PURE__*/_react.default.createRef(),
300
- handleFactory: (layout, api) => {
301
- createLayoutHandle(layout, api);
302
- },
303
- key: layout.key,
304
- config: layout,
305
- viewId: props.config.id,
306
- loadCompleteHandler: loadCompleteHandler,
307
- parent: true
308
- });
247
+ function render(layout) {
248
+ return /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
249
+ ref: /*#__PURE__*/_react.default.createRef(),
250
+ handleFactory: (layout, api) => {
251
+ createLayoutHandle(layout, api);
252
+ },
253
+ key: layout.key,
254
+ config: layout,
255
+ viewId: props.config.id,
256
+ loadCompleteHandler: loadCompleteHandler,
257
+ parent: true
309
258
  });
310
259
  }
311
260
 
@@ -317,36 +266,21 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
317
266
  },
318
267
 
319
268
  get model() {
320
- let properties = Object.getOwnPropertyNames(layoutHandles);
269
+ let children = layoutHandle.api.getChildren();
321
270
 
322
- var _iterator2 = _createForOfIteratorHelper(properties),
271
+ var _iterator2 = _createForOfIteratorHelper(children),
323
272
  _step2;
324
273
 
325
274
  try {
326
275
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
327
- const property = _step2.value;
328
- let layout = layoutHandles[property];
329
- let children = layout.api.getChildren();
276
+ const child = _step2.value;
330
277
 
331
- var _iterator3 = _createForOfIteratorHelper(children),
332
- _step3;
278
+ if (!_Utils.default.isNull(child.api)) {
279
+ let valueGetter = !_Utils.default.isNull(child.api.model) ? child.api.model : !_Utils.default.isNull(child.api.getValue) ? child.api.getValue : child.api.value;
333
280
 
334
- try {
335
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
336
- const child = _step3.value;
337
-
338
- if (!_Utils.default.isNull(child.api)) {
339
- let valueGetter = !_Utils.default.isNull(child.api.getValue) ? child.api.getValue : child.api.value;
340
-
341
- if (!_Utils.default.isNull(valueGetter)) {
342
- model[child.api.id] = typeof valueGetter === 'function' ? valueGetter() : valueGetter;
343
- }
344
- }
281
+ if (!_Utils.default.isNull(valueGetter)) {
282
+ model[child.api.id] = typeof valueGetter === 'function' ? valueGetter() : valueGetter;
345
283
  }
346
- } catch (err) {
347
- _iterator3.e(err);
348
- } finally {
349
- _iterator3.f();
350
284
  }
351
285
  }
352
286
  } catch (err) {
@@ -359,43 +293,27 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
359
293
  },
360
294
 
361
295
  getChild: id => {
362
- let properties = Object.getOwnPropertyNames(layoutHandles);
363
-
364
- var _iterator4 = _createForOfIteratorHelper(properties),
365
- _step4;
366
-
367
- try {
368
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
369
- const property = _step4.value;
370
- let layout = layoutHandles[property];
371
-
372
- if (id === layout.api.id) {
373
- return layout;
374
- }
296
+ if (id === layoutHandle.api.id) {
297
+ return layoutHandle;
298
+ }
375
299
 
376
- let children = layout.api.getChildren();
300
+ let children = layoutHandle.api.getChildren();
377
301
 
378
- var _iterator5 = _createForOfIteratorHelper(children),
379
- _step5;
302
+ var _iterator3 = _createForOfIteratorHelper(children),
303
+ _step3;
380
304
 
381
- try {
382
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
383
- const child = _step5.value;
305
+ try {
306
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
307
+ const child = _step3.value;
384
308
 
385
- if (!_Utils.default.isNull(child.api) && id === child.api.id) {
386
- return child;
387
- }
388
- }
389
- } catch (err) {
390
- _iterator5.e(err);
391
- } finally {
392
- _iterator5.f();
309
+ if (!_Utils.default.isNull(child.api) && id === child.api.id) {
310
+ return child;
393
311
  }
394
312
  }
395
313
  } catch (err) {
396
- _iterator4.e(err);
314
+ _iterator3.e(err);
397
315
  } finally {
398
- _iterator4.f();
316
+ _iterator3.f();
399
317
  }
400
318
 
401
319
  return null;
@@ -408,19 +326,21 @@ const View = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
408
326
  },
409
327
  getModelValue: key => {
410
328
  return model[key];
329
+ },
330
+ loaded: () => {
331
+ return !loadingRef.current;
411
332
  }
412
333
  };
413
334
  };
414
335
 
415
336
  return /*#__PURE__*/_react.default.createElement("div", {
337
+ className: 'view',
416
338
  ref: ref,
417
- style: {
339
+ style: _Utils.default.mergeStyles({
418
340
  minWidth: '128px',
419
- height: '100%',
420
- margin: _Utils.default.getComponentAttribute(props.config, 'margin', 0),
421
- padding: _Utils.default.getComponentAttribute(props.config, 'padding', 0)
422
- }
423
- }, initializing === false ? render(props.config.layouts) : null);
341
+ height: '100%'
342
+ }, props.config)
343
+ }, initializing === false ? render(props.config.layout) : null);
424
344
  }), () => {
425
345
  return true;
426
346
  });
@@ -15,7 +15,7 @@ var _Utils = _interopRequireDefault(require("../../Utils"));
15
15
 
16
16
  var _ApplicationContext = _interopRequireDefault(require("../../ApplicationContext"));
17
17
 
18
- var _ConfirmationDialog = _interopRequireDefault(require("../ConfirmationDialog"));
18
+ var _ConfirmationDialog = require("../ConfirmationDialog");
19
19
 
20
20
  var _PopupView = _interopRequireDefault(require("../PopupView"));
21
21
 
@@ -23,16 +23,20 @@ var _Dashboard = _interopRequireDefault(require("../../view/Dashboard"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- 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; }
27
-
28
- 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; }
29
-
30
26
  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; }
31
27
 
32
28
  class ViewPort extends _react.default.PureComponent {
33
29
  constructor(props) {
34
30
  super(props);
35
31
 
32
+ _defineProperty(this, "openPopupView", view => {
33
+ this.popupViewController.open(view);
34
+ });
35
+
36
+ _defineProperty(this, "closePopupView", () => {
37
+ this.popupViewController.close();
38
+ });
39
+
36
40
  _defineProperty(this, "renderView", routerProps => {
37
41
  let viewId = routerProps.match.params.id;
38
42
 
@@ -49,47 +53,28 @@ class ViewPort extends _react.default.PureComponent {
49
53
  }) : null;
50
54
  });
51
55
 
52
- this.state = {
53
- popupView: null,
54
- confirmDialogOpen: false,
55
- confirmDialogMessage: null,
56
- confirmHandler: result => {
57
- this.setState(_objectSpread(_objectSpread({}, this.state), {}, {
58
- confirmDialogOpen: false
59
- }));
60
- this.state.confirmDialogResultCallback(result);
61
- }
62
- };
63
- }
64
-
65
- openDialog(message, resultCallback) {
66
- if (this.state.confirmDialogOpen) {
67
- console.error("There is already a confirm dialog open");
68
- } else {
69
- this.setState(_objectSpread(_objectSpread({}, this.state), {}, {
70
- confirmDialogOpen: true,
71
- confirmDialogMessage: message,
72
- confirmDialogResultCallback: resultCallback
73
- }));
74
- }
75
- }
76
-
77
- openPopupView(view) {
78
- this.setState(_objectSpread(_objectSpread({}, this.state), {}, {
79
- popupView: view
80
- }));
56
+ this.confirmationDialogController = {};
57
+ this.popupViewController = {};
81
58
  }
59
+ /*openDialog(message, resultCallback) {
60
+ if (this.state.confirmDialogOpen) {
61
+ console.error("There is already a confirm dialog open");
62
+ } else {
63
+ this.setState({
64
+ ...this.state, confirmDialogOpen: true, confirmDialogMessage: message,
65
+ confirmDialogResultCallback: resultCallback
66
+ });
67
+ }
68
+ };*/
82
69
 
83
- closePopupView() {
84
- this.setState(_objectSpread(_objectSpread({}, this.state), {}, {
85
- popupView: null
86
- }));
87
- }
88
70
 
89
71
  componentDidMount() {
72
+ this.confirmationDialogController.openPopupView = this.openPopupView;
73
+ this.confirmationDialogController.closePopupView = this.closePopupView;
74
+
90
75
  _ApplicationContext.default.setViewPortHistory(this.props.history);
91
76
 
92
- _ApplicationContext.default.setConfirmDialogHandler(this);
77
+ _ApplicationContext.default.setConfirmDialogHandler(this.confirmationDialogController);
93
78
 
94
79
  let defaultRoute = !_Utils.default.isNull(this.props.defaultView) ? this.props.defaultView : "/view/dashboard";
95
80
  this.props.history.push(defaultRoute);
@@ -100,16 +85,13 @@ class ViewPort extends _react.default.PureComponent {
100
85
  style: {
101
86
  height: _Utils.default.isNull(this.props.height) ? 'calc(100vh - 90px)' : this.props.height
102
87
  }
103
- }, this.state.popupView !== null ? /*#__PURE__*/_react.default.createElement(_PopupView.default, {
104
- open: this.state.popupView !== null,
105
- view: this.state.popupView
106
- }) : null, /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.default, {
107
- open: this.state.confirmDialogOpen,
108
- message: this.state.confirmDialogMessage,
109
- handler: this.state.confirmHandler
88
+ }, /*#__PURE__*/_react.default.createElement(_PopupView.default, {
89
+ controller: this.popupViewController
110
90
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
111
91
  path: "/view/:id",
112
92
  render: routerProps => this.renderView(routerProps)
93
+ }), /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.ConfirmationDialog, {
94
+ controller: this.confirmationDialogController
113
95
  }));
114
96
  }
115
97
 
@@ -23,6 +23,10 @@ var _Utils = _interopRequireDefault(require("../../Utils"));
23
23
 
24
24
  var _ActionHandlers = _interopRequireDefault(require("../../event/ActionHandlers"));
25
25
 
26
+ var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
27
+
28
+ var _colors = require("material-ui/styles/colors");
29
+
26
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
31
 
28
32
  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; }
@@ -175,7 +179,16 @@ class HomeNavbar extends _react.default.Component {
175
179
  style: {
176
180
  background: this.props.themeTextColor
177
181
  }
178
- })), " ", /*#__PURE__*/_react.default.createElement(_reactstrap.Collapse, {
182
+ })), " ", /*#__PURE__*/_react.default.createElement("div", {
183
+ className: "col-*-*",
184
+ style: {
185
+ height: '48px'
186
+ }
187
+ }, /*#__PURE__*/_react.default.createElement("div", {
188
+ style: {
189
+ width: '80px'
190
+ }
191
+ }, /*#__PURE__*/_react.default.createElement(_reactstrap.Collapse, {
179
192
  navbar: true,
180
193
  isOpen: this.state.collapseOpen
181
194
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.Nav, {
@@ -192,12 +205,24 @@ class HomeNavbar extends _react.default.Component {
192
205
  "data-toggle": "dropdown",
193
206
  nav: true,
194
207
  onClick: e => e.preventDefault()
195
- }, /*#__PURE__*/_react.default.createElement("div", {
196
- className: "photo"
208
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
209
+ "aria-controls": "menu-list-grow",
210
+ style: {
211
+ borderColor: _colors.grey800,
212
+ width: '40px',
213
+ height: '40px',
214
+ padding: '0'
215
+ },
216
+ "aria-haspopup": "true"
197
217
  }, /*#__PURE__*/_react.default.createElement("img", {
198
218
  alt: "...",
199
- src: this.state.avatar
200
- }), " "), " ", /*#__PURE__*/_react.default.createElement("b", {
219
+ src: this.state.avatar,
220
+ width: '36px',
221
+ height: '36px',
222
+ style: {
223
+ borderRadius: '50%'
224
+ }
225
+ })), " ", /*#__PURE__*/_react.default.createElement("b", {
201
226
  className: "caret d-none d-lg-block d-xl-block"
202
227
  }), /*#__PURE__*/_react.default.createElement("p", {
203
228
  className: "d-lg-none"
@@ -220,7 +245,7 @@ class HomeNavbar extends _react.default.Component {
220
245
  onClick: this.props.logoutCallBack
221
246
  }, " ", "Log out", " "), " "), " "), " "), " ", /*#__PURE__*/_react.default.createElement("li", {
222
247
  className: "separator d-lg-none"
223
- })), " "), " "), " "), " ", /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
248
+ })), " "), " "))), " "), " ", /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
224
249
  modalClassName: "modal-search",
225
250
  isOpen: this.state.modalSearch,
226
251
  toggle: this.toggleModalSearch
@@ -17,9 +17,9 @@
17
17
  .portal-navbar-toolbar {
18
18
  display: inline-block;
19
19
  text-align: left;
20
- width: 55%;
20
+ width: 56%;
21
21
  height: 48px;
22
- margin-left: 72px;
22
+ padding-left: 72px;
23
23
  }
24
24
 
25
25
  .spacer {