@iobroker/adapter-react-v5 7.1.4 → 7.2.2

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.
@@ -46,7 +46,7 @@ const styles = {
46
46
  flexGrow: 1000,
47
47
  },
48
48
  divContainer: {
49
- width: 32 + 24,
49
+ width: 32 + 32,
50
50
  height: 32,
51
51
  whiteSpace: 'nowrap',
52
52
  lineHeight: '32px',
@@ -471,8 +471,19 @@ class UploadImage extends react_1.Component {
471
471
  render() {
472
472
  const { disabled, icon, removeIconFunc, error, crop, onChange } = this.props;
473
473
  const maxSize = this.props.maxSize || 10 * 1024;
474
- const accept = this.props.accept || { 'image/*': [] };
474
+ let accept = this.props.accept || { 'image/*': [] };
475
475
  const { uploadFile, anchorEl, cropHandler } = this.state;
476
+ // covert '"image/png"' to { 'image/*': [] }
477
+ if (typeof accept === 'string') {
478
+ accept = { [accept]: [] };
479
+ }
480
+ else if (Array.isArray(accept)) {
481
+ const result = {};
482
+ accept.forEach(item => {
483
+ result[item] = [];
484
+ });
485
+ accept = result;
486
+ }
476
487
  return (react_1.default.createElement(react_dropzone_1.default, { disabled: !!disabled || cropHandler, key: "dropzone", multiple: false, accept: accept, maxSize: maxSize, onDragEnter: () => this.setState({ uploadFile: 'dragging' }), onDragLeave: () => this.setState({ uploadFile: true }), onDrop: (acceptedFiles, errors) => {
477
488
  this.setState({ uploadFile: false });
478
489
  if (!acceptedFiles.length) {
@@ -495,14 +506,14 @@ class UploadImage extends react_1.Component {
495
506
  ? i18n_1.default.t('ra_Drop file here')
496
507
  : i18n_1.default.t('ra_Place your files here or click here to open the browse dialog')))) : (removeIconFunc &&
497
508
  !cropHandler && (react_1.default.createElement("div", { style: styles.buttonRemoveWrapper },
498
- react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Clear'), componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
509
+ react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Clear'), slotProps: { popper: { sx: { pointerEvents: 'none' } } } },
499
510
  react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
500
511
  removeIconFunc && removeIconFunc();
501
512
  e.stopPropagation();
502
513
  } },
503
514
  react_1.default.createElement(icons_material_1.Close, null)))))),
504
515
  icon && crop && (react_1.default.createElement("div", { style: styles.buttonCropWrapper },
505
- react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Crop'), componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
516
+ react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Crop'), slotProps: { popper: { sx: { pointerEvents: 'none' } } } },
506
517
  react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
507
518
  if (!cropHandler) {
508
519
  this.setState({ cropHandler: true });
@@ -9,7 +9,7 @@ interface DialogConfirmProps {
9
9
  /** The dialog title; default: Are you sure? (translated) */
10
10
  title?: string;
11
11
  /** The dialog text */
12
- text?: string | React.JSX.Element;
12
+ text?: string | React.JSX.Element | React.JSX.Element[];
13
13
  /** Close handler. */
14
14
  onClose?: (ok: boolean) => void;
15
15
  /** if the dialog must be fill sized */
@@ -7,7 +7,7 @@
7
7
  import React, { Component, type JSX } from 'react';
8
8
  interface DialogErrorProps {
9
9
  title?: string;
10
- text: string | React.JSX.Element;
10
+ text: string | React.JSX.Element | React.JSX.Element[];
11
11
  onClose?: () => void;
12
12
  fullWidth?: boolean;
13
13
  }
@@ -7,7 +7,7 @@
7
7
  import React, { Component, type JSX } from 'react';
8
8
  interface DialogMessageProps {
9
9
  title?: string;
10
- text: string | React.JSX.Element;
10
+ text: string | React.JSX.Element | React.JSX.Element[];
11
11
  onClose?: () => void;
12
12
  fullWidth?: boolean;
13
13
  icon?: React.JSX.Element;
package/GenericApp.js CHANGED
@@ -236,7 +236,7 @@ class GenericApp extends Router_1.default {
236
236
  'zh-cn': zh_cn_json_1.default,
237
237
  };
238
238
  // merge together
239
- if (settings && settings.translations) {
239
+ if (settings === null || settings === void 0 ? void 0 : settings.translations) {
240
240
  Object.keys(settings.translations).forEach(lang => {
241
241
  if (settings.translations) {
242
242
  translations[lang] = Object.assign(translations[lang], settings.translations[lang] || {});
@@ -14,6 +14,7 @@ declare global {
14
14
  registerSocketOnLoad: (func: () => void) => void;
15
15
  vendorPrefix: undefined | string;
16
16
  io: any;
17
+ iob: any;
17
18
  }
18
19
  }
19
20
  export type CompactSystemRepositoryEntry = {
@@ -164,7 +164,7 @@ class Connection {
164
164
  */
165
165
  startSocket() {
166
166
  // if socket io is not yet loaded
167
- if (typeof window.io === 'undefined') {
167
+ if (typeof window.io === 'undefined' && typeof window.iob === 'undefined') {
168
168
  // if in index.html the onLoad function not defined
169
169
  if (typeof window.registerSocketOnLoad !== 'function') {
170
170
  // poll if loaded
@@ -225,7 +225,7 @@ class Connection {
225
225
  }
226
226
  }
227
227
  const url = port ? `${protocol}://${host}:${port}${path}` : `${protocol}://${host}${path}`;
228
- this._socket = window.io.connect(url, {
228
+ this._socket = (window.io || window.iob).connect(url, {
229
229
  path: path.endsWith('/') ? `${path}socket.io` : `${path}/socket.io`,
230
230
  query: 'ws=true',
231
231
  name: this.props.name,
package/README.md CHANGED
@@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
13
13
  - Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
14
14
  - Add to devDependencies:
15
15
  ```
16
- "@iobroker/adapter-react-v5": "^7.1.4",
16
+ "@iobroker/adapter-react-v5": "^7.2.2",
17
17
  ```
18
18
  Versions can be higher.
19
19
  So your `src/package.json` should look like:
@@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
24
24
  "version": "0.1.0",
25
25
  "private": true,
26
26
  "dependencies": {
27
- "@iobroker/adapter-react-v5": "^7.1.4",
27
+ "@iobroker/adapter-react-v5": "^7.2.2",
28
28
  "@iobroker/build-tools": "^1.0.0",
29
29
  "@iobroker/eslint-config": "^0.1.2",
30
30
  "@mui/material": "^6.0.2",
@@ -697,224 +697,232 @@ You can find the migration instructions:
697
697
  -->
698
698
 
699
699
  ## Changelog
700
+ ### 7.2.2 (2024-10-04)
701
+ - (@GermanBluefox) Small layout change for Icon Picker
702
+
703
+ ### 7.2.1 (2024-09-30)
704
+
705
+ - (@GermanBluefox) Allowed using an array of elements in dialogs
706
+ - (@GermanBluefox) Allowed to use `socket.iob` instead of `socket.io`
707
+
700
708
  ### 7.1.4 (2024-09-15)
701
709
 
702
- - (bluefox) Updated socket classes
710
+ - (@GermanBluefox) Updated socket classes
703
711
 
704
712
  ### 7.1.3 (2024-09-15)
705
713
 
706
- - (bluefox) Updated socket classes
707
- - (bluefox) Added additional confirmation dialog for CRONs for every minute execution
714
+ - (@GermanBluefox) Updated socket classes
715
+ - (@GermanBluefox) Added additional confirmation dialog for CRONs for every minute execution
708
716
 
709
717
  ### 7.1.1 (2024-09-13)
710
718
 
711
- - (bluefox) Corrected TabContainer
719
+ - (@GermanBluefox) Corrected TabContainer
712
720
 
713
721
  ### 7.1.0 (2024-09-12)
714
722
 
715
- - (bluefox) Optimized the icon picker
716
- - (bluefox) Used common eslint-config
723
+ - (@GermanBluefox) Optimized the icon picker
724
+ - (@GermanBluefox) Used common eslint-config
717
725
 
718
726
  ### 7.0.2 (2024-09-10)
719
727
 
720
- - (bluefox) Showed the context menu under cursor position in the object browser
721
- - (bluefox) Added links to aliases in the object browser
728
+ - (@GermanBluefox) Showed the context menu under cursor position in the object browser
729
+ - (@GermanBluefox) Added links to aliases in the object browser
722
730
 
723
731
  ### 7.0.1 (2024-08-29)
724
732
 
725
- - (bluefox) Updated the object browser
726
- - (bluefox) Used MUI Library 6.0
733
+ - (@GermanBluefox) Updated the object browser
734
+ - (@GermanBluefox) Used MUI Library 6.0
727
735
 
728
736
  ### 6.1.10 (2024-08-30)
729
737
 
730
- - (bluefox) Updated the object browser
738
+ - (@GermanBluefox) Updated the object browser
731
739
 
732
740
  ### 6.1.9 (2024-08-14)
733
741
 
734
- - (bluefox) Updated JSON schema
742
+ - (@GermanBluefox) Updated JSON schema
735
743
 
736
744
  ### 6.1.8 (2024-08-03)
737
745
 
738
- - (bluefox) Added translations
746
+ - (@GermanBluefox) Added translations
739
747
 
740
748
  ### 6.1.6 (2024-07-23)
741
749
 
742
- - (bluefox) Optimize package
750
+ - (@GermanBluefox) Optimize package
743
751
 
744
752
  ### 6.1.5 (2024-07-20)
745
753
 
746
- - (bluefox) Added sources to package
754
+ - (@GermanBluefox) Added sources to package
747
755
 
748
756
  ### 6.1.3 (2024-07-20)
749
757
 
750
- - (bluefox) Better typing of legacy connection
758
+ - (@GermanBluefox) Better typing of legacy connection
751
759
 
752
760
  ### 6.1.1 (2024-07-16)
753
761
 
754
- - (bluefox) Added translations
762
+ - (@GermanBluefox) Added translations
755
763
 
756
764
  ### 6.1.0 (2024-07-15)
757
765
 
758
- - (bluefox) Replace by CRON to text the package to `cronstrue`
766
+ - (@GermanBluefox) Replace by CRON to text the package to `cronstrue`
759
767
 
760
768
  ### 6.0.19 (2024-07-14)
761
769
 
762
- - (bluefox) added some packages for federation
770
+ - (@GermanBluefox) added some packages for federation
763
771
 
764
772
  ### 6.0.17 (2024-07-14)
765
773
 
766
- - (bluefox) Allowed playing mp3 files in the file browser
767
- - (bluefox) Corrected jump by object selection
774
+ - (@GermanBluefox) Allowed playing mp3 files in the file browser
775
+ - (@GermanBluefox) Corrected jump by object selection
768
776
 
769
777
  ### 6.0.14 (2024-07-07)
770
778
 
771
- - (bluefox) Corrected theme type selection
779
+ - (@GermanBluefox) Corrected theme type selection
772
780
 
773
781
  ### 6.0.13 (2024-06-30)
774
782
 
775
- - (bluefox) Corrected color picker
783
+ - (@GermanBluefox) Corrected color picker
776
784
 
777
785
  ### 6.0.12 (2024-06-29)
778
786
 
779
- - (bluefox) Added support for the overrides in the theme
787
+ - (@GermanBluefox) Added support for the overrides in the theme
780
788
 
781
789
  ### 6.0.10 (2024-06-27)
782
790
 
783
- - (bluefox) Added translation
784
- - (bluefox) Mobile object browser improved
791
+ - (@GermanBluefox) Added translation
792
+ - (@GermanBluefox) Mobile object browser improved
785
793
 
786
794
  ### 6.0.9 (2024-06-26)
787
795
 
788
- - (bluefox) Corrected Icons
796
+ - (@GermanBluefox) Corrected Icons
789
797
 
790
798
  ### 6.0.8 (2024-06-26)
791
799
 
792
- - (bluefox) Corrected types of the select ID dialog
793
- - (bluefox) Made the tooltips neutral to the pointer events
800
+ - (@GermanBluefox) Corrected types of the select ID dialog
801
+ - (@GermanBluefox) Made the tooltips neutral to the pointer events
794
802
 
795
803
  ### 6.0.6 (2024-06-24)
796
804
 
797
- - (bluefox) Synchronised with admin
798
- - (bluefox) Added translations for time scheduler
805
+ - (@GermanBluefox) Synchronised with admin
806
+ - (@GermanBluefox) Added translations for time scheduler
799
807
 
800
808
  ### 6.0.4 (2024-06-21)
801
809
 
802
- - (bluefox) Removed the usage of `withStyles` in favor of `sx` and `style` properties (see [Migration from v5 to v6](#migration-from-v5-to-v6)
803
- - (bluefox) (BREAKING) Higher version of `@mui/material` (5.15.20) is used
810
+ - (@GermanBluefox) Removed the usage of `withStyles` in favor of `sx` and `style` properties (see [Migration from v5 to v6](#migration-from-v5-to-v6)
811
+ - (@GermanBluefox) (BREAKING) Higher version of `@mui/material` (5.15.20) is used
804
812
 
805
813
  ### 5.0.8 (2024-06-15)
806
814
 
807
- - (bluefox) Added `modulefederation.admin.config.js` for module federation
815
+ - (@GermanBluefox) Added `modulefederation.admin.config.js` for module federation
808
816
 
809
817
  ### 5.0.5 (2024-06-10)
810
818
 
811
- - (bluefox) Sources were synchronized with admin
819
+ - (@GermanBluefox) Sources were synchronized with admin
812
820
 
813
821
  ### 5.0.4 (2024-06-07)
814
822
 
815
- - (bluefox) Added better typing
823
+ - (@GermanBluefox) Added better typing
816
824
 
817
825
  ### 5.0.2 (2024-05-30)
818
826
 
819
- - (bluefox) Added better typing
820
- - (bluefox) Json-Config is now a separate package and must be installed additionally
827
+ - (@GermanBluefox) Added better typing
828
+ - (@GermanBluefox) Json-Config is now a separate package and must be installed additionally
821
829
 
822
830
  ### 5.0.0 (2024-05-29)
823
831
 
824
- - (bluefox) Types are now exported
825
- - (bluefox) Translator renamed to Translate
826
- - (bluefox) Breaking: Theme renamed to IobTheme because of the naming conflict
832
+ - (@GermanBluefox) Types are now exported
833
+ - (@GermanBluefox) Translator renamed to Translate
834
+ - (@GermanBluefox) Breaking: Theme renamed to IobTheme because of the naming conflict
827
835
 
828
836
  ### 4.13.24 (2024-05-25)
829
837
 
830
- - (bluefox) Updated packages
838
+ - (@GermanBluefox) Updated packages
831
839
 
832
840
  - ### 4.13.22 (2024-05-23)
833
- - (bluefox) Updated packages
841
+ - (@GermanBluefox) Updated packages
834
842
 
835
843
  ### 4.13.20 (2024-05-22)
836
844
 
837
- - (bluefox) Better types added
838
- - (bluefox) updated theme definitions
839
- - (bluefox) corrected dates in cron dialog
845
+ - (@GermanBluefox) Better types added
846
+ - (@GermanBluefox) updated theme definitions
847
+ - (@GermanBluefox) corrected dates in cron dialog
840
848
 
841
849
  ### 4.13.14 (2024-05-19)
842
850
 
843
- - (bluefox) Updated packages
851
+ - (@GermanBluefox) Updated packages
844
852
 
845
853
  ### 4.13.13 (2024-05-09)
846
854
 
847
- - (bluefox) Updated ioBroker types
855
+ - (@GermanBluefox) Updated ioBroker types
848
856
 
849
857
  ### 4.13.12 (2024-05-06)
850
858
 
851
- - (bluefox) All files are migrated to Typescript
859
+ - (@GermanBluefox) All files are migrated to Typescript
852
860
 
853
861
  ### 4.13.11 (2024-04-23)
854
862
 
855
- - (bluefox) Corrected the size of icons
863
+ - (@GermanBluefox) Corrected the size of icons
856
864
 
857
865
  ### 4.13.10 (2024-04-22)
858
866
 
859
- - (bluefox) Migrated all icons to Typescript
867
+ - (@GermanBluefox) Migrated all icons to Typescript
860
868
 
861
869
  ### 4.13.9 (2024-04-20)
862
870
 
863
- - (bluefox) Updated socket-client package
871
+ - (@GermanBluefox) Updated socket-client package
864
872
 
865
873
  ### 4.13.8 (2024-04-19)
866
874
 
867
- - (bluefox) Corrected CRON selector
875
+ - (@GermanBluefox) Corrected CRON selector
868
876
 
869
877
  ### 4.13.7 (2024-04-19)
870
878
 
871
- - (bluefox) Migrated ColorPicker to typescript
879
+ - (@GermanBluefox) Migrated ColorPicker to typescript
872
880
 
873
881
  ### 4.13.6 (2024-04-11)
874
882
 
875
- - (bluefox) Migrated TreeTable to typescript
876
- - (bluefox) corrected the object subscription
883
+ - (@GermanBluefox) Migrated TreeTable to typescript
884
+ - (@GermanBluefox) corrected the object subscription
877
885
 
878
886
  ### 4.13.5 (2024-04-02)
879
887
 
880
- - (bluefox) used new connection classes
881
- - (bluefox) Improved the `SelectID` dialog
888
+ - (@GermanBluefox) used new connection classes
889
+ - (@GermanBluefox) Improved the `SelectID` dialog
882
890
 
883
891
  ### 4.13.3 (2024-04-01)
884
892
 
885
- - (bluefox) used new connection classes
893
+ - (@GermanBluefox) used new connection classes
886
894
 
887
895
  ### 4.12.3 (2024-03-30)
888
896
 
889
- - (bluefox) Migrated legacy connection to typescript
897
+ - (@GermanBluefox) Migrated legacy connection to typescript
890
898
 
891
899
  ### 4.12.2 (2024-03-25)
892
900
 
893
- - (bluefox) Added support for remote cloud
901
+ - (@GermanBluefox) Added support for remote cloud
894
902
 
895
903
  ### 4.11.6 (2024-03-19)
896
904
 
897
- - (bluefox) Corrected rendering of LoaderMV
905
+ - (@GermanBluefox) Corrected rendering of LoaderMV
898
906
 
899
907
  ### 4.11.4 (2024-03-18)
900
908
 
901
- - (bluefox) Corrected types of IconPicker
909
+ - (@GermanBluefox) Corrected types of IconPicker
902
910
 
903
911
  ### 4.11.3 (2024-03-17)
904
912
 
905
- - (bluefox) Made filters for the file selector dialog optional
913
+ - (@GermanBluefox) Made filters for the file selector dialog optional
906
914
 
907
915
  ### 4.11.2 (2024-03-16)
908
916
 
909
- - (bluefox) Migrated GenericApp to typescript
917
+ - (@GermanBluefox) Migrated GenericApp to typescript
910
918
 
911
919
  ### 4.10.4 (2024-03-16)
912
920
 
913
- - (bluefox) Migrated some components to typescript
921
+ - (@GermanBluefox) Migrated some components to typescript
914
922
 
915
923
  ### 4.10.1 (2024-03-11)
916
924
 
917
- - (bluefox) Migrated some components to typescript
925
+ - (@GermanBluefox) Migrated some components to typescript
918
926
 
919
927
  ### 4.9.11 (2024-03-08)
920
928
 
@@ -922,8 +930,8 @@ You can find the migration instructions:
922
930
 
923
931
  ### 4.9.10 (2024-02-21)
924
932
 
925
- - (bluefox) translations
926
- - (bluefox) updated JSON config
933
+ - (@GermanBluefox) translations
934
+ - (@GermanBluefox) updated JSON config
927
935
 
928
936
  ### 4.9.9 (2024-02-16)
929
937
 
@@ -931,7 +939,7 @@ You can find the migration instructions:
931
939
 
932
940
  ### 4.9.8 (2024-02-13)
933
941
 
934
- - (bluefox) allowed hiding wizard in cron dialog
942
+ - (@GermanBluefox) allowed hiding wizard in cron dialog
935
943
 
936
944
  ### 4.9.7 (2024-02-03)
937
945
 
@@ -956,27 +964,27 @@ You can find the migration instructions:
956
964
  ### 4.9.0 (2023-12-22)
957
965
 
958
966
  - (foxriver76) migrate to `@iobroker/json-config` module to have a single point of truth
959
- - (bluefox) Allowed using of `filterFunc` as string
967
+ - (@GermanBluefox) Allowed using of `filterFunc` as string
960
968
 
961
969
  ### 4.8.1 (2023-12-14)
962
970
 
963
- - (bluefox) Added Device manager to JSON Config
971
+ - (@GermanBluefox) Added Device manager to JSON Config
964
972
 
965
973
  ### 4.7.15 (2023-12-12)
966
974
 
967
- - (bluefox) Corrected parsing of a text
975
+ - (@GermanBluefox) Corrected parsing of a text
968
976
 
969
977
  ### 4.7.13 (2023-12-10)
970
978
 
971
- - (bluefox) Added possibility to define the root style and embedded property
979
+ - (@GermanBluefox) Added possibility to define the root style and embedded property
972
980
 
973
981
  ### 4.7.11 (2023-12-06)
974
982
 
975
- - (bluefox) Extended color picker with "noInputField" option
983
+ - (@GermanBluefox) Extended color picker with "noInputField" option
976
984
 
977
985
  ### 4.7.9 (2023-12-04)
978
986
 
979
- - (bluefox) Corrected the icon picker
987
+ - (@GermanBluefox) Corrected the icon picker
980
988
 
981
989
  ### 4.7.8 (2023-12-04)
982
990
 
@@ -984,20 +992,20 @@ You can find the migration instructions:
984
992
 
985
993
  ### 4.7.6 (2023-11-29)
986
994
 
987
- - (bluefox) Added translations
995
+ - (@GermanBluefox) Added translations
988
996
 
989
997
  ### 4.7.5 (2023-11-28)
990
998
 
991
- - (bluefox) Corrected subscribe on objects in the legacy connection
999
+ - (@GermanBluefox) Corrected subscribe on objects in the legacy connection
992
1000
 
993
1001
  ### 4.7.4 (2023-11-23)
994
1002
 
995
- - (bluefox) Updated packages
996
- - (bluefox) Made getStates method in legacy connection compatible with new one
1003
+ - (@GermanBluefox) Updated packages
1004
+ - (@GermanBluefox) Made getStates method in legacy connection compatible with new one
997
1005
 
998
1006
  ### 4.7.3 (2023-11-08)
999
1007
 
1000
- - (bluefox) Updated packages
1008
+ - (@GermanBluefox) Updated packages
1001
1009
 
1002
1010
  ### 4.7.2 (2023-11-03)
1003
1011
 
@@ -1006,16 +1014,16 @@ You can find the migration instructions:
1006
1014
 
1007
1015
  ### 4.7.0 (2023-10-31)
1008
1016
 
1009
- - (bluefox) Synced with admin
1010
- - (bluefox) Added GIF to image files
1017
+ - (@GermanBluefox) Synced with admin
1018
+ - (@GermanBluefox) Added GIF to image files
1011
1019
 
1012
1020
  ### 4.6.7 (2023-10-19)
1013
1021
 
1014
- - (bluefox) Added return value for `subscribeOnInstance` for Connection class
1022
+ - (@GermanBluefox) Added return value for `subscribeOnInstance` for Connection class
1015
1023
 
1016
1024
  ### 4.6.6 (2023-10-13)
1017
1025
 
1018
- - (bluefox) Fixed the legacy connection
1026
+ - (@GermanBluefox) Fixed the legacy connection
1019
1027
 
1020
1028
  ### 4.6.5 (2023-10-12)
1021
1029
 
@@ -1023,24 +1031,24 @@ You can find the migration instructions:
1023
1031
 
1024
1032
  ### 4.6.4 (2023-10-11)
1025
1033
 
1026
- - (bluefox) Updated the packages
1034
+ - (@GermanBluefox) Updated the packages
1027
1035
 
1028
1036
  ### 4.6.3 (2023-10-09)
1029
1037
 
1030
- - (bluefox) Just updated the packages
1031
- - (bluefox) Synced with admin
1038
+ - (@GermanBluefox) Just updated the packages
1039
+ - (@GermanBluefox) Synced with admin
1032
1040
 
1033
1041
  ### 4.6.2 (2023-09-29)
1034
1042
 
1035
- - (bluefox) Experimental feature added: update states on re-subscribe
1043
+ - (@GermanBluefox) Experimental feature added: update states on re-subscribe
1036
1044
 
1037
1045
  ### 4.5.5 (2023-09-27)
1038
1046
 
1039
- - (bluefox) Added export for IconNoIcon
1047
+ - (@GermanBluefox) Added export for IconNoIcon
1040
1048
 
1041
1049
  ### 4.5.4 (2023-09-17)
1042
1050
 
1043
- - (bluefox) Added the restricting to folder property for select file dialog
1051
+ - (@GermanBluefox) Added the restricting to folder property for select file dialog
1044
1052
 
1045
1053
  ### 4.5.3 (2023-08-20)
1046
1054
 
@@ -1056,165 +1064,165 @@ You can find the migration instructions:
1056
1064
 
1057
1065
  ### 4.5.0 (2023-08-18)
1058
1066
 
1059
- - (bluefox) Synchronize components with admin
1067
+ - (@GermanBluefox) Synchronize components with admin
1060
1068
 
1061
1069
  ### 4.4.8 (2023-08-17)
1062
1070
 
1063
- - (bluefox) Added translations
1071
+ - (@GermanBluefox) Added translations
1064
1072
 
1065
1073
  ### 4.4.7 (2023-08-10)
1066
1074
 
1067
- - (bluefox) Added `subscribeStateAsync` method to wait for answer
1068
- - (bluefox) Added support for arrays for un/subscriptions
1075
+ - (@GermanBluefox) Added `subscribeStateAsync` method to wait for answer
1076
+ - (@GermanBluefox) Added support for arrays for un/subscriptions
1069
1077
 
1070
1078
  ### 4.4.5 (2023-08-01)
1071
1079
 
1072
- - (bluefox) Updated packages
1080
+ - (@GermanBluefox) Updated packages
1073
1081
 
1074
1082
  ### 4.3.3 (2023-07-28)
1075
1083
 
1076
- - (bluefox) Added translations
1084
+ - (@GermanBluefox) Added translations
1077
1085
 
1078
1086
  ### 4.3.0 (2023-07-19)
1079
1087
 
1080
- - (bluefox) Updated packages
1081
- - (bluefox) Added translations
1082
- - (bluefox) Synced object browser
1083
- - (bluefox) formatting
1088
+ - (@GermanBluefox) Updated packages
1089
+ - (@GermanBluefox) Added translations
1090
+ - (@GermanBluefox) Synced object browser
1091
+ - (@GermanBluefox) formatting
1084
1092
 
1085
1093
  ### 4.2.1 (2023-07-17)
1086
1094
 
1087
- - (bluefox) Updated packages
1088
- - (bluefox) Added translations
1095
+ - (@GermanBluefox) Updated packages
1096
+ - (@GermanBluefox) Added translations
1089
1097
 
1090
1098
  ### 4.2.0 (2023-07-07)
1091
1099
 
1092
- - (bluefox) Updated packages
1093
- - (bluefox) Added new method `getObjectsById` to the socket communication
1100
+ - (@GermanBluefox) Updated packages
1101
+ - (@GermanBluefox) Added new method `getObjectsById` to the socket communication
1094
1102
 
1095
1103
  ### 4.1.2 (2023-06-20)
1096
1104
 
1097
- - (bluefox) Allowed setting theme name directly by theme toggle
1105
+ - (@GermanBluefox) Allowed setting theme name directly by theme toggle
1098
1106
 
1099
1107
  ### 4.1.0 (2023-05-10)
1100
1108
 
1101
- - (bluefox) `craco-module-federation.js` was added. For node 16
1109
+ - (@GermanBluefox) `craco-module-federation.js` was added. For node 16
1102
1110
 
1103
1111
  ### 4.0.27 (2023-05-09)
1104
1112
 
1105
- - (bluefox) Allowed showing only specific root in SelectIDDialog
1113
+ - (@GermanBluefox) Allowed showing only specific root in SelectIDDialog
1106
1114
 
1107
1115
  ### 4.0.26 (2023-05-08)
1108
1116
 
1109
- - (bluefox) Added IDs to the buttons in the dialog for GUI tests
1117
+ - (@GermanBluefox) Added IDs to the buttons in the dialog for GUI tests
1110
1118
 
1111
1119
  ### 4.0.25 (2023-04-23)
1112
1120
 
1113
- - (bluefox) Extended `TextWithIcon` with defined color and icon
1121
+ - (@GermanBluefox) Extended `TextWithIcon` with defined color and icon
1114
1122
 
1115
1123
  ### 4.0.24 (2023-04-03)
1116
1124
 
1117
- - (bluefox) Updated the file selector in tile mode
1125
+ - (@GermanBluefox) Updated the file selector in tile mode
1118
1126
 
1119
1127
  ### 4.0.23 (2023-03-27)
1120
1128
 
1121
- - (bluefox) Added translations
1129
+ - (@GermanBluefox) Added translations
1122
1130
 
1123
1131
  ### 4.0.22 (2023-03-22)
1124
1132
 
1125
- - (bluefox) Re-Activate legacy connection
1133
+ - (@GermanBluefox) Re-Activate legacy connection
1126
1134
 
1127
1135
  ### 4.0.21 (2023-03-22)
1128
1136
 
1129
- - (bluefox) Added translations
1137
+ - (@GermanBluefox) Added translations
1130
1138
 
1131
1139
  ### 4.0.20 (2023-03-21)
1132
1140
 
1133
- - (bluefox) Color picker was improved
1141
+ - (@GermanBluefox) Color picker was improved
1134
1142
 
1135
1143
  ### 4.0.19 (2023-03-20)
1136
1144
 
1137
- - (bluefox) Packages were updated
1138
- - (bluefox) Added new translations
1145
+ - (@GermanBluefox) Packages were updated
1146
+ - (@GermanBluefox) Added new translations
1139
1147
 
1140
1148
  ### 4.0.18 (2023-03-16)
1141
1149
 
1142
- - (bluefox) Packages were updated
1150
+ - (@GermanBluefox) Packages were updated
1143
1151
 
1144
1152
  ### 4.0.17 (2023-03-15)
1145
1153
 
1146
- - (bluefox) Added translations
1147
- - (bluefox) Added port controller to JSON config
1154
+ - (@GermanBluefox) Added translations
1155
+ - (@GermanBluefox) Added port controller to JSON config
1148
1156
 
1149
1157
  ### 4.0.15 (2023-03-12)
1150
1158
 
1151
- - (bluefox) Updated the object browser and file browser
1159
+ - (@GermanBluefox) Updated the object browser and file browser
1152
1160
 
1153
1161
  ### 4.0.14 (2023-03-03)
1154
1162
 
1155
- - (bluefox) added handler of alert messages
1163
+ - (@GermanBluefox) added handler of alert messages
1156
1164
 
1157
1165
  ### 4.0.13 (2023-02-15)
1158
1166
 
1159
- - (bluefox) Corrected the theme button
1167
+ - (@GermanBluefox) Corrected the theme button
1160
1168
 
1161
1169
  ### 4.0.12 (2023-02-15)
1162
1170
 
1163
- - (bluefox) made the fix for `echarts`
1171
+ - (@GermanBluefox) made the fix for `echarts`
1164
1172
 
1165
1173
  ### 4.0.11 (2023-02-14)
1166
1174
 
1167
- - (bluefox) Updated packages
1168
- - (bluefox) The `chartReady` event was omitted
1175
+ - (@GermanBluefox) Updated packages
1176
+ - (@GermanBluefox) The `chartReady` event was omitted
1169
1177
 
1170
1178
  ### 4.0.10 (2023-02-10)
1171
1179
 
1172
- - (bluefox) Updated packages
1173
- - (bluefox) made the fix for `material`
1180
+ - (@GermanBluefox) Updated packages
1181
+ - (@GermanBluefox) made the fix for `material`
1174
1182
 
1175
1183
  ### 4.0.9 (2023-02-02)
1176
1184
 
1177
- - (bluefox) Updated packages
1185
+ - (@GermanBluefox) Updated packages
1178
1186
 
1179
1187
  ### 4.0.8 (2022-12-19)
1180
1188
 
1181
- - (bluefox) Extended socket with `log` command
1189
+ - (@GermanBluefox) Extended socket with `log` command
1182
1190
 
1183
1191
  ### 4.0.6 (2022-12-19)
1184
1192
 
1185
- - (bluefox) Corrected URL for the connection
1193
+ - (@GermanBluefox) Corrected URL for the connection
1186
1194
 
1187
1195
  ### 4.0.5 (2022-12-14)
1188
1196
 
1189
- - (bluefox) Added support of custom palette for color picker
1197
+ - (@GermanBluefox) Added support of custom palette for color picker
1190
1198
 
1191
1199
  ### 4.0.2 (2022-12-01)
1192
1200
 
1193
- - (bluefox) use `@iobroker/socket-client` instead of `Connection.tsx`
1201
+ - (@GermanBluefox) use `@iobroker/socket-client` instead of `Connection.tsx`
1194
1202
 
1195
1203
  ### 3.5.3 (2022-11-30)
1196
1204
 
1197
- - (bluefox) Improved `renderTextWithA` function to support `<b>` and `<i>` tags
1205
+ - (@GermanBluefox) Improved `renderTextWithA` function to support `<b>` and `<i>` tags
1198
1206
 
1199
1207
  ### 3.5.2 (2022-11-30)
1200
1208
 
1201
- - (bluefox) updated json config component
1209
+ - (@GermanBluefox) updated json config component
1202
1210
 
1203
1211
  ### 3.4.1 (2022-11-29)
1204
1212
 
1205
- - (bluefox) Added button text for message dialog
1213
+ - (@GermanBluefox) Added button text for message dialog
1206
1214
 
1207
1215
  ### 3.4.0 (2022-11-29)
1208
1216
 
1209
- - (bluefox) Added file selector
1217
+ - (@GermanBluefox) Added file selector
1210
1218
 
1211
1219
  ### 3.3.0 (2022-11-26)
1212
1220
 
1213
- - (bluefox) Added subscribe on files
1221
+ - (@GermanBluefox) Added subscribe on files
1214
1222
 
1215
1223
  ### 3.2.7 (2022-11-13)
1216
1224
 
1217
- - (bluefox) Added `fullWidth` property to `Dialog`
1225
+ - (@GermanBluefox) Added `fullWidth` property to `Dialog`
1218
1226
 
1219
1227
  ### 3.2.6 (2022-11-08)
1220
1228
 
@@ -1222,195 +1230,195 @@ You can find the migration instructions:
1222
1230
 
1223
1231
  ### 3.2.5 (2022-11-08)
1224
1232
 
1225
- - (bluefox) Added the role filter for the object browser
1233
+ - (@GermanBluefox) Added the role filter for the object browser
1226
1234
 
1227
1235
  ### 3.2.4 (2022-11-03)
1228
1236
 
1229
- - (bluefox) Added support for alfa channel for `invertColor`
1237
+ - (@GermanBluefox) Added support for alfa channel for `invertColor`
1230
1238
 
1231
1239
  ### 3.2.3 (2022-10-26)
1232
1240
 
1233
- - (bluefox) Corrected expert mode for object browser
1241
+ - (@GermanBluefox) Corrected expert mode for object browser
1234
1242
 
1235
1243
  ### 3.2.2 (2022-10-25)
1236
1244
 
1237
- - (bluefox) Added support for prefixes for translations
1245
+ - (@GermanBluefox) Added support for prefixes for translations
1238
1246
 
1239
1247
  ### 3.2.1 (2022-10-24)
1240
1248
 
1241
- - (bluefox) Corrected color inversion
1249
+ - (@GermanBluefox) Corrected color inversion
1242
1250
 
1243
1251
  ### 3.2.0 (2022-10-19)
1244
1252
 
1245
- - (bluefox) Added ukrainian translation
1253
+ - (@GermanBluefox) Added ukrainian translation
1246
1254
 
1247
1255
  ### 3.1.35 (2022-10-17)
1248
1256
 
1249
- - (bluefox) small changes for material
1257
+ - (@GermanBluefox) small changes for material
1250
1258
 
1251
1259
  ### 3.1.34 (2022-08-24)
1252
1260
 
1253
- - (bluefox) Implemented fallback to english by translations
1261
+ - (@GermanBluefox) Implemented fallback to english by translations
1254
1262
 
1255
1263
  ### 3.1.33 (2022-08-24)
1256
1264
 
1257
- - (bluefox) Added support for onchange flag
1265
+ - (@GermanBluefox) Added support for onchange flag
1258
1266
 
1259
1267
  ### 3.1.30 (2022-08-23)
1260
1268
 
1261
- - (bluefox) Added method `getCompactSystemRepositories`
1262
- - (bluefox) corrected error in `ObjectBrowser`
1269
+ - (@GermanBluefox) Added method `getCompactSystemRepositories`
1270
+ - (@GermanBluefox) corrected error in `ObjectBrowser`
1263
1271
 
1264
1272
  ### 3.1.27 (2022-08-01)
1265
1273
 
1266
- - (bluefox) Disable file editing in FileViewer
1274
+ - (@GermanBluefox) Disable file editing in FileViewer
1267
1275
 
1268
1276
  ### 3.1.26 (2022-08-01)
1269
1277
 
1270
- - (bluefox) Added translations
1271
- - (bluefox) JSON schema was extended with missing definitions
1278
+ - (@GermanBluefox) Added translations
1279
+ - (@GermanBluefox) JSON schema was extended with missing definitions
1272
1280
 
1273
1281
  ### 3.1.24 (2022-07-28)
1274
1282
 
1275
- - (bluefox) Updated file browser and object browser
1283
+ - (@GermanBluefox) Updated file browser and object browser
1276
1284
 
1277
1285
  ### 3.1.23 (2022-07-25)
1278
1286
 
1279
- - (bluefox) Extend custom filter for object selector
1287
+ - (@GermanBluefox) Extend custom filter for object selector
1280
1288
 
1281
1289
  ### 3.1.22 (2022-07-22)
1282
1290
 
1283
- - (bluefox) Added i18n tools for development
1291
+ - (@GermanBluefox) Added i18n tools for development
1284
1292
 
1285
1293
  ### 3.1.20 (2022-07-14)
1286
1294
 
1287
- - (bluefox) Allowed to show select dialog with the expert mode enabled
1295
+ - (@GermanBluefox) Allowed to show select dialog with the expert mode enabled
1288
1296
 
1289
1297
  ### 3.1.19 (2022-07-08)
1290
1298
 
1291
- - (bluefox) Allowed extending translations for all languages together
1299
+ - (@GermanBluefox) Allowed extending translations for all languages together
1292
1300
 
1293
1301
  ### 3.1.18 (2022-07-06)
1294
1302
 
1295
- - (bluefox) Added translation
1303
+ - (@GermanBluefox) Added translation
1296
1304
 
1297
1305
  ### 3.1.17 (2022-07-05)
1298
1306
 
1299
- - (bluefox) Deactivate JSON editor for JSONConfig because of space
1307
+ - (@GermanBluefox) Deactivate JSON editor for JSONConfig because of space
1300
1308
 
1301
1309
  ### 3.1.16 (2022-06-27)
1302
1310
 
1303
- - (bluefox) Update object browser
1311
+ - (@GermanBluefox) Update object browser
1304
1312
 
1305
1313
  ### 3.1.15 (2022-06-27)
1306
1314
 
1307
- - (bluefox) Allowed using of spaces in name
1315
+ - (@GermanBluefox) Allowed using of spaces in name
1308
1316
 
1309
1317
  ### 3.1.14 (2022-06-23)
1310
1318
 
1311
- - (bluefox) Added translations
1319
+ - (@GermanBluefox) Added translations
1312
1320
 
1313
1321
  ### 3.1.11 (2022-06-22)
1314
1322
 
1315
- - (bluefox) Added preparations for iobroker cloud
1323
+ - (@GermanBluefox) Added preparations for iobroker cloud
1316
1324
 
1317
1325
  ### 3.1.10 (2022-06-22)
1318
1326
 
1319
- - (bluefox) Added translations
1327
+ - (@GermanBluefox) Added translations
1320
1328
 
1321
1329
  ### 3.1.9 (2022-06-20)
1322
1330
 
1323
- - (bluefox) Allowed working behind reverse proxy
1331
+ - (@GermanBluefox) Allowed working behind reverse proxy
1324
1332
 
1325
1333
  ### 3.1.7 (2022-06-19)
1326
1334
 
1327
- - (bluefox) Added file select dialog
1335
+ - (@GermanBluefox) Added file select dialog
1328
1336
 
1329
1337
  ### 3.1.3 (2022-06-13)
1330
1338
 
1331
- - (bluefox) Added table with resized headers
1339
+ - (@GermanBluefox) Added table with resized headers
1332
1340
 
1333
1341
  ### 3.1.2 (2022-06-09)
1334
1342
 
1335
- - (bluefox) Added new document icon (read only)
1343
+ - (@GermanBluefox) Added new document icon (read only)
1336
1344
 
1337
1345
  ### 3.1.1 (2022-06-09)
1338
1346
 
1339
- - (bluefox) Allowed working behind reverse proxy
1347
+ - (@GermanBluefox) Allowed working behind reverse proxy
1340
1348
 
1341
1349
  ### 3.1.0 (2022-06-07)
1342
1350
 
1343
- - (bluefox) Some german texts were corrected
1351
+ - (@GermanBluefox) Some german texts were corrected
1344
1352
 
1345
1353
  ### 3.0.17 (2022-06-03)
1346
1354
 
1347
- - (bluefox) Allowed calling getAdapterInstances not for admin too
1355
+ - (@GermanBluefox) Allowed calling getAdapterInstances not for admin too
1348
1356
 
1349
1357
  ### 3.0.15 (2022-06-01)
1350
1358
 
1351
- - (bluefox) Updated JsonConfigComponent: password, table
1359
+ - (@GermanBluefox) Updated JsonConfigComponent: password, table
1352
1360
 
1353
1361
  ### 3.0.14 (2022-05-25)
1354
1362
 
1355
- - (bluefox) Added ConfigGeneric to import
1363
+ - (@GermanBluefox) Added ConfigGeneric to import
1356
1364
 
1357
1365
  ### 3.0.7 (2022-05-25)
1358
1366
 
1359
- - (bluefox) Made the module definitions
1367
+ - (@GermanBluefox) Made the module definitions
1360
1368
 
1361
1369
  ### 3.0.6 (2022-05-25)
1362
1370
 
1363
- - (bluefox) Added JsonConfigComponent
1371
+ - (@GermanBluefox) Added JsonConfigComponent
1364
1372
 
1365
1373
  ### 2.1.11 (2022-05-24)
1366
1374
 
1367
- - (bluefox) Update file browser. It supports now the file changed events.
1375
+ - (@GermanBluefox) Update file browser. It supports now the file changed events.
1368
1376
 
1369
1377
  ### 2.1.10 (2022-05-24)
1370
1378
 
1371
- - (bluefox) Corrected object browser
1379
+ - (@GermanBluefox) Corrected object browser
1372
1380
 
1373
1381
  ### 2.1.9 (2022-05-16)
1374
1382
 
1375
- - (bluefox) Corrected expert mode in object browser
1383
+ - (@GermanBluefox) Corrected expert mode in object browser
1376
1384
 
1377
1385
  ### 2.1.7 (2022-05-09)
1378
1386
 
1379
- - (bluefox) Changes were synchronized with adapter-react-v5
1380
- - (bluefox) Added `I18n.disableWarning` method
1387
+ - (@GermanBluefox) Changes were synchronized with adapter-react-v5
1388
+ - (@GermanBluefox) Added `I18n.disableWarning` method
1381
1389
 
1382
1390
  ### 2.1.6 (2022-03-28)
1383
1391
 
1384
- - (bluefox) Added `log` method to connection
1385
- - (bluefox) Corrected translations
1392
+ - (@GermanBluefox) Added `log` method to connection
1393
+ - (@GermanBluefox) Corrected translations
1386
1394
 
1387
1395
  ### 2.1.1 (2022-03-27)
1388
1396
 
1389
- - (bluefox) Corrected error in TreeTable
1397
+ - (@GermanBluefox) Corrected error in TreeTable
1390
1398
 
1391
1399
  ### 2.1.0 (2022-03-26)
1392
1400
 
1393
- - (bluefox) BREAKING_CHANGE: Corrected error with readFile(base64=false)
1401
+ - (@GermanBluefox) BREAKING_CHANGE: Corrected error with readFile(base64=false)
1394
1402
 
1395
1403
  ### 2.0.0 (2022-03-26)
1396
1404
 
1397
- - (bluefox) Initial version
1405
+ - (@GermanBluefox) Initial version
1398
1406
 
1399
1407
  ### 0.1.0 (2022-03-23)
1400
1408
 
1401
- - (bluefox) Fixed theme errors
1409
+ - (@GermanBluefox) Fixed theme errors
1402
1410
 
1403
1411
  ### 0.0.4 (2022-03-22)
1404
1412
 
1405
- - (bluefox) Fixed eslint warnings
1413
+ - (@GermanBluefox) Fixed eslint warnings
1406
1414
 
1407
1415
  ### 0.0.3 (2022-03-19)
1408
1416
 
1409
- - (bluefox) beta version
1417
+ - (@GermanBluefox) beta version
1410
1418
 
1411
1419
  ### 0.0.2 (2022-02-24)
1412
1420
 
1413
- - (bluefox) try to publish a first version
1421
+ - (@GermanBluefox) try to publish a first version
1414
1422
 
1415
1423
  ### 0.0.1 (2022-02-24)
1416
1424
 
@@ -1420,7 +1428,7 @@ You can find the migration instructions:
1420
1428
 
1421
1429
  The MIT License (MIT)
1422
1430
 
1423
- Copyright (c) 2019-2024 bluefox <dogafox@gmail.com>
1431
+ Copyright (c) 2019-2024 @GermanBluefox <dogafox@gmail.com>
1424
1432
 
1425
1433
  Permission is hereby granted, free of charge, to any person obtaining a copy
1426
1434
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "7.1.4",
3
+ "version": "7.2.2",
4
4
  "description": "React classes to develop admin interfaces for ioBroker with react.",
5
5
  "author": {
6
6
  "name": "Denis Haev (bluefox)",
@@ -29,14 +29,14 @@
29
29
  "dependencies": {
30
30
  "@emotion/react": "^11.13.3",
31
31
  "@emotion/styled": "^11.13.0",
32
- "@iobroker/socket-client": "^3.0.1",
32
+ "@iobroker/socket-client": "^3.1.0",
33
33
  "@iobroker/types": "^6.0.11",
34
34
  "@iobroker/js-controller-common": "^6.0.11",
35
35
  "@iobroker/js-controller-common-db": "^6.0.11",
36
- "@mui/icons-material": "^6.1.0",
37
- "@mui/material": "^6.1.0",
38
- "@mui/x-date-pickers": "^7.17.0",
39
- "@sentry/browser": "^8.30.0",
36
+ "@mui/icons-material": "^6.1.1",
37
+ "@mui/material": "^6.1.1",
38
+ "@mui/x-date-pickers": "^7.18.0",
39
+ "@sentry/browser": "^8.32.0",
40
40
  "cronstrue": "^2.50.0",
41
41
  "react-color": "^2.19.3",
42
42
  "react-colorful": "^5.6.1",
@@ -21,7 +21,7 @@ const styles: Record<string, React.CSSProperties> = {
21
21
  flexGrow: 1000,
22
22
  },
23
23
  divContainer: {
24
- width: 32 + 24,
24
+ width: 32 + 32,
25
25
  height: 32,
26
26
  whiteSpace: 'nowrap',
27
27
  lineHeight: '32px',
@@ -478,8 +478,20 @@ class UploadImage extends Component<UploadImageProps, UploadImageState> {
478
478
  render(): JSX.Element {
479
479
  const { disabled, icon, removeIconFunc, error, crop, onChange } = this.props;
480
480
  const maxSize = this.props.maxSize || 10 * 1024;
481
- const accept = this.props.accept || { 'image/*': [] };
481
+ let accept = this.props.accept || { 'image/*': [] };
482
482
  const { uploadFile, anchorEl, cropHandler } = this.state;
483
+
484
+ // covert '"image/png"' to { 'image/*': [] }
485
+ if (typeof accept === 'string') {
486
+ accept = { [accept]: [] };
487
+ } else if (Array.isArray(accept)) {
488
+ const result: Record<string, string[]> = {};
489
+ accept.forEach(item => {
490
+ result[item] = [];
491
+ });
492
+ accept = result;
493
+ }
494
+
483
495
  return (
484
496
  <Dropzone
485
497
  disabled={!!disabled || cropHandler}
@@ -535,7 +547,7 @@ class UploadImage extends Component<UploadImageProps, UploadImageState> {
535
547
  <div style={styles.buttonRemoveWrapper}>
536
548
  <Tooltip
537
549
  title={I18n.t('ra_Clear')}
538
- componentsProps={{ popper: { sx: { pointerEvents: 'none' } } }}
550
+ slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}
539
551
  >
540
552
  <IconButton
541
553
  size="large"
@@ -554,7 +566,7 @@ class UploadImage extends Component<UploadImageProps, UploadImageState> {
554
566
  <div style={styles.buttonCropWrapper}>
555
567
  <Tooltip
556
568
  title={I18n.t('ra_Crop')}
557
- componentsProps={{ popper: { sx: { pointerEvents: 'none' } } }}
569
+ slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}
558
570
  >
559
571
  <IconButton
560
572
  size="large"
@@ -37,7 +37,7 @@ interface DialogConfirmProps {
37
37
  /** The dialog title; default: Are you sure? (translated) */
38
38
  title?: string;
39
39
  /** The dialog text */
40
- text?: string | React.JSX.Element;
40
+ text?: string | React.JSX.Element | React.JSX.Element[];
41
41
  /** Close handler. */
42
42
  onClose?: (ok: boolean) => void;
43
43
  /** if the dialog must be fill sized */
@@ -17,7 +17,7 @@ interface DialogErrorProps {
17
17
  /* The dialog title; default: Error (translated) */
18
18
  title?: string;
19
19
  /* The dialog text */
20
- text: string | React.JSX.Element;
20
+ text: string | React.JSX.Element | React.JSX.Element[];
21
21
  /* Close handler. */
22
22
  onClose?: () => void;
23
23
  /* if the dialog must be fill sized */
@@ -18,7 +18,7 @@ interface DialogMessageProps {
18
18
  /* The dialog title; default: Message (translated) */
19
19
  title?: string;
20
20
  /* The dialog text */
21
- text: string | React.JSX.Element;
21
+ text: string | React.JSX.Element | React.JSX.Element[];
22
22
  /* Close handler. */
23
23
  onClose?: () => void;
24
24
  /* if the dialog must be fill sized */
@@ -254,7 +254,7 @@ class GenericApp<
254
254
  };
255
255
 
256
256
  // merge together
257
- if (settings && settings.translations) {
257
+ if (settings?.translations) {
258
258
  Object.keys(settings.translations).forEach(lang => {
259
259
  if (settings.translations) {
260
260
  translations[lang as ioBroker.Languages] = Object.assign(
@@ -16,6 +16,7 @@ declare global {
16
16
  registerSocketOnLoad: (func: () => void) => void;
17
17
  vendorPrefix: undefined | string;
18
18
  io: any;
19
+ iob: any;
19
20
  }
20
21
  }
21
22
 
@@ -410,7 +411,7 @@ class Connection {
410
411
  */
411
412
  startSocket(): void {
412
413
  // if socket io is not yet loaded
413
- if (typeof window.io === 'undefined') {
414
+ if (typeof window.io === 'undefined' && typeof window.iob === 'undefined') {
414
415
  // if in index.html the onLoad function not defined
415
416
  if (typeof window.registerSocketOnLoad !== 'function') {
416
417
  // poll if loaded
@@ -475,7 +476,7 @@ class Connection {
475
476
 
476
477
  const url = port ? `${protocol}://${host}:${port}${path}` : `${protocol}://${host}${path}`;
477
478
 
478
- this._socket = window.io.connect(url, {
479
+ this._socket = (window.io || window.iob).connect(url, {
479
480
  path: path.endsWith('/') ? `${path}socket.io` : `${path}/socket.io`,
480
481
  query: 'ws=true',
481
482
  name: this.props.name,