Socket
Socket
Sign inDemoInstall

formik

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formik - npm Package Compare versions

Comparing version 3.0.0-next.3 to 3.0.0-next.4

dist/useField.d.ts

20

CHANGELOG.md
# formik
## 3.0.0-next.4
### Patch Changes
- [`0ad41eb`](https://github.com/formium/formik/commit/0ad41ebc8ddd8d7fa40dc7364b7cdcfcc4b8c298) [#2903](https://github.com/formium/formik/pull/2903) Thanks [@jaredpalmer](https://github.com/jaredpalmer)! - Renames `unstable_StrictField` to `FastField` and thus deprecates `<FastField shouldUpdate>` prop. If you need this functionality, use `useFormikContext()` and `useField()` in a custom component wrapped in `React.memo()` instead. In addition, and this is breaking, `FastField` is no longer passed `form` object in any render prop.
If you still need to access the `form` object in render use `FormikConsumer` like so:
```diff
- import { FastField } from 'formik'
+ import { FastField, FormikConsumer } from 'formik'
<FastField name="firstName">
- {({ field, meta, form }) => ( /* ... */ )}
+ {({ field, meta }) => (
+ <FormikConsumer>{form => /* ... */}</FormikConsumer>
+ )}
</FastField>
```
## 3.0.0-next.3

@@ -4,0 +24,0 @@

2

dist/ErrorMessage.d.ts

@@ -9,2 +9,2 @@ import * as React from 'react';

}
export declare function ErrorMessage({ component, render, children, name, ...rest }: ErrorMessageProps): any;
export declare function ErrorMessage({ component, render, children, name, ...rest }: ErrorMessageProps): JSX.Element | null;

@@ -1,14 +0,15 @@

import * as React from 'react';
import { FormikProps, GenericFieldHTMLAttributes, FieldMetaProps, FieldInputProps } from './types';
import { FieldConfig } from './Field';
export interface FastFieldProps<V = any> {
field: FieldInputProps<V>;
meta: FieldMetaProps<V>;
form: FormikProps<V>;
}
export declare type FastFieldConfig<T> = FieldConfig & {
/** Override FastField's default shouldComponentUpdate */
shouldUpdate?: (nextProps: T & GenericFieldHTMLAttributes, props: {}) => boolean;
import { FieldInputProps, FieldMetaProps, GenericFieldHTMLAttributes, SharedFieldProps } from './types';
import { UseFieldProps } from './useField';
export declare type FastFieldProps<FieldValue = any> = {
field: FieldInputProps<FieldValue>;
meta: FieldMetaProps<FieldValue>;
};
export declare type FastFieldAttributes<T> = GenericFieldHTMLAttributes & FastFieldConfig<T> & T;
export declare const FastField: React.ComponentType<any>;
export declare type FastFieldConfig<V = any> = UseFieldProps<V> & SharedFieldProps<FastFieldProps<V>> & {
/**
* Override FastField's default shouldComponentUpdate
* @deprecated
*/
shouldUpdate?: (nextProps: any, props: {}) => boolean;
};
export declare function FastField<V = any>({ render, children, as: is, // `as` is reserved in typescript lol
component, shouldUpdate, ...props }: GenericFieldHTMLAttributes & FastFieldConfig<V>): any;

@@ -1,3 +0,3 @@

import * as React from 'react';
import { FormikProps, GenericFieldHTMLAttributes, FieldMetaProps, FieldHelperProps, FieldInputProps, FieldValidator } from './types';
import { FieldInputProps, FieldMetaProps, FormikProps, GenericFieldHTMLAttributes, SharedFieldProps } from './types';
import { UseFieldProps } from './useField';
export interface FieldProps<V = any, FormValues = any> {

@@ -8,54 +8,4 @@ field: FieldInputProps<V>;

}
export interface FieldConfig<V = any> {
/**
* Field component to render. Can either be a string like 'select' or a component.
*/
component?: string | React.ComponentType<FieldProps<V>> | React.ComponentType | React.ForwardRefExoticComponent<any>;
/**
* Component to render. Can either be a string e.g. 'select', 'input', or 'textarea', or a component.
*/
as?: React.ComponentType<FieldProps<V>['field']> | string | React.ComponentType | React.ForwardRefExoticComponent<any>;
/**
* Render prop (works like React router's <Route render={props =>} />)
* @deprecated
*/
render?: (props: FieldProps<V>) => React.ReactNode;
/**
* Children render function <Field name>{props => ...}</Field>)
*/
children?: ((props: FieldProps<V>) => React.ReactNode) | React.ReactNode;
/**
* Validate a single field value independently
*/
validate?: FieldValidator;
/**
* Function to parse raw input value before setting it to state
*/
parse?: (value: unknown, name: string) => any;
/**
* Function to transform value passed to input
*/
format?: (value: unknown, name: string) => any;
/**
* Wait until blur event before formatting input value?
* @default false
*/
formatOnBlur?: boolean;
/**
* Field name
*/
name: string;
/** HTML input type */
type?: string;
/** Field value */
value?: any;
/** Inner ref */
innerRef?: (instance: any) => void;
}
export declare type FieldAttributes<T> = GenericFieldHTMLAttributes & FieldConfig<T> & T & {
name: string;
};
export declare type FieldHookConfig<T> = GenericFieldHTMLAttributes & FieldConfig<T>;
export declare function useField<Val = any>(propsOrFieldName: string | FieldHookConfig<Val>): [FieldInputProps<Val>, FieldMetaProps<Val>, FieldHelperProps<Val>];
export declare function Field({ validate, name, render, children, as: is, // `as` is reserved in typescript lol
component, ...props }: FieldAttributes<any>): any;
export declare type FieldConfig<FieldValue = any, FormValues = any> = UseFieldProps<FieldValue> & SharedFieldProps<FieldProps<FieldValue, FormValues>>;
export declare function Field<FieldValue = any, FormValues = any>({ render, children, as: is, // `as` is reserved in typescript lol
component, ...props }: GenericFieldHTMLAttributes & FieldConfig<FieldValue, FormValues>): any;

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(require("react-fast-compare")),n=e(require("deepmerge")),i=e(require("lodash/isPlainObject")),a=e(require("lodash/clone")),o=e(require("lodash/toPath")),u=e(require("tiny-warning")),l=require("use-context-selector"),s=require("scheduler"),c=e(require("hoist-non-react-statics")),d=e(require("lodash/cloneDeep"));function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function v(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var m=function(e){return Array.isArray(e)&&0===e.length},y=function(e){return"function"==typeof e},E=function(e){return null!==e&&"object"==typeof e},S=function(e){return String(Math.floor(Number(e)))===e},g=function(e){return"[object String]"===Object.prototype.toString.call(e)},b=function(e){return e!=e},T=function(e){return 0===t.Children.count(e)},F=function(e){return E(e)&&y(e.then)},x=function(e){return e&&E(e)&&E(e.target)},k="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;function _(e,t,r,n){void 0===n&&(n=0);for(var i=o(t);e&&n<i.length;)e=e[i[n++]];return void 0===e?r:e}function C(e,t,r){for(var n=a(e),i=n,u=0,l=o(t);u<l.length-1;u++){var s=l[u],c=_(e,l.slice(0,u+1));if(c&&(E(c)||Array.isArray(c)))i=i[s]=a(c);else{var d=l[u+1];i=i[s]=S(d)&&Number(d)>=0?[]:{}}}return(0===u?e:i)[l[u]]===r?e:(void 0===r?delete i[l[u]]:i[l[u]]=r,0===u&&void 0===r&&delete n[l[u]],n)}function O(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];E(u)?r.get(u)||(r.set(u,!0),n[o]=Array.isArray(u)?[]:{},O(u,t,r,n[o])):n[o]=t}return n}function R(e){var t=[];if(e)for(var r=0;r<e.length;r++){var n=e[r];n.selected&&t.push(n.value)}return t}function A(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);return t&&r&&!i?n.concat(r):i?n.slice(0,a).concat(n.slice(a+1)):n}var I=function(e,t){return e},P=function(e,t){var r=parseFloat(e);return b(r)?"":r},V=function(e,t){return void 0===e?"":e},w=function(e,t){if(!k&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(k&&e.nativeEvent)return e.nativeEvent.text;var r=e.target?e.target:e.currentTarget,n=r.value,i=r.checked,a=r.options,o=r.multiple;return/checkbox/.test(r.type)?A(t,i,n):o?R(a):n},D=l.createContext(void 0),U=D.Provider;function M(e){var r=e.children,n=l.useContextSelector(D,t.useCallback((function(e){return e}),[]));return t.createElement(t.Fragment,null,r(n))}function L(){var e=l.useContextSelector(D,t.useCallback((function(e){return e}),[]));return e||u(!1),e}function B(e,t){switch(t.type){case"SET_VALUES":return p({},e,{values:t.payload});case"SET_TOUCHED":return p({},e,{touched:t.payload});case"SET_ERRORS":return r(e.errors,t.payload)?e:p({},e,{errors:t.payload});case"SET_LOW_PRIORITY_ERRORS":return r(e.errors,t.payload.errors)||!r(e.values,t.payload.values)?e:p({},e,{errors:t.payload.errors});case"SET_STATUS":return p({},e,{status:t.payload});case"SET_ISSUBMITTING":return p({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return p({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return p({},e,{values:C(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return p({},e,{touched:C(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return p({},e,{errors:C(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return p({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return p({},e,{touched:O(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return p({},e,{isSubmitting:!1});default:return e}}var j={},N={};function q(e){var i=e.validateOnChange,a=void 0===i||i,o=e.validateOnBlur,u=void 0===o||o,l=e.validateOnMount,c=void 0!==l&&l,d=e.isInitialValid,f=e.enableReinitialize,h=void 0!==f&&f,m=e.onSubmit,S=v(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=p({validateOnChange:a,validateOnBlur:u,validateOnMount:c,onSubmit:m},S),T=t.useRef(b.initialValues),O=t.useRef(b.initialErrors||j),w=t.useRef(b.initialTouched||N),D=t.useRef(b.initialStatus),U=t.useRef(!1),M=t.useRef({});t.useEffect((function(){return U.current=!0,function(){U.current=!1}}),[]);var L=t.useReducer(B,{values:b.initialValues,errors:b.initialErrors||j,touched:b.initialTouched||N,status:b.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),q=L[0],W=L[1],Y=t.useCallback((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(j):F(i)?i.then((function(e){r(e||j)}),(function(e){n(e)})):r(i)}))}),[b.validate]),z=t.useCallback((function(e,t){var r=b.validationSchema,n=y(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):H(e,n);return new Promise((function(e,t){i.then((function(){e(j)}),(function(r){"ValidationError"===r.name?e(G(r)):t(r)}))}))}),[b.validationSchema]),Q=t.useCallback((function(e,t){return new Promise((function(r){return r(M.current[e].validate(t))}))}),[]),X=t.useCallback((function(e){var t=Object.keys(M.current).filter((function(e){return y(M.current[e].validate)})),r=t.length>0?t.map((function(t){return Q(t,_(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r?e:(r&&(e=C(e,t[n],r)),e)}),{})}))}),[Q]),Z=t.useCallback((function(e){return Promise.all([X(e),b.validationSchema?z(e):{},b.validate?Y(e):{}]).then((function(e){return n.all([e[0],e[1],e[2]],{arrayMerge:K})}))}),[b.validate,b.validationSchema,X,Y,z]),$=J((function(e){return void 0===e&&(e=q.values),t=function(){return Z(e).then((function(t){return U.current&&W({type:"SET_LOW_PRIORITY_ERRORS",payload:{values:e,errors:t}}),t})).catch((function(e){}))},s.unstable_runWithPriority(s.unstable_LowPriority,(function(){return s.unstable_scheduleCallback(s.unstable_LowPriority,t)}));var t})),ee=J((function(e){return void 0===e&&(e=q.values),W({type:"SET_ISVALIDATING",payload:!0}),Z(e).then((function(e){return U.current&&(W({type:"SET_ISVALIDATING",payload:!1}),r(q.errors,e)||W({type:"SET_ERRORS",payload:e})),e}))}));t.useEffect((function(){c&&!0===U.current&&r(T.current,b.initialValues)&&$(T.current)}),[c,$]);var te=t.useCallback((function(e){var t=e&&e.values?e.values:T.current,r=e&&e.errors?e.errors:O.current?O.current:b.initialErrors||{},n=e&&e.touched?e.touched:w.current?w.current:b.initialTouched||{},i=e&&e.status?e.status:D.current?D.current:b.initialStatus;T.current=t,O.current=r,w.current=n,D.current=i;var a=function(){W({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var o=b.onReset(q.values,ge);F(o)?o.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched]);t.useEffect((function(){!0!==U.current||r(T.current,b.initialValues)||(h&&(T.current=b.initialValues,te()),c&&$(T.current))}),[h,b.initialValues,te,c,$]),t.useEffect((function(){h&&!0===U.current&&!r(O.current,b.initialErrors)&&(O.current=b.initialErrors||j,W({type:"SET_ERRORS",payload:b.initialErrors||j}))}),[h,b.initialErrors]),t.useEffect((function(){h&&!0===U.current&&!r(w.current,b.initialTouched)&&(w.current=b.initialTouched||N,W({type:"SET_TOUCHED",payload:b.initialTouched||N}))}),[h,b.initialTouched]),t.useEffect((function(){h&&!0===U.current&&!r(D.current,b.initialStatus)&&(D.current=b.initialStatus,W({type:"SET_STATUS",payload:b.initialStatus}))}),[h,b.initialStatus,b.initialTouched]);var re=J((function(e){if(M.current[e]&&y(M.current[e].validate)){var t=_(q.values,e),r=M.current[e].validate(t);return F(r)?(W({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){W({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),W({type:"SET_ISVALIDATING",payload:!1})}))):(W({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(W({type:"SET_ISVALIDATING",payload:!0}),z(q.values,e).then((function(e){return e})).then((function(t){W({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),W({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=t.useCallback((function(e,t){M.current[e]={validate:t.validate}}),[]),ie=t.useCallback((function(e){delete M.current[e]}),[]),ae=J((function(e,t){return W({type:"SET_TOUCHED",payload:e}),(void 0===t?u:t)?$(q.values):Promise.resolve()})),oe=t.useCallback((function(e){W({type:"SET_ERRORS",payload:e})}),[]),ue=J((function(e,t){var r=y(e)?e(q.values):e;return W({type:"SET_VALUES",payload:r}),(void 0===t?a:t)?$(r):Promise.resolve()})),le=t.useCallback((function(e,t){W({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),se=J((function(e,t,r){return W({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?a:r)?$(C(q.values,e,t)):Promise.resolve()})),ce=t.useCallback((function(e,t){var r,n=t,i=e;if(!g(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,u=a.value,l=a.checked,s=a.options,c=a.multiple;n=t||a.name||a.id,i=/number|range/.test(o)?(r=parseFloat(u),isNaN(r)?"":r):/checkbox/.test(o)?A(_(q.values,n),l,u):c?R(s):u}n&&se(n,i)}),[se,q.values]),de=J((function(e){if(g(e))return function(t){return ce(t,e)};ce(e)})),pe=J((function(e,t,r){return void 0===t&&(t=!0),W({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?u:r)?$(q.values):Promise.resolve()})),fe=t.useCallback((function(e,t){e.persist&&e.persist();var r=e.target;pe(t||r.name||r.id,!0)}),[pe]),ve=J((function(e){if(g(e))return function(t){return fe(t,e)};fe(e)})),he=t.useCallback((function(e){y(e)?W({type:"SET_FORMIK_STATE",payload:e}):W({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=t.useCallback((function(e){W({type:"SET_STATUS",payload:e})}),[]),ye=t.useCallback((function(e){W({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=J((function(){return W({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=be()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return U.current&&W({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(U.current)throw W({type:"SUBMIT_FAILURE"}),e}))}if(U.current&&(W({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=J((function(e){e&&e.preventDefault&&y(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&y(e.stopPropagation)&&e.stopPropagation(),Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),ge={resetForm:te,validateForm:ee,validateField:re,setErrors:oe,setFieldError:le,setFieldTouched:pe,setFieldValue:se,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,setFormikState:he,submitForm:Ee},be=J((function(){return m(q.values,ge)})),Te=J((function(e){e&&e.preventDefault&&y(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&y(e.stopPropagation)&&e.stopPropagation(),te()})),Fe=t.useCallback((function(e){return{value:_(q.values,e),error:_(q.errors,e),touched:!!_(q.touched,e),initialValue:_(T.current,e),initialTouched:!!_(w.current,e),initialError:_(O.current,e)}}),[q.errors,q.touched,q.values]),xe=J((function(e){return{setValue:function(t,r){return se(e,t,r)},setTouched:function(t,r){return pe(e,t,r)},setError:function(t){return le(e,t)}}})),ke=J((function(e,t){if(!k&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(k&&e.nativeEvent)return e.nativeEvent.text;var r=e.target?e.target:e.currentTarget,n=r.value,i=r.checked,a=r.options,o=r.multiple;return/checkbox/.test(r.type)?A(_(q.values,t),i,n):o?R(a):n})),_e=t.useCallback((function(e){var t=E(e),r=t?e.name?e.name:e.id:e,n=_(q.values,r),i=_(q.touched,r),a={name:r,value:n,onChange:de,onBlur:ve};if(t){var o=e.type,u=e.value,l=e.as,s=e.multiple,c=e.parse,d=void 0===c?/number|range/.test(o)?P:I:c,p=e.format,f=void 0===p?V:p,v=e.formatOnBlur,h=void 0!==v&&v;"checkbox"===o?void 0===u?a.checked=!!n:(a.checked=!(!Array.isArray(n)||!~n.indexOf(u)),a.value=u):"radio"===o?(a.checked=n===u,a.value=u):"select"===l&&s&&(a.value=a.value||[],a.multiple=!0),"radio"!==o&&"checkbox"!==o&&f&&(!0===h?!0===i&&(a.value=f(a.value)):a.value=f(a.value)),"radio"!==o&&"checkbox"!==o&&(a.onChange=function(e){x(e)?(e.persist&&e.persist(),se(r,d(ke(e,r)))):se(r,d(e))})}return a}),[ke,ve,de,se,q.touched,q.values]),Ce=t.useMemo((function(){return!r(T.current,q.values)}),[T.current,q.values]),Oe=t.useMemo((function(){return void 0!==d?Ce?q.errors&&0===Object.keys(q.errors).length:!1!==d&&y(d)?d(b):d:q.errors&&0===Object.keys(q.errors).length}),[d,Ce,q.errors,b]);return p({},q,{initialValues:T.current,initialErrors:O.current,initialTouched:w.current,initialStatus:D.current,handleBlur:ve,handleChange:de,handleReset:Te,handleSubmit:Se,resetForm:te,setErrors:oe,setFormikState:he,setFieldTouched:pe,setFieldValue:se,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,submitForm:Ee,validateForm:ee,validateField:re,isValid:Oe,dirty:Ce,unregisterField:ie,registerField:ne,getFieldProps:_e,getFieldMeta:Fe,getFieldHelpers:xe,validateOnBlur:u,validateOnChange:a,validateOnMount:c})}function W(e){var r=q(e),n=e.component,i=e.children,a=e.render;return t.useImperativeHandle(e.innerRef,(function(){return r})),t.createElement(U,{value:r},n?t.createElement(n,r):a?a(r):i?y(i)?i(r):T(i)?null:t.Children.only(i):null)}function G(e){var t={};if(e.inner){if(0===e.inner.length)return C(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a;_(t,o.path)||(t=C(t,o.path,o.message))}}return t}function H(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n={});var i=Y(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n})}function Y(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);t[n]=!0===Array.isArray(e[n])?e[n].map((function(e){return!0===Array.isArray(e)||i(e)?Y(e):""!==e?e:void 0})):i(e[n])?Y(e[n]):""!==e[n]?e[n]:void 0}return t}function K(e,t,r){var i=e.slice();return t.forEach((function(t,a){if(void 0===i[a]){var o=!1!==r.clone&&r.isMergeableObject(t);i[a]=o?n(Array.isArray(t)?[]:{},t,r):t}else r.isMergeableObject(t)?i[a]=n(e[a],t,r):-1===e.indexOf(t)&&i.push(t)})),i}var z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function J(e){var r=t.useRef(e);return z((function(){r.current=e})),t.useCallback((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.current.apply(void 0,t)}),[])}var Q=t.forwardRef((function(e,r){var n=e.action,i=v(e,["action"]),a=n||"#",o=l.useContextSelector(D,(function(e){return e.handleReset})),u=l.useContextSelector(D,(function(e){return e.handleSubmit}));return t.createElement("form",Object.assign({onSubmit:u,ref:r,onReset:o,action:a},i))}));function X(e){var r=function(r){return t.createElement(M,{children:function(n){return n||u(!1),t.createElement(e,Object.assign({},r,{formik:n}))}})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+n+")",c(r,e)}Q.displayName="Form";var Z=function(e,t,r){var n=re(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},$=function(e,t,r){var n=re(e),i=n[t];return n[t]=n[r],n[r]=i,n},ee=function(e,t,r){var n=re(e);return n.splice(t,0,r),n},te=function(e,t,r){var n=re(e);return n[t]=r,n},re=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(p({},e,{length:t+1}))}return[]},ne=function(e){function n(t){var r;return(r=e.call(this,t)||this).updateArrayField=function(e,t,n){var i=r.props,a=i.name;(0,i.formik.setFormikState)((function(r){var i="function"==typeof n?n:e,o="function"==typeof t?t:e,u=C(r.values,a,e(_(r.values,a))),l=n?i(_(r.errors,a)):void 0,s=t?o(_(r.touched,a)):void 0;return m(l)&&(l=void 0),m(s)&&(s=void 0),p({},r,{values:u,errors:n?C(r.errors,a,l):r.errors,touched:t?C(r.touched,a,s):r.touched})}))},r.push=function(e){return r.updateArrayField((function(t){return[].concat(re(t),[d(e)])}),!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,t){return r.updateArrayField((function(r){return $(r,e,t)}),!0,!0)},r.handleSwap=function(e,t){return function(){return r.swap(e,t)}},r.move=function(e,t){return r.updateArrayField((function(r){return Z(r,e,t)}),!0,!0)},r.handleMove=function(e,t){return function(){return r.move(e,t)}},r.insert=function(e,t){return r.updateArrayField((function(r){return ee(r,e,t)}),(function(t){return ee(t,e,null)}),(function(t){return ee(t,e,null)}))},r.handleInsert=function(e,t){return function(){return r.insert(e,t)}},r.replace=function(e,t){return r.updateArrayField((function(r){return te(r,e,t)}),!1,!1)},r.handleReplace=function(e,t){return function(){return r.replace(e,t)}},r.unshift=function(e){var t=-1;return r.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t<0&&(t=n.length),n}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r})),t},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(h(r)),r.pop=r.pop.bind(h(r)),r}f(n,e);var i=n.prototype;return i.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!r(_(e.formik.values,e.name),_(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},i.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?re(r):[];return t||(t=n[e]),y(n.splice)&&n.splice(e,1),n}),!0,!0),t},i.pop=function(){var e;return this.updateArrayField((function(t){var r=t;return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},i.render=function(){var e=this.props,r=e.component,n=e.render,i=e.children,a=e.name,o=p({},{push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},{form:v(e.formik,["validate","validationSchema"]),name:a});return r?t.createElement(r,o):n?n(o):i?"function"==typeof i?i(o):T(i)?null:t.Children.only(i):null},n}(t.Component);ne.defaultProps={validateOnChange:!0};var ie=X(ne);function ae(e){return l.useContextSelector(D,(function(t){return _(t.values,e)}))}function oe(e){return l.useContextSelector(D,(function(t){return _(t.errors,e)}))}function ue(e){return l.useContextSelector(D,(function(t){return _(t.touched,e)}))}function le(e){var r=E(e)?e:{name:e},n=r.name,i=r.validate,a=l.useContextSelector(D,(function(e){return e.registerField})),o=l.useContextSelector(D,(function(e){return e.unregisterField}));t.useEffect((function(){return n&&a(n,{validate:i}),function(){n&&o(n)}}),[a,o,n,i]);var u,s={value:ae(u=n),touched:ue(u),error:oe(u),initialValue:l.useContextSelector(D,(function(e){return _(e.initialValues.current,u)})),initialTouched:l.useContextSelector(D,(function(e){return!!_(e.initialTouched.current,u)})),initialError:l.useContextSelector(D,(function(e){return _(e.initialErrors.current,u)}))},c=s.value,d=s.touched,p=l.useContextSelector(D,(function(e){return e.setFieldValue})),f=l.useContextSelector(D,(function(e){return e.handleChange})),v=l.useContextSelector(D,(function(e){return e.handleBlur})),h={name:n,value:c,onChange:f,onBlur:v},m=e.type,y=e.value,S=e.as,g=e.multiple,b=e.parse,T=void 0===b?/number|range/.test(null!=m?m:"")?P:I:b,F=e.format,k=void 0===F?V:F,C=e.formatOnBlur,O=void 0!==C&&C;return"checkbox"===m?void 0===y?h.checked=!!c:(h.checked=!(!Array.isArray(c)||!~c.indexOf(y)),h.value=y):"radio"===m?(h.checked=c===y,h.value=y):"select"===S&&g&&(h.value=h.value||[],h.multiple=!0),"radio"!==m&&"checkbox"!==m&&k&&(!0===O?!0===d&&(h.value=k(h.value,n)):h.value=k(h.value,n)),"radio"!==m&&"checkbox"!==m&&(h.onChange=function(e){x(e)?(e.persist&&e.persist(),p(n,T(w(e,c),n))):p(n,T(e,n))}),[h,s]}var se=le,ce=X(function(e){function r(t){var r;r=e.call(this,t)||this;var n=t.render,i=t.children,a=t.component,o=t.as;return n&&u(!1),a&&n&&u(!1),o&&i&&y(i)&&u(!1),a&&i&&y(i)&&u(!1),n&&i&&!T(i)&&u(!1),r}f(r,e);var n=r.prototype;return n.shouldComponentUpdate=function(e){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):e.name!==this.props.name||_(e.formik.values,this.props.name)!==_(this.props.formik.values,this.props.name)||_(e.formik.errors,this.props.name)!==_(this.props.formik.errors,this.props.name)||_(e.formik.touched,this.props.name)!==_(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||e.formik.isSubmitting!==this.props.formik.isSubmitting},n.componentDidMount=function(){this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.props.formik.unregisterField(e.name),this.props.formik.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.props.formik.unregisterField(this.props.name)},n.render=function(){var e=this.props,r=e.name,n=e.render,i=e.as,a=e.children,o=e.component,u=e.formik,l=v(e,["validate","name","render","as","children","component","shouldUpdate","formik"]),s=v(u,["validate","validationSchema"]),c=u.getFieldProps(p({name:r},l)),d={field:c,meta:{value:_(u.values,r),error:_(u.errors,r),touched:!!_(u.touched,r),initialValue:_(u.initialValues,r),initialTouched:!!_(u.initialTouched,r),initialError:_(u.initialErrors,r)},form:s};if(n)return n(d);if(y(a))return a(d);if(o){if("string"==typeof o){var f=l.innerRef,h=v(l,["innerRef"]);return t.createElement(o,p({ref:f},c,h),a)}return t.createElement(o,p({field:c,form:u},l),a)}var m=i||"input";if("string"==typeof m){var E=l.innerRef,S=v(l,["innerRef"]);return t.createElement(m,p({ref:E},c,S),a)}return t.createElement(m,p({},c,l),a)},r}(t.Component));exports.ErrorMessage=function(e){var r=e.component,n=e.render,i=e.children,a=e.name,o=v(e,["component","render","children","name"]),u=ue(a),l=oe(a);return u&&l?n?y(n)?n(l):null:i?y(i)?i(l):null:r?t.createElement(r,o,l):l:null},exports.FastField=ce,exports.Field=function(e){var r=e.validate,n=e.name,i=e.render,a=e.children,o=e.as,u=e.component,l=v(e,["validate","name","render","children","as","component"]),s=v(L(),["validate","validationSchema"]),c=s.registerField,d=s.unregisterField;t.useEffect((function(){return c(n,{validate:r}),function(){d(n)}}),[c,d,n,r]);var f=s.getFieldProps(p({name:n},l)),h=s.getFieldMeta(n),m={field:f,form:s};if(i)return i(p({},m,{meta:h}));if(y(a))return a(p({},m,{meta:h}));if(u){if("string"==typeof u){var E=l.innerRef,S=v(l,["innerRef","parse","format","formatOnBlur"]);return t.createElement(u,p({ref:E},f,S),a)}var g=v(l,["parse","format","formatOnBlur"]);return t.createElement(u,p({field:f,form:s},g),a)}var b=o||"input";if("string"==typeof b){var T=l.innerRef,F=v(l,["innerRef","parse","format","formatOnBlur"]);return t.createElement(b,p({ref:T},f,F),a)}var x=v(l,["parse","format","formatOnBlur"]);return t.createElement(b,p({},f,x),a)},exports.FieldArray=ie,exports.Form=Q,exports.Formik=W,exports.FormikConsumer=M,exports.FormikContext=D,exports.FormikProvider=U,exports.connect=X,exports.defaultFormatFn=V,exports.defaultParseFn=I,exports.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},exports.getIn=_,exports.getSelectedValues=R,exports.getValueForCheckbox=A,exports.getValueFromEvent=w,exports.insert=ee,exports.isEmptyArray=m,exports.isEmptyChildren=T,exports.isFunction=y,exports.isInputEvent=x,exports.isInteger=S,exports.isNaN=b,exports.isObject=E,exports.isPromise=F,exports.isReactNative=k,exports.isString=g,exports.move=Z,exports.numberParseFn=P,exports.prepareDataForValidation=Y,exports.replace=te,exports.setIn=C,exports.setNestedObjectValues=O,exports.swap=$,exports.unstable_StrictField=function(e){var r=e.render,n=e.children,i=e.as,a=e.component,o=v(e,["render","children","as","component"]),u=se(o),l=u[0],s=u[1];if(r)return r({field:l,meta:s});if(y(n))return n({field:l,meta:s});var c=o.innerRef,d=v(o,["innerRef","parse","format","formatOnBlur","validate"]);if(a)return t.createElement(a,"string"==typeof a?p({ref:c},l,d):p({field:l,meta:s},d),n);var f=i||"input";return t.createElement(f,p("string"==typeof f?{ref:c}:{},l,d),n)},exports.unstable_useField=le,exports.unstable_useFieldError=oe,exports.unstable_useFieldTouched=ue,exports.unstable_useFieldValue=ae,exports.unstable_useFormikContextSelector=function(e){return l.useContextSelector(D,e)},exports.useField=function(e){var r=L(),n=r.getFieldProps,i=r.getFieldMeta,a=r.getFieldHelpers,o=r.registerField,l=r.unregisterField,s=E(e)?e:{name:e},c=s.name,d=s.validate;return t.useEffect((function(){return c&&o(c,{validate:d}),function(){c&&l(c)}}),[o,l,c,d]),c||u(!1),[n(s),i(c),a(c)]},exports.useFormik=q,exports.useFormikContext=L,exports.validateYupSchema=H,exports.withFormik=function(e){var r=e.mapPropsToValues,n=void 0===r?function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&"function"!=typeof e[r]&&(t[r]=e[r]);return t}:r,i=v(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",a=function(r){function a(){var n;return(n=r.apply(this,arguments)||this).validate=function(e){return i.validate(e,n.props)},n.validationSchema=function(){return y(i.validationSchema)?i.validationSchema(n.props):i.validationSchema},n.handleSubmit=function(e,t){return i.handleSubmit(e,p({},t,{props:n.props}))},n.renderFormComponent=function(r){return t.createElement(e,Object.assign({},n.props,r))},n}return f(a,r),a.prototype.render=function(){var e=v(this.props,["children"]);return t.createElement(W,Object.assign({},e,i,{validate:i.validate&&this.validate,validationSchema:i.validationSchema&&this.validationSchema,initialValues:n(this.props),initialStatus:i.mapPropsToStatus&&i.mapPropsToStatus(this.props),initialErrors:i.mapPropsToErrors&&i.mapPropsToErrors(this.props),initialTouched:i.mapPropsToTouched&&i.mapPropsToTouched(this.props),onSubmit:this.handleSubmit,children:this.renderFormComponent}))},a}(t.Component);return a.displayName="WithFormik("+r+")",c(a,e)}},exports.yupToFormErrors=G;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(require("react-fast-compare")),n=e(require("deepmerge")),i=e(require("lodash/isPlainObject")),a=e(require("lodash/clone")),u=e(require("lodash/toPath")),o=require("use-context-selector"),l=e(require("tiny-warning")),s=require("scheduler"),c=e(require("hoist-non-react-statics")),d=e(require("lodash/cloneDeep"));function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function v(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var m=function(e){return Array.isArray(e)&&0===e.length},y=function(e){return"function"==typeof e},E=function(e){return null!==e&&"object"==typeof e},S=function(e){return String(Math.floor(Number(e)))===e},T=function(e){return"[object String]"===Object.prototype.toString.call(e)},b=function(e){return e!=e},g=function(e){return 0===t.Children.count(e)},F=function(e){return E(e)&&y(e.then)},x=function(e){return e&&E(e)&&E(e.target)},_="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;function O(e,t,r,n){void 0===n&&(n=0);for(var i=u(t);e&&n<i.length;)e=e[i[n++]];return void 0===e?r:e}function R(e,t,r){for(var n=a(e),i=n,o=0,l=u(t);o<l.length-1;o++){var s=l[o],c=O(e,l.slice(0,o+1));if(c&&(E(c)||Array.isArray(c)))i=i[s]=a(c);else{var d=l[o+1];i=i[s]=S(d)&&Number(d)>=0?[]:{}}}return(0===o?e:i)[l[o]]===r?e:(void 0===r?delete i[l[o]]:i[l[o]]=r,0===o&&void 0===r&&delete n[l[o]],n)}function I(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var u=a[i],o=e[u];E(o)?r.get(o)||(r.set(o,!0),n[u]=Array.isArray(o)?[]:{},I(o,t,r,n[u])):n[u]=t}return n}function C(e){var t=[];if(e)for(var r=0;r<e.length;r++){var n=e[r];n.selected&&t.push(n.value)}return t}function k(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);return t&&r&&!i?n.concat(r):i?n.slice(0,a).concat(n.slice(a+1)):n}var A=function(e,t){return e},P=function(e,t){var r=parseFloat(e);return b(r)?"":r},V=function(e,t){return void 0===e?"":e},w=function(e,t){if(!_&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(_&&e.nativeEvent)return e.nativeEvent.text;var r=e.target?e.target:e.currentTarget,n=r.value,i=r.checked,a=r.options,u=r.multiple;return/checkbox/.test(r.type)?k(t,i,n):u?C(a):n},D=o.createContext(void 0),L=D.Provider;function U(){return o.useContext(D)}function M(e){var r=e.children,n=U();return n||l(!1),t.createElement(t.Fragment,null,r(n))}function B(e){return o.useContextSelector(D,e)}function j(e,t){switch(t.type){case"SET_VALUES":return f({},e,{values:t.payload});case"SET_TOUCHED":return f({},e,{touched:t.payload});case"SET_ERRORS":return r(e.errors,t.payload)?e:f({},e,{errors:t.payload});case"SET_LOW_PRIORITY_ERRORS":return r(e.errors,t.payload.errors)||!r(e.values,t.payload.values)?e:f({},e,{errors:t.payload.errors});case"SET_STATUS":return f({},e,{status:t.payload});case"SET_ISSUBMITTING":return f({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return f({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return f({},e,{values:R(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return f({},e,{touched:R(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return f({},e,{errors:R(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return f({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return f({},e,{touched:I(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return f({},e,{isSubmitting:!1});default:return e}}var N={},q={};function G(e){var i=e.validateOnChange,a=void 0===i||i,u=e.validateOnBlur,o=void 0===u||u,l=e.validateOnMount,c=void 0!==l&&l,d=e.isInitialValid,p=e.enableReinitialize,h=void 0!==p&&p,m=e.onSubmit,S=v(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=f({validateOnChange:a,validateOnBlur:o,validateOnMount:c,onSubmit:m},S),g=t.useRef(b.initialValues),I=t.useRef(b.initialErrors||N),w=t.useRef(b.initialTouched||q),D=t.useRef(b.initialStatus),L=t.useRef(!1),U=t.useRef({});t.useEffect((function(){return L.current=!0,function(){L.current=!1}}),[]);var M=t.useReducer(j,{values:b.initialValues,errors:b.initialErrors||N,touched:b.initialTouched||q,status:b.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),B=M[0],G=M[1],W=t.useCallback((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(N):F(i)?i.then((function(e){r(e||N)}),(function(e){n(e)})):r(i)}))}),[b.validate]),K=t.useCallback((function(e,t){var r=b.validationSchema,n=y(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):Y(e,n);return new Promise((function(e,t){i.then((function(){e(N)}),(function(r){"ValidationError"===r.name?e(H(r)):t(r)}))}))}),[b.validationSchema]),J=t.useCallback((function(e,t){return new Promise((function(r){return r(U.current[e].validate(t))}))}),[]),X=t.useCallback((function(e){var t=Object.keys(U.current).filter((function(e){return y(U.current[e].validate)})),r=t.length>0?t.map((function(t){return J(t,O(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r?e:(r&&(e=R(e,t[n],r)),e)}),{})}))}),[J]),Z=t.useCallback((function(e){return Promise.all([X(e),b.validationSchema?K(e):{},b.validate?W(e):{}]).then((function(e){return n.all([e[0],e[1],e[2]],{arrayMerge:z})}))}),[b.validate,b.validationSchema,X,W,K]),$=Q((function(e){return void 0===e&&(e=B.values),t=function(){return Z(e).then((function(t){return L.current&&G({type:"SET_LOW_PRIORITY_ERRORS",payload:{values:e,errors:t}}),t})).catch((function(e){}))},s.unstable_runWithPriority(s.unstable_LowPriority,(function(){return s.unstable_scheduleCallback(s.unstable_LowPriority,t)}));var t})),ee=Q((function(e){return void 0===e&&(e=B.values),G({type:"SET_ISVALIDATING",payload:!0}),Z(e).then((function(e){return L.current&&(G({type:"SET_ISVALIDATING",payload:!1}),r(B.errors,e)||G({type:"SET_ERRORS",payload:e})),e}))}));t.useEffect((function(){c&&!0===L.current&&r(g.current,b.initialValues)&&$(g.current)}),[c,$]);var te=t.useCallback((function(e){var t=e&&e.values?e.values:g.current,r=e&&e.errors?e.errors:I.current?I.current:b.initialErrors||{},n=e&&e.touched?e.touched:w.current?w.current:b.initialTouched||{},i=e&&e.status?e.status:D.current?D.current:b.initialStatus;g.current=t,I.current=r,w.current=n,D.current=i;var a=function(){G({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var u=b.onReset(B.values,Te);F(u)?u.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched]);t.useEffect((function(){!0!==L.current||r(g.current,b.initialValues)||(h&&(g.current=b.initialValues,te()),c&&$(g.current))}),[h,b.initialValues,te,c,$]),t.useEffect((function(){h&&!0===L.current&&!r(I.current,b.initialErrors)&&(I.current=b.initialErrors||N,G({type:"SET_ERRORS",payload:b.initialErrors||N}))}),[h,b.initialErrors]),t.useEffect((function(){h&&!0===L.current&&!r(w.current,b.initialTouched)&&(w.current=b.initialTouched||q,G({type:"SET_TOUCHED",payload:b.initialTouched||q}))}),[h,b.initialTouched]),t.useEffect((function(){h&&!0===L.current&&!r(D.current,b.initialStatus)&&(D.current=b.initialStatus,G({type:"SET_STATUS",payload:b.initialStatus}))}),[h,b.initialStatus,b.initialTouched]);var re=Q((function(e){if(U.current[e]&&y(U.current[e].validate)){var t=O(B.values,e),r=U.current[e].validate(t);return F(r)?(G({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){G({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),G({type:"SET_ISVALIDATING",payload:!1})}))):(G({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(G({type:"SET_ISVALIDATING",payload:!0}),K(B.values,e).then((function(e){return e})).then((function(t){G({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),G({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=t.useCallback((function(e,t){U.current[e]={validate:t.validate}}),[]),ie=t.useCallback((function(e){delete U.current[e]}),[]),ae=Q((function(e,t){return G({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?$(B.values):Promise.resolve()})),ue=t.useCallback((function(e){G({type:"SET_ERRORS",payload:e})}),[]),oe=Q((function(e,t){var r=y(e)?e(B.values):e;return G({type:"SET_VALUES",payload:r}),(void 0===t?a:t)?$(r):Promise.resolve()})),le=t.useCallback((function(e,t){G({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),se=Q((function(e,t,r){return G({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?a:r)?$(R(B.values,e,t)):Promise.resolve()})),ce=t.useCallback((function(e,t){var r,n=t,i=e;if(!T(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,u=a.type,o=a.value,l=a.checked,s=a.options,c=a.multiple;n=t||a.name||a.id,i=/number|range/.test(u)?(r=parseFloat(o),isNaN(r)?"":r):/checkbox/.test(u)?k(O(B.values,n),l,o):c?C(s):o}n&&se(n,i)}),[se,B.values]),de=Q((function(e){if(T(e))return function(t){return ce(t,e)};ce(e)})),fe=Q((function(e,t,r){return void 0===t&&(t=!0),G({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?o:r)?$(B.values):Promise.resolve()})),pe=t.useCallback((function(e,t){e.persist&&e.persist();var r=e.target;fe(t||r.name||r.id,!0)}),[fe]),ve=Q((function(e){if(T(e))return function(t){return pe(t,e)};pe(e)})),he=t.useCallback((function(e){y(e)?G({type:"SET_FORMIK_STATE",payload:e}):G({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=t.useCallback((function(e){G({type:"SET_STATUS",payload:e})}),[]),ye=t.useCallback((function(e){G({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=Q((function(){return G({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=be()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return L.current&&G({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(L.current)throw G({type:"SUBMIT_FAILURE"}),e}))}if(L.current&&(G({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=Q((function(e){e&&e.preventDefault&&y(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&y(e.stopPropagation)&&e.stopPropagation(),Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Te={resetForm:te,validateForm:ee,validateField:re,setErrors:ue,setFieldError:le,setFieldTouched:fe,setFieldValue:se,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:oe,setFormikState:he,submitForm:Ee},be=Q((function(){return m(B.values,Te)})),ge=Q((function(e){e&&e.preventDefault&&y(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&y(e.stopPropagation)&&e.stopPropagation(),te()})),Fe=t.useCallback((function(e){return{value:O(B.values,e),error:O(B.errors,e),touched:!!O(B.touched,e),initialValue:O(g.current,e),initialTouched:!!O(w.current,e),initialError:O(I.current,e)}}),[B.errors,B.touched,B.values]),xe=Q((function(e){return{setValue:function(t,r){return se(e,t,r)},setTouched:function(t,r){return fe(e,t,r)},setError:function(t){return le(e,t)}}})),_e=Q((function(e,t){if(!_&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(_&&e.nativeEvent)return e.nativeEvent.text;var r=e.target?e.target:e.currentTarget,n=r.value,i=r.checked,a=r.options,u=r.multiple;return/checkbox/.test(r.type)?k(O(B.values,t),i,n):u?C(a):n})),Oe=t.useCallback((function(e){var t=E(e),r=t?e.name?e.name:e.id:e,n=O(B.values,r),i=O(B.touched,r),a={name:r,value:n,onChange:de,onBlur:ve};if(t){var u=e.type,o=e.value,l=e.as,s=e.multiple,c=e.parse,d=void 0===c?/number|range/.test(u)?P:A:c,f=e.format,p=void 0===f?V:f,v=e.formatOnBlur,h=void 0!==v&&v;"checkbox"===u?void 0===o?a.checked=!!n:(a.checked=!(!Array.isArray(n)||!~n.indexOf(o)),a.value=o):"radio"===u?(a.checked=n===o,a.value=o):"select"===l&&s&&(a.value=a.value||[],a.multiple=!0),"radio"!==u&&"checkbox"!==u&&p&&(!0===h?!0===i&&(a.value=p(a.value)):a.value=p(a.value)),"radio"!==u&&"checkbox"!==u&&(a.onChange=function(e){x(e)?(e.persist&&e.persist(),se(r,d(_e(e,r)))):se(r,d(e))})}return a}),[_e,ve,de,se,B.touched,B.values]),Re=t.useMemo((function(){return!r(g.current,B.values)}),[g.current,B.values]),Ie=t.useMemo((function(){return void 0!==d?Re?B.errors&&0===Object.keys(B.errors).length:!1!==d&&y(d)?d(b):d:B.errors&&0===Object.keys(B.errors).length}),[d,Re,B.errors,b]);return f({},B,{initialValues:g.current,initialErrors:I.current,initialTouched:w.current,initialStatus:D.current,handleBlur:ve,handleChange:de,handleReset:ge,handleSubmit:Se,resetForm:te,setErrors:ue,setFormikState:he,setFieldTouched:fe,setFieldValue:se,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:oe,submitForm:Ee,validateForm:ee,validateField:re,isValid:Ie,dirty:Re,unregisterField:ie,registerField:ne,getFieldProps:Oe,getFieldMeta:Fe,getFieldHelpers:xe,validateOnBlur:o,validateOnChange:a,validateOnMount:c})}function W(e){var r=G(e),n=e.component,i=e.children,a=e.render;return t.useImperativeHandle(e.innerRef,(function(){return r})),t.createElement(L,{value:r},n?t.createElement(n,r):a?a(r):i?y(i)?i(r):g(i)?null:t.Children.only(i):null)}function H(e){var t={};if(e.inner){if(0===e.inner.length)return R(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var u=a;O(t,u.path)||(t=R(t,u.path,u.message))}}return t}function Y(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n={});var i=K(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n})}function K(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);t[n]=!0===Array.isArray(e[n])?e[n].map((function(e){return!0===Array.isArray(e)||i(e)?K(e):""!==e?e:void 0})):i(e[n])?K(e[n]):""!==e[n]?e[n]:void 0}return t}function z(e,t,r){var i=e.slice();return t.forEach((function(t,a){if(void 0===i[a]){var u=!1!==r.clone&&r.isMergeableObject(t);i[a]=u?n(Array.isArray(t)?[]:{},t,r):t}else r.isMergeableObject(t)?i[a]=n(e[a],t,r):-1===e.indexOf(t)&&i.push(t)})),i}var J="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function Q(e){var r=t.useRef(e);return J((function(){r.current=e})),t.useCallback((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.current.apply(void 0,t)}),[])}function X(e){var r=E(e)?e:{name:e},n=r.name,i=r.validate,a=B((function(e){return e.registerField})),u=B((function(e){return e.unregisterField}));t.useEffect((function(){return n||l(!1),a||l(!1),n&&a(n,{validate:i}),function(){n&&u(n)}}),[a,u,n,i]);var o,s={value:Z(o=n)[0],touched:ee(o)[0],error:$(o)[0],initialValue:te(o),initialTouched:re(o),initialError:ne(o)},c=s.value,d=s.touched,f=B((function(e){return e.setFieldValue})),p=B((function(e){return e.handleChange})),v=B((function(e){return e.handleBlur})),h=B((function(e){return e.getFieldHelpers})),m={name:n,value:c,onChange:p,onBlur:v},y=e.type,S=e.value,T=e.as,b=e.multiple,g=e.parse,F=void 0===g?/number|range/.test(null!=y?y:"")?P:A:g,_=e.format,O=void 0===_?V:_,R=e.formatOnBlur,I=void 0!==R&&R;return"checkbox"===y?void 0===S?m.checked=!!c:(m.checked=!(!Array.isArray(c)||!~c.indexOf(S)),m.value=S):"radio"===y?(m.checked=c===S,m.value=S):"select"===T&&b&&(m.value=m.value||[],m.multiple=!0),"radio"!==y&&"checkbox"!==y&&O&&(!0===I?!0===d&&(m.value=O(m.value,n)):m.value=O(m.value,n)),"radio"!==y&&"checkbox"!==y&&(m.onChange=function(e){x(e)?(e.persist&&e.persist(),f(n,F(w(e,c),n))):f(n,F(e,n))}),[m,s,h(n)]}function Z(e){var r=B((function(t){return O(t.values,e)})),n=B((function(e){return e.setFieldValue}));return[r,t.useCallback((function(t,r){n(e,t,r)}),[e])]}function $(e){var r=B((function(t){return O(t.errors,e)})),n=B((function(e){return e.setFieldError}));return[r,t.useCallback((function(t){n(e,t)}),[e])]}function ee(e){var r=B((function(t){return Boolean(O(t.errors,e))})),n=B((function(e){return e.setFieldTouched}));return[r,t.useCallback((function(t,r){n(e,t,r)}),[e])]}function te(e){return B((function(t){return O(t.initialValues,e)}))}function re(e){return B((function(t){return Boolean(O(t.initialTouched,e))}))}function ne(e){return B((function(t){return O(t.initialErrors,e)}))}var ie=t.forwardRef((function(e,r){var n=e.action,i=v(e,["action"]),a=n||"#",u=o.useContextSelector(D,(function(e){return e.handleReset})),l=o.useContextSelector(D,(function(e){return e.handleSubmit}));return t.createElement("form",Object.assign({onSubmit:l,ref:r,onReset:u,action:a},i))}));function ae(e){var r=function(r){return t.createElement(M,{children:function(n){return n||l(!1),t.createElement(e,Object.assign({},r,{formik:n}))}})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+n+")",c(r,e)}ie.displayName="Form";var ue=function(e,t,r){var n=ce(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},oe=function(e,t,r){var n=ce(e),i=n[t];return n[t]=n[r],n[r]=i,n},le=function(e,t,r){var n=ce(e);return n.splice(t,0,r),n},se=function(e,t,r){var n=ce(e);return n[t]=r,n},ce=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(f({},e,{length:t+1}))}return[]},de=function(e){function n(t){var r;return(r=e.call(this,t)||this).updateArrayField=function(e,t,n){var i=r.props,a=i.name;(0,i.formik.setFormikState)((function(r){var i="function"==typeof n?n:e,u="function"==typeof t?t:e,o=R(r.values,a,e(O(r.values,a))),l=n?i(O(r.errors,a)):void 0,s=t?u(O(r.touched,a)):void 0;return m(l)&&(l=void 0),m(s)&&(s=void 0),f({},r,{values:o,errors:n?R(r.errors,a,l):r.errors,touched:t?R(r.touched,a,s):r.touched})}))},r.push=function(e){return r.updateArrayField((function(t){return[].concat(ce(t),[d(e)])}),!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,t){return r.updateArrayField((function(r){return oe(r,e,t)}),!0,!0)},r.handleSwap=function(e,t){return function(){return r.swap(e,t)}},r.move=function(e,t){return r.updateArrayField((function(r){return ue(r,e,t)}),!0,!0)},r.handleMove=function(e,t){return function(){return r.move(e,t)}},r.insert=function(e,t){return r.updateArrayField((function(r){return le(r,e,t)}),(function(t){return le(t,e,null)}),(function(t){return le(t,e,null)}))},r.handleInsert=function(e,t){return function(){return r.insert(e,t)}},r.replace=function(e,t){return r.updateArrayField((function(r){return se(r,e,t)}),!1,!1)},r.handleReplace=function(e,t){return function(){return r.replace(e,t)}},r.unshift=function(e){var t=-1;return r.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t<0&&(t=n.length),n}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r})),t},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(h(r)),r.pop=r.pop.bind(h(r)),r}p(n,e);var i=n.prototype;return i.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!r(O(e.formik.values,e.name),O(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},i.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?ce(r):[];return t||(t=n[e]),y(n.splice)&&n.splice(e,1),n}),!0,!0),t},i.pop=function(){var e;return this.updateArrayField((function(t){var r=t;return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},i.render=function(){var e=this.props,r=e.component,n=e.render,i=e.children,a=e.name,u=f({},{push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},{form:v(e.formik,["validate","validationSchema"]),name:a});return r?t.createElement(r,u):n?n(u):i?"function"==typeof i?i(u):g(i)?null:t.Children.only(i):null},n}(t.Component);de.defaultProps={validateOnChange:!0};var fe=ae(de);exports.ErrorMessage=function(e){var r=e.component,n=e.render,i=e.children,a=e.name,u=v(e,["component","render","children","name"]),o=ee(a)[0],l=$(a)[0];return o&&l?n?y(n)?n(l):null:i?y(i)?i(l):null:r?t.createElement(r,u,l):l:null},exports.FastField=function(e){var r=e.render,n=e.children,i=e.as,a=e.component,u=e.shouldUpdate,o=v(e,["render","children","as","component","shouldUpdate"]);t.useEffect((function(){r&&l(!1),a&&r&&l(!1),i&&n&&y(n)&&l(!1),a&&n&&y(n)&&l(!1),r&&n&&!g(n)&&l(!1),u&&l(!1)}),[]);var s=X(o),c=s[0],d=s[1];if(r)return y(r)?r({field:c,meta:d}):null;if(y(n))return n({field:c,meta:d});var p=o.innerRef,h=v(o,["innerRef","parse","format","formatOnBlur","validate"]);if(a)return t.createElement(a,"string"==typeof a?f({ref:p},c,h):f({field:c,meta:d},h),n);var m=i||"input";return t.createElement(m,f("string"==typeof m?{ref:p}:{},c,h),n)},exports.Field=function(e){var r=e.render,n=e.children,i=e.as,a=e.component,u=v(e,["render","children","as","component"]);t.useEffect((function(){r&&l(!1),a&&r&&l(!1),i&&n&&y(n)&&l(!1),a&&n&&y(n)&&l(!1),r&&n&&!g(n)&&l(!1)}),[]);var o=X(u),s=o[0],c=o[1],d={field:s,form:v(U(),["validate","validationSchema"])};if(r)return y(r)?r(f({},d,{meta:c})):null;if(y(n))return n(f({},d,{meta:c}));var p=i||"input";if("string"==typeof p){var h=u.innerRef,m=v(u,["innerRef","parse","format","formatOnBlur"]);return t.createElement(p,f({ref:h},s,m),n)}var E=v(u,["parse","format","formatOnBlur"]);return t.createElement(p,f({},s,E),n)},exports.FieldArray=fe,exports.Form=ie,exports.Formik=W,exports.FormikConsumer=M,exports.FormikContext=D,exports.FormikProvider=L,exports.connect=ae,exports.defaultFormatFn=V,exports.defaultParseFn=A,exports.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},exports.getIn=O,exports.getSelectedValues=C,exports.getValueForCheckbox=k,exports.getValueFromEvent=w,exports.insert=le,exports.isEmptyArray=m,exports.isEmptyChildren=g,exports.isFunction=y,exports.isInputEvent=x,exports.isInteger=S,exports.isNaN=b,exports.isObject=E,exports.isPromise=F,exports.isReactNative=_,exports.isString=T,exports.move=ue,exports.numberParseFn=P,exports.prepareDataForValidation=K,exports.replace=se,exports.setIn=R,exports.setNestedObjectValues=I,exports.swap=oe,exports.useErrors=function(){return[B((function(e){return e.errors})),B((function(e){return e.setErrors}))]},exports.useField=X,exports.useFieldError=$,exports.useFieldInitialError=ne,exports.useFieldInitialTouched=re,exports.useFieldInitialValue=te,exports.useFieldTouched=ee,exports.useFieldValue=Z,exports.useFormik=G,exports.useFormikContext=U,exports.useFormikContextSelector=B,exports.useInitialErrors=function(){return B((function(e){return e.initialErrors}))},exports.useInitialStatus=function(){return B((function(e){return e.initialStatus}))},exports.useInitialTouched=function(){return B((function(e){return e.initialTouched}))},exports.useInitialValues=function(){return B((function(e){return e.initialValues}))},exports.useStatus=function(){return[B((function(e){return e.status})),B((function(e){return e.setStatus}))]},exports.useTouched=function(){return[B((function(e){return e.touched})),B((function(e){return e.setTouched}))]},exports.useValues=function(){return[B((function(e){return e.values})),B((function(e){return e.setValues}))]},exports.validateYupSchema=Y,exports.withFormik=function(e){var r=e.mapPropsToValues,n=void 0===r?function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&"function"!=typeof e[r]&&(t[r]=e[r]);return t}:r,i=v(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",a=function(r){function a(){var n;return(n=r.apply(this,arguments)||this).validate=function(e){return i.validate(e,n.props)},n.validationSchema=function(){return y(i.validationSchema)?i.validationSchema(n.props):i.validationSchema},n.handleSubmit=function(e,t){return i.handleSubmit(e,f({},t,{props:n.props}))},n.renderFormComponent=function(r){return t.createElement(e,Object.assign({},n.props,r))},n}return p(a,r),a.prototype.render=function(){var e=v(this.props,["children"]);return t.createElement(W,Object.assign({},e,i,{validate:i.validate&&this.validate,validationSchema:i.validationSchema&&this.validationSchema,initialValues:n(this.props),initialStatus:i.mapPropsToStatus&&i.mapPropsToStatus(this.props),initialErrors:i.mapPropsToErrors&&i.mapPropsToErrors(this.props),initialTouched:i.mapPropsToTouched&&i.mapPropsToTouched(this.props),onSubmit:this.handleSubmit,children:this.renderFormComponent}))},a}(t.Component);return a.displayName="WithFormik("+r+")",c(a,e)}},exports.yupToFormErrors=H;
//# sourceMappingURL=formik.cjs.production.min.js.map

@@ -5,6 +5,6 @@ import * as React from 'react';

export declare const FormikProvider: React.Provider<FormikContextType<any>>;
export declare function useFormikContext<Values>(): FormikContextType<Values>;
export declare function FormikConsumer<Values = any>({ children, }: {
children: (formik: FormikContextType<Values>) => React.ReactNode;
}): JSX.Element;
export declare function useFormikContext<Values>(): FormikContextType<Values>;
export declare function unstable_useFormikContextSelector<Values = any, Slice = any>(selector: (value: FormikContextType<Values>) => Slice): Slice;
export declare function useFormikContextSelector<Values = any, Slice = any>(selector: (value: FormikContextType<Values>) => Slice): Slice;

@@ -12,2 +12,2 @@ export * from './Formik';

export * from './FastField';
export * from './StrictField';
export * from './useField';

@@ -249,1 +249,18 @@ import * as React from 'react';

export declare type FieldValidator = (value: any) => string | void | Promise<string | void>;
export declare type SharedFieldProps<T = any> = {
/**
* Field component to render. Can either be a string like 'select' or a component.
*/
component?: string | React.ComponentType<T>;
/**
* Render prop (works like React router's <Route render={props =>} />)
* @deprecated
*/
render?: (props: T) => React.ReactNode;
/**
* Children render function <Field name>{props => ...}</Field>)
*/
children?: ((props: T) => React.ReactNode) | React.ReactNode;
/** Inner ref */
innerRef?: (instance: any) => void;
};
{
"name": "formik",
"description": "Forms in React, without tears",
"version": "3.0.0-next.3",
"version": "3.0.0-next.4",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Jared Palmer <jared@palmer.net>",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc