From e53c18180633400bb43b3f16a79af7aa4f944adf Mon Sep 17 00:00:00 2001 From: Bluefox Date: Tue, 31 Dec 2024 12:14:53 +0000 Subject: [PATCH] Updated packages (#270) * Updated packages * Show warning if more than 15 devices will be added to bridge at the beginning: https://github.com/ioBroker/ioBroker.matter/issues/197 * Show message about 15 minutes for announcement: https://github.com/ioBroker/ioBroker.matter/issues/206 --------- Co-authored-by: Ingo Fischer --- package-lock.json | 16 +-- package.json | 2 +- src-admin/package-lock.json | 32 +++--- src-admin/package.json | 6 +- src-admin/src/Tabs/Bridges.tsx | 12 +- src-admin/src/Tabs/BridgesAndDevices.tsx | 3 + src-admin/src/Tabs/Devices.tsx | 5 +- src-admin/src/components/DeviceDialog.tsx | 26 ++++- src-admin/src/i18n/de.json | 3 +- src-admin/src/i18n/en.json | 1 + src-admin/src/i18n/es.json | 1 + src-admin/src/i18n/fr.json | 1 + src-admin/src/i18n/it.json | 1 + src-admin/src/i18n/nl.json | 1 + src-admin/src/i18n/pl.json | 1 + src-admin/src/i18n/pt.json | 1 + src-admin/src/i18n/ru.json | 1 + src-admin/src/i18n/uk.json | 1 + src-admin/src/i18n/zh-cn.json | 1 + .../{serviceWorker.js => serviceWorker.tsx} | 104 ++++++++++-------- 20 files changed, 130 insertions(+), 89 deletions(-) rename src-admin/src/{serviceWorker.js => serviceWorker.tsx} (76%) diff --git a/package-lock.json b/package-lock.json index 2271c6a0..71ac4fb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "chai": "^4.5.0", "colorette": "^2.0.20", "mocha": "^11.0.1", - "puppeteer": "^23.11.0", + "puppeteer": "^23.11.1", "typescript": "~5.7.2" }, "engines": { @@ -9550,9 +9550,9 @@ } }, "node_modules/puppeteer": { - "version": "23.11.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.11.0.tgz", - "integrity": "sha512-UaHfTIcg02bTahmZjrjrpU8efyjNeItrNvANu+DdnYMEcQ24X8LOkBWv2Z4bqDzkOzFymqJkADS0bdSDMUNi1A==", + "version": "23.11.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.11.1.tgz", + "integrity": "sha512-53uIX3KR5en8l7Vd8n5DUv90Ae9QDQsyIthaUFVzwV6yU750RjqRznEtNMBT20VthqAdemnJN+hxVdmMHKt7Zw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -9561,7 +9561,7 @@ "chromium-bidi": "0.11.0", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1367902", - "puppeteer-core": "23.11.0", + "puppeteer-core": "23.11.1", "typed-query-selector": "^2.12.0" }, "bin": { @@ -9572,9 +9572,9 @@ } }, "node_modules/puppeteer-core": { - "version": "23.11.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.11.0.tgz", - "integrity": "sha512-fr5Xp8KeZGRiLrYmosAxPAObi1vmb09vmwak9lqS7KvKMbcN+mk+bDpnDKXPd7QN9b7b/mb9Fgp0A6+024XbVA==", + "version": "23.11.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.11.1.tgz", + "integrity": "sha512-3HZ2/7hdDKZvZQ7dhhITOUg4/wOrDRjyK2ZBllRB0ZCOi9u0cwq1ACHDjBB+nX+7+kltHjQvBRdeY7+W0T+7Gg==", "dev": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 5257bf83..1a9f3790 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "chai": "^4.5.0", "colorette": "^2.0.20", "mocha": "^11.0.1", - "puppeteer": "^23.11.0", + "puppeteer": "^23.11.1", "typescript": "~5.7.2" }, "bugs": { diff --git a/src-admin/package-lock.json b/src-admin/package-lock.json index ea2cfe8d..506a478d 100644 --- a/src-admin/package-lock.json +++ b/src-admin/package-lock.json @@ -1,16 +1,16 @@ { "name": "iobroker.matter", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.matter", - "version": "0.3.2", + "version": "0.3.3", "dependencies": { "@foxriver76/iob-component-lib": "^0.2.0", - "@iobroker/adapter-react-v5": "^7.4.8", - "@iobroker/dm-gui-components": "~7.4.8", + "@iobroker/adapter-react-v5": "^7.4.10", + "@iobroker/dm-gui-components": "~7.4.10", "@iobroker/type-detector": "^4.1.1", "@types/react-dom": "^18.3.5", "@types/uuid": "^10.0.0", @@ -988,9 +988,9 @@ } }, "node_modules/@iobroker/adapter-react-v5": { - "version": "7.4.8", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-7.4.8.tgz", - "integrity": "sha512-FDB5Lnu3toMiOYAEslMm8AOrppsgjUrM1UGTV6GWmvkB1+5OefIHaypj4bD88CJPAMNbyLLOVfBwnsM/GvfHtA==", + "version": "7.4.10", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-7.4.10.tgz", + "integrity": "sha512-HPoszLsnZDzrmvPkqG8yoGwIwDLL7RDU9g10EeDSSHpnhxWP3qNTKXFxFfjOoif8ZsebQ+dCiegdN0Gsf6Cq9w==", "license": "MIT", "dependencies": { "@emotion/react": "^11.13.5", @@ -1119,13 +1119,13 @@ } }, "node_modules/@iobroker/dm-gui-components": { - "version": "7.4.8", - "resolved": "https://registry.npmjs.org/@iobroker/dm-gui-components/-/dm-gui-components-7.4.8.tgz", - "integrity": "sha512-Kg777EARl+8VyM2FMuqTVw/Zi4KADk9DN6MIx4NGAVWgopKePe96nR7MzU1KIfN5KRf8+dryqskxvnLt+0ipzg==", + "version": "7.4.10", + "resolved": "https://registry.npmjs.org/@iobroker/dm-gui-components/-/dm-gui-components-7.4.10.tgz", + "integrity": "sha512-uBu/czepLH/vaLLXZPwy3wyHIHXnFEHy0ytWNDw6OErktEk28YdTtFYjVvyRIBzoQvN77KfLY0UlK/WJmeGbww==", "license": "MIT", "dependencies": { - "@iobroker/adapter-react-v5": "7.4.8", - "@iobroker/json-config": "7.4.8" + "@iobroker/adapter-react-v5": "7.4.10", + "@iobroker/json-config": "7.4.10" } }, "node_modules/@iobroker/js-controller-common": { @@ -1185,11 +1185,11 @@ } }, "node_modules/@iobroker/json-config": { - "version": "7.4.8", - "resolved": "https://registry.npmjs.org/@iobroker/json-config/-/json-config-7.4.8.tgz", - "integrity": "sha512-1uRvHr6qiA3ngbKrJFlfCF+wFMDGkBpnYzecwjhghFvpfKSTA/1gRW1qKgIfy4Oi4r9ZGe7YM20oXFlQG08haA==", + "version": "7.4.10", + "resolved": "https://registry.npmjs.org/@iobroker/json-config/-/json-config-7.4.10.tgz", + "integrity": "sha512-CJe6T/51LRehJJJTVlGxxTuU3Cr2NUCGu1vDeyjVgkCQZhv3kg3wXOQV5+C5E89E6liBriArTquoclEEh4GfJA==", "dependencies": { - "@iobroker/adapter-react-v5": "7.4.8", + "@iobroker/adapter-react-v5": "7.4.10", "@mui/x-date-pickers": "^7.23.0", "crypto-js": "^4.2.0", "react-ace": "^13.0.0", diff --git a/src-admin/package.json b/src-admin/package.json index 49a364b1..68a6e50c 100644 --- a/src-admin/package.json +++ b/src-admin/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "@foxriver76/iob-component-lib": "^0.2.0", - "@iobroker/adapter-react-v5": "^7.4.8", - "@iobroker/dm-gui-components": "~7.4.8", + "@iobroker/adapter-react-v5": "^7.4.10", + "@iobroker/dm-gui-components": "~7.4.10", "@iobroker/type-detector": "^4.1.1", "@types/react-dom": "^18.3.5", "@types/uuid": "^10.0.0", @@ -51,4 +51,4 @@ } ] ] -} \ No newline at end of file +} diff --git a/src-admin/src/Tabs/Bridges.tsx b/src-admin/src/Tabs/Bridges.tsx index d78b76fa..f3661e6e 100644 --- a/src-admin/src/Tabs/Bridges.tsx +++ b/src-admin/src/Tabs/Bridges.tsx @@ -912,7 +912,7 @@ export class Bridges extends BridgesAndDevices { addDeviceDialog: null, addCustomDeviceDialog: { oid, - name, + name: name || '', deviceType: '', bridgeIndex: this.bridgeIndex as number, noComposed: false, @@ -930,7 +930,7 @@ export class Bridges extends BridgesAndDevices { addDeviceDialog: null, addCustomDeviceDialog: { oid, - name, + name: name || '', deviceType, bridgeIndex: this.bridgeIndex as number, hasOnState: controls[0].devices[0].hasOnState, @@ -945,6 +945,8 @@ export class Bridges extends BridgesAndDevices { ); } + const nodeState = this.props.nodeStates[this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].uuid]; + return ( this.setState({ addDeviceDialog: null })} @@ -954,11 +956,9 @@ export class Bridges extends BridgesAndDevices { } devicesInBridge={this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].list.length} checkAddedDevices={ - this.props.nodeStates[this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].uuid] - ?.status !== 'waitingForCommissioning' - ? 0 - : MAX_UN_COMMISSIONED_DEVICES + nodeState && nodeState?.status !== 'waitingForCommissioning' ? 0 : MAX_UN_COMMISSIONED_DEVICES } + themeType={this.props.themeType} matter={this.props.matter} socket={this.props.socket} detectedDevices={this.props.detectedDevices} diff --git a/src-admin/src/Tabs/BridgesAndDevices.tsx b/src-admin/src/Tabs/BridgesAndDevices.tsx index 80cd0fde..cae57623 100644 --- a/src-admin/src/Tabs/BridgesAndDevices.tsx +++ b/src-admin/src/Tabs/BridgesAndDevices.tsx @@ -677,6 +677,9 @@ class BridgesAndDevices +
+ {I18n.t('Announcement will stop automatically after 15 minutes')} +