@iobroker/adapter-react-v5 4.11.5 → 4.12.0

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.
@@ -35,6 +35,7 @@ const icons_material_1 = require("@mui/icons-material");
35
35
  const fa_1 = require("react-icons/fa");
36
36
  const Utils_1 = __importDefault(require("./Utils"));
37
37
  const i18n_1 = __importDefault(require("../i18n"));
38
+ const Icon_1 = __importDefault(require("./Icon"));
38
39
  // import 'cropperjs/dist/cropper.css';
39
40
  const cropperStyles = `
40
41
  /*!
@@ -524,7 +525,7 @@ class UploadImage extends react_1.Component {
524
525
  }
525
526
  }) }, i18n_1.default.t('ra_Save')),
526
527
  react_1.default.createElement(material_1.MenuItem, { onClick: () => this.setState({ anchorEl: null, cropHandler: false }) }, i18n_1.default.t('ra_Close')))),
527
- icon && !cropHandler ? react_1.default.createElement("img", { src: icon, className: classes.image, alt: "icon" }) : null,
528
+ icon && !cropHandler ? react_1.default.createElement(Icon_1.default, { src: icon, className: classes.image, alt: "icon" }) : null,
528
529
  icon && crop && cropHandler ? react_1.default.createElement(react_cropper_1.Cropper, { ref: this.cropperRef, className: classes.image, src: icon, initialAspectRatio: 1, viewMode: 1, guides: false, minCropBoxHeight: 10, minCropBoxWidth: 10, background: false, checkOrientation: false }) : null)));
529
530
  }
530
531
  }
@@ -1145,7 +1145,7 @@ class Utils {
1145
1145
  * Get the current theme name (either from local storage or the browser settings).
1146
1146
  */
1147
1147
  static getThemeName(themeName) {
1148
- if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {
1148
+ if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@' && window.vendorPrefix !== 'MV') {
1149
1149
  return window.vendorPrefix;
1150
1150
  }
1151
1151
  return themeName || ((window._localStorage || window.localStorage).getItem('App.themeName') ?
@@ -1165,7 +1165,7 @@ class Utils {
1165
1165
  * Set the theme name and theme type.
1166
1166
  */
1167
1167
  static setThemeName(themeName) {
1168
- if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {
1168
+ if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@' && window.vendorPrefix !== 'MV') {
1169
1169
  return; // ignore
1170
1170
  }
1171
1171
  (window._localStorage || window.localStorage).setItem('App.themeName', themeName);
@@ -1176,7 +1176,7 @@ class Utils {
1176
1176
  * @returns the new theme name.
1177
1177
  */
1178
1178
  static toggleTheme(themeName) {
1179
- if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {
1179
+ if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@' && window.vendorPrefix !== 'MV') {
1180
1180
  return window.vendorPrefix;
1181
1181
  }
1182
1182
  themeName = themeName || (window._localStorage || window.localStorage).getItem('App.themeName') || 'light';
@@ -1198,7 +1198,7 @@ class Utils {
1198
1198
  * @returns list of possible themes
1199
1199
  */
1200
1200
  static getThemeNames() {
1201
- if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {
1201
+ if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@' && window.vendorPrefix !== 'MV') {
1202
1202
  return [window.vendorPrefix];
1203
1203
  }
1204
1204
  return ['light', 'dark', 'blue', 'colored'];
@@ -38,9 +38,8 @@ interface DialogSelectIDProps {
38
38
  cancel?: string;
39
39
  onClose: () => void;
40
40
  onOk: (selected: string | string[] | undefined, name: string) => void;
41
- classes: Record<string, string>;
42
41
  filterFunc?: string | ((obj: ioBroker.Object) => boolean);
43
- filters: SelectIDFilters;
42
+ filters?: SelectIDFilters;
44
43
  root?: string;
45
44
  }
46
45
  interface DialogSelectIDState {
@@ -51,7 +51,7 @@ class DialogSelectID extends react_1.Component {
51
51
  this.filters = {};
52
52
  }
53
53
  if (props.filters) {
54
- this.filters = Object.assign(Object.assign({}, this.filters), props.filters);
54
+ this.filters = Object.assign(Object.assign({}, this.filters), (props.filters || {}));
55
55
  }
56
56
  let selected = this.props.selected || [];
57
57
  if (!Array.isArray(selected)) {
@@ -169,7 +169,7 @@ var Connection = /*#__PURE__*/function () {
169
169
  * Checks if this connection is running in a web adapter and not in an admin.
170
170
  * @returns {boolean} True if running in a web adapter or in a socketio adapter.
171
171
  */
172
- (0, _createClass2["default"])(Connection, [{
172
+ return (0, _createClass2["default"])(Connection, [{
173
173
  key: "startSocket",
174
174
  value:
175
175
  /**
@@ -3611,7 +3611,6 @@ var Connection = /*#__PURE__*/function () {
3611
3611
  return window.adapterName === 'material' || window.adapterName === 'vis' || window.adapterName && window.adapterName.startsWith('vis-') || window.adapterName === 'echarts-show' || window.socketUrl !== undefined;
3612
3612
  }
3613
3613
  }]);
3614
- return Connection;
3615
3614
  }();
3616
3615
  Connection.Connection = {
3617
3616
  onLog: _propTypes["default"].func,