### What problem does this PR solve? Feat: Limit the iteration start node to only be the source node #4242 ### Type of change - [x] New Feature (non-breaking change which adds functionality)tags/nightly
| minus: 'Minus', | minus: 'Minus', | ||||
| semicolon: 'Semicolon', | semicolon: 'Semicolon', | ||||
| }, | }, | ||||
| addVariable: 'Add variable', | |||||
| variableSettings: 'Variable settings', | |||||
| globalVariables: 'Global variables', | |||||
| }, | }, | ||||
| footer: { | footer: { | ||||
| profile: 'All rights reserved @ React', | profile: 'All rights reserved @ React', |
| minus: '減號', | minus: '減號', | ||||
| semicolon: '分號', | semicolon: '分號', | ||||
| }, | }, | ||||
| addVariable: '新增變數', | |||||
| variableSettings: '變數設定', | |||||
| }, | }, | ||||
| footer: { | footer: { | ||||
| profile: '“保留所有權利 @ react”', | profile: '“保留所有權利 @ react”', |
| minus: '减号', | minus: '减号', | ||||
| semicolon: '分号', | semicolon: '分号', | ||||
| }, | }, | ||||
| addVariable: '新增变量', | |||||
| variableSettings: '变量设置', | |||||
| }, | }, | ||||
| footer: { | footer: { | ||||
| profile: 'All rights reserved @ React', | profile: 'All rights reserved @ React', |
| }; | }; | ||||
| // highlight the nodes that the workflow passes through | // highlight the nodes that the workflow passes through | ||||
| // const queryClient = useQueryClient(); | |||||
| // const flowDetail = queryClient.getQueryData<IFlow>(['flowDetail']); | |||||
| const { data: flowDetail } = useFetchFlow(); | const { data: flowDetail } = useFetchFlow(); | ||||
| const graphPath = useMemo(() => { | const graphPath = useMemo(() => { |
| isConnectable={isConnectable} | isConnectable={isConnectable} | ||||
| className={styles.handle} | className={styles.handle} | ||||
| style={RightHandleStyle} | style={RightHandleStyle} | ||||
| isConnectableEnd={false} | |||||
| ></Handle> | ></Handle> | ||||
| <div> | <div> | ||||
| <ListRestart className="size-7" /> | <ListRestart className="size-7" /> |
| import { Form, Input, Modal, Select, Switch } from 'antd'; | import { Form, Input, Modal, Select, Switch } from 'antd'; | ||||
| import { DefaultOptionType } from 'antd/es/select'; | import { DefaultOptionType } from 'antd/es/select'; | ||||
| import { useEffect, useMemo } from 'react'; | import { useEffect, useMemo } from 'react'; | ||||
| import { useTranslation } from 'react-i18next'; | |||||
| import { BeginQueryType, BeginQueryTypeIconMap } from '../../constant'; | import { BeginQueryType, BeginQueryTypeIconMap } from '../../constant'; | ||||
| import { BeginQuery } from '../../interface'; | import { BeginQuery } from '../../interface'; | ||||
| import BeginDynamicOptions from './begin-dynamic-options'; | import BeginDynamicOptions from './begin-dynamic-options'; | ||||
| initialValue: BeginQuery; | initialValue: BeginQuery; | ||||
| otherThanCurrentQuery: BeginQuery[]; | otherThanCurrentQuery: BeginQuery[]; | ||||
| }) => { | }) => { | ||||
| const { t } = useTranslation(); | |||||
| const [form] = Form.useForm(); | const [form] = Form.useForm(); | ||||
| const options = useMemo(() => { | const options = useMemo(() => { | ||||
| return Object.values(BeginQueryType).reduce<DefaultOptionType[]>( | return Object.values(BeginQueryType).reduce<DefaultOptionType[]>( | ||||
| return ( | return ( | ||||
| <Modal | <Modal | ||||
| title="Begin query" | |||||
| title={t('flow.variableSettings')} | |||||
| open={visible} | open={visible} | ||||
| onOk={onOk} | onOk={onOk} | ||||
| onCancel={hideModal} | onCancel={hideModal} |
| icon={<PlusOutlined />} | icon={<PlusOutlined />} | ||||
| className={styles.addButton} | className={styles.addButton} | ||||
| > | > | ||||
| {t('flow.addItem')} | |||||
| {t('flow.addVariable')} | |||||
| </Button> | </Button> | ||||
| </Form.Item> | </Form.Item> | ||||
| </> | </> |