/** * React Flow is used to render the graph structure of the model * Nodes / Edges in React Flow can carry a payload. * This file defines the data structure of this payload */ import { XYPosition } from 'react-flow-renderer'; import { MMELEdge } from '../serialize/interface/flowcontrolinterface'; import { EditorModel, EditorNode, ModelType } from './editormodel'; import { MMELComment, MMELFigure, MMELLink, MMELRole, MMELTable } from '../serialize/interface/supportinterface'; import { SerializedStyles } from '@emotion/react'; import React from 'react'; import { MMELRepo, RepoIndex } from './repo'; export interface EdgeContainer { id: string; source: string; target: string; type: string; data: EdgePackage; animated: boolean; } export interface EdgePackage { id: string; condition: string; removeEdge: (id: string) => void; getColor?: (id: string) => string; } export interface DataLinkContainer { id: string; source: string; target: string; data: DataLinkNodeData; type: string; animated: boolean; } export interface DataLinkNodeData { isLinkBetweenData: boolean; } export declare type EditorNodeWithInfoCallback = EditorNode & NodeCallBack; export interface NodeCallBack { modelType: ModelType; index: RepoIndex; idVisible: boolean; commentVisible: boolean; onProcessClick: (pageid: string, processid: string) => void; getRoleById: (id: string) => MMELRole | null; getTableById: (id: string) => MMELTable | undefined; getFigById: (id: string) => MMELFigure | undefined; getLinkById: (id: string) => MMELLink | undefined; getCommentById: (id: string) => MMELComment | undefined; setMapping: (fromid: string, toid: string) => void; getStyleClassById?: (id: string) => SerializedStyles; getSVGColorById?: (id: string) => string; setSelectedId?: (id: string) => void; hasMapping?: (id: string) => boolean; ComponentShortDescription?: React.FC<{ id: string; }>; StartEndShortDescription?: React.FC<{ id: string; }>; MappingList?: React.FC<{ id: string; }>; onDataWorkspaceActive?: (id: string) => void; NodeAddon?: React.FC<{ id: string; }>; goToNextModel?: (x: MMELRepo) => void; addComment?: (msg: string, pid: string, parent?: string) => void; toggleCommentResolved?: (cid: string) => void; deleteComment?: (cid: string, pid: string, parent?: string) => void; } export interface NodeContainer { id: string; data: EditorNodeWithInfoCallback; type: string; position: XYPosition; } export declare function createEdgeContainer(e: MMELEdge, isDelete?: boolean, removeEdge?: (id: string) => void, getEdgeColor?: (id: string) => string, isAnimated?: (id: string) => boolean): EdgeContainer; export declare function createDataLinkContainer(s: EditorNode, t: EditorNode): DataLinkContainer; export declare function createNodeContainer(x: EditorNode, pos: { x: number; y: number; }, callback: NodeCallBack): NodeContainer; export declare function getEditorNodeCallBack(props: { type: ModelType; model: EditorModel; index: RepoIndex; onProcessClick: (pageid: string, processid: string) => void; setMapping?: (fromid: string, toid: string) => void; getStyleClassById?: (id: string) => SerializedStyles; setSelectedId?: (id: string) => void; hasMapping?: (id: string) => boolean; ComponentShortDescription?: React.FC<{ id: string; }>; ViewStartEndComponentDesc?: React.FC<{ id: string; }>; MappingList?: React.FC<{ id: string; }>; getSVGColorById?: (id: string) => string; onDataWorkspaceActive?: (id: string) => void; NodeAddon?: React.FC<{ id: string; }>; isEditMode?: boolean; idVisible: boolean; commentVisible?: boolean; goToNextModel?: (x: MMELRepo) => void; addComment?: (msg: string, pid: string, parent?: string) => void; toggleCommentResolved?: (cid: string) => void; deleteComment?: (cid: string, pid: string, parent?: string) => void; }): NodeCallBack; //# sourceMappingURL=FlowContainer.d.ts.map