@iobroker/adapter-react-v5 4.13.24 → 4.14.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.
- package/Components/FileBrowser.d.ts +2 -2
- package/Components/IconSelector.d.ts +2 -2
- package/Components/SelectWithIcon.d.ts +2 -2
- package/Components/types.d.ts +7 -7
- package/LegacyConnection.d.ts +6 -12
- package/LegacyConnection.js +4 -12
- package/README.md +5 -1
- package/craco-module-federation.js +2 -1
- package/index.d.ts +1 -0
- package/package.json +6 -6
- package/types.d.ts +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* */
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { Connection } from '@iobroker/socket-client';
|
|
9
|
-
import { ThemeName, ThemeType,
|
|
9
|
+
import { ThemeName, ThemeType, Translate } from '../types';
|
|
10
10
|
export interface FileBrowserProps {
|
|
11
11
|
/** The key to identify this component. */
|
|
12
12
|
key?: string;
|
|
@@ -15,7 +15,7 @@ export interface FileBrowserProps {
|
|
|
15
15
|
/** The CSS class name. */
|
|
16
16
|
className?: string;
|
|
17
17
|
/** Translation function. */
|
|
18
|
-
t:
|
|
18
|
+
t: Translate;
|
|
19
19
|
/** The selected language. */
|
|
20
20
|
lang: ioBroker.Languages;
|
|
21
21
|
/** The socket connection. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Translate } from '../types';
|
|
3
3
|
interface IconSelectorProps {
|
|
4
4
|
icons?: {
|
|
5
5
|
icon?: string;
|
|
@@ -12,7 +12,7 @@ interface IconSelectorProps {
|
|
|
12
12
|
onlyDevices?: boolean;
|
|
13
13
|
onSelect?: (icon: string) => void;
|
|
14
14
|
onChange?: (icon: string) => void;
|
|
15
|
-
t:
|
|
15
|
+
t: Translate;
|
|
16
16
|
lang: ioBroker.Languages;
|
|
17
17
|
}
|
|
18
18
|
interface IconSelectorState {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps } from '@mui/material/Input';
|
|
3
|
-
import { ThemeType,
|
|
3
|
+
import { ThemeType, Translate } from '../types';
|
|
4
4
|
interface SelectWithIconProps {
|
|
5
|
-
t:
|
|
5
|
+
t: Translate;
|
|
6
6
|
lang: ioBroker.Languages;
|
|
7
7
|
themeType: ThemeType;
|
|
8
8
|
value?: string;
|
package/Components/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Translate, Width } from '../types';
|
|
2
2
|
import Connection from '../Connection';
|
|
3
3
|
import Router from './Router';
|
|
4
4
|
|
|
@@ -14,15 +14,15 @@ export interface ObjectBrowserTableFilter {
|
|
|
14
14
|
export type ObjectBrowserColumn = 'name' | 'type' | 'role' | 'room' | 'func' | 'val' | 'buttons';
|
|
15
15
|
|
|
16
16
|
export interface ObjectBrowserCustomFilter {
|
|
17
|
-
type?: string | string[];
|
|
18
|
-
common?: {
|
|
19
|
-
type?: string | string[];
|
|
20
|
-
role?: string | string[];
|
|
17
|
+
readonly type?: string | string[];
|
|
18
|
+
readonly common?: {
|
|
19
|
+
readonly type?: string | string[];
|
|
20
|
+
readonly role?: string | string[];
|
|
21
21
|
// If "_" - no custom set
|
|
22
22
|
// If "_dataSources" - only data sources (history, sql, influxdb, ...)
|
|
23
23
|
// Else "telegram." or something like this
|
|
24
24
|
// `true` - If common.custom not empty
|
|
25
|
-
custom?: '_' | '_dataSources' | true | string;
|
|
25
|
+
readonly custom?: '_' | '_dataSources' | true | string;
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -52,7 +52,7 @@ export interface ObjectBrowserProps {
|
|
|
52
52
|
/** Theme name. */
|
|
53
53
|
themeName?: string;
|
|
54
54
|
/** Translation function. */
|
|
55
|
-
t:
|
|
55
|
+
t: Translate;
|
|
56
56
|
/** The selected language. */
|
|
57
57
|
lang: ioBroker.Languages;
|
|
58
58
|
/** Allow to select multiple objects? (default: false) */
|
package/LegacyConnection.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { type HostInfo } from '@iobroker/js-controller-common/build/esm/lib/common/tools';
|
|
3
|
-
import { type FilteredNotificationInformation } from '@iobroker/js-controller-common
|
|
2
|
+
import { type HostInfo } from '@iobroker/js-controller-common-db/build/esm/lib/common/tools';
|
|
3
|
+
import { type FilteredNotificationInformation } from '@iobroker/js-controller-common/build/esm/lib/common/notificationHandler';
|
|
4
4
|
/**
|
|
5
5
|
* Copyright 2020-2024, Denis Haev (bluefox) <dogafox@gmail.com>
|
|
6
6
|
*
|
|
@@ -578,10 +578,6 @@ declare class Connection {
|
|
|
578
578
|
timeoutMs?: number): Promise<HostInfo>;
|
|
579
579
|
/**
|
|
580
580
|
* Get the host information (short version).
|
|
581
|
-
* @param {string} host
|
|
582
|
-
* @param {boolean} [update] Force update.
|
|
583
|
-
* @param {number} [timeoutMs] optional read timeout.
|
|
584
|
-
* @returns {Promise<any>}
|
|
585
581
|
*/
|
|
586
582
|
getHostInfoShort(host: string,
|
|
587
583
|
/** Force update. */
|
|
@@ -590,11 +586,6 @@ declare class Connection {
|
|
|
590
586
|
timeoutMs?: number): Promise<HostInfo>;
|
|
591
587
|
/**
|
|
592
588
|
* Get the repository.
|
|
593
|
-
* @param {string} host
|
|
594
|
-
* @param {any} [args]
|
|
595
|
-
* @param {boolean} [update] Force update.
|
|
596
|
-
* @param {number} [timeoutMs] timeout in ms.
|
|
597
|
-
* @returns {Promise<any>}
|
|
598
589
|
*/
|
|
599
590
|
getRepository(host: string, options?: {
|
|
600
591
|
update: boolean;
|
|
@@ -718,7 +709,6 @@ declare class Connection {
|
|
|
718
709
|
changePassword(user: string, password: string): Promise<void>;
|
|
719
710
|
/**
|
|
720
711
|
* Get the IP addresses of the given host.
|
|
721
|
-
* @returns {Promise<string[]>}
|
|
722
712
|
*/
|
|
723
713
|
getIpAddresses(host: string,
|
|
724
714
|
/** Force update. */
|
|
@@ -841,6 +831,10 @@ declare class Connection {
|
|
|
841
831
|
getAdaptersResetCache(adapter?: string): void;
|
|
842
832
|
getCompactInstances(update?: boolean): Promise<Record<string, ioBroker.InstanceObject>>;
|
|
843
833
|
getAdapternInstancesResetCache(adapter?: string): void;
|
|
834
|
+
/**
|
|
835
|
+
* Returns very optimized information for adapters to minimize a connection load.
|
|
836
|
+
* Reads only version of installed adapter
|
|
837
|
+
*/
|
|
844
838
|
getCompactInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
845
839
|
getCompactSystemRepositories(update?: boolean, cmdTimeout?: number): Promise<ioBroker.Object>;
|
|
846
840
|
getCompactSystemConfig(update?: boolean): Promise<ioBroker.Object>;
|
package/LegacyConnection.js
CHANGED
|
@@ -1756,10 +1756,6 @@ class Connection {
|
|
|
1756
1756
|
}
|
|
1757
1757
|
/**
|
|
1758
1758
|
* Get the host information (short version).
|
|
1759
|
-
* @param {string} host
|
|
1760
|
-
* @param {boolean} [update] Force update.
|
|
1761
|
-
* @param {number} [timeoutMs] optional read timeout.
|
|
1762
|
-
* @returns {Promise<any>}
|
|
1763
1759
|
*/
|
|
1764
1760
|
getHostInfoShort(host,
|
|
1765
1761
|
/** Force update. */
|
|
@@ -1805,11 +1801,6 @@ class Connection {
|
|
|
1805
1801
|
}
|
|
1806
1802
|
/**
|
|
1807
1803
|
* Get the repository.
|
|
1808
|
-
* @param {string} host
|
|
1809
|
-
* @param {any} [args]
|
|
1810
|
-
* @param {boolean} [update] Force update.
|
|
1811
|
-
* @param {number} [timeoutMs] timeout in ms.
|
|
1812
|
-
* @returns {Promise<any>}
|
|
1813
1804
|
*/
|
|
1814
1805
|
getRepository(host, options,
|
|
1815
1806
|
/** Force update. */
|
|
@@ -2192,7 +2183,6 @@ class Connection {
|
|
|
2192
2183
|
}
|
|
2193
2184
|
/**
|
|
2194
2185
|
* Get the IP addresses of the given host.
|
|
2195
|
-
* @returns {Promise<string[]>}
|
|
2196
2186
|
*/
|
|
2197
2187
|
getIpAddresses(host,
|
|
2198
2188
|
/** Force update. */
|
|
@@ -2501,8 +2491,10 @@ class Connection {
|
|
|
2501
2491
|
delete this._promises.compactInstances;
|
|
2502
2492
|
delete this._promises[`instances_${adapter}`];
|
|
2503
2493
|
}
|
|
2504
|
-
|
|
2505
|
-
|
|
2494
|
+
/**
|
|
2495
|
+
* Returns very optimized information for adapters to minimize a connection load.
|
|
2496
|
+
* Reads only version of installed adapter
|
|
2497
|
+
*/
|
|
2506
2498
|
getCompactInstalled(host, update, cmdTimeout) {
|
|
2507
2499
|
if (Connection.isWeb()) {
|
|
2508
2500
|
return Promise.reject('Allowed only in admin');
|
package/README.md
CHANGED
|
@@ -670,9 +670,13 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
670
670
|
-->
|
|
671
671
|
|
|
672
672
|
## Changelog
|
|
673
|
+
### 4.14.1 (2024-05-29)
|
|
674
|
+
* (bluefox) Types are now exported
|
|
675
|
+
* (bluefox) Translator renamed to Translate
|
|
676
|
+
|
|
673
677
|
### 4.13.24 (2024-05-25)
|
|
674
678
|
* (bluefox) Updated packages
|
|
675
|
-
|
|
679
|
+
|
|
676
680
|
* ### 4.13.22 (2024-05-23)
|
|
677
681
|
* (bluefox) Updated packages
|
|
678
682
|
|
|
@@ -58,6 +58,7 @@ module.exports = {
|
|
|
58
58
|
}
|
|
59
59
|
return webpackConfig;
|
|
60
60
|
},
|
|
61
|
+
|
|
61
62
|
overrideDevServerConfig: ({devServerConfig}) => {
|
|
62
63
|
devServerConfig.headers = {
|
|
63
64
|
'Access-Control-Allow-Origin': '*',
|
|
@@ -67,4 +68,4 @@ module.exports = {
|
|
|
67
68
|
|
|
68
69
|
return devServerConfig;
|
|
69
70
|
},
|
|
70
|
-
};
|
|
71
|
+
};
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.1",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Denis Haev (bluefox)",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"@emotion/styled": "^11.11.5",
|
|
32
32
|
"@iobroker/dm-utils": "^0.1.9",
|
|
33
33
|
"@iobroker/json-config": "^6.17.14",
|
|
34
|
-
"@iobroker/socket-client": "^2.4.
|
|
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-
|
|
34
|
+
"@iobroker/socket-client": "^2.4.14",
|
|
35
|
+
"@iobroker/types": "^6.0.1-alpha.0-20240529-9dbeeb628",
|
|
36
|
+
"@iobroker/js-controller-common": "^6.0.1-alpha.0-20240529-9dbeeb628",
|
|
37
|
+
"@iobroker/js-controller-common-db": "^6.0.1-alpha.0-20240529-9dbeeb628",
|
|
38
38
|
"@mui/icons-material": "^5.15.18",
|
|
39
39
|
"@mui/material": "5.14.14",
|
|
40
40
|
"@mui/styles": "5.14.14",
|
|
41
41
|
"@mui/x-date-pickers": "^7.5.1",
|
|
42
|
-
"@sentry/browser": "^8.
|
|
42
|
+
"@sentry/browser": "^8.5.0",
|
|
43
43
|
"react-color": "^2.19.3",
|
|
44
44
|
"react-colorful": "^5.6.1",
|
|
45
45
|
"react-cropper": "^2.3.3",
|
package/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Theme as MuiTheme, Palette as MuiPalette } from '@mui/material/styles';
|
|
|
3
3
|
import { AdminConnection, Connection } from '@iobroker/socket-client';
|
|
4
4
|
import LegacyConnection from './LegacyConnection';
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type Translate = (key: string, ...args: (string | number | boolean)[]) => string;
|
|
7
7
|
|
|
8
8
|
export interface ConnectionProps {
|
|
9
9
|
/** The socket name. */
|