import { ReactNode } from "react"; export type Color = 'success' | 'process' | 'danger' | 'warning' | 'cyan' | 'purple'; export declare const NodeColor: { success: { stroke: string; fill: string; }; process: { stroke: string; fill: string; strokeDasharray: string; }; danger: { stroke: string; fill: string; }; warning: { stroke: string; fill: string; }; cyan: { stroke: string; fill: string; }; purple: { stroke: string; fill: string; }; }; export type NodeType = { /** * @description 设计器数据xml */ data: string; /** * 激活节点 */ activeNode: string[]; /** * 执行节点 */ executeNode: string[]; }; export interface EasyFlowableViewer { /** * @description 画布字符串 * @default */ data?: string; /** * @description 异步获取画布xml */ request?: () => Promise; /** * @description 设计器高度(屏幕可视高度) * @default 60 */ height?: number; /** * @description 显示模式,read为单显示为设计器样式,active为流程动态 * @default read */ mode?: 'read' | 'active'; /** * @description 流程模式 */ active?: { /** * @description 当前激活的节点 */ activeNode?: string[]; /** * @description 激活节点样式 */ activeColor?: Color; /** * @description 已完成节点 */ executeNode?: string[]; /** * @description 已完成节点样式 */ executeColor?: Color; }; /** * @description 排除节点;类型,如果添加点击节点将不会弹出框 */ excludeType?: string[]; /** * @description 点击事件 * @param id 节点ID * @param type 节点类型 * @param node 节点信息 */ onClick?: (id: string, type?: string, node?: any) => Promise; /** * @description 弹出框中间内容自定义渲染 * @param id 节点ID * @param type 节点类型 * @param node 节点信息 */ tipRender?: (id: string, type?: string, node?: any) => ReactNode; } export type PopoverContent = { /** * @description 标题 */ title?: string; /** * @description 执行用户 */ users?: string[] | ReactNode; /** * @description 任务开始时间 */ startTime?: string | Date; /** * @description 任务结束时间 */ endTime?: string | Date; /** * @description 任务状态 */ status?: string | ReactNode; /** * @description 耗时 */ duration?: number; }; export interface PopoverProps { /** * @description 弹出框标题 */ title: string; /** * @description 状态 */ status: string; /** * @description 弹出框内容 */ content: string | ReactNode; /** * @description 弹出框所在元素高度 */ height: number; /** * @description 弹出框所在元素宽度 */ width: number; /** * @description 弹出框是否显示 */ display: 'none' | 'block'; /** * @description 定位位置 */ top: number; /** * @description 定位位置 */ left: number; /** * @description 节点是否完成 */ noting?: boolean; } export declare const defaultXml = "\n\n\n\n\n \n \n\n"; export declare const formatDate: (date?: Date | string) => string;