@iobroker/adapter-react-v5 6.0.6 → 6.0.7
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/TreeTable.js +1 -1
- package/Dialogs/SelectID.d.ts +32 -1
- package/Dialogs/SelectID.js +1 -1
- package/README.md +3 -0
- package/package.json +1 -1
package/Components/TreeTable.js
CHANGED
|
@@ -314,7 +314,7 @@ class TreeTable extends react_1.Component {
|
|
|
314
314
|
}
|
|
315
315
|
renderSelectIdDialog() {
|
|
316
316
|
if (this.state.showSelectId && this.props.socket) {
|
|
317
|
-
return react_1.default.createElement(SelectID_1.default, { key: "tableSelect", imagePrefix: "../..", dialogName: this.props.adapterName, themeType: this.props.themeType, socket: this.props.socket, selected: this.state.selectIdValue, onClose: () => this.setState({ showSelectId: false }), onOk: (selected /* , name */) => {
|
|
317
|
+
return react_1.default.createElement(SelectID_1.default, { key: "tableSelect", imagePrefix: "../..", dialogName: this.props.adapterName, themeType: this.props.themeType, theme: this.props.theme, socket: this.props.socket, selected: this.state.selectIdValue, onClose: () => this.setState({ showSelectId: false }), onOk: (selected /* , name */) => {
|
|
318
318
|
this.setState({ showSelectId: false, selectIdValue: null });
|
|
319
319
|
this.selectCallback && this.selectCallback(selected);
|
|
320
320
|
this.selectCallback = null;
|
package/Dialogs/SelectID.d.ts
CHANGED
|
@@ -18,31 +18,62 @@ export interface SelectIDFilters {
|
|
|
18
18
|
custom?: string;
|
|
19
19
|
}
|
|
20
20
|
interface DialogSelectIDProps {
|
|
21
|
+
/** The internal name of the dialog; default: "default". Used to store settings in local storage */
|
|
21
22
|
dialogName?: string;
|
|
23
|
+
/** The dialog title; default: Please select object ID... (translated) */
|
|
22
24
|
title?: string;
|
|
25
|
+
/** Set to true to allow the selection of multiple IDs. */
|
|
23
26
|
multiSelect?: boolean;
|
|
27
|
+
/** Show folders before any leaves. */
|
|
24
28
|
foldersFirst?: boolean;
|
|
29
|
+
/** Path prefix for images (default: '.') */
|
|
25
30
|
imagePrefix?: string;
|
|
31
|
+
/** @deprecated: same as imagePrefix */
|
|
26
32
|
prefix?: string;
|
|
33
|
+
/** Show the expert button */
|
|
27
34
|
showExpertButton?: boolean;
|
|
35
|
+
/** Force expert mode */
|
|
28
36
|
expertMode?: boolean;
|
|
37
|
+
/** optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */
|
|
29
38
|
columns?: ObjectBrowserColumn[];
|
|
39
|
+
/** Object types to show; default: 'state' only */
|
|
30
40
|
types?: ObjectBrowserType | ObjectBrowserType[];
|
|
41
|
+
/** The language. */
|
|
31
42
|
lang?: ioBroker.Languages;
|
|
43
|
+
/** The socket connection. */
|
|
32
44
|
socket: Connection;
|
|
45
|
+
/** Can't objects be edited? (default: true) */
|
|
33
46
|
notEditable?: boolean;
|
|
47
|
+
/** Theme name. */
|
|
34
48
|
themeName?: string;
|
|
49
|
+
/** Theme type: dark or light */
|
|
35
50
|
themeType?: string;
|
|
36
51
|
/** The theme object */
|
|
37
|
-
theme
|
|
52
|
+
theme: IobTheme;
|
|
53
|
+
/** The date format for the date columns */
|
|
54
|
+
dateFormat?: string;
|
|
55
|
+
/** Is use comma or point for displaying of float numbers */
|
|
56
|
+
isFloatComma?: boolean;
|
|
57
|
+
/** Custom filter. */
|
|
38
58
|
customFilter?: ObjectBrowserCustomFilter;
|
|
59
|
+
/** The selected IDs. */
|
|
39
60
|
selected?: string | string[];
|
|
61
|
+
/** The ok button text; default: OK (translated) */
|
|
40
62
|
ok?: string;
|
|
63
|
+
/** The cancel button text; default: Cancel (translated) */
|
|
41
64
|
cancel?: string;
|
|
65
|
+
/** Close handler that is always called when the dialog is closed. */
|
|
42
66
|
onClose: () => void;
|
|
67
|
+
/** Handler that is called when the user presses OK. */
|
|
43
68
|
onOk: (selected: string | string[] | undefined, name: string) => void;
|
|
69
|
+
/** Function to filter out all unnecessary objects. Can be string or function.
|
|
70
|
+
It cannot be used together with "types".
|
|
71
|
+
Example for function: `obj => obj.common?.type === 'boolean'` to show only boolean states
|
|
72
|
+
In case of string, it must look like `obj.common && obj.common.type === 'boolean'` */
|
|
44
73
|
filterFunc?: string | ((obj: ioBroker.Object) => boolean);
|
|
74
|
+
/** predefined filter fields, like {"id":"","name":"","room":"","func":"","role":"level","type":"","custom":""} */
|
|
45
75
|
filters?: SelectIDFilters;
|
|
76
|
+
/** Show elements only of this root ID */
|
|
46
77
|
root?: string;
|
|
47
78
|
}
|
|
48
79
|
interface DialogSelectIDState {
|
package/Dialogs/SelectID.js
CHANGED
|
@@ -129,7 +129,7 @@ class DialogSelectID extends react_1.Component {
|
|
|
129
129
|
overflow: 'hidden',
|
|
130
130
|
padding: '8px 4px',
|
|
131
131
|
} },
|
|
132
|
-
react_1.default.createElement(ObjectBrowser_1.default, { foldersFirst: this.props.foldersFirst, imagePrefix: this.props.imagePrefix || this.props.prefix, defaultFilters: this.filters, dialogName: this.dialogName, showExpertButton: this.props.showExpertButton !== undefined ? this.props.showExpertButton : true, expertMode: this.props.expertMode,
|
|
132
|
+
react_1.default.createElement(ObjectBrowser_1.default, { foldersFirst: this.props.foldersFirst, imagePrefix: this.props.imagePrefix || this.props.prefix, dateFormat: this.props.dateFormat, defaultFilters: this.filters, dialogName: this.dialogName, isFloatComma: this.props.isFloatComma, showExpertButton: this.props.showExpertButton !== undefined ? this.props.showExpertButton : true, expertMode: this.props.expertMode,
|
|
133
133
|
// style={{ width: '100%', height: '100%' }}
|
|
134
134
|
columns: this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val'], types: this.props.types ? (Array.isArray(this.props.types) ? this.props.types : [this.props.types]) : ['state'], root: this.props.root, t: i18n_1.default.t, lang: this.props.lang || i18n_1.default.getLanguage(), socket: this.props.socket, selected: this.state.selected, multiSelect: this.props.multiSelect, notEditable: this.props.notEditable === undefined ? true : this.props.notEditable,
|
|
135
135
|
// name={this.state.name}
|
package/README.md
CHANGED
|
@@ -771,6 +771,9 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
|
|
|
771
771
|
-->
|
|
772
772
|
|
|
773
773
|
## Changelog
|
|
774
|
+
### 6.0.7 (2024-06-26)
|
|
775
|
+
* (bluefox) Corrected types of the select ID dialog
|
|
776
|
+
|
|
774
777
|
### 6.0.6 (2024-06-24)
|
|
775
778
|
* (bluefox) Synchronised with admin
|
|
776
779
|
* (bluefox) Added translations for time scheduler
|