/** @jsx jsx */ /** @jsxFrag React.Fragment */ /** * It is a legacy design for wrapping the model * The new design is to use the useModel / useState hook. * This legacy design is still used in many places of the codes */ import { Elements } from 'react-flow-renderer'; import { MMELModel } from '../serialize/interface/model'; import { EditorModel, ModelType } from './editormodel'; import { MapResultType } from '../utils/map/MappingCalculator'; import { MapSet } from './mapmodel'; import React from 'react'; import { SerializedStyles } from '@emotion/react'; import { MMELRepo, RepoIndex } from './repo'; import { EditorViewOption } from './States'; /** * The wrapper contains the model and which page it is viewing */ export interface ModelWrapper { model: EditorModel; page: string; type: 'model'; } export declare function createEditorModelWrapper(m: MMELModel): ModelWrapper; export declare function MMELToEditorModel(m: MMELModel): EditorModel; /** * Convert the model to the list of nodes for React Flow. For editor. */ export declare function getEditorReactFlowElementsFrom(page: string, model: EditorModel, index: RepoIndex, view: EditorViewOption, onProcessClick: (pageid: string, processid: string) => void, removeEdge: (id: string) => void, getStyleById: (id: string) => SerializedStyles, getSVGColorById: (id: string) => string, addComment: (msg: string, pid: string, parent?: string) => void, toggleCommentResolved: (cid: string) => void, deleteComment: (cid: string, pid: string, parent?: string) => void): Elements; /** * Convert the model wrapper to the list of nodes for React Flow. For the reference model in the editor */ export declare function getEditorReferenceFlowElementsFrom(mw: ModelWrapper, index: RepoIndex, dvisible: boolean, onProcessClick: (pageid: string, processid: string) => void, getStyleById: (id: string) => SerializedStyles, getSVGColorById: (id: string) => string, idVisible: boolean, goToNextModel: (x: MMELRepo) => void): Elements; /** * Convert the model wrapper to the list of nodes for React Flow. For model viewer */ export declare function getViewerReactFlowElementsFrom(mw: ModelWrapper, index: RepoIndex, dvisible: boolean, onProcessClick: (pageid: string, processid: string) => void, getStyleById: (id: string) => SerializedStyles, getSVGColorById: (id: string) => string, idVisible: boolean, goToNextModel: (x: MMELRepo) => void, ComponentDesc?: React.FC<{ id: string; }>, NodeAddon?: React.FC<{ id: string; }>, getEdgeColor?: (id: string) => string, isAnimated?: (id: string) => boolean, ViewStartEndComponentDesc?: React.FC<{ id: string; }>): Elements; /** * Convert the model wrapper to the list of nodes for React Flow. For the model workspace */ export declare function getActionReactFlowElementsFrom(mw: ModelWrapper, index: RepoIndex, dvisible: boolean, onProcessClick: (pageid: string, processid: string) => void, getStyleById: (id: string) => SerializedStyles, getSVGColorById: (id: string) => string, onDataWorkspaceActive: (id: string) => void, idVisible: boolean): Elements; /** * Convert the model wrapper to the list of nodes for React Flow. For the model mapper */ export declare function getMapperReactFlowElementsFrom(mw: ModelWrapper, index: RepoIndex, type: ModelType, dvisible: boolean, onProcessClick: (pageid: string, processid: string) => void, setMapping: (fromid: string, toid: string) => void, mapSet: MapSet, diffMapSet: MapSet | undefined, mapResult: MapResultType, diffMapResult: MapResultType | undefined, setSelectedId: (id: string) => void, isParentFull: boolean, isDiffParentFull: boolean | undefined, ComponentShortDescription: React.FC<{ id: string; }>, MappingList: React.FC<{ id: string; }>, idVisible: boolean, goToNextModel?: (x: MMELRepo) => void): Elements; //# sourceMappingURL=modelwrapper.d.ts.map