@iobroker/adapter-react-v5 5.0.4 → 5.0.6
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.
- package/Components/ColorPicker.d.ts +0 -1
- package/Components/ColorPicker.js +1 -1
- package/Components/ComplexCron.js +20 -28
- package/Components/CopyToClipboard.js +0 -4
- package/Components/CustomModal.js +1 -5
- package/Components/FileBrowser.js +13 -18
- package/Components/FileViewer.js +4 -11
- package/Components/Icon.d.ts +2 -2
- package/Components/Icon.js +2 -2
- package/Components/IconSelector.js +2 -10
- package/Components/Image.js +3 -1
- package/Components/Loader.d.ts +2 -2
- package/Components/Loader.js +1 -1
- package/Components/Loaders/PT.d.ts +1 -1
- package/Components/Loaders/PT.js +1 -1
- package/Components/Loaders/Vendor.d.ts +1 -1
- package/Components/Loaders/Vendor.js +2 -2
- package/Components/Logo.js +1 -1
- package/Components/MDUtils.js +2 -0
- package/Components/ObjectBrowser.d.ts +526 -2
- package/Components/ObjectBrowser.js +100 -84
- package/Components/SaveCloseButtons.js +9 -18
- package/Components/Schedule.js +2 -2
- package/Components/SimpleCron/cron2text.js +5 -3
- package/Components/SimpleCron/cronText.js +1 -1
- package/Components/SimpleCron/index.js +29 -35
- package/Components/TableResize.d.ts +1 -1
- package/Components/TableResize.js +1 -1
- package/Components/TextWithIcon.js +1 -1
- package/Components/TreeTable.js +5 -4
- package/Components/Utils.d.ts +58 -60
- package/Components/Utils.js +239 -197
- package/Dialogs/ComplexCron.js +2 -10
- package/Dialogs/Confirm.d.ts +1 -1
- package/Dialogs/Confirm.js +2 -4
- package/Dialogs/Cron.js +1 -3
- package/Dialogs/Error.d.ts +1 -11
- package/Dialogs/Error.js +1 -7
- package/Dialogs/Message.d.ts +1 -12
- package/Dialogs/Message.js +1 -8
- package/Dialogs/SelectFile.js +1 -5
- package/Dialogs/SelectID.d.ts +1 -1
- package/Dialogs/SelectID.js +13 -7
- package/Dialogs/SimpleCron.js +1 -3
- package/Dialogs/TextInput.js +1 -5
- package/GenericApp.d.ts +2 -3
- package/GenericApp.js +11 -9
- package/LegacyConnection.d.ts +11 -12
- package/LegacyConnection.js +350 -222
- package/README.md +25 -0
- package/craco-module-federation.js +2 -2
- package/i18n.d.ts +1 -1
- package/i18n.js +6 -8
- package/package.json +7 -7
- package/types.d.ts +27 -27
package/README.md
CHANGED
|
@@ -667,6 +667,25 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
667
667
|
- adapter-react-v5 has all types exported. So you can use `import { type IobTheme, Theme } from '@iobroker/adapter-react-v5';` and `const theme: IobTheme = Theme('light');`
|
|
668
668
|
- Json-Config is now an external package and must be included as dependency separately.
|
|
669
669
|
- Use type `Translate` for `t(word: string, ...args: any[]) => string`
|
|
670
|
+
- All components for admin JsonConfig must be changed:
|
|
671
|
+
Before `adapter-react-v5@5.x`:
|
|
672
|
+
|
|
673
|
+
```
|
|
674
|
+
import { ConfigGeneric, I18n } from '@iobroker/adapter-react-v5';
|
|
675
|
+
class JsonComponent extends ConfigGeneric {
|
|
676
|
+
...
|
|
677
|
+
}
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
With `adapter-react-v5@5.x`:
|
|
681
|
+
|
|
682
|
+
```
|
|
683
|
+
import { I18n } from '@iobroker/adapter-react-v5';
|
|
684
|
+
import { ConfigGeneric } from '@iobroker/json-config';
|
|
685
|
+
class JsonComponent extends ConfigGeneric {
|
|
686
|
+
...
|
|
687
|
+
}
|
|
688
|
+
```
|
|
670
689
|
|
|
671
690
|
## Warning
|
|
672
691
|
`react-inlinesvg@4.0.5` cannot be used. Use `react-inlinesvg@4.0.3` instead.
|
|
@@ -676,6 +695,12 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
676
695
|
-->
|
|
677
696
|
|
|
678
697
|
## Changelog
|
|
698
|
+
### 5.0.6 (2024-06-15)
|
|
699
|
+
* (bluefox) Added `modulefederation.admin.config.js` for module federation
|
|
700
|
+
|
|
701
|
+
### 5.0.5 (2024-06-10)
|
|
702
|
+
* (bluefox) Sources were synchronized with admin
|
|
703
|
+
|
|
679
704
|
### 5.0.4 (2024-06-07)
|
|
680
705
|
* (bluefox) Added better typing
|
|
681
706
|
|
|
@@ -18,7 +18,7 @@ const getModuleFederationConfigPath = (additionalPaths = []) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
module.exports = {
|
|
21
|
-
overrideWebpackConfig: ({webpackConfig, pluginOptions}) => {
|
|
21
|
+
overrideWebpackConfig: ({ webpackConfig, pluginOptions }) => {
|
|
22
22
|
const moduleFederationConfigPath = getModuleFederationConfigPath();
|
|
23
23
|
|
|
24
24
|
if (moduleFederationConfigPath) {
|
|
@@ -59,7 +59,7 @@ module.exports = {
|
|
|
59
59
|
return webpackConfig;
|
|
60
60
|
},
|
|
61
61
|
|
|
62
|
-
overrideDevServerConfig: ({devServerConfig}) => {
|
|
62
|
+
overrideDevServerConfig: ({ devServerConfig }) => {
|
|
63
63
|
devServerConfig.headers = {
|
|
64
64
|
'Access-Control-Allow-Origin': '*',
|
|
65
65
|
'Access-Control-Allow-Methods': '*',
|
package/i18n.d.ts
CHANGED
package/i18n.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
6
6
|
*
|
|
7
|
-
|
|
7
|
+
* */
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
/**
|
|
10
10
|
* Translation string management.
|
|
@@ -76,13 +76,11 @@ class I18n {
|
|
|
76
76
|
if (!languageDictionary) {
|
|
77
77
|
console.warn(`Used unknown language: ${_lang}`);
|
|
78
78
|
}
|
|
79
|
-
else {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
console.warn(`Translation for word "${word}" in "${_lang}" was ignored: existing = "${languageDictionary[word]}", new = ${_word[_lang]}`);
|
|
85
|
-
}
|
|
79
|
+
else if (!languageDictionary[word]) {
|
|
80
|
+
languageDictionary[word] = _word[_lang];
|
|
81
|
+
}
|
|
82
|
+
else if (languageDictionary[word] !== _word[_lang]) {
|
|
83
|
+
console.warn(`Translation for word "${word}" in "${_lang}" was ignored: existing = "${languageDictionary[word]}", new = ${_word[_lang]}`);
|
|
86
84
|
}
|
|
87
85
|
});
|
|
88
86
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Denis Haev (bluefox)",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"@emotion/react": "^11.11.4",
|
|
31
31
|
"@emotion/styled": "^11.11.5",
|
|
32
32
|
"@iobroker/socket-client": "^2.4.18",
|
|
33
|
-
"@iobroker/types": "^6.0.
|
|
34
|
-
"@iobroker/js-controller-common": "^6.0.
|
|
35
|
-
"@iobroker/js-controller-common-db": "^6.0.
|
|
36
|
-
"@mui/icons-material": "^5.15.
|
|
33
|
+
"@iobroker/types": "^6.0.4",
|
|
34
|
+
"@iobroker/js-controller-common": "^6.0.4",
|
|
35
|
+
"@iobroker/js-controller-common-db": "^6.0.4",
|
|
36
|
+
"@mui/icons-material": "^5.15.20",
|
|
37
37
|
"@mui/material": "5.14.14",
|
|
38
38
|
"@mui/styles": "5.14.14",
|
|
39
|
-
"@mui/x-date-pickers": "^7.
|
|
40
|
-
"@sentry/browser": "^8.
|
|
39
|
+
"@mui/x-date-pickers": "^7.7.0",
|
|
40
|
+
"@sentry/browser": "^8.9.2",
|
|
41
41
|
"react-color": "^2.19.3",
|
|
42
42
|
"react-colorful": "^5.6.1",
|
|
43
43
|
"react-cropper": "^2.3.3",
|
package/types.d.ts
CHANGED
|
@@ -75,31 +75,6 @@ export interface GenericAppSettings extends GenericAppProps {
|
|
|
75
75
|
doNotLoadAllObjects?: boolean;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
export interface GenericAppState {
|
|
79
|
-
loaded: boolean;
|
|
80
|
-
themeType: ThemeType;
|
|
81
|
-
themeName: ThemeName;
|
|
82
|
-
theme: IobTheme;
|
|
83
|
-
expertMode: boolean;
|
|
84
|
-
selectedTab: string;
|
|
85
|
-
selectedTabNum: number | undefined;
|
|
86
|
-
native: Record<string, any>;
|
|
87
|
-
errorText: string | React.JSX.Element;
|
|
88
|
-
changed: boolean;
|
|
89
|
-
connected: boolean;
|
|
90
|
-
isConfigurationError: string;
|
|
91
|
-
toast: string | React.JSX.Element;
|
|
92
|
-
bottomButtons: boolean;
|
|
93
|
-
width: Width;
|
|
94
|
-
confirmClose: boolean;
|
|
95
|
-
_alert: boolean;
|
|
96
|
-
_alertType: 'info' | 'warning' | 'error' | 'success';
|
|
97
|
-
_alertMessage: string | React.JSX.Element;
|
|
98
|
-
common?: Record<string, any>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export type Width = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
102
|
-
|
|
103
78
|
interface Palette extends MuiPalette {
|
|
104
79
|
mode: ThemeType;
|
|
105
80
|
expert: string;
|
|
@@ -120,7 +95,7 @@ interface Palette extends MuiPalette {
|
|
|
120
95
|
A200: string;
|
|
121
96
|
A400: string;
|
|
122
97
|
A700: string;
|
|
123
|
-
}
|
|
98
|
+
};
|
|
124
99
|
}
|
|
125
100
|
|
|
126
101
|
export interface IobTheme extends MuiTheme {
|
|
@@ -130,5 +105,30 @@ export interface IobTheme extends MuiTheme {
|
|
|
130
105
|
saveToolbar: {
|
|
131
106
|
background: string;
|
|
132
107
|
button: React.CSSProperties;
|
|
133
|
-
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type Width = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
112
|
+
|
|
113
|
+
export interface GenericAppState {
|
|
114
|
+
loaded: boolean;
|
|
115
|
+
themeType: ThemeType;
|
|
116
|
+
themeName: ThemeName;
|
|
117
|
+
theme: IobTheme;
|
|
118
|
+
expertMode: boolean;
|
|
119
|
+
selectedTab: string;
|
|
120
|
+
selectedTabNum: number | undefined;
|
|
121
|
+
native: Record<string, any>;
|
|
122
|
+
errorText: string | React.JSX.Element;
|
|
123
|
+
changed: boolean;
|
|
124
|
+
connected: boolean;
|
|
125
|
+
isConfigurationError: string;
|
|
126
|
+
toast: string | React.JSX.Element;
|
|
127
|
+
bottomButtons: boolean;
|
|
128
|
+
width: Width;
|
|
129
|
+
confirmClose: boolean;
|
|
130
|
+
_alert: boolean;
|
|
131
|
+
_alertType: 'info' | 'warning' | 'error' | 'success';
|
|
132
|
+
_alertMessage: string | React.JSX.Element;
|
|
133
|
+
common?: Record<string, any>;
|
|
134
134
|
}
|