Merge branch 'dev' into bugfix-eventprop
This commit is contained in:
commit
75e25ad67f
2 changed files with 10 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { Connection, ReactFlowInstance } from "reactflow";
|
import { Connection, Edge, ReactFlowInstance } from "reactflow";
|
||||||
import { APITemplateType } from "../types/api";
|
import { APITemplateType } from "../types/api";
|
||||||
import { FlowType, NodeType } from "../types/flow";
|
import { FlowType, NodeType } from "../types/flow";
|
||||||
import { cleanEdgesType } from "../types/utils/reactflowUtils";
|
import { cleanEdgesType } from "../types/utils/reactflowUtils";
|
||||||
|
|
@ -240,3 +240,12 @@ export function handleKeyDown(e: React.KeyboardEvent<HTMLInputElement>, inputVal
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function getConnectedNodes(
|
||||||
|
edge: Edge,
|
||||||
|
nodes: Array<NodeType>
|
||||||
|
): Array<NodeType> {
|
||||||
|
const sourceId = edge.source;
|
||||||
|
const targetId = edge.target;
|
||||||
|
return nodes.filter((node) => node.id === targetId || node.id === sourceId);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ import {
|
||||||
XCircle,
|
XCircle,
|
||||||
Zap,
|
Zap,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { Edge, Node } from "reactflow";
|
|
||||||
import { AirbyteIcon } from "../icons/Airbyte";
|
import { AirbyteIcon } from "../icons/Airbyte";
|
||||||
import { AnthropicIcon } from "../icons/Anthropic";
|
import { AnthropicIcon } from "../icons/Anthropic";
|
||||||
import { BingIcon } from "../icons/Bing";
|
import { BingIcon } from "../icons/Bing";
|
||||||
|
|
@ -277,8 +276,3 @@ export const nodeIconsLucide = {
|
||||||
MessageSquare,
|
MessageSquare,
|
||||||
MoreHorizontal,
|
MoreHorizontal,
|
||||||
};
|
};
|
||||||
export function getConnectedNodes(edge: Edge, nodes: Array<Node>): Array<Node> {
|
|
||||||
const sourceId = edge.source;
|
|
||||||
const targetId = edge.target;
|
|
||||||
return nodes.filter((node) => node.id === targetId || node.id === sourceId);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue