diff --git a/.changeset/twenty-lions-tickle.md b/.changeset/twenty-lions-tickle.md new file mode 100644 index 000000000..4dd8fec47 --- /dev/null +++ b/.changeset/twenty-lions-tickle.md @@ -0,0 +1,5 @@ +--- +'formik': patch +--- + +Updated internal types to support React 18. diff --git a/package.json b/package.json index 4373ca7d7..b18a96ab3 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,15 @@ { "name": "formik-project", "private": true, + "resolutions": { + "shelljs": "0.8.5", + "typescript": "^4.0.0" + }, "devDependencies": { "@changesets/changelog-github": "^0.2.7", "@changesets/cli": "^2.10.3", "@playwright/test": "^1.34.3", - "@types/jest": "^26.0.14", + "@types/jest": "^25.0.0", "husky": "^4.3.0", "lint-staged": "^10.4.0", "prettier": "^2.1.2", diff --git a/packages/formik-native/package.json b/packages/formik-native/package.json index 1a4cb61c4..733184441 100644 --- a/packages/formik-native/package.json +++ b/packages/formik-native/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@react-native-community/eslint-config": "^0.0.5", - "@types/react": "^16.9.55", + "@types/react": "^18.2.7", "@types/react-native": "^0.63.32", "react": "^18.2.0", "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz", diff --git a/packages/formik/package.json b/packages/formik/package.json index 1f7ddf6d4..9b08a6158 100644 --- a/packages/formik/package.json +++ b/packages/formik/package.json @@ -48,19 +48,19 @@ "lodash-es": "^4.17.21", "react-fast-compare": "^2.0.1", "tiny-warning": "^1.0.2", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { - "@testing-library/react": "^11.1.0", + "@testing-library/react": "^14.0.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/react": "^18.2.7", + "@types/react-dom": "^18.2.4", "@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", + "react": "^18.2.0", + "react-dom": "^18.2.0", "tsdx": "^0.14.1", "typescript": "^4.0.3", "yup": "^0.28.1" diff --git a/packages/formik/src/Field.tsx b/packages/formik/src/Field.tsx index 028bf3976..9eb851b25 100644 --- a/packages/formik/src/Field.tsx +++ b/packages/formik/src/Field.tsx @@ -52,6 +52,11 @@ export interface FieldConfig { */ validate?: FieldValidator; + /** + * Used for 'select' and related input types. + */ + multiple?: boolean; + /** * Field name */ diff --git a/packages/formik/src/FieldArray.tsx b/packages/formik/src/FieldArray.tsx index 74345ee60..951a2a491 100644 --- a/packages/formik/src/FieldArray.tsx +++ b/packages/formik/src/FieldArray.tsx @@ -178,6 +178,7 @@ class FieldArrayInner extends React.Component< formik: { setFormikState }, } = this.props; + setFormikState((prevState: FormikState) => { let updateErrors = createAlterationHandler(alterErrors, fn); let updateTouched = createAlterationHandler(alterTouched, fn); @@ -268,26 +269,19 @@ class FieldArrayInner extends React.Component< this.updateArrayField( (array: any[]) => { const arr = array ? [value, ...array] : [value]; - if (length < 0) { - length = arr.length; - } + + length = arr.length; + return arr; }, (array: any[]) => { - const arr = array ? [null, ...array] : [null]; - if (length < 0) { - length = arr.length; - } - return arr; + return array ? [null, ...array] : [null]; }, (array: any[]) => { - const arr = array ? [null, ...array] : [null]; - if (length < 0) { - length = arr.length; - } - return arr; + return array ? [null, ...array] : [null]; } ); + return length; }; diff --git a/packages/formik/src/Formik.tsx b/packages/formik/src/Formik.tsx index 2e7a8f4aa..db627821d 100755 --- a/packages/formik/src/Formik.tsx +++ b/packages/formik/src/Formik.tsx @@ -1,33 +1,34 @@ -import * as React from 'react'; -import isEqual from 'react-fast-compare'; import deepmerge from 'deepmerge'; import isPlainObject from 'lodash/isPlainObject'; +import * as React from 'react'; +import isEqual from 'react-fast-compare'; +import invariant from 'tiny-warning'; +import { FieldConfig } from './Field'; +import { FormikProvider } from './FormikContext'; import { + FieldHelperProps, + FieldInputProps, + FieldMetaProps, FormikConfig, FormikErrors, + FormikHandlers, + FormikHelpers, + FormikProps, FormikState, FormikTouched, FormikValues, - FormikProps, - FieldMetaProps, - FieldHelperProps, - FieldInputProps, - FormikHelpers, - FormikHandlers, } from './types'; import { + getActiveElement, + getIn, + isEmptyChildren, isFunction, + isObject, + isPromise, isString, setIn, - isEmptyChildren, - isPromise, setNestedObjectValues, - getActiveElement, - getIn, - isObject, } from './utils'; -import { FormikProvider } from './FormikContext'; -import invariant from 'tiny-warning'; type FormikMessage = | { type: 'SUBMIT_ATTEMPT' } @@ -170,9 +171,8 @@ export function useFormik({ }; }, []); - const [state, dispatch] = React.useReducer< - React.Reducer, FormikMessage> - >(formikReducer, { + const [, setIteration] = React.useState(0); + const stateRef = React.useRef>({ values: props.initialValues, errors: props.initialErrors || emptyErrors, touched: props.initialTouched || emptyTouched, @@ -182,6 +182,17 @@ export function useFormik({ submitCount: 0, }); + const state = stateRef.current; + + const dispatch = React.useCallback((action: FormikMessage) => { + const prev = stateRef.current; + + stateRef.current = formikReducer(prev, action); + + // force rerender + if (prev !== stateRef.current) setIteration(x => x + 1); + }, []); + const runValidateHandler = React.useCallback( (values: Values, field?: string): Promise> => { return new Promise((resolve, reject) => { @@ -888,9 +899,11 @@ export function useFormik({ ); const getFieldProps = React.useCallback( - (nameOrOptions): FieldInputProps => { + (nameOrOptions: string | FieldConfig): FieldInputProps => { const isAnObject = isObject(nameOrOptions); - const name = isAnObject ? nameOrOptions.name : nameOrOptions; + const name = isAnObject + ? (nameOrOptions as FieldConfig).name + : nameOrOptions; const valueState = getIn(state.values, name); const field: FieldInputProps = { @@ -905,7 +918,7 @@ export function useFormik({ value: valueProp, // value is special for checkboxes as: is, multiple, - } = nameOrOptions; + } = nameOrOptions as FieldConfig; if (type === 'checkbox') { if (valueProp === undefined) { diff --git a/packages/formik/src/connect.tsx b/packages/formik/src/connect.tsx index 5f187f48e..34ac615a1 100644 --- a/packages/formik/src/connect.tsx +++ b/packages/formik/src/connect.tsx @@ -12,7 +12,7 @@ import invariant from 'tiny-warning'; export function connect( Comp: React.ComponentType }> ) { - const C: React.FC = (props: OuterProps) => ( + const C: React.FC = props => ( {formik => { invariant( @@ -23,6 +23,7 @@ export function connect( }} ); + const componentDisplayName = Comp.displayName || Comp.name || @@ -32,7 +33,7 @@ export function connect( // Assign Comp to C.WrappedComponent so we can access the inner component in tests // For example, gets us (C as React.FC & { - WrappedComponent: React.ReactNode; + WrappedComponent: typeof Comp; }).WrappedComponent = Comp; C.displayName = `FormikConnect(${componentDisplayName})`; @@ -42,5 +43,5 @@ export function connect( Comp as React.ComponentClass< OuterProps & { formik: FormikContextType } > // cast type to ComponentClass (even if SFC) - ) as React.ComponentType; + ); } diff --git a/packages/formik/src/types.tsx b/packages/formik/src/types.tsx index 17cf9b024..9586fe865 100644 --- a/packages/formik/src/types.tsx +++ b/packages/formik/src/types.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import { FieldConfig } from './Field'; /** * Values of fields in the form */ @@ -149,7 +150,9 @@ export interface FormikHandlers { : (e: string | React.ChangeEvent) => void; }; - getFieldProps: (props: any) => FieldInputProps; + getFieldProps: ( + props: string | FieldConfig + ) => FieldInputProps; getFieldMeta: (name: string) => FieldMetaProps; getFieldHelpers: (name: string) => FieldHelperProps; } @@ -177,7 +180,7 @@ export interface FormikConfig extends FormikSharedConfig { /** * Form component to render */ - component?: React.ComponentType> | React.ReactNode; + component?: React.ComponentType>; /** * Render prop (works like React router's } />) @@ -262,7 +265,7 @@ export interface SharedRenderProps { /** * Field component to render. Can either be a string like 'select' or a component. */ - component?: string | React.ComponentType; + component?: keyof JSX.IntrinsicElements | React.ComponentType; /** * Render prop (works like React router's } />) diff --git a/packages/formik/src/withFormik.tsx b/packages/formik/src/withFormik.tsx index a9cb753b3..8585be13d 100644 --- a/packages/formik/src/withFormik.tsx +++ b/packages/formik/src/withFormik.tsx @@ -81,7 +81,7 @@ export interface WithFormikConfig< export type CompositeComponent

= | React.ComponentClass

- | React.StatelessComponent

; + | React.FunctionComponent

; export interface ComponentDecorator { (component: CompositeComponent): React.ComponentType; diff --git a/packages/formik/test/ErrorMessage.test.tsx b/packages/formik/test/ErrorMessage.test.tsx index 03279a5e1..3de98df53 100644 --- a/packages/formik/test/ErrorMessage.test.tsx +++ b/packages/formik/test/ErrorMessage.test.tsx @@ -45,6 +45,7 @@ fdescribe('', () => { await act(async () => { await actualFProps.setFieldTouched('email'); + await actualFProps.setFieldError('email', message); }); // Renders after being visited with an error. diff --git a/packages/formik/test/FieldArray.test.tsx b/packages/formik/test/FieldArray.test.tsx index 9fb7a835a..2ecd86d0f 100644 --- a/packages/formik/test/FieldArray.test.tsx +++ b/packages/formik/test/FieldArray.test.tsx @@ -2,7 +2,7 @@ import { act, fireEvent, render, screen } from '@testing-library/react'; import * as React from 'react'; import * as Yup from 'yup'; -import { FieldArray, Formik, isFunction } from '../src'; +import { FieldArray, FieldArrayRenderProps, Formik, isFunction } from '../src'; const noop = () => {}; @@ -80,7 +80,7 @@ describe('', () => { describe('props.push()', () => { it('should add a value to the end of the field array', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -154,7 +154,7 @@ describe('', () => { it('should push clone not actual reference', () => { let personTemplate = { firstName: '', lastName: '' }; let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -187,7 +187,7 @@ describe('', () => { describe('props.pop()', () => { it('should remove and return the last value from the field array', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -217,7 +217,7 @@ describe('', () => { describe('props.swap()', () => { it('should swap two values in field array', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -246,7 +246,7 @@ describe('', () => { describe('props.insert()', () => { it('should insert a value at given index of field array', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -275,7 +275,7 @@ describe('', () => { describe('props.replace()', () => { it('should replace a value at given index of field array', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -304,7 +304,7 @@ describe('', () => { describe('props.unshift()', () => { it('should add a value to start of field array and return its length', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -334,7 +334,7 @@ describe('', () => { describe('props.remove()', () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; beforeEach(() => { render( @@ -396,7 +396,7 @@ describe('', () => { describe('given array-like object representing errors', () => { it('should run arrayHelpers successfully', async () => { let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; render( {(props: any) => { @@ -440,7 +440,7 @@ describe('', () => { }); let formikBag: any; - let arrayHelpers: any; + let arrayHelpers: FieldArrayRenderProps; beforeEach(() => { render( diff --git a/packages/formik/test/Formik.test.tsx b/packages/formik/test/Formik.test.tsx index 7d13ba81e..2acf332dd 100644 --- a/packages/formik/test/Formik.test.tsx +++ b/packages/formik/test/Formik.test.tsx @@ -12,6 +12,7 @@ import { Formik, FormikConfig, FormikProps, + FormikValues, prepareDataForValidation, } from '../src'; import { noop } from './testHelpers'; @@ -60,10 +61,12 @@ const InitialValues = { age: 30, }; -function renderFormik(props?: Partial>) { +function renderFormik( + props?: Partial> +) { let injected: FormikProps; const { rerender, ...rest } = render( - onSubmit={noop as any} initialValues={InitialValues as any} {...props} @@ -1397,6 +1400,7 @@ describe('', () => { const validate = () => ({ users: [{ firstName: 'required' }], }); + const validationSchema = Yup.object({ users: Yup.array().of( Yup.object({ @@ -1413,10 +1417,10 @@ describe('', () => { await act(async () => { await getProps().validateForm(); + }); - expect(getProps().errors).toEqual({ - users: [{ firstName: 'required', lastName: 'required' }], - }); + expect(getProps().errors).toEqual({ + users: [{ firstName: 'required', lastName: 'required' }], }); }); @@ -1435,8 +1439,8 @@ describe('', () => { await act(async () => { try { await getProps().validateForm(); - } catch ({ message }) { - caughtError = message; + } catch (err) { + caughtError = (err as Yup.ValidationError).message; } }); diff --git a/packages/formik/test/tsconfig.json b/packages/formik/test/tsconfig.json index 574b65560..a3b0db094 100644 --- a/packages/formik/test/tsconfig.json +++ b/packages/formik/test/tsconfig.json @@ -1,5 +1,5 @@ { // Hack to fix https://github.com/formium/tsdx/issues/84#issuecomment-489690504 - "extends": "../tsconfig.build.json", + "extends": "../../../tsconfig.json", "include": ["."] } diff --git a/packages/formik/tsconfig.build.json b/packages/formik/tsconfig.build.json index 44bed6a53..89bd1898e 100644 --- a/packages/formik/tsconfig.build.json +++ b/packages/formik/tsconfig.build.json @@ -1,6 +1,6 @@ { "extends": "../../tsconfig.base.json", - "include": ["src", "types", "../../types"], + "include": ["src", "types"], "compilerOptions": { "rootDir": "./src" } diff --git a/tsconfig.base.json b/tsconfig.base.json index 71c163d7e..60d8dc882 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,11 +1,10 @@ { - "compilerOptions": { "module": "esnext", "lib": ["dom", "esnext"], "importHelpers": true, "noImplicitAny": true, - "alwaysStrict": true, + "alwaysStrict": true, // output .d.ts declaration files for consumers "declaration": true, // output .js.map sourcemap files for consumers @@ -29,6 +28,6 @@ // error out if import and file system have a casing mismatch. Recommended by TS "forceConsistentCasingInFileNames": true, // `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc` - "noEmit": true, + "noEmit": true } } diff --git a/yarn.lock b/yarn.lock index 5d12aa245..3ab24f7da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1495,14 +1495,6 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime-corejs3@^7.10.2": - version "7.22.3" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.22.3.tgz#a684fb6b2eb987d9eb4ee7f1bba832473a29f0f1" - integrity sha512-6bdmknScYKmt8I9VjsJuKKGr+TwUb555FTf6tT1P/ANlCjTHCiYLhiQ4X/O7J731w5NOqu8c1aYHEVuOwPz7jA== - dependencies: - core-js-pure "^3.30.2" - regenerator-runtime "^0.13.11" - "@babel/runtime-corejs3@^7.7.4": version "7.7.6" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.7.6.tgz#5b1044ea11b659d288f77190e19c62da959ed9a3" @@ -1518,13 +1510,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0": - version "7.22.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb" - integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== - dependencies: - regenerator-runtime "^0.13.11" - "@babel/runtime@^7.10.4", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" @@ -1532,6 +1517,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.5", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0": + version "7.22.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb" + integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== + dependencies: + regenerator-runtime "^0.13.11" + "@babel/runtime@^7.4.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.4": version "7.7.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.6.tgz#d18c511121aff1b4f2cd1d452f1bac9601dd830f" @@ -2174,17 +2166,6 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" - integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" @@ -3571,32 +3552,33 @@ dependencies: mini-svg-data-uri "^1.2.3" -"@testing-library/dom@^7.28.1": - version "7.31.2" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.2.tgz#df361db38f5212b88555068ab8119f5d841a8c4a" - integrity sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ== +"@testing-library/dom@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.0.tgz#ed8ce10aa5e05eb6eaf0635b5b8975d889f66075" + integrity sha512-Dffe68pGwI6WlLRYR2I0piIkyole9cSBH5jGQKCGMRpHW5RHCqAUaqc2Kv0tUyd4dU4DLPKhJIjyKOnjv4tuUw== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" - "@types/aria-query" "^4.2.0" - aria-query "^4.2.2" + "@types/aria-query" "^5.0.1" + aria-query "^5.0.0" chalk "^4.1.0" - dom-accessibility-api "^0.5.6" - lz-string "^1.4.4" - pretty-format "^26.6.2" + dom-accessibility-api "^0.5.9" + lz-string "^1.5.0" + pretty-format "^27.0.2" -"@testing-library/react@^11.1.0": - version "11.2.7" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-11.2.7.tgz#b29e2e95c6765c815786c0bc1d5aed9cb2bf7818" - integrity sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA== +"@testing-library/react@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.0.0.tgz#59030392a6792450b9ab8e67aea5f3cc18d6347c" + integrity sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg== dependencies: "@babel/runtime" "^7.12.5" - "@testing-library/dom" "^7.28.1" + "@testing-library/dom" "^9.0.0" + "@types/react-dom" "^18.0.0" -"@types/aria-query@^4.2.0": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc" - integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig== +"@types/aria-query@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" + integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== "@types/async-retry@1.2.1": version "1.2.1" @@ -3722,14 +3704,7 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^25.2.1": +"@types/jest@^25.0.0", "@types/jest@^25.2.1": version "25.2.3" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.2.3.tgz#33d27e4c4716caae4eced355097a47ad363fdcaf" integrity sha512-JXc1nK/tXHiDhV55dvfzqtmP4S3sy3T3ouV2tkViZgxY/zeUkcpQcQPGRlgF4KmWzWW5oiWYSZwtCB+2RsE4Fw== @@ -3737,14 +3712,6 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/jest@^26.0.14": - version "26.0.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.14.tgz#078695f8f65cb55c5a98450d65083b2b73e5a3f3" - integrity sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg== - dependencies: - jest-diff "^25.2.1" - pretty-format "^25.2.1" - "@types/json-schema@^7.0.3": version "7.0.3" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" @@ -3828,18 +3795,11 @@ integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== "@types/prop-types@*": - version "15.7.3" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" - integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== + version "15.7.5" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-dom@^16.9.9": - version "16.9.9" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.9.tgz#d2d0a6f720a0206369ccbefff752ba37b9583136" - integrity sha512-jE16FNWO3Logq/Lf+yvEAjKzhpST/Eac8EMd1i4dgZdMczfgqC8EjpxwNgEe3SExHYLliabXDh9DEhhqnlXJhg== - dependencies: - "@types/react" "*" - -"@types/react-dom@^18.2.4": +"@types/react-dom@^18.0.0", "@types/react-dom@^18.2.4": version "18.2.4" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.4.tgz#13f25bfbf4e404d26f62ac6e406591451acba9e0" integrity sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw== @@ -3860,15 +3820,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.9.55": - version "16.9.55" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.55.tgz#47078587f5bfe028a23b6b46c7b94ac0d436acff" - integrity sha512-6KLe6lkILeRwyyy7yG9rULKJ0sXplUsl98MGoCfpteXf9sPWFWWMknDcsvubcpaTdBuxtsLF6HDUwdApZL/xIg== - dependencies: - "@types/prop-types" "*" - csstype "^3.0.2" - -"@types/react@^18.2.7": +"@types/react@*", "@types/react@^18.2.7": version "18.2.7" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.7.tgz#dfb4518042a3117a045b8c222316f83414a783b3" integrity sha512-ojrXpSH2XFCmHm7Jy3q44nXDyN54+EYKP2lBhJ2bqfyPj6cIUW/FZW/Csdia34NQgq7KYcAlHi5184m4X88+yw== @@ -4367,6 +4319,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -4439,15 +4396,7 @@ aria-query@^3.0.0: ast-types-flow "0.0.7" commander "^2.11.0" -aria-query@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" - integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA== - dependencies: - "@babel/runtime" "^7.10.2" - "@babel/runtime-corejs3" "^7.10.2" - -aria-query@^5.1.3: +aria-query@^5.0.0, aria-query@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== @@ -5756,11 +5705,6 @@ core-js-pure@^3.0.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.4.8.tgz#a4415834383784e81974cd34321daf36a6d2366e" integrity sha512-K9iPNbLDZ0Epojwd8J3lhodmrLHYvxb07H3DaFme1ne4TIlFq/ufiyPC40rc3OX6NCaVa0zaSu+VV6BVDR2wiA== -core-js-pure@^3.30.2: - version "3.30.2" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.30.2.tgz#005a82551f4af3250dcfb46ed360fad32ced114e" - integrity sha512-p/npFUJXXBkCCTIlEGBdghofn00jWG6ZOtdoIXSJmAu2QBvN0IqpZXWweOytcwE6cfx8ZvVUy1vw8zxhe4Y2vg== - core-js@^2.2.2, core-js@^2.4.1: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" @@ -5882,9 +5826,9 @@ cssstyle@^2.0.0: cssom "~0.3.6" csstype@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.3.tgz#2b410bbeba38ba9633353aff34b05d9755d065f8" - integrity sha512-jPl+wbWPOWJ7SXsWyqGRk3lGecbar0Cb0OvZF/r/ZU011R4YqiRehgkQ9p4eQfo9DSDLqLL3wHwfxeJiuIsNag== + version "3.1.2" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== csv-generate@^3.2.4: version "3.2.4" @@ -6236,7 +6180,7 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-accessibility-api@^0.5.6: +dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== @@ -10289,7 +10233,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lz-string@^1.4.4: +lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== @@ -12180,14 +12124,13 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" - integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== +pretty-format@^27.0.2: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== dependencies: - "@jest/types" "^26.6.2" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" react-is "^17.0.1" prism-react-renderer@^1.2.1: @@ -12424,15 +12367,6 @@ react-devtools-core@^3.6.0: shell-quote "^1.6.1" ws "^3.3.1" -react-dom@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" - react-dom@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -12558,14 +12492,6 @@ react-transform-hmr@^1.0.4: global "^4.3.0" react-proxy "^1.1.7" -react@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" @@ -13444,14 +13370,6 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -13658,10 +13576,10 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -shelljs@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== +shelljs@0.8.5, shelljs@^0.8.3: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -14751,7 +14669,7 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: +tslib@^2.0.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: version "2.5.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== @@ -14904,17 +14822,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.7.3: - version "3.7.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69" - integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw== - -typescript@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" - integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== - -typescript@^4.4.3: +typescript@^3.7.3, typescript@^4.0.0, typescript@^4.0.3, typescript@^4.4.3: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==