@iobroker/adapter-react-v5 4.13.13 → 4.13.15
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/ObjectBrowser.js +8 -3
- package/Components/SimpleCron/index.js +1 -1
- package/Components/Utils.js +1 -1
- package/GenericApp.d.ts +4 -7
- package/GenericApp.js +4 -8
- package/README.md +6 -0
- package/package.json +8 -9
- package/types.d.ts +6 -1
|
@@ -1785,7 +1785,12 @@ class ObjectBrowser extends react_1.Component {
|
|
|
1785
1785
|
this.objectsUpdateTimer = null;
|
|
1786
1786
|
this.filterTimer = null;
|
|
1787
1787
|
this.adapterColumns = [];
|
|
1788
|
-
this.edit = {
|
|
1788
|
+
this.edit = {
|
|
1789
|
+
id: '',
|
|
1790
|
+
val: '',
|
|
1791
|
+
q: 0,
|
|
1792
|
+
ack: false,
|
|
1793
|
+
};
|
|
1789
1794
|
this.customWidth = false;
|
|
1790
1795
|
this.resizeTimeout = null;
|
|
1791
1796
|
this.resizerNextName = null;
|
|
@@ -2433,7 +2438,7 @@ class ObjectBrowser extends react_1.Component {
|
|
|
2433
2438
|
state: 0,
|
|
2434
2439
|
file: 0,
|
|
2435
2440
|
owner: 'system.user.admin',
|
|
2436
|
-
ownerGroup: 'system.group.administrator'
|
|
2441
|
+
ownerGroup: 'system.group.administrator',
|
|
2437
2442
|
};
|
|
2438
2443
|
this.systemConfig.common.defaultNewAcl.owner =
|
|
2439
2444
|
this.systemConfig.common.defaultNewAcl.owner || 'system.user.admin';
|
|
@@ -4912,7 +4917,7 @@ class ObjectBrowser extends react_1.Component {
|
|
|
4912
4917
|
this.forceUpdate();
|
|
4913
4918
|
}
|
|
4914
4919
|
(_b = this.props.router) === null || _b === void 0 ? void 0 : _b.doNavigate('tab-objects');
|
|
4915
|
-
} });
|
|
4920
|
+
}, systemConfig: this.systemConfig });
|
|
4916
4921
|
}
|
|
4917
4922
|
return null;
|
|
4918
4923
|
}
|
package/Components/Utils.js
CHANGED
|
@@ -111,7 +111,7 @@ class Utils {
|
|
|
111
111
|
text = id.substring(pos + 1).replace(/[_.]/g, ' ');
|
|
112
112
|
text = Utils.CapitalWords(text);
|
|
113
113
|
}
|
|
114
|
-
return text.trim();
|
|
114
|
+
return (text === null || text === void 0 ? void 0 : text.trim()) || '';
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Get the name of the object from the name or description.
|
package/GenericApp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2018-
|
|
2
|
+
* Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -44,6 +44,7 @@ interface GenericAppProps {
|
|
|
44
44
|
Connection?: LegacyConnection | Connection | AdminConnection;
|
|
45
45
|
/** sentry DNS */
|
|
46
46
|
sentryDSN?: string;
|
|
47
|
+
/** Callback if user changes the theme. Call it to trigger change */
|
|
47
48
|
onThemeChange?: (newThemeName: ThemeName) => void;
|
|
48
49
|
classes?: Record<string, string>;
|
|
49
50
|
}
|
|
@@ -214,9 +215,8 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
|
|
|
214
215
|
static onClose(): void;
|
|
215
216
|
/**
|
|
216
217
|
* Renders the error dialog.
|
|
217
|
-
* @returns {JSX.Element | null} The JSX element.
|
|
218
218
|
*/
|
|
219
|
-
renderError(): React.JSX.Element;
|
|
219
|
+
renderError(): React.JSX.Element | null;
|
|
220
220
|
/**
|
|
221
221
|
* Checks if the configuration has changed.
|
|
222
222
|
* @param {Record<string, any>} [native] the new state
|
|
@@ -233,9 +233,8 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
|
|
|
233
233
|
setConfigurationError(errorText: string): void;
|
|
234
234
|
/**
|
|
235
235
|
* Renders the save and close buttons.
|
|
236
|
-
* @returns {JSX.Element | undefined} The JSX element.
|
|
237
236
|
*/
|
|
238
|
-
renderSaveCloseButtons(): React.JSX.Element;
|
|
237
|
+
renderSaveCloseButtons(): React.JSX.Element | null;
|
|
239
238
|
/**
|
|
240
239
|
* @private
|
|
241
240
|
*/
|
|
@@ -258,12 +257,10 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
|
|
|
258
257
|
showToast(toast: string | React.JSX.Element): void;
|
|
259
258
|
/**
|
|
260
259
|
* Renders helper dialogs
|
|
261
|
-
* @returns {JSX.Element} The JSX element.
|
|
262
260
|
*/
|
|
263
261
|
renderHelperDialogs(): React.JSX.Element;
|
|
264
262
|
/**
|
|
265
263
|
* Renders this component.
|
|
266
|
-
* @returns {JSX.Element} The JSX element.
|
|
267
264
|
*/
|
|
268
265
|
render(): React.JSX.Element;
|
|
269
266
|
}
|
package/GenericApp.js
CHANGED
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
/**
|
|
30
|
-
* Copyright 2018-
|
|
30
|
+
* Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
31
31
|
*
|
|
32
32
|
* MIT License
|
|
33
33
|
*
|
|
@@ -35,7 +35,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
const react_1 = __importDefault(require("react"));
|
|
36
36
|
const socket_client_1 = require("@iobroker/socket-client");
|
|
37
37
|
const Sentry = __importStar(require("@sentry/browser"));
|
|
38
|
-
const SentryIntegrations = __importStar(require("@sentry/integrations"));
|
|
39
38
|
const material_1 = require("@mui/material");
|
|
40
39
|
const icons_material_1 = require("@mui/icons-material");
|
|
41
40
|
const Prompt_1 = __importDefault(require("./Prompt"));
|
|
@@ -300,7 +299,7 @@ class GenericApp extends Router_1.default {
|
|
|
300
299
|
dsn: this.sentryDSN,
|
|
301
300
|
release: `iobroker.${instanceObj.common.name}@${instanceObj.common.version}`,
|
|
302
301
|
integrations: [
|
|
303
|
-
|
|
302
|
+
Sentry.dedupeIntegration(),
|
|
304
303
|
],
|
|
305
304
|
});
|
|
306
305
|
console.log('Sentry initialized');
|
|
@@ -312,7 +311,8 @@ class GenericApp extends Router_1.default {
|
|
|
312
311
|
waitPromise = this.socket.getObject('system.meta.uuid')
|
|
313
312
|
.then(uuidObj => {
|
|
314
313
|
if (uuidObj && uuidObj.native && uuidObj.native.uuid) {
|
|
315
|
-
|
|
314
|
+
const scope = Sentry.getCurrentScope();
|
|
315
|
+
scope.setUser({ id: uuidObj.native.uuid });
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
}
|
|
@@ -668,7 +668,6 @@ class GenericApp extends Router_1.default {
|
|
|
668
668
|
}
|
|
669
669
|
/**
|
|
670
670
|
* Renders the error dialog.
|
|
671
|
-
* @returns {JSX.Element | null} The JSX element.
|
|
672
671
|
*/
|
|
673
672
|
renderError() {
|
|
674
673
|
if (!this.state.errorText) {
|
|
@@ -705,7 +704,6 @@ class GenericApp extends Router_1.default {
|
|
|
705
704
|
}
|
|
706
705
|
/**
|
|
707
706
|
* Renders the save and close buttons.
|
|
708
|
-
* @returns {JSX.Element | undefined} The JSX element.
|
|
709
707
|
*/
|
|
710
708
|
renderSaveCloseButtons() {
|
|
711
709
|
if (!this.state.confirmClose && !this.state.bottomButtons) {
|
|
@@ -786,7 +784,6 @@ class GenericApp extends Router_1.default {
|
|
|
786
784
|
}
|
|
787
785
|
/**
|
|
788
786
|
* Renders helper dialogs
|
|
789
|
-
* @returns {JSX.Element} The JSX element.
|
|
790
787
|
*/
|
|
791
788
|
renderHelperDialogs() {
|
|
792
789
|
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -797,7 +794,6 @@ class GenericApp extends Router_1.default {
|
|
|
797
794
|
}
|
|
798
795
|
/**
|
|
799
796
|
* Renders this component.
|
|
800
|
-
* @returns {JSX.Element} The JSX element.
|
|
801
797
|
*/
|
|
802
798
|
render() {
|
|
803
799
|
if (!this.state.loaded) {
|
package/README.md
CHANGED
|
@@ -670,6 +670,12 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
670
670
|
-->
|
|
671
671
|
|
|
672
672
|
## Changelog
|
|
673
|
+
### 4.13.15 (2024-05-21)
|
|
674
|
+
* (bluefox) Better types added
|
|
675
|
+
|
|
676
|
+
### 4.13.14 (2024-05-19)
|
|
677
|
+
* (bluefox) Updated packages
|
|
678
|
+
|
|
673
679
|
### 4.13.13 (2024-05-09)
|
|
674
680
|
* (bluefox) Updated ioBroker types
|
|
675
681
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.15",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Denis Haev (bluefox)",
|
|
@@ -31,16 +31,15 @@
|
|
|
31
31
|
"@emotion/styled": "^11.11.5",
|
|
32
32
|
"@iobroker/dm-utils": "^0.1.9",
|
|
33
33
|
"@iobroker/json-config": "^6.17.6",
|
|
34
|
-
"@iobroker/socket-client": "^2.4.
|
|
35
|
-
"@iobroker/types": "^5.0.20-alpha.0-
|
|
36
|
-
"@iobroker/js-controller-common": "^5.0.20-alpha.0-
|
|
37
|
-
"@iobroker/js-controller-common-db": "^5.0.20-alpha.0-
|
|
38
|
-
"@mui/icons-material": "^5.15.
|
|
34
|
+
"@iobroker/socket-client": "^2.4.10",
|
|
35
|
+
"@iobroker/types": "^5.0.20-alpha.0-20240510-819f1976e",
|
|
36
|
+
"@iobroker/js-controller-common": "^5.0.20-alpha.0-20240510-819f1976e",
|
|
37
|
+
"@iobroker/js-controller-common-db": "^5.0.20-alpha.0-20240510-819f1976e",
|
|
38
|
+
"@mui/icons-material": "^5.15.18",
|
|
39
39
|
"@mui/material": "5.14.14",
|
|
40
40
|
"@mui/styles": "5.14.14",
|
|
41
|
-
"@mui/x-date-pickers": "^7.
|
|
42
|
-
"@sentry/browser": "^
|
|
43
|
-
"@sentry/integrations": "^7.114.0",
|
|
41
|
+
"@mui/x-date-pickers": "^7.5.0",
|
|
42
|
+
"@sentry/browser": "^8.2.1",
|
|
44
43
|
"react-color": "^2.19.3",
|
|
45
44
|
"react-colorful": "^5.6.1",
|
|
46
45
|
"react-cropper": "^2.3.3",
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme as MuiTheme } from '@mui/material/styles';
|
|
2
|
-
import LegacyConnection from './LegacyConnection';
|
|
3
2
|
import { AdminConnection, Connection } from '@iobroker/socket-client';
|
|
3
|
+
import LegacyConnection from './LegacyConnection';
|
|
4
4
|
|
|
5
5
|
export type Translator = (key: string, ...args: any[]) => string;
|
|
6
6
|
|
|
@@ -59,6 +59,11 @@ export interface GenericAppProps {
|
|
|
59
59
|
socket?: ConnectionProps;
|
|
60
60
|
/** Desired connection object */
|
|
61
61
|
Connection?: LegacyConnection | Connection | AdminConnection;
|
|
62
|
+
/** sentry DNS */
|
|
63
|
+
sentryDSN?: string;
|
|
64
|
+
/** Callback if user changes the theme. Call it to trigger change */
|
|
65
|
+
onThemeChange?: (newThemeName: ThemeName) => void;
|
|
66
|
+
classes?: Record<string, string>;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export interface GenericAppSettings extends GenericAppProps {
|