feat(GenericNode): add position prop to GenericNode component to pass the position of the node
fix(nodeToolbarComponent): import updateFlowPosition from reactflowUtils to fix reference error
feat(nodeToolbarComponent): add position prop to NodeToolbarComponent to pass the position of the node
fix(components): import XYPosition from reactflow to fix type error
feat(components): add position prop to nodeToolbarPropsType to pass the position of the node
feat(reactflowUtils): add expandGroupNode function to expand a group node and update the flow
The property name `display_name` was incorrectly used instead of `name` in the template rendering logic. This has been fixed to correctly display the name of the template parameter.
feat(utils/reactflowUtils): add 'toTitleCase' function to convert strings to title case
refactor(utils/reactflowUtils): update function names and comments
refactor(utils/reactflowUtils): update 'updateGroupNodeTemplate' function to handle 'dynamic' property
refactor(utils/reactflowUtils): update 'mergeNodeTemplates' function to handle 'display_name' and 'dynamic' properties
refactor(utils/reactflowUtils): update 'isHandleConnected' function to handle 'proxy' property
refactor(utils/reactflowUtils): update 'generateNodeFromFlow' function to set 'type' as 'genericNode' instead of 'groupNode'
feat(PageComponent/index.tsx): add functionality to generate a new flow and node from a selection and update the nodes and edges accordingly
feat(PageComponent/index.tsx): add validation for selection and display error message if selection is invalid
feat(SelectionMenuComponent): create SelectionMenu component to display a toolbar with a "Group" button for node selection
fix(styleUtils): import Group icon from lucide-react to use in SelectionMenuComponent
The `connectedInputNodesOnHandle` function is added to retrieve the nodes connected to the input handle of a given node. It takes the `nodeId`, `handleId`, `nodes`, and `edges` as parameters and returns an array of connected nodes.
The `ungroupNode` function is added to ungroup a group node. It takes the `groupNode` and `BaseFlow` as parameters and updates the edges and nodes in the `BaseFlow` to redirect the edges to the correct proxy node.
The `processFLow` function is added to process the flow object recursively. It clones the flow object and iterates through the nodes to ungroup any group nodes and update the edges and nodes accordingly.
Note: No newline at the end of the file.
fix(utils/reactflowUtils.ts): import TemplateVariableType from types/api
feat(utils/reactflowUtils.ts): add mergeNodeTemplates function to merge node templates and update display names
feat(utils/reactflowUtils.ts): add isHandleConnected function to check if a handle is connected to an edge
refactor(utils/reactflowUtils.ts): remove TODO comments and update comments for mergeNodeTemplates and isHandleConnected functions
feat(utils/reactflowUtils.ts): add generateNodeTemplate function to generate node templates from a flow
feat(reactflowUtils.ts): add function to update group node template to set visibility of basic types to advanced true
feat(reactflowUtils.ts): add function to generate node template for group node based on flow data
feat(reactflowUtils.ts): add function to generate node from flow data
feat(reactflowUtils.ts): add concatFlows function to concatenate nodes and edges from a FlowType object to a ReactFlowInstance
feat(reactflowUtils.ts): add generateNodeFromFlow function to generate a NodeType object from a FlowType object
feat(reactflowUtils.ts): add filterFlow function to filter out selected nodes and edges from the flow
feat(reactflowUtils.ts): add updateFlowPosition function to update the position of nodes in the flow based on a new position
fix(reactflowUtils.ts): fix return type of generateFlow function to use generateFlowType type instead of inline type definition
The getMiddlePoint function calculates the average position of multiple nodes by summing up the x and y coordinates of each node and dividing them by the total number of nodes. This allows us to find the middle point or center of a group of nodes. This function can be used to determine the position of a new node based on the average position of existing nodes.
This pull request introduces a series of enhancements to our recently
revamped login page, streamlining the user experience. These changes
were meticulously designed and developed to ensure a seamless login
process for our users while adhering to the highest standards of
usability and privacy.
🐛 fix(validate.py): set frontend_node to None instead of an empty dictionary in post_validate_prompt function to align with the default value in ValidatePromptRequest class