@iobroker/gui-components 10.0.1 → 10.0.3

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 (43) hide show
  1. package/README.md +6 -2
  2. package/build/Components/FileBrowser.js +18 -13
  3. package/build/Components/FileBrowser.js.map +1 -1
  4. package/build/Components/{ObjectBrowser.d.ts → ObjectBrowser/ObjectBrowserClass.d.ts} +142 -77
  5. package/build/Components/ObjectBrowser/ObjectBrowserClass.js +2462 -0
  6. package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -0
  7. package/build/Components/ObjectBrowser/constants.d.ts +50 -0
  8. package/build/Components/ObjectBrowser/constants.js +138 -0
  9. package/build/Components/ObjectBrowser/constants.js.map +1 -0
  10. package/build/Components/ObjectBrowser/contextMenu.d.ts +13 -0
  11. package/build/Components/ObjectBrowser/contextMenu.js +354 -0
  12. package/build/Components/ObjectBrowser/contextMenu.js.map +1 -0
  13. package/build/Components/ObjectBrowser/dialogs.d.ts +31 -0
  14. package/build/Components/ObjectBrowser/dialogs.js +421 -0
  15. package/build/Components/ObjectBrowser/dialogs.js.map +1 -0
  16. package/build/Components/ObjectBrowser/index.d.ts +20 -0
  17. package/build/Components/ObjectBrowser/index.js +20 -0
  18. package/build/Components/ObjectBrowser/index.js.map +1 -0
  19. package/build/Components/ObjectBrowser/renderLeaf.d.ts +41 -0
  20. package/build/Components/ObjectBrowser/renderLeaf.js +1077 -0
  21. package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -0
  22. package/build/Components/ObjectBrowser/styles.d.ts +7 -0
  23. package/build/Components/ObjectBrowser/styles.js +662 -0
  24. package/build/Components/ObjectBrowser/styles.js.map +1 -0
  25. package/build/Components/ObjectBrowser/toolbar.d.ts +26 -0
  26. package/build/Components/ObjectBrowser/toolbar.js +327 -0
  27. package/build/Components/ObjectBrowser/toolbar.js.map +1 -0
  28. package/build/Components/{objectBrowser.types.d.ts → ObjectBrowser/types.d.ts} +15 -10
  29. package/build/Components/{objectBrowserUtils.d.ts → ObjectBrowser/utils.d.ts} +22 -2
  30. package/build/Components/{objectBrowserUtils.js → ObjectBrowser/utils.js} +46 -2
  31. package/build/Components/ObjectBrowser/utils.js.map +1 -0
  32. package/build/Components/TreeTable.d.ts +2 -2
  33. package/build/Components/TreeTable.js.map +1 -1
  34. package/build/Dialogs/SelectID.d.ts +4 -4
  35. package/build/Dialogs/SelectID.js +2 -2
  36. package/build/Dialogs/SelectID.js.map +1 -1
  37. package/build/index.d.ts +2 -2
  38. package/build/index.js +1 -1
  39. package/build/index.js.map +1 -1
  40. package/package.json +5 -5
  41. package/build/Components/ObjectBrowser.js +0 -5162
  42. package/build/Components/ObjectBrowser.js.map +0 -1
  43. package/build/Components/objectBrowserUtils.js.map +0 -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.0.1",
39
+ "@iobroker/gui-components": "^10.0.3",
40
40
  "@mui/icons-material": "^9.0.1",
41
41
  "@mui/material": "^9.0.1",
42
42
  "react": "^19.2.5",
@@ -856,7 +856,11 @@ You can find the migration instructions:
856
856
  -->
857
857
 
858
858
  ## Changelog
859
- ### 10.0.1 (2026-07-25)
859
+ ### 10.0.3 (2026-07-25)
860
+
861
+ - (@GermanBluefox) Split the object browser into the directory `Components/ObjectBrowser` (no API changes)
862
+
863
+ ### 10.0.2 (2026-07-25)
860
864
 
861
865
  - (@GermanBluefox) BREAKING: Package renamed from `@iobroker/adapter-react-v5` to `@iobroker/gui-components`
862
866
  - (@GermanBluefox) BREAKING: React19 + MUI9
@@ -39,12 +39,18 @@ const styles = {
39
39
  overflow: 'hidden',
40
40
  height: '100%',
41
41
  position: 'relative',
42
+ // toolbar, path and the file list are stacked, the list takes the remaining height
43
+ display: 'flex',
44
+ flexDirection: 'column',
42
45
  },
43
46
  filesDiv: {
44
47
  width: 'calc(100% - 8px)',
45
48
  overflowX: 'hidden',
46
49
  overflowY: 'auto',
47
50
  padding: 8,
51
+ // takes the remaining height, `minHeight` allows it to shrink in the flex column
52
+ flex: '1 1 auto',
53
+ minHeight: 0,
48
54
  },
49
55
  filesDivHint: {
50
56
  position: 'absolute',
@@ -54,16 +60,12 @@ const styles = {
54
60
  fontStyle: 'italic',
55
61
  fontSize: 12,
56
62
  },
57
- filesDivTable: {
58
- height: 'calc(100% - 56px)',
59
- },
63
+ filesDivTable: {},
60
64
  filesDivTile: {
61
- height: `calc(100% - ${48 * 2 + 8}px)`,
62
65
  display: 'flex',
63
66
  alignContent: 'flex-start',
64
67
  alignItems: 'stretch',
65
68
  flexWrap: 'wrap',
66
- flex: `0 0 ${TILE_WIDTH}px`,
67
69
  },
68
70
  itemTile: (theme) => ({
69
71
  position: 'relative',
@@ -106,7 +108,8 @@ const styles = {
106
108
  top: 22,
107
109
  left: 18,
108
110
  zIndex: 1,
109
- color: theme.palette.mode === 'dark' ? '#FFF' : '#FFF',
111
+ // the arrow is drawn on the folder icon (secondary.main)
112
+ color: theme.palette.secondary.contrastText,
110
113
  }),
111
114
  itemSizeTile: {
112
115
  width: '100%',
@@ -564,6 +567,15 @@ export class FileBrowserClass extends Component {
564
567
  this.mounted = false;
565
568
  this.browseList = null;
566
569
  this.browseListRunning = false;
570
+ // the timers must not fire after the component was destroyed
571
+ if (this.setOpacityTimer) {
572
+ clearTimeout(this.setOpacityTimer);
573
+ this.setOpacityTimer = null;
574
+ }
575
+ if (this.cacheFoldersTimeout) {
576
+ clearTimeout(this.cacheFoldersTimeout);
577
+ this.cacheFoldersTimeout = null;
578
+ }
567
579
  Object.values(this._tempTimeout).forEach(timer => {
568
580
  if (timer) {
569
581
  clearTimeout(timer);
@@ -1769,13 +1781,6 @@ export class FileBrowserClass extends Component {
1769
1781
  React.createElement("div", { style: {
1770
1782
  ...styles.filesDiv,
1771
1783
  ...styles[this.state.viewType === 'Tile' ? 'filesDivTile' : 'filesDivTable'],
1772
- height: this.props.showToolbar
1773
- ? this.state.viewType === 'Tile'
1774
- ? `calc(100% - ${48 + 8}px)`
1775
- : 'calc(100% - 56px)'
1776
- : this.state.viewType === 'Tile'
1777
- ? `calc(100% - ${48 * 2 + 8}px)`
1778
- : 'calc(100% - 8px)',
1779
1784
  }, onClick: e => {
1780
1785
  if (this.state.viewType !== TABLE) {
1781
1786
  if (this.state.selected !== (this.state.currentDir || '/')) {