@iobroker/adapter-react-v5 4.2.1 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/AdminConnection.js.map +1 -1
  2. package/Components/404.js +11 -14
  3. package/Components/404.js.map +1 -1
  4. package/Components/ColorPicker.js +2 -2
  5. package/Components/ColorPicker.js.map +1 -1
  6. package/Components/ComplexCron.d.ts +1 -1
  7. package/Components/ComplexCron.js +40 -50
  8. package/Components/ComplexCron.js.map +1 -1
  9. package/Components/CustomModal.js +8 -12
  10. package/Components/CustomModal.js.map +1 -1
  11. package/Components/FileBrowser.js +3 -2
  12. package/Components/FileBrowser.js.map +1 -1
  13. package/Components/FileViewer.d.ts +0 -2
  14. package/Components/FileViewer.js +25 -35
  15. package/Components/FileViewer.js.map +1 -1
  16. package/Components/Icon.d.ts +0 -2
  17. package/Components/Icon.js +37 -46
  18. package/Components/Icon.js.map +1 -1
  19. package/Components/IconPicker.js +8 -10
  20. package/Components/IconPicker.js.map +1 -1
  21. package/Components/IconSelector.js +1830 -1841
  22. package/Components/IconSelector.js.map +1 -1
  23. package/Components/Image.js +18 -17
  24. package/Components/Image.js.map +1 -1
  25. package/Components/JsonConfigComponent/ConfigTable.js +357 -38
  26. package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
  27. package/Components/Loader.js +9 -9
  28. package/Components/Loader.js.map +1 -1
  29. package/Components/Loaders/PT.js +2 -2
  30. package/Components/Loaders/PT.js.map +1 -1
  31. package/Components/Loaders/Vendor.d.ts +0 -7
  32. package/Components/Loaders/Vendor.js +1 -4
  33. package/Components/Loaders/Vendor.js.map +1 -1
  34. package/Components/Logo.js +16 -18
  35. package/Components/Logo.js.map +1 -1
  36. package/Components/MDUtils.js +2 -3
  37. package/Components/MDUtils.js.map +1 -1
  38. package/Components/ObjectBrowser.d.ts +20 -6
  39. package/Components/ObjectBrowser.js +635 -610
  40. package/Components/ObjectBrowser.js.map +1 -1
  41. package/Components/Router.d.ts +1 -1
  42. package/Components/Router.js +6 -6
  43. package/Components/Router.js.map +1 -1
  44. package/Components/SaveCloseButtons.d.ts +0 -1
  45. package/Components/SaveCloseButtons.js +17 -17
  46. package/Components/SaveCloseButtons.js.map +1 -1
  47. package/Components/Schedule.d.ts +1 -1
  48. package/Components/Schedule.js +171 -162
  49. package/Components/Schedule.js.map +1 -1
  50. package/Components/SelectWithIcon.d.ts +1 -1
  51. package/Components/SelectWithIcon.js +12 -11
  52. package/Components/SelectWithIcon.js.map +1 -1
  53. package/Components/SimpleCron/cron2text.js +71 -74
  54. package/Components/SimpleCron/cron2text.js.map +1 -1
  55. package/Components/SimpleCron/cronText.js +1 -1
  56. package/Components/SimpleCron/cronText.js.map +1 -1
  57. package/Components/SimpleCron/index.d.ts +1 -1
  58. package/Components/SimpleCron/index.js +3 -4
  59. package/Components/SimpleCron/index.js.map +1 -1
  60. package/Components/SimpleCron/jquery.cron.locale.js +77 -74
  61. package/Components/SimpleCron/jquery.cron.locale.js.map +1 -1
  62. package/Components/TabContainer.js +6 -7
  63. package/Components/TabContainer.js.map +1 -1
  64. package/Components/TabContent.js +4 -4
  65. package/Components/TabContent.js.map +1 -1
  66. package/Components/TabHeader.js +2 -2
  67. package/Components/TabHeader.js.map +1 -1
  68. package/Components/TableResize.js +6 -6
  69. package/Components/TableResize.js.map +1 -1
  70. package/Components/TextWithIcon.js +6 -3
  71. package/Components/TextWithIcon.js.map +1 -1
  72. package/Components/ToggleThemeMenu.d.ts +1 -1
  73. package/Components/ToggleThemeMenu.js +5 -8
  74. package/Components/ToggleThemeMenu.js.map +1 -1
  75. package/Components/TreeTable.js +170 -201
  76. package/Components/TreeTable.js.map +1 -1
  77. package/Components/UploadImage.js +11 -12
  78. package/Components/UploadImage.js.map +1 -1
  79. package/Components/Utils.d.ts +14 -7
  80. package/Components/Utils.js +219 -202
  81. package/Components/Utils.js.map +1 -1
  82. package/Components/copy-to-clipboard.js +8 -9
  83. package/Components/copy-to-clipboard.js.map +1 -1
  84. package/Components/withWidth.js.map +1 -1
  85. package/Connection.js.map +1 -1
  86. package/Dialogs/ComplexCron.d.ts +1 -3
  87. package/Dialogs/ComplexCron.js +2 -4
  88. package/Dialogs/ComplexCron.js.map +1 -1
  89. package/Dialogs/Confirm.d.ts +1 -1
  90. package/Dialogs/Confirm.js +2 -2
  91. package/Dialogs/Confirm.js.map +1 -1
  92. package/Dialogs/Cron.d.ts +1 -2
  93. package/Dialogs/Cron.js +10 -17
  94. package/Dialogs/Cron.js.map +1 -1
  95. package/Dialogs/Error.d.ts +0 -1
  96. package/Dialogs/Error.js +10 -24
  97. package/Dialogs/Error.js.map +1 -1
  98. package/Dialogs/Message.js.map +1 -1
  99. package/Dialogs/SelectFile.js +2 -2
  100. package/Dialogs/SelectFile.js.map +1 -1
  101. package/Dialogs/SelectID.d.ts +0 -4
  102. package/Dialogs/SelectID.js +3 -7
  103. package/Dialogs/SelectID.js.map +1 -1
  104. package/Dialogs/SimpleCron.d.ts +1 -3
  105. package/Dialogs/SimpleCron.js +3 -5
  106. package/Dialogs/SimpleCron.js.map +1 -1
  107. package/Dialogs/TextInput.d.ts +0 -1
  108. package/Dialogs/TextInput.js +9 -17
  109. package/Dialogs/TextInput.js.map +1 -1
  110. package/GenericApp.js +39 -42
  111. package/GenericApp.js.map +1 -1
  112. package/LegacyConnection.d.ts +6 -6
  113. package/LegacyConnection.js +61 -63
  114. package/LegacyConnection.js.map +1 -1
  115. package/Prompt.js.map +1 -1
  116. package/README.md +19 -10
  117. package/Theme.js +1 -1
  118. package/Theme.js.map +1 -1
  119. package/assets/devices/parseNames.js +1 -1
  120. package/assets/rooms/parseNames.js +1 -1
  121. package/i18n/de.json +12 -1
  122. package/i18n/en.json +12 -1
  123. package/i18n/es.json +12 -1
  124. package/i18n/fr.json +12 -1
  125. package/i18n/it.json +12 -1
  126. package/i18n/nl.json +12 -1
  127. package/i18n/pl.json +12 -1
  128. package/i18n/pt.json +12 -1
  129. package/i18n/ru.json +12 -1
  130. package/i18n/uk.json +12 -1
  131. package/i18n/zh-cn.json +12 -1
  132. package/i18n.d.ts +1 -1
  133. package/i18n.js +20 -18
  134. package/i18n.js.map +1 -1
  135. package/icons/IconAdapter.js.map +1 -1
  136. package/icons/IconAlias.js.map +1 -1
  137. package/icons/IconChannel.js.map +1 -1
  138. package/icons/IconClearFilter.js.map +1 -1
  139. package/icons/IconClosed.js.map +1 -1
  140. package/icons/IconCopy.js.map +1 -1
  141. package/icons/IconDevice.js.map +1 -1
  142. package/icons/IconDocument.js.map +1 -1
  143. package/icons/IconDocumentReadOnly.js.map +1 -1
  144. package/icons/IconExpert.js.map +1 -1
  145. package/icons/IconFx.js.map +1 -1
  146. package/icons/IconInstance.js.map +1 -1
  147. package/icons/IconLogout.js.map +1 -1
  148. package/icons/IconNoIcon.js.map +1 -1
  149. package/icons/IconOpen.js.map +1 -1
  150. package/icons/IconState.js.map +1 -1
  151. package/index.js +0 -1
  152. package/package.json +7 -7
@@ -19,62 +19,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
19
19
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
  var _propTypes = _interopRequireDefault(require("prop-types"));
22
- var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
22
+ var _styles = require("@mui/styles");
23
23
  var _reactInlinesvg = _interopRequireDefault(require("react-inlinesvg"));
24
- var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
25
- var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
26
- var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
27
- var _Select = _interopRequireDefault(require("@mui/material/Select"));
28
- var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
29
- var _Input = _interopRequireDefault(require("@mui/material/Input"));
30
- var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
31
- var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
32
- var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
33
- var _Snackbar = _interopRequireDefault(require("@mui/material/Snackbar"));
34
- var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
35
- var _List = _interopRequireDefault(require("@mui/material/List"));
36
- var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
37
- var _ListItemButton = _interopRequireDefault(require("@mui/material/ListItemButton"));
38
- var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
39
- var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
40
- var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
41
- var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
42
- var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
43
- var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
44
- var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
45
- var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
46
- var _Button = _interopRequireDefault(require("@mui/material/Button"));
47
- var _Fab = _interopRequireDefault(require("@mui/material/Fab"));
48
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
49
- var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
50
- var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
51
- var _Edit = _interopRequireDefault(require("@mui/icons-material/Edit"));
52
- var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
53
- var _Settings = _interopRequireDefault(require("@mui/icons-material/Settings"));
54
- var _SettingsApplications = _interopRequireDefault(require("@mui/icons-material/SettingsApplications"));
55
- var _Photo = _interopRequireDefault(require("@mui/icons-material/Photo"));
56
- var _SupervisedUserCircle = _interopRequireDefault(require("@mui/icons-material/SupervisedUserCircle"));
57
- var _CalendarToday = _interopRequireDefault(require("@mui/icons-material/CalendarToday"));
58
- var _PersonOutlined = _interopRequireDefault(require("@mui/icons-material/PersonOutlined"));
59
- var _Router = _interopRequireDefault(require("@mui/icons-material/Router"));
60
- var _Wifi = _interopRequireDefault(require("@mui/icons-material/Wifi"));
61
- var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
62
- var _Description = _interopRequireDefault(require("@mui/icons-material/Description"));
63
- var _Code = _interopRequireDefault(require("@mui/icons-material/Code"));
64
- var _ShowChart = _interopRequireDefault(require("@mui/icons-material/ShowChart"));
65
- var _ListAlt = _interopRequireDefault(require("@mui/icons-material/ListAlt"));
66
- var _ViewColumn = _interopRequireDefault(require("@mui/icons-material/ViewColumn"));
67
- var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
68
- var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
69
- var _Build = _interopRequireDefault(require("@mui/icons-material/Build"));
70
- var _Publish = _interopRequireDefault(require("@mui/icons-material/Publish"));
71
- var _Add = _interopRequireDefault(require("@mui/icons-material/Add"));
72
- var _Refresh = _interopRequireDefault(require("@mui/icons-material/Refresh"));
73
- var _LooksOne = _interopRequireDefault(require("@mui/icons-material/LooksOne"));
74
- var _RoomService = _interopRequireDefault(require("@mui/icons-material/RoomService"));
75
- var _Error = _interopRequireDefault(require("@mui/icons-material/Error"));
76
- var _WifiOff = _interopRequireDefault(require("@mui/icons-material/WifiOff"));
77
- var _TextFields = _interopRequireDefault(require("@mui/icons-material/TextFields"));
24
+ var _material = require("@mui/material");
25
+ var _iconsMaterial = require("@mui/icons-material");
78
26
  var _IconExpert = _interopRequireDefault(require("../icons/IconExpert"));
79
27
  var _IconAdapter = _interopRequireDefault(require("../icons/IconAdapter"));
80
28
  var _IconAlias = _interopRequireDefault(require("../icons/IconAlias"));
@@ -104,10 +52,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
104
52
  *
105
53
  * MIT License
106
54
  *
107
- **/ // import ListItemButton from '@mui/material/ListItemButton';
108
- // import Slider from '@mui/material/Slider';
109
- // import Typography from '@mui/material/Typography';
110
- // Icons
55
+ **/ // Icons
111
56
  // own
112
57
  var ICON_SIZE = 24;
113
58
  var ROW_HEIGHT = 32;
@@ -308,12 +253,12 @@ var styles = function styles(theme) {
308
253
  fontSize: 14
309
254
  },
310
255
  cellIdTooltipLink: {
311
- color: "#7ec2fd",
312
- "&:hover": {
313
- color: "#7ec2fd"
256
+ color: '#7ec2fd',
257
+ '&:hover': {
258
+ color: '#7ec2fd'
314
259
  },
315
- "&:visited": {
316
- color: "#7ec2fd"
260
+ '&:visited': {
261
+ color: '#7ec2fd'
317
262
  }
318
263
  },
319
264
  cellCopyButton: {
@@ -823,17 +768,15 @@ function getSelectIdIcon(objects, id, imagePrefix) {
823
768
  } else {
824
769
  return null; // '<i class="material-icons iob-list-icon">' + objects[_id_].common.icon + '</i>';
825
770
  }
771
+ } else if (aIcon.startsWith('data:image/svg')) {
772
+ src = /*#__PURE__*/_react["default"].createElement(_reactInlinesvg["default"], {
773
+ className: "iconOwn",
774
+ src: aIcon,
775
+ width: 28,
776
+ height: 28
777
+ });
826
778
  } else {
827
- if (aIcon.startsWith('data:image/svg')) {
828
- src = /*#__PURE__*/_react["default"].createElement(_reactInlinesvg["default"], {
829
- className: "iconOwn",
830
- src: aIcon,
831
- width: 28,
832
- height: 28
833
- });
834
- } else {
835
- src = aIcon;
836
- }
779
+ src = aIcon;
837
780
  }
838
781
  } else {
839
782
  var common = objects[id] && objects[id].common;
@@ -1074,11 +1017,11 @@ function getSystemIcon(objects, id, k, imagePrefix) {
1074
1017
 
1075
1018
  // system or design have special icons
1076
1019
  if (id.startsWith('_design/') || id === 'system') {
1077
- icon = /*#__PURE__*/_react["default"].createElement(_SettingsApplications["default"], {
1020
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.SettingsApplications, {
1078
1021
  className: "iconOwn"
1079
1022
  });
1080
1023
  } else if (id === '0_userdata' || id === '0_userdata.0') {
1081
- icon = /*#__PURE__*/_react["default"].createElement(_Photo["default"], {
1024
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Photo, {
1082
1025
  className: "iconOwn"
1083
1026
  });
1084
1027
  } else if (id === 'alias' || id === 'alias.0') {
@@ -1086,31 +1029,31 @@ function getSystemIcon(objects, id, k, imagePrefix) {
1086
1029
  className: "iconOwn"
1087
1030
  });
1088
1031
  } else if (id === 'system.adapter') {
1089
- icon = /*#__PURE__*/_react["default"].createElement(_SettingsApplications["default"], {
1032
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.SettingsApplications, {
1090
1033
  className: "iconOwn"
1091
1034
  });
1092
1035
  } else if (id === 'system.group') {
1093
- icon = /*#__PURE__*/_react["default"].createElement(_SupervisedUserCircle["default"], {
1036
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.SupervisedUserCircle, {
1094
1037
  className: "iconOwn"
1095
1038
  });
1096
1039
  } else if (id === 'system.user') {
1097
- icon = /*#__PURE__*/_react["default"].createElement(_PersonOutlined["default"], {
1040
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.PersonOutlined, {
1098
1041
  className: "iconOwn"
1099
1042
  });
1100
1043
  } else if (id === 'system.host') {
1101
- icon = /*#__PURE__*/_react["default"].createElement(_Router["default"], {
1044
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Router, {
1102
1045
  className: "iconOwn"
1103
1046
  });
1104
1047
  } else if (id.endsWith('.connection') || id.endsWith('.connected')) {
1105
- icon = /*#__PURE__*/_react["default"].createElement(_Wifi["default"], {
1048
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Wifi, {
1106
1049
  className: "iconOwn"
1107
1050
  });
1108
1051
  } else if (id.endsWith('.info')) {
1109
- icon = /*#__PURE__*/_react["default"].createElement(_Info["default"], {
1052
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Info, {
1110
1053
  className: "iconOwn"
1111
1054
  });
1112
1055
  } else if (objects[id] && objects[id].type === 'meta') {
1113
- icon = /*#__PURE__*/_react["default"].createElement(_Description["default"], {
1056
+ icon = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Description, {
1114
1057
  className: "iconOwn"
1115
1058
  });
1116
1059
  } else if (k < 2) {
@@ -1149,11 +1092,10 @@ function getIdFieldTooltip(data, classes, lang) {
1149
1092
  target: "_blank",
1150
1093
  rel: "noreferrer"
1151
1094
  }, tooltip);
1152
- } else {
1153
- return /*#__PURE__*/_react["default"].createElement("span", {
1154
- className: _Utils["default"].clsx(classes.cellIdTooltip)
1155
- }, tooltip || data.id || '');
1156
1095
  }
1096
+ return /*#__PURE__*/_react["default"].createElement("span", {
1097
+ className: _Utils["default"].clsx(classes.cellIdTooltip)
1098
+ }, tooltip || data.id || '');
1157
1099
  }
1158
1100
  function buildTree(objects, options) {
1159
1101
  options = options || {};
@@ -1487,13 +1429,26 @@ function quality2text(q) {
1487
1429
  }
1488
1430
  */
1489
1431
 
1490
- function formatValue(id, state, obj, texts, dateFormat, isFloatComma) {
1432
+ /** @typedef {{ state: ioBroker.State, obj: Record<string, any>, texts: Record<string, any>, dateFormat: any, isFloatComma: boolean }} FormatValueOptions */
1433
+
1434
+ /**
1435
+ * Format a state value for visualization
1436
+ *
1437
+ * @param {FormatValueOptions} options
1438
+ * @return {{valText: {}, valFull: [{t: (*|String), v: (string|*)}] }}
1439
+ */
1440
+ function formatValue(options) {
1441
+ var dateFormat = options.dateFormat,
1442
+ obj = options.obj,
1443
+ state = options.state,
1444
+ isFloatComma = options.isFloatComma,
1445
+ texts = options.texts;
1491
1446
  var states = _Utils["default"].getStates(obj);
1492
1447
  var isCommon = obj.common;
1493
1448
  var valText = {};
1494
1449
  var v = isCommon && isCommon.type === 'file' ? '[file]' : !state || state.val === null ? '(null)' : state.val === undefined ? '[undef]' : state.val;
1495
1450
  var type = (0, _typeof2["default"])(v);
1496
- if (isCommon && isCommon.role && typeof isCommon.role === 'string' && isCommon.role.match(/^value\.time|^date/)) {
1451
+ if (isCommon !== null && isCommon !== void 0 && isCommon.role && typeof isCommon.role === 'string' && isCommon.role.match(/^value\.time|^date/)) {
1497
1452
  if (v && typeof v === 'string') {
1498
1453
  if (v.length === 13) {
1499
1454
  // (length of "1647597254924") warning, this solution only works till Nov 20 2286 18:46:39CET
@@ -1532,7 +1487,7 @@ function formatValue(id, state, obj, texts, dateFormat, isFloatComma) {
1532
1487
  v = states[v];
1533
1488
  }
1534
1489
  }
1535
- if (isCommon && isCommon.unit) {
1490
+ if (isCommon !== null && isCommon !== void 0 && isCommon.unit) {
1536
1491
  valText.u = isCommon.unit;
1537
1492
  }
1538
1493
  var valFull = [{
@@ -1593,10 +1548,28 @@ function formatValue(id, state, obj, texts, dateFormat, isFloatComma) {
1593
1548
  valText.v = v;
1594
1549
  return {
1595
1550
  valText: valText,
1596
- valFull: valFull,
1597
- style: {
1598
- color: state !== null && state !== void 0 && state.ack ? state.q ? '#ffa500' : '' : '#ff2222c9'
1599
- }
1551
+ valFull: valFull
1552
+ };
1553
+ }
1554
+
1555
+ /** @typedef {{ state: ioBroker.State, isExpertMode: boolean, isButton: boolean }} GetValueStyleOptions */
1556
+
1557
+ /**
1558
+ * Get css style for given state value
1559
+ *
1560
+ * @param {GetValueStyleOptions} options
1561
+ * @return {{color: (string)}}
1562
+ */
1563
+ function getValueStyle(options) {
1564
+ var state = options.state,
1565
+ isExpertMode = options.isExpertMode,
1566
+ isButton = options.isButton;
1567
+ var color = state !== null && state !== void 0 && state.ack ? state.q ? '#ffa500' : '' : '#ff2222c9';
1568
+ if (!isExpertMode && isButton) {
1569
+ color = '';
1570
+ }
1571
+ return {
1572
+ color: color
1600
1573
  };
1601
1574
  }
1602
1575
  function prepareSparkData(values, from) {
@@ -1655,7 +1628,7 @@ var ITEM_IMAGES = {
1655
1628
  adapter: /*#__PURE__*/_react["default"].createElement(_IconAdapter["default"], {
1656
1629
  className: "itemIcon"
1657
1630
  }),
1658
- meta: /*#__PURE__*/_react["default"].createElement(_Description["default"], {
1631
+ meta: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Description, {
1659
1632
  className: "itemIcon"
1660
1633
  }),
1661
1634
  instance: /*#__PURE__*/_react["default"].createElement(_IconInstance["default"], {
@@ -1664,35 +1637,35 @@ var ITEM_IMAGES = {
1664
1637
  color: '#7da7ff'
1665
1638
  }
1666
1639
  }),
1667
- "enum": /*#__PURE__*/_react["default"].createElement(_ListAlt["default"], {
1640
+ "enum": /*#__PURE__*/_react["default"].createElement(_iconsMaterial.ListAlt, {
1668
1641
  className: "itemIcon"
1669
1642
  }),
1670
- chart: /*#__PURE__*/_react["default"].createElement(_ShowChart["default"], {
1643
+ chart: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.ShowChart, {
1671
1644
  className: "itemIcon"
1672
1645
  }),
1673
- config: /*#__PURE__*/_react["default"].createElement(_Settings["default"], {
1646
+ config: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Settings, {
1674
1647
  className: "itemIcon"
1675
1648
  }),
1676
- group: /*#__PURE__*/_react["default"].createElement(_SupervisedUserCircle["default"], {
1649
+ group: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.SupervisedUserCircle, {
1677
1650
  className: "itemIcon"
1678
1651
  }),
1679
- user: /*#__PURE__*/_react["default"].createElement(_PersonOutlined["default"], {
1652
+ user: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.PersonOutlined, {
1680
1653
  className: "itemIcon"
1681
1654
  }),
1682
- host: /*#__PURE__*/_react["default"].createElement(_Router["default"], {
1655
+ host: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Router, {
1683
1656
  className: "itemIcon"
1684
1657
  }),
1685
- schedule: /*#__PURE__*/_react["default"].createElement(_CalendarToday["default"], {
1658
+ schedule: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.CalendarToday, {
1686
1659
  className: "itemIcon"
1687
1660
  }),
1688
- script: /*#__PURE__*/_react["default"].createElement(_Code["default"], {
1661
+ script: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Code, {
1689
1662
  className: "itemIcon"
1690
1663
  }),
1691
1664
  folder: /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
1692
1665
  className: "itemIcon itemIconFolder"
1693
1666
  })
1694
1667
  };
1695
- var StyledBadge = (0, _withStyles["default"])(function (theme) {
1668
+ var StyledBadge = (0, _styles.withStyles)(function (theme) {
1696
1669
  return {
1697
1670
  badge: {
1698
1671
  right: 3,
@@ -1701,7 +1674,7 @@ var StyledBadge = (0, _withStyles["default"])(function (theme) {
1701
1674
  padding: '0 4px'
1702
1675
  }
1703
1676
  };
1704
- })(_Badge["default"]);
1677
+ })(_material.Badge);
1705
1678
  var SCREEN_WIDTHS = {
1706
1679
  // extra-small: 0px
1707
1680
  xs: {
@@ -1912,59 +1885,63 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
1912
1885
  */
1913
1886
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_createAllEnums", /*#__PURE__*/function () {
1914
1887
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(enums, objId) {
1915
- var e, _enObj$common, id, _enObj, enObj;
1888
+ var e, _oldObj$common, id, newObj, oldObj;
1916
1889
  return _regenerator["default"].wrap(function _callee$(_context) {
1917
1890
  while (1) switch (_context.prev = _context.next) {
1918
1891
  case 0:
1919
1892
  e = 0;
1920
1893
  case 1:
1921
1894
  if (!(e < enums.length)) {
1922
- _context.next = 24;
1895
+ _context.next = 26;
1923
1896
  break;
1924
1897
  }
1925
1898
  id = enums[e];
1926
- _enObj = void 0;
1899
+ newObj = void 0; // some admin version delivered enums as string
1927
1900
  if ((0, _typeof2["default"])(id) === 'object') {
1928
- _enObj = id;
1901
+ newObj = id;
1929
1902
  id = id._id;
1930
1903
  }
1931
- enObj = _this.objects[id];
1932
- if (enObj) {
1933
- _context.next = 14;
1904
+ oldObj = _this.objects[id]; // if enum does not exist
1905
+ if (oldObj) {
1906
+ _context.next = 15;
1934
1907
  break;
1935
1908
  }
1936
- enObj = _enObj || {
1909
+ // create a new one
1910
+ oldObj = newObj || {
1937
1911
  _id: id,
1938
1912
  common: {
1939
1913
  name: id.split('.').pop(),
1940
1914
  members: []
1941
1915
  },
1942
- "native": {}
1916
+ "native": {},
1917
+ type: 'enum'
1943
1918
  };
1944
- enObj.common = enObj.common || {};
1945
- enObj.common.members = [objId];
1946
- _context.next = 12;
1947
- return _this.props.socket.setObject(id, enObj);
1948
- case 12:
1949
- _context.next = 21;
1919
+ oldObj.common = oldObj.common || {};
1920
+ oldObj.common.members = [objId];
1921
+ oldObj.type = 'enum';
1922
+ _context.next = 13;
1923
+ return _this.props.socket.setObject(id, oldObj);
1924
+ case 13:
1925
+ _context.next = 23;
1950
1926
  break;
1951
- case 14:
1952
- if ((_enObj$common = enObj.common) !== null && _enObj$common !== void 0 && (_enObj$common = _enObj$common.members) !== null && _enObj$common !== void 0 && _enObj$common.includes(objId)) {
1953
- _context.next = 21;
1927
+ case 15:
1928
+ if ((_oldObj$common = oldObj.common) !== null && _oldObj$common !== void 0 && (_oldObj$common = _oldObj$common.members) !== null && _oldObj$common !== void 0 && _oldObj$common.includes(objId)) {
1929
+ _context.next = 23;
1954
1930
  break;
1955
1931
  }
1956
- enObj.common = enObj.common || {};
1957
- enObj.common.members = enObj.common.members || [];
1958
- // add missing object
1959
- enObj.common.members.push(objId);
1960
- enObj.common.members.sort();
1961
- _context.next = 21;
1962
- return _this.props.socket.setObject(id, enObj);
1963
- case 21:
1932
+ oldObj.common = oldObj.common || {};
1933
+ oldObj.type = 'enum';
1934
+ oldObj.common.members = oldObj.common.members || [];
1935
+ // add the missing object
1936
+ oldObj.common.members.push(objId);
1937
+ oldObj.common.members.sort();
1938
+ _context.next = 23;
1939
+ return _this.props.socket.setObject(id, oldObj);
1940
+ case 23:
1964
1941
  e++;
1965
1942
  _context.next = 1;
1966
1943
  break;
1967
- case 24:
1944
+ case 26:
1968
1945
  case "end":
1969
1946
  return _context.stop();
1970
1947
  }
@@ -2441,16 +2418,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2441
2418
  (window._localStorage || window.localStorage).removeItem("".concat(_this.props.dialogName || 'App', ".table"));
2442
2419
  _this.forceUpdate();
2443
2420
  });
2444
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "extendObject", function (id, data) {
2445
- return _this.props.socket.extendObject(id, data)["catch"](function (error) {
2446
- return window.alert(error);
2447
- });
2448
- });
2449
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setObject", function (id, data) {
2450
- return _this.props.socket.setObject(id, data)["catch"](function (error) {
2451
- return window.alert(error);
2452
- });
2453
- });
2454
2421
  _this.lastSelectedItems = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".objectSelected")) || '[]';
2455
2422
  try {
2456
2423
  _this.lastSelectedItems = JSON.parse(_this.lastSelectedItems);
@@ -2744,7 +2711,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2744
2711
  var node = _this2.state.selected && _this2.state.selected.length && findNode(_this2.root, _this2.state.selected[0]);
2745
2712
  _this2.lastAppliedFilter = null;
2746
2713
 
2747
- // If selected ID is not visible, reset filter
2714
+ // If the selected ID is not visible, reset filter
2748
2715
  if (node && !applyFilter(node, _this2.state.filter, _this2.props.lang, _this2.objects, null, null, props.customFilter, props.types)) {
2749
2716
  // reset filter
2750
2717
  _this2.setState({
@@ -2778,7 +2745,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2778
2745
 
2779
2746
  /**
2780
2747
  * @private
2781
- * @param {ioBroker.EmptyCallback} cb
2748
+ * @param {ioBroker.EmptyCallback?} cb
2782
2749
  */
2783
2750
  }, {
2784
2751
  key: "expandAllSelected",
@@ -2847,25 +2814,38 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2847
2814
  /**
2848
2815
  * Called when component is mounted.
2849
2816
  */
2850
- function componentDidMount() {
2851
- var _this4 = this;
2852
- this.loadAllObjects(!objectsAlreadyLoaded).then(function () {
2853
- if (_this4.props.objectsWorker) {
2854
- _this4.props.objectsWorker.registerHandler(_this4.onObjectChange);
2855
- } else {
2856
- _this4.props.socket.subscribeObject('*', _this4.onObjectChange);
2857
- }
2858
- objectsAlreadyLoaded = true;
2859
- });
2860
- }
2861
-
2817
+ function () {
2818
+ var _componentDidMount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
2819
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
2820
+ while (1) switch (_context4.prev = _context4.next) {
2821
+ case 0:
2822
+ _context4.next = 2;
2823
+ return this.loadAllObjects(!objectsAlreadyLoaded);
2824
+ case 2:
2825
+ if (this.props.objectsWorker) {
2826
+ this.props.objectsWorker.registerHandler(this.onObjectChange);
2827
+ } else {
2828
+ this.props.socket.subscribeObject('*', this.onObjectChange);
2829
+ }
2830
+ objectsAlreadyLoaded = true;
2831
+ case 4:
2832
+ case "end":
2833
+ return _context4.stop();
2834
+ }
2835
+ }, _callee4, this);
2836
+ }));
2837
+ function componentDidMount() {
2838
+ return _componentDidMount.apply(this, arguments);
2839
+ }
2840
+ return componentDidMount;
2841
+ }()
2862
2842
  /**
2863
2843
  * Called when component is unmounted.
2864
2844
  */
2865
2845
  }, {
2866
2846
  key: "componentWillUnmount",
2867
2847
  value: function componentWillUnmount() {
2868
- var _this5 = this;
2848
+ var _this4 = this;
2869
2849
  this.filterTimer && clearTimeout(this.filterTimer);
2870
2850
  this.filterTimer = null;
2871
2851
  if (this.props.objectsWorker) {
@@ -2877,7 +2857,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2877
2857
  // remove all subscribes
2878
2858
  this.subscribes.forEach(function (pattern) {
2879
2859
  console.log("- unsubscribe ".concat(pattern));
2880
- _this5.props.socket.unsubscribeState(pattern, _this5.onStateChange);
2860
+ _this4.props.socket.unsubscribeState(pattern, _this4.onStateChange);
2881
2861
  });
2882
2862
  this.subscribes = [];
2883
2863
  this.objects = {};
@@ -2889,11 +2869,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2889
2869
  }, {
2890
2870
  key: "refreshComponent",
2891
2871
  value: function refreshComponent() {
2892
- var _this6 = this;
2872
+ var _this5 = this;
2893
2873
  // remove all subscribes
2894
2874
  this.subscribes.forEach(function (pattern) {
2895
2875
  console.log("- unsubscribe ".concat(pattern));
2896
- _this6.props.socket.unsubscribeState(pattern, _this6.onStateChange);
2876
+ _this5.props.socket.unsubscribeState(pattern, _this5.onStateChange);
2897
2877
  });
2898
2878
  this.subscribes = [];
2899
2879
  this.loadAllObjects(true).then(function () {
@@ -2908,32 +2888,32 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2908
2888
  }, {
2909
2889
  key: "renderErrorDialog",
2910
2890
  value: function renderErrorDialog() {
2911
- var _this7 = this;
2912
- return this.state.error ? /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
2891
+ var _this6 = this;
2892
+ return this.state.error ? /*#__PURE__*/_react["default"].createElement(_material.Dialog, {
2913
2893
  open: !0,
2914
2894
  maxWidth: "sm",
2915
2895
  fullWidth: true,
2916
2896
  onClose: function onClose() {
2917
- return _this7.setState({
2897
+ return _this6.setState({
2918
2898
  error: ''
2919
2899
  });
2920
2900
  },
2921
2901
  "aria-labelledby": "error-dialog-title",
2922
2902
  "aria-describedby": "error-dialog-description"
2923
- }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
2903
+ }, /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, {
2924
2904
  id: "alert-dialog-title"
2925
- }, this.props.title || this.props.t('ra_Error')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
2905
+ }, this.props.title || this.props.t('ra_Error')), /*#__PURE__*/_react["default"].createElement(_material.DialogContent, null, /*#__PURE__*/_react["default"].createElement(_material.DialogContentText, {
2926
2906
  id: "alert-dialog-description"
2927
- }, this.state.error)), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
2907
+ }, this.state.error)), /*#__PURE__*/_react["default"].createElement(_material.DialogActions, null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
2928
2908
  variant: "contained",
2929
2909
  onClick: function onClick() {
2930
- return _this7.setState({
2910
+ return _this6.setState({
2931
2911
  error: ''
2932
2912
  });
2933
2913
  },
2934
2914
  color: "primary",
2935
2915
  autoFocus: true,
2936
- startIcon: /*#__PURE__*/_react["default"].createElement(_Check["default"], null)
2916
+ startIcon: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Check, null)
2937
2917
  }, this.props.t('ra_Ok')))) : null;
2938
2918
  }
2939
2919
 
@@ -2957,7 +2937,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2957
2937
  }, {
2958
2938
  key: "onSelect",
2959
2939
  value: function onSelect(toggleItem, isDouble) {
2960
- var _this8 = this;
2940
+ var _this7 = this;
2961
2941
  if (!this.props.multiSelect) {
2962
2942
  if (this.objects[toggleItem] && (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))) {
2963
2943
  (window._localStorage || window.localStorage).removeItem("".concat(this.props.dialogName || 'App', ".selectedNonObject"));
@@ -2966,7 +2946,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2966
2946
  selected: [toggleItem],
2967
2947
  selectedNonObject: ''
2968
2948
  }, function () {
2969
- return _this8.onAfterSelect(isDouble);
2949
+ return _this7.onAfterSelect(isDouble);
2970
2950
  });
2971
2951
  } else if (isDouble && this.props.onSelect) {
2972
2952
  this.onAfterSelect(isDouble);
@@ -2977,7 +2957,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2977
2957
  selected: [],
2978
2958
  selectedNonObject: toggleItem
2979
2959
  }, function () {
2980
- return _this8.onAfterSelect();
2960
+ return _this7.onAfterSelect();
2981
2961
  });
2982
2962
  }
2983
2963
  } else if (this.objects[toggleItem] && (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))) {
@@ -2994,7 +2974,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
2994
2974
  selected: selected,
2995
2975
  selectedNonObject: ''
2996
2976
  }, function () {
2997
- return _this8.onAfterSelect(isDouble);
2977
+ return _this7.onAfterSelect(isDouble);
2998
2978
  });
2999
2979
  }
3000
2980
  }
@@ -3006,7 +2986,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3006
2986
  }, {
3007
2987
  key: "_renderDefinedList",
3008
2988
  value: function _renderDefinedList(isLast) {
3009
- var _this9 = this;
2989
+ var _this8 = this;
3010
2990
  var cols = (0, _toConsumableArray2["default"])(this.possibleCols);
3011
2991
  cols.unshift('id');
3012
2992
  if (this.props.columns && !this.props.columns.includes('buttons')) {
@@ -3018,10 +2998,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3018
2998
  return cols.filter(function (id) {
3019
2999
  return isLast && (id === 'val' || id === 'buttons') || !isLast && id !== 'val' && id !== 'buttons';
3020
3000
  }).map(function (id) {
3021
- return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
3001
+ return /*#__PURE__*/_react["default"].createElement(_material.ListItemButton, {
3022
3002
  onClick: function onClick() {
3023
- if (!_this9.state.columnsAuto && id !== 'id') {
3024
- var columns = (0, _toConsumableArray2["default"])(_this9.state.columns || []);
3003
+ if (!_this8.state.columnsAuto && id !== 'id') {
3004
+ var columns = (0, _toConsumableArray2["default"])(_this8.state.columns || []);
3025
3005
  var _pos = columns.indexOf(id);
3026
3006
  if (_pos === -1) {
3027
3007
  columns.push(id);
@@ -3029,21 +3009,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3029
3009
  } else {
3030
3010
  columns.splice(_pos, 1);
3031
3011
  }
3032
- (window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
3033
- _this9.calculateColumnsVisibility(null, columns);
3034
- _this9.setState({
3012
+ (window._localStorage || window.localStorage).setItem("".concat(_this8.props.dialogName || 'App', ".columns"), JSON.stringify(columns));
3013
+ _this8.calculateColumnsVisibility(null, columns);
3014
+ _this8.setState({
3035
3015
  columns: columns
3036
3016
  });
3037
3017
  }
3038
3018
  },
3039
3019
  key: id
3040
- }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3020
+ }, /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
3041
3021
  edge: "start",
3042
- disabled: id === 'id' || _this9.state.columnsAuto,
3043
- checked: id === 'id' || (_this9.state.columnsAuto ? _this9.visibleCols.includes(id) : _this9.state.columns && _this9.state.columns.includes(id)),
3022
+ disabled: id === 'id' || _this8.state.columnsAuto,
3023
+ checked: id === 'id' || (_this8.state.columnsAuto ? _this8.visibleCols.includes(id) : _this8.state.columns && _this8.state.columns.includes(id)),
3044
3024
  disableRipple: true
3045
- }), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3046
- primary: _this9.texts['filter_' + id] || _this9.props.t('ra_' + id)
3025
+ }), /*#__PURE__*/_react["default"].createElement(_material.ListItemText, {
3026
+ primary: _this8.texts["filter_".concat(id)] || _this8.props.t("ra_".concat(id))
3047
3027
  }));
3048
3028
  });
3049
3029
  }
@@ -3055,13 +3035,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3055
3035
  }, {
3056
3036
  key: "renderColumnsSelectorDialog",
3057
3037
  value: function renderColumnsSelectorDialog() {
3058
- var _this10 = this;
3038
+ var _this9 = this;
3059
3039
  if (!this.state.columnsSelectorShow) {
3060
3040
  return null;
3061
3041
  }
3062
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
3042
+ return /*#__PURE__*/_react["default"].createElement(_material.Dialog, {
3063
3043
  onClose: function onClose() {
3064
- return _this10.setState({
3044
+ return _this9.setState({
3065
3045
  columnsSelectorShow: false
3066
3046
  });
3067
3047
  },
@@ -3069,68 +3049,66 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3069
3049
  classes: {
3070
3050
  root: _Utils["default"].clsx(this.props.classes.dialogColumns, this.props.classes["transparent_".concat(this.state.columnsDialogTransparent)])
3071
3051
  }
3072
- }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
3052
+ }, /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, {
3073
3053
  className: this.props.classes.fontSizeTitle
3074
- }, this.props.t('ra_Configure')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], {
3054
+ }, this.props.t('ra_Configure')), /*#__PURE__*/_react["default"].createElement(_material.DialogContent, {
3075
3055
  className: this.props.classes.fontSizeTitle
3076
- }, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3056
+ }, /*#__PURE__*/_react["default"].createElement(_material.FormControlLabel, {
3077
3057
  className: this.props.classes.switchColumnAuto,
3078
- control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3058
+ control: /*#__PURE__*/_react["default"].createElement(_material.Switch, {
3079
3059
  checked: this.state.foldersFirst,
3080
3060
  onChange: function onChange() {
3081
- (window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".foldersFirst"), _this10.state.foldersFirst ? 'false' : 'true');
3082
- _this10.setState({
3083
- foldersFirst: !_this10.state.foldersFirst
3061
+ (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".foldersFirst"), _this9.state.foldersFirst ? 'false' : 'true');
3062
+ _this9.setState({
3063
+ foldersFirst: !_this9.state.foldersFirst
3084
3064
  });
3085
3065
  }
3086
3066
  }),
3087
3067
  label: this.props.t('ra_Folders always first')
3088
- }), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3068
+ }), /*#__PURE__*/_react["default"].createElement(_material.FormControlLabel, {
3089
3069
  className: this.props.classes.switchColumnAuto,
3090
- control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3070
+ control: /*#__PURE__*/_react["default"].createElement(_material.Switch, {
3091
3071
  checked: this.state.linesEnabled,
3092
3072
  onChange: function onChange() {
3093
- (window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".lines"), _this10.state.linesEnabled ? 'false' : 'true');
3094
- _this10.setState({
3095
- linesEnabled: !_this10.state.linesEnabled
3073
+ (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".lines"), _this9.state.linesEnabled ? 'false' : 'true');
3074
+ _this9.setState({
3075
+ linesEnabled: !_this9.state.linesEnabled
3096
3076
  });
3097
3077
  }
3098
3078
  }),
3099
3079
  label: this.props.t('ra_Show lines between rows')
3100
- }), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
3080
+ }), /*#__PURE__*/_react["default"].createElement(_material.FormControlLabel, {
3101
3081
  className: this.props.classes.switchColumnAuto,
3102
- control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
3082
+ control: /*#__PURE__*/_react["default"].createElement(_material.Switch, {
3103
3083
  checked: this.state.columnsAuto,
3104
3084
  onChange: function onChange() {
3105
- (window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
3106
- if (!_this10.state.columnsAuto) {
3107
- _this10.calculateColumnsVisibility(true);
3108
- _this10.setState({
3085
+ (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".columnsAuto"), _this9.state.columnsAuto ? 'false' : 'true');
3086
+ if (!_this9.state.columnsAuto) {
3087
+ _this9.calculateColumnsVisibility(true);
3088
+ _this9.setState({
3109
3089
  columnsAuto: true
3110
3090
  });
3091
+ } else if (!_this9.state.columns) {
3092
+ _this9.calculateColumnsVisibility(false, (0, _toConsumableArray2["default"])(_this9.visibleCols));
3093
+ _this9.setState({
3094
+ columnsAuto: false,
3095
+ columns: (0, _toConsumableArray2["default"])(_this9.visibleCols)
3096
+ });
3111
3097
  } else {
3112
- if (!_this10.state.columns) {
3113
- _this10.calculateColumnsVisibility(false, (0, _toConsumableArray2["default"])(_this10.visibleCols));
3114
- _this10.setState({
3115
- columnsAuto: false,
3116
- columns: (0, _toConsumableArray2["default"])(_this10.visibleCols)
3117
- });
3118
- } else {
3119
- _this10.calculateColumnsVisibility(false);
3120
- _this10.setState({
3121
- columnsAuto: false
3122
- });
3123
- }
3098
+ _this9.calculateColumnsVisibility(false);
3099
+ _this9.setState({
3100
+ columnsAuto: false
3101
+ });
3124
3102
  }
3125
3103
  }
3126
3104
  }),
3127
3105
  label: this.props.t('ra_Auto (no custom columns)')
3128
- }), /*#__PURE__*/_react["default"].createElement(_List["default"], null, this._renderDefinedList(false), this.state.columnsForAdmin && Object.keys(this.state.columnsForAdmin).sort().map(function (adapter) {
3129
- return _this10.state.columnsForAdmin[adapter].map(function (column) {
3130
- return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
3106
+ }), /*#__PURE__*/_react["default"].createElement(_material.List, null, this._renderDefinedList(false), this.state.columnsForAdmin && Object.keys(this.state.columnsForAdmin).sort().map(function (adapter) {
3107
+ return _this9.state.columnsForAdmin[adapter].map(function (column) {
3108
+ return /*#__PURE__*/_react["default"].createElement(_material.ListItemButton, {
3131
3109
  onClick: function onClick() {
3132
- if (!_this10.state.columnsAuto) {
3133
- var columns = (0, _toConsumableArray2["default"])(_this10.state.columns || []);
3110
+ if (!_this9.state.columnsAuto) {
3111
+ var columns = (0, _toConsumableArray2["default"])(_this9.state.columns || []);
3134
3112
  var id = "_".concat(adapter, "_").concat(column.path);
3135
3113
  var pos = columns.indexOf(id);
3136
3114
  if (pos === -1) {
@@ -3139,32 +3117,32 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3139
3117
  } else {
3140
3118
  columns.splice(pos, 1);
3141
3119
  }
3142
- _this10.calculateColumnsVisibility(null, columns);
3143
- (window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".columns"), JSON.stringify(columns));
3144
- _this10.setState({
3120
+ _this9.calculateColumnsVisibility(null, columns);
3121
+ (window._localStorage || window.localStorage).setItem("".concat(_this9.props.dialogName || 'App', ".columns"), JSON.stringify(columns));
3122
+ _this9.setState({
3145
3123
  columns: columns
3146
3124
  });
3147
3125
  }
3148
3126
  },
3149
3127
  key: "".concat(adapter, "_").concat(column.name)
3150
- }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], null, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
3151
- disabled: _this10.state.columnsAuto,
3128
+ }, /*#__PURE__*/_react["default"].createElement(_material.ListItemIcon, null, /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
3129
+ disabled: _this9.state.columnsAuto,
3152
3130
  edge: "start",
3153
- checked: !_this10.state.columnsAuto && _this10.state.columns && _this10.state.columns.includes("_".concat(adapter, "_").concat(column.path)),
3131
+ checked: !_this9.state.columnsAuto && _this9.state.columns && _this9.state.columns.includes("_".concat(adapter, "_").concat(column.path)),
3154
3132
  disableRipple: true
3155
- })), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
3133
+ })), /*#__PURE__*/_react["default"].createElement(_material.ListItemText, {
3156
3134
  primary: "".concat(column.name, " (").concat(adapter, ")")
3157
3135
  }));
3158
3136
  });
3159
- }), this._renderDefinedList(true))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3137
+ }), this._renderDefinedList(true))), /*#__PURE__*/_react["default"].createElement(_material.DialogActions, null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
3160
3138
  variant: "contained",
3161
3139
  onClick: function onClick() {
3162
- return _this10.setState({
3140
+ return _this9.setState({
3163
3141
  columnsSelectorShow: false
3164
3142
  });
3165
3143
  },
3166
3144
  color: "primary",
3167
- startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
3145
+ startIcon: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null)
3168
3146
  }, this.texts.close)));
3169
3147
  }
3170
3148
 
@@ -3174,12 +3152,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3174
3152
  }, {
3175
3153
  key: "getAdditionalColumns",
3176
3154
  value: function getAdditionalColumns() {
3177
- var _this11 = this;
3155
+ var _this10 = this;
3178
3156
  return this.props.socket.getAdapters().then(function (instances) {
3179
3157
  var columnsForAdmin = null;
3180
3158
  // find all additional columns
3181
3159
  instances.forEach(function (obj) {
3182
- return columnsForAdmin = _this11.parseObjectForAdmins(columnsForAdmin, obj);
3160
+ return columnsForAdmin = _this10.parseObjectForAdmins(columnsForAdmin, obj);
3183
3161
  });
3184
3162
  return columnsForAdmin;
3185
3163
  })["catch"](function () {
@@ -3244,7 +3222,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3244
3222
  * @param {any} obj
3245
3223
  */
3246
3224
  function parseObjectForAdmins(columnsForAdmin, obj) {
3247
- var _this12 = this;
3225
+ var _this11 = this;
3248
3226
  if (obj.common && obj.common.adminColumns && obj.common.name) {
3249
3227
  var columns = obj.common.adminColumns;
3250
3228
  if ((0, _typeof2["default"])(columns) !== 'object') {
@@ -3290,7 +3268,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3290
3268
  }
3291
3269
  return {
3292
3270
  path: item.path,
3293
- name: item.name[_this12.props.lang] || item.name.en,
3271
+ name: item.name[_this11.props.lang] || item.name.en,
3294
3272
  width: item.width,
3295
3273
  edit: !!item.edit,
3296
3274
  type: item.type,
@@ -3353,16 +3331,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3353
3331
  }, {
3354
3332
  key: "pauseSubscribe",
3355
3333
  value: function pauseSubscribe(isPause) {
3356
- var _this13 = this;
3334
+ var _this12 = this;
3357
3335
  if (!this.pausedSubscribes && isPause) {
3358
3336
  this.pausedSubscribes = true;
3359
3337
  this.subscribes.forEach(function (id) {
3360
- return _this13.props.socket.unsubscribeState(id, _this13.onStateChange);
3338
+ return _this12.props.socket.unsubscribeState(id, _this12.onStateChange);
3361
3339
  });
3362
3340
  } else if (this.pausedSubscribes && !isPause) {
3363
3341
  this.pausedSubscribes = false;
3364
3342
  this.subscribes.forEach(function (id) {
3365
- return _this13.props.socket.subscribeState(id, _this13.onStateChange);
3343
+ return _this12.props.socket.subscribeState(id, _this12.onStateChange);
3366
3344
  });
3367
3345
  }
3368
3346
  }
@@ -3375,14 +3353,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3375
3353
  }, {
3376
3354
  key: "onFilter",
3377
3355
  value: function onFilter(name, value) {
3378
- var _this14 = this;
3356
+ var _this13 = this;
3379
3357
  this.filterTimer = null;
3380
3358
  var filter = _objectSpread({}, this.state.filter);
3381
3359
  Object.keys(this.filterRefs).forEach(function (_name) {
3382
- if (_this14.filterRefs[_name] && _this14.filterRefs[_name].current) {
3383
- for (var i = 0; i < _this14.filterRefs[_name].current.children.length; i++) {
3384
- if (_this14.filterRefs[_name].current.children[i].tagName === 'INPUT') {
3385
- filter[_name] = _this14.filterRefs[_name].current.children[i].value;
3360
+ if (_this13.filterRefs[_name] && _this13.filterRefs[_name].current) {
3361
+ for (var i = 0; i < _this13.filterRefs[_name].current.children.length; i++) {
3362
+ if (_this13.filterRefs[_name].current.children[i].tagName === 'INPUT') {
3363
+ filter[_name] = _this13.filterRefs[_name].current.children[i].value;
3386
3364
  break;
3387
3365
  }
3388
3366
  }
@@ -3399,19 +3377,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3399
3377
  this.setState({
3400
3378
  filter: filter
3401
3379
  }, function () {
3402
- return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3380
+ return _this13.props.onFilterChanged && _this13.props.onFilterChanged(filter);
3403
3381
  });
3404
3382
  }
3405
3383
  }
3406
3384
  }, {
3407
3385
  key: "clearFilter",
3408
3386
  value: function clearFilter() {
3409
- var _this15 = this;
3387
+ var _this14 = this;
3410
3388
  var filter = _objectSpread({}, this.state.filter);
3411
3389
  Object.keys(this.filterRefs).forEach(function (name) {
3412
- if (_this15.filterRefs[name] && _this15.filterRefs[name].current) {
3413
- for (var i = 0; i < _this15.filterRefs[name].current.childNodes.length; i++) {
3414
- var item = _this15.filterRefs[name].current.childNodes[i];
3390
+ if (_this14.filterRefs[name] && _this14.filterRefs[name].current) {
3391
+ for (var i = 0; i < _this14.filterRefs[name].current.childNodes.length; i++) {
3392
+ var item = _this14.filterRefs[name].current.childNodes[i];
3415
3393
  if (item.tagName === 'INPUT') {
3416
3394
  filter[name] = '';
3417
3395
  item.value = '';
@@ -3426,16 +3404,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3426
3404
  filter: filter,
3427
3405
  filterKey: this.state.filterKey + 1
3428
3406
  }, function () {
3429
- return _this15.props.onFilterChanged && _this15.props.onFilterChanged(filter);
3407
+ return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
3430
3408
  });
3431
3409
  }
3432
3410
  }
3433
3411
  }, {
3434
3412
  key: "isFilterEmpty",
3435
3413
  value: function isFilterEmpty() {
3436
- var _this16 = this;
3414
+ var _this15 = this;
3437
3415
  var someNotEmpty = Object.keys(this.state.filter).find(function (attr) {
3438
- return attr !== 'expertMode' && _this16.state.filter[attr];
3416
+ return attr !== 'expertMode' && _this15.state.filter[attr];
3439
3417
  });
3440
3418
  return !someNotEmpty;
3441
3419
  }
@@ -3447,15 +3425,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3447
3425
  }, {
3448
3426
  key: "getFilterInput",
3449
3427
  value: function getFilterInput(name) {
3450
- var _this17 = this,
3428
+ var _this16 = this,
3451
3429
  _this$filterRefs$name;
3452
- return /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
3430
+ return /*#__PURE__*/_react["default"].createElement(_material.FormControl, {
3453
3431
  className: _Utils["default"].clsx(this.props.classes.headerCellInput, this.props.classes.filterInput),
3454
3432
  key: "".concat(name, "_").concat(this.state.filterKey)
3455
3433
  // style={{ marginTop: 0, marginBottom: 0 }}
3456
3434
  ,
3457
3435
  margin: "dense"
3458
- }, /*#__PURE__*/_react["default"].createElement(_Input["default"], {
3436
+ }, /*#__PURE__*/_react["default"].createElement(_material.Input, {
3459
3437
  ref: this.filterRefs[name],
3460
3438
  classes: {
3461
3439
  underline: 'no-underline'
@@ -3464,9 +3442,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3464
3442
  placeholder: this.texts["filter_".concat(name)],
3465
3443
  defaultValue: this.state.filter[name],
3466
3444
  onChange: function onChange() {
3467
- _this17.filterTimer && clearTimeout(_this17.filterTimer);
3468
- _this17.filterTimer = setTimeout(function () {
3469
- return _this17.onFilter();
3445
+ _this16.filterTimer && clearTimeout(_this16.filterTimer);
3446
+ _this16.filterTimer = setTimeout(function () {
3447
+ return _this16.onFilter();
3470
3448
  }, 400);
3471
3449
  },
3472
3450
  autoComplete: "off"
@@ -3475,13 +3453,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3475
3453
  position: 'absolute',
3476
3454
  right: 0
3477
3455
  }
3478
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3456
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3479
3457
  size: "small",
3480
3458
  onClick: function onClick() {
3481
- _this17.filterRefs[name].current.firstChild.value = '';
3482
- _this17.onFilter(name, '');
3459
+ _this16.filterRefs[name].current.firstChild.value = '';
3460
+ _this16.onFilter(name, '');
3483
3461
  }
3484
- }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
3462
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null))) : null);
3485
3463
  }
3486
3464
 
3487
3465
  /**
@@ -3492,7 +3470,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3492
3470
  }, {
3493
3471
  key: "getFilterSelect",
3494
3472
  value: function getFilterSelect(name, values) {
3495
- var _this18 = this,
3473
+ var _this17 = this,
3496
3474
  _this$filterRefs$name2;
3497
3475
  var hasIcons = !!values.find(function (item) {
3498
3476
  return item.icon;
@@ -3501,15 +3479,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3501
3479
  style: {
3502
3480
  position: 'relative'
3503
3481
  }
3504
- }, /*#__PURE__*/_react["default"].createElement(_Select["default"], {
3482
+ }, /*#__PURE__*/_react["default"].createElement(_material.Select, {
3505
3483
  variant: "standard",
3506
3484
  key: "".concat(name, "_").concat(this.state.filterKey),
3507
3485
  ref: this.filterRefs[name],
3508
3486
  className: "".concat(this.props.classes.headerCellInput, " no-underline"),
3509
3487
  onChange: function onChange() {
3510
- _this18.filterTimer && clearTimeout(_this18.filterTimer);
3511
- _this18.filterTimer = setTimeout(function () {
3512
- return _this18.onFilter();
3488
+ _this17.filterTimer && clearTimeout(_this17.filterTimer);
3489
+ _this17.filterTimer = setTimeout(function () {
3490
+ return _this17.onFilter();
3513
3491
  }, 400);
3514
3492
  },
3515
3493
  defaultValue: this.state.filter[name] || '',
@@ -3518,7 +3496,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3518
3496
  id: name
3519
3497
  },
3520
3498
  displayEmpty: true
3521
- }, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
3499
+ }, /*#__PURE__*/_react["default"].createElement(_material.MenuItem, {
3522
3500
  key: "empty",
3523
3501
  value: ""
3524
3502
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -3535,8 +3513,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3535
3513
  id = item;
3536
3514
  _name = item;
3537
3515
  }
3538
- return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
3539
- className: _this18.props.classes.headerCellSelectItem,
3516
+ return /*#__PURE__*/_react["default"].createElement(_material.MenuItem, {
3517
+ className: _this17.props.classes.headerCellSelectItem,
3540
3518
  key: id,
3541
3519
  value: id
3542
3520
  }, icon || (hasIcons ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -3544,21 +3522,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3544
3522
  }) : null), _name);
3545
3523
  })), (_this$filterRefs$name2 = this.filterRefs[name]) !== null && _this$filterRefs$name2 !== void 0 && (_this$filterRefs$name2 = _this$filterRefs$name2.current) !== null && _this$filterRefs$name2 !== void 0 && (_this$filterRefs$name2 = _this$filterRefs$name2.childNodes[1]) !== null && _this$filterRefs$name2 !== void 0 && _this$filterRefs$name2.value ? /*#__PURE__*/_react["default"].createElement("div", {
3546
3524
  className: _Utils["default"].clsx(this.props.classes.selectClearButton)
3547
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3525
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3548
3526
  size: "small",
3549
3527
  onClick: function onClick() {
3550
- var newFilter = _objectSpread({}, _this18.state.filter);
3528
+ var newFilter = _objectSpread({}, _this17.state.filter);
3551
3529
  newFilter[name] = '';
3552
- _this18.filterRefs[name].current.childNodes[1].value = '';
3553
- (window._localStorage || window.localStorage).setItem("".concat(_this18.props.dialogName || 'App', ".objectFilter"), JSON.stringify(newFilter));
3554
- _this18.setState({
3530
+ _this17.filterRefs[name].current.childNodes[1].value = '';
3531
+ (window._localStorage || window.localStorage).setItem("".concat(_this17.props.dialogName || 'App', ".objectFilter"), JSON.stringify(newFilter));
3532
+ _this17.setState({
3555
3533
  filter: newFilter,
3556
- filterKey: _this18.state.filterKey + 1
3534
+ filterKey: _this17.state.filterKey + 1
3557
3535
  }, function () {
3558
- return _this18.props.onFilterChanged && _this18.props.onFilterChanged(newFilter);
3536
+ return _this17.props.onFilterChanged && _this17.props.onFilterChanged(newFilter);
3559
3537
  });
3560
3538
  }
3561
- }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
3539
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null))) : null);
3562
3540
  }
3563
3541
 
3564
3542
  /**
@@ -3576,15 +3554,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3576
3554
  }, {
3577
3555
  key: "getFilterSelectRoom",
3578
3556
  value: function getFilterSelectRoom() {
3579
- var _this19 = this;
3557
+ var _this18 = this;
3580
3558
  var rooms = this.info.roomEnums.map(function (id) {
3581
- var _this19$objects$id, _this19$objects$id2;
3559
+ var _this18$objects$id, _this18$objects$id2;
3582
3560
  return {
3583
- name: getName(((_this19$objects$id = _this19.objects[id]) === null || _this19$objects$id === void 0 || (_this19$objects$id = _this19$objects$id.common) === null || _this19$objects$id === void 0 ? void 0 : _this19$objects$id.name) || id.split('.').pop()),
3561
+ name: getName(((_this18$objects$id = _this18.objects[id]) === null || _this18$objects$id === void 0 || (_this18$objects$id = _this18$objects$id.common) === null || _this18$objects$id === void 0 ? void 0 : _this18$objects$id.name) || id.split('.').pop()),
3584
3562
  value: id,
3585
3563
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3586
- src: ((_this19$objects$id2 = _this19.objects[id]) === null || _this19$objects$id2 === void 0 || (_this19$objects$id2 = _this19$objects$id2.common) === null || _this19$objects$id2 === void 0 ? void 0 : _this19$objects$id2.icon) || '',
3587
- className: _this19.props.classes.selectIcon
3564
+ src: ((_this18$objects$id2 = _this18.objects[id]) === null || _this18$objects$id2 === void 0 || (_this18$objects$id2 = _this18$objects$id2.common) === null || _this18$objects$id2 === void 0 ? void 0 : _this18$objects$id2.icon) || '',
3565
+ className: _this18.props.classes.selectIcon
3588
3566
  })
3589
3567
  };
3590
3568
  });
@@ -3597,15 +3575,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3597
3575
  }, {
3598
3576
  key: "getFilterSelectFunction",
3599
3577
  value: function getFilterSelectFunction() {
3600
- var _this20 = this;
3578
+ var _this19 = this;
3601
3579
  var func = this.info.funcEnums.map(function (id) {
3602
- var _this20$objects$id;
3580
+ var _this19$objects$id;
3603
3581
  return {
3604
- name: getName(_this20.objects[id] && _this20.objects[id].common && _this20.objects[id].common.name || id.split('.').pop()),
3582
+ name: getName(_this19.objects[id] && _this19.objects[id].common && _this19.objects[id].common.name || id.split('.').pop()),
3605
3583
  value: id,
3606
3584
  icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3607
- src: ((_this20$objects$id = _this20.objects[id]) === null || _this20$objects$id === void 0 || (_this20$objects$id = _this20$objects$id.common) === null || _this20$objects$id === void 0 ? void 0 : _this20$objects$id.icon) || '',
3608
- className: _this20.props.classes.selectIcon
3585
+ src: ((_this19$objects$id = _this19.objects[id]) === null || _this19$objects$id === void 0 || (_this19$objects$id = _this19$objects$id.common) === null || _this19$objects$id === void 0 ? void 0 : _this19$objects$id.icon) || '',
3586
+ className: _this19.props.classes.selectIcon
3609
3587
  })
3610
3588
  };
3611
3589
  });
@@ -3634,15 +3612,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3634
3612
  }, {
3635
3613
  key: "getFilterSelectCustoms",
3636
3614
  value: function getFilterSelectCustoms() {
3637
- var _this21 = this;
3615
+ var _this20 = this;
3638
3616
  if (this.info.customs.length > 1) {
3639
3617
  var customs = this.info.customs.map(function (id) {
3640
3618
  return {
3641
- name: id === '_' ? _this21.texts.filterCustomsWithout : id,
3619
+ name: id === '_' ? _this20.texts.filterCustomsWithout : id,
3642
3620
  value: id,
3643
3621
  icon: id === '_' ? null : /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
3644
- src: getSelectIdIcon(_this21.objects, id, _this21.imagePrefix) || '',
3645
- className: _this21.props.classes.selectIcon
3622
+ src: getSelectIdIcon(_this20.objects, id, _this20.imagePrefix) || '',
3623
+ className: _this20.props.classes.selectIcon
3646
3624
  })
3647
3625
  };
3648
3626
  });
@@ -3659,13 +3637,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3659
3637
  }, {
3660
3638
  key: "onExpandAll",
3661
3639
  value: function onExpandAll(root, expanded) {
3662
- var _this22 = this;
3640
+ var _this21 = this;
3663
3641
  root = root || this.root;
3664
3642
  expanded = expanded || [];
3665
3643
  root.children && root.children.forEach(function (item) {
3666
3644
  if (item.data.sumVisibility) {
3667
3645
  expanded.push(item.data.id);
3668
- _this22.onExpandAll(item, expanded);
3646
+ _this21.onExpandAll(item, expanded);
3669
3647
  }
3670
3648
  });
3671
3649
  if (root === this.root) {
@@ -3683,7 +3661,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3683
3661
  }, {
3684
3662
  key: "onCollapseAll",
3685
3663
  value: function onCollapseAll() {
3686
- var _this23 = this;
3664
+ var _this22 = this;
3687
3665
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify([]));
3688
3666
  (window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '[]');
3689
3667
  this.setState({
@@ -3691,7 +3669,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3691
3669
  depth: 0,
3692
3670
  selected: []
3693
3671
  }, function () {
3694
- return _this23.onAfterSelect();
3672
+ return _this22.onAfterSelect();
3695
3673
  });
3696
3674
  }
3697
3675
 
@@ -3704,7 +3682,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3704
3682
  }, {
3705
3683
  key: "expandDepth",
3706
3684
  value: function expandDepth(root, depth, expanded) {
3707
- var _this24 = this;
3685
+ var _this23 = this;
3708
3686
  root = root || this.root;
3709
3687
  if (depth > 0) {
3710
3688
  if (root.children) {
@@ -3715,7 +3693,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3715
3693
  expanded.sort();
3716
3694
  }
3717
3695
  if (depth - 1 > 0) {
3718
- _this24.expandDepth(item, depth - 1, expanded);
3696
+ _this23.expandDepth(item, depth - 1, expanded);
3719
3697
  }
3720
3698
  }
3721
3699
  });
@@ -3802,17 +3780,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3802
3780
  }, {
3803
3781
  key: "_exportObjects",
3804
3782
  value: function _exportObjects(isAll) {
3805
- var _this25 = this;
3783
+ var _this24 = this;
3806
3784
  if (isAll) {
3807
3785
  generateFile('allObjects.json', this.objects);
3808
3786
  } else if (this.state.selected.length || this.state.selectedNonObject) {
3809
3787
  var result = {};
3810
3788
  var id = this.state.selected[0] || this.state.selectedNonObject;
3811
3789
  this._getSelectedIdsForExport().forEach(function (key) {
3812
- result[key] = JSON.parse(JSON.stringify(_this25.objects[key]));
3790
+ result[key] = JSON.parse(JSON.stringify(_this24.objects[key]));
3813
3791
  // add enum information
3814
3792
  if (result[key].common) {
3815
- var enums = _this25.getEnumsForId(key);
3793
+ var enums = _this24.getEnumsForId(key);
3816
3794
  if (enums) {
3817
3795
  result[key].common.enums = enums;
3818
3796
  }
@@ -3826,42 +3804,42 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3826
3804
  }, {
3827
3805
  key: "renderExportDialog",
3828
3806
  value: function renderExportDialog() {
3829
- var _this26 = this;
3807
+ var _this25 = this;
3830
3808
  if (this.state.showExportDialog === false) {
3831
3809
  return null;
3832
3810
  }
3833
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
3811
+ return /*#__PURE__*/_react["default"].createElement(_material.Dialog, {
3834
3812
  open: !0
3835
- }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], null, this.props.t('Select type of export')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], null, this.props.t('You can export all objects or just the selected branch.'), /*#__PURE__*/_react["default"].createElement("br", null), this.props.t('Selected %s object(s)', this.state.showExportDialog))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3813
+ }, /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, null, this.props.t('Select type of export')), /*#__PURE__*/_react["default"].createElement(_material.DialogContent, null, /*#__PURE__*/_react["default"].createElement(_material.DialogContentText, null, this.props.t('You can export all objects or just the selected branch.'), /*#__PURE__*/_react["default"].createElement("br", null), this.props.t('Selected %s object(s)', this.state.showExportDialog))), /*#__PURE__*/_react["default"].createElement(_material.DialogActions, null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
3836
3814
  color: "grey",
3837
3815
  variant: "outlined",
3838
3816
  onClick: function onClick() {
3839
- return _this26.setState({
3817
+ return _this25.setState({
3840
3818
  showExportDialog: false
3841
3819
  }, function () {
3842
- return _this26._exportObjects(true);
3820
+ return _this25._exportObjects(true);
3843
3821
  });
3844
3822
  }
3845
- }, this.props.t('ra_All objects'), " (", Object.keys(this.objects).length, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3823
+ }, this.props.t('ra_All objects'), ' ', "(", Object.keys(this.objects).length, ")"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
3846
3824
  color: "primary",
3847
3825
  variant: "contained",
3848
3826
  autoFocus: true,
3849
3827
  onClick: function onClick() {
3850
- return _this26.setState({
3828
+ return _this25.setState({
3851
3829
  showExportDialog: false
3852
3830
  }, function () {
3853
- return _this26._exportObjects(false);
3831
+ return _this25._exportObjects(false);
3854
3832
  });
3855
3833
  }
3856
- }, this.props.t('ra_Only selected'), " (", this.state.showExportDialog, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
3834
+ }, this.props.t('ra_Only selected'), ' ', "(", this.state.showExportDialog, ")"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
3857
3835
  color: "grey",
3858
3836
  variant: "contained",
3859
3837
  onClick: function onClick() {
3860
- return _this26.setState({
3838
+ return _this25.setState({
3861
3839
  showExportDialog: false
3862
3840
  });
3863
3841
  },
3864
- startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
3842
+ startIcon: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null)
3865
3843
  }, this.props.t('ra_Cancel'))));
3866
3844
  }
3867
3845
  }, {
@@ -3872,7 +3850,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3872
3850
  * @returns {JSX.Element}
3873
3851
  */
3874
3852
  function getToolbar() {
3875
- var _this27 = this;
3853
+ var _this26 = this;
3876
3854
  var allowObjectCreation = false;
3877
3855
  if (this.state.selected.length || this.state.selectedNonObject) {
3878
3856
  var id = this.state.selected[0] || this.state.selectedNonObject;
@@ -3896,165 +3874,165 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
3896
3874
  width: '100%',
3897
3875
  alignItems: 'center'
3898
3876
  }
3899
- }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3877
+ }, /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3900
3878
  title: this.props.t('ra_Refresh tree'),
3901
3879
  classes: {
3902
3880
  popper: this.props.classes.tooltip
3903
3881
  }
3904
- }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3882
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3905
3883
  onClick: function onClick() {
3906
- return _this27.refreshComponent();
3884
+ return _this26.refreshComponent();
3907
3885
  },
3908
3886
  disabled: this.state.updating,
3909
3887
  size: "large"
3910
- }, /*#__PURE__*/_react["default"].createElement(_Refresh["default"], null)))), this.props.showExpertButton && !this.props.expertMode && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3888
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Refresh, null)))), this.props.showExpertButton && !this.props.expertMode && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3911
3889
  title: this.props.t('ra_expertMode'),
3912
3890
  classes: {
3913
3891
  popper: this.props.classes.tooltip
3914
3892
  }
3915
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3893
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3916
3894
  key: "expertMode",
3917
3895
  color: this.state.filter.expertMode ? 'secondary' : 'default',
3918
3896
  onClick: function onClick() {
3919
- return _this27.onFilter('expertMode', !_this27.state.filter.expertMode);
3897
+ return _this26.onFilter('expertMode', !_this26.state.filter.expertMode);
3920
3898
  },
3921
3899
  size: "large"
3922
- }, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3900
+ }, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3923
3901
  title: this.props.t('ra_Configure'),
3924
3902
  classes: {
3925
3903
  popper: this.props.classes.tooltip
3926
3904
  }
3927
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3905
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3928
3906
  key: "columnSelector",
3929
3907
  color: this.state.columnsAuto ? 'primary' : 'default',
3930
3908
  onClick: function onClick() {
3931
- return _this27.setState({
3909
+ return _this26.setState({
3932
3910
  columnsSelectorShow: true
3933
3911
  });
3934
3912
  },
3935
3913
  size: "large"
3936
- }, /*#__PURE__*/_react["default"].createElement(_ViewColumn["default"], null))), this.state.expandAllVisible && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3914
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.ViewColumn, null))), this.state.expandAllVisible && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3937
3915
  title: this.props.t('ra_Expand all nodes'),
3938
3916
  classes: {
3939
3917
  popper: this.props.classes.tooltip
3940
3918
  }
3941
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3919
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3942
3920
  key: "expandAll",
3943
3921
  onClick: function onClick() {
3944
- return _this27.onExpandAll();
3922
+ return _this26.onExpandAll();
3945
3923
  },
3946
3924
  size: "large"
3947
- }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3925
+ }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3948
3926
  title: this.props.t('ra_Collapse all nodes'),
3949
3927
  classes: {
3950
3928
  popper: this.props.classes.tooltip
3951
3929
  }
3952
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3930
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3953
3931
  key: "collapseAll",
3954
3932
  onClick: function onClick() {
3955
- return _this27.onCollapseAll();
3933
+ return _this26.onCollapseAll();
3956
3934
  },
3957
3935
  size: "large"
3958
- }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3936
+ }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3959
3937
  title: this.props.t('ra_Expand one step node'),
3960
3938
  classes: {
3961
3939
  popper: this.props.classes.tooltip
3962
3940
  }
3963
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3941
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3964
3942
  key: "expandVisible",
3965
3943
  color: "primary",
3966
3944
  onClick: function onClick() {
3967
- return _this27.onExpandVisible();
3945
+ return _this26.onExpandVisible();
3968
3946
  },
3969
3947
  size: "large"
3970
3948
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
3971
3949
  badgeContent: this.state.depth,
3972
3950
  color: "secondary"
3973
- }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null)))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3951
+ }, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null)))), /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3974
3952
  title: this.props.t('ra_Collapse one step node'),
3975
3953
  classes: {
3976
3954
  popper: this.props.classes.tooltip
3977
3955
  }
3978
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3956
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3979
3957
  key: "collapseVisible",
3980
3958
  color: "primary",
3981
3959
  onClick: function onClick() {
3982
- return _this27.onCollapseVisible();
3960
+ return _this26.onCollapseVisible();
3983
3961
  },
3984
3962
  size: "large"
3985
3963
  }, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
3986
3964
  badgeContent: this.state.depth,
3987
3965
  color: "secondary"
3988
- }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null)))), this.props.objectStatesView && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3966
+ }, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null)))), this.props.objectStatesView && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
3989
3967
  title: this.props.t('ra_Toggle the states view'),
3990
3968
  classes: {
3991
3969
  popper: this.props.classes.tooltip
3992
3970
  }
3993
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3971
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
3994
3972
  onClick: function onClick() {
3995
- return _this27.onStatesViewVisible();
3973
+ return _this26.onStatesViewVisible();
3996
3974
  },
3997
3975
  size: "large"
3998
- }, /*#__PURE__*/_react["default"].createElement(_LooksOne["default"], {
3976
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.LooksOne, {
3999
3977
  color: this.state.statesView ? 'primary' : 'inherit'
4000
- }))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3978
+ }))), /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4001
3979
  title: this.props.t('ra_Show/Hide object descriptions'),
4002
3980
  classes: {
4003
3981
  popper: this.props.classes.tooltip
4004
3982
  }
4005
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3983
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4006
3984
  onClick: function onClick() {
4007
- (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".desc"), _this27.state.showDescription ? 'false' : 'true');
4008
- _this27.setState({
4009
- showDescription: !_this27.state.showDescription
3985
+ (window._localStorage || window.localStorage).setItem("".concat(_this26.props.dialogName || 'App', ".desc"), _this26.state.showDescription ? 'false' : 'true');
3986
+ _this26.setState({
3987
+ showDescription: !_this26.state.showDescription
4010
3988
  });
4011
3989
  },
4012
3990
  size: "large"
4013
- }, /*#__PURE__*/_react["default"].createElement(_TextFields["default"], {
3991
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.TextFields, {
4014
3992
  color: this.state.showDescription ? 'primary' : 'inherit'
4015
- }))), this.props.objectAddBoolean ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
3993
+ }))), this.props.objectAddBoolean ? /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4016
3994
  title: this.toolTipObjectCreating(),
4017
3995
  classes: {
4018
3996
  popper: this.props.classes.tooltip
4019
3997
  }
4020
- }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
3998
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4021
3999
  disabled: !allowObjectCreation,
4022
4000
  onClick: function onClick() {
4023
- return _this27.setState({
4001
+ return _this26.setState({
4024
4002
  modalNewObj: true
4025
4003
  });
4026
4004
  },
4027
4005
  size: "large"
4028
- }, /*#__PURE__*/_react["default"].createElement(_Add["default"], null)))) : null, this.props.objectImportExport && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4006
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Add, null)))) : null, this.props.objectImportExport && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4029
4007
  title: this.props.t('ra_Add objects tree from JSON file'),
4030
4008
  classes: {
4031
4009
  popper: this.props.classes.tooltip
4032
4010
  }
4033
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4011
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4034
4012
  onClick: function onClick() {
4035
4013
  var input = document.createElement('input');
4036
4014
  input.setAttribute('type', 'file');
4037
4015
  input.setAttribute('id', 'files');
4038
4016
  input.setAttribute('opacity', 0);
4039
4017
  input.addEventListener('change', function (e) {
4040
- return _this27.handleJsonUpload(e);
4018
+ return _this26.handleJsonUpload(e);
4041
4019
  }, false);
4042
4020
  input.click();
4043
4021
  },
4044
4022
  size: "large"
4045
- }, /*#__PURE__*/_react["default"].createElement(_Publish["default"], null))), this.props.objectImportExport && (!!this.state.selected.length || this.state.selectedNonObject) && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4023
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Publish, null))), this.props.objectImportExport && (!!this.state.selected.length || this.state.selectedNonObject) && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4046
4024
  title: this.props.t('ra_Save objects tree as JSON file'),
4047
4025
  classes: {
4048
4026
  popper: this.props.classes.tooltip
4049
4027
  }
4050
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4028
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4051
4029
  onClick: function onClick() {
4052
- return _this27.setState({
4053
- showExportDialog: _this27._getSelectedIdsForExport().length
4030
+ return _this26.setState({
4031
+ showExportDialog: _this26._getSelectedIdsForExport().length
4054
4032
  });
4055
4033
  },
4056
4034
  size: "large"
4057
- }, /*#__PURE__*/_react["default"].createElement(_Publish["default"], {
4035
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Publish, {
4058
4036
  style: {
4059
4037
  transform: 'rotate(180deg)'
4060
4038
  }
@@ -4064,33 +4042,33 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4064
4042
  whiteSpace: 'nowrap'
4065
4043
  }
4066
4044
  }, "".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) {
4067
- return _this27.info.objects[el].type === 'state';
4068
- }).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4045
+ return _this26.info.objects[el].type === 'state';
4046
+ }).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4069
4047
  title: this.props.t('ra_Edit custom config'),
4070
4048
  classes: {
4071
4049
  popper: this.props.classes.tooltip
4072
4050
  }
4073
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4051
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4074
4052
  onClick: function onClick() {
4075
4053
  // get all visible states
4076
- var ids = getVisibleItems(_this27.root, 'state', _this27.objects);
4054
+ var ids = getVisibleItems(_this26.root, 'state', _this26.objects);
4077
4055
  if (ids.length) {
4078
- _this27.pauseSubscribe(true);
4056
+ _this26.pauseSubscribe(true);
4079
4057
  if (ids.length === 1) {
4080
- (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), _this27.state.selected[0]);
4081
- _this27.props.router && _this27.props.router.doNavigate(null, 'custom', _this27.state.selected[0]);
4058
+ (window._localStorage || window.localStorage).setItem("".concat(_this26.props.dialogName || 'App', ".objectSelected"), _this26.state.selected[0]);
4059
+ _this26.props.router && _this26.props.router.doNavigate(null, 'custom', _this26.state.selected[0]);
4082
4060
  }
4083
- _this27.setState({
4061
+ _this26.setState({
4084
4062
  customDialog: ids
4085
4063
  });
4086
4064
  } else {
4087
- _this27.setState({
4088
- toast: _this27.props.t('ra_please select object')
4065
+ _this26.setState({
4066
+ toast: _this26.props.t('ra_please select object')
4089
4067
  });
4090
4068
  }
4091
4069
  },
4092
4070
  size: "large"
4093
- }, /*#__PURE__*/_react["default"].createElement(_Build["default"], null))));
4071
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Build, null))));
4094
4072
  }
4095
4073
 
4096
4074
  /**
@@ -4144,30 +4122,30 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4144
4122
  * @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
4145
4123
  */
4146
4124
  function renderColumnButtons(id, item, classes) {
4147
- var _this28 = this,
4125
+ var _this27 = this,
4148
4126
  _item$children2,
4149
4127
  _item$data$obj$common,
4150
4128
  _item$data$obj$common3;
4151
4129
  if (!item.data.obj) {
4152
4130
  return this.props.onObjectDelete || this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement("div", {
4153
4131
  className: classes.buttonDiv
4154
- }, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4132
+ }, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4155
4133
  className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsEmptyButton, classes.cellButtonMinWidth),
4156
4134
  onClick: function onClick() {
4157
- return _this28.setState({
4135
+ return _this27.setState({
4158
4136
  modalEditOfAccess: true,
4159
4137
  modalEditOfAccessObjData: item.data
4160
4138
  });
4161
4139
  },
4162
4140
  size: "large"
4163
- }, "---") : null, this.props.onObjectDelete && item.children && item.children.length ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4141
+ }, "---") : null, this.props.onObjectDelete && item.children && item.children.length ? /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4164
4142
  className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsButtonAlone),
4165
4143
  size: "small",
4166
4144
  "aria-label": "delete",
4167
4145
  title: this.texts.deleteObject,
4168
4146
  onClick: function onClick() {
4169
4147
  // calculate number of children
4170
- var keys = Object.keys(_this28.objects);
4148
+ var keys = Object.keys(_this27.objects);
4171
4149
  keys.sort();
4172
4150
  var count = 0;
4173
4151
  var start = "".concat(id, ".");
@@ -4178,25 +4156,25 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4178
4156
  break;
4179
4157
  }
4180
4158
  }
4181
- _this28.props.onObjectDelete(id, !!(item.children && item.children.length), false, count + 1);
4159
+ _this27.props.onObjectDelete(id, !!(item.children && item.children.length), false, count + 1);
4182
4160
  }
4183
- }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
4161
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Delete, {
4184
4162
  className: classes.cellButtonsButtonIcon
4185
4163
  })) : null) : null;
4186
4164
  }
4187
4165
  item.data.aclTooltip = item.data.aclTooltip || this.renderTooltipAccessControl(item.data.obj.acl);
4188
4166
  var acl = item.data.obj.acl ? item.data.obj.type === 'state' ? item.data.obj.acl.state : item.data.obj.acl.object : 0;
4189
4167
  var aclSystemConfig = item.data.obj.acl && (item.data.obj.type === 'state' ? this.systemConfig.common.defaultNewAcl.state : this.systemConfig.common.defaultNewAcl.object);
4190
- return [this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4168
+ return [this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4191
4169
  key: "acl",
4192
4170
  title: item.data.aclTooltip,
4193
4171
  classes: {
4194
4172
  popper: this.props.classes.tooltip
4195
4173
  }
4196
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4174
+ }, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4197
4175
  className: classes.cellButtonMinWidth,
4198
4176
  onClick: function onClick() {
4199
- return _this28.setState({
4177
+ return _this27.setState({
4200
4178
  modalEditOfAccess: true,
4201
4179
  modalEditOfAccessObjData: item.data
4202
4180
  });
@@ -4207,28 +4185,28 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4207
4185
  }, Number.isNaN(Number(acl)) ? Number(aclSystemConfig).toString(16) : Number(acl).toString(16)))) : /*#__PURE__*/_react["default"].createElement("div", {
4208
4186
  key: "aclEmpty",
4209
4187
  className: classes.cellButtonMinWidth
4210
- }), /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4188
+ }), /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4211
4189
  key: "edit",
4212
4190
  className: classes.cellButtonsButton,
4213
4191
  size: "small",
4214
4192
  "aria-label": "edit",
4215
4193
  title: this.texts.editObject,
4216
4194
  onClick: function onClick() {
4217
- (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4218
- _this28.setState({
4195
+ (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4196
+ _this27.setState({
4219
4197
  editObjectDialog: id
4220
4198
  });
4221
4199
  }
4222
- }, /*#__PURE__*/_react["default"].createElement(_Edit["default"], {
4200
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Edit, {
4223
4201
  className: classes.cellButtonsButtonIcon
4224
- })), this.props.onObjectDelete && ((_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length || !((_item$data$obj$common = item.data.obj.common) !== null && _item$data$obj$common !== void 0 && _item$data$obj$common.dontDelete)) ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4202
+ })), this.props.onObjectDelete && ((_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length || !((_item$data$obj$common = item.data.obj.common) !== null && _item$data$obj$common !== void 0 && _item$data$obj$common.dontDelete)) ? /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4225
4203
  key: "delete",
4226
4204
  className: classes.cellButtonsButton,
4227
4205
  size: "small",
4228
4206
  "aria-label": "delete",
4229
4207
  onClick: function onClick() {
4230
4208
  var _item$children3, _item$data$obj$common2;
4231
- var keys = Object.keys(_this28.objects);
4209
+ var keys = Object.keys(_this27.objects);
4232
4210
  keys.sort();
4233
4211
  var count = 0;
4234
4212
  var start = "".concat(id, ".");
@@ -4239,26 +4217,26 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4239
4217
  break;
4240
4218
  }
4241
4219
  }
4242
- _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);
4220
+ _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);
4243
4221
  },
4244
4222
  title: this.texts.deleteObject
4245
- }, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
4223
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Delete, {
4246
4224
  className: classes.cellButtonsButtonIcon
4247
- })) : null, this.props.objectCustomDialog && this.info.hasSomeCustoms && item.data.obj.type === 'state' && ((_item$data$obj$common3 = item.data.obj.common) === null || _item$data$obj$common3 === void 0 ? void 0 : _item$data$obj$common3.type) !== 'file' ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
4225
+ })) : null, this.props.objectCustomDialog && this.info.hasSomeCustoms && item.data.obj.type === 'state' && ((_item$data$obj$common3 = item.data.obj.common) === null || _item$data$obj$common3 === void 0 ? void 0 : _item$data$obj$common3.type) !== 'file' ? /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
4248
4226
  className: _Utils["default"].clsx(classes.cellButtonsButton, item.data.hasCustoms ? classes.cellButtonsButtonWithCustoms : classes.cellButtonsButtonWithoutCustoms),
4249
4227
  key: "custom",
4250
4228
  size: "small",
4251
4229
  "aria-label": "config",
4252
4230
  title: this.texts.customConfig,
4253
4231
  onClick: function onClick() {
4254
- (window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
4255
- _this28.pauseSubscribe(true);
4256
- _this28.props.router && _this28.props.router.doNavigate(null, 'customs', id);
4257
- _this28.setState({
4232
+ (window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), id);
4233
+ _this27.pauseSubscribe(true);
4234
+ _this27.props.router && _this27.props.router.doNavigate(null, 'customs', id);
4235
+ _this27.setState({
4258
4236
  customDialog: [id]
4259
4237
  });
4260
4238
  }
4261
- }, /*#__PURE__*/_react["default"].createElement(_Settings["default"], {
4239
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Settings, {
4262
4240
  className: classes.cellButtonsButtonIcon
4263
4241
  })) : null];
4264
4242
  }
@@ -4328,7 +4306,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4328
4306
  key: "renderColumnValue",
4329
4307
  value: function renderColumnValue(id, item, classes) {
4330
4308
  var _obj$common4,
4331
- _this29 = this;
4309
+ _this28 = this;
4332
4310
  var obj = item.data.obj;
4333
4311
  if (!obj || !this.states) {
4334
4312
  return null;
@@ -4352,10 +4330,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4352
4330
  var state = this.states[id];
4353
4331
  var info = item.data.state;
4354
4332
  if (!info) {
4355
- item.data.state = item.data.state || formatValue(id, state, obj, this.texts, this.props.dateFormat, this.props.isFloatComma);
4333
+ item.data.state = formatValue({
4334
+ state: state,
4335
+ obj: obj,
4336
+ texts: this.texts,
4337
+ dateFormat: this.props.dateFormat,
4338
+ isFloatComma: this.props.isFloatComma
4339
+ });
4356
4340
  info = item.data.state;
4357
4341
  info.valFull = info.valFull.map(function (_item) {
4358
- if (_item.t === _this29.texts.quality && state.q) {
4342
+ if (_item.t === _this28.texts.quality && state.q) {
4359
4343
  return [/*#__PURE__*/_react["default"].createElement("div", {
4360
4344
  className: classes.cellValueTooltipBoth,
4361
4345
  key: _item.t
@@ -4402,7 +4386,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4402
4386
  }, "(", info.valText.s, ")") : null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
4403
4387
  className: _Utils["default"].clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonCopy),
4404
4388
  onClick: function onClick(e) {
4405
- return _this29.onCopy(e, copyText);
4389
+ return _this28.onCopy(e, copyText);
4406
4390
  },
4407
4391
  key: "cc"
4408
4392
  })
@@ -4410,13 +4394,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4410
4394
  ];
4411
4395
  }
4412
4396
 
4397
+ info.style = getValueStyle({
4398
+ state: state,
4399
+ isExpertMode: this.state.filter.expertMode,
4400
+ isButton: item.data.button
4401
+ });
4413
4402
  var val = info.valText;
4414
4403
  if (!this.state.filter.expertMode && item.data.button) {
4415
- val = /*#__PURE__*/_react["default"].createElement(_RoomService["default"], {
4416
- className: _Utils["default"].clsx(this.props.classes.cellValueButton, !this.states[id] || !this.states[id].val ? this.props.classes.cellValueButtonFalse : '')
4404
+ val = /*#__PURE__*/_react["default"].createElement(_iconsMaterial.RoomService, {
4405
+ className: this.props.classes.cellValueButton
4417
4406
  });
4418
4407
  }
4419
- return /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
4408
+ return /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
4420
4409
  key: "value",
4421
4410
  title: info.valFull,
4422
4411
  classes: {
@@ -4424,7 +4413,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4424
4413
  popper: this.props.classes.cellValueTooltipBox
4425
4414
  },
4426
4415
  onOpen: function onOpen() {
4427
- return _this29.readHistory(id);
4416
+ return _this28.readHistory(id);
4428
4417
  }
4429
4418
  }, /*#__PURE__*/_react["default"].createElement("div", {
4430
4419
  style: info.style,
@@ -4440,7 +4429,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4440
4429
  key: "_syncEnum",
4441
4430
  value: function _syncEnum(id, enumIds, newArray, cb) {
4442
4431
  var _this$info$objects$en,
4443
- _this30 = this;
4432
+ _this29 = this;
4444
4433
  if (!enumIds || !enumIds.length) {
4445
4434
  cb && cb();
4446
4435
  return;
@@ -4456,9 +4445,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4456
4445
  var obj = JSON.parse(JSON.stringify(this.info.objects[enumId]));
4457
4446
  obj.common.members.splice(pos, 1);
4458
4447
  promises.push(this.props.socket.setObject(enumId, obj).then(function () {
4459
- return _this30.info.objects[enumId] = obj;
4448
+ return _this29.info.objects[enumId] = obj;
4460
4449
  })["catch"](function (e) {
4461
- return _this30.showError(e);
4450
+ return _this29.showError(e);
4462
4451
  }));
4463
4452
  }
4464
4453
  }
@@ -4471,15 +4460,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4471
4460
  _obj.common.members.push(id);
4472
4461
  _obj.common.members.sort();
4473
4462
  promises.push(this.props.socket.setObject(enumId, _obj).then(function () {
4474
- return _this30.info.objects[enumId] = _obj;
4463
+ return _this29.info.objects[enumId] = _obj;
4475
4464
  })["catch"](function (e) {
4476
- return _this30.showError(e);
4465
+ return _this29.showError(e);
4477
4466
  }));
4478
4467
  }
4479
4468
  }
4480
4469
  Promise.all(promises).then(function () {
4481
4470
  return setTimeout(function () {
4482
- return _this30._syncEnum(id, enumIds, newArray, cb);
4471
+ return _this29._syncEnum(id, enumIds, newArray, cb);
4483
4472
  }, 0);
4484
4473
  });
4485
4474
  }
@@ -4491,11 +4480,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4491
4480
  }, {
4492
4481
  key: "syncEnum",
4493
4482
  value: function syncEnum(id, enumName, newArray) {
4494
- var _this31 = this;
4483
+ var _this30 = this;
4495
4484
  var toCheck = (0, _toConsumableArray2["default"])(this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']);
4496
4485
  return new Promise(function (resolve) {
4497
- _this31._syncEnum(id, toCheck, newArray, function (error) {
4498
- error && _this31.showError(error);
4486
+ _this30._syncEnum(id, toCheck, newArray, function (error) {
4487
+ error && _this30.showError(error);
4499
4488
  // force update of object
4500
4489
  resolve();
4501
4490
  });
@@ -4509,7 +4498,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4509
4498
  }, {
4510
4499
  key: "renderEnumDialog",
4511
4500
  value: function renderEnumDialog() {
4512
- var _this32 = this;
4501
+ var _this31 = this;
4513
4502
  if (this.state.enumDialog) {
4514
4503
  var type = this.state.enumDialog.type;
4515
4504
  var item = this.state.enumDialog.item;
@@ -4517,9 +4506,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4517
4506
  var enumsOriginal = this.state.enumDialog.enumsOriginal;
4518
4507
  var enums = (type === 'room' ? this.info.roomEnums : this.info.funcEnums).map(function (id) {
4519
4508
  return {
4520
- name: getName(_this32.objects[id] && _this32.objects[id].common && _this32.objects[id].common.name || id.split('.').pop(), _this32.props.lang),
4509
+ name: getName(_this31.objects[id] && _this31.objects[id].common && _this31.objects[id].common.name || id.split('.').pop(), _this31.props.lang),
4521
4510
  value: id,
4522
- icon: getSelectIdIcon(_this32.objects, id, _this32.imagePrefix)
4511
+ icon: getSelectIdIcon(_this31.objects, id, _this31.imagePrefix)
4523
4512
  };
4524
4513
  }).sort(function (a, b) {
4525
4514
  return a.name > b.name ? 1 : -1;
@@ -4527,10 +4516,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4527
4516
  enums.forEach(function (_item) {
4528
4517
  if (_item.icon && typeof _item.icon === 'string') {
4529
4518
  _item.icon = /*#__PURE__*/_react["default"].createElement("div", {
4530
- className: _this32.props.classes.enumIconDiv
4519
+ className: _this31.props.classes.enumIconDiv
4531
4520
  }, /*#__PURE__*/_react["default"].createElement("img", {
4532
4521
  src: _item.icon,
4533
- className: _this32.props.classes.enumIcon,
4522
+ className: _this31.props.classes.enumIcon,
4534
4523
  alt: _item.name
4535
4524
  }));
4536
4525
  }
@@ -4538,31 +4527,31 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4538
4527
 
4539
4528
  // const hasIcons = !!enums.find(item => item.icon);
4540
4529
 
4541
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4530
+ return /*#__PURE__*/_react["default"].createElement(_material.Dialog, {
4542
4531
  className: this.props.classes.enumDialog,
4543
4532
  onClose: function onClose() {
4544
- return _this32.setState({
4533
+ return _this31.setState({
4545
4534
  enumDialog: null
4546
4535
  });
4547
4536
  },
4548
4537
  "aria-labelledby": "enum-dialog-title",
4549
4538
  open: !0 // true
4550
- }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
4539
+ }, /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, {
4551
4540
  id: "enum-dialog-title"
4552
- }, type === 'func' ? this.props.t('ra_Define functions') : this.props.t('ra_Define rooms'), /*#__PURE__*/_react["default"].createElement(_Fab["default"], {
4541
+ }, type === 'func' ? this.props.t('ra_Define functions') : this.props.t('ra_Define rooms'), /*#__PURE__*/_react["default"].createElement(_material.Fab, {
4553
4542
  className: this.props.classes.enumButton,
4554
4543
  color: "primary",
4555
4544
  disabled: JSON.stringify(enumsOriginal) === JSON.stringify(itemEnums),
4556
4545
  size: "small",
4557
4546
  onClick: function onClick() {
4558
- return _this32.syncEnum(item.data.id, type, itemEnums).then(function () {
4559
- return _this32.setState({
4547
+ return _this31.syncEnum(item.data.id, type, itemEnums).then(function () {
4548
+ return _this31.setState({
4560
4549
  enumDialog: null,
4561
4550
  enumDialogEnums: null
4562
4551
  });
4563
4552
  });
4564
4553
  }
4565
- }, /*#__PURE__*/_react["default"].createElement(_Check["default"], null))), /*#__PURE__*/_react["default"].createElement(_List["default"], {
4554
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Check, null))), /*#__PURE__*/_react["default"].createElement(_material.List, {
4566
4555
  classes: {
4567
4556
  root: this.props.classes.enumList
4568
4557
  }
@@ -4579,27 +4568,27 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4579
4568
  name = _item;
4580
4569
  }
4581
4570
  var labelId = "checkbox-list-label-".concat(id);
4582
- return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
4583
- className: _this32.props.classes.headerCellSelectItem,
4571
+ return /*#__PURE__*/_react["default"].createElement(_material.ListItem, {
4572
+ className: _this31.props.classes.headerCellSelectItem,
4584
4573
  key: id,
4585
4574
  onClick: function onClick() {
4586
4575
  var pos = itemEnums.indexOf(id);
4587
- var enumDialogEnums = JSON.parse(JSON.stringify(_this32.state.enumDialogEnums));
4576
+ var enumDialogEnums = JSON.parse(JSON.stringify(_this31.state.enumDialogEnums));
4588
4577
  if (pos === -1) {
4589
4578
  enumDialogEnums.push(id);
4590
4579
  enumDialogEnums.sort();
4591
4580
  } else {
4592
4581
  enumDialogEnums.splice(pos, 1);
4593
4582
  }
4594
- _this32.setState({
4583
+ _this31.setState({
4595
4584
  enumDialogEnums: enumDialogEnums
4596
4585
  });
4597
4586
  }
4598
- }, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
4587
+ }, /*#__PURE__*/_react["default"].createElement(_material.ListItemIcon, {
4599
4588
  classes: {
4600
- root: _this32.props.classes.enumCheckbox
4589
+ root: _this31.props.classes.enumCheckbox
4601
4590
  }
4602
- }, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4591
+ }, /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
4603
4592
  edge: "start",
4604
4593
  checked: itemEnums.includes(id),
4605
4594
  tabIndex: -1,
@@ -4607,9 +4596,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4607
4596
  inputProps: {
4608
4597
  'aria-labelledby': labelId
4609
4598
  }
4610
- })), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
4599
+ })), /*#__PURE__*/_react["default"].createElement(_material.ListItemText, {
4611
4600
  id: labelId
4612
- }, name), icon ? /*#__PURE__*/_react["default"].createElement(_ListItemSecondaryAction["default"], null, icon) : null);
4601
+ }, name), icon ? /*#__PURE__*/_react["default"].createElement(_material.ListItemSecondaryAction, null, icon) : null);
4613
4602
  })));
4614
4603
  }
4615
4604
  return null;
@@ -4622,7 +4611,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4622
4611
  }, {
4623
4612
  key: "renderEditRoleDialog",
4624
4613
  value: function renderEditRoleDialog() {
4625
- var _this33 = this;
4614
+ var _this32 = this;
4626
4615
  if (this.state.roleDialog && this.props.objectBrowserEditRole) {
4627
4616
  var ObjectBrowserEditRole = this.props.objectBrowserEditRole;
4628
4617
  return /*#__PURE__*/_react["default"].createElement(ObjectBrowserEditRole, {
@@ -4633,9 +4622,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4633
4622
  roles: this.info.roles,
4634
4623
  onClose: function onClose(obj) {
4635
4624
  if (obj) {
4636
- _this33.info.objects[_this33.state.roleDialog] = obj;
4625
+ _this32.info.objects[_this32.state.roleDialog] = obj;
4637
4626
  }
4638
- _this33.setState({
4627
+ _this32.setState({
4639
4628
  roleDialog: false
4640
4629
  });
4641
4630
  }
@@ -4651,7 +4640,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4651
4640
  }, {
4652
4641
  key: "onColumnsEditCustomDialogClose",
4653
4642
  value: function onColumnsEditCustomDialogClose(isSave) {
4654
- var _this34 = this;
4643
+ var _this33 = this;
4655
4644
  if (isSave) {
4656
4645
  var value = this.customColumnDialog.value;
4657
4646
  if (this.customColumnDialog.type === 'boolean') {
@@ -4661,16 +4650,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4661
4650
  }
4662
4651
  this.customColumnDialog = null;
4663
4652
  this.props.socket.getObject(this.state.columnsEditCustomDialog.obj._id).then(function (obj) {
4664
- if (ObjectBrowser.setCustomValue(obj, _this34.state.columnsEditCustomDialog.it, value)) {
4665
- return _this34.props.socket.setObject(obj._id, obj);
4653
+ if (ObjectBrowser.setCustomValue(obj, _this33.state.columnsEditCustomDialog.it, value)) {
4654
+ return _this33.props.socket.setObject(obj._id, obj);
4666
4655
  }
4667
- throw new Error(_this34.props.t('ra_Cannot update attribute, because not found in the object'));
4656
+ throw new Error(_this33.props.t('ra_Cannot update attribute, because not found in the object'));
4668
4657
  }).then(function () {
4669
- return _this34.setState({
4658
+ return _this33.setState({
4670
4659
  columnsEditCustomDialog: null
4671
4660
  });
4672
4661
  })["catch"](function (e) {
4673
- return _this34.showError(e);
4662
+ return _this33.showError(e);
4674
4663
  });
4675
4664
  } else {
4676
4665
  this.customColumnDialog = null;
@@ -4686,7 +4675,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4686
4675
  }, {
4687
4676
  key: "renderColumnsEditCustomDialog",
4688
4677
  value: function renderColumnsEditCustomDialog() {
4689
- var _this35 = this;
4678
+ var _this34 = this;
4690
4679
  if (this.state.columnsEditCustomDialog) {
4691
4680
  if (!this.customColumnDialog) {
4692
4681
  var value = ObjectBrowser.getCustomValue(this.state.columnsEditCustomDialog.obj, this.state.columnsEditCustomDialog.it);
@@ -4696,69 +4685,69 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4696
4685
  value: (value === null || value === undefined ? '' : value).toString()
4697
4686
  };
4698
4687
  }
4699
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
4688
+ return /*#__PURE__*/_react["default"].createElement(_material.Dialog, {
4700
4689
  onClose: function onClose() {
4701
- return _this35.setState({
4690
+ return _this34.setState({
4702
4691
  columnsEditCustomDialog: null
4703
4692
  });
4704
4693
  },
4705
4694
  maxWidth: "md",
4706
4695
  "aria-labelledby": "custom-dialog-title",
4707
4696
  open: !0
4708
- }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
4697
+ }, /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, {
4709
4698
  id: "custom-dialog-title"
4710
- }, "".concat(this.props.t('ra_Edit object field'), ": ").concat(this.state.columnsEditCustomDialog.obj._id)), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
4699
+ }, "".concat(this.props.t('ra_Edit object field'), ": ").concat(this.state.columnsEditCustomDialog.obj._id)), /*#__PURE__*/_react["default"].createElement(_material.DialogContent, null, /*#__PURE__*/_react["default"].createElement(_material.DialogContentText, {
4711
4700
  id: "alert-dialog-description"
4712
- }, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
4713
- control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
4701
+ }, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_material.FormControlLabel, {
4702
+ control: /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
4714
4703
  onKeyUp: function onKeyUp(e) {
4715
- return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
4704
+ return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
4716
4705
  },
4717
4706
  defaultChecked: this.customColumnDialog.value === 'true',
4718
4707
  onChange: function onChange(e) {
4719
- _this35.customColumnDialog.value = e.target.checked.toString();
4720
- var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
4721
- if (changed === !_this35.state.customColumnDialogValueChanged) {
4722
- _this35.setState({
4708
+ _this34.customColumnDialog.value = e.target.checked.toString();
4709
+ var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
4710
+ if (changed === !_this34.state.customColumnDialogValueChanged) {
4711
+ _this34.setState({
4723
4712
  customColumnDialogValueChanged: changed
4724
4713
  });
4725
4714
  }
4726
4715
  }
4727
4716
  }),
4728
4717
  label: "".concat(this.state.columnsEditCustomDialog.it.name, " (").concat(this.state.columnsEditCustomDialog.it.pathText, ")")
4729
- }) : /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
4718
+ }) : /*#__PURE__*/_react["default"].createElement(_material.TextField, {
4730
4719
  variant: "standard",
4731
4720
  defaultValue: this.customColumnDialog.value,
4732
4721
  fullWidth: true,
4733
4722
  onKeyUp: function onKeyUp(e) {
4734
- return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
4723
+ return e.keyCode === 13 && _this34.onColumnsEditCustomDialogClose(true);
4735
4724
  },
4736
4725
  label: "".concat(this.state.columnsEditCustomDialog.it.name, " (").concat(this.state.columnsEditCustomDialog.it.pathText, ")"),
4737
4726
  onChange: function onChange(e) {
4738
- _this35.customColumnDialog.value = e.target.value;
4739
- var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
4740
- if (changed === !_this35.state.customColumnDialogValueChanged) {
4741
- _this35.setState({
4727
+ _this34.customColumnDialog.value = e.target.value;
4728
+ var changed = _this34.customColumnDialog.value !== _this34.customColumnDialog.initValue;
4729
+ if (changed === !_this34.state.customColumnDialogValueChanged) {
4730
+ _this34.setState({
4742
4731
  customColumnDialogValueChanged: changed
4743
4732
  });
4744
4733
  }
4745
4734
  },
4746
4735
  autoFocus: true
4747
- }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4736
+ }))), /*#__PURE__*/_react["default"].createElement(_material.DialogActions, null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
4748
4737
  variant: "contained",
4749
4738
  onClick: function onClick() {
4750
- return _this35.onColumnsEditCustomDialogClose(true);
4739
+ return _this34.onColumnsEditCustomDialogClose(true);
4751
4740
  },
4752
4741
  disabled: !this.state.customColumnDialogValueChanged,
4753
4742
  color: "primary",
4754
- startIcon: /*#__PURE__*/_react["default"].createElement(_Check["default"], null)
4755
- }, this.props.t('ra_Update')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
4743
+ startIcon: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Check, null)
4744
+ }, this.props.t('ra_Update')), /*#__PURE__*/_react["default"].createElement(_material.Button, {
4756
4745
  color: "grey",
4757
4746
  variant: "contained",
4758
4747
  onClick: function onClick() {
4759
- return _this35.onColumnsEditCustomDialogClose();
4748
+ return _this34.onColumnsEditCustomDialogClose();
4760
4749
  },
4761
- startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
4750
+ startIcon: /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null)
4762
4751
  }, this.props.t('ra_Cancel'))));
4763
4752
  }
4764
4753
  return null;
@@ -4780,14 +4769,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4780
4769
  * @returns {JSX.Element | null}
4781
4770
  */
4782
4771
  function renderCustomValue(obj, it, item) {
4783
- var _this36 = this;
4772
+ var _this35 = this;
4784
4773
  var text = ObjectBrowser.getCustomValue(obj, it);
4785
4774
  if (text !== null && text !== undefined) {
4786
4775
  if (it.edit && !this.props.notEditable && (!it.objTypes || it.objTypes.includes(obj.type))) {
4787
4776
  return /*#__PURE__*/_react["default"].createElement("div", {
4788
4777
  className: _Utils["default"].clsx(this.props.classes.columnCustom, this.props.classes.columnCustomEditable, this.props.classes["columnCustom_".concat(it.align)]),
4789
4778
  onClick: function onClick() {
4790
- return _this36.setState({
4779
+ return _this35.setState({
4791
4780
  columnsEditCustomDialog: {
4792
4781
  item: item,
4793
4782
  it: it,
@@ -4816,7 +4805,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4816
4805
  }, {
4817
4806
  key: "renderLeaf",
4818
4807
  value: function renderLeaf(item, isExpanded, classes, counter) {
4819
- var _this37 = this,
4808
+ var _this36 = this,
4820
4809
  _common$alias,
4821
4810
  _common$alias2,
4822
4811
  _this$states$id2,
@@ -4837,12 +4826,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4837
4826
  iconFolder = isExpanded ? /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], {
4838
4827
  className: classes.cellIdIconFolder,
4839
4828
  onClick: function onClick() {
4840
- return _this37.toggleExpanded(id);
4829
+ return _this36.toggleExpanded(id);
4841
4830
  }
4842
4831
  }) : /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
4843
4832
  className: classes.cellIdIconFolder,
4844
4833
  onClick: function onClick() {
4845
- return _this37.toggleExpanded(id);
4834
+ return _this36.toggleExpanded(id);
4846
4835
  }
4847
4836
  });
4848
4837
  } else if (obj.common && obj.common.write === false && obj.type === 'state') {
@@ -4890,7 +4879,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4890
4879
  item.data.pef = pef;
4891
4880
  item.data.lang = this.props.lang;
4892
4881
  }
4893
- 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"], {
4882
+ var checkbox = this.props.multiSelect && this.objects[id] && (!this.props.types || this.props.types.includes(this.objects[id].type)) ? /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
4894
4883
  className: classes.checkBox,
4895
4884
  checked: this.state.selected.includes(id)
4896
4885
  }) : null;
@@ -4929,10 +4918,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4929
4918
  onClick: function onClick(e) {
4930
4919
  e.stopPropagation();
4931
4920
  e.preventDefault();
4932
- _this37.onSelect(common.alias.id.read);
4921
+ _this36.onSelect(common.alias.id.read);
4933
4922
  setTimeout(function () {
4934
- _this37.expandAllSelected(function () {
4935
- return _this37.scrollToItem(common.alias.id.read);
4923
+ return _this36.expandAllSelected(function () {
4924
+ return _this36.scrollToItem(common.alias.id.read);
4936
4925
  });
4937
4926
  }, 100);
4938
4927
  },
@@ -4941,10 +4930,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4941
4930
  onClick: function onClick(e) {
4942
4931
  e.stopPropagation();
4943
4932
  e.preventDefault();
4944
- _this37.onSelect(common.alias.id.write);
4933
+ _this36.onSelect(common.alias.id.write);
4945
4934
  setTimeout(function () {
4946
- _this37.expandAllSelected(function () {
4947
- return _this37.scrollToItem(common.alias.id.write);
4935
+ return _this36.expandAllSelected(function () {
4936
+ return _this36.scrollToItem(common.alias.id.write);
4948
4937
  });
4949
4938
  }, 100);
4950
4939
  },
@@ -4953,17 +4942,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4953
4942
  onClick: function onClick(e) {
4954
4943
  e.stopPropagation();
4955
4944
  e.preventDefault();
4956
- _this37.onSelect(common.alias.id);
4945
+ _this36.onSelect(common.alias.id);
4957
4946
  setTimeout(function () {
4958
- _this37.expandAllSelected(function () {
4959
- return _this37.scrollToItem(common.alias.id);
4947
+ return _this36.expandAllSelected(function () {
4948
+ return _this36.scrollToItem(common.alias.id);
4960
4949
  });
4961
4950
  }, 100);
4962
4951
  },
4963
4952
  className: _Utils["default"].clsx(classes.cellIdAlias, classes.cellIdAliasAlone)
4964
4953
  }, "\u2192", common.alias.id) : null;
4965
4954
  var checkColor = common === null || common === void 0 ? void 0 : common.color;
4966
- var invertBackground = undefined;
4955
+ var invertBackground;
4967
4956
  if (checkColor && !this.state.selected.includes(id)) {
4968
4957
  var background = this.props.themeName === 'dark' ? '#1f1f1f' : this.props.themeName === 'blue' ? '#222a2e' : '#FFFFFF';
4969
4958
  var distance = _Utils["default"].colorDistance(checkColor, background);
@@ -4988,17 +4977,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
4988
4977
  _id = "".concat(id, ".").concat(_id);
4989
4978
  }
4990
4979
  ids[name] = _id;
4991
- if (!_this37.states[_id]) {
4992
- var _this37$objects$_id;
4993
- if (((_this37$objects$_id = _this37.objects[_id]) === null || _this37$objects$_id === void 0 ? void 0 : _this37$objects$_id.type) === 'state') {
4994
- !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
4995
- _this37.states[_id] = {
4980
+ if (!_this36.states[_id]) {
4981
+ var _this36$objects$_id;
4982
+ if (((_this36$objects$_id = _this36.objects[_id]) === null || _this36$objects$_id === void 0 ? void 0 : _this36$objects$_id.type) === 'state') {
4983
+ !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
4984
+ _this36.states[_id] = {
4996
4985
  val: null
4997
4986
  };
4998
- _this37.subscribe(_id);
4987
+ _this36.subscribe(_id);
4999
4988
  }
5000
4989
  } else {
5001
- !_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
4990
+ !_this36.recordStates.includes(_id) && _this36.recordStates.push(_id);
5002
4991
  }
5003
4992
  });
5004
4993
  // calculate color
@@ -5007,67 +4996,67 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5007
4996
  if (common.statusStates.errorId && this.states[ids.errorId] && this.states[ids.errorId].val) {
5008
4997
  checkColor = this.props.themeType === 'dark' ? COLOR_NAME_ERROR_DARK : COLOR_NAME_ERROR_LIGHT;
5009
4998
  colorSet = true;
5010
- icons.push( /*#__PURE__*/_react["default"].createElement(_Error["default"], {
4999
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Error, {
5011
5000
  key: "error",
5012
5001
  title: this.texts.deviceError,
5013
5002
  className: this.props.classes.iconDeviceError
5014
5003
  }));
5015
5004
  }
5016
- if (ids.onlineId && this.states[ids.onlineId] && this.states[ids.onlineId].val !== null) {
5005
+ if (ids.onlineId && this.states[ids.onlineId]) {
5017
5006
  if (!colorSet) {
5018
5007
  if (this.states[ids.onlineId].val) {
5019
5008
  checkColor = this.props.themeType === 'dark' ? COLOR_NAME_CONNECTED_DARK : COLOR_NAME_CONNECTED_LIGHT;
5020
- icons.push( /*#__PURE__*/_react["default"].createElement(_Wifi["default"], {
5009
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Wifi, {
5021
5010
  key: "conn",
5022
5011
  title: this.texts.deviceError,
5023
5012
  className: this.props.classes.iconDeviceConnected
5024
5013
  }));
5025
5014
  } else {
5026
5015
  checkColor = this.props.themeType === 'dark' ? COLOR_NAME_DISCONNECTED_DARK : COLOR_NAME_DISCONNECTED_LIGHT;
5027
- icons.push( /*#__PURE__*/_react["default"].createElement(_WifiOff["default"], {
5016
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.WifiOff, {
5028
5017
  key: "disc",
5029
5018
  title: this.texts.deviceError,
5030
5019
  className: this.props.classes.iconDeviceDisconnected
5031
5020
  }));
5032
5021
  }
5033
5022
  } else if (this.states[ids.onlineId].val) {
5034
- icons.push( /*#__PURE__*/_react["default"].createElement(_Wifi["default"], {
5023
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Wifi, {
5035
5024
  key: "conn",
5036
5025
  title: this.texts.deviceError,
5037
5026
  className: this.props.classes.iconDeviceConnected
5038
5027
  }));
5039
5028
  } else {
5040
- icons.push( /*#__PURE__*/_react["default"].createElement(_WifiOff["default"], {
5029
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.WifiOff, {
5041
5030
  key: "disc",
5042
5031
  title: this.texts.deviceError,
5043
5032
  className: this.props.classes.iconDeviceDisconnected
5044
5033
  }));
5045
5034
  }
5046
- } else if (ids.offlineId && this.states[ids.offlineId] && this.states[ids.offlineId].val !== null) {
5035
+ } else if (ids.offlineId && this.states[ids.offlineId]) {
5047
5036
  if (!colorSet) {
5048
5037
  if (this.states[ids.offlineId].val) {
5049
5038
  checkColor = this.props.themeType === 'dark' ? COLOR_NAME_DISCONNECTED_DARK : COLOR_NAME_DISCONNECTED_LIGHT;
5050
- icons.push( /*#__PURE__*/_react["default"].createElement(_WifiOff["default"], {
5039
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.WifiOff, {
5051
5040
  key: "disc",
5052
5041
  title: this.texts.deviceError,
5053
5042
  className: this.props.classes.iconDeviceDisconnected
5054
5043
  }));
5055
5044
  } else {
5056
5045
  checkColor = this.props.themeType === 'dark' ? COLOR_NAME_CONNECTED_DARK : COLOR_NAME_CONNECTED_LIGHT;
5057
- icons.push( /*#__PURE__*/_react["default"].createElement(_Wifi["default"], {
5046
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Wifi, {
5058
5047
  key: "conn",
5059
5048
  title: this.texts.deviceError,
5060
5049
  className: this.props.classes.iconDeviceConnected
5061
5050
  }));
5062
5051
  }
5063
5052
  } else if (this.states[ids.offlineId].val) {
5064
- icons.push( /*#__PURE__*/_react["default"].createElement(_WifiOff["default"], {
5053
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.WifiOff, {
5065
5054
  key: "disc",
5066
5055
  title: this.texts.deviceError,
5067
5056
  className: this.props.classes.iconDeviceDisconnected
5068
5057
  }));
5069
5058
  } else {
5070
- icons.push( /*#__PURE__*/_react["default"].createElement(_Wifi["default"], {
5059
+ icons.push( /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Wifi, {
5071
5060
  key: "conn",
5072
5061
  title: this.texts.deviceError,
5073
5062
  className: this.props.classes.iconDeviceConnected
@@ -5091,7 +5080,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5091
5080
  useDesc = !!useDesc;
5092
5081
  }
5093
5082
  }
5094
- return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
5083
+ return /*#__PURE__*/_react["default"].createElement(_material.Grid, {
5095
5084
  container: true,
5096
5085
  direction: "row",
5097
5086
  wrap: "nowrap",
@@ -5099,16 +5088,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5099
5088
  key: id,
5100
5089
  id: id,
5101
5090
  onClick: function onClick() {
5102
- return _this37.onSelect(id);
5091
+ return _this36.onSelect(id);
5103
5092
  },
5104
5093
  onDoubleClick: function onDoubleClick() {
5105
5094
  if (!item.children) {
5106
- _this37.onSelect(id, true);
5095
+ _this36.onSelect(id, true);
5107
5096
  } else {
5108
- _this37.toggleExpanded(id);
5097
+ _this36.toggleExpanded(id);
5109
5098
  }
5110
5099
  }
5111
- }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
5100
+ }, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
5112
5101
  container: true,
5113
5102
  wrap: "nowrap",
5114
5103
  direction: "row",
@@ -5117,35 +5106,31 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5117
5106
  width: this.columnsVisibility.id,
5118
5107
  paddingLeft: paddingLeft
5119
5108
  }
5120
- }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
5109
+ }, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
5121
5110
  item: true,
5122
5111
  container: true,
5123
- alignItems: "center",
5124
- style: {
5125
- // color: checkColor,
5126
- // background: invertBackground,
5127
- }
5128
- }, checkbox, iconFolder), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
5112
+ alignItems: "center"
5113
+ }, checkbox, iconFolder), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
5129
5114
  item: true,
5130
5115
  style: {
5131
5116
  color: checkColor
5132
5117
  },
5133
5118
  className: _Utils["default"].clsx(classes.cellIdSpan, invertBackground && classes.invertedBackground)
5134
- }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
5119
+ }, /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
5135
5120
  title: getIdFieldTooltip(item.data, this.props.classes, this.props.lang),
5136
5121
  classes: {
5137
5122
  popper: this.props.classes.tooltip
5138
5123
  }
5139
5124
  }, /*#__PURE__*/_react["default"].createElement("div", null, item.data.name)), alias, icons), /*#__PURE__*/_react["default"].createElement("div", {
5140
5125
  className: _Utils["default"].clsx(classes.grow, invertBackground && classes.invertedBackgroundFlex)
5141
- }), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
5126
+ }), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
5142
5127
  item: true,
5143
5128
  container: true,
5144
5129
  alignItems: "center"
5145
5130
  }, iconItem), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5146
5131
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5147
5132
  onClick: function onClick(e) {
5148
- return _this37.onCopy(e, id);
5133
+ return _this36.onCopy(e, id);
5149
5134
  }
5150
5135
  }))), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
5151
5136
  className: _Utils["default"].clsx(classes.cellName, useDesc && classes.cellNameWithDesc),
@@ -5159,7 +5144,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5159
5144
  }, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
5160
5145
  className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
5161
5146
  onClick: function onClick(e) {
5162
- return _this37.onCopy(e, item.data.title);
5147
+ return _this36.onCopy(e, item.data.title);
5163
5148
  }
5164
5149
  })) : null) : null, !this.state.statesView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
5165
5150
  className: classes.cellType,
@@ -5173,7 +5158,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5173
5158
  cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? 'text' : 'default'
5174
5159
  },
5175
5160
  onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? function () {
5176
- return _this37.setState({
5161
+ return _this36.setState({
5177
5162
  roleDialog: item.data.id
5178
5163
  });
5179
5164
  } : undefined
@@ -5184,8 +5169,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5184
5169
  cursor: enumEditable ? 'text' : 'default'
5185
5170
  },
5186
5171
  onClick: enumEditable ? function () {
5187
- var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'roomEnums');
5188
- _this37.setState({
5172
+ var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'roomEnums');
5173
+ _this36.setState({
5189
5174
  enumDialogEnums: enums,
5190
5175
  enumDialog: {
5191
5176
  item: item,
@@ -5201,8 +5186,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5201
5186
  cursor: enumEditable ? 'text' : 'default'
5202
5187
  },
5203
5188
  onClick: enumEditable ? function () {
5204
- var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'funcEnums');
5205
- _this37.setState({
5189
+ var enums = findEnumsForObjectAsIds(_this36.info, item.data.id, 'funcEnums');
5190
+ _this36.setState({
5206
5191
  enumDialogEnums: enums,
5207
5192
  enumDialog: {
5208
5193
  item: item,
@@ -5237,11 +5222,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5237
5222
  return /*#__PURE__*/_react["default"].createElement("div", {
5238
5223
  className: classes.cellAdapter,
5239
5224
  style: {
5240
- width: _this37.columnsVisibility[it.id]
5225
+ width: _this36.columnsVisibility[it.id]
5241
5226
  },
5242
5227
  key: it.id,
5243
5228
  title: "".concat(it.adapter, " => ").concat(it.pathText)
5244
- }, _this37.renderCustomValue(obj, it, item));
5229
+ }, _this36.renderCustomValue(obj, it, item));
5245
5230
  }), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
5246
5231
  className: classes.cellValue,
5247
5232
  style: {
@@ -5249,29 +5234,29 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5249
5234
  cursor: valueEditable ? (common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : item.data.button ? 'grab' : 'text' : 'default'
5250
5235
  },
5251
5236
  onClick: valueEditable ? function () {
5252
- if (!obj || !_this37.states) {
5237
+ if (!obj || !_this36.states) {
5253
5238
  // return;
5254
5239
  } else if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
5255
- _this37.setState({
5240
+ _this36.setState({
5256
5241
  viewFileDialog: id
5257
5242
  });
5258
- } else
5243
+ // eslint-disable-next-line brace-style
5244
+ } else if (!_this36.state.filter.expertMode && item.data.button) {
5259
5245
  // in non-expert mode control button directly
5260
- if (!_this37.state.filter.expertMode && item.data.button) {
5261
- _this37.props.socket.setState(id, true)["catch"](function (e) {
5262
- return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
5263
- });
5264
- } else {
5265
- _this37.edit = {
5266
- val: _this37.states[id] ? _this37.states[id].val : '',
5267
- q: _this37.states[id] ? _this37.states[id].q || 0 : 0,
5268
- ack: false,
5269
- id: id
5270
- };
5271
- _this37.setState({
5272
- updateOpened: true
5273
- });
5274
- }
5246
+ _this36.props.socket.setState(id, true)["catch"](function (e) {
5247
+ return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
5248
+ });
5249
+ } else {
5250
+ _this36.edit = {
5251
+ val: _this36.states[id] ? _this36.states[id].val : '',
5252
+ q: _this36.states[id] ? _this36.states[id].q || 0 : 0,
5253
+ ack: false,
5254
+ id: id
5255
+ };
5256
+ _this36.setState({
5257
+ updateOpened: true
5258
+ });
5259
+ }
5275
5260
  } : undefined
5276
5261
  }, this.renderColumnValue(id, item, classes)) : null, this.columnsVisibility.buttons ? /*#__PURE__*/_react["default"].createElement("div", {
5277
5262
  className: classes.cellButtons,
@@ -5292,7 +5277,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5292
5277
  }, {
5293
5278
  key: "renderItem",
5294
5279
  value: function renderItem(root, isExpanded, classes, counter) {
5295
- var _this38 = this;
5280
+ var _this37 = this;
5296
5281
  var items = [];
5297
5282
  counter = counter || {
5298
5283
  count: 0
@@ -5320,9 +5305,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5320
5305
  if (!this.state.foldersFirst) {
5321
5306
  root.children && items.push(root.children.map(function (item) {
5322
5307
  // do not render too many items in column editor mode
5323
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5308
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5324
5309
  if (item.data.sumVisibility) {
5325
- return _this38.renderItem(item, undefined, classes, counter);
5310
+ return _this37.renderItem(item, undefined, classes, counter);
5326
5311
  }
5327
5312
  }
5328
5313
  return null;
@@ -5332,9 +5317,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5332
5317
  root.children && items.push(root.children.map(function (item) {
5333
5318
  if (item.children) {
5334
5319
  // do not render too many items in column editor mode
5335
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5320
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5336
5321
  if (item.data.sumVisibility) {
5337
- return _this38.renderItem(item, undefined, classes, counter);
5322
+ return _this37.renderItem(item, undefined, classes, counter);
5338
5323
  }
5339
5324
  }
5340
5325
  }
@@ -5344,9 +5329,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5344
5329
  root.children && items.push(root.children.map(function (item) {
5345
5330
  if (!item.children) {
5346
5331
  // do not render too many items in column editor mode
5347
- if (!_this38.state.columnsSelectorShow || counter.count < 15) {
5332
+ if (!_this37.state.columnsSelectorShow || counter.count < 15) {
5348
5333
  if (item.data.sumVisibility) {
5349
- return _this38.renderItem(item, undefined, classes, counter);
5334
+ return _this37.renderItem(item, undefined, classes, counter);
5350
5335
  }
5351
5336
  }
5352
5337
  }
@@ -5367,7 +5352,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5367
5352
  }, {
5368
5353
  key: "calculateColumnsVisibility",
5369
5354
  value: function calculateColumnsVisibility(columnsAuto, columns, columnsForAdmin, columnsWidths) {
5370
- var _this39 = this;
5355
+ var _this38 = this;
5371
5356
  columnsWidths = columnsWidths || this.state.columnsWidths;
5372
5357
  columnsForAdmin = columnsForAdmin || this.state.columnsForAdmin;
5373
5358
  columns = columns || this.state.columns || [];
@@ -5451,7 +5436,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5451
5436
  Object.keys(columnsForAdmin).sort().forEach(function (adapter) {
5452
5437
  return columnsForAdmin[adapter].forEach(function (column) {
5453
5438
  var id = "_".concat(adapter, "_").concat(column.path);
5454
- _this39.columnsVisibility[id] = columns.includes(id);
5439
+ _this38.columnsVisibility[id] = columns.includes(id);
5455
5440
  if (columns.includes(id)) {
5456
5441
  var item = {
5457
5442
  adapter: adapter,
@@ -5469,11 +5454,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5469
5454
  item.objTypes = column.objTypes;
5470
5455
  }
5471
5456
  }
5472
- _this39.adapterColumns.push(item);
5473
- _this39.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this39.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5474
- _widthSum2 += _this39.columnsVisibility[id];
5457
+ _this38.adapterColumns.push(item);
5458
+ _this38.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this38.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
5459
+ _widthSum2 += _this38.columnsVisibility[id];
5475
5460
  } else {
5476
- _this39.columnsVisibility[id] = 0;
5461
+ _this38.columnsVisibility[id] = 0;
5477
5462
  }
5478
5463
  });
5479
5464
  });
@@ -5494,15 +5479,44 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5494
5479
  this.columnsVisibility.nameHeader = "calc(100% - ".concat(_widthSum2 + 5 + this.state.scrollBarWidth, "px)");
5495
5480
  } else {
5496
5481
  var newWidth = Object.keys(this.columnsVisibility).reduce(function (accumulator, name) {
5497
- if (name === 'id' || typeof _this39.columnsVisibility[name] === 'string' || !_this39.columnsVisibility[name]) {
5482
+ if (name === 'id' || typeof _this38.columnsVisibility[name] === 'string' || !_this38.columnsVisibility[name]) {
5498
5483
  return accumulator;
5499
5484
  }
5500
- return accumulator + _this39.columnsVisibility[name];
5485
+ return accumulator + _this38.columnsVisibility[name];
5501
5486
  }, 0);
5502
5487
  this.columnsVisibility.id = "calc(100% - ".concat(newWidth, "px)");
5503
5488
  }
5504
5489
  }
5505
5490
  }
5491
+ }, {
5492
+ key: "navigateKeyPress",
5493
+ value:
5494
+ /**
5495
+ * Handle keyboard events for navigation
5496
+ *
5497
+ * @param {KeyboardEvent} event
5498
+ */
5499
+ function navigateKeyPress(event) {
5500
+ var selectedId = this.state.selectedNonObject || this.state.selected[0];
5501
+ if (!selectedId) {
5502
+ return;
5503
+ }
5504
+ if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {
5505
+ event.preventDefault();
5506
+ var ids = [];
5507
+ this.tableRef.current.childNodes.forEach(function (node) {
5508
+ return ids.push(node.id);
5509
+ });
5510
+ var idx = ids.indexOf(selectedId);
5511
+ var newIdx = event.code === 'ArrowDown' ? idx + 1 : idx - 1;
5512
+ var newId = ids[newIdx] || selectedId;
5513
+ this.onSelect(newId);
5514
+ this.scrollToItem(newId);
5515
+ }
5516
+ if (event.code === 'ArrowRight' || event.code === 'ArrowLeft') {
5517
+ this.toggleExpanded(selectedId);
5518
+ }
5519
+ }
5506
5520
  }, {
5507
5521
  key: "renderHeader",
5508
5522
  value:
@@ -5511,18 +5525,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5511
5525
  * @returns {JSX.Element}
5512
5526
  */
5513
5527
  function renderHeader() {
5514
- var _this40 = this;
5528
+ var _this39 = this;
5515
5529
  var classes = this.props.classes;
5516
5530
  var filterClearInValue = null;
5517
5531
  if (!this.columnsVisibility.buttons && !this.isFilterEmpty()) {
5518
- filterClearInValue = /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
5532
+ filterClearInValue = /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
5519
5533
  onClick: function onClick() {
5520
- return _this40.clearFilter();
5534
+ return _this39.clearFilter();
5521
5535
  },
5522
5536
  className: classes.buttonClearFilter,
5523
5537
  title: this.props.t('ra_Clear filter'),
5524
5538
  size: "large"
5525
- }, /*#__PURE__*/_react["default"].createElement(_IconClearFilter["default"], null), /*#__PURE__*/_react["default"].createElement(_Close["default"], {
5539
+ }, /*#__PURE__*/_react["default"].createElement(_IconClearFilter["default"], null), /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, {
5526
5540
  className: classes.buttonClearFilterIcon
5527
5541
  }));
5528
5542
  }
@@ -5608,7 +5622,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5608
5622
  return /*#__PURE__*/_react["default"].createElement("div", {
5609
5623
  className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
5610
5624
  style: {
5611
- width: _this40.columnsVisibility[item.id]
5625
+ width: _this39.columnsVisibility[item.id]
5612
5626
  },
5613
5627
  title: item.adapter,
5614
5628
  key: item.id,
@@ -5644,31 +5658,31 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5644
5658
  }, {
5645
5659
  key: "renderToast",
5646
5660
  value: function renderToast() {
5647
- var _this41 = this;
5648
- return /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], {
5661
+ var _this40 = this;
5662
+ return /*#__PURE__*/_react["default"].createElement(_material.Snackbar, {
5649
5663
  open: !!this.state.toast,
5650
5664
  autoHideDuration: 3000,
5651
5665
  onClick: function onClick() {
5652
- return _this41.setState({
5666
+ return _this40.setState({
5653
5667
  toast: ''
5654
5668
  });
5655
5669
  },
5656
5670
  onClose: function onClose() {
5657
- return _this41.setState({
5671
+ return _this40.setState({
5658
5672
  toast: ''
5659
5673
  });
5660
5674
  },
5661
5675
  message: this.state.toast,
5662
- action: /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
5676
+ action: /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
5663
5677
  size: "small",
5664
5678
  "aria-label": "close",
5665
5679
  color: "inherit",
5666
5680
  onClick: function onClick() {
5667
- return _this41.setState({
5681
+ return _this40.setState({
5668
5682
  toast: ''
5669
5683
  });
5670
5684
  }
5671
- }, /*#__PURE__*/_react["default"].createElement(_Close["default"], {
5685
+ }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, {
5672
5686
  fontSize: "small"
5673
5687
  }))
5674
5688
  });
@@ -5680,12 +5694,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5680
5694
  }, {
5681
5695
  key: "componentDidUpdate",
5682
5696
  value: function componentDidUpdate() {
5683
- var _this42 = this;
5697
+ var _this41 = this;
5684
5698
  if (this.tableRef.current) {
5685
5699
  var scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
5686
5700
  if (this.state.scrollBarWidth !== scrollBarWidth) {
5687
5701
  setTimeout(function () {
5688
- return _this42.setState({
5702
+ return _this41.setState({
5689
5703
  scrollBarWidth: scrollBarWidth
5690
5704
  });
5691
5705
  }, 100);
@@ -5713,12 +5727,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5713
5727
  }, {
5714
5728
  key: "renderCustomDialog",
5715
5729
  value: function renderCustomDialog() {
5716
- var _this43 = this;
5730
+ var _this42 = this;
5717
5731
  if (this.state.customDialog && this.props.objectCustomDialog) {
5718
5732
  var ObjectCustomDialog = this.props.objectCustomDialog;
5719
5733
  return /*#__PURE__*/_react["default"].createElement(ObjectCustomDialog, {
5720
5734
  reportChangedIds: function reportChangedIds(changedIds) {
5721
- return _this43.changedIds = (0, _toConsumableArray2["default"])(changedIds);
5735
+ return _this42.changedIds = (0, _toConsumableArray2["default"])(changedIds);
5722
5736
  },
5723
5737
  objectIDs: this.state.customDialog,
5724
5738
  expertMode: this.state.filter.expertMode,
@@ -5732,16 +5746,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5732
5746
  objects: this.objects,
5733
5747
  customsInstances: this.info.customs,
5734
5748
  onClose: function onClose() {
5735
- _this43.pauseSubscribe(false);
5736
- _this43.setState({
5749
+ _this42.pauseSubscribe(false);
5750
+ _this42.setState({
5737
5751
  customDialog: null
5738
5752
  });
5739
- if (_this43.changedIds) {
5740
- _this43.changedIds = null;
5753
+ if (_this42.changedIds) {
5754
+ _this42.changedIds = null;
5741
5755
  // update all changed IDs
5742
- _this43.forceUpdate();
5756
+ _this42.forceUpdate();
5743
5757
  }
5744
- _this43.props.router && _this43.props.router.doNavigate('tab-objects');
5758
+ _this42.props.router && _this42.props.router.doNavigate('tab-objects');
5745
5759
  }
5746
5760
  });
5747
5761
  }
@@ -5755,14 +5769,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5755
5769
  }, {
5756
5770
  key: "onUpdate",
5757
5771
  value: function onUpdate(valAck) {
5758
- var _this44 = this;
5772
+ var _this43 = this;
5759
5773
  this.props.socket.setState(this.edit.id, {
5760
5774
  val: valAck.val,
5761
5775
  ack: valAck.ack,
5762
5776
  q: valAck.q || 0,
5763
5777
  expire: valAck.expire || undefined
5764
5778
  })["catch"](function (e) {
5765
- return _this44.showError("Cannot write value: ".concat(e));
5779
+ return _this43.showError("Cannot write value: ".concat(e));
5766
5780
  });
5767
5781
  }
5768
5782
 
@@ -5773,7 +5787,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5773
5787
  }, {
5774
5788
  key: "renderEditObjectDialog",
5775
5789
  value: function renderEditObjectDialog() {
5776
- var _this45 = this;
5790
+ var _this44 = this;
5777
5791
  if (!this.state.editObjectDialog || !this.props.objectBrowserEditObject) {
5778
5792
  return null;
5779
5793
  }
@@ -5791,37 +5805,37 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5791
5805
  t: this.props.t,
5792
5806
  expertMode: this.state.filter.expertMode,
5793
5807
  onNewObject: function onNewObject(obj) {
5794
- return _this45.props.socket.setObject(obj._id, obj).then(function () {
5795
- return _this45.setState({
5808
+ return _this44.props.socket.setObject(obj._id, obj).then(function () {
5809
+ return _this44.setState({
5796
5810
  editObjectDialog: obj._id
5797
5811
  }, function () {
5798
- return _this45.onSelect(obj._id);
5812
+ return _this44.onSelect(obj._id);
5799
5813
  });
5800
5814
  })["catch"](function (e) {
5801
- return _this45.showError("Cannot write object: ".concat(e));
5815
+ return _this44.showError("Cannot write object: ".concat(e));
5802
5816
  });
5803
5817
  },
5804
5818
  onClose: function onClose(obj) {
5805
5819
  if (obj) {
5806
5820
  var updateAlias;
5807
- if (_this45.state.editObjectDialog.startsWith('alias.')) {
5808
- var _this45$objects$_this, _obj$common5;
5809
- 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)) {
5810
- updateAlias = _this45.state.editObjectDialog;
5821
+ if (_this44.state.editObjectDialog.startsWith('alias.')) {
5822
+ var _this44$objects$_this, _obj$common5;
5823
+ 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)) {
5824
+ updateAlias = _this44.state.editObjectDialog;
5811
5825
  }
5812
5826
  }
5813
- _this45.props.socket.setObject(obj._id, obj).then(function () {
5814
- if (updateAlias && _this45.subscribes.includes(updateAlias)) {
5815
- _this45.unsubscribe(updateAlias);
5827
+ _this44.props.socket.setObject(obj._id, obj).then(function () {
5828
+ if (updateAlias && _this44.subscribes.includes(updateAlias)) {
5829
+ _this44.unsubscribe(updateAlias);
5816
5830
  setTimeout(function () {
5817
- return _this45.subscribe(updateAlias);
5831
+ return _this44.subscribe(updateAlias);
5818
5832
  }, 100);
5819
5833
  }
5820
5834
  })["catch"](function (e) {
5821
- return _this45.showError("Cannot write object: ".concat(e));
5835
+ return _this44.showError("Cannot write object: ".concat(e));
5822
5836
  });
5823
5837
  }
5824
- _this45.setState({
5838
+ _this44.setState({
5825
5839
  editObjectDialog: ''
5826
5840
  });
5827
5841
  }
@@ -5835,7 +5849,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5835
5849
  }, {
5836
5850
  key: "renderViewObjectFileDialog",
5837
5851
  value: function renderViewObjectFileDialog() {
5838
- var _this46 = this;
5852
+ var _this45 = this;
5839
5853
  if (!this.state.viewFileDialog || !this.props.objectBrowserViewFile) {
5840
5854
  return null;
5841
5855
  }
@@ -5849,7 +5863,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5849
5863
  t: this.props.t,
5850
5864
  expertMode: this.state.filter.expertMode,
5851
5865
  onClose: function onClose() {
5852
- return _this46.setState({
5866
+ return _this45.setState({
5853
5867
  viewFileDialog: ''
5854
5868
  });
5855
5869
  }
@@ -5864,7 +5878,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5864
5878
  key: "renderEditValueDialog",
5865
5879
  value: function renderEditValueDialog() {
5866
5880
  var _this$objects$this$ed,
5867
- _this47 = this;
5881
+ _this46 = this;
5868
5882
  if (!this.state.updateOpened || !this.props.objectBrowserValue) {
5869
5883
  return null;
5870
5884
  }
@@ -5891,22 +5905,30 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5891
5905
  defaultHistory: this.defaultHistory,
5892
5906
  dateFormat: this.props.dateFormat,
5893
5907
  onClose: function onClose(res) {
5894
- _this47.setState({
5908
+ _this46.setState({
5895
5909
  updateOpened: false
5896
5910
  });
5897
- res && _this47.onUpdate(res);
5911
+ res && _this46.onUpdate(res);
5898
5912
  }
5899
5913
  });
5900
5914
  }
5901
- }, {
5902
- key: "render",
5903
- value:
5915
+
5916
+ // extendObject = (id, data) =>
5917
+ // this.props.socket.extendObject(id, data)
5918
+ // .catch(error => window.alert(error));
5919
+
5920
+ // setObject = (id, data) =>
5921
+ // this.props.socket.setObject(id, data)
5922
+ // .catch(error => window.alert(error));
5923
+
5904
5924
  /**
5905
5925
  * The rendering method of this component.
5906
5926
  * @returns {JSX.Element}
5907
5927
  */
5908
- function render() {
5909
- var _this48 = this;
5928
+ }, {
5929
+ key: "render",
5930
+ value: function render() {
5931
+ var _this47 = this;
5910
5932
  this.recordStates = [];
5911
5933
  this.unsubscribeTimer && clearTimeout(this.unsubscribeTimer);
5912
5934
 
@@ -5919,13 +5941,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5919
5941
  applyFilter(this.root, this.state.filter, this.props.lang, this.objects, null, counter, this.props.customFilter, this.props.types);
5920
5942
  if (counter.count < 500 && !this.state.expandAllVisible) {
5921
5943
  setTimeout(function () {
5922
- return _this48.setState({
5944
+ return _this47.setState({
5923
5945
  expandAllVisible: true
5924
5946
  });
5925
5947
  });
5926
5948
  } else if (counter.count >= 500 && this.state.expandAllVisible) {
5927
5949
  setTimeout(function () {
5928
- return _this48.setState({
5950
+ return _this47.setState({
5929
5951
  expandAllVisible: false
5930
5952
  });
5931
5953
  });
@@ -5933,11 +5955,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5933
5955
  this.lastAppliedFilter = jsonFilter;
5934
5956
  }
5935
5957
  this.unsubscribeTimer = setTimeout(function () {
5936
- _this48.unsubscribeTimer = null;
5937
- _this48.checkUnsubscribes();
5958
+ _this47.unsubscribeTimer = null;
5959
+ _this47.checkUnsubscribes();
5938
5960
  }, 200);
5939
5961
  if (!this.state.loaded) {
5940
- return /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], {
5962
+ return /*#__PURE__*/_react["default"].createElement(_material.CircularProgress, {
5941
5963
  key: "".concat(this.props.dialogName, "_c")
5942
5964
  });
5943
5965
  }
@@ -5945,7 +5967,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
5945
5967
  var items = this.renderItem(this.root, undefined, classes);
5946
5968
  return /*#__PURE__*/_react["default"].createElement(_TabContainer["default"], {
5947
5969
  key: this.props.dialogName,
5948
- classes: {}
5970
+ classes: {},
5971
+ onKeyDown: function onKeyDown(event) {
5972
+ return _this47.navigateKeyPress(event);
5973
+ },
5974
+ tabIndex: 0
5949
5975
  }, /*#__PURE__*/_react["default"].createElement(_TabHeader["default"], null, this.getToolbar()), /*#__PURE__*/_react["default"].createElement(_TabContent["default"], {
5950
5976
  classes: {}
5951
5977
  }, this.renderHeader(), /*#__PURE__*/_react["default"].createElement("div", {
@@ -6119,6 +6145,7 @@ ObjectBrowser.propTypes = {
6119
6145
  // optional ['state', 'instance', 'channel']
6120
6146
  columns: _propTypes["default"].array,
6121
6147
  // optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons']
6148
+ // eslint-disable-next-line react/no-unused-prop-types
6122
6149
  root: _propTypes["default"].string,
6123
6150
  // optional, shows only elements of this root
6124
6151
 
@@ -6128,14 +6155,12 @@ ObjectBrowser.propTypes = {
6128
6155
  // function to filter out all unnecessary objects. It cannot be used together with "types"
6129
6156
  // Example for function: `obj => obj.common && obj.common.type === 'boolean'` to show only boolean states
6130
6157
 
6131
- dragSettings: _propTypes["default"].object,
6132
6158
  DragWrapper: _propTypes["default"].func,
6133
- dragEnabled: _propTypes["default"].bool,
6134
- useDrag: _propTypes["default"].func
6159
+ dragEnabled: _propTypes["default"].bool
6135
6160
  };
6136
6161
 
6137
6162
  /** @type {typeof ObjectBrowser} */
6138
- var _export = (0, _withWidth["default"])()((0, _withStyles["default"])(styles)(ObjectBrowser));
6163
+ var _export = (0, _withWidth["default"])()((0, _styles.withStyles)(styles)(ObjectBrowser));
6139
6164
  var _default = _export;
6140
6165
  exports["default"] = _default;
6141
6166
  //# sourceMappingURL=ObjectBrowser.js.map