/** Angular2 */ import * as ng from "@angular/core"; /** Joint */ import * as joint from "jointjs"; /** * Model */ export interface NodeEditorModel { nodes: NodeEditorNode[]; links: NodeEditorLink[]; zoom?: number; pan?: NodeEditorPoint; } /** * Node */ export interface NodeEditorNode { id: string; position: NodeEditorPoint; component: ng.Type | string; componentModule: ng.Type | string; componentInputs?: any; componentOutputs?: any; portHolderClass: string; ports: NodeEditorNodePort[]; selected: boolean; tag?: any; } /** * Port */ export interface NodeEditorNodePort { id: string; type: NodeEditorPortType; } /** * Port type */ export declare enum NodeEditorPortType { In = 0, Out = 1 } /** * Link joint */ export interface NodeEditorLinkJoint { id: string; port: string; } /** * Link info */ export interface NodeEditorLinkInfo { properties: NodeEditorLinkInfoProperty[]; } /** * Link info property */ export interface NodeEditorLinkInfoProperty { label: string; value: string | string[]; } /** * Link menu options */ export interface NodeEditorLinkOption { id: string; iconClass: string; label: string; } /** * Node editor point */ export interface NodeEditorPoint { x: number; y: number; } /** * Link */ export interface NodeEditorLink { id: string; source: NodeEditorLinkJoint; target: NodeEditorLinkJoint; vertices?: NodeEditorPoint[]; icon?: string; menuOptions?: NodeEditorLinkOption[]; info?: NodeEditorLinkInfo; tag?: any; } /** * Layout options */ export declare type NodeEditorLayoutOptions = joint.layout.LayoutOptions; export interface NodeEditorGridLayoutOptionsNodePosition { nodeId: string; position: NodeEditorPoint; } /** * Grid Layout options */ export interface NodeEditorGridLayoutOptions { maxNodeWidth: number; maxNodeHeight: number; nodePositions: NodeEditorGridLayoutOptionsNodePosition[]; }