@iobroker/adapter-react-v5 3.1.21 → 3.1.24

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.
@@ -67,8 +67,6 @@ var _List = _interopRequireDefault(require("@mui/material/List"));
67
67
 
68
68
  var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
69
69
 
70
- var _ListItemButton = _interopRequireDefault(require("@mui/material/ListItemButton"));
71
-
72
70
  var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
73
71
 
74
72
  var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
@@ -95,10 +93,6 @@ var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormContro
95
93
 
96
94
  var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
97
95
 
98
- var _Slider = _interopRequireDefault(require("@mui/material/Slider"));
99
-
100
- var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
101
-
102
96
  var _Edit = _interopRequireDefault(require("@mui/icons-material/Edit"));
103
97
 
104
98
  var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
@@ -911,10 +905,63 @@ function applyFilter(item, filters, lang, objects, context, counter, customFilte
911
905
  var common = data.obj && data.obj.common;
912
906
 
913
907
  if (customFilter) {
914
- if (customFilter.type && customFilter.type !== data.obj.type) {
915
- filteredOut = true;
916
- } else if (customFilter.common && customFilter.common.custom) {
917
- if (!common || !common.custom || customFilter.common.custom !== true && !common.custom[customFilter.common.custom]) {
908
+ var _customFilter$common, _customFilter$common2, _customFilter$common3;
909
+
910
+ if (customFilter.type) {
911
+ if (typeof customFilter.type === 'string') {
912
+ if (customFilter.type !== data.obj.type) {
913
+ filteredOut = true;
914
+ }
915
+ } else if (Array.isArray(customFilter.type)) {
916
+ if (!customFilter.type.includes(data.obj.type)) {
917
+ filteredOut = true;
918
+ }
919
+ }
920
+ }
921
+
922
+ if (!filteredOut && (_customFilter$common = customFilter.common) !== null && _customFilter$common !== void 0 && _customFilter$common.type) {
923
+ if (!common || !common.type) {
924
+ filteredOut = true;
925
+ } else if (typeof customFilter.common.type === 'string') {
926
+ if (customFilter.common.type !== common.type) {
927
+ filteredOut = true;
928
+ }
929
+ } else if (Array.isArray(customFilter.common.type)) {
930
+ if (!customFilter.type.includes(common.type)) {
931
+ filteredOut = true;
932
+ }
933
+ }
934
+ }
935
+
936
+ if (!filteredOut && (_customFilter$common2 = customFilter.common) !== null && _customFilter$common2 !== void 0 && _customFilter$common2.role) {
937
+ if (!common || !common.role) {
938
+ filteredOut = true;
939
+ } else if (typeof customFilter.common.role === 'string') {
940
+ if (common.role.startsWith(customFilter.common.role)) {
941
+ filteredOut = true;
942
+ }
943
+ } else if (Array.isArray(customFilter.common.role)) {
944
+ if (!customFilter.common.role.find(function (role) {
945
+ return customFilter.role.includes(role);
946
+ })) {
947
+ filteredOut = true;
948
+ }
949
+ }
950
+ }
951
+
952
+ if (!filteredOut && (_customFilter$common3 = customFilter.common) !== null && _customFilter$common3 !== void 0 && _customFilter$common3.custom) {
953
+ if (!common || !common.custom) {
954
+ filteredOut = true;
955
+ } else if (customFilter.common.custom === '_dataSources') {
956
+ // TODO: make it configurable
957
+ if (!Object.keys(common.custom).find(function (id) {
958
+ return id.startsWith('history.') || id.startsWith('sql.') || id.startsWith('influxdb.');
959
+ })) {
960
+ filteredOut = true;
961
+ }
962
+ } else if (customFilter.common.custom !== true && !Object.keys(common.custom).find(function (id) {
963
+ return id.startsWith(customFilter.common.custom);
964
+ })) {
918
965
  filteredOut = true;
919
966
  }
920
967
  }
@@ -2723,7 +2770,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2723
2770
  columns: columns,
2724
2771
  columnsForAdmin: null,
2725
2772
  columnsSelectorShow: false,
2726
- columnsAuto: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columnsAuto")) !== 'false',
2773
+ columnsAuto: true,
2774
+ // (window._localStorage || window.localStorage).getItem(`${props.dialogName || 'App'}.columnsAuto`) !== 'false',
2727
2775
  columnsWidths: columnsWidths,
2728
2776
  columnsDialogTransparent: 100,
2729
2777
  columnsEditCustomDialog: null,
@@ -3169,85 +3217,68 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3169
3217
  * @param {boolean} isLast
3170
3218
  */
3171
3219
 
3172
- }, {
3173
- key: "_renderDefinedList",
3174
- value: function _renderDefinedList(isLast) {
3175
- var _this9 = this;
3176
-
3177
- var cols = (0, _toConsumableArray2["default"])(this.possibleCols);
3178
- cols.unshift('id');
3179
-
3180
- if (this.props.columns && !this.props.columns.includes('buttons')) {
3181
- var pos = cols.indexOf('buttons');
3182
-
3183
- if (pos !== -1) {
3184
- cols.splice(pos, 1);
3185
- }
3186
- }
3187
-
3188
- return cols.filter(function (id) {
3189
- return isLast && (id === 'val' || id === 'buttons') || !isLast && id !== 'val' && id !== 'buttons';
3190
- }).map(function (id) {
3191
- return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
3192
- onClick: function onClick() {
3193
- if (!_this9.state.columnsAuto && id !== 'id') {
3194
- var columns = (0, _toConsumableArray2["default"])(_this9.state.columns || []);
3195
-
3196
- var _pos = columns.indexOf(id);
3197
-
3198
- if (_pos === -1) {
3199
- columns.push(id);
3200
- columns.sort();
3201
- } else {
3202
- columns.splice(_pos, 1);
3203
- }
3204
-
3205
- (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3206
-
3207
- _this9.calculateColumnsVisibility(null, columns);
3208
-
3209
- _this9.setState({
3210
- columns: columns
3211
- });
3220
+ /*
3221
+ _renderDefinedList(isLast) {
3222
+ const cols = [...this.possibleCols];
3223
+ cols.unshift('id');
3224
+ if (this.props.columns && !this.props.columns.includes('buttons')) {
3225
+ const pos = cols.indexOf('buttons');
3226
+ if (pos !== -1) {
3227
+ cols.splice(pos, 1);
3212
3228
  }
3213
- },
3214
- key: id
3215
- }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3216
- edge: "start",
3217
- disabled: id === 'id' || _this9.state.columnsAuto,
3218
- checked: id === 'id' || (_this9.state.columnsAuto ? _this9.visibleCols.includes(id) : _this9.state.columns && _this9.state.columns.includes(id)),
3219
- disableRipple: true
3220
- }), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3221
- primary: _this9.texts['filter_' + id] || _this9.props.t('ra_' + id)
3222
- }), /*#__PURE__*/_react["default"].createElement(_ListItemSecondaryAction["default"], null, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
3223
- variant: "standard",
3224
- className: _this9.props.classes.columnsDialogInputWidth,
3225
- style: {
3226
- marginTop: 0,
3227
- marginBottom: 0
3228
- },
3229
- margin: "dense"
3230
- }, /*#__PURE__*/_react["default"].createElement(_Input["default"], {
3231
- classes: {
3232
- underline: 'no-underline'
3233
- },
3234
- placeholder: _this9.props.t('ra_Width'),
3235
- value: _this9.state.columnsWidths[id] || '',
3236
- onChange: function onChange(e) {
3237
- var columnsWidths = JSON.parse(JSON.stringify(_this9.state.columnsWidths));
3238
- columnsWidths[id] = e.target.value;
3239
- (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3240
-
3241
- _this9.calculateColumnsVisibility(null, null, null, columnsWidths);
3229
+ }
3230
+ return cols
3231
+ .filter(id => (isLast && (id === 'val' || id === 'buttons')) || (!isLast && id !== 'val' && id !== 'buttons'))
3232
+ .map(id =>
3233
+ <ListItemButton onClick={() => {
3234
+ if (!this.state.columnsAuto && id !== 'id') {
3235
+ const columns = [...(this.state.columns || [])];
3236
+ const pos = columns.indexOf(id);
3237
+ if (pos === -1) {
3238
+ columns.push(id);
3239
+ columns.sort();
3240
+ } else {
3241
+ columns.splice(pos, 1);
3242
+ }
3243
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3244
+ this.calculateColumnsVisibility(null, columns);
3245
+ this.setState({ columns });
3246
+ }
3247
+ }} key={id}>
3248
+ <Checkbox
3249
+ edge="start"
3250
+ disabled={id === 'id' || this.state.columnsAuto}
3251
+ checked={id === 'id' || (this.state.columnsAuto ? this.visibleCols.includes(id) : (this.state.columns && this.state.columns.includes(id)))}
3252
+ disableRipple
3253
+ />
3254
+ <ListItemText primary={this.texts['filter_' + id] || this.props.t('ra_' + id)} />
3255
+ <ListItemSecondaryAction>
3256
+ <FormControl
3257
+ variant="standard"
3258
+ className={this.props.classes.columnsDialogInputWidth}
3259
+ style={{ marginTop: 0, marginBottom: 0 }}
3260
+ margin="dense"
3261
+ >
3262
+ <Input
3263
+ classes={{ underline: 'no-underline' }}
3264
+ placeholder={this.props.t('ra_Width')}
3265
+ value={this.state.columnsWidths[id] || ''}
3266
+ onChange={e => {
3267
+ const columnsWidths = JSON.parse(JSON.stringify(this.state.columnsWidths));
3268
+ columnsWidths[id] = e.target.value;
3269
+ (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3270
+ this.calculateColumnsVisibility(null, null, null, columnsWidths);
3271
+ this.setState({ columnsWidths });
3272
+ }}
3273
+ autoComplete="off"
3274
+ />
3275
+ </FormControl>
3276
+ </ListItemSecondaryAction>
3277
+ </ListItemButton>
3278
+ );
3279
+ }
3280
+ */
3242
3281
 
3243
- _this9.setState({
3244
- columnsWidths: columnsWidths
3245
- });
3246
- },
3247
- autoComplete: "off"
3248
- }))));
3249
- });
3250
- }
3251
3282
  /**
3252
3283
  * Renders the columns selector.
3253
3284
  * @returns {JSX.Element | null}
@@ -3256,14 +3287,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3256
3287
  }, {
3257
3288
  key: "renderColumnsSelectorDialog",
3258
3289
  value: function renderColumnsSelectorDialog() {
3259
- var _this10 = this;
3290
+ var _this9 = this;
3260
3291
 
3261
3292
  if (!this.state.columnsSelectorShow) {
3262
3293
  return null;
3263
3294
  } else {
3264
3295
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
3265
3296
  onClose: function onClose() {
3266
- return _this10.setState({
3297
+ return _this9.setState({
3267
3298
  columnsSelectorShow: false
3268
3299
  });
3269
3300
  },
@@ -3273,49 +3304,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3273
3304
  }
3274
3305
  }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
3275
3306
  className: this.props.classes.fontSizeTitle
3276
- }, this.props.t('ra_Configure visible columns')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], {
3307
+ }, this.props.t('ra_Configure')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], {
3277
3308
  className: this.props.classes.fontSizeTitle
3278
3309
  }, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3279
- className: this.props.classes.switchColumnAuto,
3280
- control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3281
- checked: this.state.columnsAuto,
3282
- onChange: function onChange() {
3283
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
3284
-
3285
- if (!_this10.state.columnsAuto) {
3286
- _this10.calculateColumnsVisibility(true);
3287
-
3288
- _this10.setState({
3289
- columnsAuto: true
3290
- });
3291
- } else {
3292
- if (!_this10.state.columns) {
3293
- _this10.calculateColumnsVisibility(false, (0, _toConsumableArray2["default"])(_this10.visibleCols));
3294
-
3295
- _this10.setState({
3296
- columnsAuto: false,
3297
- columns: (0, _toConsumableArray2["default"])(_this10.visibleCols)
3298
- });
3299
- } else {
3300
- _this10.calculateColumnsVisibility(false);
3301
-
3302
- _this10.setState({
3303
- columnsAuto: false
3304
- });
3305
- }
3306
- }
3307
- }
3308
- }),
3309
- label: this.props.t('ra_Auto (no custom columns)')
3310
- }), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3311
3310
  className: this.props.classes.switchColumnAuto,
3312
3311
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3313
3312
  checked: this.state.foldersFirst,
3314
3313
  onChange: function onChange() {
3315
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.foldersFirst', _this10.state.foldersFirst ? 'false' : 'true');
3314
+ (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.foldersFirst', _this9.state.foldersFirst ? 'false' : 'true');
3316
3315
 
3317
- _this10.setState({
3318
- foldersFirst: !_this10.state.foldersFirst
3316
+ _this9.setState({
3317
+ foldersFirst: !_this9.state.foldersFirst
3319
3318
  });
3320
3319
  }
3321
3320
  }),
@@ -3325,96 +3324,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3325
3324
  control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3326
3325
  checked: this.state.linesEnabled,
3327
3326
  onChange: function onChange() {
3328
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.lines', _this10.state.linesEnabled ? 'false' : 'true');
3327
+ (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.lines', _this9.state.linesEnabled ? 'false' : 'true');
3329
3328
 
3330
- _this10.setState({
3331
- linesEnabled: !_this10.state.linesEnabled
3329
+ _this9.setState({
3330
+ linesEnabled: !_this9.state.linesEnabled
3332
3331
  });
3333
3332
  }
3334
3333
  }),
3335
3334
  label: this.props.t('ra_Show lines between rows')
3336
- }), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
3337
- classes: {
3338
- root: this.props.classes.dialogColumnsLabel
3339
- }
3340
- }, this.props.t('ra_Transparent dialog')), /*#__PURE__*/_react["default"].createElement(_Slider["default"], {
3341
- classes: {
3342
- root: this.props.classes.width100
3343
- },
3344
- value: this.state.columnsDialogTransparent,
3345
- min: 20,
3346
- max: 100,
3347
- step: 10,
3348
- onChange: function onChange(event, newValue) {
3349
- return _this10.setState({
3350
- columnsDialogTransparent: newValue
3351
- });
3352
- }
3353
- }), /*#__PURE__*/_react["default"].createElement(_List["default"], null, this._renderDefinedList(false), this.state.columnsForAdmin && Object.keys(this.state.columnsForAdmin).sort().map(function (adapter) {
3354
- return _this10.state.columnsForAdmin[adapter].map(function (column) {
3355
- return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
3356
- onClick: function onClick() {
3357
- if (!_this10.state.columnsAuto) {
3358
- var columns = (0, _toConsumableArray2["default"])(_this10.state.columns || []);
3359
- var id = '_' + adapter + '_' + column.path;
3360
- var pos = columns.indexOf(id);
3361
-
3362
- if (pos === -1) {
3363
- columns.push(id);
3364
- columns.sort();
3365
- } else {
3366
- columns.splice(pos, 1);
3367
- }
3368
-
3369
- _this10.calculateColumnsVisibility(null, columns);
3370
-
3371
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3372
-
3373
- _this10.setState({
3374
- columns: columns
3375
- });
3376
- }
3377
- },
3378
- key: adapter + '_' + column.name
3379
- }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], null, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3380
- disabled: _this10.state.columnsAuto,
3381
- edge: "start",
3382
- checked: !_this10.state.columnsAuto && _this10.state.columns && _this10.state.columns.includes('_' + adapter + '_' + column.path),
3383
- disableRipple: true
3384
- })), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3385
- primary: column.name + ' (' + adapter + ')'
3386
- }), /*#__PURE__*/_react["default"].createElement(_ListItemSecondaryAction["default"], null, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
3387
- variant: "standard",
3388
- className: _this10.props.classes.columnsDialogInputWidth,
3389
- style: {
3390
- marginTop: 0,
3391
- marginBottom: 0
3392
- },
3393
- margin: "dense"
3394
- }, /*#__PURE__*/_react["default"].createElement(_Input["default"], {
3395
- classes: {
3396
- underline: 'no-underline'
3397
- },
3398
- placeholder: _this10.props.t('ra_Width'),
3399
- value: _this10.state.columnsWidths['_' + adapter + '_' + column.path] || '',
3400
- onChange: function onChange(e) {
3401
- var columnsWidths = JSON.parse(JSON.stringify(_this10.state.columnsWidths));
3402
- columnsWidths['_' + adapter + '_' + column.path] = e.target.value;
3403
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
3404
-
3405
- _this10.calculateColumnsVisibility(null, null, null, columnsWidths);
3406
-
3407
- _this10.setState({
3408
- columnsWidths: columnsWidths
3409
- });
3410
- },
3411
- autoComplete: "off"
3412
- }))));
3413
- });
3414
- }), this._renderDefinedList(true))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3335
+ })), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3415
3336
  variant: "contained",
3416
3337
  onClick: function onClick() {
3417
- return _this10.setState({
3338
+ return _this9.setState({
3418
3339
  columnsSelectorShow: false
3419
3340
  });
3420
3341
  },
@@ -3430,13 +3351,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3430
3351
  }, {
3431
3352
  key: "getAdditionalColumns",
3432
3353
  value: function getAdditionalColumns() {
3433
- var _this11 = this;
3354
+ var _this10 = this;
3434
3355
 
3435
3356
  return this.props.socket.getAdapters().then(function (instances) {
3436
3357
  var columnsForAdmin = null; // find all additional columns
3437
3358
 
3438
3359
  instances.forEach(function (obj) {
3439
- return columnsForAdmin = _this11.parseObjectForAdmins(columnsForAdmin, obj);
3360
+ return columnsForAdmin = _this10.parseObjectForAdmins(columnsForAdmin, obj);
3440
3361
  });
3441
3362
  return columnsForAdmin;
3442
3363
  })["catch"](function (e) {// window.alert('Cannot get adapters: ' + e);
@@ -3511,7 +3432,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3511
3432
  * @param {any} obj
3512
3433
  */
3513
3434
  function parseObjectForAdmins(columnsForAdmin, obj) {
3514
- var _this12 = this;
3435
+ var _this11 = this;
3515
3436
 
3516
3437
  if (obj.common && obj.common.adminColumns && obj.common.name) {
3517
3438
  var columns = obj.common.adminColumns;
@@ -3563,7 +3484,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3563
3484
  } else {
3564
3485
  return {
3565
3486
  path: item.path,
3566
- name: item.name[_this12.props.lang] || item.name.en,
3487
+ name: item.name[_this11.props.lang] || item.name.en,
3567
3488
  width: item.width,
3568
3489
  edit: !!item.edit,
3569
3490
  type: item.type,
@@ -3639,17 +3560,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3639
3560
  }, {
3640
3561
  key: "pauseSubscribe",
3641
3562
  value: function pauseSubscribe(isPause) {
3642
- var _this13 = this;
3563
+ var _this12 = this;
3643
3564
 
3644
3565
  if (!this.pausedSubscribes && isPause) {
3645
3566
  this.pausedSubscribes = true;
3646
3567
  this.subscribes.forEach(function (id) {
3647
- return _this13.props.socket.unsubscribeState(id, _this13.onStateChange);
3568
+ return _this12.props.socket.unsubscribeState(id, _this12.onStateChange);
3648
3569
  });
3649
3570
  } else if (this.pausedSubscribes && !isPause) {
3650
3571
  this.pausedSubscribes = false;
3651
3572
  this.subscribes.forEach(function (id) {
3652
- return _this13.props.socket.subscribeState(id, _this13.onStateChange);
3573
+ return _this12.props.socket.subscribeState(id, _this12.onStateChange);
3653
3574
  });
3654
3575
  }
3655
3576
  }
@@ -3662,15 +3583,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3662
3583
  }, {
3663
3584
  key: "onFilter",
3664
3585
  value: function onFilter(name, value) {
3665
- var _this14 = this;
3586
+ var _this13 = this;
3666
3587
 
3667
3588
  this.filterTimer = null;
3668
3589
  var filter = {};
3669
3590
  Object.keys(this.filterRefs).forEach(function (name) {
3670
- if (_this14.filterRefs[name] && _this14.filterRefs[name].current) {
3671
- for (var i = 0; i < _this14.filterRefs[name].current.children.length; i++) {
3672
- if (_this14.filterRefs[name].current.children[i].tagName === 'INPUT') {
3673
- filter[name] = _this14.filterRefs[name].current.children[i].value;
3591
+ if (_this13.filterRefs[name] && _this13.filterRefs[name].current) {
3592
+ for (var i = 0; i < _this13.filterRefs[name].current.children.length; i++) {
3593
+ if (_this13.filterRefs[name].current.children[i].tagName === 'INPUT') {
3594
+ filter[name] = _this13.filterRefs[name].current.children[i].value;
3674
3595
  break;
3675
3596
  }
3676
3597
  }
@@ -3692,20 +3613,20 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3692
3613
  this.setState({
3693
3614
  filter: filter
3694
3615
  }, function () {
3695
- return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3616
+ return _this13.props.onFilterChanged && _this13.props.onFilterChanged(filter);
3696
3617
  });
3697
3618
  }
3698
3619
  }
3699
3620
  }, {
3700
3621
  key: "clearFilter",
3701
3622
  value: function clearFilter() {
3702
- var _this15 = this;
3623
+ var _this14 = this;
3703
3624
 
3704
3625
  var filter = {};
3705
3626
  Object.keys(this.filterRefs).forEach(function (name) {
3706
- if (_this15.filterRefs[name] && _this15.filterRefs[name].current) {
3707
- for (var i = 0; i < _this15.filterRefs[name].current.childNodes.length; i++) {
3708
- var item = _this15.filterRefs[name].current.childNodes[i];
3627
+ if (_this14.filterRefs[name] && _this14.filterRefs[name].current) {
3628
+ for (var i = 0; i < _this14.filterRefs[name].current.childNodes.length; i++) {
3629
+ var item = _this14.filterRefs[name].current.childNodes[i];
3709
3630
 
3710
3631
  if (item.tagName === 'INPUT') {
3711
3632
  filter[name] = '';
@@ -3723,17 +3644,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3723
3644
  filter: filter,
3724
3645
  filterKey: this.state.filterKey + 1
3725
3646
  }, function () {
3726
- return _this15.props.onFilterChanged && _this15.props.onFilterChanged(filter);
3647
+ return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3727
3648
  });
3728
3649
  }
3729
3650
  }
3730
3651
  }, {
3731
3652
  key: "isFilterEmpty",
3732
3653
  value: function isFilterEmpty() {
3733
- var _this16 = this;
3654
+ var _this15 = this;
3734
3655
 
3735
3656
  var someNotEmpty = Object.keys(this.state.filter).find(function (attr) {
3736
- return attr !== 'expertMode' && _this16.state.filter[attr];
3657
+ return attr !== 'expertMode' && _this15.state.filter[attr];
3737
3658
  });
3738
3659
  return !someNotEmpty;
3739
3660
  }
@@ -3745,7 +3666,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3745
3666
  }, {
3746
3667
  key: "getFilterInput",
3747
3668
  value: function getFilterInput(name) {
3748
- var _this17 = this,
3669
+ var _this16 = this,
3749
3670
  _this$filterRefs$name,
3750
3671
  _this$filterRefs$name2;
3751
3672
 
@@ -3763,9 +3684,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3763
3684
  placeholder: this.texts['filter_' + name],
3764
3685
  defaultValue: this.state.filter[name],
3765
3686
  onChange: function onChange() {
3766
- _this17.filterTimer && clearTimeout(_this17.filterTimer);
3767
- _this17.filterTimer = setTimeout(function () {
3768
- return _this17.onFilter();
3687
+ _this16.filterTimer && clearTimeout(_this16.filterTimer);
3688
+ _this16.filterTimer = setTimeout(function () {
3689
+ return _this16.onFilter();
3769
3690
  }, 400);
3770
3691
  },
3771
3692
  autoComplete: "off"
@@ -3777,9 +3698,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3777
3698
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3778
3699
  size: "small",
3779
3700
  onClick: function onClick() {
3780
- _this17.filterRefs[name].current.firstChild.value = '';
3701
+ _this16.filterRefs[name].current.firstChild.value = '';
3781
3702
 
3782
- _this17.onFilter(name, '');
3703
+ _this16.onFilter(name, '');
3783
3704
  }
3784
3705
  }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
3785
3706
  }
@@ -3792,7 +3713,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3792
3713
  }, {
3793
3714
  key: "getFilterSelect",
3794
3715
  value: function getFilterSelect(name, values) {
3795
- var _this18 = this,
3716
+ var _this17 = this,
3796
3717
  _this$filterRefs$name3,
3797
3718
  _this$filterRefs$name4,
3798
3719
  _this$filterRefs$name5;
@@ -3810,9 +3731,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3810
3731
  ref: this.filterRefs[name],
3811
3732
  className: this.props.classes.headerCellInput + ' no-underline',
3812
3733
  onChange: function onChange() {
3813
- _this18.filterTimer && clearTimeout(_this18.filterTimer);
3814
- _this18.filterTimer = setTimeout(function () {
3815
- return _this18.onFilter();
3734
+ _this17.filterTimer && clearTimeout(_this17.filterTimer);
3735
+ _this17.filterTimer = setTimeout(function () {
3736
+ return _this17.onFilter();
3816
3737
  }, 400);
3817
3738
  },
3818
3739
  defaultValue: this.state.filter[name] || '',
@@ -3841,7 +3762,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3841
3762
  }
3842
3763
 
3843
3764
  return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
3844
- className: _this18.props.classes.headerCellSelectItem,
3765
+ className: _this17.props.classes.headerCellSelectItem,
3845
3766
  key: id,
3846
3767
  value: id
3847
3768
  }, icon ? icon : hasIcons ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -3852,17 +3773,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3852
3773
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3853
3774
  size: "small",
3854
3775
  onClick: function onClick() {
3855
- var newFilter = _objectSpread({}, _this18.state.filter);
3776
+ var newFilter = _objectSpread({}, _this17.state.filter);
3856
3777
 
3857
3778
  newFilter[name] = '';
3858
- _this18.filterRefs[name].current.childNodes[1].value = '';
3859
- (window._localStorage || window.localStorage).setItem((_this18.props.dialogName || 'App') + '.objectFilter', JSON.stringify(newFilter));
3779
+ _this17.filterRefs[name].current.childNodes[1].value = '';
3780
+ (window._localStorage || window.localStorage).setItem((_this17.props.dialogName || 'App') + '.objectFilter', JSON.stringify(newFilter));
3860
3781
 
3861
- _this18.setState({
3782
+ _this17.setState({
3862
3783
  filter: newFilter,
3863
- filterKey: _this18.state.filterKey + 1
3784
+ filterKey: _this17.state.filterKey + 1
3864
3785
  }, function () {
3865
- return _this18.props.onFilterChanged && _this18.props.onFilterChanged(newFilter);
3786
+ return _this17.props.onFilterChanged && _this17.props.onFilterChanged(newFilter);
3866
3787
  });
3867
3788
  }
3868
3789
  }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
@@ -3883,17 +3804,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3883
3804
  }, {
3884
3805
  key: "getFilterSelectRoom",
3885
3806
  value: function getFilterSelectRoom() {
3886
- var _this19 = this;
3807
+ var _this18 = this;
3887
3808
 
3888
3809
  var rooms = this.info.roomEnums.map(function (id) {
3889
- var _this19$objects$id, _this19$objects$id$co, _this19$objects$id2, _this19$objects$id2$c;
3810
+ var _this18$objects$id, _this18$objects$id$co, _this18$objects$id2, _this18$objects$id2$c;
3890
3811
 
3891
3812
  return {
3892
- 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()),
3813
+ 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()),
3893
3814
  value: id,
3894
3815
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3895
- 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,
3896
- className: _this19.props.classes.selectIcon
3816
+ 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,
3817
+ className: _this18.props.classes.selectIcon
3897
3818
  })
3898
3819
  };
3899
3820
  });
@@ -3906,17 +3827,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3906
3827
  }, {
3907
3828
  key: "getFilterSelectFunction",
3908
3829
  value: function getFilterSelectFunction() {
3909
- var _this20 = this;
3830
+ var _this19 = this;
3910
3831
 
3911
3832
  var func = this.info.funcEnums.map(function (id) {
3912
- var _this20$objects$id, _this20$objects$id$co;
3833
+ var _this19$objects$id, _this19$objects$id$co;
3913
3834
 
3914
3835
  return {
3915
- name: getName(_this20.objects[id] && _this20.objects[id].common && _this20.objects[id].common.name || id.split('.').pop()),
3836
+ name: getName(_this19.objects[id] && _this19.objects[id].common && _this19.objects[id].common.name || id.split('.').pop()),
3916
3837
  value: id,
3917
3838
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3918
- 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,
3919
- className: _this20.props.classes.selectIcon
3839
+ 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,
3840
+ className: _this19.props.classes.selectIcon
3920
3841
  })
3921
3842
  };
3922
3843
  });
@@ -3945,7 +3866,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3945
3866
  }, {
3946
3867
  key: "getFilterSelectCustoms",
3947
3868
  value: function getFilterSelectCustoms() {
3948
- var _this21 = this;
3869
+ var _this20 = this;
3949
3870
 
3950
3871
  if (this.info.customs.length) {
3951
3872
  var customs = this.info.customs.map(function (id) {
@@ -3953,8 +3874,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3953
3874
  name: id,
3954
3875
  value: id,
3955
3876
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3956
- src: getSelectIdIcon(_this21.objects, id, _this21.imagePrefix),
3957
- className: _this21.props.classes.selectIcon
3877
+ src: getSelectIdIcon(_this20.objects, id, _this20.imagePrefix),
3878
+ className: _this20.props.classes.selectIcon
3958
3879
  })
3959
3880
  };
3960
3881
  });
@@ -3972,7 +3893,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3972
3893
  }, {
3973
3894
  key: "onExpandAll",
3974
3895
  value: function onExpandAll(root, expanded) {
3975
- var _this22 = this;
3896
+ var _this21 = this;
3976
3897
 
3977
3898
  root = root || this.root;
3978
3899
  expanded = expanded || [];
@@ -3980,7 +3901,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3980
3901
  if (item.data.sumVisibility) {
3981
3902
  expanded.push(item.data.id);
3982
3903
 
3983
- _this22.onExpandAll(item, expanded);
3904
+ _this21.onExpandAll(item, expanded);
3984
3905
  }
3985
3906
  });
3986
3907
 
@@ -3999,7 +3920,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3999
3920
  }, {
4000
3921
  key: "onCollapseAll",
4001
3922
  value: function onCollapseAll() {
4002
- var _this23 = this;
3923
+ var _this22 = this;
4003
3924
 
4004
3925
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify([]));
4005
3926
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '[]');
@@ -4008,7 +3929,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4008
3929
  depth: 0,
4009
3930
  selected: []
4010
3931
  }, function () {
4011
- return _this23.onAfterSelect();
3932
+ return _this22.onAfterSelect();
4012
3933
  });
4013
3934
  }
4014
3935
  /**
@@ -4021,7 +3942,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4021
3942
  }, {
4022
3943
  key: "expandDepth",
4023
3944
  value: function expandDepth(root, depth, expanded) {
4024
- var _this24 = this;
3945
+ var _this23 = this;
4025
3946
 
4026
3947
  root = root || this.root;
4027
3948
 
@@ -4035,7 +3956,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4035
3956
  }
4036
3957
 
4037
3958
  if (depth - 1 > 0) {
4038
- _this24.expandDepth(item, depth - 1, expanded);
3959
+ _this23.expandDepth(item, depth - 1, expanded);
4039
3960
  }
4040
3961
  }
4041
3962
  });
@@ -4139,7 +4060,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4139
4060
  }, {
4140
4061
  key: "_exportObjects",
4141
4062
  value: function _exportObjects(isAll) {
4142
- var _this25 = this;
4063
+ var _this24 = this;
4143
4064
 
4144
4065
  if (isAll) {
4145
4066
  generateFile('allObjects.json', this.objects);
@@ -4148,10 +4069,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4148
4069
  var id = this.state.selected[0] || this.state.selectedNonObject;
4149
4070
 
4150
4071
  this._getSelectedIdsForExport().forEach(function (key) {
4151
- result[key] = JSON.parse(JSON.stringify(_this25.objects[key])); // add enum information
4072
+ result[key] = JSON.parse(JSON.stringify(_this24.objects[key])); // add enum information
4152
4073
 
4153
4074
  if (result[key].common) {
4154
- var enums = _this25.getEnumsForId(key);
4075
+ var enums = _this24.getEnumsForId(key);
4155
4076
 
4156
4077
  if (enums) {
4157
4078
  result[key].common.enums = enums;
@@ -4167,7 +4088,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4167
4088
  }, {
4168
4089
  key: "renderExportDialog",
4169
4090
  value: function renderExportDialog() {
4170
- var _this26 = this;
4091
+ var _this25 = this;
4171
4092
 
4172
4093
  if (this.state.showExportDialog === false) {
4173
4094
  return null;
@@ -4178,10 +4099,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4178
4099
  color: "grey",
4179
4100
  variant: "outlined",
4180
4101
  onClick: function onClick() {
4181
- return _this26.setState({
4102
+ return _this25.setState({
4182
4103
  showExportDialog: false
4183
4104
  }, function () {
4184
- return _this26._exportObjects(true);
4105
+ return _this25._exportObjects(true);
4185
4106
  });
4186
4107
  }
4187
4108
  }, this.props.t('ra_All objects')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -4189,17 +4110,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4189
4110
  variant: "contained",
4190
4111
  autoFocus: true,
4191
4112
  onClick: function onClick() {
4192
- return _this26.setState({
4113
+ return _this25.setState({
4193
4114
  showExportDialog: false
4194
4115
  }, function () {
4195
- return _this26._exportObjects(false);
4116
+ return _this25._exportObjects(false);
4196
4117
  });
4197
4118
  }
4198
4119
  }, this.props.t('ra_Only selected')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4199
4120
  color: "grey",
4200
4121
  variant: "contained",
4201
4122
  onClick: function onClick() {
4202
- return _this26.setState({
4123
+ return _this25.setState({
4203
4124
  showExportDialog: false
4204
4125
  });
4205
4126
  },
@@ -4220,7 +4141,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4220
4141
  * @returns {JSX.Element}
4221
4142
  */
4222
4143
  function getToolbar() {
4223
- var _this27 = this;
4144
+ var _this26 = this;
4224
4145
 
4225
4146
  var allowObjectCreation = false;
4226
4147
 
@@ -4254,7 +4175,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4254
4175
  title: this.props.t('ra_Refresh tree')
4255
4176
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4256
4177
  onClick: function onClick() {
4257
- return _this27.refreshComponent();
4178
+ return _this26.refreshComponent();
4258
4179
  },
4259
4180
  disabled: this.state.updating,
4260
4181
  size: "large"
@@ -4264,16 +4185,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4264
4185
  key: "expertMode",
4265
4186
  color: this.state.filter.expertMode ? 'secondary' : 'default',
4266
4187
  onClick: function onClick() {
4267
- return _this27.onFilter('expertMode', !_this27.state.filter.expertMode);
4188
+ return _this26.onFilter('expertMode', !_this26.state.filter.expertMode);
4268
4189
  },
4269
4190
  size: "large"
4270
4191
  }, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4271
- title: this.props.t('ra_Configure visible columns')
4192
+ title: this.props.t('ra_Configure')
4272
4193
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4273
- key: "columnSelector",
4274
- color: this.state.columnsAuto ? 'primary' : 'default',
4194
+ key: "columnSelector" // color={this.state.columnsAuto ? 'primary' : 'default'}
4195
+ ,
4275
4196
  onClick: function onClick() {
4276
- return _this27.setState({
4197
+ return _this26.setState({
4277
4198
  columnsSelectorShow: true
4278
4199
  });
4279
4200
  },
@@ -4283,7 +4204,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4283
4204
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4284
4205
  key: "expandAll",
4285
4206
  onClick: function onClick() {
4286
- return _this27.onExpandAll();
4207
+ return _this26.onExpandAll();
4287
4208
  },
4288
4209
  size: "large"
4289
4210
  }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
@@ -4291,7 +4212,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4291
4212
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4292
4213
  key: "collapseAll",
4293
4214
  onClick: function onClick() {
4294
- return _this27.onCollapseAll();
4215
+ return _this26.onCollapseAll();
4295
4216
  },
4296
4217
  size: "large"
4297
4218
  }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
@@ -4300,7 +4221,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4300
4221
  key: "expandVisible",
4301
4222
  color: "primary",
4302
4223
  onClick: function onClick() {
4303
- return _this27.onExpandVisible();
4224
+ return _this26.onExpandVisible();
4304
4225
  },
4305
4226
  size: "large"
4306
4227
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
@@ -4312,7 +4233,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4312
4233
  key: "collapseVisible",
4313
4234
  color: "primary",
4314
4235
  onClick: function onClick() {
4315
- return _this27.onCollapseVisible();
4236
+ return _this26.onCollapseVisible();
4316
4237
  },
4317
4238
  size: "large"
4318
4239
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
@@ -4322,7 +4243,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4322
4243
  title: this.props.t('ra_Toggle the states view')
4323
4244
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4324
4245
  onClick: function onClick() {
4325
- return _this27.onStatesViewVisible();
4246
+ return _this26.onStatesViewVisible();
4326
4247
  },
4327
4248
  size: "large"
4328
4249
  }, /*#__PURE__*/_react["default"].createElement(_LooksOne["default"], {
@@ -4332,7 +4253,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4332
4253
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4333
4254
  disabled: !allowObjectCreation,
4334
4255
  onClick: function onClick() {
4335
- return _this27.setState({
4256
+ return _this26.setState({
4336
4257
  modalNewObj: true
4337
4258
  });
4338
4259
  },
@@ -4346,7 +4267,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4346
4267
  input.setAttribute('id', 'files');
4347
4268
  input.setAttribute('opacity', 0);
4348
4269
  input.addEventListener('change', function (e) {
4349
- return _this27.handleJsonUpload(e);
4270
+ return _this26.handleJsonUpload(e);
4350
4271
  }, false);
4351
4272
  input.click();
4352
4273
  },
@@ -4355,8 +4276,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4355
4276
  title: this.props.t('ra_Save objects tree as JSON file')
4356
4277
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4357
4278
  onClick: function onClick() {
4358
- return _this27.setState({
4359
- showExportDialog: _this27._getSelectedIdsForExport().length
4279
+ return _this26.setState({
4280
+ showExportDialog: _this26._getSelectedIdsForExport().length
4360
4281
  });
4361
4282
  },
4362
4283
  size: "large"
@@ -4370,28 +4291,28 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4370
4291
  whiteSpace: 'nowrap'
4371
4292
  }
4372
4293
  }, "".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) {
4373
- return _this27.info.objects[el].type === 'state';
4294
+ return _this26.info.objects[el].type === 'state';
4374
4295
  }).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4375
4296
  title: this.props.t('ra_Edit custom config')
4376
4297
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4377
4298
  onClick: function onClick() {
4378
4299
  // get all visible states
4379
- var ids = getVisibleItems(_this27.root, 'state', _this27.objects);
4300
+ var ids = getVisibleItems(_this26.root, 'state', _this26.objects);
4380
4301
 
4381
4302
  if (ids.length) {
4382
- _this27.pauseSubscribe(true);
4303
+ _this26.pauseSubscribe(true);
4383
4304
 
4384
4305
  if (ids.length === 1) {
4385
- (window._localStorage || window.localStorage).setItem((_this27.props.dialogName || 'App') + '.objectSelected', _this27.state.selected[0]);
4386
- _this27.props.router && _this27.props.router.doNavigate(null, 'custom', _this27.state.selected[0]);
4306
+ (window._localStorage || window.localStorage).setItem((_this26.props.dialogName || 'App') + '.objectSelected', _this26.state.selected[0]);
4307
+ _this26.props.router && _this26.props.router.doNavigate(null, 'custom', _this26.state.selected[0]);
4387
4308
  }
4388
4309
 
4389
- _this27.setState({
4310
+ _this26.setState({
4390
4311
  customDialog: ids
4391
4312
  });
4392
4313
  } else {
4393
- _this27.setState({
4394
- toast: _this27.props.t('ra_please select object')
4314
+ _this26.setState({
4315
+ toast: _this26.props.t('ra_please select object')
4395
4316
  });
4396
4317
  }
4397
4318
  },
@@ -4453,7 +4374,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4453
4374
  * @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
4454
4375
  */
4455
4376
  function renderColumnButtons(id, item, classes) {
4456
- var _this28 = this,
4377
+ var _this27 = this,
4457
4378
  _item$children2,
4458
4379
  _item$data$obj$common,
4459
4380
  _item$data$obj$common3;
@@ -4464,7 +4385,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4464
4385
  }, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4465
4386
  className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsEmptyButton, classes.cellButtonMinWidth),
4466
4387
  onClick: function onClick() {
4467
- return _this28.setState({
4388
+ return _this27.setState({
4468
4389
  modalEditOfAccess: true,
4469
4390
  modalEmptyId: id,
4470
4391
  modalEditOfAccessObjData: item.data
@@ -4477,7 +4398,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4477
4398
  "aria-label": "delete",
4478
4399
  title: this.texts.deleteObject,
4479
4400
  onClick: function onClick() {
4480
- return _this28.props.onObjectDelete(id, !!(item.children && item.children.length), false);
4401
+ return _this27.props.onObjectDelete(id, !!(item.children && item.children.length), false);
4481
4402
  }
4482
4403
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
4483
4404
  className: classes.cellButtonsButtonIcon
@@ -4493,7 +4414,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4493
4414
  }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4494
4415
  className: classes.cellButtonMinWidth,
4495
4416
  onClick: function onClick() {
4496
- return _this28.setState({
4417
+ return _this27.setState({
4497
4418
  modalEditOfAccess: true,
4498
4419
  modalEditOfAccessObjData: item.data
4499
4420
  });
@@ -4511,9 +4432,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4511
4432
  "aria-label": "edit",
4512
4433
  title: this.texts.editObject,
4513
4434
  onClick: function onClick() {
4514
- (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4435
+ (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4515
4436
 
4516
- _this28.setState({
4437
+ _this27.setState({
4517
4438
  editObjectDialog: id
4518
4439
  });
4519
4440
  }
@@ -4527,7 +4448,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4527
4448
  onClick: function onClick() {
4528
4449
  var _item$children3, _item$data$obj$common2;
4529
4450
 
4530
- return _this28.props.onObjectDelete(id, !!((_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length), !((_item$data$obj$common2 = item.data.obj.common) !== null && _item$data$obj$common2 !== void 0 && _item$data$obj$common2.dontDelete));
4451
+ return _this27.props.onObjectDelete(id, !!((_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length), !((_item$data$obj$common2 = item.data.obj.common) !== null && _item$data$obj$common2 !== void 0 && _item$data$obj$common2.dontDelete));
4531
4452
  },
4532
4453
  title: this.texts.deleteObject
4533
4454
  }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
@@ -4539,13 +4460,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4539
4460
  "aria-label": "config",
4540
4461
  title: this.texts.customConfig,
4541
4462
  onClick: function onClick() {
4542
- (window._localStorage || window.localStorage).setItem((_this28.props.dialogName || 'App') + '.objectSelected', id);
4463
+ (window._localStorage || window.localStorage).setItem((_this27.props.dialogName || 'App') + '.objectSelected', id);
4543
4464
 
4544
- _this28.pauseSubscribe(true);
4465
+ _this27.pauseSubscribe(true);
4545
4466
 
4546
- _this28.props.router && _this28.props.router.doNavigate(null, 'customs', id);
4467
+ _this27.props.router && _this27.props.router.doNavigate(null, 'customs', id);
4547
4468
 
4548
- _this28.setState({
4469
+ _this27.setState({
4549
4470
  customDialog: [id]
4550
4471
  });
4551
4472
  }
@@ -4561,8 +4482,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4561
4482
  }, {
4562
4483
  key: "readHistory",
4563
4484
  value: function readHistory(id) {
4564
- var _this29 = this;
4565
-
4566
4485
  /*interface GetHistoryOptions {
4567
4486
  instance?: string;
4568
4487
  start?: number;
@@ -4606,7 +4525,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4606
4525
  }
4607
4526
  }
4608
4527
  })["catch"](function (e) {
4609
- return _this29.showError(e);
4528
+ return console.warn('Cannot read history: ' + e);
4610
4529
  });
4611
4530
  }
4612
4531
  }
@@ -4622,7 +4541,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4622
4541
  key: "renderColumnValue",
4623
4542
  value: function renderColumnValue(id, item, classes) {
4624
4543
  var _obj$common4,
4625
- _this30 = this;
4544
+ _this28 = this;
4626
4545
 
4627
4546
  var obj = item.data.obj;
4628
4547
 
@@ -4654,7 +4573,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4654
4573
  if (!info) {
4655
4574
  info = item.data.state = item.data.state || formatValue(id, state, obj, this.texts, this.props.dateFormat, this.props.isFloatComma);
4656
4575
  info.valFull = info.valFull.map(function (item) {
4657
- if (item.t === _this30.texts.quality && state.q) {
4576
+ if (item.t === _this28.texts.quality && state.q) {
4658
4577
  return [/*#__PURE__*/_react["default"].createElement("div", {
4659
4578
  className: classes.cellValueTooltipBoth,
4660
4579
  key: item.t
@@ -4703,7 +4622,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4703
4622
  }, "(", info.valText.s, ")") : null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
4704
4623
  className: _Utils["default"].clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonCopy),
4705
4624
  onClick: function onClick(e) {
4706
- return _this30.onCopy(e, copyText);
4625
+ return _this28.onCopy(e, copyText);
4707
4626
  },
4708
4627
  key: "cc"
4709
4628
  }) //<IconEdit className={ Utils.clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonEdit) } key="ce" />
@@ -4726,7 +4645,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4726
4645
  popper: this.props.classes.cellValueTooltipBox
4727
4646
  },
4728
4647
  onOpen: function onOpen() {
4729
- return _this30.readHistory(id);
4648
+ return _this28.readHistory(id);
4730
4649
  }
4731
4650
  }, /*#__PURE__*/_react["default"].createElement("div", {
4732
4651
  style: info.style,
@@ -4741,7 +4660,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4741
4660
  }, {
4742
4661
  key: "_syncEnum",
4743
4662
  value: function _syncEnum(id, enumIds, newArray, cb) {
4744
- var _this31 = this;
4663
+ var _this29 = this;
4745
4664
 
4746
4665
  if (!enumIds || !enumIds.length) {
4747
4666
  return cb && cb();
@@ -4762,9 +4681,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4762
4681
  var obj = JSON.parse(JSON.stringify(this.info.objects[enumId]));
4763
4682
  obj.common.members.splice(pos, 1);
4764
4683
  promises.push(this.props.socket.setObject(enumId, obj).then(function () {
4765
- return _this31.info.objects[enumId] = obj;
4684
+ return _this29.info.objects[enumId] = obj;
4766
4685
  })["catch"](function (e) {
4767
- return _this31.showError(e);
4686
+ return _this29.showError(e);
4768
4687
  }));
4769
4688
  }
4770
4689
  } // add to it
@@ -4781,16 +4700,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4781
4700
  _obj.common.members.sort();
4782
4701
 
4783
4702
  promises.push(this.props.socket.setObject(enumId, _obj).then(function () {
4784
- return _this31.info.objects[enumId] = _obj;
4703
+ return _this29.info.objects[enumId] = _obj;
4785
4704
  })["catch"](function (e) {
4786
- return _this31.showError(e);
4705
+ return _this29.showError(e);
4787
4706
  }));
4788
4707
  }
4789
4708
  }
4790
4709
 
4791
4710
  Promise.all(promises).then(function () {
4792
4711
  return setTimeout(function () {
4793
- return _this31._syncEnum(id, enumIds, newArray, cb);
4712
+ return _this29._syncEnum(id, enumIds, newArray, cb);
4794
4713
  }, 0);
4795
4714
  });
4796
4715
  }
@@ -4803,12 +4722,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4803
4722
  }, {
4804
4723
  key: "syncEnum",
4805
4724
  value: function syncEnum(id, enumName, newArray) {
4806
- var _this32 = this;
4725
+ var _this30 = this;
4807
4726
 
4808
4727
  var toCheck = (0, _toConsumableArray2["default"])(this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']);
4809
4728
  return new Promise(function (resolve) {
4810
- return _this32._syncEnum(id, toCheck, newArray, function (error) {
4811
- error && _this32.showError(error); // force update of object
4729
+ return _this30._syncEnum(id, toCheck, newArray, function (error) {
4730
+ error && _this30.showError(error); // force update of object
4812
4731
 
4813
4732
  resolve();
4814
4733
  });
@@ -4822,7 +4741,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4822
4741
  }, {
4823
4742
  key: "renderEnumDialog",
4824
4743
  value: function renderEnumDialog() {
4825
- var _this33 = this;
4744
+ var _this31 = this;
4826
4745
 
4827
4746
  if (this.state.enumDialog) {
4828
4747
  var type = this.state.enumDialog.type;
@@ -4831,18 +4750,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4831
4750
  var enumsOriginal = this.state.enumDialog.enumsOriginal;
4832
4751
  var enums = (type === 'room' ? this.info.roomEnums : this.info.funcEnums).map(function (id) {
4833
4752
  return {
4834
- name: getName(_this33.objects[id] && _this33.objects[id].common && _this33.objects[id].common.name || id.split('.').pop(), _this33.props.lang),
4753
+ name: getName(_this31.objects[id] && _this31.objects[id].common && _this31.objects[id].common.name || id.split('.').pop(), _this31.props.lang),
4835
4754
  value: id,
4836
- icon: getSelectIdIcon(_this33.objects, id, _this33.imagePrefix)
4755
+ icon: getSelectIdIcon(_this31.objects, id, _this31.imagePrefix)
4837
4756
  };
4838
4757
  });
4839
4758
  enums.forEach(function (item) {
4840
4759
  if (item.icon && typeof item.icon == 'string') {
4841
4760
  item.icon = /*#__PURE__*/_react["default"].createElement("div", {
4842
- className: _this33.props.classes.enumIconDiv
4761
+ className: _this31.props.classes.enumIconDiv
4843
4762
  }, /*#__PURE__*/_react["default"].createElement("img", {
4844
4763
  src: item.icon,
4845
- className: _this33.props.classes.enumIcon,
4764
+ className: _this31.props.classes.enumIcon,
4846
4765
  alt: item.name
4847
4766
  }));
4848
4767
  }
@@ -4851,7 +4770,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4851
4770
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4852
4771
  className: this.props.classes.enumDialog,
4853
4772
  onClose: function onClose() {
4854
- return _this33.setState({
4773
+ return _this31.setState({
4855
4774
  enumDialog: null
4856
4775
  });
4857
4776
  },
@@ -4865,8 +4784,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4865
4784
  disabled: JSON.stringify(enumsOriginal) === JSON.stringify(itemEnums),
4866
4785
  size: "small",
4867
4786
  onClick: function onClick() {
4868
- return _this33.syncEnum(item.data.id, type, itemEnums).then(function () {
4869
- return _this33.setState({
4787
+ return _this31.syncEnum(item.data.id, type, itemEnums).then(function () {
4788
+ return _this31.setState({
4870
4789
  enumDialog: null,
4871
4790
  enumDialogEnums: null
4872
4791
  });
@@ -4892,11 +4811,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4892
4811
 
4893
4812
  var labelId = "checkbox-list-label-".concat(id);
4894
4813
  return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
4895
- className: _this33.props.classes.headerCellSelectItem,
4814
+ className: _this31.props.classes.headerCellSelectItem,
4896
4815
  key: id,
4897
4816
  onClick: function onClick() {
4898
4817
  var pos = itemEnums.indexOf(id);
4899
- var enumDialogEnums = JSON.parse(JSON.stringify(_this33.state.enumDialogEnums));
4818
+ var enumDialogEnums = JSON.parse(JSON.stringify(_this31.state.enumDialogEnums));
4900
4819
 
4901
4820
  if (pos === -1) {
4902
4821
  enumDialogEnums.push(id);
@@ -4905,13 +4824,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4905
4824
  enumDialogEnums.splice(pos, 1);
4906
4825
  }
4907
4826
 
4908
- _this33.setState({
4827
+ _this31.setState({
4909
4828
  enumDialogEnums: enumDialogEnums
4910
4829
  });
4911
4830
  }
4912
4831
  }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
4913
4832
  classes: {
4914
- root: _this33.props.classes.enumCheckbox
4833
+ root: _this31.props.classes.enumCheckbox
4915
4834
  }
4916
4835
  }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4917
4836
  edge: "start",
@@ -4937,7 +4856,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4937
4856
  }, {
4938
4857
  key: "renderEditRoleDialog",
4939
4858
  value: function renderEditRoleDialog() {
4940
- var _this34 = this;
4859
+ var _this32 = this;
4941
4860
 
4942
4861
  if (this.state.roleDialog && this.props.objectBrowserEditRole) {
4943
4862
  var ObjectBrowserEditRole = this.props.objectBrowserEditRole;
@@ -4949,10 +4868,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4949
4868
  roles: this.info.roles,
4950
4869
  onClose: function onClose(obj) {
4951
4870
  if (obj) {
4952
- _this34.info.objects[_this34.state.roleDialog] = obj;
4871
+ _this32.info.objects[_this32.state.roleDialog] = obj;
4953
4872
  }
4954
4873
 
4955
- _this34.setState({
4874
+ _this32.setState({
4956
4875
  roleDialog: false
4957
4876
  });
4958
4877
  }
@@ -4969,7 +4888,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4969
4888
  }, {
4970
4889
  key: "onColumnsEditCustomDialogClose",
4971
4890
  value: function onColumnsEditCustomDialogClose(isSave) {
4972
- var _this35 = this;
4891
+ var _this33 = this;
4973
4892
 
4974
4893
  if (isSave) {
4975
4894
  var value = this.customColumnDialog.value;
@@ -4982,17 +4901,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4982
4901
 
4983
4902
  this.customColumnDialog = null;
4984
4903
  this.props.socket.getObject(this.state.columnsEditCustomDialog.obj._id).then(function (obj) {
4985
- if (_this35.setCustomValue(obj, _this35.state.columnsEditCustomDialog.it, value)) {
4986
- return _this35.props.socket.setObject(obj._id, obj);
4904
+ if (_this33.setCustomValue(obj, _this33.state.columnsEditCustomDialog.it, value)) {
4905
+ return _this33.props.socket.setObject(obj._id, obj);
4987
4906
  } else {
4988
- throw new Error(_this35.props.t('ra_Cannot update attribute, because not found in the object'));
4907
+ throw new Error(_this33.props.t('ra_Cannot update attribute, because not found in the object'));
4989
4908
  }
4990
4909
  }).then(function () {
4991
- return _this35.setState({
4910
+ return _this33.setState({
4992
4911
  columnsEditCustomDialog: null
4993
4912
  });
4994
4913
  })["catch"](function (e) {
4995
- return _this35.showError(e);
4914
+ return _this33.showError(e);
4996
4915
  });
4997
4916
  } else {
4998
4917
  this.customColumnDialog = null;
@@ -5008,7 +4927,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5008
4927
  }, {
5009
4928
  key: "renderColumnsEditCustomDialog",
5010
4929
  value: function renderColumnsEditCustomDialog() {
5011
- var _this36 = this;
4930
+ var _this34 = this;
5012
4931
 
5013
4932
  if (this.state.columnsEditCustomDialog) {
5014
4933
  if (!this.customColumnDialog) {
@@ -5022,7 +4941,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5022
4941
 
5023
4942
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
5024
4943
  onClose: function onClose() {
5025
- return _this36.setState({
4944
+ return _this34.setState({
5026
4945
  columnsEditCustomDialog: null
5027
4946
  });
5028
4947
  },
@@ -5036,15 +4955,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5036
4955
  }, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
5037
4956
  control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
5038
4957
  onKeyUp: function onKeyUp(e) {
5039
- return e.keyCode === 13 && _this36.onColumnsEditCustomDialogClose(true);
4958
+ return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
5040
4959
  },
5041
4960
  defaultChecked: this.customColumnDialog.value === 'true',
5042
4961
  onChange: function onChange(e) {
5043
- _this36.customColumnDialog.value = e.target.checked.toString();
5044
- var changed = _this36.customColumnDialog.value !== _this36.customColumnDialog.initValue;
4962
+ _this34.customColumnDialog.value = e.target.checked.toString();
4963
+ var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
5045
4964
 
5046
- if (changed === !_this36.state.customColumnDialogValueChanged) {
5047
- _this36.setState({
4965
+ if (changed === !_this34.state.customColumnDialogValueChanged) {
4966
+ _this34.setState({
5048
4967
  customColumnDialogValueChanged: changed
5049
4968
  });
5050
4969
  }
@@ -5056,15 +4975,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5056
4975
  defaultValue: this.customColumnDialog.value,
5057
4976
  fullWidth: true,
5058
4977
  onKeyUp: function onKeyUp(e) {
5059
- return e.keyCode === 13 && _this36.onColumnsEditCustomDialogClose(true);
4978
+ return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
5060
4979
  },
5061
4980
  label: "".concat(this.state.columnsEditCustomDialog.it.name, " (").concat(this.state.columnsEditCustomDialog.it.pathText, ")"),
5062
4981
  onChange: function onChange(e) {
5063
- _this36.customColumnDialog.value = e.target.value;
5064
- var changed = _this36.customColumnDialog.value !== _this36.customColumnDialog.initValue;
4982
+ _this34.customColumnDialog.value = e.target.value;
4983
+ var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
5065
4984
 
5066
- if (changed === !_this36.state.customColumnDialogValueChanged) {
5067
- _this36.setState({
4985
+ if (changed === !_this34.state.customColumnDialogValueChanged) {
4986
+ _this34.setState({
5068
4987
  customColumnDialogValueChanged: changed
5069
4988
  });
5070
4989
  }
@@ -5073,7 +4992,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5073
4992
  }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
5074
4993
  variant: "contained",
5075
4994
  onClick: function onClick() {
5076
- return _this36.onColumnsEditCustomDialogClose(true);
4995
+ return _this34.onColumnsEditCustomDialogClose(true);
5077
4996
  },
5078
4997
  disabled: !this.state.customColumnDialogValueChanged,
5079
4998
  color: "primary",
@@ -5082,7 +5001,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5082
5001
  color: "grey",
5083
5002
  variant: "contained",
5084
5003
  onClick: function onClick() {
5085
- return _this36.onColumnsEditCustomDialogClose();
5004
+ return _this34.onColumnsEditCustomDialogClose();
5086
5005
  },
5087
5006
  startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
5088
5007
  }, this.props.t('ra_Cancel'))));
@@ -5182,7 +5101,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5182
5101
  }, {
5183
5102
  key: "renderCustomValue",
5184
5103
  value: function renderCustomValue(obj, it, item) {
5185
- var _this37 = this;
5104
+ var _this35 = this;
5186
5105
 
5187
5106
  var text = this.getCustomValue(obj, it);
5188
5107
 
@@ -5191,7 +5110,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5191
5110
  return /*#__PURE__*/_react["default"].createElement("div", {
5192
5111
  className: _Utils["default"].clsx(this.props.classes.columnCustom, this.props.classes.columnCustomEditable, this.props.classes['columnCustom_' + it.align]),
5193
5112
  onClick: function onClick() {
5194
- return _this37.setState({
5113
+ return _this35.setState({
5195
5114
  columnsEditCustomDialog: {
5196
5115
  item: item,
5197
5116
  it: it,
@@ -5222,7 +5141,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5222
5141
  }, {
5223
5142
  key: "renderLeaf",
5224
5143
  value: function renderLeaf(item, isExpanded, classes, counter) {
5225
- var _this38 = this,
5144
+ var _this36 = this,
5226
5145
  _common$alias,
5227
5146
  _common$alias2,
5228
5147
  _this$states$id2,
@@ -5244,12 +5163,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5244
5163
  iconFolder = isExpanded ? /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], {
5245
5164
  className: classes.cellIdIconFolder,
5246
5165
  onClick: function onClick() {
5247
- return _this38.toggleExpanded(id);
5166
+ return _this36.toggleExpanded(id);
5248
5167
  }
5249
5168
  }) : /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
5250
5169
  className: classes.cellIdIconFolder,
5251
5170
  onClick: function onClick() {
5252
- return _this38.toggleExpanded(id);
5171
+ return _this36.toggleExpanded(id);
5253
5172
  }
5254
5173
  });
5255
5174
  } else {
@@ -5357,11 +5276,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5357
5276
  e.stopPropagation();
5358
5277
  e.preventDefault();
5359
5278
 
5360
- _this38.onSelect(common.alias.id.read);
5279
+ _this36.onSelect(common.alias.id.read);
5361
5280
 
5362
5281
  setTimeout(function () {
5363
- _this38.expandAllSelected(function () {
5364
- return _this38.scrollToItem(common.alias.id.read);
5282
+ _this36.expandAllSelected(function () {
5283
+ return _this36.scrollToItem(common.alias.id.read);
5365
5284
  });
5366
5285
  }, 100);
5367
5286
  },
@@ -5371,11 +5290,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5371
5290
  e.stopPropagation();
5372
5291
  e.preventDefault();
5373
5292
 
5374
- _this38.onSelect(common.alias.id.write);
5293
+ _this36.onSelect(common.alias.id.write);
5375
5294
 
5376
5295
  setTimeout(function () {
5377
- _this38.expandAllSelected(function () {
5378
- return _this38.scrollToItem(common.alias.id.write);
5296
+ _this36.expandAllSelected(function () {
5297
+ return _this36.scrollToItem(common.alias.id.write);
5379
5298
  });
5380
5299
  }, 100);
5381
5300
  },
@@ -5385,11 +5304,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5385
5304
  e.stopPropagation();
5386
5305
  e.preventDefault();
5387
5306
 
5388
- _this38.onSelect(common.alias.id);
5307
+ _this36.onSelect(common.alias.id);
5389
5308
 
5390
5309
  setTimeout(function () {
5391
- _this38.expandAllSelected(function () {
5392
- return _this38.scrollToItem(common.alias.id);
5310
+ _this36.expandAllSelected(function () {
5311
+ return _this36.scrollToItem(common.alias.id);
5393
5312
  });
5394
5313
  }, 100);
5395
5314
  },
@@ -5419,19 +5338,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5419
5338
 
5420
5339
  ids[name] = _id;
5421
5340
 
5422
- if (!_this38.states[_id]) {
5423
- var _this38$objects$_id;
5341
+ if (!_this36.states[_id]) {
5342
+ var _this36$objects$_id;
5424
5343
 
5425
- if (((_this38$objects$_id = _this38.objects[_id]) === null || _this38$objects$_id === void 0 ? void 0 : _this38$objects$_id.type) === 'state') {
5426
- !_this38.recordStates.includes(_id) && _this38.recordStates.push(_id);
5427
- _this38.states[_id] = {
5344
+ if (((_this36$objects$_id = _this36.objects[_id]) === null || _this36$objects$_id === void 0 ? void 0 : _this36$objects$_id.type) === 'state') {
5345
+ !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
5346
+ _this36.states[_id] = {
5428
5347
  val: null
5429
5348
  };
5430
5349
 
5431
- _this38.subscribe(_id);
5350
+ _this36.subscribe(_id);
5432
5351
  }
5433
5352
  } else {
5434
- !_this38.recordStates.includes(_id) && _this38.recordStates.push(_id);
5353
+ !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
5435
5354
  }
5436
5355
  }); // calculate color
5437
5356
  // errorId has priority
@@ -5520,13 +5439,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5520
5439
  key: id,
5521
5440
  id: id,
5522
5441
  onClick: function onClick() {
5523
- return _this38.onSelect(id);
5442
+ return _this36.onSelect(id);
5524
5443
  },
5525
5444
  onDoubleClick: function onDoubleClick() {
5526
5445
  if (!item.children) {
5527
- _this38.onSelect(id, true);
5446
+ _this36.onSelect(id, true);
5528
5447
  } else {
5529
- _this38.toggleExpanded(id);
5448
+ _this36.toggleExpanded(id);
5530
5449
  }
5531
5450
  }
5532
5451
  }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
@@ -5571,7 +5490,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5571
5490
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5572
5491
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5573
5492
  onClick: function onClick(e) {
5574
- return _this38.onCopy(e, id);
5493
+ return _this36.onCopy(e, id);
5575
5494
  }
5576
5495
  }))), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
5577
5496
  className: classes.cellName,
@@ -5585,7 +5504,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5585
5504
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5586
5505
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5587
5506
  onClick: function onClick(e) {
5588
- return _this38.onCopy(e, item.data.title);
5507
+ return _this36.onCopy(e, item.data.title);
5589
5508
  }
5590
5509
  })) : null) : null, !this.state.statesView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
5591
5510
  className: classes.cellType,
@@ -5599,7 +5518,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5599
5518
  cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? 'text' : 'default'
5600
5519
  },
5601
5520
  onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? function () {
5602
- return _this38.setState({
5521
+ return _this36.setState({
5603
5522
  roleDialog: item.data.id
5604
5523
  });
5605
5524
  } : undefined
@@ -5610,9 +5529,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5610
5529
  cursor: enumEditable ? 'text' : 'default'
5611
5530
  },
5612
5531
  onClick: enumEditable ? function () {
5613
- var enums = findEnumsForObjectAsIds(_this38.info, item.data.id, 'roomEnums');
5532
+ var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'roomEnums');
5614
5533
 
5615
- _this38.setState({
5534
+ _this36.setState({
5616
5535
  enumDialogEnums: enums,
5617
5536
  enumDialog: {
5618
5537
  item: item,
@@ -5628,9 +5547,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5628
5547
  cursor: enumEditable ? 'text' : 'default'
5629
5548
  },
5630
5549
  onClick: enumEditable ? function () {
5631
- var enums = findEnumsForObjectAsIds(_this38.info, item.data.id, 'funcEnums');
5550
+ var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'funcEnums');
5632
5551
 
5633
- _this38.setState({
5552
+ _this36.setState({
5634
5553
  enumDialogEnums: enums,
5635
5554
  enumDialog: {
5636
5555
  item: item,
@@ -5665,11 +5584,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5665
5584
  return /*#__PURE__*/_react["default"].createElement("div", {
5666
5585
  className: classes.cellAdapter,
5667
5586
  style: {
5668
- width: _this38.columnsVisibility[it.id]
5587
+ width: _this36.columnsVisibility[it.id]
5669
5588
  },
5670
5589
  key: it.id,
5671
5590
  title: it.adapter + ' => ' + it.pathText
5672
- }, _this38.renderCustomValue(obj, it, item));
5591
+ }, _this36.renderCustomValue(obj, it, item));
5673
5592
  }), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
5674
5593
  className: classes.cellValue,
5675
5594
  style: {
@@ -5677,31 +5596,31 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5677
5596
  cursor: valueEditable ? (common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : item.data.button ? 'grab' : 'text' : 'default'
5678
5597
  },
5679
5598
  onClick: valueEditable ? function () {
5680
- if (!obj || !_this38.states) {
5599
+ if (!obj || !_this36.states) {
5681
5600
  return null;
5682
5601
  }
5683
5602
 
5684
5603
  if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
5685
- return _this38.setState({
5604
+ return _this36.setState({
5686
5605
  viewFileDialog: id
5687
5606
  });
5688
5607
  } // in non-expert mode control button directly
5689
5608
 
5690
5609
 
5691
- if (!_this38.state.filter.expertMode && item.data.button) {
5692
- return _this38.props.socket.setState(id, true)["catch"](function (e) {
5610
+ if (!_this36.state.filter.expertMode && item.data.button) {
5611
+ return _this36.props.socket.setState(id, true)["catch"](function (e) {
5693
5612
  return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
5694
5613
  });
5695
5614
  }
5696
5615
 
5697
- _this38.edit = {
5698
- val: _this38.states[id] ? _this38.states[id].val : '',
5699
- q: _this38.states[id] ? _this38.states[id].q || 0 : 0,
5616
+ _this36.edit = {
5617
+ val: _this36.states[id] ? _this36.states[id].val : '',
5618
+ q: _this36.states[id] ? _this36.states[id].q || 0 : 0,
5700
5619
  ack: false,
5701
5620
  id: id
5702
5621
  };
5703
5622
 
5704
- _this38.setState({
5623
+ _this36.setState({
5705
5624
  updateOpened: true
5706
5625
  });
5707
5626
  } : undefined
@@ -5724,7 +5643,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5724
5643
  }, {
5725
5644
  key: "renderItem",
5726
5645
  value: function renderItem(root, isExpanded, classes, counter) {
5727
- var _this39 = this;
5646
+ var _this37 = this;
5728
5647
 
5729
5648
  var items = [];
5730
5649
  counter = counter || {
@@ -5756,9 +5675,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5756
5675
  if (!this.state.foldersFirst) {
5757
5676
  root.children && items.push(root.children.map(function (item) {
5758
5677
  // do not render too many items in column editor mode
5759
- if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5678
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5760
5679
  if (item.data.sumVisibility) {
5761
- return _this39.renderItem(item, undefined, classes, counter);
5680
+ return _this37.renderItem(item, undefined, classes, counter);
5762
5681
  }
5763
5682
  }
5764
5683
 
@@ -5769,9 +5688,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5769
5688
  root.children && items.push(root.children.map(function (item) {
5770
5689
  if (item.children) {
5771
5690
  // do not render too many items in column editor mode
5772
- if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5691
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5773
5692
  if (item.data.sumVisibility) {
5774
- return _this39.renderItem(item, undefined, classes, counter);
5693
+ return _this37.renderItem(item, undefined, classes, counter);
5775
5694
  }
5776
5695
  }
5777
5696
  }
@@ -5782,9 +5701,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5782
5701
  root.children && items.push(root.children.map(function (item) {
5783
5702
  if (!item.children) {
5784
5703
  // do not render too many items in column editor mode
5785
- if (!_this39.state.columnsSelectorShow || counter.count < 15) {
5704
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5786
5705
  if (item.data.sumVisibility) {
5787
- return _this39.renderItem(item, undefined, classes, counter);
5706
+ return _this37.renderItem(item, undefined, classes, counter);
5788
5707
  }
5789
5708
  }
5790
5709
  }
@@ -5807,7 +5726,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5807
5726
  }, {
5808
5727
  key: "calculateColumnsVisibility",
5809
5728
  value: function calculateColumnsVisibility(columnsAuto, columns, columnsForAdmin, columnsWidths) {
5810
- var _this40 = this;
5729
+ var _this38 = this;
5811
5730
 
5812
5731
  columnsWidths = columnsWidths || this.state.columnsWidths;
5813
5732
  columnsForAdmin = columnsForAdmin || this.state.columnsForAdmin;
@@ -5900,7 +5819,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5900
5819
  Object.keys(columnsForAdmin).sort().forEach(function (adapter) {
5901
5820
  return columnsForAdmin[adapter].forEach(function (column) {
5902
5821
  var id = '_' + adapter + '_' + column.path;
5903
- _this40.columnsVisibility[id] = columns.includes(id);
5822
+ _this38.columnsVisibility[id] = columns.includes(id);
5904
5823
 
5905
5824
  if (columns.includes(id)) {
5906
5825
  var item = {
@@ -5923,12 +5842,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5923
5842
  }
5924
5843
  }
5925
5844
 
5926
- _this40.adapterColumns.push(item);
5845
+ _this38.adapterColumns.push(item);
5927
5846
 
5928
- _this40.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this40.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5929
- _widthSum2 += _this40.columnsVisibility[id];
5847
+ _this38.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this38.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5848
+ _widthSum2 += _this38.columnsVisibility[id];
5930
5849
  } else {
5931
- _this40.columnsVisibility[id] = 0;
5850
+ _this38.columnsVisibility[id] = 0;
5932
5851
  }
5933
5852
  });
5934
5853
  });
@@ -5950,10 +5869,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5950
5869
  this.columnsVisibility.nameHeader = "calc(100% - ".concat(_widthSum2 + 5 + this.state.scrollBarWidth, "px)");
5951
5870
  } else {
5952
5871
  var newWidth = Object.keys(this.columnsVisibility).reduce(function (accumulator, name) {
5953
- if (name === 'id' || typeof _this40.columnsVisibility[name] === 'string' || !_this40.columnsVisibility[name]) {
5872
+ if (name === 'id' || typeof _this38.columnsVisibility[name] === 'string' || !_this38.columnsVisibility[name]) {
5954
5873
  return accumulator;
5955
5874
  } else {
5956
- return accumulator + _this40.columnsVisibility[name];
5875
+ return accumulator + _this38.columnsVisibility[name];
5957
5876
  }
5958
5877
  }, 0);
5959
5878
  this.columnsVisibility.id = "calc(100% - ".concat(newWidth, "px)");
@@ -5968,7 +5887,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5968
5887
  * @returns {JSX.Element}
5969
5888
  */
5970
5889
  function renderHeader() {
5971
- var _this41 = this;
5890
+ var _this39 = this;
5972
5891
 
5973
5892
  var classes = this.props.classes;
5974
5893
  var filterClearInValue = null;
@@ -5976,7 +5895,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5976
5895
  if (!this.columnsVisibility.buttons && !this.isFilterEmpty()) {
5977
5896
  filterClearInValue = /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
5978
5897
  onClick: function onClick() {
5979
- return _this41.clearFilter();
5898
+ return _this39.clearFilter();
5980
5899
  },
5981
5900
  className: classes.buttonClearFilter,
5982
5901
  title: this.props.t('ra_Clear filter'),
@@ -6068,7 +5987,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6068
5987
  return /*#__PURE__*/_react["default"].createElement("div", {
6069
5988
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
6070
5989
  style: {
6071
- width: _this41.columnsVisibility[item.id]
5990
+ width: _this39.columnsVisibility[item.id]
6072
5991
  },
6073
5992
  title: item.adapter,
6074
5993
  key: item.id,
@@ -6104,18 +6023,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6104
6023
  }, {
6105
6024
  key: "renderToast",
6106
6025
  value: function renderToast() {
6107
- var _this42 = this;
6026
+ var _this40 = this;
6108
6027
 
6109
6028
  return /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], {
6110
6029
  open: !!this.state.toast,
6111
6030
  autoHideDuration: 3000,
6112
6031
  onClick: function onClick() {
6113
- return _this42.setState({
6032
+ return _this40.setState({
6114
6033
  toast: ''
6115
6034
  });
6116
6035
  },
6117
6036
  onClose: function onClose() {
6118
- return _this42.setState({
6037
+ return _this40.setState({
6119
6038
  toast: ''
6120
6039
  });
6121
6040
  },
@@ -6125,7 +6044,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6125
6044
  "aria-label": "close",
6126
6045
  color: "inherit",
6127
6046
  onClick: function onClick() {
6128
- return _this42.setState({
6047
+ return _this40.setState({
6129
6048
  toast: ''
6130
6049
  });
6131
6050
  }
@@ -6141,14 +6060,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6141
6060
  }, {
6142
6061
  key: "componentDidUpdate",
6143
6062
  value: function componentDidUpdate() {
6144
- var _this43 = this;
6063
+ var _this41 = this;
6145
6064
 
6146
6065
  if (this.tableRef.current) {
6147
6066
  var scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
6148
6067
 
6149
6068
  if (this.state.scrollBarWidth !== scrollBarWidth) {
6150
6069
  setTimeout(function () {
6151
- return _this43.setState({
6070
+ return _this41.setState({
6152
6071
  scrollBarWidth: scrollBarWidth
6153
6072
  });
6154
6073
  }, 100);
@@ -6178,13 +6097,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6178
6097
  }, {
6179
6098
  key: "renderCustomDialog",
6180
6099
  value: function renderCustomDialog() {
6181
- var _this44 = this;
6100
+ var _this42 = this;
6182
6101
 
6183
6102
  if (this.state.customDialog && this.props.objectCustomDialog) {
6184
6103
  var ObjectCustomDialog = this.props.objectCustomDialog;
6185
6104
  return /*#__PURE__*/_react["default"].createElement(ObjectCustomDialog, {
6186
6105
  reportChangedIds: function reportChangedIds(changedIds) {
6187
- return _this44.changedIds = (0, _toConsumableArray2["default"])(changedIds);
6106
+ return _this42.changedIds = (0, _toConsumableArray2["default"])(changedIds);
6188
6107
  },
6189
6108
  objectIDs: this.state.customDialog,
6190
6109
  expertMode: this.state.filter.expertMode,
@@ -6198,19 +6117,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6198
6117
  objects: this.objects,
6199
6118
  customsInstances: this.info.customs,
6200
6119
  onClose: function onClose() {
6201
- _this44.pauseSubscribe(false);
6120
+ _this42.pauseSubscribe(false);
6202
6121
 
6203
- _this44.setState({
6122
+ _this42.setState({
6204
6123
  customDialog: null
6205
6124
  });
6206
6125
 
6207
- if (_this44.changedIds) {
6208
- _this44.changedIds = null; // update all changed IDs
6126
+ if (_this42.changedIds) {
6127
+ _this42.changedIds = null; // update all changed IDs
6209
6128
 
6210
- _this44.forceUpdate();
6129
+ _this42.forceUpdate();
6211
6130
  }
6212
6131
 
6213
- _this44.props.router && _this44.props.router.doNavigate('tab-objects');
6132
+ _this42.props.router && _this42.props.router.doNavigate('tab-objects');
6214
6133
  }
6215
6134
  });
6216
6135
  } else {
@@ -6225,7 +6144,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6225
6144
  }, {
6226
6145
  key: "onUpdate",
6227
6146
  value: function onUpdate(valAck) {
6228
- var _this45 = this;
6147
+ var _this43 = this;
6229
6148
 
6230
6149
  this.props.socket.setState(this.edit.id, {
6231
6150
  val: valAck.val,
@@ -6233,7 +6152,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6233
6152
  q: valAck.q || 0,
6234
6153
  expire: valAck.expire || undefined
6235
6154
  })["catch"](function (e) {
6236
- return _this45.showError('Cannot write value: ' + e);
6155
+ return _this43.showError('Cannot write value: ' + e);
6237
6156
  });
6238
6157
  }
6239
6158
  /**
@@ -6244,7 +6163,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6244
6163
  }, {
6245
6164
  key: "renderEditObjectDialog",
6246
6165
  value: function renderEditObjectDialog() {
6247
- var _this46 = this;
6166
+ var _this44 = this;
6248
6167
 
6249
6168
  if (!this.state.editObjectDialog || !this.props.objectBrowserEditObject) {
6250
6169
  return null;
@@ -6264,24 +6183,24 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6264
6183
  t: this.props.t,
6265
6184
  expertMode: this.state.filter.expertMode,
6266
6185
  onNewObject: function onNewObject(obj) {
6267
- return _this46.props.socket.setObject(obj._id, obj).then(function () {
6268
- return _this46.setState({
6186
+ return _this44.props.socket.setObject(obj._id, obj).then(function () {
6187
+ return _this44.setState({
6269
6188
  editObjectDialog: obj._id
6270
6189
  }, function () {
6271
- return _this46.onSelect(obj._id);
6190
+ return _this44.onSelect(obj._id);
6272
6191
  });
6273
6192
  })["catch"](function (e) {
6274
- return _this46.showError('Cannot write object: ' + e);
6193
+ return _this44.showError('Cannot write object: ' + e);
6275
6194
  });
6276
6195
  },
6277
6196
  onClose: function onClose(obj) {
6278
- _this46.setState({
6197
+ _this44.setState({
6279
6198
  editObjectDialog: ''
6280
6199
  });
6281
6200
 
6282
6201
  if (obj) {
6283
- _this46.props.socket.setObject(obj._id, obj)["catch"](function (e) {
6284
- return _this46.showError('Cannot write object: ' + e);
6202
+ _this44.props.socket.setObject(obj._id, obj)["catch"](function (e) {
6203
+ return _this44.showError('Cannot write object: ' + e);
6285
6204
  });
6286
6205
  }
6287
6206
  }
@@ -6295,7 +6214,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6295
6214
  }, {
6296
6215
  key: "renderViewObjectFileDialog",
6297
6216
  value: function renderViewObjectFileDialog() {
6298
- var _this47 = this;
6217
+ var _this45 = this;
6299
6218
 
6300
6219
  if (!this.state.viewFileDialog || !this.props.objectBrowserViewFile) {
6301
6220
  return null;
@@ -6311,7 +6230,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6311
6230
  t: this.props.t,
6312
6231
  expertMode: this.state.filter.expertMode,
6313
6232
  onClose: function onClose() {
6314
- return _this47.setState({
6233
+ return _this45.setState({
6315
6234
  viewFileDialog: ''
6316
6235
  });
6317
6236
  }
@@ -6326,7 +6245,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6326
6245
  key: "renderEditValueDialog",
6327
6246
  value: function renderEditValueDialog() {
6328
6247
  var _this$objects$this$ed,
6329
- _this48 = this;
6248
+ _this46 = this;
6330
6249
 
6331
6250
  if (!this.state.updateOpened || !this.props.objectBrowserValue) {
6332
6251
  return null;
@@ -6357,11 +6276,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6357
6276
  defaultHistory: this.defaultHistory,
6358
6277
  dateFormat: this.props.dateFormat,
6359
6278
  onClose: function onClose(res) {
6360
- _this48.setState({
6279
+ _this46.setState({
6361
6280
  updateOpened: false
6362
6281
  });
6363
6282
 
6364
- res && _this48.onUpdate(res);
6283
+ res && _this46.onUpdate(res);
6365
6284
  }
6366
6285
  });
6367
6286
  }
@@ -6373,7 +6292,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6373
6292
  * @returns {JSX.Element}
6374
6293
  */
6375
6294
  function render() {
6376
- var _this49 = this;
6295
+ var _this47 = this;
6377
6296
 
6378
6297
  this.recordStates = [];
6379
6298
  this.unsubscribeTimer && clearTimeout(this.unsubscribeTimer); // apply filter if changed
@@ -6388,13 +6307,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6388
6307
 
6389
6308
  if (counter.count < 500 && !this.state.expandAllVisible) {
6390
6309
  setTimeout(function () {
6391
- return _this49.setState({
6310
+ return _this47.setState({
6392
6311
  expandAllVisible: true
6393
6312
  });
6394
6313
  });
6395
6314
  } else if (counter.count >= 500 && this.state.expandAllVisible) {
6396
6315
  setTimeout(function () {
6397
- return _this49.setState({
6316
+ return _this47.setState({
6398
6317
  expandAllVisible: false
6399
6318
  });
6400
6319
  });
@@ -6404,9 +6323,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
6404
6323
  }
6405
6324
 
6406
6325
  this.unsubscribeTimer = setTimeout(function () {
6407
- _this49.unsubscribeTimer = null;
6326
+ _this47.unsubscribeTimer = null;
6408
6327
 
6409
- _this49.checkUnsubscribes();
6328
+ _this47.checkUnsubscribes();
6410
6329
  }, 200);
6411
6330
 
6412
6331
  if (!this.state.loaded) {
@@ -6494,7 +6413,17 @@ ObjectBrowser.propTypes = {
6494
6413
  onObjectDelete: _propTypes["default"].func,
6495
6414
  // optional function (id, hasChildren, objectExists) { }
6496
6415
  customFilter: _propTypes["default"].object,
6497
- // optional {common: {custom: true}} or {common: {custom: 'sql.0'}}
6416
+ // optional
6417
+ // `{common: {custom: true}}` - show only objects with some custom settings
6418
+ // `{common: {custom: 'sql.0'}}` - show only objects with sql.0 custom settings (only of the specific instance)
6419
+ // `{common: {custom: '_dataSources'}}` - show only objects of adapters `influxdb' or 'sql' or 'history'
6420
+ // `{common: {custom: 'adapterName.'}}` - show only objects of custom settings of specific adapter (all instances)
6421
+ // `{type: 'channel'}` - show only channels
6422
+ // `{type: ['channel', 'device']}` - show only channels and devices
6423
+ // `{common: {type: 'number'}` - show only states of type 'number
6424
+ // `{common: {type: ['number', 'string']}` - show only states of type 'number and string
6425
+ // `{common: {role: 'switch']}` - show only states with roles starting from switch
6426
+ // `{common: {role: ['switch', 'button]}` - show only states with roles starting from `switch` and `button`
6498
6427
  objectBrowserValue: _propTypes["default"].object,
6499
6428
  objectBrowserEditObject: _propTypes["default"].object,
6500
6429
  objectBrowserEditRole: _propTypes["default"].object,