/// import { FormikErrors, FormikHelpers, FormikProps, FormikSharedConfig } from 'formik'; import { FlexPropsInterface, GridBreakpoints, GridPropsInterface } from '../../containers'; import { XOR } from '../../utils/typeUtils'; import { FieldInterface } from '../Field'; import { OptionType } from '../InputSelect'; export declare type ValidationTypes = any | (() => any); export declare type ValidationSchemaType = Record; export declare type InitialValuesTypesInterface = string | boolean | number | OptionType | Array; export declare type FieldInterfaceWithValidationType = any> = FieldInterface & { validation?: ValidationTypes; }; export declare type FormFieldsType = Record; export declare type NewFieldType = >(field: FieldInterfaceWithValidationType) => FieldInterface; export declare type Values = { [key in keyof T]?: InitialValuesTypesInterface; }; declare type NativeFormProps = Omit, 'onError'>; export declare type FormRef = FormikProps; export interface FormCommonInterface extends NativeFormProps { fields: Fields; handleSubmit: (values?: Values, formikHelpers?: FormikHelpers>) => void; initialValues?: Values; children?: React.ReactNode | ((values: Values) => React.ReactNode); submitLabel?: string; validateOnChange?: FormikSharedConfig['validateOnChange']; validateOnBlur?: FormikSharedConfig['validateOnBlur']; onError?: (errors: FormikErrors>) => void; conditionalFields?: { [key in keyof Fields]?: (v: Partial>) => boolean; }; } export interface FormGrid extends GridPropsInterface { medias?: GridBreakpoints; } export interface FormFlex extends FlexPropsInterface { medias?: never; } export declare type FormInterface = FormCommonInterface & XOR; export {};