From 9c645a1efa987e20d97210d074c3d48a91d60d27 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 31 Dec 2024 20:05:48 +0800 Subject: [PATCH] chore: remove unused code --- ui/dist/.gitkeep | 1 - ui/package-lock.json | 877 +----------------- ui/package.json | 9 - ui/src/components/access/AccessEditForm.tsx | 4 +- .../AccessEditFormACMEHttpReqConfig.tsx | 8 +- .../access/AccessEditFormAWSConfig.tsx | 14 +- .../access/AccessEditFormAliyunConfig.tsx | 8 +- .../access/AccessEditFormBaiduCloudConfig.tsx | 4 +- .../access/AccessEditFormBytePlusConfig.tsx | 4 +- .../access/AccessEditFormCloudflareConfig.tsx | 4 +- .../access/AccessEditFormDogeCloudConfig.tsx | 8 +- .../access/AccessEditFormGoDaddyConfig.tsx | 8 +- .../AccessEditFormHuaweiCloudConfig.tsx | 11 +- .../access/AccessEditFormKubernetesConfig.tsx | 1 - .../access/AccessEditFormNameDotComConfig.tsx | 8 +- .../access/AccessEditFormNameSiloConfig.tsx | 4 +- .../access/AccessEditFormPowerDNSConfig.tsx | 4 +- .../access/AccessEditFormQiniuConfig.tsx | 8 +- .../access/AccessEditFormSSHConfig.tsx | 12 +- .../AccessEditFormTencentCloudConfig.tsx | 8 +- .../access/AccessEditFormVolcEngineConfig.tsx | 4 +- .../access/AccessEditFormWebhookConfig.tsx | 5 +- ui/src/components/access/AccessSelect.tsx | 3 +- ui/src/components/access/AccessTypeSelect.tsx | 3 +- ui/src/components/certimate/KVList.tsx | 243 ----- .../NotifyChannelEditFormBarkFields.tsx | 2 +- .../NotifyChannelEditFormEmailFields.tsx | 16 +- .../NotifyChannelEditFormLarkFields.tsx | 5 +- .../NotifyChannelEditFormServerChanFields.tsx | 5 +- .../NotifyChannelEditFormWebhookFields.tsx | 5 +- .../notification/NotifyTemplate.tsx | 8 +- ui/src/components/ui/button.tsx | 71 -- ui/src/components/ui/dialog.tsx | 75 -- ui/src/components/ui/dropdown-menu.tsx | 173 ---- ui/src/components/ui/form.tsx | 117 --- ui/src/components/ui/input.tsx | 22 - ui/src/components/ui/label.tsx | 15 - ui/src/components/ui/select.tsx | 122 --- ui/src/components/ui/textarea.tsx | 21 - ui/src/components/ui/utils.ts | 6 - ui/src/components/workflow/AccessSelect.tsx | 59 -- ui/src/components/workflow/AddNode.tsx | 3 - ui/src/components/workflow/BranchNode.tsx | 21 +- ui/src/components/workflow/DeployForm.tsx | 87 -- .../components/workflow/DeployToAliyunALB.tsx | 257 ----- .../components/workflow/DeployToAliyunCDN.tsx | 177 ---- .../components/workflow/DeployToAliyunCLB.tsx | 257 ----- .../components/workflow/DeployToAliyunNLB.tsx | 219 ----- .../components/workflow/DeployToAliyunOss.tsx | 214 ----- .../workflow/DeployToBaiduCloudCDN.tsx | 176 ---- .../workflow/DeployToByteplusCDN.tsx | 176 ---- .../workflow/DeployToDogeCloudCDN.tsx | 177 ---- .../workflow/DeployToHuaweiCloudCDN.tsx | 198 ---- .../workflow/DeployToHuaweiCloudELB.tsx | 289 ------ .../workflow/DeployToKubernetesSecret.tsx | 233 ----- ui/src/components/workflow/DeployToLocal.tsx | 476 ---------- .../components/workflow/DeployToQiniuCDN.tsx | 178 ---- ui/src/components/workflow/DeployToSSH.tsx | 345 ------- .../workflow/DeployToTencentCDN.tsx | 176 ---- .../workflow/DeployToTencentCLB.tsx | 316 ------- .../workflow/DeployToTencentCOS.tsx | 212 ----- .../workflow/DeployToTencentTEO.tsx | 194 ---- .../workflow/DeployToVolcengineCDN.tsx | 176 ---- .../workflow/DeployToVolcengineLive.tsx | 176 ---- .../components/workflow/DeployToWebhook.tsx | 179 ---- .../node/DeployNodeFormLocalFields.tsx | 2 +- .../workflow/node/DeployNodeFormSSHFields.tsx | 2 +- .../workflow/run/WorkflowRunDetailDrawer.tsx | 1 - ui/src/domain/access.ts | 37 - ui/src/domain/domain.ts | 58 -- ui/src/pages/settings/SettingsPassword.tsx | 26 +- ui/src/pages/workflows/WorkflowDetail.tsx | 7 +- 72 files changed, 98 insertions(+), 6932 deletions(-) delete mode 100644 ui/dist/.gitkeep delete mode 100644 ui/src/components/certimate/KVList.tsx delete mode 100644 ui/src/components/ui/button.tsx delete mode 100644 ui/src/components/ui/dialog.tsx delete mode 100644 ui/src/components/ui/dropdown-menu.tsx delete mode 100644 ui/src/components/ui/form.tsx delete mode 100644 ui/src/components/ui/input.tsx delete mode 100644 ui/src/components/ui/label.tsx delete mode 100644 ui/src/components/ui/select.tsx delete mode 100644 ui/src/components/ui/textarea.tsx delete mode 100644 ui/src/components/ui/utils.ts delete mode 100644 ui/src/components/workflow/AccessSelect.tsx delete mode 100644 ui/src/components/workflow/DeployForm.tsx delete mode 100644 ui/src/components/workflow/DeployToAliyunALB.tsx delete mode 100644 ui/src/components/workflow/DeployToAliyunCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToAliyunCLB.tsx delete mode 100644 ui/src/components/workflow/DeployToAliyunNLB.tsx delete mode 100644 ui/src/components/workflow/DeployToAliyunOss.tsx delete mode 100644 ui/src/components/workflow/DeployToBaiduCloudCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToByteplusCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToDogeCloudCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToHuaweiCloudELB.tsx delete mode 100644 ui/src/components/workflow/DeployToKubernetesSecret.tsx delete mode 100644 ui/src/components/workflow/DeployToLocal.tsx delete mode 100644 ui/src/components/workflow/DeployToQiniuCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToSSH.tsx delete mode 100644 ui/src/components/workflow/DeployToTencentCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToTencentCLB.tsx delete mode 100644 ui/src/components/workflow/DeployToTencentCOS.tsx delete mode 100644 ui/src/components/workflow/DeployToTencentTEO.tsx delete mode 100644 ui/src/components/workflow/DeployToVolcengineCDN.tsx delete mode 100644 ui/src/components/workflow/DeployToVolcengineLive.tsx delete mode 100644 ui/src/components/workflow/DeployToWebhook.tsx diff --git a/ui/dist/.gitkeep b/ui/dist/.gitkeep deleted file mode 100644 index 5f282702..00000000 --- a/ui/dist/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index 2f15fe68..338df822 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -10,16 +10,9 @@ "dependencies": { "@ant-design/icons": "^5.5.2", "@ant-design/pro-components": "^2.8.2", - "@hookform/resolvers": "^3.9.0", - "@radix-ui/react-dialog": "^1.1.2", - "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-select": "^2.1.1", - "@radix-ui/react-slot": "^1.1.0", "ahooks": "^3.8.4", "antd": "^5.22.5", "antd-zod": "^6.0.0", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.1", "cron-parser": "^4.9.0", "i18next": "^24.2.0", "i18next-browser-languagedetector": "^8.0.2", @@ -32,10 +25,8 @@ "react": "^18.3.1", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", - "react-hook-form": "^7.52.1", "react-i18next": "^15.2.0", "react-router-dom": "^7.1.0", - "tailwind-merge": "^2.5.5", "zod": "^3.24.1", "zustand": "^5.0.2" }, @@ -2511,48 +2502,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@floating-ui/core": { - "version": "1.6.5", - "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.5.tgz", - "integrity": "sha512-8GrTWmoFhm5BsMZOTHeGD2/0FLKLQQHvO/ZmQga4tKempYRLz8aqJGqXVuQgisnMObq2YZ2SgkwctN1LOOxcqA==", - "dependencies": { - "@floating-ui/utils": "^0.2.5" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.6.8", - "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.8.tgz", - "integrity": "sha512-kx62rP19VZ767Q653wsP1XZCGIirkE09E0QUGNYTM/ttbbQHqcGPdSfWFxUyyNLc/W6aoJRBajOSXhP6GXjC0Q==", - "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.5" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", - "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", - "dependencies": { - "@floating-ui/dom": "^1.0.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.5.tgz", - "integrity": "sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ==" - }, - "node_modules/@hookform/resolvers": { - "version": "3.9.0", - "resolved": "https://registry.npmmirror.com/@hookform/resolvers/-/resolvers-3.9.0.tgz", - "integrity": "sha512-bU0Gr4EepJ/EQsH/IwEzYLsT/PEj5C0ynLQ4m+GSHS+xKH4TfSelhluTgOaoc4kA5s7eCsQbM4wvZLzELmWzUg==", - "peerDependencies": { - "react-hook-form": "^7.0.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -2766,639 +2715,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@radix-ui/number": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/number/-/number-1.1.0.tgz", - "integrity": "sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==" - }, - "node_modules/@radix-ui/primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/primitive/-/primitive-1.1.0.tgz", - "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" - }, - "node_modules/@radix-ui/react-arrow": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", - "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==", - "dependencies": { - "@radix-ui/react-primitive": "2.0.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-collection": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", - "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", - "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-context": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-context/-/react-context-1.1.0.tgz", - "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-dialog/-/react-dialog-1.1.2.tgz", - "integrity": "sha512-Yj4dZtqa2o+kG61fzB0H2qUvmwBA2oyQroGLyNtBj1beo1khoQ3q1a2AO8rrQYjd8256CO9+N8L9tvsS+bnIyA==", - "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.1", - "@radix-ui/react-focus-guards": "1.1.1", - "@radix-ui/react-focus-scope": "1.1.0", - "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", - "@radix-ui/react-use-controllable-state": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.6.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-context/-/react-context-1.1.1.tgz", - "integrity": "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.1.tgz", - "integrity": "sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ==", - "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-callback-ref": "1.1.0", - "@radix-ui/react-use-escape-keydown": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz", - "integrity": "sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-portal/-/react-portal-1.1.2.tgz", - "integrity": "sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg==", - "dependencies": { - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-presence/-/react-presence-1.1.1.tgz", - "integrity": "sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/react-remove-scroll/-/react-remove-scroll-2.6.0.tgz", - "integrity": "sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ==", - "dependencies": { - "react-remove-scroll-bar": "^2.3.6", - "react-style-singleton": "^2.2.1", - "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-direction": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", - "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", - "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", - "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-callback-ref": "1.1.0", - "@radix-ui/react-use-escape-keydown": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-focus-guards": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", - "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-focus-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", - "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-callback-ref": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-id": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-id/-/react-id-1.1.0.tgz", - "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-label": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-label/-/react-label-2.1.0.tgz", - "integrity": "sha512-peLblDlFw/ngk3UWq0VnYaOLy6agTZZ+MUO/WhVfm14vJGML+xH4FAl2XQGLqdefjNb7ApRg6Yn7U42ZhmYXdw==", - "dependencies": { - "@radix-ui/react-primitive": "2.0.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-popper": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", - "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==", - "dependencies": { - "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-callback-ref": "1.1.0", - "@radix-ui/react-use-layout-effect": "1.1.0", - "@radix-ui/react-use-rect": "1.1.0", - "@radix-ui/react-use-size": "1.1.0", - "@radix-ui/rect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-portal": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", - "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", - "dependencies": { - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", - "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", - "dependencies": { - "@radix-ui/react-slot": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-select": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-select/-/react-select-2.1.1.tgz", - "integrity": "sha512-8iRDfyLtzxlprOo9IicnzvpsO1wNCkuwzzCM+Z5Rb5tNOpCdMvcc2AkzX0Fz+Tz9v6NJ5B/7EEgyZveo4FBRfQ==", - "dependencies": { - "@radix-ui/number": "1.1.0", - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", - "@radix-ui/react-direction": "1.1.0", - "@radix-ui/react-dismissable-layer": "1.1.0", - "@radix-ui/react-focus-guards": "1.1.0", - "@radix-ui/react-focus-scope": "1.1.0", - "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-popper": "1.2.0", - "@radix-ui/react-portal": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", - "@radix-ui/react-use-callback-ref": "1.1.0", - "@radix-ui/react-use-controllable-state": "1.1.0", - "@radix-ui/react-use-layout-effect": "1.1.0", - "@radix-ui/react-use-previous": "1.1.0", - "@radix-ui/react-visually-hidden": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.7" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", - "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", - "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", - "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", - "dependencies": { - "@radix-ui/react-use-callback-ref": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-escape-keydown": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", - "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", - "dependencies": { - "@radix-ui/react-use-callback-ref": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", - "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-previous": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", - "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-rect": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", - "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", - "dependencies": { - "@radix-ui/rect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz", - "integrity": "sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==", - "dependencies": { - "@radix-ui/react-primitive": "2.0.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/rect": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@radix-ui/rect/-/rect-1.1.0.tgz", - "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==" - }, "node_modules/@rc-component/async-validator": { "version": "5.0.4", "resolved": "https://registry.npmmirror.com/@rc-component/async-validator/-/async-validator-5.0.4.tgz", @@ -3895,7 +3211,7 @@ "version": "18.3.5", "resolved": "https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.3.5.tgz", "integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==", - "devOptional": true, + "dev": true, "peerDependencies": { "@types/react": "^18.0.0" } @@ -4331,17 +3647,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/aria-hidden": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/aria-hidden/-/aria-hidden-1.2.4.tgz", - "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/autoprefixer": { "version": "10.4.20", "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.20.tgz", @@ -4597,25 +3902,6 @@ "node": ">= 6" } }, - "node_modules/class-variance-authority": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/class-variance-authority/-/class-variance-authority-0.7.0.tgz", - "integrity": "sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==", - "dependencies": { - "clsx": "2.0.0" - }, - "funding": { - "url": "https://joebell.co.uk" - } - }, - "node_modules/class-variance-authority/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz", @@ -4626,14 +3912,6 @@ "resolved": "https://registry.npmmirror.com/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "engines": { - "node": ">=6" - } - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz", @@ -4775,11 +4053,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/detect-node-es": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" - }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz", @@ -5396,14 +4669,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-nonce": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/get-nonce/-/get-nonce-1.0.1.tgz", - "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", @@ -5607,14 +4872,6 @@ "resolved": "https://registry.npmmirror.com/intersection-observer/-/intersection-observer-0.12.2.tgz", "integrity": "sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==" }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmmirror.com/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -7144,21 +6401,6 @@ "resolved": "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz", "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" }, - "node_modules/react-hook-form": { - "version": "7.52.1", - "resolved": "https://registry.npmmirror.com/react-hook-form/-/react-hook-form-7.52.1.tgz", - "integrity": "sha512-uNKIhaoICJ5KQALYZ4TOaOLElyM+xipord+Ha3crEFhTntdLvWZqVY49Wqd/0GiVCA/f9NjemLeiNPjG7Hpurg==", - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/react-hook-form" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17 || ^18 || ^19" - } - }, "node_modules/react-i18next": { "version": "15.2.0", "resolved": "https://registry.npmmirror.com/react-i18next/-/react-i18next-15.2.0.tgz", @@ -7199,51 +6441,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-remove-scroll": { - "version": "2.5.7", - "resolved": "https://registry.npmmirror.com/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", - "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", - "dependencies": { - "react-remove-scroll-bar": "^2.3.4", - "react-style-singleton": "^2.2.1", - "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-remove-scroll-bar": { - "version": "2.3.6", - "resolved": "https://registry.npmmirror.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz", - "integrity": "sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==", - "dependencies": { - "react-style-singleton": "^2.2.1", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/react-router": { "version": "7.1.0", "resolved": "https://registry.npmmirror.com/react-router/-/react-router-7.1.0.tgz", @@ -7282,28 +6479,6 @@ "react-dom": ">=18" } }, - "node_modules/react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", - "dependencies": { - "get-nonce": "^1.0.0", - "invariant": "^2.2.4", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/reactcss": { "version": "1.2.3", "resolved": "https://registry.npmmirror.com/reactcss/-/reactcss-1.2.3.tgz", @@ -7882,15 +7057,6 @@ "integrity": "sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==", "dev": true }, - "node_modules/tailwind-merge": { - "version": "2.5.5", - "resolved": "https://registry.npmmirror.com/tailwind-merge/-/tailwind-merge-2.5.5.tgz", - "integrity": "sha512-0LXunzzAZzo0tEPxV3I297ffKZPlKDrjj7NXphC8V5ak9yHC5zRmxnOe2m/Rd/7ivsOMJe3JZ2JVocoDdQTRBA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/dcastil" - } - }, "node_modules/tailwindcss": { "version": "3.4.17", "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.17.tgz", @@ -8179,47 +7345,6 @@ "punycode": "^2.1.0" } }, - "node_modules/use-callback-ref": { - "version": "1.3.2", - "resolved": "https://registry.npmmirror.com/use-callback-ref/-/use-callback-ref-1.3.2.tgz", - "integrity": "sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", - "dependencies": { - "detect-node-es": "^1.1.0", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/use-sync-external-store": { "version": "1.2.2", "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", diff --git a/ui/package.json b/ui/package.json index da1eaa01..9646b60e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -12,16 +12,9 @@ "dependencies": { "@ant-design/icons": "^5.5.2", "@ant-design/pro-components": "^2.8.2", - "@hookform/resolvers": "^3.9.0", - "@radix-ui/react-dialog": "^1.1.2", - "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-select": "^2.1.1", - "@radix-ui/react-slot": "^1.1.0", "ahooks": "^3.8.4", "antd": "^5.22.5", "antd-zod": "^6.0.0", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.1", "cron-parser": "^4.9.0", "i18next": "^24.2.0", "i18next-browser-languagedetector": "^8.0.2", @@ -34,10 +27,8 @@ "react": "^18.3.1", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", - "react-hook-form": "^7.52.1", "react-i18next": "^15.2.0", "react-router-dom": "^7.1.0", - "tailwind-merge": "^2.5.5", "zod": "^3.24.1", "zustand": "^5.0.2" }, diff --git a/ui/src/components/access/AccessEditForm.tsx b/ui/src/components/access/AccessEditForm.tsx index cc629e28..6201b346 100644 --- a/ui/src/components/access/AccessEditForm.tsx +++ b/ui/src/components/access/AccessEditForm.tsx @@ -52,9 +52,9 @@ const AccessEditForm = forwardRef(( const formSchema = z.object({ name: z .string({ message: t("access.form.name.placeholder") }) - .trim() .min(1, t("access.form.name.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), configType: z.nativeEnum(ACCESS_PROVIDERS, { message: t("access.form.type.placeholder") }), config: z.any(), }); diff --git a/ui/src/components/access/AccessEditFormACMEHttpReqConfig.tsx b/ui/src/components/access/AccessEditFormACMEHttpReqConfig.tsx index 60aecc36..d8571407 100644 --- a/ui/src/components/access/AccessEditFormACMEHttpReqConfig.tsx +++ b/ui/src/components/access/AccessEditFormACMEHttpReqConfig.tsx @@ -28,18 +28,16 @@ const AccessEditFormACMEHttpReqConfig = ({ form, formName, disabled, initialValu const formSchema = z.object({ endpoint: z.string().url(t("common.errmsg.url_invalid")), - mode: z.string().min(0, t("access.form.acmehttpreq_mode.placeholder")).nullish(), + mode: z.string().nullish(), username: z .string() - .trim() - .min(0, t("access.form.acmehttpreq_username.placeholder")) .max(256, t("common.errmsg.string_max", { max: 256 })) + .trim() .nullish(), password: z .string() - .trim() - .min(0, t("access.form.acmehttpreq_password.placeholder")) .max(256, t("common.errmsg.string_max", { max: 256 })) + .trim() .nullish(), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/access/AccessEditFormAWSConfig.tsx b/ui/src/components/access/AccessEditFormAWSConfig.tsx index 67bac4a9..20746358 100644 --- a/ui/src/components/access/AccessEditFormAWSConfig.tsx +++ b/ui/src/components/access/AccessEditFormAWSConfig.tsx @@ -31,27 +31,25 @@ const AccessEditFormAWSConfig = ({ form, formName, disabled, initialValues, onVa const formSchema = z.object({ accessKeyId: z .string() - .trim() .min(1, t("access.form.aws_access_key_id.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), secretAccessKey: z .string() - .trim() .min(1, t("access.form.aws_secret_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), // TODO: 该字段仅用于申请证书,后续迁移到工作流表单中 region: z .string() - .trim() - .min(0, t("access.form.aws_region.placeholder")) .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim() .nullish(), // TODO: 该字段仅用于申请证书,后续迁移到工作流表单中 hostedZoneId: z .string() - .trim() - .min(0, t("access.form.aws_hosted_zone_id.placeholder")) .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim() .nullish(), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/access/AccessEditFormAliyunConfig.tsx b/ui/src/components/access/AccessEditFormAliyunConfig.tsx index affac32b..72a51807 100644 --- a/ui/src/components/access/AccessEditFormAliyunConfig.tsx +++ b/ui/src/components/access/AccessEditFormAliyunConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormAliyunConfig = ({ form, formName, disabled, initialValues, o const formSchema = z.object({ accessKeyId: z .string() - .trim() .min(1, t("access.form.aliyun_access_key_id.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), accessKeySecret: z .string() - .trim() .min(1, t("access.form.aliyun_access_key_secret.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormBaiduCloudConfig.tsx b/ui/src/components/access/AccessEditFormBaiduCloudConfig.tsx index 854f5059..d1187d8f 100644 --- a/ui/src/components/access/AccessEditFormBaiduCloudConfig.tsx +++ b/ui/src/components/access/AccessEditFormBaiduCloudConfig.tsx @@ -34,9 +34,9 @@ const AccessEditFormBaiduCloudConfig = ({ form, formName, disabled, initialValue .max(64, t("common.errmsg.string_max", { max: 64 })), secretAccessKey: z .string() - .trim() .min(1, t("access.form.baiducloud_secret_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormBytePlusConfig.tsx b/ui/src/components/access/AccessEditFormBytePlusConfig.tsx index b6dac7d4..ea948e46 100644 --- a/ui/src/components/access/AccessEditFormBytePlusConfig.tsx +++ b/ui/src/components/access/AccessEditFormBytePlusConfig.tsx @@ -34,9 +34,9 @@ const AccessEditFormBytePlusConfig = ({ form, formName, disabled, initialValues, .max(64, t("common.errmsg.string_max", { max: 64 })), secretKey: z .string() - .trim() .min(1, t("access.form.byteplus_secret_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormCloudflareConfig.tsx b/ui/src/components/access/AccessEditFormCloudflareConfig.tsx index 32e55408..29e207d6 100644 --- a/ui/src/components/access/AccessEditFormCloudflareConfig.tsx +++ b/ui/src/components/access/AccessEditFormCloudflareConfig.tsx @@ -28,9 +28,9 @@ const AccessEditFormCloudflareConfig = ({ form, formName, disabled, initialValue const formSchema = z.object({ dnsApiToken: z .string() - .trim() .min(1, t("access.form.cloudflare_dns_api_token.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormDogeCloudConfig.tsx b/ui/src/components/access/AccessEditFormDogeCloudConfig.tsx index 6c9f8dd3..96fe8121 100644 --- a/ui/src/components/access/AccessEditFormDogeCloudConfig.tsx +++ b/ui/src/components/access/AccessEditFormDogeCloudConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormDogeCloudConfig = ({ form, formName, disabled, initialValues const formSchema = z.object({ accessKey: z .string() - .trim() .min(1, t("access.form.dogecloud_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), secretKey: z .string() - .trim() .min(1, t("access.form.dogecloud_secret_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormGoDaddyConfig.tsx b/ui/src/components/access/AccessEditFormGoDaddyConfig.tsx index 1f6561df..74291d97 100644 --- a/ui/src/components/access/AccessEditFormGoDaddyConfig.tsx +++ b/ui/src/components/access/AccessEditFormGoDaddyConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormGoDaddyConfig = ({ form, formName, disabled, initialValues, const formSchema = z.object({ apiKey: z .string() - .trim() .min(1, t("access.form.godaddy_api_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), apiSecret: z .string() - .trim() .min(1, t("access.form.godaddy_api_secret.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormHuaweiCloudConfig.tsx b/ui/src/components/access/AccessEditFormHuaweiCloudConfig.tsx index 2893674a..99ea76ab 100644 --- a/ui/src/components/access/AccessEditFormHuaweiCloudConfig.tsx +++ b/ui/src/components/access/AccessEditFormHuaweiCloudConfig.tsx @@ -30,20 +30,19 @@ const AccessEditFormHuaweiCloudConfig = ({ form, formName, disabled, initialValu const formSchema = z.object({ accessKeyId: z .string() - .trim() .min(1, t("access.form.huaweicloud_access_key_id.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), secretAccessKey: z .string() - .trim() .min(1, t("access.form.huaweicloud_secret_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), // TODO: 该字段仅用于申请证书,后续迁移到工作流表单中 region: z .string() - .trim() - .min(0, t("access.form.huaweicloud_region.placeholder")) .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim() .nullish(), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/access/AccessEditFormKubernetesConfig.tsx b/ui/src/components/access/AccessEditFormKubernetesConfig.tsx index 2dc31d18..41300197 100644 --- a/ui/src/components/access/AccessEditFormKubernetesConfig.tsx +++ b/ui/src/components/access/AccessEditFormKubernetesConfig.tsx @@ -32,7 +32,6 @@ const AccessEditFormKubernetesConfig = ({ form, formName, disabled, initialValue kubeConfig: z .string() .trim() - .min(0, t("access.form.k8s_kubeconfig.placeholder")) .max(20480, t("common.errmsg.string_max", { max: 20480 })) .nullish(), }); diff --git a/ui/src/components/access/AccessEditFormNameDotComConfig.tsx b/ui/src/components/access/AccessEditFormNameDotComConfig.tsx index 7f62ad3b..5593e902 100644 --- a/ui/src/components/access/AccessEditFormNameDotComConfig.tsx +++ b/ui/src/components/access/AccessEditFormNameDotComConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormNameDotComConfig = ({ form, formName, disabled, initialValue const formSchema = z.object({ username: z .string() - .trim() .min(1, t("access.form.namedotcom_username.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), apiToken: z .string() - .trim() .min(1, t("access.form.namedotcom_api_token.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormNameSiloConfig.tsx b/ui/src/components/access/AccessEditFormNameSiloConfig.tsx index bb674d84..44d2450e 100644 --- a/ui/src/components/access/AccessEditFormNameSiloConfig.tsx +++ b/ui/src/components/access/AccessEditFormNameSiloConfig.tsx @@ -28,9 +28,9 @@ const AccessEditFormNameSiloConfig = ({ form, formName, disabled, initialValues, const formSchema = z.object({ apiKey: z .string() - .trim() .min(1, t("access.form.namesilo_api_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormPowerDNSConfig.tsx b/ui/src/components/access/AccessEditFormPowerDNSConfig.tsx index a20b1c48..7d8ddb4c 100644 --- a/ui/src/components/access/AccessEditFormPowerDNSConfig.tsx +++ b/ui/src/components/access/AccessEditFormPowerDNSConfig.tsx @@ -30,9 +30,9 @@ const AccessEditFormPowerDNSConfig = ({ form, formName, disabled, initialValues, apiUrl: z.string().url(t("common.errmsg.url_invalid")), apiKey: z .string() - .trim() .min(1, t("access.form.powerdns_api_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormQiniuConfig.tsx b/ui/src/components/access/AccessEditFormQiniuConfig.tsx index 93aef30a..5ee809d4 100644 --- a/ui/src/components/access/AccessEditFormQiniuConfig.tsx +++ b/ui/src/components/access/AccessEditFormQiniuConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormQiniuConfig = ({ form, formName, disabled, initialValues, on const formSchema = z.object({ accessKey: z .string() - .trim() .min(1, t("access.form.qiniu_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), secretKey: z .string() - .trim() .min(1, t("access.form.qiniu_secret_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormSSHConfig.tsx b/ui/src/components/access/AccessEditFormSSHConfig.tsx index e3fe7226..e71f2aee 100644 --- a/ui/src/components/access/AccessEditFormSSHConfig.tsx +++ b/ui/src/components/access/AccessEditFormSSHConfig.tsx @@ -34,12 +34,7 @@ const AccessEditFormSSHConfig = ({ form, formName, disabled, initialValues, onVa const { t } = useTranslation(); const formSchema = z.object({ - host: z.string().refine( - (str) => { - return validDomainName(str) || validIPv4Address(str) || validIPv6Address(str); - }, - { message: t("common.errmsg.host_invalid") } - ), + host: z.string().refine((v) => validDomainName(v) || validIPv4Address(v) || validIPv6Address(v), t("common.errmsg.host_invalid")), port: z.number().int().gte(1, t("common.errmsg.port_invalid")).lte(65535, t("common.errmsg.port_invalid")), username: z .string() @@ -47,20 +42,17 @@ const AccessEditFormSSHConfig = ({ form, formName, disabled, initialValues, onVa .max(64, t("common.errmsg.string_max", { max: 64 })), password: z .string() - .min(0, "access.form.ssh_password.placeholder") .max(64, t("common.errmsg.string_max", { max: 64 })) .nullish(), key: z .string() - .min(0, "access.form.ssh_key.placeholder") .max(20480, t("common.errmsg.string_max", { max: 20480 })) .nullish(), keyPassphrase: z .string() - .min(0, "access.form.ssh_key_passphrase.placeholder") .max(20480, t("common.errmsg.string_max", { max: 20480 })) .nullish() - .and(z.string().refine((v) => !v || form.getFieldValue("key"), { message: t("access.form.ssh_key.placeholder") })), + .refine((v) => !v || form.getFieldValue("key"), t("access.form.ssh_key.placeholder")), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormTencentCloudConfig.tsx b/ui/src/components/access/AccessEditFormTencentCloudConfig.tsx index 2c035518..7144aea6 100644 --- a/ui/src/components/access/AccessEditFormTencentCloudConfig.tsx +++ b/ui/src/components/access/AccessEditFormTencentCloudConfig.tsx @@ -29,14 +29,14 @@ const AccessEditFormTencentCloudConfig = ({ form, formName, disabled, initialVal const formSchema = z.object({ secretId: z .string() - .trim() .min(1, t("access.form.tencentcloud_secret_id.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), secretKey: z .string() - .trim() .min(1, t("access.form.tencentcloud_secret_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormVolcEngineConfig.tsx b/ui/src/components/access/AccessEditFormVolcEngineConfig.tsx index 1641b65d..24b770e3 100644 --- a/ui/src/components/access/AccessEditFormVolcEngineConfig.tsx +++ b/ui/src/components/access/AccessEditFormVolcEngineConfig.tsx @@ -34,9 +34,9 @@ const AccessEditFormVolcEngineConfig = ({ form, formName, disabled, initialValue .max(64, t("common.errmsg.string_max", { max: 64 })), secretAccessKey: z .string() - .trim() .min(1, t("access.form.volcengine_secret_access_key.placeholder")) - .max(64, t("common.errmsg.string_max", { max: 64 })), + .max(64, t("common.errmsg.string_max", { max: 64 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessEditFormWebhookConfig.tsx b/ui/src/components/access/AccessEditFormWebhookConfig.tsx index a94355c8..79d9c845 100644 --- a/ui/src/components/access/AccessEditFormWebhookConfig.tsx +++ b/ui/src/components/access/AccessEditFormWebhookConfig.tsx @@ -26,10 +26,7 @@ const AccessEditFormWebhookConfig = ({ form, formName, disabled, initialValues, const { t } = useTranslation(); const formSchema = z.object({ - url: z - .string() - .min(1, { message: t("access.form.webhook_url.placeholder") }) - .url({ message: t("common.errmsg.url_invalid") }), + url: z.string({ message: t("access.form.webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm>({ diff --git a/ui/src/components/access/AccessSelect.tsx b/ui/src/components/access/AccessSelect.tsx index 1e7d9f3f..cd072b01 100644 --- a/ui/src/components/access/AccessSelect.tsx +++ b/ui/src/components/access/AccessSelect.tsx @@ -1,7 +1,8 @@ import { useEffect, useState } from "react"; import { Avatar, Select, Space, Typography, type SelectProps } from "antd"; -import { accessProvidersMap, type AccessModel } from "@/domain/access"; +import { type AccessModel } from "@/domain/access"; +import { accessProvidersMap } from "@/domain/provider"; import { useAccessStore } from "@/stores/access"; export type AccessTypeSelectProps = Omit< diff --git a/ui/src/components/access/AccessTypeSelect.tsx b/ui/src/components/access/AccessTypeSelect.tsx index 2a0da53d..9b83cd32 100644 --- a/ui/src/components/access/AccessTypeSelect.tsx +++ b/ui/src/components/access/AccessTypeSelect.tsx @@ -2,7 +2,8 @@ import { memo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, Space, Tag, Typography, type SelectProps } from "antd"; -import { ACCESS_USAGES, accessProvidersMap } from "@/domain/access"; +import { ACCESS_USAGES } from "@/domain/access"; +import { accessProvidersMap } from "@/domain/provider"; export type AccessTypeSelectProps = Omit< SelectProps, diff --git a/ui/src/components/certimate/KVList.tsx b/ui/src/components/certimate/KVList.tsx deleted file mode 100644 index 9c0800f4..00000000 --- a/ui/src/components/certimate/KVList.tsx +++ /dev/null @@ -1,243 +0,0 @@ -import { useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { produce } from "immer"; -import { Edit, Plus, Trash2 } from "lucide-react"; - -import Show from "@/components/Show"; -import { Button } from "@/components/ui/button"; -import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { KVType } from "@/domain/domain"; - -type KVListProps = { - variables?: KVType[]; - onValueChange?: (variables: KVType[]) => void; -}; - -const KVList = ({ variables, onValueChange }: KVListProps) => { - const [locVariables, setLocVariables] = useState([]); - - const { t } = useTranslation(); - - useEffect(() => { - if (variables) { - setLocVariables(variables); - } - }, [variables]); - - const handleAddClick = (variable: KVType) => { - // 查看是否存在key,存在则更新,不存在则添加 - const index = locVariables.findIndex((item) => { - return item.key === variable.key; - }); - - const newList = produce(locVariables, (draft) => { - if (index === -1) { - draft.push(variable); - } else { - draft[index] = variable; - } - }); - - setLocVariables(newList); - - onValueChange?.(newList); - }; - - const handleDeleteClick = (index: number) => { - const newList = [...locVariables]; - newList.splice(index, 1); - setLocVariables(newList); - - onValueChange?.(newList); - }; - - const handleEditClick = (index: number, variable: KVType) => { - const newList = [...locVariables]; - newList[index] = variable; - setLocVariables(newList); - - onValueChange?.(newList); - }; - - return ( - <> -
- - - - - -
{t("common.button.add")}
-
- } - onSave={(variable) => { - handleAddClick(variable); - }} - /> - - - - -
{t("domain.deployment.form.variables.empty")}
- - - - -
{t("common.button.add")}
- - } - variable={{ - key: "", - value: "", - }} - onSave={(variable) => { - handleAddClick(variable); - }} - /> - - } - > -
- {locVariables?.map((item, index) => ( -
-
- {item.key}={item.value} -
-
- } - variable={item} - onSave={(variable) => { - handleEditClick(index, variable); - }} - /> - - { - handleDeleteClick(index); - }} - /> -
-
- ))} -
-
- - ); -}; - -type KVEditProps = { - variable?: KVType; - trigger: React.ReactNode; - onSave: (variable: KVType) => void; -}; - -const KVEdit = ({ variable, trigger, onSave }: KVEditProps) => { - const [locVariable, setLocVariable] = useState({ - key: "", - value: "", - }); - - useEffect(() => { - if (variable) setLocVariable(variable!); - }, [variable]); - - const { t } = useTranslation(); - - const [open, setOpen] = useState(false); - - const [err, setErr] = useState>({}); - - const handleSaveClick = () => { - if (!locVariable.key) { - setErr({ - key: t("domain.deployment.form.variables.key.required"), - }); - return; - } - - if (!locVariable.value) { - setErr({ - value: t("domain.deployment.form.variables.value.required"), - }); - return; - } - - onSave?.(locVariable); - - setOpen(false); - - setErr({}); - }; - - return ( - { - setOpen(!open); - }} - > - {trigger} - - - {t("domain.deployment.form.variables.label")} - -
- - { - setLocVariable({ ...locVariable, key: e.target.value }); - }} - className="w-full mt-1" - /> -
{err?.key}
-
- -
- - { - setLocVariable({ ...locVariable, value: e.target.value }); - }} - className="w-full mt-1" - /> - -
{err?.value}
-
-
- -
- -
-
-
-
- ); -}; - -export default KVList; diff --git a/ui/src/components/notification/NotifyChannelEditFormBarkFields.tsx b/ui/src/components/notification/NotifyChannelEditFormBarkFields.tsx index dd7ae6c5..f5e4944d 100644 --- a/ui/src/components/notification/NotifyChannelEditFormBarkFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormBarkFields.tsx @@ -9,7 +9,7 @@ const NotifyChannelEditFormBarkFields = () => { const formSchema = z.object({ serverUrl: z .string({ message: t("settings.notification.channel.form.bark_server_url.placeholder") }) - .url({ message: t("common.errmsg.url_invalid") }) + .url(t("common.errmsg.url_invalid")) .nullish(), deviceKey: z .string({ message: t("settings.notification.channel.form.bark_device_key.placeholder") }) diff --git a/ui/src/components/notification/NotifyChannelEditFormEmailFields.tsx b/ui/src/components/notification/NotifyChannelEditFormEmailFields.tsx index d9f30f82..615950bb 100644 --- a/ui/src/components/notification/NotifyChannelEditFormEmailFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormEmailFields.tsx @@ -25,23 +25,17 @@ const NotifyChannelEditFormEmailFields = () => { .string({ message: t("settings.notification.channel.form.email_password.placeholder") }) .min(1, t("settings.notification.channel.form.email_password.placeholder")) .max(256, t("common.errmsg.string_max", { max: 256 })), - senderAddress: z - .string({ message: t("settings.notification.channel.form.email_sender_address.placeholder") }) - .min(1, t("settings.notification.channel.form.email_sender_address.placeholder")) - .email({ message: t("common.errmsg.email_invalid") }), - receiverAddress: z - .string({ message: t("settings.notification.channel.form.email_receiver_address.placeholder") }) - .min(1, t("settings.notification.channel.form.email_receiver_address.placeholder")) - .email({ message: t("common.errmsg.email_invalid") }), + senderAddress: z.string({ message: t("settings.notification.channel.form.email_sender_address.placeholder") }).email(t("common.errmsg.email_invalid")), + receiverAddress: z.string({ message: t("settings.notification.channel.form.email_receiver_address.placeholder") }).email(t("common.errmsg.email_invalid")), }); const formRule = createSchemaFieldRule(formSchema); - const form = Form.useFormInstance>(); + const formInst = Form.useFormInstance>(); const handleTLSSwitchChange = (checked: boolean) => { - const oldPort = form.getFieldValue("smtpPort"); + const oldPort = formInst.getFieldValue("smtpPort"); const newPort = checked && (oldPort == null || oldPort === 25) ? 465 : !checked && (oldPort == null || oldPort === 465) ? 25 : oldPort; if (newPort !== oldPort) { - form.setFieldValue("smtpPort", newPort); + formInst.setFieldValue("smtpPort", newPort); } }; diff --git a/ui/src/components/notification/NotifyChannelEditFormLarkFields.tsx b/ui/src/components/notification/NotifyChannelEditFormLarkFields.tsx index 1feaccce..bd683824 100644 --- a/ui/src/components/notification/NotifyChannelEditFormLarkFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormLarkFields.tsx @@ -7,10 +7,7 @@ const NotifyChannelEditFormLarkFields = () => { const { t } = useTranslation(); const formSchema = z.object({ - webhookUrl: z - .string({ message: t("settings.notification.channel.form.lark_webhook_url.placeholder") }) - .min(1, t("settings.notification.channel.form.lark_webhook_url.placeholder")) - .url({ message: t("common.errmsg.url_invalid") }), + webhookUrl: z.string({ message: t("settings.notification.channel.form.lark_webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/notification/NotifyChannelEditFormServerChanFields.tsx b/ui/src/components/notification/NotifyChannelEditFormServerChanFields.tsx index bf6b49b9..b820f925 100644 --- a/ui/src/components/notification/NotifyChannelEditFormServerChanFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormServerChanFields.tsx @@ -7,10 +7,7 @@ const NotifyChannelEditFormServerChanFields = () => { const { t } = useTranslation(); const formSchema = z.object({ - url: z - .string({ message: t("settings.notification.channel.form.serverchan_url.placeholder") }) - .min(1, t("settings.notification.channel.form.serverchan_url.placeholder")) - .url({ message: t("common.errmsg.url_invalid") }), + url: z.string({ message: t("settings.notification.channel.form.serverchan_url.placeholder") }).url(t("common.errmsg.url_invalid")), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/notification/NotifyChannelEditFormWebhookFields.tsx b/ui/src/components/notification/NotifyChannelEditFormWebhookFields.tsx index 322781cb..abf935c2 100644 --- a/ui/src/components/notification/NotifyChannelEditFormWebhookFields.tsx +++ b/ui/src/components/notification/NotifyChannelEditFormWebhookFields.tsx @@ -7,10 +7,7 @@ const NotifyChannelEditFormWebhookFields = () => { const { t } = useTranslation(); const formSchema = z.object({ - url: z - .string({ message: t("settings.notification.channel.form.webhook_url.placeholder") }) - .min(1, t("settings.notification.channel.form.webhook_url.placeholder")) - .url({ message: t("common.errmsg.url_invalid") }), + url: z.string({ message: t("settings.notification.channel.form.webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")), }); const formRule = createSchemaFieldRule(formSchema); diff --git a/ui/src/components/notification/NotifyTemplate.tsx b/ui/src/components/notification/NotifyTemplate.tsx index 8ebde44b..cedbbdf6 100644 --- a/ui/src/components/notification/NotifyTemplate.tsx +++ b/ui/src/components/notification/NotifyTemplate.tsx @@ -26,14 +26,14 @@ const NotifyTemplateForm = ({ className, style }: NotifyTemplateFormProps) => { const formSchema = z.object({ subject: z .string() - .trim() .min(1, t("settings.notification.template.form.subject.placeholder")) - .max(1000, t("common.errmsg.string_max", { max: 1000 })), + .max(1000, t("common.errmsg.string_max", { max: 1000 })) + .trim(), message: z .string() - .trim() .min(1, t("settings.notification.template.form.message.placeholder")) - .max(1000, t("common.errmsg.string_max", { max: 1000 })), + .max(1000, t("common.errmsg.string_max", { max: 1000 })) + .trim(), }); const formRule = createSchemaFieldRule(formSchema); const { diff --git a/ui/src/components/ui/button.tsx b/ui/src/components/ui/button.tsx deleted file mode 100644 index 28b2442d..00000000 --- a/ui/src/components/ui/button.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; -import { Loader2 } from "lucide-react"; - -import { cn } from "./utils"; - -const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", - destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", - outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground", - secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-10 px-4 py-2", - sm: "h-9 rounded-md px-3", - lg: "h-11 rounded-md px-8", - icon: "h-10 w-10", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -); - -export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean; - loading?: boolean; -} - -const Button = React.forwardRef(({ className, variant, size, loading, asChild = false, children, ...props }, ref) => { - if (asChild) { - return ( - - <> - {React.Children.map(children as React.ReactElement, (child: React.ReactElement) => { - return React.cloneElement(child, { - className: cn(buttonVariants({ variant, size }), className), - children: ( - <> - {loading && } - {child.props.children} - - ), - }); - })} - - - ); - } - - return ( - - ); -}); -Button.displayName = "Button"; - -export { Button, buttonVariants }; diff --git a/ui/src/components/ui/dialog.tsx b/ui/src/components/ui/dialog.tsx deleted file mode 100644 index b5db98d0..00000000 --- a/ui/src/components/ui/dialog.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import * as React from "react"; -import * as DialogPrimitive from "@radix-ui/react-dialog"; -import { X } from "lucide-react"; - -import { cn } from "./utils"; - -const Dialog = DialogPrimitive.Root; - -const DialogTrigger = DialogPrimitive.Trigger; - -const DialogPortal = DialogPrimitive.Portal; - -const DialogClose = DialogPrimitive.Close; - -const DialogOverlay = React.forwardRef, React.ComponentPropsWithoutRef>( - ({ className, ...props }, ref) => ( - - ) -); -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; - -const DialogContent = React.forwardRef, React.ComponentPropsWithoutRef>( - ({ className, children, ...props }, ref) => ( - - - - {children} - - - Close - - - - ) -); -DialogContent.displayName = DialogPrimitive.Content.displayName; - -const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => ( -
-); -DialogHeader.displayName = "DialogHeader"; - -const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => ( -
-); -DialogFooter.displayName = "DialogFooter"; - -const DialogTitle = React.forwardRef, React.ComponentPropsWithoutRef>( - ({ className, ...props }, ref) => ( - - ) -); -DialogTitle.displayName = DialogPrimitive.Title.displayName; - -const DialogDescription = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ); -DialogDescription.displayName = DialogPrimitive.Description.displayName; - -export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription }; diff --git a/ui/src/components/ui/dropdown-menu.tsx b/ui/src/components/ui/dropdown-menu.tsx deleted file mode 100644 index 5f3404a9..00000000 --- a/ui/src/components/ui/dropdown-menu.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import * as React from "react"; -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; -import { Check, ChevronRight, Circle } from "lucide-react"; - -import { cn } from "./utils"; - -const DropdownMenu = DropdownMenuPrimitive.Root; - -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; - -const DropdownMenuGroup = DropdownMenuPrimitive.Group; - -const DropdownMenuPortal = DropdownMenuPrimitive.Portal; - -const DropdownMenuSub = DropdownMenuPrimitive.Sub; - -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; - -const DropdownMenuSubTrigger = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, children, ...props }, ref) => ( - - {children} - - -)); -DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; - -const DropdownMenuSubContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); -DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName; - -const DropdownMenuContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, sideOffset = 4, ...props }, ref) => ( - - - -)); -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; - -const DropdownMenuItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, ...props }, ref) => ( - -)); -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; - -const DropdownMenuCheckboxItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, checked, ...props }, ref) => ( - - - - - - - {children} - -)); -DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName; - -const DropdownMenuRadioItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( - - - - - - - {children} - -)); -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; - -const DropdownMenuLabel = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, ...props }, ref) => ( - -)); -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; - -const DropdownMenuSeparator = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ); -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; - -const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes) => { - return ; -}; -DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; - -export { - DropdownMenu, - DropdownMenuTrigger, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuCheckboxItem, - DropdownMenuRadioItem, - DropdownMenuLabel, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuGroup, - DropdownMenuPortal, - DropdownMenuSub, - DropdownMenuSubContent, - DropdownMenuSubTrigger, - DropdownMenuRadioGroup, -}; diff --git a/ui/src/components/ui/form.tsx b/ui/src/components/ui/form.tsx deleted file mode 100644 index 9ded7d14..00000000 --- a/ui/src/components/ui/form.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import * as React from "react"; -import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from "react-hook-form"; -import { useTranslation } from "react-i18next"; -import * as LabelPrimitive from "@radix-ui/react-label"; -import { Slot } from "@radix-ui/react-slot"; - -import { cn } from "./utils"; -import { Label } from "@/components/ui/label"; - -const Form = FormProvider; - -type FormFieldContextValue = FieldPath> = { - name: TName; -}; - -const FormFieldContext = React.createContext({} as FormFieldContextValue); - -const FormField = = FieldPath>({ - ...props -}: ControllerProps) => { - return ( - - - - ); -}; - -const useFormField = () => { - const fieldContext = React.useContext(FormFieldContext); - const itemContext = React.useContext(FormItemContext); - const { getFieldState, formState } = useFormContext(); - - const fieldState = getFieldState(fieldContext.name, formState); - - if (!fieldContext) { - throw new Error("useFormField should be used within "); - } - - const { id } = itemContext; - - return { - id, - name: fieldContext.name, - formItemId: `${id}-form-item`, - formDescriptionId: `${id}-form-item-description`, - formMessageId: `${id}-form-item-message`, - ...fieldState, - }; -}; - -type FormItemContextValue = { - id: string; -}; - -const FormItemContext = React.createContext({} as FormItemContextValue); - -const FormItem = React.forwardRef>(({ className, ...props }, ref) => { - const id = React.useId(); - - return ( - -
- - ); -}); -FormItem.displayName = "FormItem"; - -const FormLabel = React.forwardRef, React.ComponentPropsWithoutRef>( - ({ className, ...props }, ref) => { - const { error, formItemId } = useFormField(); - - return