0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

80
web/node_modules/formik/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,80 @@
# formik
## 2.2.9
### Patch Changes
- [`ca60ef9`](https://github.com/formium/formik/commit/ca60ef9517fdefdf928b627dd1c0039fe6febd5d) [#3227](https://github.com/formium/formik/pull/3227) Thanks [@johnrom](https://github.com/johnrom)! - Bump lodash and lodash-es to latest versions.
## 2.2.8
### Patch Changes
- [`3a9c707`](https://github.com/formium/formik/commit/3a9c707c8eec200d6eae2955536fb987daf38854) [#3203](https://github.com/formium/formik/pull/3203) Thanks [@hixus](https://github.com/hixus)! - Fixes type of setError value as it is same as setFieldError message
## 2.2.7
### Patch Changes
- [`e50040a`](https://github.com/formium/formik/commit/e50040abe49cf7bb46580ea46af6a2b487539830) [#2881](https://github.com/formium/formik/pull/2881) Thanks [@jinmayamashita](https://github.com/jinmayamashita)! - Prevent calling getSelectedValues when the element has not options
* [`31405ab`](https://github.com/formium/formik/commit/31405abfc9373b2236eecf0f34f630906579e193) [#3201](https://github.com/formium/formik/pull/3201) Thanks [@artola](https://github.com/artola)! - Fixes regression that resulted in error update race condition from when using `validateOnMount`
- [`c2d6926`](https://github.com/formium/formik/commit/c2d692659dc0c1ee43f7e9f60e18c36e0701eefe) [#2995](https://github.com/formium/formik/pull/2995) Thanks [@johnrom](https://github.com/johnrom)! - Allow explicitly setting `<form action>` to empty string (#2981). Note: previous code which passed an empty string would result in a noop (simply appending # to the url), but this will now result in a form submission to the current page.
## 2.2.6
### Patch Changes
- [`d4314a1`](https://github.com/formium/formik/commit/d4314a14cac4bfb0b2c2f1e5cf07a4fc3fb2d2d8) [#2955](https://github.com/formium/formik/pull/2955) Thanks [@jkbktl](https://github.com/jkbktl)! - fix(docs): fix link to docs in console warning
## 2.2.5
### Patch Changes
- [`ebad985`](https://github.com/formium/formik/commit/ebad98569e034c5bd8f52a7926480b7d63127cd4) [#2891](https://github.com/formium/formik/pull/2891) Thanks [@jaredpalmer](https://github.com/jaredpalmer)! - Remove low-priority validation implementation
* [`0dfa23b`](https://github.com/formium/formik/commit/0dfa23b6b312db1f2c3d22019975212f0f901c00) [#2889](https://github.com/formium/formik/pull/2889) Thanks [@jaredpalmer](https://github.com/jaredpalmer)! - Fixed botched typescript builds including scheduler types
## 2.2.4
### Patch Changes
- [`199e77a`](https://github.com/formium/formik/commit/199e77a3f69e9886d88fc7114c37769cd365d9c6) [#2882](https://github.com/formium/formik/pull/2882) Thanks [@umidbekkarimov](https://github.com/umidbekkarimov)! - Validate `setFieldTouched` with high priority
## 2.2.3
### Patch Changes
- [`e0a28e6`](https://github.com/formium/formik/commit/e0a28e6872ebfd06e636aac84829b60d704b0694) [#2867](https://github.com/formium/formik/pull/2867) Thanks [@umidbekkarimov](https://github.com/umidbekkarimov)! - Fix low priority validation for browser password autofill.
* [`958d67c`](https://github.com/formium/formik/commit/958d67ca2c3e006031c31150ea0a42248b28ffc7) [#2874](https://github.com/formium/formik/pull/2874) Thanks [@maddhruv](https://github.com/maddhruv)! - fix FastField initial value when input type is radio or checkbox
## 2.2.2
### Patch Changes
- [`00f95ec`](https://github.com/formium/formik/commit/00f95ec4ec5266eed8ad4e97b76321205c704d51) [#2854](https://github.com/formium/formik/pull/2854) Thanks [@umidbekkarimov](https://github.com/umidbekkarimov)! - Fix low priority validation race condition.
## 2.2.1
### Patch Changes
- [`e04886d`](https://github.com/formium/formik/commit/e04886db15c7e9b96516b4bd5a1b89d0e895bb7d) [#2820](https://github.com/formium/formik/pull/2820) Thanks [@wellyshen](https://github.com/wellyshen)! - Fixed bug with scheduler and `validateFormWithLowPriority` method not be scheduled correctly
## 2.2.0
### Minor Changes
- [`4148181`](https://github.com/formium/formik/commit/41481819f9187de79c4d948aeaa4ca1d33c53ed7) [#2794](https://github.com/formium/formik/pull/2794) Thanks [@jaredpalmer](https://github.com/jaredpalmer)! - `setValue` can now optionally accept a function as a callback, exposing `React.SetStateAction` functionality. Previously, only the entire object was
allowed which caused issues with stale props.
```tsx
setValues(prevValues => ({...prevValues, ... }))
```
## 2.1.7
### Patch Changes
- [`bda9f41`](https://github.com/formium/formik/commit/bda9f41931fac382eec26b4f1283b881b6bbc240) [#2785](https://github.com/formium/formik/pull/2785) Thanks [@jaredpalmer](https://github.com/jaredpalmer)! - Replace all instances of the deprecated React.SFC type with React.FC

51
web/node_modules/formik/README.md generated vendored Normal file
View file

@ -0,0 +1,51 @@
<p align="center">
<img src="https://user-images.githubusercontent.com/4060187/61057426-4e5a4600-a3c3-11e9-9114-630743e05814.png" width="211" height="182" alt="Formik.js" />
</p>
<h3 align="center">
Build forms in React, without the tears.
</h3>
<br>
[![Stable Release](https://img.shields.io/npm/v/formik.svg)](https://npm.im/formik)
[![Blazing Fast](https://badgen.now.sh/badge/speed/blazing%20%F0%9F%94%A5/green)](https://npm.im/formik)
[![gzip size](http://img.badgesize.io/https://unpkg.com/formik@latest/dist/formik.umd.production.min.js?compression=gzip)](https://unpkg.com/formik@latest/dist/formik.umd.production.min.js)
[![license](https://badgen.now.sh/badge/license/Apache-2.0)](./LICENSE)
[![Discord](https://img.shields.io/discord/769256827007139912.svg?style=flat-square)](https://discord.gg/pJSg287)
**Visit [https://formik.org](https://formik.org) to get started with Formik.**
## Organizations and projects using Formik
[List of organizations and projects using Formik](https://github.com/jaredpalmer/formik/issues/87)
## Authors
- Jared Palmer [@jaredpalmer](https://twitter.com/jaredpalmer)
- Ian White [@eonwhite](https://twitter.com/eonwhite)
## Contributors
Formik is made with <3 thanks to these wonderful people
([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars2.githubusercontent.com/u/4060187?v=4" width="100px;"/><br /><sub><b>Jared Palmer</b></sub>](http://jaredpalmer.com)<br />[💬](#question-jaredpalmer "Answering Questions") [💻](https://github.com/jaredpalmer/formik/commits?author=jaredpalmer "Code") [🎨](#design-jaredpalmer "Design") [📖](https://github.com/jaredpalmer/formik/commits?author=jaredpalmer "Documentation") [💡](#example-jaredpalmer "Examples") [🤔](#ideas-jaredpalmer "Ideas, Planning, & Feedback") [👀](#review-jaredpalmer "Reviewed Pull Requests") [⚠️](https://github.com/jaredpalmer/formik/commits?author=jaredpalmer "Tests") | [<img src="https://avatars0.githubusercontent.com/u/109324?v=4" width="100px;"/><br /><sub><b>Ian White</b></sub>](https://www.stardog.io)<br />[💬](#question-eonwhite "Answering Questions") [🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Aeonwhite "Bug reports") [💻](https://github.com/jaredpalmer/formik/commits?author=eonwhite "Code") [📖](https://github.com/jaredpalmer/formik/commits?author=eonwhite "Documentation") [🤔](#ideas-eonwhite "Ideas, Planning, & Feedback") [👀](#review-eonwhite "Reviewed Pull Requests") | [<img src="https://avatars0.githubusercontent.com/u/829963?v=4" width="100px;"/><br /><sub><b>Andrej Badin</b></sub>](http://andrejbadin.com)<br />[💬](#question-Andreyco "Answering Questions") [🐛](https://github.com/jaredpalmer/formik/issues?q=author%3AAndreyco "Bug reports") [📖](https://github.com/jaredpalmer/formik/commits?author=Andreyco "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/91115?v=4" width="100px;"/><br /><sub><b>Adam Howard</b></sub>](http://adz.co.de)<br />[💬](#question-skattyadz "Answering Questions") [🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Askattyadz "Bug reports") [🤔](#ideas-skattyadz "Ideas, Planning, & Feedback") [👀](#review-skattyadz "Reviewed Pull Requests") | [<img src="https://avatars1.githubusercontent.com/u/6711845?v=4" width="100px;"/><br /><sub><b>Vlad Shcherbin</b></sub>](https://github.com/VladShcherbin)<br />[💬](#question-VladShcherbin "Answering Questions") [🐛](https://github.com/jaredpalmer/formik/issues?q=author%3AVladShcherbin "Bug reports") [🤔](#ideas-VladShcherbin "Ideas, Planning, & Feedback") | [<img src="https://avatars3.githubusercontent.com/u/383212?v=4" width="100px;"/><br /><sub><b>Brikou CARRE</b></sub>](https://github.com/brikou)<br />[🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Abrikou "Bug reports") [📖](https://github.com/jaredpalmer/formik/commits?author=brikou "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/5314713?v=4" width="100px;"/><br /><sub><b>Sam Kvale</b></sub>](http://skvale.github.io)<br />[🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Askvale "Bug reports") [💻](https://github.com/jaredpalmer/formik/commits?author=skvale "Code") [⚠️](https://github.com/jaredpalmer/formik/commits?author=skvale "Tests") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars0.githubusercontent.com/u/13765558?v=4" width="100px;"/><br /><sub><b>Jon Tansey</b></sub>](http://jon.tansey.info)<br />[🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Ajontansey "Bug reports") [💻](https://github.com/jaredpalmer/formik/commits?author=jontansey "Code") | [<img src="https://avatars0.githubusercontent.com/u/6819171?v=4" width="100px;"/><br /><sub><b>Tyler Martinez</b></sub>](http://slightlytyler.com)<br />[🐛](https://github.com/jaredpalmer/formik/issues?q=author%3Aslightlytyler "Bug reports") [📖](https://github.com/jaredpalmer/formik/commits?author=slightlytyler "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/1285032?v=4" width="100px;"/><br /><sub><b>Tobias Lohse</b></sub>](http://MrLoh.se)<br />[🐛](https://github.com/jaredpalmer/formik/issues?q=author%3AMrLoh "Bug reports") [💻](https://github.com/jaredpalmer/formik/commits?author=MrLoh "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the
[all-contributors](https://github.com/kentcdodds/all-contributors)
specification. Contributions of any kind welcome!
## Related
- [TSDX](https://github.com/jaredpalmer/tsdx) - Zero-config CLI for TypeScript used by this repo. (Formik's Rollup configuration as a CLI)
---
[Apache 2.0 License.](https://github.com/jaredpalmer/formik/blob/master/LICENSE)

9
web/node_modules/formik/dist/ErrorMessage.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
import * as React from 'react';
export interface ErrorMessageProps {
name: string;
className?: string;
component?: string | React.ComponentType;
children?: (errorMessage: string) => React.ReactNode;
render?: (errorMessage: string) => React.ReactNode;
}
export declare const ErrorMessage: React.ComponentType<ErrorMessageProps>;

14
web/node_modules/formik/dist/FastField.d.ts generated vendored Normal file
View file

@ -0,0 +1,14 @@
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;
};
export declare type FastFieldAttributes<T> = GenericFieldHTMLAttributes & FastFieldConfig<T> & T;
export declare const FastField: React.ComponentType<any>;

47
web/node_modules/formik/dist/Field.d.ts generated vendored Normal file
View file

@ -0,0 +1,47 @@
import * as React from 'react';
import { FormikProps, GenericFieldHTMLAttributes, FieldMetaProps, FieldHelperProps, FieldInputProps, FieldValidator } from './types';
export interface FieldProps<V = any, FormValues = any> {
field: FieldInputProps<V>;
form: FormikProps<FormValues>;
meta: FieldMetaProps<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;
/**
* 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;

54
web/node_modules/formik/dist/FieldArray.d.ts generated vendored Normal file
View file

@ -0,0 +1,54 @@
import * as React from 'react';
import { SharedRenderProps, FormikProps } from './types';
export declare type FieldArrayRenderProps = ArrayHelpers & {
form: FormikProps<any>;
name: string;
};
export declare type FieldArrayConfig = {
/** Really the path to the array field to be updated */
name: string;
/** Should field array validate the form AFTER array updates/changes? */
validateOnChange?: boolean;
} & SharedRenderProps<FieldArrayRenderProps>;
export interface ArrayHelpers {
/** Imperatively add a value to the end of an array */
push: (obj: any) => void;
/** Curried fn to add a value to the end of an array */
handlePush: (obj: any) => () => void;
/** Imperatively swap two values in an array */
swap: (indexA: number, indexB: number) => void;
/** Curried fn to swap two values in an array */
handleSwap: (indexA: number, indexB: number) => () => void;
/** Imperatively move an element in an array to another index */
move: (from: number, to: number) => void;
/** Imperatively move an element in an array to another index */
handleMove: (from: number, to: number) => () => void;
/** Imperatively insert an element at a given index into the array */
insert: (index: number, value: any) => void;
/** Curried fn to insert an element at a given index into the array */
handleInsert: (index: number, value: any) => () => void;
/** Imperatively replace a value at an index of an array */
replace: (index: number, value: any) => void;
/** Curried fn to replace an element at a given index into the array */
handleReplace: (index: number, value: any) => () => void;
/** Imperatively add an element to the beginning of an array and return its length */
unshift: (value: any) => number;
/** Curried fn to add an element to the beginning of an array */
handleUnshift: (value: any) => () => void;
/** Curried fn to remove an element at an index of an array */
handleRemove: (index: number) => () => void;
/** Curried fn to remove a value from the end of the array */
handlePop: () => () => void;
/** Imperatively remove and element at an index of an array */
remove<T>(index: number): T | undefined;
/** Imperatively remove and return value from the end of the array */
pop<T>(): T | undefined;
}
/**
* Some array helpers!
*/
export declare const move: (array: any[], from: number, to: number) => unknown[];
export declare const swap: (arrayLike: ArrayLike<any>, indexA: number, indexB: number) => unknown[];
export declare const insert: (arrayLike: ArrayLike<any>, index: number, value: any) => unknown[];
export declare const replace: (arrayLike: ArrayLike<any>, index: number, value: any) => unknown[];
export declare const FieldArray: React.ComponentType<FieldArrayConfig>;

3
web/node_modules/formik/dist/Form.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
import * as React from 'react';
export declare type FormikFormProps = Pick<React.FormHTMLAttributes<HTMLFormElement>, Exclude<keyof React.FormHTMLAttributes<HTMLFormElement>, 'onReset' | 'onSubmit'>>;
export declare const Form: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "acceptCharset" | "action" | "autoComplete" | "encType" | "method" | "name" | "noValidate" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLFormElement>>;

61
web/node_modules/formik/dist/Formik.d.ts generated vendored Normal file
View file

@ -0,0 +1,61 @@
import * as React from 'react';
import { FormikConfig, FormikErrors, FormikState, FormikTouched, FormikValues, FieldMetaProps, FieldHelperProps, FieldInputProps } from './types';
export declare function useFormik<Values extends FormikValues = FormikValues>({ validateOnChange, validateOnBlur, validateOnMount, isInitialValid, enableReinitialize, onSubmit, ...rest }: FormikConfig<Values>): {
initialValues: Values;
initialErrors: FormikErrors<unknown>;
initialTouched: FormikTouched<unknown>;
initialStatus: any;
handleBlur: {
(e: React.FocusEvent<any>): void;
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
};
handleChange: {
(e: React.ChangeEvent<any>): void;
<T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
};
handleReset: (e: any) => void;
handleSubmit: (e?: React.FormEvent<HTMLFormElement> | undefined) => void;
resetForm: (nextState?: Partial<FormikState<Values>> | undefined) => void;
setErrors: (errors: FormikErrors<Values>) => void;
setFormikState: (stateOrCb: FormikState<Values> | ((state: FormikState<Values>) => FormikState<Values>)) => void;
setFieldTouched: (field: string, touched?: boolean, shouldValidate?: boolean | undefined) => Promise<FormikErrors<Values>> | Promise<void>;
setFieldValue: (field: string, value: any, shouldValidate?: boolean | undefined) => Promise<FormikErrors<Values>> | Promise<void>;
setFieldError: (field: string, value: string | undefined) => void;
setStatus: (status: any) => void;
setSubmitting: (isSubmitting: boolean) => void;
setTouched: (touched: FormikTouched<Values>, shouldValidate?: boolean | undefined) => Promise<FormikErrors<Values>> | Promise<void>;
setValues: (values: React.SetStateAction<Values>, shouldValidate?: boolean | undefined) => Promise<FormikErrors<Values>> | Promise<void>;
submitForm: () => Promise<any>;
validateForm: (values?: Values) => Promise<FormikErrors<Values>>;
validateField: (name: string) => Promise<void> | Promise<string | undefined>;
isValid: boolean;
dirty: boolean;
unregisterField: (name: string) => void;
registerField: (name: string, { validate }: any) => void;
getFieldProps: (nameOrOptions: any) => FieldInputProps<any>;
getFieldMeta: (name: string) => FieldMetaProps<any>;
getFieldHelpers: (name: string) => FieldHelperProps<any>;
validateOnBlur: boolean;
validateOnChange: boolean;
validateOnMount: boolean;
values: Values;
errors: FormikErrors<Values>;
touched: FormikTouched<Values>;
isSubmitting: boolean;
isValidating: boolean;
status?: any;
submitCount: number;
};
export declare function Formik<Values extends FormikValues = FormikValues, ExtraProps = {}>(props: FormikConfig<Values> & ExtraProps): JSX.Element;
/**
* Transform Yup ValidationError to a more usable object
*/
export declare function yupToFormErrors<Values>(yupError: any): FormikErrors<Values>;
/**
* Validate a yup schema.
*/
export declare function validateYupSchema<T extends FormikValues>(values: T, schema: any, sync?: boolean, context?: any): Promise<Partial<T>>;
/**
* Recursively prepare values.
*/
export declare function prepareDataForValidation<T extends FormikValues>(values: T): FormikValues;

6
web/node_modules/formik/dist/FormikContext.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import * as React from 'react';
import { FormikContextType } from './types';
export declare const FormikContext: React.Context<FormikContextType<any>>;
export declare const FormikProvider: React.Provider<FormikContextType<any>>;
export declare const FormikConsumer: React.Consumer<FormikContextType<any>>;
export declare function useFormikContext<Values>(): FormikContextType<Values>;

9
web/node_modules/formik/dist/connect.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
import * as React from 'react';
import { FormikContextType } from './types';
/**
* Connect any component to Formik context, and inject as a prop called `formik`;
* @param Comp React Component
*/
export declare function connect<OuterProps, Values = {}>(Comp: React.ComponentType<OuterProps & {
formik: FormikContextType<Values>;
}>): React.ComponentType<OuterProps>;

2022
web/node_modules/formik/dist/formik.cjs.development.js generated vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1983
web/node_modules/formik/dist/formik.esm.js generated vendored Normal file

File diff suppressed because it is too large Load diff

1
web/node_modules/formik/dist/formik.esm.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

11
web/node_modules/formik/dist/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
export * from './Formik';
export * from './Field';
export * from './Form';
export * from './withFormik';
export * from './FieldArray';
export * from './utils';
export * from './types';
export * from './connect';
export * from './ErrorMessage';
export * from './FormikContext';
export * from './FastField';

8
web/node_modules/formik/dist/index.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./formik.cjs.production.min.js')
} else {
module.exports = require('./formik.cjs.development.js')
}

248
web/node_modules/formik/dist/types.d.ts generated vendored Normal file
View file

@ -0,0 +1,248 @@
import * as React from 'react';
/**
* Values of fields in the form
*/
export interface FormikValues {
[field: string]: any;
}
/**
* An object containing error messages whose keys correspond to FormikValues.
* Should always be an object of strings, but any is allowed to support i18n libraries.
*/
export declare type FormikErrors<Values> = {
[K in keyof Values]?: Values[K] extends any[] ? Values[K][number] extends object ? FormikErrors<Values[K][number]>[] | string | string[] : string | string[] : Values[K] extends object ? FormikErrors<Values[K]> : string;
};
/**
* An object containing touched state of the form whose keys correspond to FormikValues.
*/
export declare type FormikTouched<Values> = {
[K in keyof Values]?: Values[K] extends any[] ? Values[K][number] extends object ? FormikTouched<Values[K][number]>[] : boolean : Values[K] extends object ? FormikTouched<Values[K]> : boolean;
};
/**
* Formik state tree
*/
export interface FormikState<Values> {
/** Form values */
values: Values;
/** map of field names to specific error for that field */
errors: FormikErrors<Values>;
/** map of field names to whether the field has been touched */
touched: FormikTouched<Values>;
/** whether the form is currently submitting */
isSubmitting: boolean;
/** whether the form is currently validating (prior to submission) */
isValidating: boolean;
/** Top level status state, in case you need it */
status?: any;
/** Number of times user tried to submit the form */
submitCount: number;
}
/**
* Formik computed properties. These are read-only.
*/
export interface FormikComputedProps<Values> {
/** True if any input has been touched. False otherwise. */
readonly dirty: boolean;
/** True if state.errors is empty */
readonly isValid: boolean;
/** The initial values of the form */
readonly initialValues: Values;
/** The initial errors of the form */
readonly initialErrors: FormikErrors<Values>;
/** The initial visited fields of the form */
readonly initialTouched: FormikTouched<Values>;
/** The initial status of the form */
readonly initialStatus?: any;
}
/**
* Formik state helpers
*/
export interface FormikHelpers<Values> {
/** Manually set top level status. */
setStatus: (status?: any) => void;
/** Manually set errors object */
setErrors: (errors: FormikErrors<Values>) => void;
/** Manually set isSubmitting */
setSubmitting: (isSubmitting: boolean) => void;
/** Manually set touched object */
setTouched: (touched: FormikTouched<Values>, shouldValidate?: boolean) => void;
/** Manually set values object */
setValues: (values: React.SetStateAction<Values>, shouldValidate?: boolean) => void;
/** Set value of form field directly */
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
/** Set error message of a form field directly */
setFieldError: (field: string, message: string | undefined) => void;
/** Set whether field has been touched directly */
setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
/** Validate form values */
validateForm: (values?: any) => Promise<FormikErrors<Values>>;
/** Validate field value */
validateField: (field: string) => void;
/** Reset form */
resetForm: (nextState?: Partial<FormikState<Values>>) => void;
/** Submit the form imperatively */
submitForm: () => Promise<void>;
/** Set Formik state, careful! */
setFormikState: (f: FormikState<Values> | ((prevState: FormikState<Values>) => FormikState<Values>), cb?: () => void) => void;
}
/**
* Formik form event handlers
*/
export interface FormikHandlers {
/** Form submit handler */
handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
/** Reset form event handler */
handleReset: (e?: React.SyntheticEvent<any>) => void;
handleBlur: {
/** Classic React blur handler, keyed by input name */
(e: React.FocusEvent<any>): void;
/** Preact-like linkState. Will return a handleBlur function. */
<T = string | any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
};
handleChange: {
/** Classic React change handler, keyed by input name */
(e: React.ChangeEvent<any>): void;
/** Preact-like linkState. Will return a handleChange function. */
<T = string | React.ChangeEvent<any>>(field: T): T extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
};
getFieldProps: <Value = any>(props: any) => FieldInputProps<Value>;
getFieldMeta: <Value>(name: string) => FieldMetaProps<Value>;
getFieldHelpers: <Value = any>(name: string) => FieldHelperProps<Value>;
}
/**
* Base formik configuration/props shared between the HoC and Component.
*/
export interface FormikSharedConfig<Props = {}> {
/** Tells Formik to validate the form on each input's onChange event */
validateOnChange?: boolean;
/** Tells Formik to validate the form on each input's onBlur event */
validateOnBlur?: boolean;
/** Tells Formik to validate upon mount */
validateOnMount?: boolean;
/** Tell Formik if initial form values are valid or not on first render */
isInitialValid?: boolean | ((props: Props) => boolean);
/** Should Formik reset the form when new initialValues change */
enableReinitialize?: boolean;
}
/**
* <Formik /> props
*/
export interface FormikConfig<Values> extends FormikSharedConfig {
/**
* Form component to render
*/
component?: React.ComponentType<FormikProps<Values>> | React.ReactNode;
/**
* Render prop (works like React router's <Route render={props =>} />)
* @deprecated
*/
render?: (props: FormikProps<Values>) => React.ReactNode;
/**
* React children or child render callback
*/
children?: ((props: FormikProps<Values>) => React.ReactNode) | React.ReactNode;
/**
* Initial values of the form
*/
initialValues: Values;
/**
* Initial status
*/
initialStatus?: any;
/** Initial object map of field names to specific error for that field */
initialErrors?: FormikErrors<Values>;
/** Initial object map of field names to whether the field has been touched */
initialTouched?: FormikTouched<Values>;
/**
* Reset handler
*/
onReset?: (values: Values, formikHelpers: FormikHelpers<Values>) => void;
/**
* Submission handler
*/
onSubmit: (values: Values, formikHelpers: FormikHelpers<Values>) => void | Promise<any>;
/**
* A Yup Schema or a function that returns a Yup schema
*/
validationSchema?: any | (() => any);
/**
* Validation function. Must return an error object or promise that
* throws an error object where that object keys map to corresponding value.
*/
validate?: (values: Values) => void | object | Promise<FormikErrors<Values>>;
/** Inner ref */
innerRef?: React.Ref<FormikProps<Values>>;
}
/**
* State, handlers, and helpers made available to form component or render prop
* of <Formik/>.
*/
export declare type FormikProps<Values> = FormikSharedConfig & FormikState<Values> & FormikHelpers<Values> & FormikHandlers & FormikComputedProps<Values> & FormikRegistration & {
submitForm: () => Promise<any>;
};
/** Internal Formik registration methods that get passed down as props */
export interface FormikRegistration {
registerField: (name: string, fns: {
validate?: FieldValidator;
}) => void;
unregisterField: (name: string) => void;
}
/**
* State, handlers, and helpers made available to Formik's primitive components through context.
*/
export declare type FormikContextType<Values> = FormikProps<Values> & Pick<FormikConfig<Values>, 'validate' | 'validationSchema'>;
export interface SharedRenderProps<T> {
/**
* Field component to render. Can either be a string like 'select' or a component.
*/
component?: string | React.ComponentType<T | void>;
/**
* Render prop (works like React router's <Route render={props =>} />)
*/
render?: (props: T) => React.ReactNode;
/**
* Children render function <Field name>{props => ...}</Field>)
*/
children?: (props: T) => React.ReactNode;
}
export declare type GenericFieldHTMLAttributes = JSX.IntrinsicElements['input'] | JSX.IntrinsicElements['select'] | JSX.IntrinsicElements['textarea'];
/** Field metadata */
export interface FieldMetaProps<Value> {
/** Value of the field */
value: Value;
/** Error message of the field */
error?: string;
/** Has the field been visited? */
touched: boolean;
/** Initial value of the field */
initialValue?: Value;
/** Initial touched state of the field */
initialTouched: boolean;
/** Initial error message of the field */
initialError?: string;
}
/** Imperative handles to change a field's value, error and touched */
export interface FieldHelperProps<Value> {
/** Set the field's value */
setValue: (value: Value, shouldValidate?: boolean) => void;
/** Set the field's touched value */
setTouched: (value: boolean, shouldValidate?: boolean) => void;
/** Set the field's error value */
setError: (value: string | undefined) => void;
}
/** Field input value, name, and event handlers */
export interface FieldInputProps<Value> {
/** Value of the field */
value: Value;
/** Name of the field */
name: string;
/** Multiple select? */
multiple?: boolean;
/** Is the field checked? */
checked?: boolean;
/** Change event handler */
onChange: FormikHandlers['handleChange'];
/** Blur event handler */
onBlur: FormikHandlers['handleBlur'];
}
export declare type FieldValidator = (value: any) => string | void | Promise<string | void>;

68
web/node_modules/formik/dist/utils.d.ts generated vendored Normal file
View file

@ -0,0 +1,68 @@
import * as React from 'react';
/** @private is the value an empty array? */
export declare const isEmptyArray: (value?: any) => boolean;
/** @private is the given object a Function? */
export declare const isFunction: (obj: any) => obj is Function;
/** @private is the given object an Object? */
export declare const isObject: (obj: any) => obj is Object;
/** @private is the given object an integer? */
export declare const isInteger: (obj: any) => boolean;
/** @private is the given object a string? */
export declare const isString: (obj: any) => obj is string;
/** @private is the given object a NaN? */
export declare const isNaN: (obj: any) => boolean;
/** @private Does a React component have exactly 0 children? */
export declare const isEmptyChildren: (children: any) => boolean;
/** @private is the given object/value a promise? */
export declare const isPromise: (value: any) => value is PromiseLike<any>;
/** @private is the given object/value a type of synthetic event? */
export declare const isInputEvent: (value: any) => value is React.SyntheticEvent<any, Event>;
/**
* Same as document.activeElement but wraps in a try-catch block. In IE it is
* not safe to call document.activeElement if there is nothing focused.
*
* The activeElement will be null only if the document or document body is not
* yet defined.
*
* @param {?Document} doc Defaults to current document.
* @return {Element | null}
* @see https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/dom/getActiveElement.js
*/
export declare function getActiveElement(doc?: Document): Element | null;
/**
* Deeply get a value from an object via its path.
*/
export declare function getIn(obj: any, key: string | string[], def?: any, p?: number): any;
/**
* Deeply set a value from in object via it's path. If the value at `path`
* has changed, return a shallow copy of obj with `value` set at `path`.
* If `value` has not changed, return the original `obj`.
*
* Existing objects / arrays along `path` are also shallow copied. Sibling
* objects along path retain the same internal js reference. Since new
* objects / arrays are only created along `path`, we can test if anything
* changed in a nested structure by comparing the object's reference in
* the old and new object, similar to how russian doll cache invalidation
* works.
*
* In earlier versions of this function, which used cloneDeep, there were
* issues whereby settings a nested value would mutate the parent
* instead of creating a new object. `clone` avoids that bug making a
* shallow copy of the objects along the update path
* so no object is mutated in place.
*
* Before changing this function, please read through the following
* discussions.
*
* @see https://github.com/developit/linkstate
* @see https://github.com/jaredpalmer/formik/pull/123
*/
export declare function setIn(obj: any, path: string, value: any): any;
/**
* Recursively a set the same value for all keys and arrays nested object, cloning
* @param object
* @param value
* @param visited
* @param response
*/
export declare function setNestedObjectValues<T>(object: any, value: any, visited?: any, response?: any): T;

68
web/node_modules/formik/dist/withFormik.d.ts generated vendored Normal file
View file

@ -0,0 +1,68 @@
import * as React from 'react';
import { FormikHelpers, FormikProps, FormikSharedConfig, FormikValues, FormikTouched, FormikErrors } from './types';
/**
* State, handlers, and helpers injected as props into the wrapped form component.
* Used with withFormik()
*
* @deprecated Use `OuterProps & FormikProps<Values>` instead.
*/
export declare type InjectedFormikProps<Props, Values> = Props & FormikProps<Values>;
/**
* Formik helpers + { props }
*/
export declare type FormikBag<P, V> = {
props: P;
} & FormikHelpers<V>;
/**
* withFormik() configuration options. Backwards compatible.
*/
export interface WithFormikConfig<Props, Values extends FormikValues = FormikValues, DeprecatedPayload = Values> extends FormikSharedConfig<Props> {
/**
* Set the display name of the component. Useful for React DevTools.
*/
displayName?: string;
/**
* Submission handler
*/
handleSubmit: (values: Values, formikBag: FormikBag<Props, Values>) => void;
/**
* Map props to the form values
*/
mapPropsToValues?: (props: Props) => Values;
/**
* Map props to the form status
*/
mapPropsToStatus?: (props: Props) => any;
/**
* Map props to the form touched state
*/
mapPropsToTouched?: (props: Props) => FormikTouched<Values>;
/**
* Map props to the form errors state
*/
mapPropsToErrors?: (props: Props) => FormikErrors<Values>;
/**
* @deprecated in 0.9.0 (but needed to break TS types)
*/
mapValuesToPayload?: (values: Values) => DeprecatedPayload;
/**
* A Yup Schema or a function that returns a Yup schema
*/
validationSchema?: any | ((props: Props) => any);
/**
* Validation function. Must return an error object or promise that
* throws an error object where that object keys map to corresponding value.
*/
validate?: (values: Values, props: Props) => void | object | Promise<any>;
}
export declare type CompositeComponent<P> = React.ComponentClass<P> | React.StatelessComponent<P>;
export interface ComponentDecorator<TOwnProps, TMergedProps> {
(component: CompositeComponent<TMergedProps>): React.ComponentType<TOwnProps>;
}
export interface InferableComponentDecorator<TOwnProps> {
<T extends CompositeComponent<TOwnProps>>(component: T): T;
}
/**
* A public higher-order component to access the imperative API
*/
export declare function withFormik<OuterProps extends object, Values extends FormikValues, Payload = Values>({ mapPropsToValues, ...config }: WithFormikConfig<OuterProps, Values, Payload>): ComponentDecorator<OuterProps, OuterProps & FormikProps<Values>>;

78
web/node_modules/formik/package.json generated vendored Normal file
View file

@ -0,0 +1,78 @@
{
"name": "formik",
"description": "Build forms in React, without the tears",
"version": "2.2.9",
"license": "Apache-2.0",
"author": "Jared Palmer <jared@palmer.net> (https://jaredpalmer.com)",
"repository": "formium/formik",
"homepage": "https://formik.org",
"keywords": [
"formik",
"form",
"forms",
"react",
"react-dom",
"hooks",
"react hooks",
"validation",
"render props",
"validation",
"higher order component",
"hoc"
],
"funding": [
{
"type": "individual",
"url": "https://opencollective.com/formik"
}
],
"main": "dist/index.js",
"umd:main": "dist/formik.umd.production.js",
"module": "dist/formik.esm.js",
"typings": "dist/index.d.ts",
"files": ["dist"],
"peerDependencies": {
"react": ">=16.8.0"
},
"scripts": {
"test": "tsdx test --env=jsdom",
"test:watch": "npm run test -- --watchAll",
"start": "tsdx watch --tsconfig tsconfig.build.json --verbose --noClean",
"build": "tsdx build --tsconfig tsconfig.build.json",
"lint": "tsdx lint",
"prepublish": "npm run build"
},
"dependencies": {
"deepmerge": "^2.1.1",
"hoist-non-react-statics": "^3.3.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"react-fast-compare": "^2.0.1",
"tiny-warning": "^1.0.2",
"tslib": "^1.10.0"
},
"devDependencies": {
"@testing-library/react": "^11.1.0",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/lodash": "^4.14.119",
"@types/react": "^16.9.55",
"@types/react-dom": "^16.9.9",
"@types/warning": "^3.0.0",
"@types/yup": "^0.24.9",
"just-debounce-it": "^1.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"yup": "^0.28.1"
},
"jest": {
"globals": {
"__DEV__": "boolean"
},
"collectCoverageFrom": [
"src/**/*.{ts,tsx}"
],
"setupFilesAfterEnv": [
"<rootDir>/test/setupTests.ts"
]
}
}