balibabu
commited on
Commit
·
dcce454
1
Parent(s):
86dad2d
feat: add FlowCanvas (#593)
Browse files### What problem does this PR solve?
feat: handle operator drag
feat: add FlowCanvas
#592
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
- web/package-lock.json +557 -0
- web/package.json +1 -0
- web/src/pages/flow/canvas/index.tsx +92 -0
- web/src/pages/flow/canvas/node/index.less +12 -0
- web/src/pages/flow/canvas/node/index.tsx +41 -0
- web/src/pages/flow/flow-sider/index.less +14 -0
- web/src/pages/flow/flow-sider/index.tsx +48 -0
- web/src/pages/flow/hooks.ts +47 -0
- web/src/pages/flow/index.tsx +20 -0
- web/src/pages/flow/mock.tsx +11 -0
- web/src/routes.ts +4 -0
web/package-lock.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
| 27 |
"react-pdf-highlighter": "^6.1.0",
|
| 28 |
"react-string-replace": "^1.1.1",
|
| 29 |
"react-syntax-highlighter": "^15.5.0",
|
|
|
|
| 30 |
"recharts": "^2.12.4",
|
| 31 |
"remark-gfm": "^4.0.0",
|
| 32 |
"umi": "^4.0.90",
|
|
@@ -2420,6 +2421,306 @@
|
|
| 2420 |
"node": ">=12.0.0"
|
| 2421 |
}
|
| 2422 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2423 |
"node_modules/@rgrove/parse-xml": {
|
| 2424 |
"version": "2.0.4",
|
| 2425 |
"resolved": "https://registry.npmmirror.com/@rgrove/parse-xml/-/parse-xml-2.0.4.tgz",
|
|
@@ -2679,21 +2980,142 @@
|
|
| 2679 |
"@babel/types": "^7.20.7"
|
| 2680 |
}
|
| 2681 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2682 |
"node_modules/@types/d3-array": {
|
| 2683 |
"version": "3.2.1",
|
| 2684 |
"resolved": "https://registry.npmmirror.com/@types/d3-array/-/d3-array-3.2.1.tgz",
|
| 2685 |
"integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg=="
|
| 2686 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2687 |
"node_modules/@types/d3-color": {
|
| 2688 |
"version": "3.1.3",
|
| 2689 |
"resolved": "https://registry.npmmirror.com/@types/d3-color/-/d3-color-3.1.3.tgz",
|
| 2690 |
"integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="
|
| 2691 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2692 |
"node_modules/@types/d3-ease": {
|
| 2693 |
"version": "3.0.2",
|
| 2694 |
"resolved": "https://registry.npmmirror.com/@types/d3-ease/-/d3-ease-3.0.2.tgz",
|
| 2695 |
"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="
|
| 2696 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2697 |
"node_modules/@types/d3-interpolate": {
|
| 2698 |
"version": "3.0.4",
|
| 2699 |
"resolved": "https://registry.npmmirror.com/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
|
|
@@ -2707,6 +3129,21 @@
|
|
| 2707 |
"resolved": "https://registry.npmmirror.com/@types/d3-path/-/d3-path-3.1.0.tgz",
|
| 2708 |
"integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ=="
|
| 2709 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2710 |
"node_modules/@types/d3-scale": {
|
| 2711 |
"version": "4.0.8",
|
| 2712 |
"resolved": "https://registry.npmmirror.com/@types/d3-scale/-/d3-scale-4.0.8.tgz",
|
|
@@ -2715,6 +3152,16 @@
|
|
| 2715 |
"@types/d3-time": "*"
|
| 2716 |
}
|
| 2717 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2718 |
"node_modules/@types/d3-shape": {
|
| 2719 |
"version": "3.1.6",
|
| 2720 |
"resolved": "https://registry.npmmirror.com/@types/d3-shape/-/d3-shape-3.1.6.tgz",
|
|
@@ -2728,11 +3175,33 @@
|
|
| 2728 |
"resolved": "https://registry.npmmirror.com/@types/d3-time/-/d3-time-3.0.3.tgz",
|
| 2729 |
"integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw=="
|
| 2730 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2731 |
"node_modules/@types/d3-timer": {
|
| 2732 |
"version": "3.0.2",
|
| 2733 |
"resolved": "https://registry.npmmirror.com/@types/d3-timer/-/d3-timer-3.0.2.tgz",
|
| 2734 |
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="
|
| 2735 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2736 |
"node_modules/@types/debug": {
|
| 2737 |
"version": "4.1.12",
|
| 2738 |
"resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz",
|
|
@@ -2774,6 +3243,11 @@
|
|
| 2774 |
"@types/estree": "*"
|
| 2775 |
}
|
| 2776 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2777 |
"node_modules/@types/glob": {
|
| 2778 |
"version": "7.2.0",
|
| 2779 |
"resolved": "https://registry.npmmirror.com/@types/glob/-/glob-7.2.0.tgz",
|
|
@@ -5834,6 +6308,11 @@
|
|
| 5834 |
"node": ">= 0.4"
|
| 5835 |
}
|
| 5836 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5837 |
"node_modules/classnames": {
|
| 5838 |
"version": "2.5.1",
|
| 5839 |
"resolved": "https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz",
|
|
@@ -6722,6 +7201,26 @@
|
|
| 6722 |
"node": ">=12"
|
| 6723 |
}
|
| 6724 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6725 |
"node_modules/d3-ease": {
|
| 6726 |
"version": "3.0.1",
|
| 6727 |
"resolved": "https://registry.npmmirror.com/d3-ease/-/d3-ease-3.0.1.tgz",
|
|
@@ -6788,6 +7287,14 @@
|
|
| 6788 |
"node": ">=12"
|
| 6789 |
}
|
| 6790 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6791 |
"node_modules/d3-shape": {
|
| 6792 |
"version": "3.2.0",
|
| 6793 |
"resolved": "https://registry.npmmirror.com/d3-shape/-/d3-shape-3.2.0.tgz",
|
|
@@ -6840,6 +7347,39 @@
|
|
| 6840 |
"node": ">=12"
|
| 6841 |
}
|
| 6842 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6843 |
"node_modules/data-uri-to-buffer": {
|
| 6844 |
"version": "4.0.1",
|
| 6845 |
"resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
|
@@ -15248,6 +15788,23 @@
|
|
| 15248 |
"lodash": "^4.0.1"
|
| 15249 |
}
|
| 15250 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15251 |
"node_modules/read-pkg": {
|
| 15252 |
"version": "5.2.0",
|
| 15253 |
"resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz",
|
|
|
|
| 27 |
"react-pdf-highlighter": "^6.1.0",
|
| 28 |
"react-string-replace": "^1.1.1",
|
| 29 |
"react-syntax-highlighter": "^15.5.0",
|
| 30 |
+
"reactflow": "^11.11.2",
|
| 31 |
"recharts": "^2.12.4",
|
| 32 |
"remark-gfm": "^4.0.0",
|
| 33 |
"umi": "^4.0.90",
|
|
|
|
| 2421 |
"node": ">=12.0.0"
|
| 2422 |
}
|
| 2423 |
},
|
| 2424 |
+
"node_modules/@reactflow/background": {
|
| 2425 |
+
"version": "11.3.12",
|
| 2426 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/background/-/background-11.3.12.tgz",
|
| 2427 |
+
"integrity": "sha512-jBuWVb43JQy5h4WOS7G0PU8voGTEJNA+qDmx8/jyBtrjbasTesLNfQvboTGjnQYYiJco6mw5vrtQItAJDNoIqw==",
|
| 2428 |
+
"dependencies": {
|
| 2429 |
+
"@reactflow/core": "11.11.2",
|
| 2430 |
+
"classcat": "^5.0.3",
|
| 2431 |
+
"zustand": "^4.4.1"
|
| 2432 |
+
},
|
| 2433 |
+
"peerDependencies": {
|
| 2434 |
+
"react": ">=17",
|
| 2435 |
+
"react-dom": ">=17"
|
| 2436 |
+
}
|
| 2437 |
+
},
|
| 2438 |
+
"node_modules/@reactflow/background/node_modules/immer": {
|
| 2439 |
+
"version": "10.1.1",
|
| 2440 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2441 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2442 |
+
"optional": true,
|
| 2443 |
+
"peer": true
|
| 2444 |
+
},
|
| 2445 |
+
"node_modules/@reactflow/background/node_modules/zustand": {
|
| 2446 |
+
"version": "4.5.2",
|
| 2447 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2448 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2449 |
+
"dependencies": {
|
| 2450 |
+
"use-sync-external-store": "1.2.0"
|
| 2451 |
+
},
|
| 2452 |
+
"engines": {
|
| 2453 |
+
"node": ">=12.7.0"
|
| 2454 |
+
},
|
| 2455 |
+
"peerDependencies": {
|
| 2456 |
+
"@types/react": ">=16.8",
|
| 2457 |
+
"immer": ">=9.0.6",
|
| 2458 |
+
"react": ">=16.8"
|
| 2459 |
+
},
|
| 2460 |
+
"peerDependenciesMeta": {
|
| 2461 |
+
"@types/react": {
|
| 2462 |
+
"optional": true
|
| 2463 |
+
},
|
| 2464 |
+
"immer": {
|
| 2465 |
+
"optional": true
|
| 2466 |
+
},
|
| 2467 |
+
"react": {
|
| 2468 |
+
"optional": true
|
| 2469 |
+
}
|
| 2470 |
+
}
|
| 2471 |
+
},
|
| 2472 |
+
"node_modules/@reactflow/controls": {
|
| 2473 |
+
"version": "11.2.12",
|
| 2474 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/controls/-/controls-11.2.12.tgz",
|
| 2475 |
+
"integrity": "sha512-L9F3+avFRShoprdT+5oOijm5gVsz2rqWCXBzOAgD923L1XFGIspdiHLLf8IlPGsT+mfl0GxbptZhaEeEzl1e3g==",
|
| 2476 |
+
"dependencies": {
|
| 2477 |
+
"@reactflow/core": "11.11.2",
|
| 2478 |
+
"classcat": "^5.0.3",
|
| 2479 |
+
"zustand": "^4.4.1"
|
| 2480 |
+
},
|
| 2481 |
+
"peerDependencies": {
|
| 2482 |
+
"react": ">=17",
|
| 2483 |
+
"react-dom": ">=17"
|
| 2484 |
+
}
|
| 2485 |
+
},
|
| 2486 |
+
"node_modules/@reactflow/controls/node_modules/immer": {
|
| 2487 |
+
"version": "10.1.1",
|
| 2488 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2489 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2490 |
+
"optional": true,
|
| 2491 |
+
"peer": true
|
| 2492 |
+
},
|
| 2493 |
+
"node_modules/@reactflow/controls/node_modules/zustand": {
|
| 2494 |
+
"version": "4.5.2",
|
| 2495 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2496 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2497 |
+
"dependencies": {
|
| 2498 |
+
"use-sync-external-store": "1.2.0"
|
| 2499 |
+
},
|
| 2500 |
+
"engines": {
|
| 2501 |
+
"node": ">=12.7.0"
|
| 2502 |
+
},
|
| 2503 |
+
"peerDependencies": {
|
| 2504 |
+
"@types/react": ">=16.8",
|
| 2505 |
+
"immer": ">=9.0.6",
|
| 2506 |
+
"react": ">=16.8"
|
| 2507 |
+
},
|
| 2508 |
+
"peerDependenciesMeta": {
|
| 2509 |
+
"@types/react": {
|
| 2510 |
+
"optional": true
|
| 2511 |
+
},
|
| 2512 |
+
"immer": {
|
| 2513 |
+
"optional": true
|
| 2514 |
+
},
|
| 2515 |
+
"react": {
|
| 2516 |
+
"optional": true
|
| 2517 |
+
}
|
| 2518 |
+
}
|
| 2519 |
+
},
|
| 2520 |
+
"node_modules/@reactflow/core": {
|
| 2521 |
+
"version": "11.11.2",
|
| 2522 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/core/-/core-11.11.2.tgz",
|
| 2523 |
+
"integrity": "sha512-+GfgyskweL1PsgRSguUwfrT2eDotlFgaKfDLm7x0brdzzPJY2qbCzVetaxedaiJmIli3817iYbILvE9qLKwbRA==",
|
| 2524 |
+
"dependencies": {
|
| 2525 |
+
"@types/d3": "^7.4.0",
|
| 2526 |
+
"@types/d3-drag": "^3.0.1",
|
| 2527 |
+
"@types/d3-selection": "^3.0.3",
|
| 2528 |
+
"@types/d3-zoom": "^3.0.1",
|
| 2529 |
+
"classcat": "^5.0.3",
|
| 2530 |
+
"d3-drag": "^3.0.0",
|
| 2531 |
+
"d3-selection": "^3.0.0",
|
| 2532 |
+
"d3-zoom": "^3.0.0",
|
| 2533 |
+
"zustand": "^4.4.1"
|
| 2534 |
+
},
|
| 2535 |
+
"peerDependencies": {
|
| 2536 |
+
"react": ">=17",
|
| 2537 |
+
"react-dom": ">=17"
|
| 2538 |
+
}
|
| 2539 |
+
},
|
| 2540 |
+
"node_modules/@reactflow/core/node_modules/immer": {
|
| 2541 |
+
"version": "10.1.1",
|
| 2542 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2543 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2544 |
+
"optional": true,
|
| 2545 |
+
"peer": true
|
| 2546 |
+
},
|
| 2547 |
+
"node_modules/@reactflow/core/node_modules/zustand": {
|
| 2548 |
+
"version": "4.5.2",
|
| 2549 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2550 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2551 |
+
"dependencies": {
|
| 2552 |
+
"use-sync-external-store": "1.2.0"
|
| 2553 |
+
},
|
| 2554 |
+
"engines": {
|
| 2555 |
+
"node": ">=12.7.0"
|
| 2556 |
+
},
|
| 2557 |
+
"peerDependencies": {
|
| 2558 |
+
"@types/react": ">=16.8",
|
| 2559 |
+
"immer": ">=9.0.6",
|
| 2560 |
+
"react": ">=16.8"
|
| 2561 |
+
},
|
| 2562 |
+
"peerDependenciesMeta": {
|
| 2563 |
+
"@types/react": {
|
| 2564 |
+
"optional": true
|
| 2565 |
+
},
|
| 2566 |
+
"immer": {
|
| 2567 |
+
"optional": true
|
| 2568 |
+
},
|
| 2569 |
+
"react": {
|
| 2570 |
+
"optional": true
|
| 2571 |
+
}
|
| 2572 |
+
}
|
| 2573 |
+
},
|
| 2574 |
+
"node_modules/@reactflow/minimap": {
|
| 2575 |
+
"version": "11.7.12",
|
| 2576 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/minimap/-/minimap-11.7.12.tgz",
|
| 2577 |
+
"integrity": "sha512-SRDU77c2PCF54PV/MQfkz7VOW46q7V1LZNOQlXAp7dkNyAOI6R+tb9qBUtUJOvILB+TCN6pRfD9fQ+2T99bW3Q==",
|
| 2578 |
+
"dependencies": {
|
| 2579 |
+
"@reactflow/core": "11.11.2",
|
| 2580 |
+
"@types/d3-selection": "^3.0.3",
|
| 2581 |
+
"@types/d3-zoom": "^3.0.1",
|
| 2582 |
+
"classcat": "^5.0.3",
|
| 2583 |
+
"d3-selection": "^3.0.0",
|
| 2584 |
+
"d3-zoom": "^3.0.0",
|
| 2585 |
+
"zustand": "^4.4.1"
|
| 2586 |
+
},
|
| 2587 |
+
"peerDependencies": {
|
| 2588 |
+
"react": ">=17",
|
| 2589 |
+
"react-dom": ">=17"
|
| 2590 |
+
}
|
| 2591 |
+
},
|
| 2592 |
+
"node_modules/@reactflow/minimap/node_modules/immer": {
|
| 2593 |
+
"version": "10.1.1",
|
| 2594 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2595 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2596 |
+
"optional": true,
|
| 2597 |
+
"peer": true
|
| 2598 |
+
},
|
| 2599 |
+
"node_modules/@reactflow/minimap/node_modules/zustand": {
|
| 2600 |
+
"version": "4.5.2",
|
| 2601 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2602 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2603 |
+
"dependencies": {
|
| 2604 |
+
"use-sync-external-store": "1.2.0"
|
| 2605 |
+
},
|
| 2606 |
+
"engines": {
|
| 2607 |
+
"node": ">=12.7.0"
|
| 2608 |
+
},
|
| 2609 |
+
"peerDependencies": {
|
| 2610 |
+
"@types/react": ">=16.8",
|
| 2611 |
+
"immer": ">=9.0.6",
|
| 2612 |
+
"react": ">=16.8"
|
| 2613 |
+
},
|
| 2614 |
+
"peerDependenciesMeta": {
|
| 2615 |
+
"@types/react": {
|
| 2616 |
+
"optional": true
|
| 2617 |
+
},
|
| 2618 |
+
"immer": {
|
| 2619 |
+
"optional": true
|
| 2620 |
+
},
|
| 2621 |
+
"react": {
|
| 2622 |
+
"optional": true
|
| 2623 |
+
}
|
| 2624 |
+
}
|
| 2625 |
+
},
|
| 2626 |
+
"node_modules/@reactflow/node-resizer": {
|
| 2627 |
+
"version": "2.2.12",
|
| 2628 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/node-resizer/-/node-resizer-2.2.12.tgz",
|
| 2629 |
+
"integrity": "sha512-6LHJGuI1zHyRrZHw5gGlVLIWnvVxid9WIqw8FMFSg+oF2DuS3pAPwSoZwypy7W22/gDNl9eD1Dcl/OtFtDFQ+w==",
|
| 2630 |
+
"dependencies": {
|
| 2631 |
+
"@reactflow/core": "11.11.2",
|
| 2632 |
+
"classcat": "^5.0.4",
|
| 2633 |
+
"d3-drag": "^3.0.0",
|
| 2634 |
+
"d3-selection": "^3.0.0",
|
| 2635 |
+
"zustand": "^4.4.1"
|
| 2636 |
+
},
|
| 2637 |
+
"peerDependencies": {
|
| 2638 |
+
"react": ">=17",
|
| 2639 |
+
"react-dom": ">=17"
|
| 2640 |
+
}
|
| 2641 |
+
},
|
| 2642 |
+
"node_modules/@reactflow/node-resizer/node_modules/immer": {
|
| 2643 |
+
"version": "10.1.1",
|
| 2644 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2645 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2646 |
+
"optional": true,
|
| 2647 |
+
"peer": true
|
| 2648 |
+
},
|
| 2649 |
+
"node_modules/@reactflow/node-resizer/node_modules/zustand": {
|
| 2650 |
+
"version": "4.5.2",
|
| 2651 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2652 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2653 |
+
"dependencies": {
|
| 2654 |
+
"use-sync-external-store": "1.2.0"
|
| 2655 |
+
},
|
| 2656 |
+
"engines": {
|
| 2657 |
+
"node": ">=12.7.0"
|
| 2658 |
+
},
|
| 2659 |
+
"peerDependencies": {
|
| 2660 |
+
"@types/react": ">=16.8",
|
| 2661 |
+
"immer": ">=9.0.6",
|
| 2662 |
+
"react": ">=16.8"
|
| 2663 |
+
},
|
| 2664 |
+
"peerDependenciesMeta": {
|
| 2665 |
+
"@types/react": {
|
| 2666 |
+
"optional": true
|
| 2667 |
+
},
|
| 2668 |
+
"immer": {
|
| 2669 |
+
"optional": true
|
| 2670 |
+
},
|
| 2671 |
+
"react": {
|
| 2672 |
+
"optional": true
|
| 2673 |
+
}
|
| 2674 |
+
}
|
| 2675 |
+
},
|
| 2676 |
+
"node_modules/@reactflow/node-toolbar": {
|
| 2677 |
+
"version": "1.3.12",
|
| 2678 |
+
"resolved": "https://registry.npmmirror.com/@reactflow/node-toolbar/-/node-toolbar-1.3.12.tgz",
|
| 2679 |
+
"integrity": "sha512-4kJRvNna/E3y2MZW9/80wTKwkhw4pLJiz3D5eQrD13XcmojSb1rArO9CiwyrI+rMvs5gn6NlCFB4iN1F+Q+lxQ==",
|
| 2680 |
+
"dependencies": {
|
| 2681 |
+
"@reactflow/core": "11.11.2",
|
| 2682 |
+
"classcat": "^5.0.3",
|
| 2683 |
+
"zustand": "^4.4.1"
|
| 2684 |
+
},
|
| 2685 |
+
"peerDependencies": {
|
| 2686 |
+
"react": ">=17",
|
| 2687 |
+
"react-dom": ">=17"
|
| 2688 |
+
}
|
| 2689 |
+
},
|
| 2690 |
+
"node_modules/@reactflow/node-toolbar/node_modules/immer": {
|
| 2691 |
+
"version": "10.1.1",
|
| 2692 |
+
"resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz",
|
| 2693 |
+
"integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
|
| 2694 |
+
"optional": true,
|
| 2695 |
+
"peer": true
|
| 2696 |
+
},
|
| 2697 |
+
"node_modules/@reactflow/node-toolbar/node_modules/zustand": {
|
| 2698 |
+
"version": "4.5.2",
|
| 2699 |
+
"resolved": "https://registry.npmmirror.com/zustand/-/zustand-4.5.2.tgz",
|
| 2700 |
+
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
| 2701 |
+
"dependencies": {
|
| 2702 |
+
"use-sync-external-store": "1.2.0"
|
| 2703 |
+
},
|
| 2704 |
+
"engines": {
|
| 2705 |
+
"node": ">=12.7.0"
|
| 2706 |
+
},
|
| 2707 |
+
"peerDependencies": {
|
| 2708 |
+
"@types/react": ">=16.8",
|
| 2709 |
+
"immer": ">=9.0.6",
|
| 2710 |
+
"react": ">=16.8"
|
| 2711 |
+
},
|
| 2712 |
+
"peerDependenciesMeta": {
|
| 2713 |
+
"@types/react": {
|
| 2714 |
+
"optional": true
|
| 2715 |
+
},
|
| 2716 |
+
"immer": {
|
| 2717 |
+
"optional": true
|
| 2718 |
+
},
|
| 2719 |
+
"react": {
|
| 2720 |
+
"optional": true
|
| 2721 |
+
}
|
| 2722 |
+
}
|
| 2723 |
+
},
|
| 2724 |
"node_modules/@rgrove/parse-xml": {
|
| 2725 |
"version": "2.0.4",
|
| 2726 |
"resolved": "https://registry.npmmirror.com/@rgrove/parse-xml/-/parse-xml-2.0.4.tgz",
|
|
|
|
| 2980 |
"@babel/types": "^7.20.7"
|
| 2981 |
}
|
| 2982 |
},
|
| 2983 |
+
"node_modules/@types/d3": {
|
| 2984 |
+
"version": "7.4.3",
|
| 2985 |
+
"resolved": "https://registry.npmmirror.com/@types/d3/-/d3-7.4.3.tgz",
|
| 2986 |
+
"integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",
|
| 2987 |
+
"dependencies": {
|
| 2988 |
+
"@types/d3-array": "*",
|
| 2989 |
+
"@types/d3-axis": "*",
|
| 2990 |
+
"@types/d3-brush": "*",
|
| 2991 |
+
"@types/d3-chord": "*",
|
| 2992 |
+
"@types/d3-color": "*",
|
| 2993 |
+
"@types/d3-contour": "*",
|
| 2994 |
+
"@types/d3-delaunay": "*",
|
| 2995 |
+
"@types/d3-dispatch": "*",
|
| 2996 |
+
"@types/d3-drag": "*",
|
| 2997 |
+
"@types/d3-dsv": "*",
|
| 2998 |
+
"@types/d3-ease": "*",
|
| 2999 |
+
"@types/d3-fetch": "*",
|
| 3000 |
+
"@types/d3-force": "*",
|
| 3001 |
+
"@types/d3-format": "*",
|
| 3002 |
+
"@types/d3-geo": "*",
|
| 3003 |
+
"@types/d3-hierarchy": "*",
|
| 3004 |
+
"@types/d3-interpolate": "*",
|
| 3005 |
+
"@types/d3-path": "*",
|
| 3006 |
+
"@types/d3-polygon": "*",
|
| 3007 |
+
"@types/d3-quadtree": "*",
|
| 3008 |
+
"@types/d3-random": "*",
|
| 3009 |
+
"@types/d3-scale": "*",
|
| 3010 |
+
"@types/d3-scale-chromatic": "*",
|
| 3011 |
+
"@types/d3-selection": "*",
|
| 3012 |
+
"@types/d3-shape": "*",
|
| 3013 |
+
"@types/d3-time": "*",
|
| 3014 |
+
"@types/d3-time-format": "*",
|
| 3015 |
+
"@types/d3-timer": "*",
|
| 3016 |
+
"@types/d3-transition": "*",
|
| 3017 |
+
"@types/d3-zoom": "*"
|
| 3018 |
+
}
|
| 3019 |
+
},
|
| 3020 |
"node_modules/@types/d3-array": {
|
| 3021 |
"version": "3.2.1",
|
| 3022 |
"resolved": "https://registry.npmmirror.com/@types/d3-array/-/d3-array-3.2.1.tgz",
|
| 3023 |
"integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg=="
|
| 3024 |
},
|
| 3025 |
+
"node_modules/@types/d3-axis": {
|
| 3026 |
+
"version": "3.0.6",
|
| 3027 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-axis/-/d3-axis-3.0.6.tgz",
|
| 3028 |
+
"integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",
|
| 3029 |
+
"dependencies": {
|
| 3030 |
+
"@types/d3-selection": "*"
|
| 3031 |
+
}
|
| 3032 |
+
},
|
| 3033 |
+
"node_modules/@types/d3-brush": {
|
| 3034 |
+
"version": "3.0.6",
|
| 3035 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-brush/-/d3-brush-3.0.6.tgz",
|
| 3036 |
+
"integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",
|
| 3037 |
+
"dependencies": {
|
| 3038 |
+
"@types/d3-selection": "*"
|
| 3039 |
+
}
|
| 3040 |
+
},
|
| 3041 |
+
"node_modules/@types/d3-chord": {
|
| 3042 |
+
"version": "3.0.6",
|
| 3043 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-chord/-/d3-chord-3.0.6.tgz",
|
| 3044 |
+
"integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg=="
|
| 3045 |
+
},
|
| 3046 |
"node_modules/@types/d3-color": {
|
| 3047 |
"version": "3.1.3",
|
| 3048 |
"resolved": "https://registry.npmmirror.com/@types/d3-color/-/d3-color-3.1.3.tgz",
|
| 3049 |
"integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="
|
| 3050 |
},
|
| 3051 |
+
"node_modules/@types/d3-contour": {
|
| 3052 |
+
"version": "3.0.6",
|
| 3053 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-contour/-/d3-contour-3.0.6.tgz",
|
| 3054 |
+
"integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",
|
| 3055 |
+
"dependencies": {
|
| 3056 |
+
"@types/d3-array": "*",
|
| 3057 |
+
"@types/geojson": "*"
|
| 3058 |
+
}
|
| 3059 |
+
},
|
| 3060 |
+
"node_modules/@types/d3-delaunay": {
|
| 3061 |
+
"version": "6.0.4",
|
| 3062 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
|
| 3063 |
+
"integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw=="
|
| 3064 |
+
},
|
| 3065 |
+
"node_modules/@types/d3-dispatch": {
|
| 3066 |
+
"version": "3.0.6",
|
| 3067 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz",
|
| 3068 |
+
"integrity": "sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ=="
|
| 3069 |
+
},
|
| 3070 |
+
"node_modules/@types/d3-drag": {
|
| 3071 |
+
"version": "3.0.7",
|
| 3072 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-drag/-/d3-drag-3.0.7.tgz",
|
| 3073 |
+
"integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",
|
| 3074 |
+
"dependencies": {
|
| 3075 |
+
"@types/d3-selection": "*"
|
| 3076 |
+
}
|
| 3077 |
+
},
|
| 3078 |
+
"node_modules/@types/d3-dsv": {
|
| 3079 |
+
"version": "3.0.7",
|
| 3080 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",
|
| 3081 |
+
"integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g=="
|
| 3082 |
+
},
|
| 3083 |
"node_modules/@types/d3-ease": {
|
| 3084 |
"version": "3.0.2",
|
| 3085 |
"resolved": "https://registry.npmmirror.com/@types/d3-ease/-/d3-ease-3.0.2.tgz",
|
| 3086 |
"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="
|
| 3087 |
},
|
| 3088 |
+
"node_modules/@types/d3-fetch": {
|
| 3089 |
+
"version": "3.0.7",
|
| 3090 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",
|
| 3091 |
+
"integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",
|
| 3092 |
+
"dependencies": {
|
| 3093 |
+
"@types/d3-dsv": "*"
|
| 3094 |
+
}
|
| 3095 |
+
},
|
| 3096 |
+
"node_modules/@types/d3-force": {
|
| 3097 |
+
"version": "3.0.9",
|
| 3098 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-force/-/d3-force-3.0.9.tgz",
|
| 3099 |
+
"integrity": "sha512-IKtvyFdb4Q0LWna6ymywQsEYjK/94SGhPrMfEr1TIc5OBeziTi+1jcCvttts8e0UWZIxpasjnQk9MNk/3iS+kA=="
|
| 3100 |
+
},
|
| 3101 |
+
"node_modules/@types/d3-format": {
|
| 3102 |
+
"version": "3.0.4",
|
| 3103 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-format/-/d3-format-3.0.4.tgz",
|
| 3104 |
+
"integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="
|
| 3105 |
+
},
|
| 3106 |
+
"node_modules/@types/d3-geo": {
|
| 3107 |
+
"version": "3.1.0",
|
| 3108 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-geo/-/d3-geo-3.1.0.tgz",
|
| 3109 |
+
"integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==",
|
| 3110 |
+
"dependencies": {
|
| 3111 |
+
"@types/geojson": "*"
|
| 3112 |
+
}
|
| 3113 |
+
},
|
| 3114 |
+
"node_modules/@types/d3-hierarchy": {
|
| 3115 |
+
"version": "3.1.7",
|
| 3116 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",
|
| 3117 |
+
"integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="
|
| 3118 |
+
},
|
| 3119 |
"node_modules/@types/d3-interpolate": {
|
| 3120 |
"version": "3.0.4",
|
| 3121 |
"resolved": "https://registry.npmmirror.com/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
|
|
|
|
| 3129 |
"resolved": "https://registry.npmmirror.com/@types/d3-path/-/d3-path-3.1.0.tgz",
|
| 3130 |
"integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ=="
|
| 3131 |
},
|
| 3132 |
+
"node_modules/@types/d3-polygon": {
|
| 3133 |
+
"version": "3.0.2",
|
| 3134 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",
|
| 3135 |
+
"integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA=="
|
| 3136 |
+
},
|
| 3137 |
+
"node_modules/@types/d3-quadtree": {
|
| 3138 |
+
"version": "3.0.6",
|
| 3139 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",
|
| 3140 |
+
"integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="
|
| 3141 |
+
},
|
| 3142 |
+
"node_modules/@types/d3-random": {
|
| 3143 |
+
"version": "3.0.3",
|
| 3144 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-random/-/d3-random-3.0.3.tgz",
|
| 3145 |
+
"integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ=="
|
| 3146 |
+
},
|
| 3147 |
"node_modules/@types/d3-scale": {
|
| 3148 |
"version": "4.0.8",
|
| 3149 |
"resolved": "https://registry.npmmirror.com/@types/d3-scale/-/d3-scale-4.0.8.tgz",
|
|
|
|
| 3152 |
"@types/d3-time": "*"
|
| 3153 |
}
|
| 3154 |
},
|
| 3155 |
+
"node_modules/@types/d3-scale-chromatic": {
|
| 3156 |
+
"version": "3.0.3",
|
| 3157 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz",
|
| 3158 |
+
"integrity": "sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw=="
|
| 3159 |
+
},
|
| 3160 |
+
"node_modules/@types/d3-selection": {
|
| 3161 |
+
"version": "3.0.10",
|
| 3162 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-selection/-/d3-selection-3.0.10.tgz",
|
| 3163 |
+
"integrity": "sha512-cuHoUgS/V3hLdjJOLTT691+G2QoqAjCVLmr4kJXR4ha56w1Zdu8UUQ5TxLRqudgNjwXeQxKMq4j+lyf9sWuslg=="
|
| 3164 |
+
},
|
| 3165 |
"node_modules/@types/d3-shape": {
|
| 3166 |
"version": "3.1.6",
|
| 3167 |
"resolved": "https://registry.npmmirror.com/@types/d3-shape/-/d3-shape-3.1.6.tgz",
|
|
|
|
| 3175 |
"resolved": "https://registry.npmmirror.com/@types/d3-time/-/d3-time-3.0.3.tgz",
|
| 3176 |
"integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw=="
|
| 3177 |
},
|
| 3178 |
+
"node_modules/@types/d3-time-format": {
|
| 3179 |
+
"version": "4.0.3",
|
| 3180 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",
|
| 3181 |
+
"integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg=="
|
| 3182 |
+
},
|
| 3183 |
"node_modules/@types/d3-timer": {
|
| 3184 |
"version": "3.0.2",
|
| 3185 |
"resolved": "https://registry.npmmirror.com/@types/d3-timer/-/d3-timer-3.0.2.tgz",
|
| 3186 |
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="
|
| 3187 |
},
|
| 3188 |
+
"node_modules/@types/d3-transition": {
|
| 3189 |
+
"version": "3.0.8",
|
| 3190 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-transition/-/d3-transition-3.0.8.tgz",
|
| 3191 |
+
"integrity": "sha512-ew63aJfQ/ms7QQ4X7pk5NxQ9fZH/z+i24ZfJ6tJSfqxJMrYLiK01EAs2/Rtw/JreGUsS3pLPNV644qXFGnoZNQ==",
|
| 3192 |
+
"dependencies": {
|
| 3193 |
+
"@types/d3-selection": "*"
|
| 3194 |
+
}
|
| 3195 |
+
},
|
| 3196 |
+
"node_modules/@types/d3-zoom": {
|
| 3197 |
+
"version": "3.0.8",
|
| 3198 |
+
"resolved": "https://registry.npmmirror.com/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",
|
| 3199 |
+
"integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",
|
| 3200 |
+
"dependencies": {
|
| 3201 |
+
"@types/d3-interpolate": "*",
|
| 3202 |
+
"@types/d3-selection": "*"
|
| 3203 |
+
}
|
| 3204 |
+
},
|
| 3205 |
"node_modules/@types/debug": {
|
| 3206 |
"version": "4.1.12",
|
| 3207 |
"resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz",
|
|
|
|
| 3243 |
"@types/estree": "*"
|
| 3244 |
}
|
| 3245 |
},
|
| 3246 |
+
"node_modules/@types/geojson": {
|
| 3247 |
+
"version": "7946.0.14",
|
| 3248 |
+
"resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.14.tgz",
|
| 3249 |
+
"integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg=="
|
| 3250 |
+
},
|
| 3251 |
"node_modules/@types/glob": {
|
| 3252 |
"version": "7.2.0",
|
| 3253 |
"resolved": "https://registry.npmmirror.com/@types/glob/-/glob-7.2.0.tgz",
|
|
|
|
| 6308 |
"node": ">= 0.4"
|
| 6309 |
}
|
| 6310 |
},
|
| 6311 |
+
"node_modules/classcat": {
|
| 6312 |
+
"version": "5.0.5",
|
| 6313 |
+
"resolved": "https://registry.npmmirror.com/classcat/-/classcat-5.0.5.tgz",
|
| 6314 |
+
"integrity": "sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w=="
|
| 6315 |
+
},
|
| 6316 |
"node_modules/classnames": {
|
| 6317 |
"version": "2.5.1",
|
| 6318 |
"resolved": "https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz",
|
|
|
|
| 7201 |
"node": ">=12"
|
| 7202 |
}
|
| 7203 |
},
|
| 7204 |
+
"node_modules/d3-dispatch": {
|
| 7205 |
+
"version": "3.0.1",
|
| 7206 |
+
"resolved": "https://registry.npmmirror.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz",
|
| 7207 |
+
"integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",
|
| 7208 |
+
"engines": {
|
| 7209 |
+
"node": ">=12"
|
| 7210 |
+
}
|
| 7211 |
+
},
|
| 7212 |
+
"node_modules/d3-drag": {
|
| 7213 |
+
"version": "3.0.0",
|
| 7214 |
+
"resolved": "https://registry.npmmirror.com/d3-drag/-/d3-drag-3.0.0.tgz",
|
| 7215 |
+
"integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",
|
| 7216 |
+
"dependencies": {
|
| 7217 |
+
"d3-dispatch": "1 - 3",
|
| 7218 |
+
"d3-selection": "3"
|
| 7219 |
+
},
|
| 7220 |
+
"engines": {
|
| 7221 |
+
"node": ">=12"
|
| 7222 |
+
}
|
| 7223 |
+
},
|
| 7224 |
"node_modules/d3-ease": {
|
| 7225 |
"version": "3.0.1",
|
| 7226 |
"resolved": "https://registry.npmmirror.com/d3-ease/-/d3-ease-3.0.1.tgz",
|
|
|
|
| 7287 |
"node": ">=12"
|
| 7288 |
}
|
| 7289 |
},
|
| 7290 |
+
"node_modules/d3-selection": {
|
| 7291 |
+
"version": "3.0.0",
|
| 7292 |
+
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
| 7293 |
+
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
|
| 7294 |
+
"engines": {
|
| 7295 |
+
"node": ">=12"
|
| 7296 |
+
}
|
| 7297 |
+
},
|
| 7298 |
"node_modules/d3-shape": {
|
| 7299 |
"version": "3.2.0",
|
| 7300 |
"resolved": "https://registry.npmmirror.com/d3-shape/-/d3-shape-3.2.0.tgz",
|
|
|
|
| 7347 |
"node": ">=12"
|
| 7348 |
}
|
| 7349 |
},
|
| 7350 |
+
"node_modules/d3-transition": {
|
| 7351 |
+
"version": "3.0.1",
|
| 7352 |
+
"resolved": "https://registry.npmmirror.com/d3-transition/-/d3-transition-3.0.1.tgz",
|
| 7353 |
+
"integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",
|
| 7354 |
+
"dependencies": {
|
| 7355 |
+
"d3-color": "1 - 3",
|
| 7356 |
+
"d3-dispatch": "1 - 3",
|
| 7357 |
+
"d3-ease": "1 - 3",
|
| 7358 |
+
"d3-interpolate": "1 - 3",
|
| 7359 |
+
"d3-timer": "1 - 3"
|
| 7360 |
+
},
|
| 7361 |
+
"engines": {
|
| 7362 |
+
"node": ">=12"
|
| 7363 |
+
},
|
| 7364 |
+
"peerDependencies": {
|
| 7365 |
+
"d3-selection": "2 - 3"
|
| 7366 |
+
}
|
| 7367 |
+
},
|
| 7368 |
+
"node_modules/d3-zoom": {
|
| 7369 |
+
"version": "3.0.0",
|
| 7370 |
+
"resolved": "https://registry.npmmirror.com/d3-zoom/-/d3-zoom-3.0.0.tgz",
|
| 7371 |
+
"integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",
|
| 7372 |
+
"dependencies": {
|
| 7373 |
+
"d3-dispatch": "1 - 3",
|
| 7374 |
+
"d3-drag": "2 - 3",
|
| 7375 |
+
"d3-interpolate": "1 - 3",
|
| 7376 |
+
"d3-selection": "2 - 3",
|
| 7377 |
+
"d3-transition": "2 - 3"
|
| 7378 |
+
},
|
| 7379 |
+
"engines": {
|
| 7380 |
+
"node": ">=12"
|
| 7381 |
+
}
|
| 7382 |
+
},
|
| 7383 |
"node_modules/data-uri-to-buffer": {
|
| 7384 |
"version": "4.0.1",
|
| 7385 |
"resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
|
|
|
| 15788 |
"lodash": "^4.0.1"
|
| 15789 |
}
|
| 15790 |
},
|
| 15791 |
+
"node_modules/reactflow": {
|
| 15792 |
+
"version": "11.11.2",
|
| 15793 |
+
"resolved": "https://registry.npmmirror.com/reactflow/-/reactflow-11.11.2.tgz",
|
| 15794 |
+
"integrity": "sha512-o1fT3stSdhzW+SedCGNSmEvZvULZygZIMLyW67NcWNZrgwx1wuJfzLg5fuQ0Nzf389wItumZX/zP3zdaPX7lEw==",
|
| 15795 |
+
"dependencies": {
|
| 15796 |
+
"@reactflow/background": "11.3.12",
|
| 15797 |
+
"@reactflow/controls": "11.2.12",
|
| 15798 |
+
"@reactflow/core": "11.11.2",
|
| 15799 |
+
"@reactflow/minimap": "11.7.12",
|
| 15800 |
+
"@reactflow/node-resizer": "2.2.12",
|
| 15801 |
+
"@reactflow/node-toolbar": "1.3.12"
|
| 15802 |
+
},
|
| 15803 |
+
"peerDependencies": {
|
| 15804 |
+
"react": ">=17",
|
| 15805 |
+
"react-dom": ">=17"
|
| 15806 |
+
}
|
| 15807 |
+
},
|
| 15808 |
"node_modules/read-pkg": {
|
| 15809 |
"version": "5.2.0",
|
| 15810 |
"resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz",
|
web/package.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
| 31 |
"react-pdf-highlighter": "^6.1.0",
|
| 32 |
"react-string-replace": "^1.1.1",
|
| 33 |
"react-syntax-highlighter": "^15.5.0",
|
|
|
|
| 34 |
"recharts": "^2.12.4",
|
| 35 |
"remark-gfm": "^4.0.0",
|
| 36 |
"umi": "^4.0.90",
|
|
|
|
| 31 |
"react-pdf-highlighter": "^6.1.0",
|
| 32 |
"react-string-replace": "^1.1.1",
|
| 33 |
"react-syntax-highlighter": "^15.5.0",
|
| 34 |
+
"reactflow": "^11.11.2",
|
| 35 |
"recharts": "^2.12.4",
|
| 36 |
"remark-gfm": "^4.0.0",
|
| 37 |
"umi": "^4.0.90",
|
web/src/pages/flow/canvas/index.tsx
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useCallback, useEffect, useState } from 'react';
|
| 2 |
+
import ReactFlow, {
|
| 3 |
+
Background,
|
| 4 |
+
Controls,
|
| 5 |
+
Edge,
|
| 6 |
+
Node,
|
| 7 |
+
OnConnect,
|
| 8 |
+
OnEdgesChange,
|
| 9 |
+
OnNodesChange,
|
| 10 |
+
addEdge,
|
| 11 |
+
applyEdgeChanges,
|
| 12 |
+
applyNodeChanges,
|
| 13 |
+
} from 'reactflow';
|
| 14 |
+
import 'reactflow/dist/style.css';
|
| 15 |
+
|
| 16 |
+
import { useHandleDrop } from '../hooks';
|
| 17 |
+
import { TextUpdaterNode } from './node';
|
| 18 |
+
|
| 19 |
+
const nodeTypes = { textUpdater: TextUpdaterNode };
|
| 20 |
+
|
| 21 |
+
const initialNodes = [
|
| 22 |
+
{
|
| 23 |
+
id: 'node-1',
|
| 24 |
+
type: 'textUpdater',
|
| 25 |
+
position: { x: 200, y: 50 },
|
| 26 |
+
data: { value: 123 },
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
id: '1',
|
| 30 |
+
data: { label: 'Hello' },
|
| 31 |
+
position: { x: 0, y: 0 },
|
| 32 |
+
type: 'input',
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
id: '2',
|
| 36 |
+
data: { label: 'World' },
|
| 37 |
+
position: { x: 100, y: 100 },
|
| 38 |
+
},
|
| 39 |
+
];
|
| 40 |
+
|
| 41 |
+
const initialEdges = [
|
| 42 |
+
{ id: '1-2', source: '1', target: '2', label: 'to the', type: 'step' },
|
| 43 |
+
];
|
| 44 |
+
|
| 45 |
+
function FlowCanvas() {
|
| 46 |
+
const [nodes, setNodes] = useState<Node[]>(initialNodes);
|
| 47 |
+
const [edges, setEdges] = useState<Edge[]>(initialEdges);
|
| 48 |
+
|
| 49 |
+
const onNodesChange: OnNodesChange = useCallback(
|
| 50 |
+
(changes) => setNodes((nds) => applyNodeChanges(changes, nds)),
|
| 51 |
+
[],
|
| 52 |
+
);
|
| 53 |
+
const onEdgesChange: OnEdgesChange = useCallback(
|
| 54 |
+
(changes) => setEdges((eds) => applyEdgeChanges(changes, eds)),
|
| 55 |
+
[],
|
| 56 |
+
);
|
| 57 |
+
|
| 58 |
+
const onConnect: OnConnect = useCallback(
|
| 59 |
+
(params) => setEdges((eds) => addEdge(params, eds)),
|
| 60 |
+
[],
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
const { handleDrop, allowDrop } = useHandleDrop(setNodes);
|
| 64 |
+
|
| 65 |
+
useEffect(() => {
|
| 66 |
+
console.info('nodes:', nodes);
|
| 67 |
+
console.info('edges:', edges);
|
| 68 |
+
}, [nodes, edges]);
|
| 69 |
+
|
| 70 |
+
return (
|
| 71 |
+
<div
|
| 72 |
+
style={{ height: '100%', width: '100%' }}
|
| 73 |
+
onDrop={handleDrop}
|
| 74 |
+
onDragOver={allowDrop}
|
| 75 |
+
>
|
| 76 |
+
<ReactFlow
|
| 77 |
+
nodes={nodes}
|
| 78 |
+
onNodesChange={onNodesChange}
|
| 79 |
+
edges={edges}
|
| 80 |
+
onEdgesChange={onEdgesChange}
|
| 81 |
+
// fitView
|
| 82 |
+
onConnect={onConnect}
|
| 83 |
+
nodeTypes={nodeTypes}
|
| 84 |
+
>
|
| 85 |
+
<Background />
|
| 86 |
+
<Controls />
|
| 87 |
+
</ReactFlow>
|
| 88 |
+
</div>
|
| 89 |
+
);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
export default FlowCanvas;
|
web/src/pages/flow/canvas/node/index.less
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.textUpdaterNode {
|
| 2 |
+
height: 50px;
|
| 3 |
+
border: 1px solid #eee;
|
| 4 |
+
padding: 5px;
|
| 5 |
+
border-radius: 5px;
|
| 6 |
+
background: white;
|
| 7 |
+
label {
|
| 8 |
+
display: block;
|
| 9 |
+
color: #777;
|
| 10 |
+
font-size: 12px;
|
| 11 |
+
}
|
| 12 |
+
}
|
web/src/pages/flow/canvas/node/index.tsx
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useCallback } from 'react';
|
| 2 |
+
import { Handle, NodeProps, Position } from 'reactflow';
|
| 3 |
+
|
| 4 |
+
import styles from './index.less';
|
| 5 |
+
|
| 6 |
+
const handleStyle = { left: 10 };
|
| 7 |
+
|
| 8 |
+
export function TextUpdaterNode({
|
| 9 |
+
data,
|
| 10 |
+
isConnectable = true,
|
| 11 |
+
}: NodeProps<{ value: number }>) {
|
| 12 |
+
const onChange = useCallback((evt) => {
|
| 13 |
+
console.log(evt.target.value);
|
| 14 |
+
}, []);
|
| 15 |
+
|
| 16 |
+
return (
|
| 17 |
+
<div className={styles.textUpdaterNode}>
|
| 18 |
+
<Handle
|
| 19 |
+
type="target"
|
| 20 |
+
position={Position.Top}
|
| 21 |
+
isConnectable={isConnectable}
|
| 22 |
+
/>
|
| 23 |
+
<Handle
|
| 24 |
+
type="source"
|
| 25 |
+
position={Position.Bottom}
|
| 26 |
+
// style={handleStyle}
|
| 27 |
+
isConnectable={isConnectable}
|
| 28 |
+
/>
|
| 29 |
+
<div>
|
| 30 |
+
<label htmlFor="text">Text:</label>
|
| 31 |
+
<input id="text" name="text" onChange={onChange} className="nodrag" />
|
| 32 |
+
</div>
|
| 33 |
+
{/* <Handle
|
| 34 |
+
type="source"
|
| 35 |
+
position={Position.Bottom}
|
| 36 |
+
id="b"
|
| 37 |
+
isConnectable={isConnectable}
|
| 38 |
+
/> */}
|
| 39 |
+
</div>
|
| 40 |
+
);
|
| 41 |
+
}
|
web/src/pages/flow/flow-sider/index.less
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.operatorCard {
|
| 2 |
+
:global(.ant-card-body) {
|
| 3 |
+
padding: 10px;
|
| 4 |
+
}
|
| 5 |
+
.cubeIcon {
|
| 6 |
+
&:hover {
|
| 7 |
+
cursor: pointer;
|
| 8 |
+
}
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
.siderContent {
|
| 13 |
+
padding: 10px 4px;
|
| 14 |
+
}
|
web/src/pages/flow/flow-sider/index.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Avatar, Card, Flex, Layout, Space } from 'antd';
|
| 2 |
+
import classNames from 'classnames';
|
| 3 |
+
import { useState } from 'react';
|
| 4 |
+
import { componentList } from '../mock';
|
| 5 |
+
|
| 6 |
+
import { useHandleDrag } from '../hooks';
|
| 7 |
+
import styles from './index.less';
|
| 8 |
+
|
| 9 |
+
const { Sider } = Layout;
|
| 10 |
+
|
| 11 |
+
const FlowSider = () => {
|
| 12 |
+
const [collapsed, setCollapsed] = useState(true);
|
| 13 |
+
const { handleDrag } = useHandleDrag();
|
| 14 |
+
|
| 15 |
+
return (
|
| 16 |
+
<Sider
|
| 17 |
+
collapsible
|
| 18 |
+
collapsed={collapsed}
|
| 19 |
+
collapsedWidth={0}
|
| 20 |
+
theme={'light'}
|
| 21 |
+
onCollapse={(value) => setCollapsed(value)}
|
| 22 |
+
>
|
| 23 |
+
<Flex vertical gap={10} className={styles.siderContent}>
|
| 24 |
+
{componentList.map((x) => (
|
| 25 |
+
<Card
|
| 26 |
+
key={x.name}
|
| 27 |
+
hoverable
|
| 28 |
+
draggable
|
| 29 |
+
className={classNames(styles.operatorCard)}
|
| 30 |
+
onDragStart={handleDrag(x.name)}
|
| 31 |
+
>
|
| 32 |
+
<Flex justify="space-between" align="center">
|
| 33 |
+
<Space size={15}>
|
| 34 |
+
<Avatar icon={x.icon} shape={'square'} />
|
| 35 |
+
<section>
|
| 36 |
+
<b>{x.name}</b>
|
| 37 |
+
<div>{x.description}</div>
|
| 38 |
+
</section>
|
| 39 |
+
</Space>
|
| 40 |
+
</Flex>
|
| 41 |
+
</Card>
|
| 42 |
+
))}
|
| 43 |
+
</Flex>
|
| 44 |
+
</Sider>
|
| 45 |
+
);
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
export default FlowSider;
|
web/src/pages/flow/hooks.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { Dispatch, SetStateAction, useCallback } from 'react';
|
| 2 |
+
import { Node } from 'reactflow';
|
| 3 |
+
|
| 4 |
+
export const useHandleDrag = () => {
|
| 5 |
+
const handleDrag = useCallback(
|
| 6 |
+
(operatorId: string) => (ev: React.DragEvent<HTMLDivElement>) => {
|
| 7 |
+
console.info(ev.clientX, ev.pageY);
|
| 8 |
+
ev.dataTransfer.setData('operatorId', operatorId);
|
| 9 |
+
ev.dataTransfer.setData('startClientX', ev.clientX.toString());
|
| 10 |
+
ev.dataTransfer.setData('startClientY', ev.clientY.toString());
|
| 11 |
+
},
|
| 12 |
+
[],
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
return { handleDrag };
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
export const useHandleDrop = (setNodes: Dispatch<SetStateAction<Node[]>>) => {
|
| 19 |
+
const allowDrop = (ev: React.DragEvent<HTMLDivElement>) => {
|
| 20 |
+
ev.preventDefault();
|
| 21 |
+
};
|
| 22 |
+
|
| 23 |
+
const handleDrop = useCallback(
|
| 24 |
+
(ev: React.DragEvent<HTMLDivElement>) => {
|
| 25 |
+
ev.preventDefault();
|
| 26 |
+
const operatorId = ev.dataTransfer.getData('operatorId');
|
| 27 |
+
const startClientX = ev.dataTransfer.getData('startClientX');
|
| 28 |
+
const startClientY = ev.dataTransfer.getData('startClientY');
|
| 29 |
+
console.info(operatorId);
|
| 30 |
+
console.info(ev.pageX, ev.pageY);
|
| 31 |
+
console.info(ev.clientX, ev.clientY);
|
| 32 |
+
console.info(ev.movementX, ev.movementY);
|
| 33 |
+
const x = ev.clientX - 200;
|
| 34 |
+
const y = ev.clientY - 72;
|
| 35 |
+
setNodes((pre) => {
|
| 36 |
+
return pre.concat({
|
| 37 |
+
id: operatorId,
|
| 38 |
+
position: { x, y },
|
| 39 |
+
data: { label: operatorId },
|
| 40 |
+
});
|
| 41 |
+
});
|
| 42 |
+
},
|
| 43 |
+
[setNodes],
|
| 44 |
+
);
|
| 45 |
+
|
| 46 |
+
return { handleDrop, allowDrop };
|
| 47 |
+
};
|
web/src/pages/flow/index.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Layout } from 'antd';
|
| 2 |
+
import FlowCanvas from './canvas';
|
| 3 |
+
import Sider from './flow-sider';
|
| 4 |
+
|
| 5 |
+
const { Content } = Layout;
|
| 6 |
+
|
| 7 |
+
function RagFlow() {
|
| 8 |
+
return (
|
| 9 |
+
<Layout style={{ minHeight: '100vh' }}>
|
| 10 |
+
<Sider></Sider>
|
| 11 |
+
<Layout>
|
| 12 |
+
<Content style={{ margin: '0 16px' }}>
|
| 13 |
+
<FlowCanvas></FlowCanvas>
|
| 14 |
+
</Content>
|
| 15 |
+
</Layout>
|
| 16 |
+
</Layout>
|
| 17 |
+
);
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
export default RagFlow;
|
web/src/pages/flow/mock.tsx
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {
|
| 2 |
+
MergeCellsOutlined,
|
| 3 |
+
RocketOutlined,
|
| 4 |
+
SendOutlined,
|
| 5 |
+
} from '@ant-design/icons';
|
| 6 |
+
|
| 7 |
+
export const componentList = [
|
| 8 |
+
{ name: 'Begin', icon: <SendOutlined />, description: '' },
|
| 9 |
+
{ name: 'Retrieval', icon: <RocketOutlined />, description: '' },
|
| 10 |
+
{ name: 'Generate', icon: <MergeCellsOutlined />, description: '' },
|
| 11 |
+
];
|
web/src/routes.ts
CHANGED
|
@@ -84,6 +84,10 @@ const routes = [
|
|
| 84 |
path: '/file',
|
| 85 |
component: '@/pages/file-manager',
|
| 86 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
],
|
| 88 |
},
|
| 89 |
{
|
|
|
|
| 84 |
path: '/file',
|
| 85 |
component: '@/pages/file-manager',
|
| 86 |
},
|
| 87 |
+
{
|
| 88 |
+
path: '/flow',
|
| 89 |
+
component: '@/pages/flow',
|
| 90 |
+
},
|
| 91 |
],
|
| 92 |
},
|
| 93 |
{
|