import React from 'react'; import { FormInstance, FormProps } from 'antd/es/form'; import { Props as FieldRenderProps } from '../FieldRender'; import { GroupRule } from '../../shared/schema'; import { Schema } from '../types'; export interface Props extends Pick, 'components'> { } export interface Props extends FormProps { /** * enable combine old form mode. * if it is true, SchemaForm will not create form element, it will use parent form. * and property 'form' is required */ hybrid?: boolean; /** * enable convert value when init or submit */ enableValueAtomize?: boolean; /** form instance */ form?: FormInstance; /** form schema configuration */ schema: Schema; /** form group schema configuration */ schemaGroups?: GroupRule[]; /** every schema group render */ groupRender?: GroupRule['render']; /** entire schema group render, the param child is all schema render result */ groupsRender?: (child: React.ReactNode) => React.ReactNode; /** this data will be provided to schema */ globalState?: any; } export interface RefCurrent extends FormInstance { /** * force rerender schema form */ forceRefresh: () => void; /** * transform initial values */ fusion: (values: any) => any; /** * transform submit values */ fission: (values: any) => any; } declare module 'react' { function forwardRef(render: (props: P, ref: React.Ref) => React.ReactNode | null): ((props: P & React.RefAttributes) => React.ReactElement); } declare const _default: (props: Props & React.RefAttributes) => React.ReactElement>; export default _default;