feat: Build the positions of the Switch handle #1739 (#2018)

### What problem does this PR solve?

feat: Build the positions of the Switch handle #1739

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-20 16:08:53 +08:00
committed by GitHub
parent 6f438e0a49
commit 02985fc905
5 changed files with 119 additions and 36 deletions

View File

@ -64,11 +64,34 @@ export interface IRelevantForm extends IGenerateForm {
no: string;
}
interface Condition {
items: Item[];
logical_operator: string;
to: string;
}
interface Item {
cpn_id: string;
operator: string;
value: string;
}
export interface ISwitchForm {
conditions: Condition[];
end_cpn_id: string;
no: string;
}
export type NodeData = {
label: string; // operator type
name: string; // operator name
color: string;
form: IBeginForm | IRetrievalForm | IGenerateForm | ICategorizeForm;
form:
| IBeginForm
| IRetrievalForm
| IGenerateForm
| ICategorizeForm
| ISwitchForm;
};
export type IPosition = { top: number; right: number; idx: number };