// @flow import * as React from 'react' import type { ComponentType } from 'react' import type { Action, GetFormState, Context, ReactContext } from './types' import type { Params as DefaultShouldAsyncValidateParams } from './defaultShouldAsyncValidate' import type { Params as DefaultShouldValidateParams } from './defaultShouldValidate' import type { Params as DefaultShouldErrorParams } from './defaultShouldError' import type { Params as DefaultShouldWarnParams } from './defaultShouldWarn' import type { Config as ReduxFormConfig } from './createReduxForm' import type { Props as FormInputProps } from './Form' import type { Props as _FormNameProps } from './FormName' import type { DefaultProps as FormSectionDefaultProps, Props as FormSectionProps } from './FormSection' import type { Props as FieldInputProps } from './FieldProps.types' import type { Props as FieldsInputProps } from './FieldsProps.types' import type { Props as FieldArrayInputProps } from './FieldArrayProps.types' import type { FormValueSelectorInterface } from './formValueSelector.types' import type { FormValuesInterface } from './formValues.types' import type { GetFormErrorInterface } from './selectors/getFormError.types' import type { GetFormNamesInterface } from './selectors/getFormNames.types' import type { GetFormValuesInterface } from './selectors/getFormValues.types' import type { GetFormInitialValuesInterface } from './selectors/getFormInitialValues.types' import type { GetFormSyncErrorsInterface } from './selectors/getFormSyncErrors.types' import type { GetFormMetaInterface } from './selectors/getFormMeta.types' import type { GetFormAsyncErrorsInterface } from './selectors/getFormAsyncErrors.types' import type { GetFormSyncWarningsInterface } from './selectors/getFormSyncWarnings.types' import type { GetFormSubmitErrorsInterface } from './selectors/getFormSubmitErrors.types' import type { HasSubmitSucceededInterface } from './selectors/hasSubmitSucceeded.types' import type { HasSubmitFailedInterface } from './selectors/hasSubmitFailed.types' import type { IsDirtyInterface } from './selectors/isDirty.types' import type { IsInvalidInterface } from './selectors/isInvalid.types' import type { IsPristineInterface } from './selectors/isPristine.types' import type { IsValidInterface } from './selectors/isValid.types' import type { IsSubmittingInterface } from './selectors/isSubmitting.types' import type { Config as ValuesConfig } from './values.types' import type { ActionTypes } from './actionTypes.types' import type { ArrayInsert, ArrayMove, ArrayPop, ArrayPush, ArrayRemove, ArrayRemoveAll, ArrayShift, ArraySplice, ArraySwap, ArrayUnshift, Autofill, Blur, Change, ClearSubmitErrors, ClearFields, Destroy, Focus, Initialize, RegisterField, Reset, ResetSection, SetSubmitFailed, SetSubmitSucceeded, StartAsyncValidation, StartSubmit, StopAsyncValidation, StopSubmit, Submit, Touch, UnregisterField, Untouch } from './actions.types' export type { Event, FormProps, Context } from './types' declare export var ReduxFormContext: React.Context type StructureMap = Object export type FormNameProps = _FormNameProps export type { FieldProps } from './FieldProps.types' export type { FieldArrayProps } from './FieldArrayProps.types' declare export var actionTypes: ActionTypes declare export function defaultShouldAsyncValidate( params: DefaultShouldAsyncValidateParams ): boolean declare export function defaultShouldValidate( params: DefaultShouldValidateParams ): boolean declare export function defaultShouldError( params: DefaultShouldErrorParams ): boolean declare export function defaultShouldWarn( params: DefaultShouldWarnParams ): boolean declare export var propTypes: Object declare export var fieldInputPropTypes: Object declare export var fieldMetaPropTypes: Object declare export var fieldPropTypes: Object declare export var fieldArrayFieldsPropTypes: Object declare export var fieldArrayMetaPropTypes: Object declare export var fieldArrayPropTypes: Object declare export var formPropTypes: Object declare export var FormName: ComponentType declare export var Field: ComponentType declare export var Fields: ComponentType declare export var FieldArray: ComponentType declare export var Form: ComponentType declare export var FormSection: ComponentType declare export function formValueSelector( form: string, getFormState: ?GetFormState ): FormValueSelectorInterface declare export function formValues( firstArg: string | Object, ...rest: string[] ): FormValuesInterface declare export function getFormError( form: string, getFormState: ?GetFormState ): GetFormErrorInterface declare export function getFormNames( getFormState: ?GetFormState ): GetFormNamesInterface<*> declare export function getFormValues( form: string, getFormState: ?GetFormState ): GetFormValuesInterface declare export function getFormInitialValues( form: string, getFormState: ?GetFormState ): GetFormInitialValuesInterface declare export function getFormSyncErrors( form: string, getFormState: ?GetFormState ): GetFormSyncErrorsInterface declare export function getFormMeta( form: string, getFormState: ?GetFormState ): GetFormMetaInterface declare export function getFormAsyncErrors( form: string, getFormState: ?GetFormState ): GetFormAsyncErrorsInterface declare export function getFormSyncWarnings( form: string, getFormState: ?GetFormState ): GetFormSyncWarningsInterface declare export function getFormSubmitErrors( form: string, getFormState: ?GetFormState ): GetFormSubmitErrorsInterface declare export function hasSubmitSucceeded( form: string, getFormState: ?GetFormState ): HasSubmitSucceededInterface declare export function hasSubmitFailed( form: string, getFormState: ?GetFormState ): HasSubmitFailedInterface declare export function isDirty( form: string, getFormState: ?GetFormState ): IsDirtyInterface declare export function isInvalid( form: string, getFormState: ?GetFormState ): IsInvalidInterface declare export function isPristine( form: string, getFormState: ?GetFormState ): IsPristineInterface declare export function isValid( form: string, getFormState: ?GetFormState ): IsValidInterface declare export function isSubmitting( form: string, getFormState: ?GetFormState ): IsSubmittingInterface declare export function reduxForm( config: ReduxFormConfig ): { (WrappedComponent: ComponentType<*>): ComponentType<*> } declare export function reducer(state: any, action: Action): any declare export class SubmissionError { constructor(errors: Object): void; } declare export function values( config: ValuesConfig ): { (ComponentType<*>): ComponentType<*> } // Action creators declare export var arrayInsert: ArrayInsert declare export var arrayMove: ArrayMove declare export var arrayPop: ArrayPop declare export var arrayPush: ArrayPush declare export var arrayRemove: ArrayRemove declare export var arrayRemoveAll: ArrayRemoveAll declare export var arrayShift: ArrayShift declare export var arraySplice: ArraySplice declare export var arraySwap: ArraySwap declare export var arrayUnshift: ArrayUnshift declare export var autofill: Autofill declare export var blur: Blur declare export var change: Change declare export var clearSubmitErrors: ClearSubmitErrors declare export var clearFields: ClearFields declare export var destroy: Destroy declare export var focus: Focus declare export var initialize: Initialize declare export var registerField: RegisterField declare export var reset: Reset declare export var resetSection: ResetSection declare export var setSubmitFailed: SetSubmitFailed declare export var setSubmitSucceeded: SetSubmitSucceeded declare export var startAsyncValidation: StartAsyncValidation declare export var startSubmit: StartSubmit declare export var stopAsyncValidation: StopAsyncValidation declare export var stopSubmit: StopSubmit declare export var submit: Submit declare export var touch: Touch declare export var unregisterField: UnregisterField declare export var untouch: Untouch