-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathindex.js.flow
263 lines (217 loc) · 8.06 KB
/
index.js.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
// @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<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<FormNameProps>
declare export var Field: ComponentType<FieldInputProps>
declare export var Fields: ComponentType<FieldsInputProps>
declare export var FieldArray: ComponentType<FieldArrayInputProps>
declare export var Form: ComponentType<FormInputProps>
declare export var FormSection: ComponentType<FormSectionProps>
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<any>
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<any>): ComponentType<any> }
declare export function reducer(state: any, action: Action): any
declare export class SubmissionError {
constructor(errors: Object): void;
}
declare export function values(
config: ValuesConfig
): { (ComponentType<any>): ComponentType<any> }
// 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