/** * @Date: 2024-10-2 17:05:00 * @Description: 侧边属性栏 * @Author: MoJie */ import BpmnModeler from "bpmn-js/lib/Modeler"; import { Color } from "antd/es/color-picker"; import { Option } from './index'; export type BusinessObjectType = { id: string; name: string; description: string; documentation: string; /** * @description 作者 */ author: string; color: Color; /** 条件表达式 */ conditionExpression: { body: string; }; /** true:串行, false:并行 */ isSequential: boolean; loopCharacteristics: { $attrs: { [key: string]: any; }; /** true:串行, false:并行 */ isSequential: boolean; /** * @description 循环基数 */ loopCardinality: number; collection: any; elementVariable: any; completionCondition: { body: string; }; }; $type: string; $attrs: any; /** 操作人 */ assignee: string; /** 候选人 */ candidateUsers: string[]; /** 候选组 */ candidateGroups: string; /** * @description 服务类全名,需要execute(DelegateExecution e)方法,也可以实现JavaDelegate */ class: string; /** * @description 实现了 JavaDelegate 接口的 bean,表达式调用之前需要将它初始化到流程变量中,或者定义在实例的 spring 容器中 */ delegateExpression: string; /** * @description 表达式可以使用beanService.method(param)的方式 */ expression: string; /** * @description 脚本类型 */ scriptFormat: string; /** * @description 执行的脚本 */ script: string; /** * @description 是否保留脚本执行结果 */ autoStoreVariables: boolean; /** * @description 脚本运行结果接收参数 */ resultVariable: string; }; export type Element = import('bpmn-js/lib/model/Types').Element & { businessObject: BusinessObjectType; }; export interface PanelProps { /** bpmn对象 */ modeler: BpmnModeler; /** 当前选中节点 */ defaultElement: Element; /** 节点前缀 */ attrPrefix?: string; /** * @description 属性栏高度 */ height: number; /** 用户列表 */ users?: Option[] | (() => Promise); /** 候选组列表,可以是角色、部门... */ groups?: Option[] | (() => Promise); } /** * 获取节点类型 * @returns * @param node */ export declare const nodeType: (node: any) => any; /** * 获取多实例类型 * @returns * @param node */ export declare const multiInstancesType: (node: BusinessObjectType['loopCharacteristics']) => "循环" | "串行" | "并行"; /** * SpEl参数校验 * @param value 校验 */ export declare const elCheck: (value: string) => boolean | ""; /** * SpEl参数校验 * @param value 校验 */ export declare const elValid: (value?: string) => Promise; /** * SpEl参数校验 * @param value 校验 */ export declare const elValidAndNumber: (value?: string) => Promise; /** * 操作 * @description */ export declare const ActionOptions: { label: string; value: string; disabled?: boolean; description?: string; note?: string; }[]; /** * 操作 * @description */ export declare const ActionType: { label: string; value: string; disabled: boolean | undefined; }[];