@iobroker/gui-components 10.3.8 → 10.3.9
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/README.md +4 -1
- package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +9 -0
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js +30 -0
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
- package/build/Components/ObjectBrowser/contextMenu.js +18 -2
- package/build/Components/ObjectBrowser/contextMenu.js.map +1 -1
- package/build/Components/ObjectBrowser/dialogs.d.ts +10 -0
- package/build/Components/ObjectBrowser/dialogs.js +42 -0
- package/build/Components/ObjectBrowser/dialogs.js.map +1 -1
- package/build/Components/ObjectBrowser/styles.js +3 -0
- package/build/Components/ObjectBrowser/styles.js.map +1 -1
- package/build/Components/ObjectBrowser/types.d.ts +8 -0
- package/build/i18n/de.json +2 -0
- package/build/i18n/en.json +2 -0
- package/build/i18n/es.json +2 -0
- package/build/i18n/fr.json +2 -0
- package/build/i18n/it.json +2 -0
- package/build/i18n/nl.json +2 -0
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pt.json +2 -0
- package/build/i18n/ru.json +2 -0
- package/build/i18n/uk.json +2 -0
- package/build/i18n/zh-cn.json +2 -0
- package/i18n/de.json +2 -0
- package/i18n/en.json +2 -0
- package/i18n/es.json +2 -0
- package/i18n/fr.json +2 -0
- package/i18n/it.json +2 -0
- package/i18n/nl.json +2 -0
- package/i18n/pl.json +2 -0
- package/i18n/pt.json +2 -0
- package/i18n/ru.json +2 -0
- package/i18n/uk.json +2 -0
- package/i18n/zh-cn.json +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npm create vite@latest src -- --template react-ts
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@emotion/react": "^11.14.0",
|
|
38
38
|
"@emotion/styled": "^11.14.1",
|
|
39
|
-
"@iobroker/gui-components": "^10.3.
|
|
39
|
+
"@iobroker/gui-components": "^10.3.9",
|
|
40
40
|
"@mui/icons-material": "^9.0.1",
|
|
41
41
|
"@mui/material": "^9.0.1",
|
|
42
42
|
"react": "^19.2.5",
|
|
@@ -877,6 +877,9 @@ You can find the migration instructions:
|
|
|
877
877
|
-->
|
|
878
878
|
|
|
879
879
|
## Changelog
|
|
880
|
+
### 10.3.9 (2026-10-03)
|
|
881
|
+
- (@GermanBluefox) Added: the context menu of the object browser has an entry "Edit name" (Alt+9). Giving an object a name is an everyday operation, so it needs neither the expert mode nor the big "Edit object" dialog, which the expert mode hides - it stands next to "Edit function" and "Edit room" and is offered wherever those are. A name that is translated keeps its other languages: only the language of the GUI is written, and the dialog says which languages stay untouched (ioBroker.admin#3640)
|
|
882
|
+
|
|
880
883
|
### 10.3.8 (2026-10-03)
|
|
881
884
|
- (@GermanBluefox) Added: CTRL+ENTER confirms the dialogs of the object browser - the export ("Only selected"), the rooms/functions of a row and "Edit object field" of a custom column. The confirming button of every one of these dialogs carries the hint as a tooltip
|
|
882
885
|
|
|
@@ -180,6 +180,7 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
180
180
|
contextMenuACL?: React.CSSProperties;
|
|
181
181
|
contextMenuRoom?: React.CSSProperties;
|
|
182
182
|
contextMenuRole?: React.CSSProperties;
|
|
183
|
+
contextMenuName?: React.CSSProperties;
|
|
183
184
|
contextMenuDelete?: React.CSSProperties;
|
|
184
185
|
filterInput?: React.CSSProperties;
|
|
185
186
|
iconCopy?: React.CSSProperties;
|
|
@@ -248,6 +249,14 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
248
249
|
* Renders the error dialog.
|
|
249
250
|
*/
|
|
250
251
|
renderErrorDialog(): JSX.Element | null;
|
|
252
|
+
/**
|
|
253
|
+
* Writes `common.name` of an object - the context menu entry "Edit name" ends here.
|
|
254
|
+
*
|
|
255
|
+
* A name that is translated keeps its other languages: only the language of the GUI is written.
|
|
256
|
+
* Replacing the whole thing with a plain string, as the "Edit object" dialog does, would throw
|
|
257
|
+
* away every translation the adapter delivered with the object.
|
|
258
|
+
*/
|
|
259
|
+
setObjectName(id: string, name: string): Promise<void>;
|
|
251
260
|
/**
|
|
252
261
|
* Show the error dialog.
|
|
253
262
|
*/
|
|
@@ -357,6 +357,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
357
357
|
showExportDialog: false,
|
|
358
358
|
showImportDialog: false,
|
|
359
359
|
showImportMenu: null,
|
|
360
|
+
showNameDialog: null,
|
|
360
361
|
showRenameDialog: null,
|
|
361
362
|
statesView,
|
|
362
363
|
toast: '',
|
|
@@ -867,6 +868,33 @@ export class ObjectBrowserClass extends Component {
|
|
|
867
868
|
renderErrorDialog() {
|
|
868
869
|
return dialogs.renderErrorDialog(this);
|
|
869
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
* Writes `common.name` of an object - the context menu entry "Edit name" ends here.
|
|
873
|
+
*
|
|
874
|
+
* A name that is translated keeps its other languages: only the language of the GUI is written.
|
|
875
|
+
* Replacing the whole thing with a plain string, as the "Edit object" dialog does, would throw
|
|
876
|
+
* away every translation the adapter delivered with the object.
|
|
877
|
+
*/
|
|
878
|
+
async setObjectName(id, name) {
|
|
879
|
+
try {
|
|
880
|
+
const obj = await this.props.socket.getObject(id);
|
|
881
|
+
if (!obj) {
|
|
882
|
+
this.showError(`Object "${id}" not found`);
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
obj.common ||= {};
|
|
886
|
+
if (obj.common.name && typeof obj.common.name === 'object') {
|
|
887
|
+
obj.common.name = { ...obj.common.name, [this.props.lang]: name };
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
obj.common.name = name;
|
|
891
|
+
}
|
|
892
|
+
await this.props.socket.setObject(id, obj);
|
|
893
|
+
}
|
|
894
|
+
catch (e) {
|
|
895
|
+
this.showError(e);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
870
898
|
/**
|
|
871
899
|
* Show the error dialog.
|
|
872
900
|
*/
|
|
@@ -2720,6 +2748,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
2720
2748
|
contextMenuACL: Utils.getStyle(this.props.theme, styles.contextMenuACL),
|
|
2721
2749
|
contextMenuRoom: Utils.getStyle(this.props.theme, styles.contextMenuRoom),
|
|
2722
2750
|
contextMenuRole: Utils.getStyle(this.props.theme, styles.contextMenuRole),
|
|
2751
|
+
contextMenuName: Utils.getStyle(this.props.theme, styles.contextMenuName),
|
|
2723
2752
|
contextMenuDelete: Utils.getStyle(this.props.theme, styles.contextMenuDelete),
|
|
2724
2753
|
filterInput: Utils.getStyle(this.props.theme, styles.headerCellInput, styles.filterInput),
|
|
2725
2754
|
iconCopy: Utils.getStyle(this.props.theme, styles.cellButtonsValueButton, styles.cellButtonsValueButtonCopy),
|
|
@@ -2820,6 +2849,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
2820
2849
|
dialogs.renderAliasEditorDialog(this),
|
|
2821
2850
|
dialogs.renderEditRoleDialog(this),
|
|
2822
2851
|
dialogs.renderEnumDialog(this),
|
|
2852
|
+
dialogs.renderNameDialog(this),
|
|
2823
2853
|
this.renderErrorDialog(),
|
|
2824
2854
|
this.renderExportDialog(),
|
|
2825
2855
|
this.renderRenameDialog(),
|