{nodeLibrary.map((category, categoryIndex) => {
const filteredNodes = category.nodes.filter(nodeType =>
- nodeType.type !== 'start' && nodeType.type !== 'end' && nodeType.type !== 'loop' && nodeType.type !== 'cycle-start'
+ nodeType.type !== 'start' && nodeType.type !== 'end' && nodeType.type !== 'iteration' && nodeType.type !== 'loop' && nodeType.type !== 'cycle-start'
);
if (filteredNodes.length === 0) return null;
diff --git a/web/src/views/Workflow/components/Nodes/LoopNode.tsx b/web/src/views/Workflow/components/Nodes/LoopNode.tsx
index dac91b68..40b4b8ec 100644
--- a/web/src/views/Workflow/components/Nodes/LoopNode.tsx
+++ b/web/src/views/Workflow/components/Nodes/LoopNode.tsx
@@ -33,7 +33,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
y: cycleStartBBox.y,
data: {
type: 'add-node',
- label: '添加节点',
+ label: t('workflow.addNode'),
icon: '+',
parentId: node.id,
cycle: data.id,
@@ -61,7 +61,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
},
},
},
- zIndex: 3
+ zIndex: 10
});
}
}
@@ -97,7 +97,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
y: centerY,
data: {
type: 'add-node',
- label: '添加节点',
+ label: t('workflow.addNode'),
icon: '+',
parentId: node.id,
cycle: data.id,
@@ -128,7 +128,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
},
},
},
- zIndex: 3
+ zIndex: 10
}
graph.addEdge(edgeConfig)
diff --git a/web/src/views/Workflow/components/PortClickHandler.tsx b/web/src/views/Workflow/components/PortClickHandler.tsx
index 9a644438..9d9225e8 100644
--- a/web/src/views/Workflow/components/PortClickHandler.tsx
+++ b/web/src/views/Workflow/components/PortClickHandler.tsx
@@ -151,11 +151,11 @@ const PortClickHandler: React.FC
= ({ graph }) => {
let filteredNodes;
if (isChildOfLoop) {
- // Use same filtering as AddNode for child nodes of loop
+ // Use same filtering as AddNode for child nodes of loop, but allow break
filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'loop', 'cycle-start', 'iteration'].includes(nodeType.type));
} else if (isChildOfIteration) {
- // Filter out loop and iteration nodes for children of iteration nodes
- filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'loop', 'break', 'cycle-start', 'iteration'].includes(nodeType.type));
+ // Filter out loop and iteration nodes for children of iteration nodes, but allow break
+ filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'loop', 'cycle-start', 'iteration'].includes(nodeType.type));
} else {
// Original filtering for non-loop child nodes
filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'break', 'cycle-start'].includes(nodeType.type));
diff --git a/web/src/views/Workflow/components/Properties/AssignmentList/index.tsx b/web/src/views/Workflow/components/Properties/AssignmentList/index.tsx
index 97f28668..494e4342 100644
--- a/web/src/views/Workflow/components/Properties/AssignmentList/index.tsx
+++ b/web/src/views/Workflow/components/Properties/AssignmentList/index.tsx
@@ -60,7 +60,7 @@ const AssignmentList: FC = ({
>
vo.nodeData.type === 'loop' || vo.value.includes('conv.'))}
popupMatchSelectWidth={false}
onChange={() => {
form.setFieldValue([parentName, name, 'operation'], undefined);
diff --git a/web/src/views/Workflow/components/Properties/CategoryList/index.tsx b/web/src/views/Workflow/components/Properties/CategoryList/index.tsx
index 69ed2030..6fa47421 100644
--- a/web/src/views/Workflow/components/Properties/CategoryList/index.tsx
+++ b/web/src/views/Workflow/components/Properties/CategoryList/index.tsx
@@ -1,17 +1,19 @@
import { type FC } from 'react';
import { useTranslation } from 'react-i18next';
-import { Input, Button, Form, Space } from 'antd';
-import { PlusOutlined, CopyOutlined, DeleteOutlined, ExpandOutlined } from '@ant-design/icons';
+import { Button, Form, Space } from 'antd';
+import { DeleteOutlined } from '@ant-design/icons';
import { Graph, Node } from '@antv/x6';
-import type { PortMetadata } from '@antv/x6/lib/model/port';
+import Editor from '../../Editor';
+import type { Suggestion } from '../../Editor/plugin/AutocompletePlugin'
interface CategoryListProps {
parentName: string;
+ options: Suggestion[];
selectedNode?: Node | null;
graphRef?: React.MutableRefObject;
}
-const CategoryList: FC = ({ parentName, selectedNode, graphRef }) => {
+const CategoryList: FC = ({ parentName, selectedNode, graphRef, options }) => {
const { t } = useTranslation();
const form = Form.useFormInstance();
const formValues = Form.useWatch([parentName], form);
@@ -167,9 +169,9 @@ const CategoryList: FC = ({ parentName, selectedNode, graphRe
name={[name, 'class_name']}
noStyle
>
-
diff --git a/web/src/views/Workflow/components/Properties/ConditionList/index.tsx b/web/src/views/Workflow/components/Properties/ConditionList/index.tsx
index 8fbebeda..d809fec5 100644
--- a/web/src/views/Workflow/components/Properties/ConditionList/index.tsx
+++ b/web/src/views/Workflow/components/Properties/ConditionList/index.tsx
@@ -1,6 +1,6 @@
import { type FC } from 'react'
import { useTranslation } from 'react-i18next';
-import { Form, Button, Select, Row, Col, InputNumber, Radio, type SelectProps } from 'antd'
+import { Form, Button, Select, Row, Col, InputNumber, Radio, Input, type SelectProps } from 'antd'
import { DeleteOutlined } from '@ant-design/icons';
import type { Suggestion } from '../../Editor/plugin/AutocompletePlugin'
@@ -114,7 +114,7 @@ const ConditionList: FC