import React from 'react';
import IBasePro from '../../../1properties/0define/0form/abase';
import { IRule, IRuleMap } from '../../../1properties/1engine/validator';
import './style/form.scss';
import { IResult } from 'src/4common/http';
interface IForm extends IBasePro {
    forceUpdate?: boolean;
    defaultValues?: any;
    fields?: any[];
    inline?: boolean;
    rules?: IRuleMap;
    autowidth?: boolean;
    labelwidth?: number;
    labelalign?: string;
    labelpos?: string;
    onChange?: (selectedItem: any, event: Event) => void;
    renderLabelNode?: (props: any, target?: any) => React.ReactNode;
    renderNode?: (props: any, target?: any) => React.ReactNode;
    renderInputNode?: (comp: React.ComponentType<any>, props: any, target?: any) => React.ReactNode;
}
interface IState {
    validatorErrorMsg: any;
    renderIndex: number;
    fieldRenderIndex: number;
}
export default class TwForm extends React.Component<IForm, IState> {
    currentSelected: any;
    currentRules: any;
    currentField: any;
    currentShowFields: any;
    currentAllFields: any;
    nameToField: Map<string, any>;
    formKeyId: string;
    labelwidth: number;
    fieldGetValue: any;
    fieldRenderIndex: any;
    constructor(props: IForm);
    static getViewType(): string;
    /**
     * 触发表单上面的change事件
     * @param e 元素事件
     */
    getCellChange: (e: React.SyntheticEvent) => void;
    _validator(rules: IRule[], value: any, data: any): string;
    generateGetValues(data: any): Array<Promise<IResult>>;
    validator(): Promise<unknown>;
    setValidatorErrorMsg(error: {}): void;
    clearValidator(): void;
    getOneRule(name: any): never[];
    callOne(name: string): any;
    /**
     * 对原始的的change事件进行代理,触发验证和数据回收
     * @param name 字段名
     * @param oldCall 原始的change事件
     * @param field 字段配置
     * @returns
     */
    generateOnChange(name: string, oldCall: any, field: any): (value: any, event: any) => void;
    /**
     * 对事件进行
     * @param oldCall 原始的事件
     * @param field 当前字段配置
     * @returns 新的合成事件
     */
    generateEvent(oldCall: any, field: any): (value: any, event: any) => void;
    renderOneV(field: any, defa: any, children?: any): React.JSX.Element;
    renderOne(field: any, selectedItem: any): any;
    renderFields(fields: any, selectedItem: any): any;
    _setLabelWidth(field: any): any;
    _setRules(field: any): void;
    _proxyEvent(field: any): void;
    getFieldByName(name: string): any;
    updateFieldInfo(fieldNew: any, value?: any): void;
    getValueByName(name: string): any;
    setOneFieldValue(name: string, value: any): void;
    setCurrentSelected(selectedItem: any): void;
    setFormState(updateFeild?: boolean): void;
    _show: (field: any) => boolean;
    _appendInitCall: (field: any, selectedItem: any, initCall: any) => void;
    /**
     * 设置相关验证规则
     * 设置相关的字段初始默认值
     * @param fields 需要渲染的字段
     */
    resetDefaultValue(fields: any): void;
    componentDidMount(): void;
    shouldComponentUpdate(pre: IForm): boolean;
    forceUpdate(): void;
    getAllValues(): any;
    render(): React.JSX.Element;
}
export {};
