import type { NsGraph } from '@antv/xflow-core'; import type React from 'react'; import { IProps as TreeNodeProps } from '../canvas-node-tree-panel/interface'; /** 自定义节点 */ export interface ICustomNode { name: string; component: NsGraph.INodeRender; popover?: React.Component; label?: string; width?: number; height?: number; ports?: NsGraph.INodeConfig['ports']; } export interface IProps extends TreeNodeProps { show?: boolean; showHeader?: boolean; registerNode?: { title?: string; nodes: ICustomNode[]; }; defaultActiveKey?: string[]; } export declare type FlowchartNodePanelProps = IProps; /** tree node model */ export interface ITreeNode { /** * The type of the menu item. */ readonly id: string | 'root'; /** * The parent menu id of the menu item. */ readonly parentId: string; /** * The display label for the menu item. */ readonly label: string; /** * The parent menu id of the menu item. */ isDirectory?: boolean; /** * The parent menu id of the menu item. */ isLeaf?: boolean; /** * The submenu for a `'submenu'` type item. */ children?: ITreeNode[]; /** *fieldName */ [fieldName: string]: any; } export interface IOnFolderExpand { (keys: string[]): void; } export declare namespace NsTreePanelData { const id = "TREE_PANEL_DATA"; interface IState { treeNodeList: ITreeNode[]; treeData: ITreeNode[]; expandedKeys: string[]; defaultExpandAll: boolean; keyword: string; searchList: ITreeNode[]; } }