@iobroker/adapter-react-v5 6.0.6 → 6.0.8
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/IconSelector.js +1 -1
- package/Components/ObjectBrowser.d.ts +1 -0
- package/Components/ObjectBrowser.js +3 -3
- package/Components/ToggleThemeMenu.js +1 -1
- package/Components/TreeTable.js +1 -1
- package/Components/UploadImage.js +2 -2
- package/Dialogs/SelectID.d.ts +32 -1
- package/Dialogs/SelectID.js +1 -1
- package/README.md +4 -0
- package/package.json +1 -1
|
@@ -2106,7 +2106,7 @@ class IconSelector extends react_1.Component {
|
|
|
2106
2106
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
2107
2107
|
react_1.default.createElement("div", { style: { width: '100%', textAlign: 'center' } }, this.state.icons && this.state.icons.map((icon, i) => {
|
|
2108
2108
|
if (!this.state.filter || (this.state.names[i] && this.state.names[i].toLowerCase().includes(this.state.filter))) {
|
|
2109
|
-
return react_1.default.createElement(material_1.Tooltip, { title: this.state.names[i] || '', key: i },
|
|
2109
|
+
return react_1.default.createElement(material_1.Tooltip, { title: this.state.names[i] || '', key: i, componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
|
|
2110
2110
|
react_1.default.createElement(material_1.IconButton, { onClick: () => this.setState({ opened: false }, () => {
|
|
2111
2111
|
const onApply = this.props.onSelect || this.props.onChange;
|
|
2112
2112
|
if (onApply) {
|
|
@@ -473,7 +473,7 @@ const styles = {
|
|
|
473
473
|
minWidth: 40,
|
|
474
474
|
},
|
|
475
475
|
cellButtonsButtonAlone: {
|
|
476
|
-
ml: `${SMALL_BUTTON_SIZE +
|
|
476
|
+
ml: `${SMALL_BUTTON_SIZE + 6}px`,
|
|
477
477
|
pt: 0,
|
|
478
478
|
mt: '-2px',
|
|
479
479
|
},
|
|
@@ -3663,7 +3663,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3663
3663
|
? Number(aclSystemConfig).toString(16)
|
|
3664
3664
|
: Number(acl).toString(16)))) :
|
|
3665
3665
|
react_1.default.createElement("div", { key: "aclEmpty", style: styles.cellButtonMinWidth }),
|
|
3666
|
-
showEdit ? react_1.default.createElement(material_1.IconButton, { key: "edit", sx: Object.assign(
|
|
3666
|
+
showEdit ? react_1.default.createElement(material_1.IconButton, { key: "edit", sx: Object.assign({ marginRight: '2px' }, styles.cellButtonsButton), size: "small", "aria-label": "edit", title: this.texts.editObject, onClick: () => {
|
|
3667
3667
|
this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, id);
|
|
3668
3668
|
this.setState({ editObjectDialog: id, editObjectAlias: false });
|
|
3669
3669
|
} },
|
|
@@ -4918,7 +4918,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4918
4918
|
return null;
|
|
4919
4919
|
}
|
|
4920
4920
|
const ObjectBrowserEditObject = this.props.objectBrowserEditObject;
|
|
4921
|
-
return react_1.default.createElement(ObjectBrowserEditObject, { key: this.state.editObjectDialog, obj: this.objects[this.state.editObjectDialog], roleArray: this.info.roles, objects: this.objects, dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, themeType: this.props.themeType, socket: this.props.socket, dialogName: this.props.dialogName, aliasTab: this.state.editObjectAlias, t: this.props.t, expertMode: !!this.state.filter.expertMode, onNewObject: (obj) => this.props.socket
|
|
4921
|
+
return react_1.default.createElement(ObjectBrowserEditObject, { key: this.state.editObjectDialog, obj: this.objects[this.state.editObjectDialog], roleArray: this.info.roles, objects: this.objects, dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, themeType: this.props.themeType, theme: this.props.theme, socket: this.props.socket, dialogName: this.props.dialogName, aliasTab: this.state.editObjectAlias, t: this.props.t, expertMode: !!this.state.filter.expertMode, onNewObject: (obj) => this.props.socket
|
|
4922
4922
|
.setObject(obj._id, obj)
|
|
4923
4923
|
.then(() => this.setState({ editObjectDialog: obj._id, editObjectAlias: false }, () => this.onSelect(obj._id)))
|
|
4924
4924
|
.catch(e => this.showError(`Cannot write object: ${e}`)), onClose: (obj) => {
|
|
@@ -9,7 +9,7 @@ const material_1 = require("@mui/material");
|
|
|
9
9
|
const icons_material_1 = require("@mui/icons-material");
|
|
10
10
|
function ToggleThemeMenu({ themeName, toggleTheme, t, className, style, size, }) {
|
|
11
11
|
return react_1.default.createElement("div", { className: className || undefined, style: style || undefined },
|
|
12
|
-
react_1.default.createElement(material_1.Tooltip, { title: t('ra_Change color theme') },
|
|
12
|
+
react_1.default.createElement(material_1.Tooltip, { title: t('ra_Change color theme'), componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
|
|
13
13
|
react_1.default.createElement(material_1.IconButton, { onClick: () => toggleTheme(), size: size || 'medium' },
|
|
14
14
|
themeName === 'dark' && react_1.default.createElement(icons_material_1.Brightness4, { className: className }),
|
|
15
15
|
themeName === 'blue' && react_1.default.createElement(icons_material_1.Brightness5, { className: className }),
|
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;
|
|
@@ -491,14 +491,14 @@ class UploadImage extends react_1.Component {
|
|
|
491
491
|
i18n_1.default.t('ra_Place your files here or click here to open the browse dialog')))
|
|
492
492
|
:
|
|
493
493
|
removeIconFunc && !cropHandler && react_1.default.createElement("div", { style: styles.buttonRemoveWrapper },
|
|
494
|
-
react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Clear') },
|
|
494
|
+
react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Clear'), componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
|
|
495
495
|
react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
|
|
496
496
|
removeIconFunc && removeIconFunc();
|
|
497
497
|
e.stopPropagation();
|
|
498
498
|
} },
|
|
499
499
|
react_1.default.createElement(icons_material_1.Close, null)))),
|
|
500
500
|
icon && crop && react_1.default.createElement("div", { style: styles.buttonCropWrapper },
|
|
501
|
-
react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Crop') },
|
|
501
|
+
react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Crop'), componentsProps: { popper: { sx: { pointerEvents: 'none' } } } },
|
|
502
502
|
react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
|
|
503
503
|
if (!cropHandler) {
|
|
504
504
|
this.setState({ cropHandler: true });
|
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,10 @@ 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.8 (2024-06-26)
|
|
775
|
+
* (bluefox) Corrected types of the select ID dialog
|
|
776
|
+
* (bluefox) Made the tooltips neutral to the pointer events
|
|
777
|
+
|
|
774
778
|
### 6.0.6 (2024-06-24)
|
|
775
779
|
* (bluefox) Synchronised with admin
|
|
776
780
|
* (bluefox) Added translations for time scheduler
|