import { Flow, FlowNodeType } from '@toy-box/flow-graph'; import { IFieldMeta, IFieldGroupMeta } from '@toy-box/meta-schema'; import { FlowGraphMeta, FlowMetaType, FlowMetaParam, IFlowResourceType, FlowType } from '../types'; import { FlowStart, FlowAssignment, FlowDecision, FlowLoop, FlowSortCollectionProcessor, FlowSuspend, RecordCreate, RecordUpdate, RecordDelete, RecordLookup } from './index'; import { History } from './History'; export interface NodeProps { id: string; width: number; height: number; type: FlowNodeType; label?: string; targets?: string[]; decisionEndTarget?: string; loopBackTarget?: string; loopEndTarget?: string; component?: string; onClick?: () => void; } export declare enum MetaFieldType { EDIT = "EDIT", ADD = "ADD", REMOVE = "REMOVE", INIT = "INIT" } export declare enum FlowModeEnum { EDIT = "edit", READ = "read" } export declare type FlowModeType = FlowModeEnum.EDIT | FlowModeEnum.READ; export interface FlowMetaParamOfType extends FlowMetaParam { flowType: FlowMetaType; } export declare class AutoFlow { id: string; disposers: (() => void)[]; initialMeta: FlowGraphMeta; flowNodes: NodeProps[]; metaFlowDatas: FlowMetaParamOfType[]; mataFlowJson: FlowGraphMeta; flowGraph: Flow; flowEndId: string; flowStart: FlowStart; flowAssignments: FlowAssignment[]; flowDecisions: FlowDecision[]; flowLoops: FlowLoop[]; flowSortCollections: FlowSortCollectionProcessor[]; flowSuspends: FlowSuspend[]; recordCreates: RecordCreate[]; recordUpdates: RecordUpdate[]; recordDeletes: RecordDelete[]; recordLookups: RecordLookup[]; flowConstants: IFieldMeta[]; flowFormulas: IFieldMeta[]; flowTemplates: IFieldMeta[]; flowVariables: IFieldMeta[]; history: History; registers: any[]; mode: FlowModeType; flowType: FlowType; isEdit: boolean | undefined; constructor(autoFlowMeta: FlowGraphMeta, flowType: FlowType, mode?: FlowModeType); protected makeObservable(): void; setId: (id: string) => void; initRegisters(data: any[]): void; editFlowData: (nodeId: string, metaType: FlowMetaType, flowData: FlowMetaParam) => void; removeFlowData: (nodeId: string, metaType: FlowMetaType, flowData: FlowMetaParam) => void; removeFlowDataFunc: (nodeId: string, metaType: FlowMetaType, flowData: FlowMetaParam, flag?: boolean | undefined, fork?: FlowMetaParam | undefined) => void; updateInitialMeta: (nodeId: string, metaType: FlowMetaType, flowData: FlowMetaParam) => void; updataFlowMetaData: (flowNode: NodeProps | undefined, metaType: FlowMetaType, flowData: FlowMetaParam, currentUpdataData?: FlowMetaParam | undefined) => void; nextTargetFork: (flowData: any, nodeId: string, flowType: FlowMetaType, connectorId?: string | undefined) => void; nextFork: (targetReference: string, connectorId: string, nodeId: string, flowType: FlowMetaType) => void; updataCurrentFlowData: (meta: FlowMetaParamOfType, data: FlowMetaParam, metaType: FlowMetaType, loopBack?: boolean | undefined) => void; onInit: () => void; initMetaFields: (metaType: string, flowData: FlowMetaParam | any, metaFieldType?: MetaFieldType | undefined, nodeId?: string | undefined) => void; addFlowMeta: (metaType: IFlowResourceType, flowMeta: IFieldMeta) => void; editFlowMeta: (metaType: IFlowResourceType, flowMeta: IFieldMeta, quoteId: string) => void; get fieldMetas(): IFieldGroupMeta[]; getFieldMetas: (fieldMetaType?: IFlowResourceType | undefined) => IFieldGroupMeta[]; setFieldMeta: (fieldMetas: IFieldGroupMeta[], fieldMeta: IFieldMeta, type: IFlowResourceType, fieldMetaType?: IFlowResourceType | undefined) => IFieldGroupMeta[]; filterFieldMetas: (templateObj: any, fieldMetas: IFieldGroupMeta[], meta: IFieldMeta, idx: number, type: IFlowResourceType) => IFieldGroupMeta[]; get formulaMap(): Record; getFormulaMap: (formulaMeta: Record, meta: IFieldMeta, isGlobal?: string | undefined) => Record & { [x: string]: { key: string; name: string; type: string; properties: {}; }; }; setFlowData: (flowDatas: any[], target?: FlowMetaParamOfType | undefined, forkData?: FlowMetaParamOfType | undefined) => void; getFlowData: (flowDatas: any[], target?: FlowMetaParamOfType | undefined, forkData?: FlowMetaParamOfType | undefined) => void; filterFlowData: (targetReference: string, flowDatas: any[], flowData: any, forkData?: FlowMetaParamOfType | undefined) => void; initFlowNodes(metaType: FlowMetaType, flowData: FlowMetaParam, flowNode?: NodeProps, fork?: FlowMetaParam): void; setStarts(flowData: FlowMetaParam): void; setDecisions(flowData: FlowMetaParam, metaType: FlowMetaType, loopBackNode: NodeProps | undefined, loopLastData?: NodeProps, fork?: FlowMetaParam): void; getLoopBackId(flowData: FlowMetaParam, targetReference: any): string | null; setLoops(flowData: FlowMetaParam, loopBackNode: NodeProps | undefined, loopLastData?: NodeProps, fork?: FlowMetaParam): void; setBaseInfos(targetNode: FlowMetaParam, metaType: FlowMetaType, loopBackNode: NodeProps | undefined, loopLastData?: NodeProps, fork?: FlowMetaParam): void; loopBackNode(targetNode: FlowMetaParam, flowNode?: NodeProps): NodeProps | undefined; }