@iobroker/gui-components 10.3.7 → 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.
Files changed (38) hide show
  1. package/README.md +7 -1
  2. package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +9 -0
  3. package/build/Components/ObjectBrowser/ObjectBrowserClass.js +30 -0
  4. package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
  5. package/build/Components/ObjectBrowser/contextMenu.js +18 -2
  6. package/build/Components/ObjectBrowser/contextMenu.js.map +1 -1
  7. package/build/Components/ObjectBrowser/dialogs.d.ts +10 -0
  8. package/build/Components/ObjectBrowser/dialogs.js +80 -21
  9. package/build/Components/ObjectBrowser/dialogs.js.map +1 -1
  10. package/build/Components/ObjectBrowser/styles.js +3 -0
  11. package/build/Components/ObjectBrowser/styles.js.map +1 -1
  12. package/build/Components/ObjectBrowser/types.d.ts +8 -0
  13. package/build/Components/ObjectBrowser/utils.d.ts +11 -0
  14. package/build/Components/ObjectBrowser/utils.js +17 -0
  15. package/build/Components/ObjectBrowser/utils.js.map +1 -1
  16. package/build/i18n/de.json +3 -0
  17. package/build/i18n/en.json +3 -0
  18. package/build/i18n/es.json +3 -0
  19. package/build/i18n/fr.json +3 -0
  20. package/build/i18n/it.json +3 -0
  21. package/build/i18n/nl.json +3 -0
  22. package/build/i18n/pl.json +3 -0
  23. package/build/i18n/pt.json +3 -0
  24. package/build/i18n/ru.json +3 -0
  25. package/build/i18n/uk.json +3 -0
  26. package/build/i18n/zh-cn.json +3 -0
  27. package/i18n/de.json +3 -0
  28. package/i18n/en.json +3 -0
  29. package/i18n/es.json +3 -0
  30. package/i18n/fr.json +3 -0
  31. package/i18n/it.json +3 -0
  32. package/i18n/nl.json +3 -0
  33. package/i18n/pl.json +3 -0
  34. package/i18n/pt.json +3 -0
  35. package/i18n/ru.json +3 -0
  36. package/i18n/uk.json +3 -0
  37. package/i18n/zh-cn.json +3 -0
  38. 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.7",
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,12 @@ 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
+
883
+ ### 10.3.8 (2026-10-03)
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
885
+
880
886
  ### 10.3.7 (2026-09-29)
881
887
  - (@GermanBluefox) Improved Statistics card
882
888
 
@@ -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(),