@iobroker/adapter-react-v5 5.0.1 → 5.0.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.
- package/GenericApp.d.ts +0 -1
- package/GenericApp.js +1 -4
- package/README.md +8 -1
- package/index.d.ts +0 -3
- package/index.js +2 -6
- package/package.json +6 -8
package/GenericApp.d.ts
CHANGED
package/GenericApp.js
CHANGED
|
@@ -131,7 +131,6 @@ class GenericApp extends Router_1.default {
|
|
|
131
131
|
this.socket.systemLang = (obj === null || obj === void 0 ? void 0 : obj.common.language) || 'en';
|
|
132
132
|
i18n_1.default.setLanguage(this.socket.systemLang);
|
|
133
133
|
}
|
|
134
|
-
// @ts-expect-error will be fixed in js-controller
|
|
135
134
|
if (((_a = this._systemConfig) === null || _a === void 0 ? void 0 : _a.expertMode) !== !!((_b = obj === null || obj === void 0 ? void 0 : obj.common) === null || _b === void 0 ? void 0 : _b.expertMode)) {
|
|
136
135
|
this._systemConfig = (obj === null || obj === void 0 ? void 0 : obj.common) || {};
|
|
137
136
|
this.setState({ expertMode: this.getExpertMode() });
|
|
@@ -283,7 +282,7 @@ class GenericApp extends Router_1.default {
|
|
|
283
282
|
(instanceObj === null || instanceObj === void 0 ? void 0 : instanceObj.common) &&
|
|
284
283
|
instanceObj.common.name &&
|
|
285
284
|
instanceObj.common.version &&
|
|
286
|
-
// @ts-expect-error will be extended in js-controller TODO: this is redundant to state `${this.instanceId}.plugins.sentry.enabled`, remove this in future when admin sets the state correctly
|
|
285
|
+
// @ts-expect-error will be extended in js-controller TODO: (BF: 2024.05.30) this is redundant to state `${this.instanceId}.plugins.sentry.enabled`, remove this in future when admin sets the state correctly
|
|
287
286
|
!instanceObj.common.disableDataReporting &&
|
|
288
287
|
window.location.host !== 'localhost:3000';
|
|
289
288
|
// activate sentry plugin
|
|
@@ -451,11 +450,9 @@ class GenericApp extends Router_1.default {
|
|
|
451
450
|
}
|
|
452
451
|
/**
|
|
453
452
|
* Get current expert mode
|
|
454
|
-
* @returns {boolean}
|
|
455
453
|
*/
|
|
456
454
|
getExpertMode() {
|
|
457
455
|
var _a;
|
|
458
|
-
// @ts-expect-error will be fixed in js-controller
|
|
459
456
|
return window.sessionStorage.getItem('App.expertMode') === 'true' || !!((_a = this._systemConfig) === null || _a === void 0 ? void 0 : _a.expertMode);
|
|
460
457
|
}
|
|
461
458
|
/**
|
package/README.md
CHANGED
|
@@ -662,6 +662,12 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
662
662
|
- Replace all `socket.log.error('text')` to `socket.log('text', 'error')`
|
|
663
663
|
- Add to App.js `import { AdminConnection } from '@iobroker/adapter-react-v5';` and `super(props, { Connection: AdminConnection });` if run in admin
|
|
664
664
|
|
|
665
|
+
## Migration from adapter-react-v5@4.x to adapter-react-v5@5.x
|
|
666
|
+
- `Theme` is renamed to IobTheme. It is an object with classes inside. `Theme` is still inside and it same as mui `createTheme`.
|
|
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
|
+
- Json-Config is now an external package and must be included as dependency separately.
|
|
669
|
+
- Use type `Translate` for `t(word: string, ...args: any[]) => string`
|
|
670
|
+
|
|
665
671
|
## Warning
|
|
666
672
|
`react-inlinesvg@4.0.5` cannot be used. Use `react-inlinesvg@4.0.3` instead.
|
|
667
673
|
<!--
|
|
@@ -670,8 +676,9 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
670
676
|
-->
|
|
671
677
|
|
|
672
678
|
## Changelog
|
|
673
|
-
### 5.0.
|
|
679
|
+
### 5.0.2 (2024-05-30)
|
|
674
680
|
* (bluefox) Added better typing
|
|
681
|
+
* (bluefox) Json-Config is now a separate package and must be installed additionally
|
|
675
682
|
|
|
676
683
|
### 5.0.0 (2024-05-29)
|
|
677
684
|
* (bluefox) Types are now exported
|
package/index.d.ts
CHANGED
|
@@ -69,8 +69,6 @@ export { default as LoaderPT } from './Components/Loaders/PT';
|
|
|
69
69
|
export * from './Components/Loaders/PT';
|
|
70
70
|
export { default as LoaderMV } from './Components/Loaders/MV';
|
|
71
71
|
export * from './Components/Loaders/MV';
|
|
72
|
-
export { JsonConfigComponent } from '@iobroker/json-config';
|
|
73
|
-
export type * from '@iobroker/json-config';
|
|
74
72
|
export { default as IconAdapter } from './icons/IconAdapter';
|
|
75
73
|
export * from './icons/IconAdapter';
|
|
76
74
|
export { default as IconAlias } from './icons/IconAlias';
|
|
@@ -121,7 +119,6 @@ export { default as SimpleCronDialog } from './Dialogs/SimpleCron';
|
|
|
121
119
|
export * from './Dialogs/SimpleCron';
|
|
122
120
|
export { default as TextInput } from './Dialogs/TextInput';
|
|
123
121
|
export * from './Dialogs/TextInput';
|
|
124
|
-
export { ConfigGeneric } from '@iobroker/json-config';
|
|
125
122
|
export { default as Connection } from './Connection';
|
|
126
123
|
export * from './Connection';
|
|
127
124
|
export { PROGRESS } from './Connection';
|
package/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.IconOpen = exports.IconLogout = exports.IconInstance = exports.IconFx = exports.IconExpert = exports.IconDocument = exports.IconDevice = exports.IconCopy = exports.IconClosed = exports.IconChannel = exports.IconAlias = exports.IconAdapter = exports.
|
|
21
|
-
exports.LegacyConnection = exports.AdminConnection = exports.PROGRESS = exports.Connection = exports.
|
|
20
|
+
exports.IconState = exports.IconOpen = exports.IconLogout = exports.IconInstance = exports.IconFx = exports.IconExpert = exports.IconDocument = exports.IconDevice = exports.IconCopy = exports.IconClosed = exports.IconChannel = exports.IconAlias = exports.IconAdapter = exports.LoaderMV = exports.LoaderPT = exports.LoaderVendor = exports.SimpleCron = exports.withWidth = exports.Utils = exports.UploadImage = exports.TreeTable = exports.ToggleThemeMenu = exports.TextWithIcon = exports.TableResize = exports.TabHeader = exports.TabContent = exports.TabContainer = exports.SelectWithIcon = exports.Schedule = exports.SaveCloseButtons = exports.Router = exports.ObjectBrowser = exports.MDUtils = exports.Logo = exports.Loader = exports.Image = exports.IconSelector = exports.IconPicker = exports.Icon = exports.FileViewer = exports.FileBrowser = exports.CustomModal = exports.copy = exports.ComplexCron = exports.ColorPicker = exports.Prompt = exports.I18n = exports.i18n = exports.GenericApp = exports.Theme = void 0;
|
|
21
|
+
exports.LegacyConnection = exports.AdminConnection = exports.PROGRESS = exports.Connection = exports.TextInput = exports.SimpleCronDialog = exports.SelectFile = exports.SelectID = exports.Message = exports.Error = exports.Cron = exports.Confirm = exports.ComplexCronDialog = exports.IconClearFilter = exports.IconDocumentReadOnly = exports.IconNoIcon = void 0;
|
|
22
22
|
var Theme_1 = require("./Theme");
|
|
23
23
|
Object.defineProperty(exports, "Theme", { enumerable: true, get: function () { return __importDefault(Theme_1).default; } });
|
|
24
24
|
__exportStar(require("./Theme"), exports);
|
|
@@ -128,8 +128,6 @@ __exportStar(require("./Components/Loaders/PT"), exports);
|
|
|
128
128
|
var MV_1 = require("./Components/Loaders/MV");
|
|
129
129
|
Object.defineProperty(exports, "LoaderMV", { enumerable: true, get: function () { return __importDefault(MV_1).default; } });
|
|
130
130
|
__exportStar(require("./Components/Loaders/MV"), exports);
|
|
131
|
-
var json_config_1 = require("@iobroker/json-config");
|
|
132
|
-
Object.defineProperty(exports, "JsonConfigComponent", { enumerable: true, get: function () { return json_config_1.JsonConfigComponent; } });
|
|
133
131
|
var IconAdapter_1 = require("./icons/IconAdapter");
|
|
134
132
|
Object.defineProperty(exports, "IconAdapter", { enumerable: true, get: function () { return __importDefault(IconAdapter_1).default; } });
|
|
135
133
|
__exportStar(require("./icons/IconAdapter"), exports);
|
|
@@ -205,8 +203,6 @@ __exportStar(require("./Dialogs/SimpleCron"), exports);
|
|
|
205
203
|
var TextInput_1 = require("./Dialogs/TextInput");
|
|
206
204
|
Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return __importDefault(TextInput_1).default; } });
|
|
207
205
|
__exportStar(require("./Dialogs/TextInput"), exports);
|
|
208
|
-
var json_config_2 = require("@iobroker/json-config");
|
|
209
|
-
Object.defineProperty(exports, "ConfigGeneric", { enumerable: true, get: function () { return json_config_2.ConfigGeneric; } });
|
|
210
206
|
var Connection_1 = require("./Connection");
|
|
211
207
|
Object.defineProperty(exports, "Connection", { enumerable: true, get: function () { return __importDefault(Connection_1).default; } });
|
|
212
208
|
__exportStar(require("./Connection"), exports);
|
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.2",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Denis Haev (bluefox)",
|
|
@@ -29,17 +29,15 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@emotion/react": "^11.11.4",
|
|
31
31
|
"@emotion/styled": "^11.11.5",
|
|
32
|
-
"@iobroker/dm-utils": "^0.1.9",
|
|
33
|
-
"@iobroker/json-config": "^6.17.14",
|
|
34
32
|
"@iobroker/socket-client": "^2.4.14",
|
|
35
|
-
"@iobroker/types": "^6.0.1-alpha.0-
|
|
36
|
-
"@iobroker/js-controller-common": "^6.0.1-alpha.0-
|
|
37
|
-
"@iobroker/js-controller-common-db": "^6.0.1-alpha.0-
|
|
38
|
-
"@mui/icons-material": "^5.15.
|
|
33
|
+
"@iobroker/types": "^6.0.1-alpha.0-20240530-b38e01746",
|
|
34
|
+
"@iobroker/js-controller-common": "^6.0.1-alpha.0-20240530-b38e01746",
|
|
35
|
+
"@iobroker/js-controller-common-db": "^6.0.1-alpha.0-20240530-b38e01746",
|
|
36
|
+
"@mui/icons-material": "^5.15.19",
|
|
39
37
|
"@mui/material": "5.14.14",
|
|
40
38
|
"@mui/styles": "5.14.14",
|
|
41
39
|
"@mui/x-date-pickers": "^7.5.1",
|
|
42
|
-
"@sentry/browser": "^8.
|
|
40
|
+
"@sentry/browser": "^8.7.0",
|
|
43
41
|
"react-color": "^2.19.3",
|
|
44
42
|
"react-colorful": "^5.6.1",
|
|
45
43
|
"react-cropper": "^2.3.3",
|