@iobroker/gui-components 10.0.3 → 10.0.4

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 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.0.3",
39
+ "@iobroker/gui-components": "^10.0.4",
40
40
  "@mui/icons-material": "^9.0.1",
41
41
  "@mui/material": "^9.0.1",
42
42
  "react": "^19.2.5",
@@ -856,6 +856,10 @@ You can find the migration instructions:
856
856
  -->
857
857
 
858
858
  ## Changelog
859
+ ### 10.0.4 (2026-07-26)
860
+
861
+ - (@GermanBluefox) Better typing for the `ObjectBrowser` component
862
+
859
863
  ### 10.0.3 (2026-07-25)
860
864
 
861
865
  - (@GermanBluefox) Split the object browser into the directory `Components/ObjectBrowser` (no API changes)
@@ -370,8 +370,10 @@ export interface ObjectBrowserProps {
370
370
  onAllLoaded?: () => void;
371
371
 
372
372
  // components
373
- objectCustomDialog?: React.FC<ObjectCustomDialogProps>;
374
- objectMoveRenameDialog?: React.FC<ObjectMoveRenameDialogProps>;
373
+ // These are only ever instantiated via `createElement`, so both class and function components
374
+ // are valid here - hence `ComponentType` and not the narrower `FC`.
375
+ objectCustomDialog?: React.ComponentType<ObjectCustomDialogProps>;
376
+ objectMoveRenameDialog?: React.ComponentType<ObjectMoveRenameDialogProps>;
375
377
  objectAddBoolean?: boolean; // optional toolbar button
376
378
  objectEditBoolean?: boolean; // optional toolbar button
377
379
  objectStatesView?: boolean; // optional toolbar button
@@ -397,15 +399,15 @@ export interface ObjectBrowserProps {
397
399
  * `{common: {role: ['switch', 'button']}` - show only states with roles starting from `switch` and `button`
398
400
  */
399
401
  customFilter?: ObjectBrowserCustomFilter;
400
- objectBrowserValue?: React.FC<ObjectBrowserValueProps>;
401
- objectBrowserEditObject?: React.FC<ObjectBrowserEditObjectProps>;
402
+ objectBrowserValue?: React.ComponentType<ObjectBrowserValueProps>;
403
+ objectBrowserEditObject?: React.ComponentType<ObjectBrowserEditObjectProps>;
402
404
  /** on edit alias */
403
- objectBrowserAliasEditor?: React.FC<ObjectAliasEditorProps>;
405
+ objectBrowserAliasEditor?: React.ComponentType<ObjectAliasEditorProps>;
404
406
  /** on Edit role */
405
- objectBrowserEditRole?: React.FC<ObjectBrowserEditRoleProps>;
407
+ objectBrowserEditRole?: React.ComponentType<ObjectBrowserEditRoleProps>;
406
408
  /** on view file state */
407
- objectBrowserViewFile?: React.FC<ObjectViewFileDialogProps>;
408
- objectBrowserInsertJsonObjects?: React.FC<InsertJsonObjectsDialogProps>;
409
+ objectBrowserViewFile?: React.ComponentType<ObjectViewFileDialogProps>;
410
+ objectBrowserInsertJsonObjects?: React.ComponentType<InsertJsonObjectsDialogProps>;
409
411
  router?: typeof Router;
410
412
  types?: ioBroker.ObjectType[];
411
413
  /** Possible columns: ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */
@@ -421,7 +423,7 @@ export interface ObjectBrowserProps {
421
423
  */
422
424
  filterFunc?: (obj: ioBroker.Object) => boolean;
423
425
  /** Used for enums dragging */
424
- DragWrapper?: React.FC<DragWrapperProps>;
426
+ DragWrapper?: React.ComponentType<DragWrapperProps>;
425
427
  /** let DragWrapper know about objects to get the icons */
426
428
  setObjectsReference?: (objects: Record<string, ioBroker.Object>) => void;
427
429
  dragEnabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/gui-components",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "description": "Shared React components (React 19 / MUI 9) to develop ioBroker interfaces. Successor of @iobroker/adapter-react-v5.",
5
5
  "author": {
6
6
  "name": "bluefox",