diff --git a/package-lock.json b/package-lock.json index 91ca1ff7..47e20097 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,7 +78,7 @@ "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-prettier": "5.5.4", "eslint-plugin-react": "7.37.5", - "eslint-plugin-react-hooks": "5.2.0", + "eslint-plugin-react-hooks": "7.0.1", "fastify-tsconfig": "3.0.0", "globals": "16.5.0", "jsdom": "27.1.0", @@ -10129,13 +10129,20 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz", + "integrity": "sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" + }, "engines": { - "node": ">=10" + "node": ">=18" }, "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" @@ -11764,6 +11771,23 @@ "node": ">=18.0.0" } }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -18593,10 +18617,24 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + }, "node_modules/zustand": { "version": "4.5.7", "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", diff --git a/package.json b/package.json index dc2f19df..a406d7d2 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-prettier": "5.5.4", "eslint-plugin-react": "7.37.5", - "eslint-plugin-react-hooks": "5.2.0", + "eslint-plugin-react-hooks": "7.0.1", "fastify-tsconfig": "3.0.0", "globals": "16.5.0", "jsdom": "27.1.0", diff --git a/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx b/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx index 42b0371b..bc9a1224 100644 --- a/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx +++ b/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx @@ -1,6 +1,6 @@ import { Button, Menu, MenuItem } from '@ui5/webcomponents-react'; -import { Dispatch, FC, SetStateAction, useRef, useState } from 'react'; +import { Dispatch, FC, SetStateAction, useId, useState } from 'react'; import '@ui5/webcomponents-icons/dist/copy'; import '@ui5/webcomponents-icons/dist/accept'; @@ -17,7 +17,7 @@ export const ControlPlaneCardMenu: FC = ({ isDeleteMcpButtonDisabled, setIsEditManagedControlPlaneWizardOpen, }) => { - const buttonRef = useRef(null); + const openerId = useId(); const [menuIsOpen, setMenuIsOpen] = useState(false); const { t } = useTranslation(); @@ -28,7 +28,7 @@ export const ControlPlaneCardMenu: FC = ({ return ( <>