import { InternalNamePath, NamePath } from 'antd/lib/form/interface'; import { FormInstance, type FormItemProps } from 'antd'; import React from 'react'; import type { GroupColumnType, SpaceType, FlexibleGroupColumnType } from '../propsType'; import type { ProFormColumnType, ReactiveFunction } from '../../../render/propsType'; export type EventArgs = any[]; /** * 插入间隔符 * @param columns 表单配置数组 * @returns */ export declare const insertSeparator: (columns: GroupColumnType[], space?: SpaceType) => any[]; /** 带出event的组件默认取值方法 */ export declare function defaultGetValueFromEvent(valuePropName: string, ...args: EventArgs): any; /** 转换names */ export declare const transformNamesString: (arr: (string | string[])[]) => (string | string[])[]; /** * Input TextArea 小写自动转大写 * @param type 组件类型 * @param upperCase 是否小写转大写 * @returns {} */ export declare const isUpperCase: (type: string, upperCase: boolean) => any; interface Params { form?: FormInstance; index?: number; type?: string; namePath?: InternalNamePath; disabled?: boolean | ReactiveFunction; show?: boolean | ReactiveFunction; component?: React.ReactNode | ReactiveFunction; fieldProps?: boolean | ReactiveFunction; name?: NamePath; desensitization?: [number, number] | ReactiveFunction; } /** 计算响应式参数的值 */ export declare const getReactiveProps: (params: Params) => { disabled: boolean; show: boolean; component: React.ReactNode; fieldProps: boolean; desensitization: [number, number]; }; type ValueTypeGetterParams = Pick & { type?: any; mode?: string; }; /** 获取当前字段的转换函数 */ export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any; /** 执行所有中间件 返回处理后的值 */ export declare const getValueMiddleware: (value: any, callbacks?: any[]) => any; /** 获取中间件处理后的value */ export declare const valueFromEventWrapper: (column: any, args: any) => any; interface ContextProps { form: FormInstance; namePath?: InternalNamePath; isView?: boolean; names?: NamePath[]; index?: number; } interface GroupProps { disabled?: boolean; formDisabled?: boolean; } type GroupFormItemProps = FormItemProps & { disabled?: boolean; }; /** * 创建FormItem属性(Hook版本) */ export declare const useFormItemProps: (column: FlexibleGroupColumnType, contextProps: ContextProps, groupProps: GroupProps) => GroupFormItemProps; /** * 创建组件属性 */ export declare const createComponentProps: (column: FlexibleGroupColumnType, formItemProps: any) => { componentProps: import("lodash").Omit; formItemTransform: { getValueProps: any; normalize: any; }; }; /** * 配置验证组件 */ export declare const validateChildren: (children: FlexibleGroupColumnType[]) => boolean; export {};