@iobroker/adapter-react-v5 4.0.14 → 4.0.15

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.
@@ -34,6 +34,7 @@ var _Snackbar = _interopRequireDefault(require("@mui/material/Snackbar"));
34
34
  var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
35
35
  var _List = _interopRequireDefault(require("@mui/material/List"));
36
36
  var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
37
+ var _ListItemButton = _interopRequireDefault(require("@mui/material/ListItemButton"));
37
38
  var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
38
39
  var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
39
40
  var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
@@ -73,6 +74,7 @@ var _LooksOne = _interopRequireDefault(require("@mui/icons-material/LooksOne"));
73
74
  var _RoomService = _interopRequireDefault(require("@mui/icons-material/RoomService"));
74
75
  var _Error = _interopRequireDefault(require("@mui/icons-material/Error"));
75
76
  var _WifiOff = _interopRequireDefault(require("@mui/icons-material/WifiOff"));
77
+ var _TextFields = _interopRequireDefault(require("@mui/icons-material/TextFields"));
76
78
  var _IconExpert = _interopRequireDefault(require("../icons/IconExpert"));
77
79
  var _IconAdapter = _interopRequireDefault(require("../icons/IconAdapter"));
78
80
  var _IconAlias = _interopRequireDefault(require("../icons/IconAlias"));
@@ -343,6 +345,15 @@ var styles = function styles(theme) {
343
345
  display: 'block'
344
346
  }
345
347
  },
348
+ cellNameWithDesc: {
349
+ lineHeight: 'normal'
350
+ },
351
+ cellNameDivDiv: {},
352
+ cellDescription: {
353
+ fontSize: 10,
354
+ opacity: 0.5,
355
+ fontStyle: 'italic'
356
+ },
346
357
  cellIdAlias: {
347
358
  fontStyle: 'italic',
348
359
  fontSize: 12,
@@ -455,7 +466,11 @@ var styles = function styles(theme) {
455
466
  },
456
467
  cellValueTooltipBox: {
457
468
  width: 250,
458
- overflow: 'hidden'
469
+ overflow: 'hidden',
470
+ pointerEvents: 'none'
471
+ },
472
+ tooltip: {
473
+ pointerEvents: 'none'
459
474
  },
460
475
  cellValueTextUnit: {
461
476
  marginLeft: theme.spacing(0.5),
@@ -1090,33 +1105,39 @@ function getSystemIcon(objects, id, k, imagePrefix) {
1090
1105
  }
1091
1106
  return icon || null;
1092
1107
  }
1093
- function getIdFieldTooltip(data, classes, lang) {
1108
+ function getObjectTooltip(data, lang) {
1094
1109
  var _data$obj2, _data$obj2$common;
1095
- if (data !== null && data !== void 0 && (_data$obj2 = data.obj) !== null && _data$obj2 !== void 0 && (_data$obj2$common = _data$obj2.common) !== null && _data$obj2$common !== void 0 && _data$obj2$common.desc && data.obj.common.desc !== '') {
1096
- var _data$obj3, _data$obj3$common, _data$obj4, _data$obj4$common, _data$obj5, _data$obj5$common, _tooltip;
1110
+ if (!data) {
1111
+ return null;
1112
+ }
1113
+ if ((_data$obj2 = data.obj) !== null && _data$obj2 !== void 0 && (_data$obj2$common = _data$obj2.common) !== null && _data$obj2$common !== void 0 && _data$obj2$common.desc) {
1097
1114
  var tooltip = '';
1098
- if ((0, _typeof2["default"])(data === null || data === void 0 ? void 0 : (_data$obj3 = data.obj) === null || _data$obj3 === void 0 ? void 0 : (_data$obj3$common = _data$obj3.common) === null || _data$obj3$common === void 0 ? void 0 : _data$obj3$common.desc) === 'object' && data.obj.common.desc[lang] !== undefined) {
1099
- tooltip = data.obj.common.desc[lang];
1100
- } else if ((0, _typeof2["default"])(data === null || data === void 0 ? void 0 : (_data$obj4 = data.obj) === null || _data$obj4 === void 0 ? void 0 : (_data$obj4$common = _data$obj4.common) === null || _data$obj4$common === void 0 ? void 0 : _data$obj4$common.desc) === 'object' && data.obj.common.desc['en'] !== undefined) {
1101
- tooltip = data.obj.common.desc['en'];
1102
- } else if ((0, _typeof2["default"])(data === null || data === void 0 ? void 0 : (_data$obj5 = data.obj) === null || _data$obj5 === void 0 ? void 0 : (_data$obj5$common = _data$obj5.common) === null || _data$obj5$common === void 0 ? void 0 : _data$obj5$common.desc) === 'object' && data.obj.common.desc[lang] === undefined) {
1103
- return data.id;
1115
+ if ((0, _typeof2["default"])(data.obj.common.desc) === 'object') {
1116
+ tooltip = data.obj.common.desc[lang] || data.obj.common.desc.en;
1104
1117
  } else {
1105
1118
  tooltip = data.obj.common.desc;
1106
1119
  }
1107
- if ((_tooltip = tooltip) !== null && _tooltip !== void 0 && _tooltip.startsWith('http')) {
1108
- return /*#__PURE__*/_react["default"].createElement("a", {
1109
- className: _Utils["default"].clsx(classes.cellIdTooltipLink),
1110
- href: tooltip,
1111
- target: "_blank",
1112
- rel: "noreferrer"
1113
- }, tooltip);
1120
+ if (!tooltip) {
1121
+ return null;
1114
1122
  }
1123
+ return tooltip.toString();
1124
+ }
1125
+ return null;
1126
+ }
1127
+ function getIdFieldTooltip(data, classes, lang) {
1128
+ var tooltip = getObjectTooltip(data, lang);
1129
+ if (tooltip !== null && tooltip !== void 0 && tooltip.startsWith('http')) {
1130
+ return /*#__PURE__*/_react["default"].createElement("a", {
1131
+ className: _Utils["default"].clsx(classes.cellIdTooltipLink),
1132
+ href: tooltip,
1133
+ target: "_blank",
1134
+ rel: "noreferrer"
1135
+ }, tooltip);
1136
+ } else {
1115
1137
  return /*#__PURE__*/_react["default"].createElement("span", {
1116
1138
  className: _Utils["default"].clsx(classes.cellIdTooltip)
1117
- }, tooltip);
1139
+ }, tooltip || data.id || '');
1118
1140
  }
1119
- return data.id;
1120
1141
  }
1121
1142
  function buildTree(objects, options) {
1122
1143
  options = options || {};
@@ -2451,9 +2472,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2451
2472
  var pos = _this.visibleCols.indexOf('type');
2452
2473
  pos !== -1 && _this.visibleCols.splice(pos, 1);
2453
2474
  }
2454
-
2455
- // this.possibleCols = SCREEN_WIDTHS.xl.fields;
2456
-
2475
+ _this.possibleCols = SCREEN_WIDTHS.xl.fields;
2457
2476
  var customDialog = null;
2458
2477
  if (props.router) {
2459
2478
  var location = props.router.getLocation();
@@ -2471,7 +2490,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2471
2490
  }).filter(function (id) {
2472
2491
  return id;
2473
2492
  });
2474
- var columns = null; // (window._localStorage || window.localStorage).getItem(`${props.dialogName || 'App'}.columns`);
2493
+ var columns = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columns"));
2475
2494
  try {
2476
2495
  columns = columns ? JSON.parse(columns) : null;
2477
2496
  } catch (e) {
@@ -2509,7 +2528,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2509
2528
  expandAllVisible: false,
2510
2529
  expanded: expanded,
2511
2530
  toast: '',
2512
- lang: props.lang,
2513
2531
  scrollBarWidth: 16,
2514
2532
  customDialog: customDialog,
2515
2533
  editObjectDialog: '',
@@ -2520,14 +2538,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2520
2538
  columns: columns,
2521
2539
  columnsForAdmin: null,
2522
2540
  columnsSelectorShow: false,
2523
- columnsAuto: true,
2524
- // (window._localStorage || window.localStorage).getItem(`${props.dialogName || 'App'}.columnsAuto`) !== 'false',
2541
+ columnsAuto: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columnsAuto")) !== 'false',
2525
2542
  columnsWidths: columnsWidths,
2526
2543
  columnsDialogTransparent: 100,
2527
2544
  columnsEditCustomDialog: null,
2528
2545
  customColumnDialogValueChanged: false,
2529
2546
  showExportDialog: false,
2530
- linesEnabled: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".lines")) === 'true'
2547
+ linesEnabled: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".lines")) === 'true',
2548
+ showDescription: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".desc")) !== 'false'
2531
2549
  };
2532
2550
  _this.edit = {};
2533
2551
  _this.texts = {
@@ -2700,7 +2718,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2700
2718
  _this2.lastAppliedFilter = null;
2701
2719
 
2702
2720
  // If selected ID is not visible, reset filter
2703
- if (node && !applyFilter(node, _this2.state.filter, _this2.state.lang, _this2.objects, null, null, props.customFilter, props.types)) {
2721
+ if (node && !applyFilter(node, _this2.state.filter, _this2.props.lang, _this2.objects, null, null, props.customFilter, props.types)) {
2704
2722
  // reset filter
2705
2723
  _this2.setState({
2706
2724
  filter: _objectSpread({}, DEFAULT_FILTER),
@@ -2774,7 +2792,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2774
2792
  if (this.state.selected && this.state.selected.length) {
2775
2793
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), JSON.stringify(this.lastSelectedItems));
2776
2794
  var name = this.lastSelectedItems.length === 1 ? _Utils["default"].getObjectName(this.objects, this.lastSelectedItems[0], null, {
2777
- language: this.state.lang
2795
+ language: this.props.lang
2778
2796
  }) : '';
2779
2797
  this.props.onSelect && this.props.onSelect(this.lastSelectedItems, name, isDouble);
2780
2798
  } else {
@@ -2958,82 +2976,65 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2958
2976
  * @private
2959
2977
  * @param {boolean} isLast
2960
2978
  */
2961
- /*
2962
- _renderDefinedList(isLast) {
2963
- const cols = [...this.possibleCols];
2964
- cols.unshift('id');
2965
- if (this.props.columns && !this.props.columns.includes('buttons')) {
2966
- const pos = cols.indexOf('buttons');
2967
- if (pos !== -1) {
2968
- cols.splice(pos, 1);
2969
- }
2979
+ }, {
2980
+ key: "_renderDefinedList",
2981
+ value: function _renderDefinedList(isLast) {
2982
+ var _this9 = this;
2983
+ var cols = (0, _toConsumableArray2["default"])(this.possibleCols);
2984
+ cols.unshift('id');
2985
+ if (this.props.columns && !this.props.columns.includes('buttons')) {
2986
+ var pos = cols.indexOf('buttons');
2987
+ if (pos !== -1) {
2988
+ cols.splice(pos, 1);
2970
2989
  }
2971
- return cols
2972
- .filter(id => (isLast && (id === 'val' || id === 'buttons')) || (!isLast && id !== 'val' && id !== 'buttons'))
2973
- .map(id =>
2974
- <ListItemButton onClick={() => {
2975
- if (!this.state.columnsAuto && id !== 'id') {
2976
- const columns = [...(this.state.columns || [])];
2977
- const pos = columns.indexOf(id);
2978
- if (pos === -1) {
2979
- columns.push(id);
2980
- columns.sort();
2981
- } else {
2982
- columns.splice(pos, 1);
2983
- }
2984
- (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
2985
- this.calculateColumnsVisibility(null, columns);
2986
- this.setState({ columns });
2987
- }
2988
- }} key={id}>
2989
- <Checkbox
2990
- edge="start"
2991
- disabled={id === 'id' || this.state.columnsAuto}
2992
- checked={id === 'id' || (this.state.columnsAuto ? this.visibleCols.includes(id) : (this.state.columns && this.state.columns.includes(id)))}
2993
- disableRipple
2994
- />
2995
- <ListItemText primary={this.texts['filter_' + id] || this.props.t('ra_' + id)} />
2996
- <ListItemSecondaryAction>
2997
- <FormControl
2998
- variant="standard"
2999
- className={this.props.classes.columnsDialogInputWidth}
3000
- style={{ marginTop: 0, marginBottom: 0 }}
3001
- margin="dense"
3002
- >
3003
- <Input
3004
- classes={{ underline: 'no-underline' }}
3005
- placeholder={this.props.t('ra_Width')}
3006
- value={this.state.columnsWidths[id] || ''}
3007
- onChange={e => {
3008
- const columnsWidths = JSON.parse(JSON.stringify(this.state.columnsWidths));
3009
- columnsWidths[id] = e.target.value;
3010
- (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3011
- this.calculateColumnsVisibility(null, null, null, columnsWidths);
3012
- this.setState({ columnsWidths });
3013
- }}
3014
- autoComplete="off"
3015
- />
3016
- </FormControl>
3017
- </ListItemSecondaryAction>
3018
- </ListItemButton>
3019
- );
3020
- }
3021
- */
2990
+ }
2991
+ return cols.filter(function (id) {
2992
+ return isLast && (id === 'val' || id === 'buttons') || !isLast && id !== 'val' && id !== 'buttons';
2993
+ }).map(function (id) {
2994
+ return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
2995
+ onClick: function onClick() {
2996
+ if (!_this9.state.columnsAuto && id !== 'id') {
2997
+ var columns = (0, _toConsumableArray2["default"])(_this9.state.columns || []);
2998
+ var _pos = columns.indexOf(id);
2999
+ if (_pos === -1) {
3000
+ columns.push(id);
3001
+ columns.sort();
3002
+ } else {
3003
+ columns.splice(_pos, 1);
3004
+ }
3005
+ (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3006
+ _this9.calculateColumnsVisibility(null, columns);
3007
+ _this9.setState({
3008
+ columns: columns
3009
+ });
3010
+ }
3011
+ },
3012
+ key: id
3013
+ }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3014
+ edge: "start",
3015
+ disabled: id === 'id' || _this9.state.columnsAuto,
3016
+ checked: id === 'id' || (_this9.state.columnsAuto ? _this9.visibleCols.includes(id) : _this9.state.columns && _this9.state.columns.includes(id)),
3017
+ disableRipple: true
3018
+ }), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3019
+ primary: _this9.texts['filter_' + id] || _this9.props.t('ra_' + id)
3020
+ }));
3021
+ });
3022
+ }
3022
3023
 
3023
3024
  /**
3024
- * Renders the columns selector.
3025
+ * Renders the columns' selector.
3025
3026
  * @returns {JSX.Element | null}
3026
3027
  */
3027
3028
  }, {
3028
3029
  key: "renderColumnsSelectorDialog",
3029
3030
  value: function renderColumnsSelectorDialog() {
3030
- var _this9 = this;
3031
+ var _this10 = this;
3031
3032
  if (!this.state.columnsSelectorShow) {
3032
3033
  return null;
3033
3034
  }
3034
3035
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
3035
3036
  onClose: function onClose() {
3036
- return _this9.setState({
3037
+ return _this10.setState({
3037
3038
  columnsSelectorShow: false
3038
3039
  });
3039
3040
  },
@@ -3050,9 +3051,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3050
3051
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3051
3052
  checked: this.state.foldersFirst,
3052
3053
  onChange: function onChange() {
3053
- (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".foldersFirst"), _this9.state.foldersFirst ? 'false' : 'true');
3054
- _this9.setState({
3055
- foldersFirst: !_this9.state.foldersFirst
3054
+ (window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".foldersFirst"), _this10.state.foldersFirst ? 'false' : 'true');
3055
+ _this10.setState({
3056
+ foldersFirst: !_this10.state.foldersFirst
3056
3057
  });
3057
3058
  }
3058
3059
  }),
@@ -3062,17 +3063,76 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3062
3063
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3063
3064
  checked: this.state.linesEnabled,
3064
3065
  onChange: function onChange() {
3065
- (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".lines"), _this9.state.linesEnabled ? 'false' : 'true');
3066
- _this9.setState({
3067
- linesEnabled: !_this9.state.linesEnabled
3066
+ (window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".lines"), _this10.state.linesEnabled ? 'false' : 'true');
3067
+ _this10.setState({
3068
+ linesEnabled: !_this10.state.linesEnabled
3068
3069
  });
3069
3070
  }
3070
3071
  }),
3071
3072
  label: this.props.t('ra_Show lines between rows')
3072
- })), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3073
+ }), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3074
+ className: this.props.classes.switchColumnAuto,
3075
+ control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3076
+ checked: this.state.columnsAuto,
3077
+ onChange: function onChange() {
3078
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
3079
+ if (!_this10.state.columnsAuto) {
3080
+ _this10.calculateColumnsVisibility(true);
3081
+ _this10.setState({
3082
+ columnsAuto: true
3083
+ });
3084
+ } else {
3085
+ if (!_this10.state.columns) {
3086
+ _this10.calculateColumnsVisibility(false, (0, _toConsumableArray2["default"])(_this10.visibleCols));
3087
+ _this10.setState({
3088
+ columnsAuto: false,
3089
+ columns: (0, _toConsumableArray2["default"])(_this10.visibleCols)
3090
+ });
3091
+ } else {
3092
+ _this10.calculateColumnsVisibility(false);
3093
+ _this10.setState({
3094
+ columnsAuto: false
3095
+ });
3096
+ }
3097
+ }
3098
+ }
3099
+ }),
3100
+ label: this.props.t('ra_Auto (no custom columns)')
3101
+ }), /*#__PURE__*/_react["default"].createElement(_List["default"], null, this._renderDefinedList(false), this.state.columnsForAdmin && Object.keys(this.state.columnsForAdmin).sort().map(function (adapter) {
3102
+ return _this10.state.columnsForAdmin[adapter].map(function (column) {
3103
+ return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
3104
+ onClick: function onClick() {
3105
+ if (!_this10.state.columnsAuto) {
3106
+ var columns = (0, _toConsumableArray2["default"])(_this10.state.columns || []);
3107
+ var id = '_' + adapter + '_' + column.path;
3108
+ var pos = columns.indexOf(id);
3109
+ if (pos === -1) {
3110
+ columns.push(id);
3111
+ columns.sort();
3112
+ } else {
3113
+ columns.splice(pos, 1);
3114
+ }
3115
+ _this10.calculateColumnsVisibility(null, columns);
3116
+ (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3117
+ _this10.setState({
3118
+ columns: columns
3119
+ });
3120
+ }
3121
+ },
3122
+ key: adapter + '_' + column.name
3123
+ }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], null, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3124
+ disabled: _this10.state.columnsAuto,
3125
+ edge: "start",
3126
+ checked: !_this10.state.columnsAuto && _this10.state.columns && _this10.state.columns.includes('_' + adapter + '_' + column.path),
3127
+ disableRipple: true
3128
+ })), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3129
+ primary: column.name + ' (' + adapter + ')'
3130
+ }));
3131
+ });
3132
+ }), this._renderDefinedList(true))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3073
3133
  variant: "contained",
3074
3134
  onClick: function onClick() {
3075
- return _this9.setState({
3135
+ return _this10.setState({
3076
3136
  columnsSelectorShow: false
3077
3137
  });
3078
3138
  },
@@ -3087,12 +3147,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3087
3147
  }, {
3088
3148
  key: "getAdditionalColumns",
3089
3149
  value: function getAdditionalColumns() {
3090
- var _this10 = this;
3150
+ var _this11 = this;
3091
3151
  return this.props.socket.getAdapters().then(function (instances) {
3092
3152
  var columnsForAdmin = null;
3093
3153
  // find all additional columns
3094
3154
  instances.forEach(function (obj) {
3095
- return columnsForAdmin = _this10.parseObjectForAdmins(columnsForAdmin, obj);
3155
+ return columnsForAdmin = _this11.parseObjectForAdmins(columnsForAdmin, obj);
3096
3156
  });
3097
3157
  return columnsForAdmin;
3098
3158
  })["catch"](function () {
@@ -3157,7 +3217,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3157
3217
  * @param {any} obj
3158
3218
  */
3159
3219
  function parseObjectForAdmins(columnsForAdmin, obj) {
3160
- var _this11 = this;
3220
+ var _this12 = this;
3161
3221
  if (obj.common && obj.common.adminColumns && obj.common.name) {
3162
3222
  var columns = obj.common.adminColumns;
3163
3223
  if ((0, _typeof2["default"])(columns) !== 'object') {
@@ -3203,7 +3263,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3203
3263
  }
3204
3264
  return {
3205
3265
  path: item.path,
3206
- name: item.name[_this11.props.lang] || item.name.en,
3266
+ name: item.name[_this12.props.lang] || item.name.en,
3207
3267
  width: item.width,
3208
3268
  edit: !!item.edit,
3209
3269
  type: item.type,
@@ -3266,16 +3326,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3266
3326
  }, {
3267
3327
  key: "pauseSubscribe",
3268
3328
  value: function pauseSubscribe(isPause) {
3269
- var _this12 = this;
3329
+ var _this13 = this;
3270
3330
  if (!this.pausedSubscribes && isPause) {
3271
3331
  this.pausedSubscribes = true;
3272
3332
  this.subscribes.forEach(function (id) {
3273
- return _this12.props.socket.unsubscribeState(id, _this12.onStateChange);
3333
+ return _this13.props.socket.unsubscribeState(id, _this13.onStateChange);
3274
3334
  });
3275
3335
  } else if (this.pausedSubscribes && !isPause) {
3276
3336
  this.pausedSubscribes = false;
3277
3337
  this.subscribes.forEach(function (id) {
3278
- return _this12.props.socket.subscribeState(id, _this12.onStateChange);
3338
+ return _this13.props.socket.subscribeState(id, _this13.onStateChange);
3279
3339
  });
3280
3340
  }
3281
3341
  }
@@ -3288,14 +3348,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3288
3348
  }, {
3289
3349
  key: "onFilter",
3290
3350
  value: function onFilter(name, value) {
3291
- var _this13 = this;
3351
+ var _this14 = this;
3292
3352
  this.filterTimer = null;
3293
3353
  var filter = _objectSpread({}, this.state.filter);
3294
3354
  Object.keys(this.filterRefs).forEach(function (_name) {
3295
- if (_this13.filterRefs[_name] && _this13.filterRefs[_name].current) {
3296
- for (var i = 0; i < _this13.filterRefs[_name].current.children.length; i++) {
3297
- if (_this13.filterRefs[_name].current.children[i].tagName === 'INPUT') {
3298
- filter[_name] = _this13.filterRefs[_name].current.children[i].value;
3355
+ if (_this14.filterRefs[_name] && _this14.filterRefs[_name].current) {
3356
+ for (var i = 0; i < _this14.filterRefs[_name].current.children.length; i++) {
3357
+ if (_this14.filterRefs[_name].current.children[i].tagName === 'INPUT') {
3358
+ filter[_name] = _this14.filterRefs[_name].current.children[i].value;
3299
3359
  break;
3300
3360
  }
3301
3361
  }
@@ -3312,19 +3372,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3312
3372
  this.setState({
3313
3373
  filter: filter
3314
3374
  }, function () {
3315
- return _this13.props.onFilterChanged && _this13.props.onFilterChanged(filter);
3375
+ return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3316
3376
  });
3317
3377
  }
3318
3378
  }
3319
3379
  }, {
3320
3380
  key: "clearFilter",
3321
3381
  value: function clearFilter() {
3322
- var _this14 = this;
3382
+ var _this15 = this;
3323
3383
  var filter = _objectSpread({}, this.state.filter);
3324
3384
  Object.keys(this.filterRefs).forEach(function (name) {
3325
- if (_this14.filterRefs[name] && _this14.filterRefs[name].current) {
3326
- for (var i = 0; i < _this14.filterRefs[name].current.childNodes.length; i++) {
3327
- var item = _this14.filterRefs[name].current.childNodes[i];
3385
+ if (_this15.filterRefs[name] && _this15.filterRefs[name].current) {
3386
+ for (var i = 0; i < _this15.filterRefs[name].current.childNodes.length; i++) {
3387
+ var item = _this15.filterRefs[name].current.childNodes[i];
3328
3388
  if (item.tagName === 'INPUT') {
3329
3389
  filter[name] = '';
3330
3390
  item.value = '';
@@ -3339,16 +3399,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3339
3399
  filter: filter,
3340
3400
  filterKey: this.state.filterKey + 1
3341
3401
  }, function () {
3342
- return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3402
+ return _this15.props.onFilterChanged && _this15.props.onFilterChanged(filter);
3343
3403
  });
3344
3404
  }
3345
3405
  }
3346
3406
  }, {
3347
3407
  key: "isFilterEmpty",
3348
3408
  value: function isFilterEmpty() {
3349
- var _this15 = this;
3409
+ var _this16 = this;
3350
3410
  var someNotEmpty = Object.keys(this.state.filter).find(function (attr) {
3351
- return attr !== 'expertMode' && _this15.state.filter[attr];
3411
+ return attr !== 'expertMode' && _this16.state.filter[attr];
3352
3412
  });
3353
3413
  return !someNotEmpty;
3354
3414
  }
@@ -3360,7 +3420,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3360
3420
  }, {
3361
3421
  key: "getFilterInput",
3362
3422
  value: function getFilterInput(name) {
3363
- var _this16 = this,
3423
+ var _this17 = this,
3364
3424
  _this$filterRefs$name,
3365
3425
  _this$filterRefs$name2;
3366
3426
  return /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
@@ -3378,9 +3438,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3378
3438
  placeholder: this.texts["filter_".concat(name)],
3379
3439
  defaultValue: this.state.filter[name],
3380
3440
  onChange: function onChange() {
3381
- _this16.filterTimer && clearTimeout(_this16.filterTimer);
3382
- _this16.filterTimer = setTimeout(function () {
3383
- return _this16.onFilter();
3441
+ _this17.filterTimer && clearTimeout(_this17.filterTimer);
3442
+ _this17.filterTimer = setTimeout(function () {
3443
+ return _this17.onFilter();
3384
3444
  }, 400);
3385
3445
  },
3386
3446
  autoComplete: "off"
@@ -3392,8 +3452,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3392
3452
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3393
3453
  size: "small",
3394
3454
  onClick: function onClick() {
3395
- _this16.filterRefs[name].current.firstChild.value = '';
3396
- _this16.onFilter(name, '');
3455
+ _this17.filterRefs[name].current.firstChild.value = '';
3456
+ _this17.onFilter(name, '');
3397
3457
  }
3398
3458
  }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
3399
3459
  }
@@ -3406,7 +3466,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3406
3466
  }, {
3407
3467
  key: "getFilterSelect",
3408
3468
  value: function getFilterSelect(name, values) {
3409
- var _this17 = this,
3469
+ var _this18 = this,
3410
3470
  _this$filterRefs$name3,
3411
3471
  _this$filterRefs$name4,
3412
3472
  _this$filterRefs$name5;
@@ -3423,9 +3483,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3423
3483
  ref: this.filterRefs[name],
3424
3484
  className: "".concat(this.props.classes.headerCellInput, " no-underline"),
3425
3485
  onChange: function onChange() {
3426
- _this17.filterTimer && clearTimeout(_this17.filterTimer);
3427
- _this17.filterTimer = setTimeout(function () {
3428
- return _this17.onFilter();
3486
+ _this18.filterTimer && clearTimeout(_this18.filterTimer);
3487
+ _this18.filterTimer = setTimeout(function () {
3488
+ return _this18.onFilter();
3429
3489
  }, 400);
3430
3490
  },
3431
3491
  defaultValue: this.state.filter[name] || '',
@@ -3452,7 +3512,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3452
3512
  _name = item;
3453
3513
  }
3454
3514
  return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
3455
- className: _this17.props.classes.headerCellSelectItem,
3515
+ className: _this18.props.classes.headerCellSelectItem,
3456
3516
  key: id,
3457
3517
  value: id
3458
3518
  }, icon || (hasIcons ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -3463,15 +3523,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3463
3523
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3464
3524
  size: "small",
3465
3525
  onClick: function onClick() {
3466
- var newFilter = _objectSpread({}, _this17.state.filter);
3526
+ var newFilter = _objectSpread({}, _this18.state.filter);
3467
3527
  newFilter[name] = '';
3468
- _this17.filterRefs[name].current.childNodes[1].value = '';
3469
- (window._localStorage || window.localStorage).setItem("".concat(_this17.props.dialogName || 'App', ".objectFilter"), JSON.stringify(newFilter));
3470
- _this17.setState({
3528
+ _this18.filterRefs[name].current.childNodes[1].value = '';
3529
+ (window._localStorage || window.localStorage).setItem("".concat(_this18.props.dialogName || 'App', ".objectFilter"), JSON.stringify(newFilter));
3530
+ _this18.setState({
3471
3531
  filter: newFilter,
3472
- filterKey: _this17.state.filterKey + 1
3532
+ filterKey: _this18.state.filterKey + 1
3473
3533
  }, function () {
3474
- return _this17.props.onFilterChanged && _this17.props.onFilterChanged(newFilter);
3534
+ return _this18.props.onFilterChanged && _this18.props.onFilterChanged(newFilter);
3475
3535
  });
3476
3536
  }
3477
3537
  }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
@@ -3492,15 +3552,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3492
3552
  }, {
3493
3553
  key: "getFilterSelectRoom",
3494
3554
  value: function getFilterSelectRoom() {
3495
- var _this18 = this;
3555
+ var _this19 = this;
3496
3556
  var rooms = this.info.roomEnums.map(function (id) {
3497
- var _this18$objects$id, _this18$objects$id$co, _this18$objects$id2, _this18$objects$id2$c;
3557
+ var _this19$objects$id, _this19$objects$id$co, _this19$objects$id2, _this19$objects$id2$c;
3498
3558
  return {
3499
- name: getName(((_this18$objects$id = _this18.objects[id]) === null || _this18$objects$id === void 0 ? void 0 : (_this18$objects$id$co = _this18$objects$id.common) === null || _this18$objects$id$co === void 0 ? void 0 : _this18$objects$id$co.name) || id.split('.').pop()),
3559
+ name: getName(((_this19$objects$id = _this19.objects[id]) === null || _this19$objects$id === void 0 ? void 0 : (_this19$objects$id$co = _this19$objects$id.common) === null || _this19$objects$id$co === void 0 ? void 0 : _this19$objects$id$co.name) || id.split('.').pop()),
3500
3560
  value: id,
3501
3561
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3502
- src: ((_this18$objects$id2 = _this18.objects[id]) === null || _this18$objects$id2 === void 0 ? void 0 : (_this18$objects$id2$c = _this18$objects$id2.common) === null || _this18$objects$id2$c === void 0 ? void 0 : _this18$objects$id2$c.icon) || '',
3503
- className: _this18.props.classes.selectIcon
3562
+ src: ((_this19$objects$id2 = _this19.objects[id]) === null || _this19$objects$id2 === void 0 ? void 0 : (_this19$objects$id2$c = _this19$objects$id2.common) === null || _this19$objects$id2$c === void 0 ? void 0 : _this19$objects$id2$c.icon) || '',
3563
+ className: _this19.props.classes.selectIcon
3504
3564
  })
3505
3565
  };
3506
3566
  });
@@ -3513,15 +3573,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3513
3573
  }, {
3514
3574
  key: "getFilterSelectFunction",
3515
3575
  value: function getFilterSelectFunction() {
3516
- var _this19 = this;
3576
+ var _this20 = this;
3517
3577
  var func = this.info.funcEnums.map(function (id) {
3518
- var _this19$objects$id, _this19$objects$id$co;
3578
+ var _this20$objects$id, _this20$objects$id$co;
3519
3579
  return {
3520
- name: getName(_this19.objects[id] && _this19.objects[id].common && _this19.objects[id].common.name || id.split('.').pop()),
3580
+ name: getName(_this20.objects[id] && _this20.objects[id].common && _this20.objects[id].common.name || id.split('.').pop()),
3521
3581
  value: id,
3522
3582
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3523
- src: ((_this19$objects$id = _this19.objects[id]) === null || _this19$objects$id === void 0 ? void 0 : (_this19$objects$id$co = _this19$objects$id.common) === null || _this19$objects$id$co === void 0 ? void 0 : _this19$objects$id$co.icon) || '',
3524
- className: _this19.props.classes.selectIcon
3583
+ src: ((_this20$objects$id = _this20.objects[id]) === null || _this20$objects$id === void 0 ? void 0 : (_this20$objects$id$co = _this20$objects$id.common) === null || _this20$objects$id$co === void 0 ? void 0 : _this20$objects$id$co.icon) || '',
3584
+ className: _this20.props.classes.selectIcon
3525
3585
  })
3526
3586
  };
3527
3587
  });
@@ -3550,15 +3610,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3550
3610
  }, {
3551
3611
  key: "getFilterSelectCustoms",
3552
3612
  value: function getFilterSelectCustoms() {
3553
- var _this20 = this;
3613
+ var _this21 = this;
3554
3614
  if (this.info.customs.length) {
3555
3615
  var customs = this.info.customs.map(function (id) {
3556
3616
  return {
3557
3617
  name: id,
3558
3618
  value: id,
3559
3619
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3560
- src: getSelectIdIcon(_this20.objects, id, _this20.imagePrefix) || '',
3561
- className: _this20.props.classes.selectIcon
3620
+ src: getSelectIdIcon(_this21.objects, id, _this21.imagePrefix) || '',
3621
+ className: _this21.props.classes.selectIcon
3562
3622
  })
3563
3623
  };
3564
3624
  });
@@ -3575,13 +3635,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3575
3635
  }, {
3576
3636
  key: "onExpandAll",
3577
3637
  value: function onExpandAll(root, expanded) {
3578
- var _this21 = this;
3638
+ var _this22 = this;
3579
3639
  root = root || this.root;
3580
3640
  expanded = expanded || [];
3581
3641
  root.children && root.children.forEach(function (item) {
3582
3642
  if (item.data.sumVisibility) {
3583
3643
  expanded.push(item.data.id);
3584
- _this21.onExpandAll(item, expanded);
3644
+ _this22.onExpandAll(item, expanded);
3585
3645
  }
3586
3646
  });
3587
3647
  if (root === this.root) {
@@ -3599,7 +3659,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3599
3659
  }, {
3600
3660
  key: "onCollapseAll",
3601
3661
  value: function onCollapseAll() {
3602
- var _this22 = this;
3662
+ var _this23 = this;
3603
3663
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify([]));
3604
3664
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '[]');
3605
3665
  this.setState({
@@ -3607,7 +3667,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3607
3667
  depth: 0,
3608
3668
  selected: []
3609
3669
  }, function () {
3610
- return _this22.onAfterSelect();
3670
+ return _this23.onAfterSelect();
3611
3671
  });
3612
3672
  }
3613
3673
 
@@ -3620,7 +3680,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3620
3680
  }, {
3621
3681
  key: "expandDepth",
3622
3682
  value: function expandDepth(root, depth, expanded) {
3623
- var _this23 = this;
3683
+ var _this24 = this;
3624
3684
  root = root || this.root;
3625
3685
  if (depth > 0) {
3626
3686
  if (root.children) {
@@ -3631,7 +3691,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3631
3691
  expanded.sort();
3632
3692
  }
3633
3693
  if (depth - 1 > 0) {
3634
- _this23.expandDepth(item, depth - 1, expanded);
3694
+ _this24.expandDepth(item, depth - 1, expanded);
3635
3695
  }
3636
3696
  }
3637
3697
  });
@@ -3718,17 +3778,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3718
3778
  }, {
3719
3779
  key: "_exportObjects",
3720
3780
  value: function _exportObjects(isAll) {
3721
- var _this24 = this;
3781
+ var _this25 = this;
3722
3782
  if (isAll) {
3723
3783
  generateFile('allObjects.json', this.objects);
3724
3784
  } else if (this.state.selected.length || this.state.selectedNonObject) {
3725
3785
  var result = {};
3726
3786
  var id = this.state.selected[0] || this.state.selectedNonObject;
3727
3787
  this._getSelectedIdsForExport().forEach(function (key) {
3728
- result[key] = JSON.parse(JSON.stringify(_this24.objects[key]));
3788
+ result[key] = JSON.parse(JSON.stringify(_this25.objects[key]));
3729
3789
  // add enum information
3730
3790
  if (result[key].common) {
3731
- var enums = _this24.getEnumsForId(key);
3791
+ var enums = _this25.getEnumsForId(key);
3732
3792
  if (enums) {
3733
3793
  result[key].common.enums = enums;
3734
3794
  }
@@ -3742,7 +3802,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3742
3802
  }, {
3743
3803
  key: "renderExportDialog",
3744
3804
  value: function renderExportDialog() {
3745
- var _this25 = this;
3805
+ var _this26 = this;
3746
3806
  if (this.state.showExportDialog === false) {
3747
3807
  return null;
3748
3808
  }
@@ -3752,10 +3812,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3752
3812
  color: "grey",
3753
3813
  variant: "outlined",
3754
3814
  onClick: function onClick() {
3755
- return _this25.setState({
3815
+ return _this26.setState({
3756
3816
  showExportDialog: false
3757
3817
  }, function () {
3758
- return _this25._exportObjects(true);
3818
+ return _this26._exportObjects(true);
3759
3819
  });
3760
3820
  }
3761
3821
  }, this.props.t('ra_All objects'), " (", Object.keys(this.objects).length, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -3763,17 +3823,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3763
3823
  variant: "contained",
3764
3824
  autoFocus: true,
3765
3825
  onClick: function onClick() {
3766
- return _this25.setState({
3826
+ return _this26.setState({
3767
3827
  showExportDialog: false
3768
3828
  }, function () {
3769
- return _this25._exportObjects(false);
3829
+ return _this26._exportObjects(false);
3770
3830
  });
3771
3831
  }
3772
3832
  }, this.props.t('ra_Only selected'), " (", this.state.showExportDialog, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3773
3833
  color: "grey",
3774
3834
  variant: "contained",
3775
3835
  onClick: function onClick() {
3776
- return _this25.setState({
3836
+ return _this26.setState({
3777
3837
  showExportDialog: false
3778
3838
  });
3779
3839
  },
@@ -3788,7 +3848,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3788
3848
  * @returns {JSX.Element}
3789
3849
  */
3790
3850
  function getToolbar() {
3791
- var _this26 = this;
3851
+ var _this27 = this;
3792
3852
  var allowObjectCreation = false;
3793
3853
  if (this.state.selected.length || this.state.selectedNonObject) {
3794
3854
  var id = this.state.selected[0] || this.state.selectedNonObject;
@@ -3813,95 +3873,139 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3813
3873
  alignItems: 'center'
3814
3874
  }
3815
3875
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3816
- title: this.props.t('ra_Refresh tree')
3876
+ title: this.props.t('ra_Refresh tree'),
3877
+ classes: {
3878
+ popper: this.props.classes.tooltip
3879
+ }
3817
3880
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3818
3881
  onClick: function onClick() {
3819
- return _this26.refreshComponent();
3882
+ return _this27.refreshComponent();
3820
3883
  },
3821
3884
  disabled: this.state.updating,
3822
3885
  size: "large"
3823
3886
  }, /*#__PURE__*/_react["default"].createElement(_Refresh["default"], null)))), this.props.showExpertButton && !this.props.expertMode && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3824
- title: this.props.t('ra_expertMode')
3887
+ title: this.props.t('ra_expertMode'),
3888
+ classes: {
3889
+ popper: this.props.classes.tooltip
3890
+ }
3825
3891
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3826
3892
  key: "expertMode",
3827
3893
  color: this.state.filter.expertMode ? 'secondary' : 'default',
3828
3894
  onClick: function onClick() {
3829
- return _this26.onFilter('expertMode', !_this26.state.filter.expertMode);
3895
+ return _this27.onFilter('expertMode', !_this27.state.filter.expertMode);
3830
3896
  },
3831
3897
  size: "large"
3832
3898
  }, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3833
- title: this.props.t('ra_Configure')
3899
+ title: this.props.t('ra_Configure'),
3900
+ classes: {
3901
+ popper: this.props.classes.tooltip
3902
+ }
3834
3903
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3835
- key: "columnSelector"
3836
- // color={this.state.columnsAuto ? 'primary' : 'default'}
3837
- ,
3904
+ key: "columnSelector",
3905
+ color: this.state.columnsAuto ? 'primary' : 'default',
3838
3906
  onClick: function onClick() {
3839
- return _this26.setState({
3907
+ return _this27.setState({
3840
3908
  columnsSelectorShow: true
3841
3909
  });
3842
3910
  },
3843
3911
  size: "large"
3844
3912
  }, /*#__PURE__*/_react["default"].createElement(_ViewColumn["default"], null))), this.state.expandAllVisible && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3845
- title: this.props.t('ra_Expand all nodes')
3913
+ title: this.props.t('ra_Expand all nodes'),
3914
+ classes: {
3915
+ popper: this.props.classes.tooltip
3916
+ }
3846
3917
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3847
3918
  key: "expandAll",
3848
3919
  onClick: function onClick() {
3849
- return _this26.onExpandAll();
3920
+ return _this27.onExpandAll();
3850
3921
  },
3851
3922
  size: "large"
3852
3923
  }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3853
- title: this.props.t('ra_Collapse all nodes')
3924
+ title: this.props.t('ra_Collapse all nodes'),
3925
+ classes: {
3926
+ popper: this.props.classes.tooltip
3927
+ }
3854
3928
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3855
3929
  key: "collapseAll",
3856
3930
  onClick: function onClick() {
3857
- return _this26.onCollapseAll();
3931
+ return _this27.onCollapseAll();
3858
3932
  },
3859
3933
  size: "large"
3860
3934
  }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3861
- title: this.props.t('ra_Expand one step node')
3935
+ title: this.props.t('ra_Expand one step node'),
3936
+ classes: {
3937
+ popper: this.props.classes.tooltip
3938
+ }
3862
3939
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3863
3940
  key: "expandVisible",
3864
3941
  color: "primary",
3865
3942
  onClick: function onClick() {
3866
- return _this26.onExpandVisible();
3943
+ return _this27.onExpandVisible();
3867
3944
  },
3868
3945
  size: "large"
3869
3946
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
3870
3947
  badgeContent: this.state.depth,
3871
3948
  color: "secondary"
3872
3949
  }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null)))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3873
- title: this.props.t('ra_Collapse one step node')
3950
+ title: this.props.t('ra_Collapse one step node'),
3951
+ classes: {
3952
+ popper: this.props.classes.tooltip
3953
+ }
3874
3954
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3875
3955
  key: "collapseVisible",
3876
3956
  color: "primary",
3877
3957
  onClick: function onClick() {
3878
- return _this26.onCollapseVisible();
3958
+ return _this27.onCollapseVisible();
3879
3959
  },
3880
3960
  size: "large"
3881
3961
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
3882
3962
  badgeContent: this.state.depth,
3883
3963
  color: "secondary"
3884
3964
  }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null)))), this.props.objectStatesView && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3885
- title: this.props.t('ra_Toggle the states view')
3965
+ title: this.props.t('ra_Toggle the states view'),
3966
+ classes: {
3967
+ popper: this.props.classes.tooltip
3968
+ }
3886
3969
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3887
3970
  onClick: function onClick() {
3888
- return _this26.onStatesViewVisible();
3971
+ return _this27.onStatesViewVisible();
3889
3972
  },
3890
3973
  size: "large"
3891
3974
  }, /*#__PURE__*/_react["default"].createElement(_LooksOne["default"], {
3892
3975
  color: this.state.statesView ? 'primary' : 'inherit'
3976
+ }))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3977
+ title: this.props.t('ra_Show/Hide object descriptions'),
3978
+ classes: {
3979
+ popper: this.props.classes.tooltip
3980
+ }
3981
+ }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3982
+ onClick: function onClick() {
3983
+ (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".desc"), _this27.state.showDescription ? 'false' : 'true');
3984
+ _this27.setState({
3985
+ showDescription: !_this27.state.showDescription
3986
+ });
3987
+ },
3988
+ size: "large"
3989
+ }, /*#__PURE__*/_react["default"].createElement(_TextFields["default"], {
3990
+ color: this.state.showDescription ? 'primary' : 'inherit'
3893
3991
  }))), this.props.objectAddBoolean ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3894
- title: this.toolTipObjectCreating()
3992
+ title: this.toolTipObjectCreating(),
3993
+ classes: {
3994
+ popper: this.props.classes.tooltip
3995
+ }
3895
3996
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3896
3997
  disabled: !allowObjectCreation,
3897
3998
  onClick: function onClick() {
3898
- return _this26.setState({
3999
+ return _this27.setState({
3899
4000
  modalNewObj: true
3900
4001
  });
3901
4002
  },
3902
4003
  size: "large"
3903
4004
  }, /*#__PURE__*/_react["default"].createElement(_Add["default"], null)))) : null, this.props.objectImportExport && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3904
- title: this.props.t('ra_Add objects tree from JSON file')
4005
+ title: this.props.t('ra_Add objects tree from JSON file'),
4006
+ classes: {
4007
+ popper: this.props.classes.tooltip
4008
+ }
3905
4009
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3906
4010
  onClick: function onClick() {
3907
4011
  var input = document.createElement('input');
@@ -3909,17 +4013,20 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3909
4013
  input.setAttribute('id', 'files');
3910
4014
  input.setAttribute('opacity', 0);
3911
4015
  input.addEventListener('change', function (e) {
3912
- return _this26.handleJsonUpload(e);
4016
+ return _this27.handleJsonUpload(e);
3913
4017
  }, false);
3914
4018
  input.click();
3915
4019
  },
3916
4020
  size: "large"
3917
4021
  }, /*#__PURE__*/_react["default"].createElement(_Publish["default"], null))), this.props.objectImportExport && (!!this.state.selected.length || this.state.selectedNonObject) && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3918
- title: this.props.t('ra_Save objects tree as JSON file')
4022
+ title: this.props.t('ra_Save objects tree as JSON file'),
4023
+ classes: {
4024
+ popper: this.props.classes.tooltip
4025
+ }
3919
4026
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3920
4027
  onClick: function onClick() {
3921
- return _this26.setState({
3922
- showExportDialog: _this26._getSelectedIdsForExport().length
4028
+ return _this27.setState({
4029
+ showExportDialog: _this27._getSelectedIdsForExport().length
3923
4030
  });
3924
4031
  },
3925
4032
  size: "large"
@@ -3933,25 +4040,28 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3933
4040
  whiteSpace: 'nowrap'
3934
4041
  }
3935
4042
  }, "".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) {
3936
- return _this26.info.objects[el].type === 'state';
4043
+ return _this27.info.objects[el].type === 'state';
3937
4044
  }).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3938
- title: this.props.t('ra_Edit custom config')
4045
+ title: this.props.t('ra_Edit custom config'),
4046
+ classes: {
4047
+ popper: this.props.classes.tooltip
4048
+ }
3939
4049
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3940
4050
  onClick: function onClick() {
3941
4051
  // get all visible states
3942
- var ids = getVisibleItems(_this26.root, 'state', _this26.objects);
4052
+ var ids = getVisibleItems(_this27.root, 'state', _this27.objects);
3943
4053
  if (ids.length) {
3944
- _this26.pauseSubscribe(true);
4054
+ _this27.pauseSubscribe(true);
3945
4055
  if (ids.length === 1) {
3946
- (window._localStorage || window.localStorage).setItem("".concat(_this26.props.dialogName || 'App', ".objectSelected"), _this26.state.selected[0]);
3947
- _this26.props.router && _this26.props.router.doNavigate(null, 'custom', _this26.state.selected[0]);
4056
+ (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), _this27.state.selected[0]);
4057
+ _this27.props.router && _this27.props.router.doNavigate(null, 'custom', _this27.state.selected[0]);
3948
4058
  }
3949
- _this26.setState({
4059
+ _this27.setState({
3950
4060
  customDialog: ids
3951
4061
  });
3952
4062
  } else {
3953
- _this26.setState({
3954
- toast: _this26.props.t('ra_please select object')
4063
+ _this27.setState({
4064
+ toast: _this27.props.t('ra_please select object')
3955
4065
  });
3956
4066
  }
3957
4067
  },
@@ -4010,7 +4120,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4010
4120
  * @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
4011
4121
  */
4012
4122
  function renderColumnButtons(id, item, classes) {
4013
- var _this27 = this,
4123
+ var _this28 = this,
4014
4124
  _item$children2,
4015
4125
  _item$data$obj$common,
4016
4126
  _item$data$obj$common3;
@@ -4020,7 +4130,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4020
4130
  }, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4021
4131
  className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsEmptyButton, classes.cellButtonMinWidth),
4022
4132
  onClick: function onClick() {
4023
- return _this27.setState({
4133
+ return _this28.setState({
4024
4134
  modalEditOfAccess: true,
4025
4135
  modalEditOfAccessObjData: item.data
4026
4136
  });
@@ -4033,7 +4143,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4033
4143
  title: this.texts.deleteObject,
4034
4144
  onClick: function onClick() {
4035
4145
  // calculate number of children
4036
- var keys = Object.keys(_this27.objects);
4146
+ var keys = Object.keys(_this28.objects);
4037
4147
  keys.sort();
4038
4148
  var count = 0;
4039
4149
  var start = "".concat(id, ".");
@@ -4044,7 +4154,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4044
4154
  break;
4045
4155
  }
4046
4156
  }
4047
- _this27.props.onObjectDelete(id, !!(item.children && item.children.length), false, count + 1);
4157
+ _this28.props.onObjectDelete(id, !!(item.children && item.children.length), false, count + 1);
4048
4158
  }
4049
4159
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
4050
4160
  className: classes.cellButtonsButtonIcon
@@ -4055,11 +4165,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4055
4165
  var aclSystemConfig = item.data.obj.acl && (item.data.obj.type === 'state' ? this.systemConfig.common.defaultNewAcl.state : this.systemConfig.common.defaultNewAcl.object);
4056
4166
  return [this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4057
4167
  key: "acl",
4058
- title: item.data.aclTooltip
4168
+ title: item.data.aclTooltip,
4169
+ classes: {
4170
+ popper: this.props.classes.tooltip
4171
+ }
4059
4172
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4060
4173
  className: classes.cellButtonMinWidth,
4061
4174
  onClick: function onClick() {
4062
- return _this27.setState({
4175
+ return _this28.setState({
4063
4176
  modalEditOfAccess: true,
4064
4177
  modalEditOfAccessObjData: item.data
4065
4178
  });
@@ -4077,8 +4190,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4077
4190
  "aria-label": "edit",
4078
4191
  title: this.texts.editObject,
4079
4192
  onClick: function onClick() {
4080
- (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4081
- _this27.setState({
4193
+ (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4194
+ _this28.setState({
4082
4195
  editObjectDialog: id
4083
4196
  });
4084
4197
  }
@@ -4091,7 +4204,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4091
4204
  "aria-label": "delete",
4092
4205
  onClick: function onClick() {
4093
4206
  var _item$children3, _item$data$obj$common2;
4094
- var keys = Object.keys(_this27.objects);
4207
+ var keys = Object.keys(_this28.objects);
4095
4208
  keys.sort();
4096
4209
  var count = 0;
4097
4210
  var start = "".concat(id, ".");
@@ -4102,7 +4215,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4102
4215
  break;
4103
4216
  }
4104
4217
  }
4105
- _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), count);
4218
+ _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), count);
4106
4219
  },
4107
4220
  title: this.texts.deleteObject
4108
4221
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
@@ -4114,10 +4227,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4114
4227
  "aria-label": "config",
4115
4228
  title: this.texts.customConfig,
4116
4229
  onClick: function onClick() {
4117
- (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4118
- _this27.pauseSubscribe(true);
4119
- _this27.props.router && _this27.props.router.doNavigate(null, 'customs', id);
4120
- _this27.setState({
4230
+ (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4231
+ _this28.pauseSubscribe(true);
4232
+ _this28.props.router && _this28.props.router.doNavigate(null, 'customs', id);
4233
+ _this28.setState({
4121
4234
  customDialog: [id]
4122
4235
  });
4123
4236
  }
@@ -4191,7 +4304,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4191
4304
  key: "renderColumnValue",
4192
4305
  value: function renderColumnValue(id, item, classes) {
4193
4306
  var _obj$common4,
4194
- _this28 = this;
4307
+ _this29 = this;
4195
4308
  var obj = item.data.obj;
4196
4309
  if (!obj || !this.states) {
4197
4310
  return null;
@@ -4218,7 +4331,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4218
4331
  item.data.state = item.data.state || formatValue(id, state, obj, this.texts, this.props.dateFormat, this.props.isFloatComma);
4219
4332
  info = item.data.state;
4220
4333
  info.valFull = info.valFull.map(function (_item) {
4221
- if (_item.t === _this28.texts.quality && state.q) {
4334
+ if (_item.t === _this29.texts.quality && state.q) {
4222
4335
  return [/*#__PURE__*/_react["default"].createElement("div", {
4223
4336
  className: classes.cellValueTooltipBoth,
4224
4337
  key: _item.t
@@ -4265,7 +4378,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4265
4378
  }, "(", info.valText.s, ")") : null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
4266
4379
  className: _Utils["default"].clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonCopy),
4267
4380
  onClick: function onClick(e) {
4268
- return _this28.onCopy(e, copyText);
4381
+ return _this29.onCopy(e, copyText);
4269
4382
  },
4270
4383
  key: "cc"
4271
4384
  })
@@ -4287,7 +4400,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4287
4400
  popper: this.props.classes.cellValueTooltipBox
4288
4401
  },
4289
4402
  onOpen: function onOpen() {
4290
- return _this28.readHistory(id);
4403
+ return _this29.readHistory(id);
4291
4404
  }
4292
4405
  }, /*#__PURE__*/_react["default"].createElement("div", {
4293
4406
  style: info.style,
@@ -4303,7 +4416,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4303
4416
  key: "_syncEnum",
4304
4417
  value: function _syncEnum(id, enumIds, newArray, cb) {
4305
4418
  var _this$info$objects$en,
4306
- _this29 = this;
4419
+ _this30 = this;
4307
4420
  if (!enumIds || !enumIds.length) {
4308
4421
  cb && cb();
4309
4422
  return;
@@ -4319,9 +4432,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4319
4432
  var obj = JSON.parse(JSON.stringify(this.info.objects[enumId]));
4320
4433
  obj.common.members.splice(pos, 1);
4321
4434
  promises.push(this.props.socket.setObject(enumId, obj).then(function () {
4322
- return _this29.info.objects[enumId] = obj;
4435
+ return _this30.info.objects[enumId] = obj;
4323
4436
  })["catch"](function (e) {
4324
- return _this29.showError(e);
4437
+ return _this30.showError(e);
4325
4438
  }));
4326
4439
  }
4327
4440
  }
@@ -4334,15 +4447,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4334
4447
  _obj.common.members.push(id);
4335
4448
  _obj.common.members.sort();
4336
4449
  promises.push(this.props.socket.setObject(enumId, _obj).then(function () {
4337
- return _this29.info.objects[enumId] = _obj;
4450
+ return _this30.info.objects[enumId] = _obj;
4338
4451
  })["catch"](function (e) {
4339
- return _this29.showError(e);
4452
+ return _this30.showError(e);
4340
4453
  }));
4341
4454
  }
4342
4455
  }
4343
4456
  Promise.all(promises).then(function () {
4344
4457
  return setTimeout(function () {
4345
- return _this29._syncEnum(id, enumIds, newArray, cb);
4458
+ return _this30._syncEnum(id, enumIds, newArray, cb);
4346
4459
  }, 0);
4347
4460
  });
4348
4461
  }
@@ -4354,11 +4467,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4354
4467
  }, {
4355
4468
  key: "syncEnum",
4356
4469
  value: function syncEnum(id, enumName, newArray) {
4357
- var _this30 = this;
4470
+ var _this31 = this;
4358
4471
  var toCheck = (0, _toConsumableArray2["default"])(this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']);
4359
4472
  return new Promise(function (resolve) {
4360
- _this30._syncEnum(id, toCheck, newArray, function (error) {
4361
- error && _this30.showError(error);
4473
+ _this31._syncEnum(id, toCheck, newArray, function (error) {
4474
+ error && _this31.showError(error);
4362
4475
  // force update of object
4363
4476
  resolve();
4364
4477
  });
@@ -4372,7 +4485,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4372
4485
  }, {
4373
4486
  key: "renderEnumDialog",
4374
4487
  value: function renderEnumDialog() {
4375
- var _this31 = this;
4488
+ var _this32 = this;
4376
4489
  if (this.state.enumDialog) {
4377
4490
  var type = this.state.enumDialog.type;
4378
4491
  var item = this.state.enumDialog.item;
@@ -4380,9 +4493,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4380
4493
  var enumsOriginal = this.state.enumDialog.enumsOriginal;
4381
4494
  var enums = (type === 'room' ? this.info.roomEnums : this.info.funcEnums).map(function (id) {
4382
4495
  return {
4383
- name: getName(_this31.objects[id] && _this31.objects[id].common && _this31.objects[id].common.name || id.split('.').pop(), _this31.props.lang),
4496
+ name: getName(_this32.objects[id] && _this32.objects[id].common && _this32.objects[id].common.name || id.split('.').pop(), _this32.props.lang),
4384
4497
  value: id,
4385
- icon: getSelectIdIcon(_this31.objects, id, _this31.imagePrefix)
4498
+ icon: getSelectIdIcon(_this32.objects, id, _this32.imagePrefix)
4386
4499
  };
4387
4500
  }).sort(function (a, b) {
4388
4501
  return a.name > b.name ? 1 : -1;
@@ -4390,10 +4503,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4390
4503
  enums.forEach(function (_item) {
4391
4504
  if (_item.icon && typeof _item.icon === 'string') {
4392
4505
  _item.icon = /*#__PURE__*/_react["default"].createElement("div", {
4393
- className: _this31.props.classes.enumIconDiv
4506
+ className: _this32.props.classes.enumIconDiv
4394
4507
  }, /*#__PURE__*/_react["default"].createElement("img", {
4395
4508
  src: _item.icon,
4396
- className: _this31.props.classes.enumIcon,
4509
+ className: _this32.props.classes.enumIcon,
4397
4510
  alt: _item.name
4398
4511
  }));
4399
4512
  }
@@ -4404,7 +4517,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4404
4517
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4405
4518
  className: this.props.classes.enumDialog,
4406
4519
  onClose: function onClose() {
4407
- return _this31.setState({
4520
+ return _this32.setState({
4408
4521
  enumDialog: null
4409
4522
  });
4410
4523
  },
@@ -4418,8 +4531,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4418
4531
  disabled: JSON.stringify(enumsOriginal) === JSON.stringify(itemEnums),
4419
4532
  size: "small",
4420
4533
  onClick: function onClick() {
4421
- return _this31.syncEnum(item.data.id, type, itemEnums).then(function () {
4422
- return _this31.setState({
4534
+ return _this32.syncEnum(item.data.id, type, itemEnums).then(function () {
4535
+ return _this32.setState({
4423
4536
  enumDialog: null,
4424
4537
  enumDialogEnums: null
4425
4538
  });
@@ -4443,24 +4556,24 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4443
4556
  }
4444
4557
  var labelId = "checkbox-list-label-".concat(id);
4445
4558
  return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
4446
- className: _this31.props.classes.headerCellSelectItem,
4559
+ className: _this32.props.classes.headerCellSelectItem,
4447
4560
  key: id,
4448
4561
  onClick: function onClick() {
4449
4562
  var pos = itemEnums.indexOf(id);
4450
- var enumDialogEnums = JSON.parse(JSON.stringify(_this31.state.enumDialogEnums));
4563
+ var enumDialogEnums = JSON.parse(JSON.stringify(_this32.state.enumDialogEnums));
4451
4564
  if (pos === -1) {
4452
4565
  enumDialogEnums.push(id);
4453
4566
  enumDialogEnums.sort();
4454
4567
  } else {
4455
4568
  enumDialogEnums.splice(pos, 1);
4456
4569
  }
4457
- _this31.setState({
4570
+ _this32.setState({
4458
4571
  enumDialogEnums: enumDialogEnums
4459
4572
  });
4460
4573
  }
4461
4574
  }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
4462
4575
  classes: {
4463
- root: _this31.props.classes.enumCheckbox
4576
+ root: _this32.props.classes.enumCheckbox
4464
4577
  }
4465
4578
  }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4466
4579
  edge: "start",
@@ -4485,7 +4598,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4485
4598
  }, {
4486
4599
  key: "renderEditRoleDialog",
4487
4600
  value: function renderEditRoleDialog() {
4488
- var _this32 = this;
4601
+ var _this33 = this;
4489
4602
  if (this.state.roleDialog && this.props.objectBrowserEditRole) {
4490
4603
  var ObjectBrowserEditRole = this.props.objectBrowserEditRole;
4491
4604
  return /*#__PURE__*/_react["default"].createElement(ObjectBrowserEditRole, {
@@ -4496,9 +4609,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4496
4609
  roles: this.info.roles,
4497
4610
  onClose: function onClose(obj) {
4498
4611
  if (obj) {
4499
- _this32.info.objects[_this32.state.roleDialog] = obj;
4612
+ _this33.info.objects[_this33.state.roleDialog] = obj;
4500
4613
  }
4501
- _this32.setState({
4614
+ _this33.setState({
4502
4615
  roleDialog: false
4503
4616
  });
4504
4617
  }
@@ -4514,7 +4627,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4514
4627
  }, {
4515
4628
  key: "onColumnsEditCustomDialogClose",
4516
4629
  value: function onColumnsEditCustomDialogClose(isSave) {
4517
- var _this33 = this;
4630
+ var _this34 = this;
4518
4631
  if (isSave) {
4519
4632
  var value = this.customColumnDialog.value;
4520
4633
  if (this.customColumnDialog.type === 'boolean') {
@@ -4524,16 +4637,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4524
4637
  }
4525
4638
  this.customColumnDialog = null;
4526
4639
  this.props.socket.getObject(this.state.columnsEditCustomDialog.obj._id).then(function (obj) {
4527
- if (ObjectBrowser.setCustomValue(obj, _this33.state.columnsEditCustomDialog.it, value)) {
4528
- return _this33.props.socket.setObject(obj._id, obj);
4640
+ if (ObjectBrowser.setCustomValue(obj, _this34.state.columnsEditCustomDialog.it, value)) {
4641
+ return _this34.props.socket.setObject(obj._id, obj);
4529
4642
  }
4530
- throw new Error(_this33.props.t('ra_Cannot update attribute, because not found in the object'));
4643
+ throw new Error(_this34.props.t('ra_Cannot update attribute, because not found in the object'));
4531
4644
  }).then(function () {
4532
- return _this33.setState({
4645
+ return _this34.setState({
4533
4646
  columnsEditCustomDialog: null
4534
4647
  });
4535
4648
  })["catch"](function (e) {
4536
- return _this33.showError(e);
4649
+ return _this34.showError(e);
4537
4650
  });
4538
4651
  } else {
4539
4652
  this.customColumnDialog = null;
@@ -4549,7 +4662,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4549
4662
  }, {
4550
4663
  key: "renderColumnsEditCustomDialog",
4551
4664
  value: function renderColumnsEditCustomDialog() {
4552
- var _this34 = this;
4665
+ var _this35 = this;
4553
4666
  if (this.state.columnsEditCustomDialog) {
4554
4667
  if (!this.customColumnDialog) {
4555
4668
  var value = ObjectBrowser.getCustomValue(this.state.columnsEditCustomDialog.obj, this.state.columnsEditCustomDialog.it);
@@ -4561,7 +4674,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4561
4674
  }
4562
4675
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4563
4676
  onClose: function onClose() {
4564
- return _this34.setState({
4677
+ return _this35.setState({
4565
4678
  columnsEditCustomDialog: null
4566
4679
  });
4567
4680
  },
@@ -4575,14 +4688,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4575
4688
  }, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
4576
4689
  control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4577
4690
  onKeyUp: function onKeyUp(e) {
4578
- return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
4691
+ return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
4579
4692
  },
4580
4693
  defaultChecked: this.customColumnDialog.value === 'true',
4581
4694
  onChange: function onChange(e) {
4582
- _this34.customColumnDialog.value = e.target.checked.toString();
4583
- var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
4584
- if (changed === !_this34.state.customColumnDialogValueChanged) {
4585
- _this34.setState({
4695
+ _this35.customColumnDialog.value = e.target.checked.toString();
4696
+ var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
4697
+ if (changed === !_this35.state.customColumnDialogValueChanged) {
4698
+ _this35.setState({
4586
4699
  customColumnDialogValueChanged: changed
4587
4700
  });
4588
4701
  }
@@ -4594,14 +4707,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4594
4707
  defaultValue: this.customColumnDialog.value,
4595
4708
  fullWidth: true,
4596
4709
  onKeyUp: function onKeyUp(e) {
4597
- return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
4710
+ return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
4598
4711
  },
4599
4712
  label: "".concat(this.state.columnsEditCustomDialog.it.name, " (").concat(this.state.columnsEditCustomDialog.it.pathText, ")"),
4600
4713
  onChange: function onChange(e) {
4601
- _this34.customColumnDialog.value = e.target.value;
4602
- var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
4603
- if (changed === !_this34.state.customColumnDialogValueChanged) {
4604
- _this34.setState({
4714
+ _this35.customColumnDialog.value = e.target.value;
4715
+ var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
4716
+ if (changed === !_this35.state.customColumnDialogValueChanged) {
4717
+ _this35.setState({
4605
4718
  customColumnDialogValueChanged: changed
4606
4719
  });
4607
4720
  }
@@ -4610,7 +4723,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4610
4723
  }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4611
4724
  variant: "contained",
4612
4725
  onClick: function onClick() {
4613
- return _this34.onColumnsEditCustomDialogClose(true);
4726
+ return _this35.onColumnsEditCustomDialogClose(true);
4614
4727
  },
4615
4728
  disabled: !this.state.customColumnDialogValueChanged,
4616
4729
  color: "primary",
@@ -4619,7 +4732,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4619
4732
  color: "grey",
4620
4733
  variant: "contained",
4621
4734
  onClick: function onClick() {
4622
- return _this34.onColumnsEditCustomDialogClose();
4735
+ return _this35.onColumnsEditCustomDialogClose();
4623
4736
  },
4624
4737
  startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
4625
4738
  }, this.props.t('ra_Cancel'))));
@@ -4643,14 +4756,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4643
4756
  * @returns {JSX.Element | null}
4644
4757
  */
4645
4758
  function renderCustomValue(obj, it, item) {
4646
- var _this35 = this;
4759
+ var _this36 = this;
4647
4760
  var text = ObjectBrowser.getCustomValue(obj, it);
4648
4761
  if (text !== null && text !== undefined) {
4649
4762
  if (it.edit && !this.props.notEditable && (!it.objTypes || it.objTypes.includes(obj.type))) {
4650
4763
  return /*#__PURE__*/_react["default"].createElement("div", {
4651
4764
  className: _Utils["default"].clsx(this.props.classes.columnCustom, this.props.classes.columnCustomEditable, this.props.classes["columnCustom_".concat(it.align)]),
4652
4765
  onClick: function onClick() {
4653
- return _this35.setState({
4766
+ return _this36.setState({
4654
4767
  columnsEditCustomDialog: {
4655
4768
  item: item,
4656
4769
  it: it,
@@ -4679,7 +4792,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4679
4792
  }, {
4680
4793
  key: "renderLeaf",
4681
4794
  value: function renderLeaf(item, isExpanded, classes, counter) {
4682
- var _this36 = this,
4795
+ var _this37 = this,
4683
4796
  _common$alias,
4684
4797
  _common$alias2,
4685
4798
  _this$states$id2,
@@ -4700,12 +4813,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4700
4813
  iconFolder = isExpanded ? /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], {
4701
4814
  className: classes.cellIdIconFolder,
4702
4815
  onClick: function onClick() {
4703
- return _this36.toggleExpanded(id);
4816
+ return _this37.toggleExpanded(id);
4704
4817
  }
4705
4818
  }) : /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
4706
4819
  className: classes.cellIdIconFolder,
4707
4820
  onClick: function onClick() {
4708
- return _this36.toggleExpanded(id);
4821
+ return _this37.toggleExpanded(id);
4709
4822
  }
4710
4823
  });
4711
4824
  } else if (obj.common && obj.common.write === false && obj.type === 'state') {
@@ -4740,18 +4853,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4740
4853
  className: "itemIcon"
4741
4854
  });
4742
4855
  var paddingLeft = this.levelPadding * item.data.level;
4743
- if (item.data.lang !== this.state.lang) {
4744
- var _findRoomsForObject = findRoomsForObject(this.info, id, this.state.lang),
4856
+ if (item.data.lang !== this.props.lang) {
4857
+ var _findRoomsForObject = findRoomsForObject(this.info, id, this.props.lang),
4745
4858
  rooms = _findRoomsForObject.rooms,
4746
4859
  per = _findRoomsForObject.per;
4747
4860
  item.data.rooms = rooms.join(', ');
4748
4861
  item.data.per = per;
4749
- var _findFunctionsForObje = findFunctionsForObject(this.info, id, this.state.lang),
4862
+ var _findFunctionsForObje = findFunctionsForObject(this.info, id, this.props.lang),
4750
4863
  funcs = _findFunctionsForObje.funcs,
4751
4864
  pef = _findFunctionsForObje.pef;
4752
4865
  item.data.funcs = funcs.join(', ');
4753
4866
  item.data.pef = pef;
4754
- item.data.lang = this.state.lang;
4867
+ item.data.lang = this.props.lang;
4755
4868
  }
4756
4869
  var checkbox = this.props.multiSelect && this.objects[id] && (!this.props.types || this.props.types.includes(this.objects[id].type)) ? /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4757
4870
  className: classes.checkBox,
@@ -4792,10 +4905,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4792
4905
  onClick: function onClick(e) {
4793
4906
  e.stopPropagation();
4794
4907
  e.preventDefault();
4795
- _this36.onSelect(common.alias.id.read);
4908
+ _this37.onSelect(common.alias.id.read);
4796
4909
  setTimeout(function () {
4797
- _this36.expandAllSelected(function () {
4798
- return _this36.scrollToItem(common.alias.id.read);
4910
+ _this37.expandAllSelected(function () {
4911
+ return _this37.scrollToItem(common.alias.id.read);
4799
4912
  });
4800
4913
  }, 100);
4801
4914
  },
@@ -4804,10 +4917,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4804
4917
  onClick: function onClick(e) {
4805
4918
  e.stopPropagation();
4806
4919
  e.preventDefault();
4807
- _this36.onSelect(common.alias.id.write);
4920
+ _this37.onSelect(common.alias.id.write);
4808
4921
  setTimeout(function () {
4809
- _this36.expandAllSelected(function () {
4810
- return _this36.scrollToItem(common.alias.id.write);
4922
+ _this37.expandAllSelected(function () {
4923
+ return _this37.scrollToItem(common.alias.id.write);
4811
4924
  });
4812
4925
  }, 100);
4813
4926
  },
@@ -4816,10 +4929,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4816
4929
  onClick: function onClick(e) {
4817
4930
  e.stopPropagation();
4818
4931
  e.preventDefault();
4819
- _this36.onSelect(common.alias.id);
4932
+ _this37.onSelect(common.alias.id);
4820
4933
  setTimeout(function () {
4821
- _this36.expandAllSelected(function () {
4822
- return _this36.scrollToItem(common.alias.id);
4934
+ _this37.expandAllSelected(function () {
4935
+ return _this37.scrollToItem(common.alias.id);
4823
4936
  });
4824
4937
  }, 100);
4825
4938
  },
@@ -4851,17 +4964,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4851
4964
  _id = "".concat(id, ".").concat(_id);
4852
4965
  }
4853
4966
  ids[name] = _id;
4854
- if (!_this36.states[_id]) {
4855
- var _this36$objects$_id;
4856
- if (((_this36$objects$_id = _this36.objects[_id]) === null || _this36$objects$_id === void 0 ? void 0 : _this36$objects$_id.type) === 'state') {
4857
- !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
4858
- _this36.states[_id] = {
4967
+ if (!_this37.states[_id]) {
4968
+ var _this37$objects$_id;
4969
+ if (((_this37$objects$_id = _this37.objects[_id]) === null || _this37$objects$_id === void 0 ? void 0 : _this37$objects$_id.type) === 'state') {
4970
+ !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
4971
+ _this37.states[_id] = {
4859
4972
  val: null
4860
4973
  };
4861
- _this36.subscribe(_id);
4974
+ _this37.subscribe(_id);
4862
4975
  }
4863
4976
  } else {
4864
- !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
4977
+ !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
4865
4978
  }
4866
4979
  });
4867
4980
  // calculate color
@@ -4939,6 +5052,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4939
5052
  }
4940
5053
  }
4941
5054
  var q = checkVisibleObjectType ? _Utils["default"].quality2text(((_this$states$id2 = this.states[id]) === null || _this$states$id2 === void 0 ? void 0 : _this$states$id2.q) || 0).join(', ') : null;
5055
+ var name = ((_item$data = item.data) === null || _item$data === void 0 ? void 0 : _item$data.title) || '';
5056
+ var useDesc;
5057
+ if (this.state.showDescription) {
5058
+ useDesc = getObjectTooltip(item.data, this.props.lang);
5059
+ if (useDesc) {
5060
+ name = [/*#__PURE__*/_react["default"].createElement("div", {
5061
+ key: "name",
5062
+ className: classes.cellNameDivDiv
5063
+ }, name), /*#__PURE__*/_react["default"].createElement("div", {
5064
+ key: "desc",
5065
+ className: classes.cellDescription
5066
+ }, useDesc)];
5067
+ useDesc = !!useDesc;
5068
+ }
5069
+ }
4942
5070
  return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
4943
5071
  container: true,
4944
5072
  direction: "row",
@@ -4947,13 +5075,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4947
5075
  key: id,
4948
5076
  id: id,
4949
5077
  onClick: function onClick() {
4950
- return _this36.onSelect(id);
5078
+ return _this37.onSelect(id);
4951
5079
  },
4952
5080
  onDoubleClick: function onDoubleClick() {
4953
5081
  if (!item.children) {
4954
- _this36.onSelect(id, true);
5082
+ _this37.onSelect(id, true);
4955
5083
  } else {
4956
- _this36.toggleExpanded(id);
5084
+ _this37.toggleExpanded(id);
4957
5085
  }
4958
5086
  }
4959
5087
  }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
@@ -4980,7 +5108,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4980
5108
  },
4981
5109
  className: _Utils["default"].clsx(classes.cellIdSpan, invertBackground && classes.invertedBackground)
4982
5110
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4983
- title: getIdFieldTooltip(item.data, this.props.classes, this.props.lang)
5111
+ title: getIdFieldTooltip(item.data, this.props.classes, this.props.lang),
5112
+ classes: {
5113
+ popper: this.props.classes.tooltip
5114
+ }
4984
5115
  }, /*#__PURE__*/_react["default"].createElement("div", null, item.data.name)), alias, icons), /*#__PURE__*/_react["default"].createElement("div", {
4985
5116
  className: _Utils["default"].clsx(classes.grow, invertBackground && classes.invertedBackgroundFlex)
4986
5117
  }), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
@@ -4990,21 +5121,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4990
5121
  }, iconItem), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
4991
5122
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
4992
5123
  onClick: function onClick(e) {
4993
- return _this36.onCopy(e, id);
5124
+ return _this37.onCopy(e, id);
4994
5125
  }
4995
5126
  }))), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
4996
- className: classes.cellName,
5127
+ className: _Utils["default"].clsx(classes.cellName, useDesc && classes.cellNameWithDesc),
4997
5128
  style: {
4998
5129
  width: this.columnsVisibility.name
4999
5130
  }
5000
- }, ((_item$data = item.data) === null || _item$data === void 0 ? void 0 : _item$data.title) || '', (_item$data2 = item.data) !== null && _item$data2 !== void 0 && _item$data2.title ? /*#__PURE__*/_react["default"].createElement("div", {
5131
+ }, name, (_item$data2 = item.data) !== null && _item$data2 !== void 0 && _item$data2.title ? /*#__PURE__*/_react["default"].createElement("div", {
5001
5132
  style: {
5002
5133
  color: checkColor
5003
5134
  }
5004
5135
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5005
5136
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5006
5137
  onClick: function onClick(e) {
5007
- return _this36.onCopy(e, item.data.title);
5138
+ return _this37.onCopy(e, item.data.title);
5008
5139
  }
5009
5140
  })) : null) : null, !this.state.statesView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
5010
5141
  className: classes.cellType,
@@ -5018,7 +5149,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5018
5149
  cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? 'text' : 'default'
5019
5150
  },
5020
5151
  onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? function () {
5021
- return _this36.setState({
5152
+ return _this37.setState({
5022
5153
  roleDialog: item.data.id
5023
5154
  });
5024
5155
  } : undefined
@@ -5029,8 +5160,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5029
5160
  cursor: enumEditable ? 'text' : 'default'
5030
5161
  },
5031
5162
  onClick: enumEditable ? function () {
5032
- var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'roomEnums');
5033
- _this36.setState({
5163
+ var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'roomEnums');
5164
+ _this37.setState({
5034
5165
  enumDialogEnums: enums,
5035
5166
  enumDialog: {
5036
5167
  item: item,
@@ -5046,8 +5177,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5046
5177
  cursor: enumEditable ? 'text' : 'default'
5047
5178
  },
5048
5179
  onClick: enumEditable ? function () {
5049
- var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'funcEnums');
5050
- _this36.setState({
5180
+ var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'funcEnums');
5181
+ _this37.setState({
5051
5182
  enumDialogEnums: enums,
5052
5183
  enumDialog: {
5053
5184
  item: item,
@@ -5082,11 +5213,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5082
5213
  return /*#__PURE__*/_react["default"].createElement("div", {
5083
5214
  className: classes.cellAdapter,
5084
5215
  style: {
5085
- width: _this36.columnsVisibility[it.id]
5216
+ width: _this37.columnsVisibility[it.id]
5086
5217
  },
5087
5218
  key: it.id,
5088
5219
  title: "".concat(it.adapter, " => ").concat(it.pathText)
5089
- }, _this36.renderCustomValue(obj, it, item));
5220
+ }, _this37.renderCustomValue(obj, it, item));
5090
5221
  }), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
5091
5222
  className: classes.cellValue,
5092
5223
  style: {
@@ -5094,26 +5225,26 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5094
5225
  cursor: valueEditable ? (common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : item.data.button ? 'grab' : 'text' : 'default'
5095
5226
  },
5096
5227
  onClick: valueEditable ? function () {
5097
- if (!obj || !_this36.states) {
5228
+ if (!obj || !_this37.states) {
5098
5229
  // return;
5099
5230
  } else if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
5100
- _this36.setState({
5231
+ _this37.setState({
5101
5232
  viewFileDialog: id
5102
5233
  });
5103
5234
  } else
5104
5235
  // in non-expert mode control button directly
5105
- if (!_this36.state.filter.expertMode && item.data.button) {
5106
- _this36.props.socket.setState(id, true)["catch"](function (e) {
5236
+ if (!_this37.state.filter.expertMode && item.data.button) {
5237
+ _this37.props.socket.setState(id, true)["catch"](function (e) {
5107
5238
  return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
5108
5239
  });
5109
5240
  } else {
5110
- _this36.edit = {
5111
- val: _this36.states[id] ? _this36.states[id].val : '',
5112
- q: _this36.states[id] ? _this36.states[id].q || 0 : 0,
5241
+ _this37.edit = {
5242
+ val: _this37.states[id] ? _this37.states[id].val : '',
5243
+ q: _this37.states[id] ? _this37.states[id].q || 0 : 0,
5113
5244
  ack: false,
5114
5245
  id: id
5115
5246
  };
5116
- _this36.setState({
5247
+ _this37.setState({
5117
5248
  updateOpened: true
5118
5249
  });
5119
5250
  }
@@ -5137,7 +5268,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5137
5268
  }, {
5138
5269
  key: "renderItem",
5139
5270
  value: function renderItem(root, isExpanded, classes, counter) {
5140
- var _this37 = this;
5271
+ var _this38 = this;
5141
5272
  var items = [];
5142
5273
  counter = counter || {
5143
5274
  count: 0
@@ -5165,9 +5296,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5165
5296
  if (!this.state.foldersFirst) {
5166
5297
  root.children && items.push(root.children.map(function (item) {
5167
5298
  // do not render too many items in column editor mode
5168
- if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5299
+ if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5169
5300
  if (item.data.sumVisibility) {
5170
- return _this37.renderItem(item, undefined, classes, counter);
5301
+ return _this38.renderItem(item, undefined, classes, counter);
5171
5302
  }
5172
5303
  }
5173
5304
  return null;
@@ -5177,9 +5308,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5177
5308
  root.children && items.push(root.children.map(function (item) {
5178
5309
  if (item.children) {
5179
5310
  // do not render too many items in column editor mode
5180
- if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5311
+ if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5181
5312
  if (item.data.sumVisibility) {
5182
- return _this37.renderItem(item, undefined, classes, counter);
5313
+ return _this38.renderItem(item, undefined, classes, counter);
5183
5314
  }
5184
5315
  }
5185
5316
  }
@@ -5189,9 +5320,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5189
5320
  root.children && items.push(root.children.map(function (item) {
5190
5321
  if (!item.children) {
5191
5322
  // do not render too many items in column editor mode
5192
- if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5323
+ if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5193
5324
  if (item.data.sumVisibility) {
5194
- return _this37.renderItem(item, undefined, classes, counter);
5325
+ return _this38.renderItem(item, undefined, classes, counter);
5195
5326
  }
5196
5327
  }
5197
5328
  }
@@ -5212,7 +5343,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5212
5343
  }, {
5213
5344
  key: "calculateColumnsVisibility",
5214
5345
  value: function calculateColumnsVisibility(columnsAuto, columns, columnsForAdmin, columnsWidths) {
5215
- var _this38 = this;
5346
+ var _this39 = this;
5216
5347
  columnsWidths = columnsWidths || this.state.columnsWidths;
5217
5348
  columnsForAdmin = columnsForAdmin || this.state.columnsForAdmin;
5218
5349
  columns = columns || this.state.columns || [];
@@ -5296,7 +5427,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5296
5427
  Object.keys(columnsForAdmin).sort().forEach(function (adapter) {
5297
5428
  return columnsForAdmin[adapter].forEach(function (column) {
5298
5429
  var id = "_".concat(adapter, "_").concat(column.path);
5299
- _this38.columnsVisibility[id] = columns.includes(id);
5430
+ _this39.columnsVisibility[id] = columns.includes(id);
5300
5431
  if (columns.includes(id)) {
5301
5432
  var item = {
5302
5433
  adapter: adapter,
@@ -5314,11 +5445,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5314
5445
  item.objTypes = column.objTypes;
5315
5446
  }
5316
5447
  }
5317
- _this38.adapterColumns.push(item);
5318
- _this38.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this38.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5319
- _widthSum2 += _this38.columnsVisibility[id];
5448
+ _this39.adapterColumns.push(item);
5449
+ _this39.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this39.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5450
+ _widthSum2 += _this39.columnsVisibility[id];
5320
5451
  } else {
5321
- _this38.columnsVisibility[id] = 0;
5452
+ _this39.columnsVisibility[id] = 0;
5322
5453
  }
5323
5454
  });
5324
5455
  });
@@ -5339,10 +5470,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5339
5470
  this.columnsVisibility.nameHeader = "calc(100% - ".concat(_widthSum2 + 5 + this.state.scrollBarWidth, "px)");
5340
5471
  } else {
5341
5472
  var newWidth = Object.keys(this.columnsVisibility).reduce(function (accumulator, name) {
5342
- if (name === 'id' || typeof _this38.columnsVisibility[name] === 'string' || !_this38.columnsVisibility[name]) {
5473
+ if (name === 'id' || typeof _this39.columnsVisibility[name] === 'string' || !_this39.columnsVisibility[name]) {
5343
5474
  return accumulator;
5344
5475
  }
5345
- return accumulator + _this38.columnsVisibility[name];
5476
+ return accumulator + _this39.columnsVisibility[name];
5346
5477
  }, 0);
5347
5478
  this.columnsVisibility.id = "calc(100% - ".concat(newWidth, "px)");
5348
5479
  }
@@ -5356,13 +5487,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5356
5487
  * @returns {JSX.Element}
5357
5488
  */
5358
5489
  function renderHeader() {
5359
- var _this39 = this;
5490
+ var _this40 = this;
5360
5491
  var classes = this.props.classes;
5361
5492
  var filterClearInValue = null;
5362
5493
  if (!this.columnsVisibility.buttons && !this.isFilterEmpty()) {
5363
5494
  filterClearInValue = /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
5364
5495
  onClick: function onClick() {
5365
- return _this39.clearFilter();
5496
+ return _this40.clearFilter();
5366
5497
  },
5367
5498
  className: classes.buttonClearFilter,
5368
5499
  title: this.props.t('ra_Clear filter'),
@@ -5453,7 +5584,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5453
5584
  return /*#__PURE__*/_react["default"].createElement("div", {
5454
5585
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5455
5586
  style: {
5456
- width: _this39.columnsVisibility[item.id]
5587
+ width: _this40.columnsVisibility[item.id]
5457
5588
  },
5458
5589
  title: item.adapter,
5459
5590
  key: item.id,
@@ -5489,17 +5620,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5489
5620
  }, {
5490
5621
  key: "renderToast",
5491
5622
  value: function renderToast() {
5492
- var _this40 = this;
5623
+ var _this41 = this;
5493
5624
  return /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], {
5494
5625
  open: !!this.state.toast,
5495
5626
  autoHideDuration: 3000,
5496
5627
  onClick: function onClick() {
5497
- return _this40.setState({
5628
+ return _this41.setState({
5498
5629
  toast: ''
5499
5630
  });
5500
5631
  },
5501
5632
  onClose: function onClose() {
5502
- return _this40.setState({
5633
+ return _this41.setState({
5503
5634
  toast: ''
5504
5635
  });
5505
5636
  },
@@ -5509,7 +5640,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5509
5640
  "aria-label": "close",
5510
5641
  color: "inherit",
5511
5642
  onClick: function onClick() {
5512
- return _this40.setState({
5643
+ return _this41.setState({
5513
5644
  toast: ''
5514
5645
  });
5515
5646
  }
@@ -5525,12 +5656,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5525
5656
  }, {
5526
5657
  key: "componentDidUpdate",
5527
5658
  value: function componentDidUpdate() {
5528
- var _this41 = this;
5659
+ var _this42 = this;
5529
5660
  if (this.tableRef.current) {
5530
5661
  var scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
5531
5662
  if (this.state.scrollBarWidth !== scrollBarWidth) {
5532
5663
  setTimeout(function () {
5533
- return _this41.setState({
5664
+ return _this42.setState({
5534
5665
  scrollBarWidth: scrollBarWidth
5535
5666
  });
5536
5667
  }, 100);
@@ -5558,12 +5689,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5558
5689
  }, {
5559
5690
  key: "renderCustomDialog",
5560
5691
  value: function renderCustomDialog() {
5561
- var _this42 = this;
5692
+ var _this43 = this;
5562
5693
  if (this.state.customDialog && this.props.objectCustomDialog) {
5563
5694
  var ObjectCustomDialog = this.props.objectCustomDialog;
5564
5695
  return /*#__PURE__*/_react["default"].createElement(ObjectCustomDialog, {
5565
5696
  reportChangedIds: function reportChangedIds(changedIds) {
5566
- return _this42.changedIds = (0, _toConsumableArray2["default"])(changedIds);
5697
+ return _this43.changedIds = (0, _toConsumableArray2["default"])(changedIds);
5567
5698
  },
5568
5699
  objectIDs: this.state.customDialog,
5569
5700
  expertMode: this.state.filter.expertMode,
@@ -5577,16 +5708,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5577
5708
  objects: this.objects,
5578
5709
  customsInstances: this.info.customs,
5579
5710
  onClose: function onClose() {
5580
- _this42.pauseSubscribe(false);
5581
- _this42.setState({
5711
+ _this43.pauseSubscribe(false);
5712
+ _this43.setState({
5582
5713
  customDialog: null
5583
5714
  });
5584
- if (_this42.changedIds) {
5585
- _this42.changedIds = null;
5715
+ if (_this43.changedIds) {
5716
+ _this43.changedIds = null;
5586
5717
  // update all changed IDs
5587
- _this42.forceUpdate();
5718
+ _this43.forceUpdate();
5588
5719
  }
5589
- _this42.props.router && _this42.props.router.doNavigate('tab-objects');
5720
+ _this43.props.router && _this43.props.router.doNavigate('tab-objects');
5590
5721
  }
5591
5722
  });
5592
5723
  }
@@ -5600,14 +5731,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5600
5731
  }, {
5601
5732
  key: "onUpdate",
5602
5733
  value: function onUpdate(valAck) {
5603
- var _this43 = this;
5734
+ var _this44 = this;
5604
5735
  this.props.socket.setState(this.edit.id, {
5605
5736
  val: valAck.val,
5606
5737
  ack: valAck.ack,
5607
5738
  q: valAck.q || 0,
5608
5739
  expire: valAck.expire || undefined
5609
5740
  })["catch"](function (e) {
5610
- return _this43.showError("Cannot write value: ".concat(e));
5741
+ return _this44.showError("Cannot write value: ".concat(e));
5611
5742
  });
5612
5743
  }
5613
5744
 
@@ -5618,7 +5749,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5618
5749
  }, {
5619
5750
  key: "renderEditObjectDialog",
5620
5751
  value: function renderEditObjectDialog() {
5621
- var _this44 = this;
5752
+ var _this45 = this;
5622
5753
  if (!this.state.editObjectDialog || !this.props.objectBrowserEditObject) {
5623
5754
  return null;
5624
5755
  }
@@ -5636,37 +5767,37 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5636
5767
  t: this.props.t,
5637
5768
  expertMode: this.state.filter.expertMode,
5638
5769
  onNewObject: function onNewObject(obj) {
5639
- return _this44.props.socket.setObject(obj._id, obj).then(function () {
5640
- return _this44.setState({
5770
+ return _this45.props.socket.setObject(obj._id, obj).then(function () {
5771
+ return _this45.setState({
5641
5772
  editObjectDialog: obj._id
5642
5773
  }, function () {
5643
- return _this44.onSelect(obj._id);
5774
+ return _this45.onSelect(obj._id);
5644
5775
  });
5645
5776
  })["catch"](function (e) {
5646
- return _this44.showError("Cannot write object: ".concat(e));
5777
+ return _this45.showError("Cannot write object: ".concat(e));
5647
5778
  });
5648
5779
  },
5649
5780
  onClose: function onClose(obj) {
5650
5781
  if (obj) {
5651
5782
  var updateAlias;
5652
- if (_this44.state.editObjectDialog.startsWith('alias.')) {
5653
- var _this44$objects$_this, _obj$common5;
5654
- if (JSON.stringify((_this44$objects$_this = _this44.objects[_this44.state.editObjectDialog].common) === null || _this44$objects$_this === void 0 ? void 0 : _this44$objects$_this.alias) !== JSON.stringify((_obj$common5 = obj.common) === null || _obj$common5 === void 0 ? void 0 : _obj$common5.alias)) {
5655
- updateAlias = _this44.state.editObjectDialog;
5783
+ if (_this45.state.editObjectDialog.startsWith('alias.')) {
5784
+ var _this45$objects$_this, _obj$common5;
5785
+ if (JSON.stringify((_this45$objects$_this = _this45.objects[_this45.state.editObjectDialog].common) === null || _this45$objects$_this === void 0 ? void 0 : _this45$objects$_this.alias) !== JSON.stringify((_obj$common5 = obj.common) === null || _obj$common5 === void 0 ? void 0 : _obj$common5.alias)) {
5786
+ updateAlias = _this45.state.editObjectDialog;
5656
5787
  }
5657
5788
  }
5658
- _this44.props.socket.setObject(obj._id, obj).then(function () {
5659
- if (updateAlias && _this44.subscribes.includes(updateAlias)) {
5660
- _this44.unsubscribe(updateAlias);
5789
+ _this45.props.socket.setObject(obj._id, obj).then(function () {
5790
+ if (updateAlias && _this45.subscribes.includes(updateAlias)) {
5791
+ _this45.unsubscribe(updateAlias);
5661
5792
  setTimeout(function () {
5662
- return _this44.subscribe(updateAlias);
5793
+ return _this45.subscribe(updateAlias);
5663
5794
  }, 100);
5664
5795
  }
5665
5796
  })["catch"](function (e) {
5666
- return _this44.showError("Cannot write object: ".concat(e));
5797
+ return _this45.showError("Cannot write object: ".concat(e));
5667
5798
  });
5668
5799
  }
5669
- _this44.setState({
5800
+ _this45.setState({
5670
5801
  editObjectDialog: ''
5671
5802
  });
5672
5803
  }
@@ -5680,7 +5811,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5680
5811
  }, {
5681
5812
  key: "renderViewObjectFileDialog",
5682
5813
  value: function renderViewObjectFileDialog() {
5683
- var _this45 = this;
5814
+ var _this46 = this;
5684
5815
  if (!this.state.viewFileDialog || !this.props.objectBrowserViewFile) {
5685
5816
  return null;
5686
5817
  }
@@ -5694,7 +5825,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5694
5825
  t: this.props.t,
5695
5826
  expertMode: this.state.filter.expertMode,
5696
5827
  onClose: function onClose() {
5697
- return _this45.setState({
5828
+ return _this46.setState({
5698
5829
  viewFileDialog: ''
5699
5830
  });
5700
5831
  }
@@ -5709,7 +5840,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5709
5840
  key: "renderEditValueDialog",
5710
5841
  value: function renderEditValueDialog() {
5711
5842
  var _this$objects$this$ed,
5712
- _this46 = this;
5843
+ _this47 = this;
5713
5844
  if (!this.state.updateOpened || !this.props.objectBrowserValue) {
5714
5845
  return null;
5715
5846
  }
@@ -5736,10 +5867,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5736
5867
  defaultHistory: this.defaultHistory,
5737
5868
  dateFormat: this.props.dateFormat,
5738
5869
  onClose: function onClose(res) {
5739
- _this46.setState({
5870
+ _this47.setState({
5740
5871
  updateOpened: false
5741
5872
  });
5742
- res && _this46.onUpdate(res);
5873
+ res && _this47.onUpdate(res);
5743
5874
  }
5744
5875
  });
5745
5876
  }
@@ -5751,7 +5882,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5751
5882
  * @returns {JSX.Element}
5752
5883
  */
5753
5884
  function render() {
5754
- var _this47 = this;
5885
+ var _this48 = this;
5755
5886
  this.recordStates = [];
5756
5887
  this.unsubscribeTimer && clearTimeout(this.unsubscribeTimer);
5757
5888
 
@@ -5761,16 +5892,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5761
5892
  var counter = {
5762
5893
  count: 0
5763
5894
  };
5764
- applyFilter(this.root, this.state.filter, this.state.lang, this.objects, null, counter, this.props.customFilter, this.props.types);
5895
+ applyFilter(this.root, this.state.filter, this.props.lang, this.objects, null, counter, this.props.customFilter, this.props.types);
5765
5896
  if (counter.count < 500 && !this.state.expandAllVisible) {
5766
5897
  setTimeout(function () {
5767
- return _this47.setState({
5898
+ return _this48.setState({
5768
5899
  expandAllVisible: true
5769
5900
  });
5770
5901
  });
5771
5902
  } else if (counter.count >= 500 && this.state.expandAllVisible) {
5772
5903
  setTimeout(function () {
5773
- return _this47.setState({
5904
+ return _this48.setState({
5774
5905
  expandAllVisible: false
5775
5906
  });
5776
5907
  });
@@ -5778,8 +5909,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5778
5909
  this.lastAppliedFilter = jsonFilter;
5779
5910
  }
5780
5911
  this.unsubscribeTimer = setTimeout(function () {
5781
- _this47.unsubscribeTimer = null;
5782
- _this47.checkUnsubscribes();
5912
+ _this48.unsubscribeTimer = null;
5913
+ _this48.checkUnsubscribes();
5783
5914
  }, 200);
5784
5915
  if (!this.state.loaded) {
5785
5916
  return /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], {