import type { ComponentInstance } from './ComponentInstance'; import type { FormField as Field } from './types'; export interface FormField extends Omit { component?: ComponentInstance; } export declare type ConditionOperatorString = 'empty' | 'notEmpty' | 'contains' | 'notContains' | 'equals' | 'notEquals' | 'range'; export interface ConditionOperator { operator: ConditionOperatorString; name: string; } export interface Condition { field: FormField; operator: ConditionOperator; value: any; } export declare type LogicalOperatorString = 'AND' | 'OR'; export interface Operator { operator: LogicalOperatorString; name: string; } export interface Node { id: string; type: 'condition' | 'operator'; value: Condition | Operator; } export declare type ActionType = 'show' | 'hide' | 'editable' | 'readonly' | 'prompt'; export interface Action { id: string; type: ActionType; fields?: string[]; hint?: string; } /** * 状态:A-启用,X-未启用 */ export declare type RuleState = 'A' | 'X'; export interface Rule { id?: string; name: string; expressions: Node[]; actions: Action[]; state: RuleState; } /** * 服务端返回的 Rule 数据 */ export interface FormShowRuleDto { id: string; busiObjectId?: string; appId?: string; ruleName: string; ruleCondition: string; ruleResult: string; state: RuleState; creatorId?: string; updatorId?: string; createdTime?: string; updatedTime?: string; } export declare type ShowRuleResult = Record>>;