import { NzCascaderOption } from 'ng-zorro-antd/cascader'; import { BehaviorSubject } from 'rxjs'; export interface IMRulesData { groups: IMRulesGroup[]; } export interface IMRulesGroup { name: string; value: string; option: string; options: IMRulesGroupOption[]; namePlaceholder?: string; valuePlaceholder?: string; children?: IMRulesItem[]; nameValidator?(group: IMRulesGroup): IMRulesValidator; valueValidator?(group: IMRulesGroup): IMRulesValidator; creatable?(group: IMRulesGroup): boolean; } export interface IMRulesGroupOption { value: string; label: string; } export interface IMRulesValidator { status: 'success' | 'warning' | 'error' | 'validating' | ''; text: string; } export interface IMRulesItem { name: string[]; value: string[]; nameOptions$: BehaviorSubject; valueOptions$: BehaviorSubject; option: EMRulesItemOption; linkToNext?: EMRulesItemLinkToNext; customValue?: string; nameValidator?(item: IMRulesItem): IMRulesValidator; valueValidator?(item: IMRulesItem): IMRulesValidator; customValueValidator?(item: IMRulesItem): IMRulesValidator; deletable?(item: IMRulesItem): boolean; } export interface IMRulesNameOption extends NzCascaderOption { label: string; value: string; children?: IMRulesNameOption[]; } export interface IMRulesValueOption extends NzCascaderOption { label: string; value: string; children?: IMRulesNameOption[]; } export declare enum EMRulesItemLinkToNext { and = "and", or = "or" } export declare enum EMRulesItemOption { include = "include", notIncluded = "notIncluded", equal = "equal", lt = "lt", gt = "gt", loe = "loe", goe = "goe", exist = "exist" } export declare const mRulesItemOptions: { key: EMRulesItemOption; name: string; }[]; export declare const MRulesItemCustomValueTrigger = "__m_rules_custom_value_trigger";