diff --git a/.npmrc b/.npmrc index eaf6f94..d9b4b32 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -@abearxiong:registry=https://npm.pkg.github.com \ No newline at end of file +@abearxiong:registry=https://npm.pkg.github.com diff --git a/package.json b/package.json index db55345..b7d3649 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,19 @@ "build": "tsc -b && vite build", "lint": "eslint .", "preview": "vite preview", + "prune": "pnpm store prune && rimraf node_modules/.vite", "deploy": "rsync -avz --delete ./dist/ light:/root/apps/envision/web" }, "dependencies": { + "@abearxiong/flows": "0.0.1-alpha.6", "@abearxiong/ui": "0.0.1-alpha.0", + "@ant-design/icons": "^5.4.0", + "@icon-park/react": "^1.4.2", "@kevisual/query": "^0.0.2", "@uiw/react-textarea-code-editor": "^3.0.2", + "@xyflow/react": "^12.3.0", "antd": "^5.20.6", + "classnames": "^2.5.1", "clsx": "^2.1.1", "immer": "^10.1.1", "lodash-es": "^4.17.21", @@ -30,20 +36,21 @@ "@eslint/js": "^9.10.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/typography": "^0.5.15", - "@types/node": "^22.5.4", - "@types/react": "^18.3.5", + "@types/node": "^22.5.5", + "@types/react": "^18.3.7", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", "eslint": "^9.10.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", - "eslint-plugin-react-refresh": "^0.4.11", + "eslint-plugin-react-refresh": "^0.4.12", "globals": "^15.9.0", + "react-is": "^18.3.1", "tailwind-merge": "^2.5.2", - "tailwindcss": "^3.4.11", + "tailwindcss": "^3.4.12", "tailwindcss-animate": "^1.0.7", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0", - "vite": "^5.4.4" + "typescript-eslint": "^8.6.0", + "vite": "^5.4.6" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b412db..a2a4441 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,18 +8,33 @@ importers: .: dependencies: + '@abearxiong/flows': + specifier: 0.0.1-alpha.6 + version: 0.0.1-alpha.6(@xyflow/react@12.3.0(@types/react@18.3.7)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zustand@4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1)) '@abearxiong/ui': specifier: 0.0.1-alpha.0 version: 0.0.1-alpha.0 + '@ant-design/icons': + specifier: ^5.4.0 + version: 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@icon-park/react': + specifier: ^1.4.2 + version: 1.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@kevisual/query': specifier: ^0.0.2 version: 0.0.2 '@uiw/react-textarea-code-editor': specifier: ^3.0.2 version: 3.0.2(@babel/runtime@7.25.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@xyflow/react': + specifier: ^12.3.0 + version: 12.3.0(@types/react@18.3.7)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) antd: specifier: ^5.20.6 version: 5.20.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + classnames: + specifier: ^2.5.1 + version: 2.5.1 clsx: specifier: ^2.1.1 version: 2.1.1 @@ -49,29 +64,29 @@ importers: version: 10.0.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) zustand: specifier: ^4.5.5 - version: 4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1) + version: 4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1) devDependencies: '@eslint/js': specifier: ^9.10.0 version: 9.10.0 '@tailwindcss/aspect-ratio': specifier: ^0.4.2 - version: 0.4.2(tailwindcss@3.4.11) + version: 0.4.2(tailwindcss@3.4.12) '@tailwindcss/typography': specifier: ^0.5.15 - version: 0.5.15(tailwindcss@3.4.11) + version: 0.5.15(tailwindcss@3.4.12) '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.7 + version: 18.3.7 '@types/react-dom': specifier: ^18.3.0 version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.4(@types/node@22.5.4)) + version: 4.3.1(vite@5.4.6(@types/node@22.5.5)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.45) @@ -82,32 +97,43 @@ importers: specifier: ^5.1.0-rc.0 version: 5.1.0-rc-fb9a90fa48-20240614(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-react-refresh: - specifier: ^0.4.11 - version: 0.4.11(eslint@9.10.0(jiti@1.21.6)) + specifier: ^0.4.12 + version: 0.4.12(eslint@9.10.0(jiti@1.21.6)) globals: specifier: ^15.9.0 version: 15.9.0 + react-is: + specifier: ^18.3.1 + version: 18.3.1 tailwind-merge: specifier: ^2.5.2 version: 2.5.2 tailwindcss: - specifier: ^3.4.11 - version: 3.4.11 + specifier: ^3.4.12 + version: 3.4.12 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.11) + version: 1.0.7(tailwindcss@3.4.12) typescript: specifier: ^5.6.2 version: 5.6.2 typescript-eslint: - specifier: ^8.5.0 - version: 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + specifier: ^8.6.0 + version: 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) vite: - specifier: ^5.4.4 - version: 5.4.4(@types/node@22.5.4) + specifier: ^5.4.6 + version: 5.4.6(@types/node@22.5.5) packages: + '@abearxiong/flows@0.0.1-alpha.6': + resolution: {integrity: sha512-CV9U4WZBpebsK00s0LrdOj4QoUa3BgUqiA+UhWPSRxEqtp+r5Vgo2/7MDeoKLyhZ8YQZ7fMcGQl4w0zcWKKG3Q==, tarball: https://npm.pkg.github.com/download/@abearxiong/flows/0.0.1-alpha.6/a1af0defd5b351d7316f800201d222472a763369} + peerDependencies: + '@xyflow/react': ^12.3.0 + immer: ^10.1.1 + react: ^18.3.1 + zustand: ^4.5.5 + '@abearxiong/ui@0.0.1-alpha.0': resolution: {integrity: sha512-xNR+p4oiJZfmwK3yW9smfDMbhYBWuDr4qmwMW0cr/lvloUpxiMM7SyQyOvvEeOyzk4ElJJHJKasC3rzXQ5bQMQ==, tarball: https://npm.pkg.github.com/download/@abearxiong/ui/0.0.1-alpha.0/aff1ce150e7d4e8181294bb1f8cd6a789c504389} @@ -422,6 +448,15 @@ packages: resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@floating-ui/core@1.6.8': + resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} + + '@floating-ui/dom@1.6.11': + resolution: {integrity: sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==} + + '@floating-ui/utils@0.2.8': + resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -430,6 +465,13 @@ packages: resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} + '@icon-park/react@1.4.2': + resolution: {integrity: sha512-+MtQLjNiRuia3fC/NfpSCTIy5KH5b+NkMB9zYd7p3R4aAIK61AjK0OSraaICJdkKooU9jpzk8m0fY4g9A3JqhQ==} + engines: {node: '>= 8.0.0', npm: '>= 5.0.0'} + peerDependencies: + react: '>=16.9' + react-dom: '>=16.9' + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -641,6 +683,24 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/d3-color@3.1.3': + resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} + + '@types/d3-drag@3.0.7': + resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} + + '@types/d3-interpolate@3.0.4': + resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} + + '@types/d3-selection@3.0.10': + resolution: {integrity: sha512-cuHoUgS/V3hLdjJOLTT691+G2QoqAjCVLmr4kJXR4ha56w1Zdu8UUQ5TxLRqudgNjwXeQxKMq4j+lyf9sWuslg==} + + '@types/d3-transition@3.0.8': + resolution: {integrity: sha512-ew63aJfQ/ms7QQ4X7pk5NxQ9fZH/z+i24ZfJ6tJSfqxJMrYLiK01EAs2/Rtw/JreGUsS3pLPNV644qXFGnoZNQ==} + + '@types/d3-zoom@3.0.8': + resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -653,8 +713,8 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/node@22.5.4': - resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + '@types/node@22.5.5': + resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} '@types/prismjs@1.26.4': resolution: {integrity: sha512-rlAnzkW2sZOjbqZ743IHUhFcvzaGbqijwOu8QZnZCjfQzBqFE3s4lOTJEsxikImav9uzz/42I+O7YUs1mWgMlg==} @@ -665,8 +725,8 @@ packages: '@types/react-dom@18.3.0': resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} - '@types/react@18.3.5': - resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} + '@types/react@18.3.7': + resolution: {integrity: sha512-KUnDCJF5+AiZd8owLIeVHqmW9yM4sqmDVf2JRJiBMFkGvkoZ4/WyV2lL4zVsoinmRS/W3FeEdZLEWFRofnT2FQ==} '@types/unist@2.0.11': resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} @@ -674,8 +734,8 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.5.0': - resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + '@typescript-eslint/eslint-plugin@8.6.0': + resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -685,8 +745,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.5.0': - resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + '@typescript-eslint/parser@8.6.0': + resolution: {integrity: sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -695,12 +755,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.5.0': - resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} + '@typescript-eslint/scope-manager@8.6.0': + resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.5.0': - resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + '@typescript-eslint/type-utils@8.6.0': + resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -708,12 +768,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.5.0': - resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} + '@typescript-eslint/types@8.6.0': + resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.5.0': - resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + '@typescript-eslint/typescript-estree@8.6.0': + resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -721,14 +781,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.5.0': - resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} + '@typescript-eslint/utils@8.6.0': + resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.5.0': - resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} + '@typescript-eslint/visitor-keys@8.6.0': + resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@uiw/react-textarea-code-editor@3.0.2': @@ -747,6 +807,15 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 + '@xyflow/react@12.3.0': + resolution: {integrity: sha512-dujEbjOn+5gMGg/wsojxtI7v2CfWm7ieRyiOHiZTPyw6p/VIdCoS3nLfSBP3TT+swoHSAXZ78iomHSKoUl4tMg==} + peerDependencies: + react: '>=17' + react-dom: '>=17' + + '@xyflow/system@0.0.42': + resolution: {integrity: sha512-kWYj+Y0GOct0jKYTdyRMNOLPxGNbb2TYvPg2gTmJnZ31DOOMkL5uRBLX825DR2gOACDu+i5FHLxPJUPf/eGOJw==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -872,6 +941,9 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + classcat@5.0.5: + resolution: {integrity: sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==} + classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} @@ -923,6 +995,44 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} @@ -993,8 +1103,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-refresh@0.4.11: - resolution: {integrity: sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw==} + eslint-plugin-react-refresh@0.4.12: + resolution: {integrity: sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==} peerDependencies: eslint: '>=7' @@ -1040,6 +1150,9 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -1769,6 +1882,12 @@ packages: react: '>=18' react-dom: '>=18' + react-tooltip@5.28.0: + resolution: {integrity: sha512-R5cO3JPPXk6FRbBHMO0rI9nkUG/JKfalBSQfZedZYzmqaZQgq7GLzF8vcCWx6IhUCKg0yPqJhXIzmIO5ff15xg==} + peerDependencies: + react: '>=16.14.0' + react-dom: '>=16.14.0' + react@18.3.1: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} @@ -1912,8 +2031,8 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || insiders' - tailwindcss@3.4.11: - resolution: {integrity: sha512-qhEuBcLemjSJk5ajccN9xJFtM/h0AVCPaA6C92jNP+M2J8kX+eMJHI7R2HFKUvvAsMpcfLILMCFYSeDwpMmlUg==} + tailwindcss@3.4.12: + resolution: {integrity: sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==} engines: {node: '>=14.0.0'} hasBin: true @@ -1961,8 +2080,8 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - typescript-eslint@8.5.0: - resolution: {integrity: sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==} + typescript-eslint@8.6.0: + resolution: {integrity: sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -2049,8 +2168,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@5.4.4: - resolution: {integrity: sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==} + vite@5.4.6: + resolution: {integrity: sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2132,6 +2251,20 @@ packages: snapshots: + '@abearxiong/flows@0.0.1-alpha.6(@xyflow/react@12.3.0(@types/react@18.3.7)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zustand@4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1))': + dependencies: + '@ant-design/icons': 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@icon-park/react': 1.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@xyflow/react': 12.3.0(@types/react@18.3.7)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + clsx: 2.1.1 + eventemitter3: 5.0.1 + immer: 10.1.1 + react: 18.3.1 + react-tooltip: 5.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1) + transitivePeerDependencies: + - react-dom + '@abearxiong/ui@0.0.1-alpha.0': {} '@alloc/quick-lru@5.2.0': {} @@ -2430,10 +2563,26 @@ snapshots: dependencies: levn: 0.4.1 + '@floating-ui/core@1.6.8': + dependencies: + '@floating-ui/utils': 0.2.8 + + '@floating-ui/dom@1.6.11': + dependencies: + '@floating-ui/core': 1.6.8 + '@floating-ui/utils': 0.2.8 + + '@floating-ui/utils@0.2.8': {} + '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/retry@0.3.0': {} + '@icon-park/react@1.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -2596,17 +2745,17 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.21.3': optional: true - '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.11)': + '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.12)': dependencies: - tailwindcss: 3.4.11 + tailwindcss: 3.4.12 - '@tailwindcss/typography@0.5.15(tailwindcss@3.4.11)': + '@tailwindcss/typography@0.5.15(tailwindcss@3.4.12)': dependencies: lodash.castarray: 4.4.0 lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 postcss-selector-parser: 6.0.10 - tailwindcss: 3.4.11 + tailwindcss: 3.4.12 '@types/babel__core@7.20.5': dependencies: @@ -2629,6 +2778,27 @@ snapshots: dependencies: '@babel/types': 7.25.6 + '@types/d3-color@3.1.3': {} + + '@types/d3-drag@3.0.7': + dependencies: + '@types/d3-selection': 3.0.10 + + '@types/d3-interpolate@3.0.4': + dependencies: + '@types/d3-color': 3.1.3 + + '@types/d3-selection@3.0.10': {} + + '@types/d3-transition@3.0.8': + dependencies: + '@types/d3-selection': 3.0.10 + + '@types/d3-zoom@3.0.8': + dependencies: + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.10 + '@types/estree@1.0.5': {} '@types/hast@2.3.10': @@ -2643,7 +2813,7 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/node@22.5.4': + '@types/node@22.5.5': dependencies: undici-types: 6.19.8 @@ -2653,9 +2823,9 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.7 - '@types/react@18.3.5': + '@types/react@18.3.7': dependencies: '@types/prop-types': 15.7.12 csstype: 3.1.3 @@ -2664,14 +2834,14 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/parser': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/type-utils': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.6.0 eslint: 9.10.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 @@ -2682,12 +2852,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/parser@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.6.0 debug: 4.3.7 eslint: 9.10.0(jiti@1.21.6) optionalDependencies: @@ -2695,15 +2865,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.5.0': + '@typescript-eslint/scope-manager@8.6.0': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 - '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -2712,12 +2882,12 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.5.0': {} + '@typescript-eslint/types@8.6.0': {} - '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -2729,20 +2899,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) eslint: 9.10.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.5.0': + '@typescript-eslint/visitor-keys@8.6.0': dependencies: - '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/types': 8.6.0 eslint-visitor-keys: 3.4.3 '@uiw/react-textarea-code-editor@3.0.2(@babel/runtime@7.25.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -2755,17 +2925,38 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@4.3.1(vite@5.4.4(@types/node@22.5.4))': + '@vitejs/plugin-react@4.3.1(vite@5.4.6(@types/node@22.5.5))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.4(@types/node@22.5.4) + vite: 5.4.6(@types/node@22.5.5) transitivePeerDependencies: - supports-color + '@xyflow/react@12.3.0(@types/react@18.3.7)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@xyflow/system': 0.0.42 + classcat: 5.0.5 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1) + transitivePeerDependencies: + - '@types/react' + - immer + + '@xyflow/system@0.0.42': + dependencies: + '@types/d3-drag': 3.0.7 + '@types/d3-selection': 3.0.10 + '@types/d3-transition': 3.0.8 + '@types/d3-zoom': 3.0.8 + d3-drag: 3.0.0 + d3-selection: 3.0.0 + d3-zoom: 3.0.0 + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: acorn: 8.12.1 @@ -2939,6 +3130,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + classcat@5.0.5: {} + classnames@2.5.1: {} clsx@2.1.1: {} @@ -2979,6 +3172,42 @@ snapshots: csstype@3.1.3: {} + d3-color@3.1.0: {} + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-ease@3.0.1: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-selection@3.0.0: {} + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + dayjs@1.11.13: {} debug@4.3.7: @@ -3047,7 +3276,7 @@ snapshots: dependencies: eslint: 9.10.0(jiti@1.21.6) - eslint-plugin-react-refresh@0.4.11(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-react-refresh@0.4.12(eslint@9.10.0(jiti@1.21.6)): dependencies: eslint: 9.10.0(jiti@1.21.6) @@ -3119,6 +3348,8 @@ snapshots: esutils@2.0.3: {} + eventemitter3@5.0.1: {} + extend@3.0.2: {} fast-deep-equal@3.1.3: {} @@ -3925,6 +4156,13 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) + react-tooltip@5.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@floating-ui/dom': 1.6.11 + classnames: 2.5.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react@18.3.1: dependencies: loose-envify: 1.4.0 @@ -4096,11 +4334,11 @@ snapshots: tailwind-merge@2.5.2: {} - tailwindcss-animate@1.0.7(tailwindcss@3.4.11): + tailwindcss-animate@1.0.7(tailwindcss@3.4.12): dependencies: - tailwindcss: 3.4.11 + tailwindcss: 3.4.12 - tailwindcss@3.4.11: + tailwindcss@3.4.12: dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -4161,11 +4399,11 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2): + typescript-eslint@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -4292,13 +4530,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite@5.4.4(@types/node@22.5.4): + vite@5.4.6(@types/node@22.5.5): dependencies: esbuild: 0.21.5 postcss: 8.4.45 rollup: 4.21.3 optionalDependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 fsevents: 2.3.3 web-namespaces@2.0.1: {} @@ -4327,11 +4565,11 @@ snapshots: yocto-queue@0.1.0: {} - zustand@4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1): + zustand@4.5.5(@types/react@18.3.7)(immer@10.1.1)(react@18.3.1): dependencies: use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.7 immer: 10.1.1 react: 18.3.1 diff --git a/src/App.tsx b/src/App.tsx index a38058c..3a6a3a2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,7 @@ import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom'; import { ConfigProvider } from 'antd'; import { App as ContainerApp } from './pages/container'; +import { App as PanelApp } from './pages/panel'; export const App = () => { return ( @@ -13,6 +14,7 @@ export const App = () => { } /> } /> + } /> 404} /> 404} /> diff --git a/src/pages/container/components/TextArea.tsx b/src/pages/container/components/TextArea.tsx index 1bbf033..41caa19 100644 --- a/src/pages/container/components/TextArea.tsx +++ b/src/pages/container/components/TextArea.tsx @@ -4,7 +4,7 @@ import { clsx } from 'clsx'; type Props = { value?: string; - onChange?: (evn: React.ChangeEvent) => void; + onChange?: (data: string) => void; readonly?: boolean; className?: string; }; @@ -13,14 +13,19 @@ export const TextArea = (props: Props) => { useEffect(() => { setCode(props.value || ''); }, []); + const _onChange = (value: string) => { + setCode(value); + props.onChange && props.onChange(value); + }; return ( -
+
setCode(evn.target.value)} + onChange={(evn) => _onChange(evn.target.value)} padding={10} style={{ backgroundColor: '#f5f5f5', diff --git a/src/pages/container/edit/List.tsx b/src/pages/container/edit/List.tsx index 99ced86..5424413 100644 --- a/src/pages/container/edit/List.tsx +++ b/src/pages/container/edit/List.tsx @@ -1,4 +1,3 @@ -import { query } from '@/modules'; import { Button, Input, message, Modal, Table } from 'antd'; import { useEffect, useState } from 'react'; import { TextArea } from '../components/TextArea'; @@ -14,6 +13,7 @@ const FormModal = () => { showEdit: state.showEdit, setShowEdit: state.setShowEdit, formData: state.formData, + updateData: state.updateData, }; }), ); @@ -21,15 +21,16 @@ const FormModal = () => { const open = containerStore.showEdit; if (open) { form.setFieldsValue(containerStore.formData || {}); + } else { + form.resetFields(); } }, [containerStore.showEdit]); const onFinish = async (values: any) => { - console.log(values); - onClose(); + containerStore.updateData(values); }; const onClose = () => { containerStore.setShowEdit(false); - form.setFieldsValue({}); + form.resetFields(); }; const isEdit = containerStore.formData.id; return ( @@ -39,13 +40,16 @@ const FormModal = () => { onClose={() => containerStore.setShowEdit(false)} destroyOnClose footer={false} + width={800} onCancel={onClose}>
@@ -75,7 +79,9 @@ export const ContainerList = () => { setFormData: state.setFormData, setShowEdit: state.setShowEdit, list: state.list, + deleteData: state.deleteData, getList: state.getList, + loading: state.loading, }; }), ); @@ -84,10 +90,10 @@ export const ContainerList = () => { }, []); const columns = [ - { - title: 'ID', - dataIndex: 'id', - }, + // { + // title: 'ID', + // dataIndex: 'id', + // }, { title: 'Title', dataIndex: 'title', @@ -95,6 +101,7 @@ export const ContainerList = () => { { title: 'Code', dataIndex: 'code', + width: '40%', render: (text: string, record: any) => { return