@iobroker/adapter-react-v5 3.1.2 → 3.1.5

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 (73) hide show
  1. package/Components/FileBrowser.js +277 -237
  2. package/Components/FileBrowser.js.map +1 -1
  3. package/Components/FileViewer.js +3 -1
  4. package/Components/FileViewer.js.map +1 -1
  5. package/Components/JsonConfigComponent/ConfigAutocomplete.js +5 -3
  6. package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  7. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +5 -3
  8. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  9. package/Components/JsonConfigComponent/ConfigCertificateSelect.js +16 -2
  10. package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  11. package/Components/JsonConfigComponent/ConfigCustom.js +148 -25
  12. package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -1
  13. package/Components/JsonConfigComponent/ConfigGeneric.js +105 -20
  14. package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  15. package/Components/JsonConfigComponent/ConfigInstanceSelect.js +132 -46
  16. package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  17. package/Components/JsonConfigComponent/ConfigLanguage.js +25 -1
  18. package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  19. package/Components/JsonConfigComponent/ConfigNumber.js +5 -4
  20. package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -1
  21. package/Components/JsonConfigComponent/ConfigObjectId.js +3 -2
  22. package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  23. package/Components/JsonConfigComponent/ConfigPanel.js +51 -40
  24. package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
  25. package/Components/JsonConfigComponent/ConfigPattern.js +1 -1
  26. package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -1
  27. package/Components/JsonConfigComponent/ConfigSelect.js +4 -2
  28. package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -1
  29. package/Components/JsonConfigComponent/ConfigSendto.js +2 -2
  30. package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
  31. package/Components/JsonConfigComponent/ConfigSetState.js +2 -2
  32. package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -1
  33. package/Components/JsonConfigComponent/ConfigStaticHeader.js +31 -8
  34. package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  35. package/Components/JsonConfigComponent/ConfigStaticImage.js +1 -1
  36. package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
  37. package/Components/JsonConfigComponent/ConfigTable.js +1 -1
  38. package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
  39. package/Components/JsonConfigComponent/ConfigTabs.js +12 -3
  40. package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -1
  41. package/Components/JsonConfigComponent/ConfigText.js +4 -2
  42. package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
  43. package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -1
  44. package/Components/JsonConfigComponent/index.js +12 -4
  45. package/Components/JsonConfigComponent/index.js.map +1 -1
  46. package/Components/ObjectBrowser.js +464 -261
  47. package/Components/ObjectBrowser.js.map +1 -1
  48. package/Components/TableResize.js +323 -0
  49. package/Components/TableResize.js.map +1 -0
  50. package/Components/TreeTable.js +2 -2
  51. package/Components/TreeTable.js.map +1 -1
  52. package/Components/Utils.js +5 -5
  53. package/Components/Utils.js.map +1 -1
  54. package/Dialogs/Confirm.js +3 -3
  55. package/Dialogs/Confirm.js.map +1 -1
  56. package/Dialogs/FileSelect.js +259 -0
  57. package/Dialogs/FileSelect.js.map +1 -0
  58. package/Dialogs/SelectID.js +15 -16
  59. package/Dialogs/SelectID.js.map +1 -1
  60. package/GenericApp.js +3 -3
  61. package/GenericApp.js.map +1 -1
  62. package/README.md +6 -0
  63. package/i18n/de.json +4 -3
  64. package/i18n/en.json +2 -1
  65. package/i18n/es.json +2 -1
  66. package/i18n/fr.json +2 -1
  67. package/i18n/it.json +2 -1
  68. package/i18n/nl.json +2 -1
  69. package/i18n/pl.json +2 -1
  70. package/i18n/pt.json +2 -1
  71. package/i18n/ru.json +2 -1
  72. package/i18n/zh-cn.json +2 -1
  73. package/package.json +1 -1
@@ -163,6 +163,8 @@ var _IconDevice = _interopRequireDefault(require("../icons/IconDevice"));
163
163
 
164
164
  var _IconDocument = _interopRequireDefault(require("../icons/IconDocument"));
165
165
 
166
+ var _IconDocumentReadOnly = _interopRequireDefault(require("../icons/IconDocumentReadOnly"));
167
+
166
168
  var _IconInstance = _interopRequireDefault(require("../icons/IconInstance"));
167
169
 
168
170
  var _IconState = _interopRequireDefault(require("../icons/IconState"));
@@ -286,7 +288,8 @@ var styles = function styles(theme) {
286
288
  headerRow: {
287
289
  paddingLeft: theme.spacing(1),
288
290
  height: 38,
289
- whiteSpace: 'nowrap'
291
+ whiteSpace: 'nowrap',
292
+ userSelect: 'none'
290
293
  },
291
294
  buttonClearFilter: {
292
295
  position: 'relative',
@@ -517,19 +520,6 @@ var styles = function styles(theme) {
517
520
  display: 'block'
518
521
  }
519
522
  },
520
- cellValueWritable: {
521
- '&:after': {
522
- content: '"*"',
523
- color: theme.palette.mode === 'dark' ? 'white' : 'black',
524
- position: 'absolute',
525
- zIndex: 1,
526
- top: -6,
527
- left: 0,
528
- fontSize: 9,
529
- width: 4,
530
- height: 4
531
- }
532
- },
533
523
  cellValueFile: {
534
524
  color: '#2837b9'
535
525
  },
@@ -796,6 +786,39 @@ var styles = function styles(theme) {
796
786
  top: 4,
797
787
  right: 50,
798
788
  width: 20
789
+ },
790
+ resizeHandle: {
791
+ display: 'block',
792
+ position: 'absolute',
793
+ cursor: 'col-resize',
794
+ width: 7,
795
+ top: 2,
796
+ bottom: 2,
797
+ zIndex: 1
798
+ },
799
+ resizeHandleRight: {
800
+ right: 3,
801
+ borderRight: '2px dotted #888',
802
+ '&:hover': {
803
+ borderColor: '#ccc',
804
+ borderRightStyle: 'solid'
805
+ },
806
+ '&.active': {
807
+ borderColor: '#517ea5',
808
+ borderRightStyle: 'solid'
809
+ }
810
+ },
811
+ resizeHandleLeft: {
812
+ left: -4,
813
+ borderLeft: '2px dotted #888',
814
+ '&:hover': {
815
+ borderColor: '#ccc',
816
+ borderLeftStyle: 'solid'
817
+ },
818
+ '&.active': {
819
+ borderColor: '#517ea5',
820
+ borderLeftStyle: 'solid'
821
+ }
799
822
  }
800
823
  };
801
824
  };
@@ -894,7 +917,7 @@ function applyFilter(item, filters, lang, objects, context, counter, customFilte
894
917
 
895
918
  if (!filteredOut && !filters.expertMode) {
896
919
  filteredOut = data.id === 'system' || data.id === 'enum' || // (data.obj && data.obj.type === 'meta') ||
897
- data.id.startsWith('system.') || data.id.startsWith('enum.') || data.id.startsWith('_design/') || common && common.expert;
920
+ data.id.startsWith('system.') || data.id.startsWith('enum.') || data.id.startsWith('_design/') || data.id.endsWith('.admin') || common && common.expert;
898
921
  }
899
922
 
900
923
  if (!filteredOut && context.id) {
@@ -1795,7 +1818,7 @@ var SCREEN_WIDTHS = {
1795
1818
  ///////////////
1796
1819
  // extra-large: 1920px
1797
1820
  xl: {
1798
- idWidth: 650,
1821
+ idWidth: 550,
1799
1822
  fields: ['name', 'type', 'role', 'room', 'func', 'val', 'buttons', 'changedFrom', 'qualityCode', 'timestamp', 'lastChange'],
1800
1823
  widths: {
1801
1824
  name: 400,
@@ -2438,6 +2461,111 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2438
2461
  return el;
2439
2462
  })) : '';
2440
2463
  });
2464
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "resizerMouseMove", function (e) {
2465
+ if (_this.resizerActiveDiv) {
2466
+ var width;
2467
+ var widthNext;
2468
+
2469
+ if (_this.resizeLeft) {
2470
+ width = _this.resizerOldWidth - e.clientX + _this.resizerPosition;
2471
+ widthNext = _this.resizerOldWidthNext + e.clientX - _this.resizerPosition;
2472
+ } else {
2473
+ width = _this.resizerOldWidth + e.clientX - _this.resizerPosition;
2474
+ widthNext = _this.resizerOldWidthNext - e.clientX + _this.resizerPosition;
2475
+ }
2476
+
2477
+ if ((!_this.resizerMin || width > _this.resizerMin) && (!_this.resizerNextMin || widthNext > _this.resizerNextMin)) {
2478
+ _this.resizerCurrentWidths[_this.resizerActiveName] = width;
2479
+ _this.resizerCurrentWidths[_this.resizerNextName] = widthNext;
2480
+ _this.resizerActiveDiv.style.width = width + 'px';
2481
+ _this.resizerNextDiv.style.width = widthNext + 'px';
2482
+ _this.columnsVisibility[_this.resizerActiveName] = width;
2483
+ _this.columnsVisibility[_this.resizerNextName] = widthNext;
2484
+
2485
+ if (_this.resizerNextName === 'nameHeader') {
2486
+ _this.columnsVisibility['name'] = widthNext - _this.state.scrollBarWidth;
2487
+ _this.resizerCurrentWidths['name'] = widthNext - _this.state.scrollBarWidth;
2488
+ } else if (_this.resizerActiveName === 'nameHeader') {
2489
+ _this.columnsVisibility['name'] = width - _this.state.scrollBarWidth;
2490
+ _this.resizerCurrentWidths['name'] = width - _this.state.scrollBarWidth;
2491
+ }
2492
+
2493
+ _this.customWidth = true;
2494
+ _this.resizeTimeout && clearTimeout(_this.resizeTimeout);
2495
+ _this.resizeTimeout = setTimeout(function () {
2496
+ _this.resizeTimeout = null;
2497
+
2498
+ _this.forceUpdate();
2499
+ }, 200);
2500
+ }
2501
+ }
2502
+ });
2503
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "resizerMouseUp", function () {
2504
+ (window._localStorage || window.localStorage).setItem("".concat(_this.props.dialogName || 'App', ".table"), JSON.stringify(_this.resizerCurrentWidths));
2505
+ _this.resizerActiveName = null;
2506
+ _this.resizerNextName = null;
2507
+ _this.resizerActiveDiv = null;
2508
+ _this.resizerNextDiv = null;
2509
+ window.removeEventListener('mousemove', _this.resizerMouseMove);
2510
+ window.removeEventListener('mouseup', _this.resizerMouseUp);
2511
+ });
2512
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "resizerMouseDown", function (e) {
2513
+ if (_this.resizerActiveIndex === null || _this.resizerActiveIndex === undefined) {
2514
+ if (!_this.storedWidths) {
2515
+ _this.storedWidths = JSON.parse(JSON.stringify(SCREEN_WIDTHS[_this.props.width]));
2516
+ }
2517
+
2518
+ _this.resizerCurrentWidths = _this.resizerCurrentWidths || {};
2519
+ _this.resizerActiveDiv = e.target.parentNode;
2520
+ _this.resizerActiveName = _this.resizerActiveDiv.dataset.name;
2521
+ var i = 0;
2522
+
2523
+ if (e.target.dataset.left === 'true') {
2524
+ _this.resizeLeft = true;
2525
+ _this.resizerNextDiv = _this.resizerActiveDiv.previousElementSibling;
2526
+
2527
+ var handle = _this.resizerNextDiv.querySelector('.' + _this.props.classes.resizeHandle);
2528
+
2529
+ while (_this.resizerNextDiv && !handle && i < 10) {
2530
+ _this.resizerNextDiv = _this.resizerNextDiv.previousElementSibling;
2531
+ handle = _this.resizerNextDiv.querySelector('.' + _this.props.classes.resizeHandle);
2532
+ i++;
2533
+ }
2534
+
2535
+ if (handle && handle.dataset.left !== 'true') {
2536
+ _this.resizerNextDiv = _this.resizerNextDiv.nextElementSibling;
2537
+ }
2538
+ } else {
2539
+ _this.resizeLeft = false;
2540
+ _this.resizerNextDiv = _this.resizerActiveDiv.nextElementSibling;
2541
+ /*while (this.resizerNextDiv && !this.resizerNextDiv.querySelector('.' + this.props.classes.resizeHandle) && i < 10) {
2542
+ this.resizerNextDiv = this.resizerNextDiv.nextElementSibling;
2543
+ i++;
2544
+ }*/
2545
+ }
2546
+
2547
+ _this.resizerNextName = _this.resizerNextDiv.dataset.name;
2548
+ _this.resizerMin = parseInt(_this.resizerActiveDiv.dataset.min, 10) || 0;
2549
+ _this.resizerNextMin = parseInt(_this.resizerNextDiv.dataset.min, 10) || 0;
2550
+ _this.resizerPosition = e.clientX;
2551
+ _this.resizerCurrentWidths[_this.resizerActiveName] = _this.resizerActiveDiv.offsetWidth;
2552
+ _this.resizerCurrentWidths[_this.resizerNextName] = _this.resizerNextDiv.offsetWidth;
2553
+ _this.resizerOldWidth = _this.resizerCurrentWidths[_this.resizerActiveName];
2554
+ _this.resizerOldWidthNext = _this.resizerCurrentWidths[_this.resizerNextName];
2555
+ window.addEventListener('mousemove', _this.resizerMouseMove);
2556
+ window.addEventListener('mouseup', _this.resizerMouseUp);
2557
+ }
2558
+ });
2559
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "resizerReset", function () {
2560
+ _this.customWidth = false;
2561
+ SCREEN_WIDTHS[_this.props.width] = JSON.parse(JSON.stringify(_this.storedWidths));
2562
+
2563
+ _this.calculateColumnsVisibility();
2564
+
2565
+ (window._localStorage || window.localStorage).removeItem("".concat(_this.props.dialogName || 'App', ".table"));
2566
+
2567
+ _this.forceUpdate();
2568
+ });
2441
2569
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "extendObject", function (id, data) {
2442
2570
  return _this.props.socket.extendObject(id, data)["catch"](function (error) {
2443
2571
  return window.alert(error);
@@ -2448,7 +2576,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2448
2576
  return window.alert(error);
2449
2577
  });
2450
2578
  });
2451
- _this.lastSelectedItems = window.localStorage.getItem("".concat(props.dialogName || 'App', ".objectSelected")) || '[]';
2579
+ _this.lastSelectedItems = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".objectSelected")) || '[]';
2452
2580
 
2453
2581
  try {
2454
2582
  _this.lastSelectedItems = JSON.parse(_this.lastSelectedItems);
@@ -2462,7 +2590,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2462
2590
  });
2463
2591
  } catch (e) {}
2464
2592
 
2465
- var expanded = window.localStorage.getItem("".concat(props.dialogName || 'App', ".objectExpanded")) || '[]';
2593
+ var expanded = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".objectExpanded")) || '[]';
2466
2594
 
2467
2595
  try {
2468
2596
  expanded = JSON.parse(expanded);
@@ -2470,7 +2598,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2470
2598
  expanded = [];
2471
2599
  }
2472
2600
 
2473
- var filter = props.defaultFilters || window.localStorage.getItem("".concat(props.dialogName || 'App', ".objectFilter")) || Object.assign({}, DEFAULT_FILTER);
2601
+ var filter = props.defaultFilters || (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".objectFilter")) || Object.assign({}, DEFAULT_FILTER);
2474
2602
 
2475
2603
  if (typeof filter === 'string') {
2476
2604
  try {
@@ -2526,7 +2654,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2526
2654
  }).filter(function (id) {
2527
2655
  return id;
2528
2656
  });
2529
- var columns = window.localStorage.getItem("".concat(props.dialogName || 'App', ".columns"));
2657
+ var columns = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columns"));
2530
2658
 
2531
2659
  try {
2532
2660
  columns = columns ? JSON.parse(columns) : null;
@@ -2534,7 +2662,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2534
2662
  columns = null;
2535
2663
  }
2536
2664
 
2537
- var columnsWidths = window.localStorage.getItem("".concat(props.dialogName || 'App', ".columnsWidths"));
2665
+ var columnsWidths = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columnsWidths"));
2538
2666
 
2539
2667
  try {
2540
2668
  columnsWidths = columnsWidths ? JSON.parse(columnsWidths) : {};
@@ -2543,7 +2671,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2543
2671
  }
2544
2672
 
2545
2673
  _this.imagePrefix = props.imagePrefix || '.';
2546
- var foldersFirst = window.localStorage.getItem((props.dialogName || 'App') + '.foldersFirst');
2674
+ var foldersFirst = (window._localStorage || window.localStorage).getItem((props.dialogName || 'App') + '.foldersFirst');
2547
2675
 
2548
2676
  if (foldersFirst === 'false') {
2549
2677
  foldersFirst = false;
@@ -2553,12 +2681,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2553
2681
  foldersFirst = props.foldersFirst === undefined ? true : props.foldersFirst;
2554
2682
  }
2555
2683
 
2556
- var statesView = _this.props.objectStatesView ? JSON.parse(window.localStorage.getItem((props.dialogName || 'App') + '.objectStatesView')) || false : false;
2684
+ var statesView = false;
2685
+
2686
+ try {
2687
+ statesView = _this.props.objectStatesView ? JSON.parse((window._localStorage || window.localStorage).getItem((props.dialogName || 'App') + '.objectStatesView')) || false : false;
2688
+ } catch (error) {// ignore
2689
+ }
2690
+
2557
2691
  _this.state = {
2558
2692
  loaded: false,
2559
2693
  foldersFirst: foldersFirst,
2560
2694
  selected: selected,
2561
- selectedNonObject: window.localStorage.getItem("".concat(props.dialogName || 'App', ".selectedNonObject")) || '',
2695
+ selectedNonObject: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".selectedNonObject")) || '',
2562
2696
  filter: filter,
2563
2697
  filterKey: 0,
2564
2698
  depth: 0,
@@ -2577,13 +2711,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2577
2711
  columns: columns,
2578
2712
  columnsForAdmin: null,
2579
2713
  columnsSelectorShow: false,
2580
- columnsAuto: window.localStorage.getItem("".concat(props.dialogName || 'App', ".columnsAuto")) !== 'false',
2714
+ columnsAuto: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columnsAuto")) !== 'false',
2581
2715
  columnsWidths: columnsWidths,
2582
2716
  columnsDialogTransparent: 100,
2583
2717
  columnsEditCustomDialog: null,
2584
2718
  customColumnDialogValueChanged: false,
2585
2719
  showExportDialog: false,
2586
- linesEnabled: window.localStorage.getItem("".concat(props.dialogName || 'App', ".lines")) === 'true'
2720
+ linesEnabled: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".lines")) === 'true'
2587
2721
  };
2588
2722
  _this.edit = {};
2589
2723
  _this.texts = {
@@ -2637,6 +2771,25 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2637
2771
  aclEveryone_write_state: props.t('ra_aclEveryone_write_state')
2638
2772
  };
2639
2773
  _this.levelPadding = props.levelPadding || ITEM_LEVEL;
2774
+ var resizerCurrentWidths = (window._localStorage || window.localStorage).getItem("".concat(_this.props.dialogName || 'App', ".table"));
2775
+
2776
+ if (resizerCurrentWidths) {
2777
+ try {
2778
+ resizerCurrentWidths = JSON.parse(resizerCurrentWidths);
2779
+ _this.storedWidths = JSON.parse(JSON.stringify(SCREEN_WIDTHS[_this.props.width]));
2780
+ Object.keys(resizerCurrentWidths).forEach(function (id) {
2781
+ if (id === 'id') {
2782
+ SCREEN_WIDTHS[_this.props.width].idWidth = resizerCurrentWidths.id;
2783
+ } else if (id === 'nameHeader') {
2784
+ SCREEN_WIDTHS[_this.props.width].widths['name'] = resizerCurrentWidths[id];
2785
+ } else if (SCREEN_WIDTHS[_this.props.width].widths[id] !== undefined) {
2786
+ SCREEN_WIDTHS[_this.props.width].widths[id] = resizerCurrentWidths[id];
2787
+ }
2788
+ });
2789
+ _this.customWidth = true;
2790
+ } catch (e) {// ignore
2791
+ }
2792
+ }
2640
2793
 
2641
2794
  _this.calculateColumnsVisibility();
2642
2795
 
@@ -2781,7 +2934,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2781
2934
 
2782
2935
  if (changed) {
2783
2936
  expanded.sort();
2784
- window.localStorage.setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify(expanded));
2937
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify(expanded));
2785
2938
  this.setState({
2786
2939
  expanded: expanded
2787
2940
  }, cb);
@@ -2802,13 +2955,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2802
2955
  this.lastSelectedItems = (0, _toConsumableArray2["default"])(this.state.selected);
2803
2956
 
2804
2957
  if (this.state.selected && this.state.selected.length) {
2805
- window.localStorage.setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), JSON.stringify(this.lastSelectedItems));
2958
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), JSON.stringify(this.lastSelectedItems));
2806
2959
  var name = this.lastSelectedItems.length === 1 ? _Utils["default"].getObjectName(this.objects, this.lastSelectedItems[0], null, {
2807
2960
  language: this.state.lang
2808
2961
  }) : '';
2809
2962
  this.props.onSelect && this.props.onSelect(this.lastSelectedItems, name, isDouble);
2810
2963
  } else {
2811
- window.localStorage.setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '');
2964
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '');
2812
2965
 
2813
2966
  if (this.state.selected.length) {
2814
2967
  this.setState({
@@ -2955,7 +3108,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2955
3108
 
2956
3109
  if (!this.props.multiSelect) {
2957
3110
  if (this.objects[toggleItem] && (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))) {
2958
- window.localStorage.removeItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"));
3111
+ (window._localStorage || window.localStorage).removeItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"));
2959
3112
 
2960
3113
  if (this.state.selected[0] !== toggleItem) {
2961
3114
  this.setState({
@@ -2968,7 +3121,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2968
3121
  this.onAfterSelect(isDouble);
2969
3122
  }
2970
3123
  } else {
2971
- window.localStorage.setItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"), toggleItem);
3124
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"), toggleItem);
2972
3125
  this.setState({
2973
3126
  selected: [],
2974
3127
  selectedNonObject: toggleItem
@@ -2978,7 +3131,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2978
3131
  }
2979
3132
  } else {
2980
3133
  if (this.objects[toggleItem] && (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))) {
2981
- window.localStorage.removeItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"));
3134
+ (window._localStorage || window.localStorage).removeItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"));
2982
3135
  var selected = (0, _toConsumableArray2["default"])(this.state.selected);
2983
3136
  var pos = selected.indexOf(toggleItem);
2984
3137
 
@@ -3036,7 +3189,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3036
3189
  columns.splice(_pos, 1);
3037
3190
  }
3038
3191
 
3039
- window.localStorage.setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3192
+ (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3040
3193
 
3041
3194
  _this9.calculateColumnsVisibility(null, columns);
3042
3195
 
@@ -3070,7 +3223,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3070
3223
  onChange: function onChange(e) {
3071
3224
  var columnsWidths = JSON.parse(JSON.stringify(_this9.state.columnsWidths));
3072
3225
  columnsWidths[id] = e.target.value;
3073
- window.localStorage.setItem((_this9.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3226
+ (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3074
3227
 
3075
3228
  _this9.calculateColumnsVisibility(null, null, null, columnsWidths);
3076
3229
 
@@ -3114,7 +3267,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3114
3267
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3115
3268
  checked: this.state.columnsAuto,
3116
3269
  onChange: function onChange() {
3117
- window.localStorage.setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
3270
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
3118
3271
 
3119
3272
  if (!_this10.state.columnsAuto) {
3120
3273
  _this10.calculateColumnsVisibility(true);
@@ -3146,7 +3299,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3146
3299
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3147
3300
  checked: this.state.foldersFirst,
3148
3301
  onChange: function onChange() {
3149
- window.localStorage.setItem((_this10.props.dialogName || 'App') + '.foldersFirst', _this10.state.foldersFirst ? 'false' : 'true');
3302
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.foldersFirst', _this10.state.foldersFirst ? 'false' : 'true');
3150
3303
 
3151
3304
  _this10.setState({
3152
3305
  foldersFirst: !_this10.state.foldersFirst
@@ -3159,7 +3312,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3159
3312
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3160
3313
  checked: this.state.linesEnabled,
3161
3314
  onChange: function onChange() {
3162
- window.localStorage.setItem((_this10.props.dialogName || 'App') + '.lines', _this10.state.linesEnabled ? 'false' : 'true');
3315
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.lines', _this10.state.linesEnabled ? 'false' : 'true');
3163
3316
 
3164
3317
  _this10.setState({
3165
3318
  linesEnabled: !_this10.state.linesEnabled
@@ -3202,7 +3355,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3202
3355
 
3203
3356
  _this10.calculateColumnsVisibility(null, columns);
3204
3357
 
3205
- window.localStorage.setItem((_this10.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3358
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3206
3359
 
3207
3360
  _this10.setState({
3208
3361
  columns: columns
@@ -3234,7 +3387,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3234
3387
  onChange: function onChange(e) {
3235
3388
  var columnsWidths = JSON.parse(JSON.stringify(_this10.state.columnsWidths));
3236
3389
  columnsWidths['_' + adapter + '_' + column.path] = e.target.value;
3237
- window.localStorage.setItem((_this10.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3390
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3238
3391
 
3239
3392
  _this10.calculateColumnsVisibility(null, null, null, columnsWidths);
3240
3393
 
@@ -3522,7 +3675,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3522
3675
  filter = Object.assign({}, this.state.filter, filter);
3523
3676
 
3524
3677
  if (JSON.stringify(this.state.filter) !== JSON.stringify(filter)) {
3525
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectFilter', JSON.stringify(filter));
3678
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectFilter', JSON.stringify(filter));
3526
3679
  this.setState({
3527
3680
  filter: filter
3528
3681
  }, function () {
@@ -3552,7 +3705,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3552
3705
  filter = Object.assign({}, this.state.filter, filter);
3553
3706
 
3554
3707
  if (JSON.stringify(this.state.filter) !== JSON.stringify(filter)) {
3555
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectFilter', JSON.stringify(filter));
3708
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectFilter', JSON.stringify(filter));
3556
3709
  this.setState({
3557
3710
  filter: filter,
3558
3711
  filterKey: this.state.filterKey + 1
@@ -3690,7 +3843,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3690
3843
 
3691
3844
  newFilter[name] = '';
3692
3845
  _this18.filterRefs[name].current.childNodes[1].value = '';
3693
- window.localStorage.setItem((_this18.props.dialogName || 'App') + '.objectFilter', JSON.stringify(newFilter));
3846
+ (window._localStorage || window.localStorage).setItem((_this18.props.dialogName || 'App') + '.objectFilter', JSON.stringify(newFilter));
3694
3847
 
3695
3848
  _this18.setState({
3696
3849
  filter: newFilter,
@@ -3820,7 +3973,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3820
3973
 
3821
3974
  if (root === this.root) {
3822
3975
  expanded.sort();
3823
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
3976
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
3824
3977
  this.setState({
3825
3978
  expanded: expanded
3826
3979
  });
@@ -3833,10 +3986,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3833
3986
  }, {
3834
3987
  key: "onCollapseAll",
3835
3988
  value: function onCollapseAll() {
3836
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify([]));
3989
+ var _this23 = this;
3990
+
3991
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify([]));
3992
+ (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '[]');
3837
3993
  this.setState({
3838
3994
  expanded: [],
3839
- depth: 0
3995
+ depth: 0,
3996
+ selected: []
3997
+ }, function () {
3998
+ return _this23.onAfterSelect();
3840
3999
  });
3841
4000
  }
3842
4001
  /**
@@ -3849,7 +4008,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3849
4008
  }, {
3850
4009
  key: "expandDepth",
3851
4010
  value: function expandDepth(root, depth, expanded) {
3852
- var _this23 = this;
4011
+ var _this24 = this;
3853
4012
 
3854
4013
  root = root || this.root;
3855
4014
 
@@ -3863,7 +4022,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3863
4022
  }
3864
4023
 
3865
4024
  if (depth - 1 > 0) {
3866
- _this23.expandDepth(item, depth - 1, expanded);
4025
+ _this24.expandDepth(item, depth - 1, expanded);
3867
4026
  }
3868
4027
  }
3869
4028
  });
@@ -3894,7 +4053,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3894
4053
  var depth = this.state.depth + 1;
3895
4054
  var expanded = (0, _toConsumableArray2["default"])(this.state.expanded);
3896
4055
  this.expandDepth(this.root, depth, expanded);
3897
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
4056
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
3898
4057
  this.setState({
3899
4058
  depth: depth,
3900
4059
  expanded: expanded
@@ -3909,7 +4068,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3909
4068
  key: "onStatesViewVisible",
3910
4069
  value: function onStatesViewVisible() {
3911
4070
  var statesView = !this.state.statesView;
3912
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectStatesView', JSON.stringify(statesView));
4071
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectStatesView', JSON.stringify(statesView));
3913
4072
  this.setState({
3914
4073
  statesView: statesView
3915
4074
  });
@@ -3924,7 +4083,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3924
4083
  if (this.state.depth > 0) {
3925
4084
  var depth = this.state.depth - 1;
3926
4085
  var expanded = this.collapseDepth(depth, this.state.expanded);
3927
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
4086
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
3928
4087
  this.setState({
3929
4088
  depth: depth,
3930
4089
  expanded: expanded
@@ -3967,7 +4126,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3967
4126
  }, {
3968
4127
  key: "_exportObjects",
3969
4128
  value: function _exportObjects(isAll) {
3970
- var _this24 = this;
4129
+ var _this25 = this;
3971
4130
 
3972
4131
  if (isAll) {
3973
4132
  generateFile('allObjects.json', this.objects);
@@ -3976,10 +4135,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3976
4135
  var id = this.state.selected[0] || this.state.selectedNonObject;
3977
4136
 
3978
4137
  this._getSelectedIdsForExport().forEach(function (key) {
3979
- result[key] = JSON.parse(JSON.stringify(_this24.objects[key])); // add enum information
4138
+ result[key] = JSON.parse(JSON.stringify(_this25.objects[key])); // add enum information
3980
4139
 
3981
4140
  if (result[key].common) {
3982
- var enums = _this24.getEnumsForId(key);
4141
+ var enums = _this25.getEnumsForId(key);
3983
4142
 
3984
4143
  if (enums) {
3985
4144
  result[key].common.enums = enums;
@@ -3995,7 +4154,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3995
4154
  }, {
3996
4155
  key: "renderExportDialog",
3997
4156
  value: function renderExportDialog() {
3998
- var _this25 = this;
4157
+ var _this26 = this;
3999
4158
 
4000
4159
  if (this.state.showExportDialog === false) {
4001
4160
  return null;
@@ -4006,10 +4165,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4006
4165
  color: "grey",
4007
4166
  variant: "outlined",
4008
4167
  onClick: function onClick() {
4009
- return _this25.setState({
4168
+ return _this26.setState({
4010
4169
  showExportDialog: false
4011
4170
  }, function () {
4012
- return _this25._exportObjects(true);
4171
+ return _this26._exportObjects(true);
4013
4172
  });
4014
4173
  }
4015
4174
  }, this.props.t('ra_All objects')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -4017,17 +4176,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4017
4176
  variant: "contained",
4018
4177
  autoFocus: true,
4019
4178
  onClick: function onClick() {
4020
- return _this25.setState({
4179
+ return _this26.setState({
4021
4180
  showExportDialog: false
4022
4181
  }, function () {
4023
- return _this25._exportObjects(false);
4182
+ return _this26._exportObjects(false);
4024
4183
  });
4025
4184
  }
4026
4185
  }, this.props.t('ra_Only selected')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4027
4186
  color: "grey",
4028
4187
  variant: "contained",
4029
4188
  onClick: function onClick() {
4030
- return _this25.setState({
4189
+ return _this26.setState({
4031
4190
  showExportDialog: false
4032
4191
  });
4033
4192
  },
@@ -4048,7 +4207,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4048
4207
  * @returns {JSX.Element}
4049
4208
  */
4050
4209
  function getToolbar() {
4051
- var _this26 = this;
4210
+ var _this27 = this;
4052
4211
 
4053
4212
  var allowObjectCreation = false;
4054
4213
 
@@ -4082,7 +4241,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4082
4241
  title: this.props.t('ra_Refresh tree')
4083
4242
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4084
4243
  onClick: function onClick() {
4085
- return _this26.refreshComponent();
4244
+ return _this27.refreshComponent();
4086
4245
  },
4087
4246
  disabled: this.state.updating,
4088
4247
  size: "large"
@@ -4092,7 +4251,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4092
4251
  key: "expertMode",
4093
4252
  color: this.state.filter.expertMode ? 'secondary' : 'default',
4094
4253
  onClick: function onClick() {
4095
- return _this26.onFilter('expertMode', !_this26.state.filter.expertMode);
4254
+ return _this27.onFilter('expertMode', !_this27.state.filter.expertMode);
4096
4255
  },
4097
4256
  size: "large"
4098
4257
  }, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
@@ -4101,7 +4260,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4101
4260
  key: "columnSelector",
4102
4261
  color: this.state.columnsAuto ? 'primary' : 'default',
4103
4262
  onClick: function onClick() {
4104
- return _this26.setState({
4263
+ return _this27.setState({
4105
4264
  columnsSelectorShow: true
4106
4265
  });
4107
4266
  },
@@ -4111,7 +4270,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4111
4270
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4112
4271
  key: "expandAll",
4113
4272
  onClick: function onClick() {
4114
- return _this26.onExpandAll();
4273
+ return _this27.onExpandAll();
4115
4274
  },
4116
4275
  size: "large"
4117
4276
  }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
@@ -4119,7 +4278,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4119
4278
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4120
4279
  key: "collapseAll",
4121
4280
  onClick: function onClick() {
4122
- return _this26.onCollapseAll();
4281
+ return _this27.onCollapseAll();
4123
4282
  },
4124
4283
  size: "large"
4125
4284
  }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
@@ -4128,7 +4287,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4128
4287
  key: "expandVisible",
4129
4288
  color: "primary",
4130
4289
  onClick: function onClick() {
4131
- return _this26.onExpandVisible();
4290
+ return _this27.onExpandVisible();
4132
4291
  },
4133
4292
  size: "large"
4134
4293
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
@@ -4140,7 +4299,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4140
4299
  key: "collapseVisible",
4141
4300
  color: "primary",
4142
4301
  onClick: function onClick() {
4143
- return _this26.onCollapseVisible();
4302
+ return _this27.onCollapseVisible();
4144
4303
  },
4145
4304
  size: "large"
4146
4305
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
@@ -4150,7 +4309,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4150
4309
  title: this.props.t('ra_Toggle the states view')
4151
4310
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4152
4311
  onClick: function onClick() {
4153
- return _this26.onStatesViewVisible();
4312
+ return _this27.onStatesViewVisible();
4154
4313
  },
4155
4314
  size: "large"
4156
4315
  }, /*#__PURE__*/_react["default"].createElement(_LooksOne["default"], {
@@ -4160,7 +4319,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4160
4319
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4161
4320
  disabled: !allowObjectCreation,
4162
4321
  onClick: function onClick() {
4163
- return _this26.setState({
4322
+ return _this27.setState({
4164
4323
  modalNewObj: true
4165
4324
  });
4166
4325
  },
@@ -4174,7 +4333,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4174
4333
  input.setAttribute('id', 'files');
4175
4334
  input.setAttribute('opacity', 0);
4176
4335
  input.addEventListener('change', function (e) {
4177
- return _this26.handleJsonUpload(e);
4336
+ return _this27.handleJsonUpload(e);
4178
4337
  }, false);
4179
4338
  input.click();
4180
4339
  },
@@ -4183,8 +4342,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4183
4342
  title: this.props.t('ra_Save objects tree as JSON file')
4184
4343
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4185
4344
  onClick: function onClick() {
4186
- return _this26.setState({
4187
- showExportDialog: _this26._getSelectedIdsForExport().length
4345
+ return _this27.setState({
4346
+ showExportDialog: _this27._getSelectedIdsForExport().length
4188
4347
  });
4189
4348
  },
4190
4349
  size: "large"
@@ -4198,28 +4357,28 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4198
4357
  whiteSpace: 'nowrap'
4199
4358
  }
4200
4359
  }, "".concat(this.props.t('ra_Objects'), ": ").concat(Object.keys(this.info.objects).length, ", ").concat(this.props.t('ra_States'), ": ").concat(Object.keys(this.info.objects).filter(function (el) {
4201
- return _this26.info.objects[el].type === 'state';
4360
+ return _this27.info.objects[el].type === 'state';
4202
4361
  }).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4203
4362
  title: this.props.t('ra_Edit custom config')
4204
4363
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4205
4364
  onClick: function onClick() {
4206
4365
  // get all visible states
4207
- var ids = getVisibleItems(_this26.root, 'state', _this26.objects);
4366
+ var ids = getVisibleItems(_this27.root, 'state', _this27.objects);
4208
4367
 
4209
4368
  if (ids.length) {
4210
- _this26.pauseSubscribe(true);
4369
+ _this27.pauseSubscribe(true);
4211
4370
 
4212
4371
  if (ids.length === 1) {
4213
- window.localStorage.setItem((_this26.props.dialogName || 'App') + '.objectSelected', _this26.state.selected[0]);
4214
- _this26.props.router && _this26.props.router.doNavigate(null, 'custom', _this26.state.selected[0]);
4372
+ (window._localStorage || window.localStorage).setItem((_this27.props.dialogName || 'App') + '.objectSelected', _this27.state.selected[0]);
4373
+ _this27.props.router && _this27.props.router.doNavigate(null, 'custom', _this27.state.selected[0]);
4215
4374
  }
4216
4375
 
4217
- _this26.setState({
4376
+ _this27.setState({
4218
4377
  customDialog: ids
4219
4378
  });
4220
4379
  } else {
4221
- _this26.setState({
4222
- toast: _this26.props.t('ra_please select object')
4380
+ _this27.setState({
4381
+ toast: _this27.props.t('ra_please select object')
4223
4382
  });
4224
4383
  }
4225
4384
  },
@@ -4244,7 +4403,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4244
4403
  expanded.splice(pos, 1);
4245
4404
  }
4246
4405
 
4247
- window.localStorage.setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
4406
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.objectExpanded', JSON.stringify(expanded));
4248
4407
  this.setState({
4249
4408
  expanded: expanded
4250
4409
  });
@@ -4281,7 +4440,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4281
4440
  * @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
4282
4441
  */
4283
4442
  function renderColumnButtons(id, item, classes) {
4284
- var _this27 = this,
4443
+ var _this28 = this,
4285
4444
  _item$children2,
4286
4445
  _item$data$obj$common,
4287
4446
  _item$data$obj$common3;
@@ -4292,7 +4451,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4292
4451
  }, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4293
4452
  className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsEmptyButton, classes.cellButtonMinWidth),
4294
4453
  onClick: function onClick() {
4295
- return _this27.setState({
4454
+ return _this28.setState({
4296
4455
  modalEditOfAccess: true,
4297
4456
  modalEmptyId: id,
4298
4457
  modalEditOfAccessObjData: item.data
@@ -4305,7 +4464,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4305
4464
  "aria-label": "delete",
4306
4465
  title: this.texts.deleteObject,
4307
4466
  onClick: function onClick() {
4308
- return _this27.props.onObjectDelete(id, !!(item.children && item.children.length), false);
4467
+ return _this28.props.onObjectDelete(id, !!(item.children && item.children.length), false);
4309
4468
  }
4310
4469
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
4311
4470
  className: classes.cellButtonsButtonIcon
@@ -4321,7 +4480,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4321
4480
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4322
4481
  className: classes.cellButtonMinWidth,
4323
4482
  onClick: function onClick() {
4324
- return _this27.setState({
4483
+ return _this28.setState({
4325
4484
  modalEditOfAccess: true,
4326
4485
  modalEditOfAccessObjData: item.data
4327
4486
  });
@@ -4339,9 +4498,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4339
4498
  "aria-label": "edit",
4340
4499
  title: this.texts.editObject,
4341
4500
  onClick: function onClick() {
4342
- window.localStorage.setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4501
+ (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4343
4502
 
4344
- _this27.setState({
4503
+ _this28.setState({
4345
4504
  editObjectDialog: id
4346
4505
  });
4347
4506
  }
@@ -4355,7 +4514,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4355
4514
  onClick: function onClick() {
4356
4515
  var _item$children3, _item$data$obj$common2;
4357
4516
 
4358
- return _this27.props.onObjectDelete(id, !!((_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length), !((_item$data$obj$common2 = item.data.obj.common) !== null && _item$data$obj$common2 !== void 0 && _item$data$obj$common2.dontDelete));
4517
+ return _this28.props.onObjectDelete(id, !!((_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length), !((_item$data$obj$common2 = item.data.obj.common) !== null && _item$data$obj$common2 !== void 0 && _item$data$obj$common2.dontDelete));
4359
4518
  },
4360
4519
  title: this.texts.deleteObject
4361
4520
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
@@ -4367,13 +4526,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4367
4526
  "aria-label": "config",
4368
4527
  title: this.texts.customConfig,
4369
4528
  onClick: function onClick() {
4370
- window.localStorage.setItem((_this27.props.dialogName || 'App') + '.objectSelected', id);
4529
+ (window._localStorage || window.localStorage).setItem((_this28.props.dialogName || 'App') + '.objectSelected', id);
4371
4530
 
4372
- _this27.pauseSubscribe(true);
4531
+ _this28.pauseSubscribe(true);
4373
4532
 
4374
- _this27.props.router && _this27.props.router.doNavigate(null, 'customs', id);
4533
+ _this28.props.router && _this28.props.router.doNavigate(null, 'customs', id);
4375
4534
 
4376
- _this27.setState({
4535
+ _this28.setState({
4377
4536
  customDialog: [id]
4378
4537
  });
4379
4538
  }
@@ -4389,7 +4548,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4389
4548
  }, {
4390
4549
  key: "readHistory",
4391
4550
  value: function readHistory(id) {
4392
- var _this28 = this;
4551
+ var _this29 = this;
4393
4552
 
4394
4553
  /*interface GetHistoryOptions {
4395
4554
  instance?: string;
@@ -4434,7 +4593,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4434
4593
  }
4435
4594
  }
4436
4595
  })["catch"](function (e) {
4437
- return _this28.showError(e);
4596
+ return _this29.showError(e);
4438
4597
  });
4439
4598
  }
4440
4599
  }
@@ -4450,7 +4609,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4450
4609
  key: "renderColumnValue",
4451
4610
  value: function renderColumnValue(id, item, classes) {
4452
4611
  var _obj$common4,
4453
- _this29 = this;
4612
+ _this30 = this;
4454
4613
 
4455
4614
  var obj = item.data.obj;
4456
4615
 
@@ -4482,7 +4641,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4482
4641
  if (!info) {
4483
4642
  info = item.data.state = item.data.state || formatValue(id, state, obj, this.texts, this.props.dateFormat, this.props.isFloatComma);
4484
4643
  info.valFull = info.valFull.map(function (item) {
4485
- if (item.t === _this29.texts.quality && state.q) {
4644
+ if (item.t === _this30.texts.quality && state.q) {
4486
4645
  return [/*#__PURE__*/_react["default"].createElement("div", {
4487
4646
  className: classes.cellValueTooltipBoth,
4488
4647
  key: item.t
@@ -4531,7 +4690,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4531
4690
  }, "(", info.valText.s, ")") : null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
4532
4691
  className: _Utils["default"].clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonCopy),
4533
4692
  onClick: function onClick(e) {
4534
- return _this29.onCopy(e, copyText);
4693
+ return _this30.onCopy(e, copyText);
4535
4694
  },
4536
4695
  key: "cc"
4537
4696
  }) //<IconEdit className={ Utils.clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonEdit) } key="ce" />
@@ -4554,11 +4713,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4554
4713
  popper: this.props.classes.cellValueTooltipBox
4555
4714
  },
4556
4715
  onOpen: function onOpen() {
4557
- return _this29.readHistory(id);
4716
+ return _this30.readHistory(id);
4558
4717
  }
4559
4718
  }, /*#__PURE__*/_react["default"].createElement("div", {
4560
4719
  style: info.style,
4561
- className: _Utils["default"].clsx(classes.cellValueText, obj.common && obj.common.write !== false && classes.cellValueWritable)
4720
+ className: classes.cellValueText
4562
4721
  }, val));
4563
4722
  }
4564
4723
  /**
@@ -4569,7 +4728,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4569
4728
  }, {
4570
4729
  key: "_syncEnum",
4571
4730
  value: function _syncEnum(id, enumIds, newArray, cb) {
4572
- var _this30 = this;
4731
+ var _this31 = this;
4573
4732
 
4574
4733
  if (!enumIds || !enumIds.length) {
4575
4734
  return cb && cb();
@@ -4590,9 +4749,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4590
4749
  var obj = JSON.parse(JSON.stringify(this.info.objects[enumId]));
4591
4750
  obj.common.members.splice(pos, 1);
4592
4751
  promises.push(this.props.socket.setObject(enumId, obj).then(function () {
4593
- return _this30.info.objects[enumId] = obj;
4752
+ return _this31.info.objects[enumId] = obj;
4594
4753
  })["catch"](function (e) {
4595
- return _this30.showError(e);
4754
+ return _this31.showError(e);
4596
4755
  }));
4597
4756
  }
4598
4757
  } // add to it
@@ -4609,16 +4768,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4609
4768
  _obj.common.members.sort();
4610
4769
 
4611
4770
  promises.push(this.props.socket.setObject(enumId, _obj).then(function () {
4612
- return _this30.info.objects[enumId] = _obj;
4771
+ return _this31.info.objects[enumId] = _obj;
4613
4772
  })["catch"](function (e) {
4614
- return _this30.showError(e);
4773
+ return _this31.showError(e);
4615
4774
  }));
4616
4775
  }
4617
4776
  }
4618
4777
 
4619
4778
  Promise.all(promises).then(function () {
4620
4779
  return setTimeout(function () {
4621
- return _this30._syncEnum(id, enumIds, newArray, cb);
4780
+ return _this31._syncEnum(id, enumIds, newArray, cb);
4622
4781
  }, 0);
4623
4782
  });
4624
4783
  }
@@ -4631,12 +4790,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4631
4790
  }, {
4632
4791
  key: "syncEnum",
4633
4792
  value: function syncEnum(id, enumName, newArray) {
4634
- var _this31 = this;
4793
+ var _this32 = this;
4635
4794
 
4636
4795
  var toCheck = (0, _toConsumableArray2["default"])(this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']);
4637
4796
  return new Promise(function (resolve) {
4638
- return _this31._syncEnum(id, toCheck, newArray, function (error) {
4639
- error && _this31.showError(error); // force update of object
4797
+ return _this32._syncEnum(id, toCheck, newArray, function (error) {
4798
+ error && _this32.showError(error); // force update of object
4640
4799
 
4641
4800
  resolve();
4642
4801
  });
@@ -4650,7 +4809,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4650
4809
  }, {
4651
4810
  key: "renderEnumDialog",
4652
4811
  value: function renderEnumDialog() {
4653
- var _this32 = this;
4812
+ var _this33 = this;
4654
4813
 
4655
4814
  if (this.state.enumDialog) {
4656
4815
  var type = this.state.enumDialog.type;
@@ -4659,18 +4818,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4659
4818
  var enumsOriginal = this.state.enumDialog.enumsOriginal;
4660
4819
  var enums = (type === 'room' ? this.info.roomEnums : this.info.funcEnums).map(function (id) {
4661
4820
  return {
4662
- name: getName(_this32.objects[id] && _this32.objects[id].common && _this32.objects[id].common.name || id.split('.').pop(), _this32.props.lang),
4821
+ name: getName(_this33.objects[id] && _this33.objects[id].common && _this33.objects[id].common.name || id.split('.').pop(), _this33.props.lang),
4663
4822
  value: id,
4664
- icon: getSelectIdIcon(_this32.objects, id, _this32.imagePrefix)
4823
+ icon: getSelectIdIcon(_this33.objects, id, _this33.imagePrefix)
4665
4824
  };
4666
4825
  });
4667
4826
  enums.forEach(function (item) {
4668
4827
  if (item.icon && typeof item.icon == 'string') {
4669
4828
  item.icon = /*#__PURE__*/_react["default"].createElement("div", {
4670
- className: _this32.props.classes.enumIconDiv
4829
+ className: _this33.props.classes.enumIconDiv
4671
4830
  }, /*#__PURE__*/_react["default"].createElement("img", {
4672
4831
  src: item.icon,
4673
- className: _this32.props.classes.enumIcon,
4832
+ className: _this33.props.classes.enumIcon,
4674
4833
  alt: item.name
4675
4834
  }));
4676
4835
  }
@@ -4679,7 +4838,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4679
4838
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4680
4839
  className: this.props.classes.enumDialog,
4681
4840
  onClose: function onClose() {
4682
- return _this32.setState({
4841
+ return _this33.setState({
4683
4842
  enumDialog: null
4684
4843
  });
4685
4844
  },
@@ -4693,8 +4852,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4693
4852
  disabled: JSON.stringify(enumsOriginal) === JSON.stringify(itemEnums),
4694
4853
  size: "small",
4695
4854
  onClick: function onClick() {
4696
- return _this32.syncEnum(item.data.id, type, itemEnums).then(function () {
4697
- return _this32.setState({
4855
+ return _this33.syncEnum(item.data.id, type, itemEnums).then(function () {
4856
+ return _this33.setState({
4698
4857
  enumDialog: null,
4699
4858
  enumDialogEnums: null
4700
4859
  });
@@ -4720,11 +4879,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4720
4879
 
4721
4880
  var labelId = "checkbox-list-label-".concat(id);
4722
4881
  return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
4723
- className: _this32.props.classes.headerCellSelectItem,
4882
+ className: _this33.props.classes.headerCellSelectItem,
4724
4883
  key: id,
4725
4884
  onClick: function onClick() {
4726
4885
  var pos = itemEnums.indexOf(id);
4727
- var enumDialogEnums = JSON.parse(JSON.stringify(_this32.state.enumDialogEnums));
4886
+ var enumDialogEnums = JSON.parse(JSON.stringify(_this33.state.enumDialogEnums));
4728
4887
 
4729
4888
  if (pos === -1) {
4730
4889
  enumDialogEnums.push(id);
@@ -4733,13 +4892,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4733
4892
  enumDialogEnums.splice(pos, 1);
4734
4893
  }
4735
4894
 
4736
- _this32.setState({
4895
+ _this33.setState({
4737
4896
  enumDialogEnums: enumDialogEnums
4738
4897
  });
4739
4898
  }
4740
4899
  }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
4741
4900
  classes: {
4742
- root: _this32.props.classes.enumCheckbox
4901
+ root: _this33.props.classes.enumCheckbox
4743
4902
  }
4744
4903
  }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4745
4904
  edge: "start",
@@ -4765,7 +4924,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4765
4924
  }, {
4766
4925
  key: "renderEditRoleDialog",
4767
4926
  value: function renderEditRoleDialog() {
4768
- var _this33 = this;
4927
+ var _this34 = this;
4769
4928
 
4770
4929
  if (this.state.roleDialog && this.props.objectBrowserEditRole) {
4771
4930
  var ObjectBrowserEditRole = this.props.objectBrowserEditRole;
@@ -4777,10 +4936,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4777
4936
  roles: this.info.roles,
4778
4937
  onClose: function onClose(obj) {
4779
4938
  if (obj) {
4780
- _this33.info.objects[_this33.state.roleDialog] = obj;
4939
+ _this34.info.objects[_this34.state.roleDialog] = obj;
4781
4940
  }
4782
4941
 
4783
- _this33.setState({
4942
+ _this34.setState({
4784
4943
  roleDialog: false
4785
4944
  });
4786
4945
  }
@@ -4797,7 +4956,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4797
4956
  }, {
4798
4957
  key: "onColumnsEditCustomDialogClose",
4799
4958
  value: function onColumnsEditCustomDialogClose(isSave) {
4800
- var _this34 = this;
4959
+ var _this35 = this;
4801
4960
 
4802
4961
  if (isSave) {
4803
4962
  var value = this.customColumnDialog.value;
@@ -4810,17 +4969,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4810
4969
 
4811
4970
  this.customColumnDialog = null;
4812
4971
  this.props.socket.getObject(this.state.columnsEditCustomDialog.obj._id).then(function (obj) {
4813
- if (_this34.setCustomValue(obj, _this34.state.columnsEditCustomDialog.it, value)) {
4814
- return _this34.props.socket.setObject(obj._id, obj);
4972
+ if (_this35.setCustomValue(obj, _this35.state.columnsEditCustomDialog.it, value)) {
4973
+ return _this35.props.socket.setObject(obj._id, obj);
4815
4974
  } else {
4816
- throw new Error(_this34.props.t('ra_Cannot update attribute, because not found in the object'));
4975
+ throw new Error(_this35.props.t('ra_Cannot update attribute, because not found in the object'));
4817
4976
  }
4818
4977
  }).then(function () {
4819
- return _this34.setState({
4978
+ return _this35.setState({
4820
4979
  columnsEditCustomDialog: null
4821
4980
  });
4822
4981
  })["catch"](function (e) {
4823
- return _this34.showError(e);
4982
+ return _this35.showError(e);
4824
4983
  });
4825
4984
  } else {
4826
4985
  this.customColumnDialog = null;
@@ -4836,7 +4995,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4836
4995
  }, {
4837
4996
  key: "renderColumnsEditCustomDialog",
4838
4997
  value: function renderColumnsEditCustomDialog() {
4839
- var _this35 = this;
4998
+ var _this36 = this;
4840
4999
 
4841
5000
  if (this.state.columnsEditCustomDialog) {
4842
5001
  if (!this.customColumnDialog) {
@@ -4850,7 +5009,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4850
5009
 
4851
5010
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4852
5011
  onClose: function onClose() {
4853
- return _this35.setState({
5012
+ return _this36.setState({
4854
5013
  columnsEditCustomDialog: null
4855
5014
  });
4856
5015
  },
@@ -4864,15 +5023,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4864
5023
  }, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
4865
5024
  control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4866
5025
  onKeyUp: function onKeyUp(e) {
4867
- return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
5026
+ return e.keyCode === 13 && _this36.onColumnsEditCustomDialogClose(true);
4868
5027
  },
4869
5028
  defaultChecked: this.customColumnDialog.value === 'true',
4870
5029
  onChange: function onChange(e) {
4871
- _this35.customColumnDialog.value = e.target.checked.toString();
4872
- var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
5030
+ _this36.customColumnDialog.value = e.target.checked.toString();
5031
+ var changed = _this36.customColumnDialog.value !== _this36.customColumnDialog.initValue;
4873
5032
 
4874
- if (changed === !_this35.state.customColumnDialogValueChanged) {
4875
- _this35.setState({
5033
+ if (changed === !_this36.state.customColumnDialogValueChanged) {
5034
+ _this36.setState({
4876
5035
  customColumnDialogValueChanged: changed
4877
5036
  });
4878
5037
  }
@@ -4884,15 +5043,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4884
5043
  defaultValue: this.customColumnDialog.value,
4885
5044
  fullWidth: true,
4886
5045
  onKeyUp: function onKeyUp(e) {
4887
- return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
5046
+ return e.keyCode === 13 && _this36.onColumnsEditCustomDialogClose(true);
4888
5047
  },
4889
5048
  label: this.state.columnsEditCustomDialog.it.name + ' (' + this.state.columnsEditCustomDialog.it.pathText + ')',
4890
5049
  onChange: function onChange(e) {
4891
- _this35.customColumnDialog.value = e.target.value;
4892
- var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
5050
+ _this36.customColumnDialog.value = e.target.value;
5051
+ var changed = _this36.customColumnDialog.value !== _this36.customColumnDialog.initValue;
4893
5052
 
4894
- if (changed === !_this35.state.customColumnDialogValueChanged) {
4895
- _this35.setState({
5053
+ if (changed === !_this36.state.customColumnDialogValueChanged) {
5054
+ _this36.setState({
4896
5055
  customColumnDialogValueChanged: changed
4897
5056
  });
4898
5057
  }
@@ -4901,7 +5060,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4901
5060
  }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4902
5061
  variant: "contained",
4903
5062
  onClick: function onClick() {
4904
- return _this35.onColumnsEditCustomDialogClose(true);
5063
+ return _this36.onColumnsEditCustomDialogClose(true);
4905
5064
  },
4906
5065
  disabled: !this.state.customColumnDialogValueChanged,
4907
5066
  color: "primary",
@@ -4910,7 +5069,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4910
5069
  color: "grey",
4911
5070
  variant: "contained",
4912
5071
  onClick: function onClick() {
4913
- return _this35.onColumnsEditCustomDialogClose();
5072
+ return _this36.onColumnsEditCustomDialogClose();
4914
5073
  },
4915
5074
  startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
4916
5075
  }, this.props.t('ra_Cancel'))));
@@ -5010,7 +5169,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5010
5169
  }, {
5011
5170
  key: "renderCustomValue",
5012
5171
  value: function renderCustomValue(obj, it, item) {
5013
- var _this36 = this;
5172
+ var _this37 = this;
5014
5173
 
5015
5174
  var text = this.getCustomValue(obj, it);
5016
5175
 
@@ -5019,7 +5178,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5019
5178
  return /*#__PURE__*/_react["default"].createElement("div", {
5020
5179
  className: _Utils["default"].clsx(this.props.classes.columnCustom, this.props.classes.columnCustomEditable, this.props.classes['columnCustom_' + it.align]),
5021
5180
  onClick: function onClick() {
5022
- return _this36.setState({
5181
+ return _this37.setState({
5023
5182
  columnsEditCustomDialog: {
5024
5183
  item: item,
5025
5184
  it: it,
@@ -5050,7 +5209,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5050
5209
  }, {
5051
5210
  key: "renderLeaf",
5052
5211
  value: function renderLeaf(item, isExpanded, classes, counter) {
5053
- var _this37 = this,
5212
+ var _this38 = this,
5054
5213
  _common$alias,
5055
5214
  _common$alias2,
5056
5215
  _this$states$id2,
@@ -5072,18 +5231,24 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5072
5231
  iconFolder = isExpanded ? /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], {
5073
5232
  className: classes.cellIdIconFolder,
5074
5233
  onClick: function onClick() {
5075
- return _this37.toggleExpanded(id);
5234
+ return _this38.toggleExpanded(id);
5076
5235
  }
5077
5236
  }) : /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
5078
5237
  className: classes.cellIdIconFolder,
5079
5238
  onClick: function onClick() {
5080
- return _this37.toggleExpanded(id);
5239
+ return _this38.toggleExpanded(id);
5081
5240
  }
5082
5241
  });
5083
5242
  } else {
5084
- iconFolder = /*#__PURE__*/_react["default"].createElement(_IconDocument["default"], {
5085
- className: classes.cellIdIconDocument
5086
- });
5243
+ if (obj.common && obj.common.write === false && obj.type === 'state') {
5244
+ iconFolder = /*#__PURE__*/_react["default"].createElement(_IconDocumentReadOnly["default"], {
5245
+ className: classes.cellIdIconDocument
5246
+ });
5247
+ } else {
5248
+ iconFolder = /*#__PURE__*/_react["default"].createElement(_IconDocument["default"], {
5249
+ className: classes.cellIdIconDocument
5250
+ });
5251
+ }
5087
5252
  }
5088
5253
 
5089
5254
  var iconItem = null;
@@ -5179,11 +5344,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5179
5344
  e.stopPropagation();
5180
5345
  e.preventDefault();
5181
5346
 
5182
- _this37.onSelect(common.alias.id.read);
5347
+ _this38.onSelect(common.alias.id.read);
5183
5348
 
5184
5349
  setTimeout(function () {
5185
- _this37.expandAllSelected(function () {
5186
- return _this37.scrollToItem(common.alias.id.read);
5350
+ _this38.expandAllSelected(function () {
5351
+ return _this38.scrollToItem(common.alias.id.read);
5187
5352
  });
5188
5353
  }, 100);
5189
5354
  },
@@ -5193,11 +5358,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5193
5358
  e.stopPropagation();
5194
5359
  e.preventDefault();
5195
5360
 
5196
- _this37.onSelect(common.alias.id.write);
5361
+ _this38.onSelect(common.alias.id.write);
5197
5362
 
5198
5363
  setTimeout(function () {
5199
- _this37.expandAllSelected(function () {
5200
- return _this37.scrollToItem(common.alias.id.write);
5364
+ _this38.expandAllSelected(function () {
5365
+ return _this38.scrollToItem(common.alias.id.write);
5201
5366
  });
5202
5367
  }, 100);
5203
5368
  },
@@ -5207,11 +5372,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5207
5372
  e.stopPropagation();
5208
5373
  e.preventDefault();
5209
5374
 
5210
- _this37.onSelect(common.alias.id);
5375
+ _this38.onSelect(common.alias.id);
5211
5376
 
5212
5377
  setTimeout(function () {
5213
- _this37.expandAllSelected(function () {
5214
- return _this37.scrollToItem(common.alias.id);
5378
+ _this38.expandAllSelected(function () {
5379
+ return _this38.scrollToItem(common.alias.id);
5215
5380
  });
5216
5381
  }, 100);
5217
5382
  },
@@ -5241,19 +5406,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5241
5406
 
5242
5407
  ids[name] = _id;
5243
5408
 
5244
- if (!_this37.states[_id]) {
5245
- var _this37$objects$_id;
5409
+ if (!_this38.states[_id]) {
5410
+ var _this38$objects$_id;
5246
5411
 
5247
- if (((_this37$objects$_id = _this37.objects[_id]) === null || _this37$objects$_id === void 0 ? void 0 : _this37$objects$_id.type) === 'state') {
5248
- !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
5249
- _this37.states[_id] = {
5412
+ if (((_this38$objects$_id = _this38.objects[_id]) === null || _this38$objects$_id === void 0 ? void 0 : _this38$objects$_id.type) === 'state') {
5413
+ !_this38.recordStates.includes(_id) && _this38.recordStates.push(_id);
5414
+ _this38.states[_id] = {
5250
5415
  val: null
5251
5416
  };
5252
5417
 
5253
- _this37.subscribe(_id);
5418
+ _this38.subscribe(_id);
5254
5419
  }
5255
5420
  } else {
5256
- !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
5421
+ !_this38.recordStates.includes(_id) && _this38.recordStates.push(_id);
5257
5422
  }
5258
5423
  }); // calculate color
5259
5424
  // errorId has priority
@@ -5342,13 +5507,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5342
5507
  key: id,
5343
5508
  id: id,
5344
5509
  onClick: function onClick() {
5345
- return _this37.onSelect(id);
5510
+ return _this38.onSelect(id);
5346
5511
  },
5347
5512
  onDoubleClick: function onDoubleClick() {
5348
5513
  if (!item.children) {
5349
- _this37.onSelect(id, true);
5514
+ _this38.onSelect(id, true);
5350
5515
  } else {
5351
- _this37.toggleExpanded(id);
5516
+ _this38.toggleExpanded(id);
5352
5517
  }
5353
5518
  }
5354
5519
  }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
@@ -5393,7 +5558,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5393
5558
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5394
5559
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5395
5560
  onClick: function onClick(e) {
5396
- return _this37.onCopy(e, id);
5561
+ return _this38.onCopy(e, id);
5397
5562
  }
5398
5563
  }))), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
5399
5564
  className: classes.cellName,
@@ -5407,7 +5572,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5407
5572
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5408
5573
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5409
5574
  onClick: function onClick(e) {
5410
- return _this37.onCopy(e, item.data.title);
5575
+ return _this38.onCopy(e, item.data.title);
5411
5576
  }
5412
5577
  })) : null) : null, !this.state.statesView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
5413
5578
  className: classes.cellType,
@@ -5421,7 +5586,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5421
5586
  cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? 'text' : 'default'
5422
5587
  },
5423
5588
  onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? function () {
5424
- return _this37.setState({
5589
+ return _this38.setState({
5425
5590
  roleDialog: item.data.id
5426
5591
  });
5427
5592
  } : undefined
@@ -5432,9 +5597,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5432
5597
  cursor: enumEditable ? 'text' : 'default'
5433
5598
  },
5434
5599
  onClick: enumEditable ? function () {
5435
- var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'roomEnums');
5600
+ var enums = findEnumsForObjectAsIds(_this38.info, item.data.id, 'roomEnums');
5436
5601
 
5437
- _this37.setState({
5602
+ _this38.setState({
5438
5603
  enumDialogEnums: enums,
5439
5604
  enumDialog: {
5440
5605
  item: item,
@@ -5450,9 +5615,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5450
5615
  cursor: enumEditable ? 'text' : 'default'
5451
5616
  },
5452
5617
  onClick: enumEditable ? function () {
5453
- var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'funcEnums');
5618
+ var enums = findEnumsForObjectAsIds(_this38.info, item.data.id, 'funcEnums');
5454
5619
 
5455
- _this37.setState({
5620
+ _this38.setState({
5456
5621
  enumDialogEnums: enums,
5457
5622
  enumDialog: {
5458
5623
  item: item,
@@ -5487,11 +5652,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5487
5652
  return /*#__PURE__*/_react["default"].createElement("div", {
5488
5653
  className: classes.cellAdapter,
5489
5654
  style: {
5490
- width: _this37.columnsVisibility[it.id]
5655
+ width: _this38.columnsVisibility[it.id]
5491
5656
  },
5492
5657
  key: it.id,
5493
5658
  title: it.adapter + ' => ' + it.pathText
5494
- }, _this37.renderCustomValue(obj, it, item));
5659
+ }, _this38.renderCustomValue(obj, it, item));
5495
5660
  }), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
5496
5661
  className: classes.cellValue,
5497
5662
  style: {
@@ -5499,31 +5664,31 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5499
5664
  cursor: valueEditable ? (common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : item.data.button ? 'grab' : 'text' : 'default'
5500
5665
  },
5501
5666
  onClick: valueEditable ? function () {
5502
- if (!obj || !_this37.states) {
5667
+ if (!obj || !_this38.states) {
5503
5668
  return null;
5504
5669
  }
5505
5670
 
5506
5671
  if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
5507
- return _this37.setState({
5672
+ return _this38.setState({
5508
5673
  viewFileDialog: id
5509
5674
  });
5510
5675
  } // in non-expert mode control button directly
5511
5676
 
5512
5677
 
5513
- if (!_this37.state.filter.expertMode && item.data.button) {
5514
- return _this37.props.socket.setState(id, true)["catch"](function (e) {
5678
+ if (!_this38.state.filter.expertMode && item.data.button) {
5679
+ return _this38.props.socket.setState(id, true)["catch"](function (e) {
5515
5680
  return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
5516
5681
  });
5517
5682
  }
5518
5683
 
5519
- _this37.edit = {
5520
- val: _this37.states[id] ? _this37.states[id].val : '',
5521
- q: _this37.states[id] ? _this37.states[id].q || 0 : 0,
5684
+ _this38.edit = {
5685
+ val: _this38.states[id] ? _this38.states[id].val : '',
5686
+ q: _this38.states[id] ? _this38.states[id].q || 0 : 0,
5522
5687
  ack: false,
5523
5688
  id: id
5524
5689
  };
5525
5690
 
5526
- _this37.setState({
5691
+ _this38.setState({
5527
5692
  updateOpened: true
5528
5693
  });
5529
5694
  } : undefined
@@ -5546,7 +5711,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5546
5711
  }, {
5547
5712
  key: "renderItem",
5548
5713
  value: function renderItem(root, isExpanded, classes, counter) {
5549
- var _this38 = this;
5714
+ var _this39 = this;
5550
5715
 
5551
5716
  var items = [];
5552
5717
  counter = counter || {
@@ -5578,9 +5743,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5578
5743
  if (!this.state.foldersFirst) {
5579
5744
  root.children && items.push(root.children.map(function (item) {
5580
5745
  // do not render too many items in column editor mode
5581
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5746
+ if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5582
5747
  if (item.data.sumVisibility) {
5583
- return _this38.renderItem(item, undefined, classes, counter);
5748
+ return _this39.renderItem(item, undefined, classes, counter);
5584
5749
  }
5585
5750
  }
5586
5751
 
@@ -5591,9 +5756,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5591
5756
  root.children && items.push(root.children.map(function (item) {
5592
5757
  if (item.children) {
5593
5758
  // do not render too many items in column editor mode
5594
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5759
+ if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5595
5760
  if (item.data.sumVisibility) {
5596
- return _this38.renderItem(item, undefined, classes, counter);
5761
+ return _this39.renderItem(item, undefined, classes, counter);
5597
5762
  }
5598
5763
  }
5599
5764
  }
@@ -5604,9 +5769,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5604
5769
  root.children && items.push(root.children.map(function (item) {
5605
5770
  if (!item.children) {
5606
5771
  // do not render too many items in column editor mode
5607
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5772
+ if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5608
5773
  if (item.data.sumVisibility) {
5609
- return _this38.renderItem(item, undefined, classes, counter);
5774
+ return _this39.renderItem(item, undefined, classes, counter);
5610
5775
  }
5611
5776
  }
5612
5777
  }
@@ -5629,7 +5794,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5629
5794
  }, {
5630
5795
  key: "calculateColumnsVisibility",
5631
5796
  value: function calculateColumnsVisibility(columnsAuto, columns, columnsForAdmin, columnsWidths) {
5632
- var _this39 = this;
5797
+ var _this40 = this;
5633
5798
 
5634
5799
  columnsWidths = columnsWidths || this.state.columnsWidths;
5635
5800
  columnsForAdmin = columnsForAdmin || this.state.columnsForAdmin;
@@ -5648,6 +5813,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5648
5813
  this.columnsVisibility = {
5649
5814
  id: SCREEN_WIDTHS[this.props.width].idWidth,
5650
5815
  name: this.visibleCols.includes('name') ? WIDTHS.name || 0 : 0,
5816
+ nameHeader: this.visibleCols.includes('name') ? WIDTHS.name || 0 : 0,
5651
5817
  type: this.visibleCols.includes('type') ? WIDTHS.type || 0 : 0,
5652
5818
  role: this.visibleCols.includes('role') ? WIDTHS.role || 0 : 0,
5653
5819
  room: this.visibleCols.includes('room') ? WIDTHS.room || 0 : 0,
@@ -5660,7 +5826,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5660
5826
  buttons: this.visibleCols.includes('buttons') ? WIDTHS.buttons || 0 : 0
5661
5827
  };
5662
5828
 
5663
- if (this.columnsVisibility.name) {
5829
+ if (this.columnsVisibility.name && !this.customWidth) {
5664
5830
  var widthSum = this.columnsVisibility.id; // id is always visible
5665
5831
 
5666
5832
  if (this.state.statesView) {
@@ -5679,7 +5845,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5679
5845
  widthSum += this.columnsVisibility.buttons;
5680
5846
  this.columnsVisibility.name = "calc(100% - ".concat(widthSum + 5, "px)");
5681
5847
  this.columnsVisibility.nameHeader = "calc(100% - ".concat(widthSum + 5 + this.state.scrollBarWidth, "px)");
5682
- } else {
5848
+ } else if (!this.customWidth) {
5683
5849
  // Calculate the with of ID
5684
5850
  var _widthSum = 0; // id is always visible
5685
5851
 
@@ -5721,7 +5887,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5721
5887
  Object.keys(columnsForAdmin).sort().forEach(function (adapter) {
5722
5888
  return columnsForAdmin[adapter].forEach(function (column) {
5723
5889
  var id = '_' + adapter + '_' + column.path;
5724
- _this39.columnsVisibility[id] = columns.includes(id);
5890
+ _this40.columnsVisibility[id] = columns.includes(id);
5725
5891
 
5726
5892
  if (columns.includes(id)) {
5727
5893
  var item = {
@@ -5744,12 +5910,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5744
5910
  }
5745
5911
  }
5746
5912
 
5747
- _this39.adapterColumns.push(item);
5913
+ _this40.adapterColumns.push(item);
5748
5914
 
5749
- _this39.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this39.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5750
- _widthSum2 += _this39.columnsVisibility[id];
5915
+ _this40.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this40.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5916
+ _widthSum2 += _this40.columnsVisibility[id];
5751
5917
  } else {
5752
- _this39.columnsVisibility[id] = 0;
5918
+ _this40.columnsVisibility[id] = 0;
5753
5919
  }
5754
5920
  });
5755
5921
  });
@@ -5771,25 +5937,25 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5771
5937
  this.columnsVisibility.nameHeader = "calc(100% - ".concat(_widthSum2 + 5 + this.state.scrollBarWidth, "px)");
5772
5938
  } else {
5773
5939
  var newWidth = Object.keys(this.columnsVisibility).reduce(function (accumulator, name) {
5774
- if (name === 'id' || typeof _this39.columnsVisibility[name] === 'string' || !_this39.columnsVisibility[name]) {
5940
+ if (name === 'id' || typeof _this40.columnsVisibility[name] === 'string' || !_this40.columnsVisibility[name]) {
5775
5941
  return accumulator;
5776
5942
  } else {
5777
- return accumulator + _this39.columnsVisibility[name];
5943
+ return accumulator + _this40.columnsVisibility[name];
5778
5944
  }
5779
5945
  }, 0);
5780
5946
  this.columnsVisibility.id = "calc(100% - ".concat(newWidth, "px)");
5781
5947
  }
5782
5948
  }
5783
5949
  }
5950
+ }, {
5951
+ key: "renderHeader",
5952
+ value:
5784
5953
  /**
5785
5954
  * @private
5786
5955
  * @returns {JSX.Element}
5787
5956
  */
5788
-
5789
- }, {
5790
- key: "renderHeader",
5791
- value: function renderHeader() {
5792
- var _this40 = this;
5957
+ function renderHeader() {
5958
+ var _this41 = this;
5793
5959
 
5794
5960
  var classes = this.props.classes;
5795
5961
  var filterClearInValue = null;
@@ -5797,7 +5963,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5797
5963
  if (!this.columnsVisibility.buttons && !this.isFilterEmpty()) {
5798
5964
  filterClearInValue = /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
5799
5965
  onClick: function onClick() {
5800
- return _this40.clearFilter();
5966
+ return _this41.clearFilter();
5801
5967
  },
5802
5968
  className: classes.buttonClearFilter,
5803
5969
  title: this.props.t('ra_Clear filter'),
@@ -5812,68 +5978,105 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5812
5978
  }, /*#__PURE__*/_react["default"].createElement("div", {
5813
5979
  className: classes.headerCell,
5814
5980
  style: {
5815
- width: this.columnsVisibility.id
5816
- }
5817
- }, this.getFilterInput('id')), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
5981
+ width: this.columnsVisibility.id,
5982
+ position: 'relative'
5983
+ },
5984
+ "data-min": 240,
5985
+ "data-name": "id"
5986
+ }, this.getFilterInput('id'), /*#__PURE__*/_react["default"].createElement("div", {
5987
+ className: this.props.classes.resizeHandle + ' ' + this.props.classes.resizeHandleRight,
5988
+ onMouseDown: this.resizerMouseDown,
5989
+ onDoubleClick: this.resizerReset,
5990
+ title: this.props.t('ra_Double click to reset table layout')
5991
+ })), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
5818
5992
  className: classes.headerCell,
5819
5993
  style: {
5820
5994
  width: this.columnsVisibility.nameHeader
5821
- }
5995
+ },
5996
+ "data-min": 100,
5997
+ "data-name": "nameHeader"
5822
5998
  }, this.getFilterInput('name')) : null, !this.state.statesView && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
5823
5999
  className: classes.headerCell,
5824
6000
  style: {
5825
6001
  width: this.columnsVisibility.type
5826
- }
6002
+ },
6003
+ "data-min": 100,
6004
+ "data-name": "type"
5827
6005
  }, this.getFilterSelectType()) : null, this.columnsVisibility.role ? /*#__PURE__*/_react["default"].createElement("div", {
5828
6006
  className: classes.headerCell,
5829
6007
  style: {
5830
6008
  width: this.columnsVisibility.role
5831
- }
6009
+ },
6010
+ "data-min": 100,
6011
+ "data-name": "role"
5832
6012
  }, this.getFilterSelectRole()) : null, this.columnsVisibility.room ? /*#__PURE__*/_react["default"].createElement("div", {
5833
6013
  className: classes.headerCell,
5834
6014
  style: {
5835
6015
  width: this.columnsVisibility.room
5836
- }
6016
+ },
6017
+ "data-min": 100,
6018
+ "data-name": "room"
5837
6019
  }, this.getFilterSelectRoom()) : null, this.columnsVisibility.func ? /*#__PURE__*/_react["default"].createElement("div", {
5838
6020
  className: classes.headerCell,
5839
6021
  style: {
5840
6022
  width: this.columnsVisibility.func
5841
- }
6023
+ },
6024
+ "data-min": 100,
6025
+ "data-name": "func"
5842
6026
  }, this.getFilterSelectFunction()) : null), this.state.statesView && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
5843
6027
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5844
6028
  style: {
5845
6029
  width: this.columnsVisibility.changedFrom
5846
- }
6030
+ },
6031
+ "data-min": 100,
6032
+ "data-name": "changedFrom"
5847
6033
  }, this.props.t('ra_Changed from')), /*#__PURE__*/_react["default"].createElement("div", {
5848
6034
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5849
6035
  style: {
5850
6036
  width: this.columnsVisibility.qualityCode
5851
- }
6037
+ },
6038
+ "data-min": 100,
6039
+ "data-name": "qualityCode"
5852
6040
  }, this.props.t('ra_Quality code')), /*#__PURE__*/_react["default"].createElement("div", {
5853
6041
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5854
6042
  style: {
5855
6043
  width: this.columnsVisibility.timestamp
5856
- }
6044
+ },
6045
+ "data-min": 100,
6046
+ "data-name": "timestamp"
5857
6047
  }, this.props.t('ra_Timestamp')), /*#__PURE__*/_react["default"].createElement("div", {
5858
6048
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5859
6049
  style: {
5860
6050
  width: this.columnsVisibility.lastChange
5861
- }
6051
+ },
6052
+ "data-min": 100,
6053
+ "data-name": "lastChange"
5862
6054
  }, this.props.t('ra_Last change'))), this.adapterColumns.map(function (item) {
5863
6055
  return /*#__PURE__*/_react["default"].createElement("div", {
5864
6056
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5865
6057
  style: {
5866
- width: _this40.columnsVisibility[item.id]
6058
+ width: _this41.columnsVisibility[item.id]
5867
6059
  },
5868
6060
  title: item.adapter,
5869
- key: item.id
6061
+ key: item.id,
6062
+ "data-min": 100,
6063
+ "data-name": item.id
5870
6064
  }, item.name);
5871
6065
  }), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
5872
6066
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5873
6067
  style: {
5874
- width: this.columnsVisibility.val
5875
- }
5876
- }, this.props.t('ra_Value'), filterClearInValue) : null, this.columnsVisibility.buttons ? /*#__PURE__*/_react["default"].createElement("div", {
6068
+ width: this.columnsVisibility.val,
6069
+ position: 'relative'
6070
+ },
6071
+ "data-min": 120,
6072
+ "data-name": "val"
6073
+ }, /*#__PURE__*/_react["default"].createElement("div", {
6074
+ className: this.props.classes.resizeHandle + ' ' + this.props.classes.resizeHandleLeft,
6075
+ "data-left": "true",
6076
+ onMouseDown: this.resizerMouseDown,
6077
+ onDoubleClick: this.resizerReset,
6078
+ title: this.props.t('ra_Double click to reset table layout')
6079
+ }), this.props.t('ra_Value'), filterClearInValue) : null, this.columnsVisibility.buttons ? /*#__PURE__*/_react["default"].createElement("div", {
5877
6080
  className: classes.headerCell,
5878
6081
  style: {
5879
6082
  width: this.columnsVisibility.buttons
@@ -5888,18 +6091,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5888
6091
  }, {
5889
6092
  key: "renderToast",
5890
6093
  value: function renderToast() {
5891
- var _this41 = this;
6094
+ var _this42 = this;
5892
6095
 
5893
6096
  return /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], {
5894
6097
  open: !!this.state.toast,
5895
6098
  autoHideDuration: 3000,
5896
6099
  onClick: function onClick() {
5897
- return _this41.setState({
6100
+ return _this42.setState({
5898
6101
  toast: ''
5899
6102
  });
5900
6103
  },
5901
6104
  onClose: function onClose() {
5902
- return _this41.setState({
6105
+ return _this42.setState({
5903
6106
  toast: ''
5904
6107
  });
5905
6108
  },
@@ -5909,7 +6112,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5909
6112
  "aria-label": "close",
5910
6113
  color: "inherit",
5911
6114
  onClick: function onClick() {
5912
- return _this41.setState({
6115
+ return _this42.setState({
5913
6116
  toast: ''
5914
6117
  });
5915
6118
  }
@@ -5925,14 +6128,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5925
6128
  }, {
5926
6129
  key: "componentDidUpdate",
5927
6130
  value: function componentDidUpdate() {
5928
- var _this42 = this;
6131
+ var _this43 = this;
5929
6132
 
5930
6133
  if (this.tableRef.current) {
5931
6134
  var scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
5932
6135
 
5933
6136
  if (this.state.scrollBarWidth !== scrollBarWidth) {
5934
6137
  setTimeout(function () {
5935
- return _this42.setState({
6138
+ return _this43.setState({
5936
6139
  scrollBarWidth: scrollBarWidth
5937
6140
  });
5938
6141
  }, 100);
@@ -5962,13 +6165,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5962
6165
  }, {
5963
6166
  key: "renderCustomDialog",
5964
6167
  value: function renderCustomDialog() {
5965
- var _this43 = this;
6168
+ var _this44 = this;
5966
6169
 
5967
6170
  if (this.state.customDialog && this.props.objectCustomDialog) {
5968
6171
  var ObjectCustomDialog = this.props.objectCustomDialog;
5969
6172
  return /*#__PURE__*/_react["default"].createElement(ObjectCustomDialog, {
5970
6173
  reportChangedIds: function reportChangedIds(changedIds) {
5971
- return _this43.changedIds = (0, _toConsumableArray2["default"])(changedIds);
6174
+ return _this44.changedIds = (0, _toConsumableArray2["default"])(changedIds);
5972
6175
  },
5973
6176
  objectIDs: this.state.customDialog,
5974
6177
  expertMode: this.state.filter.expertMode,
@@ -5982,19 +6185,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5982
6185
  objects: this.objects,
5983
6186
  customsInstances: this.info.customs,
5984
6187
  onClose: function onClose() {
5985
- _this43.pauseSubscribe(false);
6188
+ _this44.pauseSubscribe(false);
5986
6189
 
5987
- _this43.setState({
6190
+ _this44.setState({
5988
6191
  customDialog: null
5989
6192
  });
5990
6193
 
5991
- if (_this43.changedIds) {
5992
- _this43.changedIds = null; // update all changed IDs
6194
+ if (_this44.changedIds) {
6195
+ _this44.changedIds = null; // update all changed IDs
5993
6196
 
5994
- _this43.forceUpdate();
6197
+ _this44.forceUpdate();
5995
6198
  }
5996
6199
 
5997
- _this43.props.router && _this43.props.router.doNavigate('tab-objects');
6200
+ _this44.props.router && _this44.props.router.doNavigate('tab-objects');
5998
6201
  }
5999
6202
  });
6000
6203
  } else {
@@ -6009,7 +6212,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6009
6212
  }, {
6010
6213
  key: "onUpdate",
6011
6214
  value: function onUpdate(valAck) {
6012
- var _this44 = this;
6215
+ var _this45 = this;
6013
6216
 
6014
6217
  this.props.socket.setState(this.edit.id, {
6015
6218
  val: valAck.val,
@@ -6017,7 +6220,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6017
6220
  q: valAck.q || 0,
6018
6221
  expire: valAck.expire || undefined
6019
6222
  })["catch"](function (e) {
6020
- return _this44.showError('Cannot write value: ' + e);
6223
+ return _this45.showError('Cannot write value: ' + e);
6021
6224
  });
6022
6225
  }
6023
6226
  /**
@@ -6028,7 +6231,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6028
6231
  }, {
6029
6232
  key: "renderEditObjectDialog",
6030
6233
  value: function renderEditObjectDialog() {
6031
- var _this45 = this;
6234
+ var _this46 = this;
6032
6235
 
6033
6236
  if (!this.state.editObjectDialog || !this.props.objectBrowserEditObject) {
6034
6237
  return null;
@@ -6048,24 +6251,24 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6048
6251
  t: this.props.t,
6049
6252
  expertMode: this.state.filter.expertMode,
6050
6253
  onNewObject: function onNewObject(obj) {
6051
- return _this45.props.socket.setObject(obj._id, obj).then(function () {
6052
- return _this45.setState({
6254
+ return _this46.props.socket.setObject(obj._id, obj).then(function () {
6255
+ return _this46.setState({
6053
6256
  editObjectDialog: obj._id
6054
6257
  }, function () {
6055
- return _this45.onSelect(obj._id);
6258
+ return _this46.onSelect(obj._id);
6056
6259
  });
6057
6260
  })["catch"](function (e) {
6058
- return _this45.showError('Cannot write object: ' + e);
6261
+ return _this46.showError('Cannot write object: ' + e);
6059
6262
  });
6060
6263
  },
6061
6264
  onClose: function onClose(obj) {
6062
- _this45.setState({
6265
+ _this46.setState({
6063
6266
  editObjectDialog: ''
6064
6267
  });
6065
6268
 
6066
6269
  if (obj) {
6067
- _this45.props.socket.setObject(obj._id, obj)["catch"](function (e) {
6068
- return _this45.showError('Cannot write object: ' + e);
6270
+ _this46.props.socket.setObject(obj._id, obj)["catch"](function (e) {
6271
+ return _this46.showError('Cannot write object: ' + e);
6069
6272
  });
6070
6273
  }
6071
6274
  }
@@ -6079,7 +6282,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6079
6282
  }, {
6080
6283
  key: "renderViewObjectFileDialog",
6081
6284
  value: function renderViewObjectFileDialog() {
6082
- var _this46 = this;
6285
+ var _this47 = this;
6083
6286
 
6084
6287
  if (!this.state.viewFileDialog || !this.props.objectBrowserViewFile) {
6085
6288
  return null;
@@ -6095,7 +6298,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6095
6298
  t: this.props.t,
6096
6299
  expertMode: this.state.filter.expertMode,
6097
6300
  onClose: function onClose() {
6098
- return _this46.setState({
6301
+ return _this47.setState({
6099
6302
  viewFileDialog: ''
6100
6303
  });
6101
6304
  }
@@ -6110,7 +6313,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6110
6313
  key: "renderEditValueDialog",
6111
6314
  value: function renderEditValueDialog() {
6112
6315
  var _this$objects$this$ed,
6113
- _this47 = this;
6316
+ _this48 = this;
6114
6317
 
6115
6318
  if (!this.state.updateOpened || !this.props.objectBrowserValue) {
6116
6319
  return null;
@@ -6141,11 +6344,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6141
6344
  defaultHistory: this.defaultHistory,
6142
6345
  dateFormat: this.props.dateFormat,
6143
6346
  onClose: function onClose(res) {
6144
- _this47.setState({
6347
+ _this48.setState({
6145
6348
  updateOpened: false
6146
6349
  });
6147
6350
 
6148
- res && _this47.onUpdate(res);
6351
+ res && _this48.onUpdate(res);
6149
6352
  }
6150
6353
  });
6151
6354
  }
@@ -6157,7 +6360,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6157
6360
  * @returns {JSX.Element}
6158
6361
  */
6159
6362
  function render() {
6160
- var _this48 = this;
6363
+ var _this49 = this;
6161
6364
 
6162
6365
  this.recordStates = [];
6163
6366
  this.unsubscribeTimer && clearTimeout(this.unsubscribeTimer); // apply filter if changed
@@ -6172,13 +6375,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6172
6375
 
6173
6376
  if (counter.count < 500 && !this.state.expandAllVisible) {
6174
6377
  setTimeout(function () {
6175
- return _this48.setState({
6378
+ return _this49.setState({
6176
6379
  expandAllVisible: true
6177
6380
  });
6178
6381
  });
6179
6382
  } else if (counter.count >= 500 && this.state.expandAllVisible) {
6180
6383
  setTimeout(function () {
6181
- return _this48.setState({
6384
+ return _this49.setState({
6182
6385
  expandAllVisible: false
6183
6386
  });
6184
6387
  });
@@ -6188,9 +6391,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6188
6391
  }
6189
6392
 
6190
6393
  this.unsubscribeTimer = setTimeout(function () {
6191
- _this48.unsubscribeTimer = null;
6394
+ _this49.unsubscribeTimer = null;
6192
6395
 
6193
- _this48.checkUnsubscribes();
6396
+ _this49.checkUnsubscribes();
6194
6397
  }, 200);
6195
6398
 
6196
6399
  if (!this.state.loaded) {