diff --git a/package.json b/package.json index 6355584b9..c21bafaf8 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "passport": "^0.7.0", "passport-local": "^1.0.0", "semver": "^7.5.4", - "ws": "^8.15.0" + "ws": "^8.15.1" }, "devDependencies": { "@alcalzone/release-script": "^3.7.0", @@ -67,7 +67,7 @@ "gulp-sourcemaps": "^3.0.0", "mocha": "^10.2.0", "prettier": "^3.1.1", - "puppeteer": "^21.6.0", + "puppeteer": "^21.6.1", "typescript": "^5.3.3" }, "bugs": { diff --git a/src/package.json b/src/package.json index e0f7961ac..5bf3725bb 100644 --- a/src/package.json +++ b/src/package.json @@ -12,18 +12,19 @@ "@fnando/sparkline": "^0.3.10", "@honkhonk/vite-plugin-svgr": "^1.1.0", "@iobroker/adapter-react-v5": "^4.7.15", + "@iobroker/dm-gui-components": "^0.0.6", "@iobroker/admin-component-easy-access": "^0.3.2", "@iobroker/socket-client": "^2.3.12", - "@mui/icons-material": "^5.14.19", - "@mui/lab": "^5.0.0-alpha.155", - "@mui/material": "^5.14.20", + "@mui/icons-material": "^5.15.0", + "@mui/lab": "^5.0.0-alpha.156", + "@mui/material": "^5.15.0", "@mui/styles": "5.14.14", "@mui/x-data-grid": "^6.18.4", "@mui/x-date-pickers": "^6.18.4", "@originjs/vite-plugin-commonjs": "^1.0.3", "@react-leaflet/core": "^2.1.0", - "@sentry/browser": "^7.86.0", - "@sentry/integrations": "^7.86.0", + "@sentry/browser": "^7.87.0", + "@sentry/integrations": "^7.87.0", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^14.1.2", "@testing-library/user-event": "^14.5.1", @@ -112,4 +113,4 @@ "i": "^0.3.7", "npm": "^10.2.5" } -} \ No newline at end of file +} diff --git a/src/src/components/JsonConfigComponent/ConfigDeviceManager.tsx b/src/src/components/JsonConfigComponent/ConfigDeviceManager.tsx new file mode 100644 index 000000000..0152374b8 --- /dev/null +++ b/src/src/components/JsonConfigComponent/ConfigDeviceManager.tsx @@ -0,0 +1,23 @@ +import React from 'react'; + +import ConfigGeneric, { ConfigGenericProps, ConfigGenericState } from './ConfigGeneric'; +import DeviceManager from "@iobroker/dm-gui-components"; + +class ConfigDeviceManager extends ConfigGeneric { + renderItem(): React.JSX.Element | null { + const schema = this.props.schema; + + if (!schema) { + return null; + } + + return ; + } +} + +export default ConfigDeviceManager; diff --git a/src/src/components/JsonConfigComponent/ConfigGeneric.tsx b/src/src/components/JsonConfigComponent/ConfigGeneric.tsx index 23a8db4b4..91cbe94fe 100644 --- a/src/src/components/JsonConfigComponent/ConfigGeneric.tsx +++ b/src/src/components/JsonConfigComponent/ConfigGeneric.tsx @@ -936,10 +936,9 @@ export default class ConfigGeneric - + {this.renderItems(items, disabled)} ; diff --git a/src/src/components/JsonConfigComponent/SCHEMA.md b/src/src/components/JsonConfigComponent/SCHEMA.md index 83a5cfcf0..bfe54e57f 100644 --- a/src/src/components/JsonConfigComponent/SCHEMA.md +++ b/src/src/components/JsonConfigComponent/SCHEMA.md @@ -447,7 +447,7 @@ All types could have: - `buttonTooltipNoTranslation` - Do not translate button tooltip - `placeholder` - placeholder (for text control) - `noTranslation` - do not translate selects or other options (not for help, label or placeholder) -- `onChange` - Structure in form `{"alsoDependsOn": ["attr1", "attr2], "calculateFunc": "attr1 + attr2", "ignoreOwnChanges": true}` +- `onChange` - Structure in form `{"alsoDependsOn": ["attr1", "attr2"], "calculateFunc": "data.attr1 + data.attr2", "ignoreOwnChanges": true}` - `doNotSave` - Do not save this attribute as used only for internal calculations - `noMultiEdit` - if this flag set to true, this field will not be shown if user selected more than one object for edit. - `confirm` diff --git a/src/src/components/JsonConfigComponent/index.jsx b/src/src/components/JsonConfigComponent/index.jsx index 4b484b979..c77a7851a 100644 --- a/src/src/components/JsonConfigComponent/index.jsx +++ b/src/src/components/JsonConfigComponent/index.jsx @@ -312,7 +312,7 @@ class JsonConfigComponent extends Component { if (item.type === 'panel' || !item.type) { return ; } - return
+ return
{this.renderItem(this.state.schema)}
; } @@ -402,6 +402,7 @@ JsonConfigComponent.propTypes = { onError: PropTypes.func, onChange: PropTypes.func, onValueChange: PropTypes.func, + embedded: PropTypes.bool, // Config is embedded in other component, like dialog or what else }; export default withStyles(styles)(JsonConfigComponent);