@iobroker/adapter-react-v5 5.0.0 → 5.0.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.
@@ -1496,7 +1496,6 @@ class FileBrowser extends react_1.Component {
1496
1496
  }
1497
1497
  });
1498
1498
  newState.folders = folders;
1499
- // @ts-expect-error fix later
1500
1499
  this.setState(newState, () => setTimeout(() => {
1501
1500
  this.browseFolders([...this.state.expanded], folders)
1502
1501
  .then(_folders => this.setState({ folders: _folders }));
@@ -176,7 +176,6 @@ class FileViewer extends react_1.Component {
176
176
  newState.editingValue = fileData;
177
177
  }
178
178
  }
179
- // @ts-expect-error I don't know how to fix it
180
179
  this.setState(newState);
181
180
  })
182
181
  .catch(e => window.alert(`Cannot read file: ${e}`));
@@ -221,7 +220,6 @@ class FileViewer extends react_1.Component {
221
220
  return react_1.default.createElement(IconNoIcon_1.default, { className: Utils_1.default.clsx(this.props.classes.img, this.props.getClassBackgroundImage()) });
222
221
  }
223
222
  return react_1.default.createElement(Icon_1.default, { onError: e => {
224
- // @ts-ignore-error to check
225
223
  e.target.onerror = null;
226
224
  this.setState({ imgError: true });
227
225
  }, className: Utils_1.default.clsx(this.props.classes.img, this.props.getClassBackgroundImage()), src: `${this.props.href}?ts=${this.state.forceUpdate}`, alt: this.props.href });
@@ -21,7 +21,7 @@ class Logo extends react_1.default.Component {
21
21
  if (f) {
22
22
  const r = new window.FileReader();
23
23
  r.onload = () => {
24
- // @ts-ignore
24
+ // @ts-expect-error I don't know how to fix this
25
25
  const contents = target.result;
26
26
  try {
27
27
  const json = JSON.parse(contents);
@@ -3963,8 +3963,11 @@ class ObjectBrowser extends react_1.Component {
3963
3963
  }
3964
3964
  if (this.state.roleDialog && this.props.objectBrowserEditRole) {
3965
3965
  const ObjectBrowserEditRole = this.props.objectBrowserEditRole;
3966
- // @ts-expect-error How to solve it?
3967
- return react_1.default.createElement(ObjectBrowserEditRole, { key: "objectBrowserEditRole", id: this.state.roleDialog, socket: this.props.socket, t: this.props.t, roles: this.info.roles, onClose: (obj) => {
3966
+ return react_1.default.createElement(ObjectBrowserEditRole
3967
+ // dummy, just to make compiler happy
3968
+ , {
3969
+ // dummy, just to make compiler happy
3970
+ classes: {}, key: "objectBrowserEditRole", id: this.state.roleDialog, socket: this.props.socket, t: this.props.t, roles: this.info.roles, onClose: (obj) => {
3968
3971
  if (obj) {
3969
3972
  this.info.objects[this.state.roleDialog] = obj;
3970
3973
  }
@@ -4549,9 +4552,8 @@ class ObjectBrowser extends react_1.Component {
4549
4552
  counter = counter || { count: 0 };
4550
4553
  let leaf = this.renderLeaf(root, isExpanded, classes, counter);
4551
4554
  const DragWrapper = this.props.DragWrapper;
4552
- if (this.props.dragEnabled) {
4555
+ if (this.props.dragEnabled && DragWrapper) {
4553
4556
  if (root.data.sumVisibility) {
4554
- // @ts-expect-error How to solve it?
4555
4557
  leaf = react_1.default.createElement(DragWrapper, { key: root.data.id, item: root, className: classes.draggable }, leaf);
4556
4558
  }
4557
4559
  else {
@@ -4906,8 +4908,7 @@ class ObjectBrowser extends react_1.Component {
4906
4908
  renderCustomDialog() {
4907
4909
  if (this.state.customDialog && this.props.objectCustomDialog) {
4908
4910
  const ObjectCustomDialog = this.props.objectCustomDialog;
4909
- // @ts-expect-error How to solve it?
4910
- return react_1.default.createElement(ObjectCustomDialog, { reportChangedIds: (changedIds) => (this.changedIds = [...changedIds]), objectIDs: this.state.customDialog, allVisibleObjects: this.state.customDialogAll, expertMode: this.state.filter.expertMode, isFloatComma: this.props.isFloatComma, t: this.props.t, lang: this.props.lang, socket: this.props.socket, themeName: this.props.themeName, themeType: this.props.themeType, theme: this.props.theme, objects: this.objects, customsInstances: this.info.customs, onClose: () => {
4911
+ return react_1.default.createElement(ObjectCustomDialog, { reportChangedIds: (changedIds) => (this.changedIds = [...changedIds]), objectIDs: this.state.customDialog, allVisibleObjects: !!this.state.customDialogAll, expertMode: this.state.filter.expertMode, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, t: this.props.t, lang: this.props.lang, socket: this.props.socket, themeName: this.props.themeName, themeType: this.props.themeType, theme: this.props.theme, objects: this.objects, customsInstances: this.info.customs, onClose: () => {
4911
4912
  var _b;
4912
4913
  this.pauseSubscribe(false);
4913
4914
  this.setState({ customDialog: null });
@@ -4917,7 +4918,9 @@ class ObjectBrowser extends react_1.Component {
4917
4918
  this.forceUpdate();
4918
4919
  }
4919
4920
  (_b = this.props.router) === null || _b === void 0 ? void 0 : _b.doNavigate('tab-objects');
4920
- }, systemConfig: this.systemConfig });
4921
+ }, systemConfig: this.systemConfig,
4922
+ // dummy, just to make compiler happy
4923
+ classes: {} });
4921
4924
  }
4922
4925
  return null;
4923
4926
  }
@@ -4936,8 +4939,11 @@ class ObjectBrowser extends react_1.Component {
4936
4939
  return null;
4937
4940
  }
4938
4941
  const ObjectBrowserEditObject = this.props.objectBrowserEditObject;
4939
- // @ts-expect-error How to solve it?
4940
- return react_1.default.createElement(ObjectBrowserEditObject, { key: this.state.editObjectDialog, obj: this.objects[this.state.editObjectDialog], roleArray: this.info.roles, objects: this.objects, dateFormat: this.props.dateFormat, isFloatComma: this.props.isFloatComma, themeType: this.props.themeType, socket: this.props.socket, dialogName: this.props.dialogName, aliasTab: this.state.editObjectAlias, t: this.props.t, expertMode: this.state.filter.expertMode, onNewObject: (obj) => this.props.socket
4942
+ return react_1.default.createElement(ObjectBrowserEditObject
4943
+ // dummy, just to make compiler happy
4944
+ , {
4945
+ // dummy, just to make compiler happy
4946
+ classes: {}, key: this.state.editObjectDialog, obj: this.objects[this.state.editObjectDialog], roleArray: this.info.roles, objects: this.objects, dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, themeType: this.props.themeType, socket: this.props.socket, dialogName: this.props.dialogName, aliasTab: this.state.editObjectAlias, t: this.props.t, expertMode: !!this.state.filter.expertMode, onNewObject: (obj) => this.props.socket
4941
4947
  .setObject(obj._id, obj)
4942
4948
  .then(() => this.setState({ editObjectDialog: obj._id, editObjectAlias: false }, () => this.onSelect(obj._id)))
4943
4949
  .catch(e => this.showError(`Cannot write object: ${e}`)), onClose: (obj) => {
@@ -4968,16 +4974,14 @@ class ObjectBrowser extends react_1.Component {
4968
4974
  return null;
4969
4975
  }
4970
4976
  const ObjectBrowserViewFile = this.props.objectBrowserViewFile;
4971
- // @ts-expect-error How to solve it?
4972
- return react_1.default.createElement(ObjectBrowserViewFile, { key: "viewFile", obj: this.objects[this.state.viewFileDialog], themeType: this.props.themeType, socket: this.props.socket, dialogName: this.props.dialogName, t: this.props.t, expertMode: this.state.filter.expertMode, onClose: () => this.setState({ viewFileDialog: '' }) });
4977
+ return react_1.default.createElement(ObjectBrowserViewFile, { key: "viewFile", obj: this.objects[this.state.viewFileDialog], socket: this.props.socket, t: this.props.t, onClose: () => this.setState({ viewFileDialog: '' }) });
4973
4978
  }
4974
4979
  renderAliasEditorDialog() {
4975
4980
  if (!this.props.objectBrowserAliasEditor || !this.state.showAliasEditor) {
4976
4981
  return null;
4977
4982
  }
4978
4983
  const ObjectBrowserAliasEditor = this.props.objectBrowserAliasEditor;
4979
- // @ts-expect-error How to solve it?
4980
- return react_1.default.createElement(ObjectBrowserAliasEditor, { key: "editAlias", obj: this.objects[this.state.showAliasEditor], objects: this.objects, themeType: this.props.themeType, socket: this.props.socket, dialogName: this.props.dialogName, t: this.props.t, expertMode: this.state.filter.expertMode, onClose: () => this.setState({ showAliasEditor: '' }), onRedirect: (id, timeout) => setTimeout(() => this.onSelect(id, false, () => this.expandAllSelected(() => {
4984
+ return react_1.default.createElement(ObjectBrowserAliasEditor, { key: "editAlias", obj: this.objects[this.state.showAliasEditor], objects: this.objects, socket: this.props.socket, t: this.props.t, onClose: () => this.setState({ showAliasEditor: '' }), onRedirect: (id, timeout) => setTimeout(() => this.onSelect(id, false, () => this.expandAllSelected(() => {
4981
4985
  this.scrollToItem(id);
4982
4986
  setTimeout(() => this.setState({
4983
4987
  editObjectDialog: id,
@@ -5325,11 +5329,12 @@ class ObjectBrowser extends react_1.Component {
5325
5329
  : typeof this.edit.val;
5326
5330
  const role = this.objects[this.edit.id].common.role;
5327
5331
  const ObjectBrowserValue = this.props.objectBrowserValue;
5328
- // @ts-expect-error How to solve it?
5329
- return react_1.default.createElement(ObjectBrowserValue, { t: this.props.t, lang: this.props.lang, type: type, role: role, states: Utils_1.default.getStates(this.objects[this.edit.id]), themeType: this.props.themeType, expertMode: this.state.filter.expertMode, value: this.edit.val, socket: this.props.socket, object: this.objects[this.edit.id], defaultHistory: this.defaultHistory, dateFormat: this.props.dateFormat, onClose: (res) => {
5332
+ return react_1.default.createElement(ObjectBrowserValue, { t: this.props.t, lang: this.props.lang, type: type, role: role || '', states: Utils_1.default.getStates(this.objects[this.edit.id]), themeType: this.props.themeType, expertMode: !!this.state.filter.expertMode, value: this.edit.val, socket: this.props.socket, object: this.objects[this.edit.id], defaultHistory: this.defaultHistory, dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, onClose: (res) => {
5330
5333
  this.setState({ updateOpened: false });
5331
5334
  res && this.onUpdate(res);
5332
- } });
5335
+ },
5336
+ // dummy, just to make compiler happy
5337
+ classes: {} });
5333
5338
  }
5334
5339
  /**
5335
5340
  * The rendering method of this component.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2018-2023 Denis Haev <dogafox@gmail.com>
2
+ * Copyright 2018-2024 Denis Haev <dogafox@gmail.com>
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -10,11 +10,13 @@ interface GetObjectNameOptions {
10
10
  name?: ioBroker.StringOrTranslated;
11
11
  language?: ioBroker.Languages;
12
12
  }
13
- type SmartName = null | (ioBroker.StringOrTranslated & {
13
+ type SmartName = null | false | string | ({
14
+ [lang in ioBroker.Languages]?: string;
15
+ } & {
14
16
  /** Which kind of device it is */
15
17
  smartType?: string | null;
16
18
  /** Which value to set when the ON command is issued */
17
- byOn?: string | null;
19
+ byON?: string | null;
18
20
  });
19
21
  declare namespace clsx {
20
22
  type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
@@ -262,10 +264,9 @@ declare class Utils {
262
264
  static generateFile(fileName: string, json: string): void;
263
265
  /**
264
266
  * Convert quality code into text
265
- * @param {number} quality code
266
- * @returns {array<string>} lines that decode quality
267
+ * @returns lines that decode quality
267
268
  */
268
- static quality2text(quality: number): string[];
269
+ static quality2text(quality: ioBroker.STATE_QUALITY[keyof ioBroker.STATE_QUALITY]): string[];
269
270
  /**
270
271
  * Deep copy object
271
272
  */
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  /**
7
- * Copyright 2018-2023 Denis Haev <dogafox@gmail.com>
7
+ * Copyright 2018-2024 Denis Haev <dogafox@gmail.com>
8
8
  *
9
9
  * MIT License
10
10
  *
@@ -262,7 +262,6 @@ class Utils {
262
262
  }
263
263
  }
264
264
  if (common) {
265
- // @ts-ignore todo: after new types released
266
265
  settings.color = settings.color || common.color;
267
266
  settings.icon = settings.icon || common.icon;
268
267
  settings.name = settings.name || common.name;
@@ -294,7 +293,6 @@ class Utils {
294
293
  const s = obj.common.custom[NAMESPACE][options.user || 'admin'];
295
294
  if (s.useCommon) {
296
295
  if (s.color !== undefined) {
297
- // @ts-ignore todo: after new types released
298
296
  obj.common.color = s.color;
299
297
  delete s.color;
300
298
  }
@@ -563,7 +561,7 @@ class Utils {
563
561
  const m = now.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);
564
562
  if (m) {
565
563
  const a = [parseInt(m[1], 10), parseInt(m[2], 10), parseInt(m[3], 10)];
566
- // we now have 3 numbers. Let's try to detect where is year, where is day and where is month
564
+ // We now have 3 numbers. Let's try to detect where is year, where is day and where is month
567
565
  const year = a.find(y => y > 31);
568
566
  if (year !== undefined) {
569
567
  a.splice(a.indexOf(year), 1);
@@ -651,18 +649,14 @@ class Utils {
651
649
  if (!id) {
652
650
  if (!noCommon) {
653
651
  if (!states.common) {
654
- // @ts-ignore
655
652
  return states.smartName;
656
653
  }
657
654
  if (states && !states.common) {
658
- // @ts-ignore
659
655
  return states.smartName;
660
656
  }
661
- // @ts-ignore
662
657
  return states.common.smartName;
663
658
  }
664
659
  if (states && !states.common) {
665
- // @ts-ignore
666
660
  return states.smartName;
667
661
  }
668
662
  const obj = states;
@@ -670,7 +664,6 @@ class Utils {
670
664
  obj.common.custom[instanceId].smartName : undefined;
671
665
  }
672
666
  if (!noCommon) {
673
- // @ts-ignore
674
667
  return states[id].common.smartName;
675
668
  }
676
669
  const obj = states[id];
@@ -684,18 +677,14 @@ class Utils {
684
677
  var _a;
685
678
  if (!noCommon) {
686
679
  if (!obj.common) {
687
- // @ts-ignore
688
680
  return obj.smartName;
689
681
  }
690
682
  if (obj && !obj.common) {
691
- // @ts-ignore
692
683
  return obj.smartName;
693
684
  }
694
- // @ts-ignore
695
685
  return obj.common.smartName;
696
686
  }
697
687
  if (obj && !obj.common) {
698
- // @ts-ignore
699
688
  return obj.smartName;
700
689
  }
701
690
  return ((_a = obj === null || obj === void 0 ? void 0 : obj.common) === null || _a === void 0 ? void 0 : _a.custom) && obj.common.custom[instanceId] ?
@@ -724,7 +713,6 @@ class Utils {
724
713
  }
725
714
  }
726
715
  else {
727
- // @ts-ignore
728
716
  obj.common.smartName = null;
729
717
  }
730
718
  }
@@ -783,7 +771,6 @@ class Utils {
783
771
  }
784
772
  else {
785
773
  obj.common.smartName = obj.common.smartName || {};
786
- // @ts-ignore
787
774
  obj.common.smartName.byON = byON;
788
775
  }
789
776
  }
@@ -832,7 +819,7 @@ class Utils {
832
819
  delete obj.common.custom[instanceId].uk;
833
820
  delete obj.common.custom[instanceId]['zh-cn'];
834
821
  }
835
- // @ts-ignore
822
+ // @ts-expect-error
836
823
  }
837
824
  else if (obj.common.smartName && obj.common.smartName.byON !== undefined) {
838
825
  delete obj.common.smartName.en;
@@ -848,7 +835,6 @@ class Utils {
848
835
  delete obj.common.smartName['zh-cn'];
849
836
  }
850
837
  else {
851
- // @ts-ignore
852
838
  obj.common.smartName = null;
853
839
  }
854
840
  }
@@ -865,7 +851,6 @@ class Utils {
865
851
  obj.common.custom[instanceId].smartName = false;
866
852
  }
867
853
  else {
868
- // @ts-ignore
869
854
  obj.common.smartName = false;
870
855
  }
871
856
  }
@@ -1418,13 +1403,11 @@ class Utils {
1418
1403
  }
1419
1404
  /**
1420
1405
  * Convert quality code into text
1421
- * @param {number} quality code
1422
- * @returns {array<string>} lines that decode quality
1406
+ * @returns lines that decode quality
1423
1407
  */
1424
1408
  static quality2text(quality) {
1425
1409
  // eslint-disable-next-line no-bitwise
1426
1410
  const custom = quality & 0xFFFF0000;
1427
- // @ts-ignore
1428
1411
  const text = QUALITY_BITS[quality];
1429
1412
  let result;
1430
1413
  if (text) {
@@ -1523,7 +1506,6 @@ class Utils {
1523
1506
  */
1524
1507
  static detectMimeType(base64) {
1525
1508
  const signature = Object.keys(SIGNATURES).find(s => base64.startsWith(s));
1526
- // @ts-ignore
1527
1509
  return signature ? SIGNATURES[signature] : null;
1528
1510
  }
1529
1511
  /**
@@ -57,15 +57,15 @@ class DialogComplexCron extends react_1.default.Component {
57
57
  react_1.default.createElement(ComplexCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
58
58
  react_1.default.createElement(material_1.DialogActions, null,
59
59
  !!this.props.clearButton && react_1.default.createElement(material_1.Button
60
- // @ts-expect-error
60
+ // @ts-expect-error grey is valid color
61
61
  , {
62
- // @ts-expect-error
62
+ // @ts-expect-error grey is valid color
63
63
  color: "grey", variant: "contained", onClick: () => this.handleClear(), startIcon: react_1.default.createElement(icons_material_1.Delete, null) }, this.props.clear || i18n_1.default.t('ra_Clear')),
64
64
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
65
65
  react_1.default.createElement(material_1.Button
66
- // @ts-expect-error
66
+ // @ts-expect-error grey is valid color
67
67
  , {
68
- // @ts-expect-error
68
+ // @ts-expect-error grey is valid color
69
69
  color: "grey", variant: "contained", onClick: () => this.handleCancel(), startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
70
70
  }
71
71
  }
@@ -106,7 +106,7 @@ class DialogConfirm extends react_1.Component {
106
106
  react_1.default.createElement(material_1.DialogActions, null,
107
107
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_confirm_ok_${this.props.dialogName || ''}`, variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
108
108
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_confirm_cancel_${this.props.dialogName || ''}`, variant: "contained", onClick: () => this.handleCancel(),
109
- // @ts-expect-error
109
+ // @ts-expect-error grey is valid color
110
110
  color: "grey", startIcon: react_1.default.createElement(icons_material_1.Close, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
111
111
  }
112
112
  }
package/Dialogs/Cron.js CHANGED
@@ -99,7 +99,7 @@ class DialogCron extends react_1.default.Component {
99
99
  react_1.default.createElement(material_1.DialogActions, null,
100
100
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
101
101
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(),
102
- // @ts-expect-error grey is allowed color
102
+ // @ts-expect-error grey is valid color
103
103
  color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
104
104
  }
105
105
  }
@@ -113,9 +113,9 @@ class DialogSelectFile extends react_1.default.Component {
113
113
  react_1.default.createElement(material_1.DialogActions, null,
114
114
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), startIcon: react_1.default.createElement(icons_material_1.Check, null), disabled: !this.state.selected.length, color: "primary" }, this.props.ok || i18n_1.default.t('ra_Ok')),
115
115
  react_1.default.createElement(material_1.Button
116
- // @ts-expect-error grey is allowed color
116
+ // @ts-expect-error grey is valid color
117
117
  , {
118
- // @ts-expect-error grey is allowed color
118
+ // @ts-expect-error grey is valid color
119
119
  color: "grey", variant: "contained", onClick: () => this.handleCancel(), startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
120
120
  }
121
121
  }
@@ -146,7 +146,7 @@ class DialogSelectID extends react_1.Component {
146
146
  react_1.default.createElement(material_1.DialogActions, null,
147
147
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_selectid_ok_${this.props.dialogName || ''}`, variant: "contained", onClick: () => this.handleOk(), startIcon: react_1.default.createElement(icons_material_1.Check, null), disabled: !this.state.selected.length, color: "primary" }, this.props.ok || i18n_1.default.t('ra_Ok')),
148
148
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_selectid_cancel_${this.props.dialogName || ''}`,
149
- // @ts-expect-error
149
+ // @ts-expect-error grey is valid color
150
150
  color: "grey", variant: "contained", onClick: () => this.handleCancel(), startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
151
151
  }
152
152
  }
@@ -54,7 +54,7 @@ class DialogSimpleCron extends react_1.default.Component {
54
54
  react_1.default.createElement(material_1.DialogActions, null,
55
55
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
56
56
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(),
57
- // @ts-expect-error grey is allowed color
57
+ // @ts-expect-error grey is valid color
58
58
  color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
59
59
  }
60
60
  }
package/README.md CHANGED
@@ -670,6 +670,9 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
670
670
  -->
671
671
 
672
672
  ## Changelog
673
+ ### 5.0.1 (2024-05-29)
674
+ * (bluefox) Added better typing
675
+
673
676
  ### 5.0.0 (2024-05-29)
674
677
  * (bluefox) Types are now exported
675
678
  * (bluefox) Translator renamed to Translate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "React classes to develop admin interfaces for ioBroker with react.",
5
5
  "author": {
6
6
  "name": "Denis Haev (bluefox)",