///
import type { FormInstance } from 'antd/es/form';
import type { FormLayout } from 'antd/es/form/Form';
import type { ColProps } from 'antd/es/col';
export declare type StatusType = 'disabled' | 'readonly';
export declare type MonitorFn = (v: unknown, type: StatusType) => void;
export interface FormContextProps {
/**
* 是否在表单内
*/
inForm: true;
/**
* 表单实例
*/
form: FormInstance;
/**
* 状态下发
*/
statusMonitor: {
addListener: (fn: MonitorFn) => void;
removeListener: (fn: MonitorFn) => void;
};
/**
* 表单编码
*/
formCode: string;
/**
* 布局
*/
layout: FormLayout;
/**
* 每行列数
*/
colSpan?: 2 | 3 | 4 | 6 | 8 | 12 | 24;
/**
* 标题占比
*/
labelCol: ColProps;
/**
* 内容占比
*/
wrapperCol: ColProps;
/**
* 冒号
*/
colon: boolean;
/**
* 标签对齐方式
*/
labelAlign?: 'left' | 'right';
/**
* 上报子组件关系
* @param uid 组件uid
* @param fieldName 字段名
* @returns
*/
uploadChildRelation: (uid: string, fieldName: string) => void;
/**
* 打印模式
*/
printMode?: boolean;
/**
* 上传设置值预处理方法
* @param fileProps 字段名
* @param fn 处理函数
* @returns
*/
preproccessSetFormValues: (fileProps: string, fn: (value: any) => any) => void;
/**
* 行间距
*/
rowSpace: string | number;
/**
* 列间距
*/
colSpace: string | number;
/**
* 是否一直展示标题(零代码使用,表单内包裹view然后再包裹表单控件,需要展示标题)
*/
isShowTitle?: boolean;
/**
* label是否换行
*/
labelWrap?: boolean;
/**
* 折叠字段折叠需要隐藏
*/
foldFields?: string[];
}
export interface NoopInFormProps {
/**
* 是否在表单内
*/
inForm: false;
/**
* 表单编码
*/
formCode?: string;
/**
* 是否一直展示标题(零代码使用,表单内包裹view然后再包裹表单控件,需要展示标题)
*/
isShowTitle?: boolean;
}
export declare const formContext: import("react").Context;
declare type FormEDContextProps = Pick;
export declare const formEDContext: import("react").Context>;
declare const FormProvider: import("react").Provider;
declare const FormEDProvider: import("react").Provider>;
declare const useForm: () => FormContextProps | NoopInFormProps;
declare const useEDForm: () => Partial;
export { FormProvider, useForm, useEDForm, FormEDProvider, };