@stokr/components-library 3.0.66 → 3.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/Collapse.js +4 -0
- package/dist/_virtual/Component.js +4 -0
- package/dist/_virtual/Range.js +4 -0
- package/dist/_virtual/ResizeObserver.es.js +6 -0
- package/dist/_virtual/UnmountClosed.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +38 -0
- package/dist/_virtual/arrows.js +4 -0
- package/dist/_virtual/attributes-to-props.js +4 -0
- package/dist/_virtual/constants.js +4 -0
- package/dist/_virtual/default-props.js +4 -0
- package/dist/_virtual/defaultRenderElements.js +4 -0
- package/dist/_virtual/dom-to-react.js +4 -0
- package/dist/_virtual/domparser.js +4 -0
- package/dist/_virtual/dots.js +4 -0
- package/dist/_virtual/getInnerHeight.js +4 -0
- package/dist/_virtual/getInnerWidth.js +4 -0
- package/dist/_virtual/getScrollbarWidth.js +4 -0
- package/dist/_virtual/hoist-non-react-statics.cjs.js +2 -0
- package/dist/_virtual/html-to-dom.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index11.js +7 -0
- package/dist/_virtual/index12.js +7 -0
- package/dist/_virtual/index13.js +7 -0
- package/dist/_virtual/index14.js +4 -0
- package/dist/_virtual/index15.js +7 -0
- package/dist/_virtual/index16.js +7 -0
- package/dist/_virtual/index17.js +7 -0
- package/dist/_virtual/index18.js +4 -0
- package/dist/_virtual/index19.js +4 -0
- package/dist/_virtual/index2.js +7 -0
- package/dist/_virtual/index20.js +4 -0
- package/dist/_virtual/index21.js +4 -0
- package/dist/_virtual/index22.js +4 -0
- package/dist/_virtual/index23.js +4 -0
- package/dist/_virtual/index24.js +4 -0
- package/dist/_virtual/index25.js +4 -0
- package/dist/_virtual/index26.js +4 -0
- package/dist/_virtual/index27.js +4 -0
- package/dist/_virtual/index28.js +4 -0
- package/dist/_virtual/index29.js +4 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index30.js +4 -0
- package/dist/_virtual/index31.js +4 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index7.js +7 -0
- package/dist/_virtual/index8.js +4 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/initial-state.js +4 -0
- package/dist/_virtual/inner-slider.js +4 -0
- package/dist/_virtual/innerSliderUtils.js +4 -0
- package/dist/_virtual/isString.js +4 -0
- package/dist/_virtual/node.js +4 -0
- package/dist/_virtual/performance-now.js +4 -0
- package/dist/_virtual/popper.js +6 -0
- package/dist/_virtual/possibleStandardNamesOptimized.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/_virtual/react-table.development.js +4 -0
- package/dist/_virtual/react-table.production.min.js +4 -0
- package/dist/_virtual/react-tippy.js +5 -0
- package/dist/_virtual/react-tippy2.js +4 -0
- package/dist/_virtual/returnFalse.js +4 -0
- package/dist/_virtual/slider.js +4 -0
- package/dist/_virtual/styles.js +4 -0
- package/dist/_virtual/track.js +4 -0
- package/dist/_virtual/types.js +4 -0
- package/dist/_virtual/utilities.js +4 -0
- package/dist/_virtual/utilities2.js +4 -0
- package/dist/_virtual/utilities3.js +4 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/analytics/index.js +1 -1
- package/dist/api/fetchData.js +2 -2
- package/dist/components/2FA/Connect2FA.js +1 -1
- package/dist/components/2FA/EnterCode.js +1 -1
- package/dist/components/2FA/Sucess2FA.js +1 -1
- package/dist/components/2FA/login-with-otp-flow.js +47 -12
- package/dist/components/2FA/main-flow.js +29 -5
- package/dist/components/AccountBalance/AccountBalance.js +1 -1
- package/dist/components/AdminDashboard/Table/ReactTable.js +5 -5
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +1 -1
- package/dist/components/AdminDashboard/Table/Table.js +1 -1
- package/dist/components/AgreementItem/AgreementItem.js +1 -1
- package/dist/components/BackButton/BackButton.js +1 -1
- package/dist/components/Background/Background.js +1 -1
- package/dist/components/BasicTable/BasicTable.js +1 -1
- package/dist/components/BlogPost/BlogPost.js +1 -1
- package/dist/components/Button/Button.styles.js +1 -1
- package/dist/components/Button/GlareButton.js +2 -2
- package/dist/components/ChartLegend/ChartLegend.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checklist/ChecklistCard.js +1 -1
- package/dist/components/Chips/Chip.js +1 -1
- package/dist/components/Chips/ChipWrapper.js +1 -1
- package/dist/components/ComponentScroll/ComponentScroll.js +3 -3
- package/dist/components/Country/CountrySelect.js +4 -4
- package/dist/components/CryptoAddress/ComponentWrap.js +1 -1
- package/dist/components/CryptoAddress/CryptoAddress.js +7 -7
- package/dist/components/CryptoAddress/RadioWrap.js +1 -1
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +1 -1
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +1 -1
- package/dist/components/FAQ/FAQ.js +1 -1
- package/dist/components/FAQ/FAQ.styles.js +2 -2
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/FooterLayout.js +1 -1
- package/dist/components/Footer/FooterMenu.js +3 -3
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +5 -5
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.styles.js +1 -1
- package/dist/components/Header/Header.js +3 -3
- package/dist/components/HeroBlock/HeroVideoBlock.js +1 -1
- package/dist/components/IdentityInfo/IdentityInfo.js +1 -1
- package/dist/components/InfoIcon/InfoIcon.js +6 -6
- package/dist/components/Input/DatePickerInput.js +5 -3
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/InputPassword.js +1 -1
- package/dist/components/Input/InputUsername.js +1 -1
- package/dist/components/Input/InputWithButton.js +1 -1
- package/dist/components/Input/MultiSelect.js +4 -3
- package/dist/components/Input/OtpInput.js +2 -2
- package/dist/components/Input/RangeInput.js +4 -4
- package/dist/components/Input/Select.js +5 -4
- package/dist/components/Input/TableFilterDropdown.js +1 -1
- package/dist/components/InvestmentStat/InvestmentStat.js +1 -1
- package/dist/components/LatestUpdate/LatestUpdate.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/LoginModal/LoginModal.js +6 -6
- package/dist/components/MainMenu/DynamicMainMenu.js +3 -3
- package/dist/components/MainMenu/MainMenu.js +6 -6
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +9 -9
- package/dist/components/Modal/PaymentModal.js +2 -2
- package/dist/components/Modal/SuccessModal/SuccessModal.js +3 -3
- package/dist/components/MultiProgressBar/MultiProgressBar.js +1 -1
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/PageTransition/PageTransition.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/PaginationControls.js +1 -1
- package/dist/components/Payment/PaymentDisplay.js +4 -4
- package/dist/components/Payment/TimerComponent.js +1 -1
- package/dist/components/ProfileBadge/ProfileBadge.js +1 -1
- package/dist/components/ProfileBox/ProfileBox.js +1 -1
- package/dist/components/ProfileStat/ProfileStat.js +1 -1
- package/dist/components/QRCode/QRCode.js +2 -2
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RefreshButton/RefreshButton.js +1 -1
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +1 -1
- package/dist/components/RegisterModal/RegisterModal.js +8 -8
- package/dist/components/RequestDataBox/RequestDataBox.js +1 -1
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +1 -1
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +6 -6
- package/dist/components/SEO/SEO.js +3 -3
- package/dist/components/Slider/Slider.js +4 -4
- package/dist/components/SmartLink/SmartLink.js +1 -1
- package/dist/components/Snackbar/Snackbar.js +1 -1
- package/dist/components/Snackbar/SnackbarProvider.js +1 -1
- package/dist/components/StepController/StepController.js +1 -1
- package/dist/components/StepController/StepControllerContext.js +1 -1
- package/dist/components/StepController/StepControllerProgress.js +1 -1
- package/dist/components/StepsProgress/StepIndicator.js +1 -1
- package/dist/components/StepsProgress/StepsProgress.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/TabsNav/TabNav.js +1 -1
- package/dist/components/TabsNav/TabsNav.js +1 -1
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -1
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +2 -2
- package/dist/components/TeamOverview/TeamOverview.js +1 -1
- package/dist/components/TermsModal/TermsModal.js +5 -5
- package/dist/components/Timeline/TimelineStep.js +1 -1
- package/dist/components/ToDoList/ToDoList.js +3 -3
- package/dist/components/ToDoList/ToDoListTask.js +4 -4
- package/dist/components/TransactionDetails/TransactionDetails.js +1 -1
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +2 -2
- package/dist/components/TransactionInfo/TransactionInfo.js +1 -1
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +5 -5
- package/dist/components/headerHo/HeaderHo.js +3 -1
- package/dist/components/logo/Logo.js +1 -1
- package/dist/components/taxId/register-taxid.js +4 -4
- package/dist/components-library.css +781 -0
- package/dist/context/Auth.js +15 -12
- package/dist/context/AuthContext.js +7 -6
- package/dist/firebase-config.js +4 -2
- package/dist/hooks/useNewVentureForm.js +1 -1
- package/dist/index.js +5 -4
- package/dist/model/axios.js +2 -1
- package/dist/model/axiosPublic.js +2 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/createSuper.js +17 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +16 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +24 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +25 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
- package/dist/node_modules/@date-fns/tz/date/index.js +66 -0
- package/dist/node_modules/@date-fns/tz/date/mini.js +124 -0
- package/dist/node_modules/@date-fns/tz/tzName/index.js +11 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +28 -0
- package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +345 -0
- package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.js +31 -0
- package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +10 -0
- package/dist/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js +84 -0
- package/dist/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +50 -0
- package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +169 -0
- package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +83 -0
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +53 -0
- package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js +9 -0
- package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js +45 -0
- package/dist/node_modules/@firebase/app/dist/esm/index.esm.js +609 -0
- package/dist/node_modules/@firebase/auth/dist/esm/index-36fcbc82.js +5751 -0
- package/dist/node_modules/@firebase/component/dist/esm/index.esm.js +291 -0
- package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js +106 -0
- package/dist/node_modules/@firebase/util/dist/index.esm.js +828 -0
- package/dist/node_modules/@firebase/util/dist/postinstall.js +4 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +257 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +122 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +34 -0
- package/dist/node_modules/@lottiefiles/dotlottie-react/dist/index.js +53 -0
- package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js +1973 -0
- package/dist/node_modules/add-px-to-style/index.js +48 -0
- package/dist/node_modules/axios/index.js +38 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js +71 -0
- package/dist/node_modules/axios/lib/adapters/fetch.js +219 -0
- package/dist/node_modules/axios/lib/adapters/xhr.js +141 -0
- package/dist/node_modules/axios/lib/axios.js +50 -0
- package/dist/node_modules/axios/lib/cancel/CancelToken.js +99 -0
- package/dist/node_modules/axios/lib/cancel/CanceledError.js +20 -0
- package/dist/node_modules/axios/lib/cancel/isCancel.js +6 -0
- package/dist/node_modules/axios/lib/core/Axios.js +188 -0
- package/dist/node_modules/axios/lib/core/AxiosError.js +67 -0
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js +231 -0
- package/dist/node_modules/axios/lib/core/InterceptorManager.js +66 -0
- package/dist/node_modules/axios/lib/core/buildFullPath.js +12 -0
- package/dist/node_modules/axios/lib/core/dispatchRequest.js +52 -0
- package/dist/node_modules/axios/lib/core/mergeConfig.js +88 -0
- package/dist/node_modules/axios/lib/core/settle.js +18 -0
- package/dist/node_modules/axios/lib/core/transformData.js +17 -0
- package/dist/node_modules/axios/lib/defaults/index.js +116 -0
- package/dist/node_modules/axios/lib/defaults/transitional.js +9 -0
- package/dist/node_modules/axios/lib/env/data.js +4 -0
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +34 -0
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +77 -0
- package/dist/node_modules/axios/lib/helpers/bind.js +8 -0
- package/dist/node_modules/axios/lib/helpers/buildURL.js +32 -0
- package/dist/node_modules/axios/lib/helpers/combineURLs.js +6 -0
- package/dist/node_modules/axios/lib/helpers/composeSignals.js +39 -0
- package/dist/node_modules/axios/lib/helpers/cookies.js +49 -0
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +54 -0
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +9 -0
- package/dist/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
- package/dist/node_modules/axios/lib/helpers/null.js +4 -0
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js +47 -0
- package/dist/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +41 -0
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js +46 -0
- package/dist/node_modules/axios/lib/helpers/speedometer.js +36 -0
- package/dist/node_modules/axios/lib/helpers/spread.js +8 -0
- package/dist/node_modules/axios/lib/helpers/throttle.js +35 -0
- package/dist/node_modules/axios/lib/helpers/toFormData.js +117 -0
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
- package/dist/node_modules/axios/lib/helpers/trackStream.js +80 -0
- package/dist/node_modules/axios/lib/helpers/validator.js +67 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/node_modules/axios/lib/platform/common/utils.js +15 -0
- package/dist/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/node_modules/axios/lib/utils.js +415 -0
- package/dist/node_modules/classnames/index.js +61 -0
- package/dist/node_modules/copy-to-clipboard/index.js +101 -0
- package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +6570 -0
- package/dist/node_modules/country-flag-icons/react/3x2/index.js +269 -0
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +652 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +62 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +58 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +20 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +23 -0
- package/dist/node_modules/date-fns/addDays.js +12 -0
- package/dist/node_modules/date-fns/addMonths.js +26 -0
- package/dist/node_modules/date-fns/addWeeks.js +7 -0
- package/dist/node_modules/date-fns/addYears.js +7 -0
- package/dist/node_modules/date-fns/constants.js +14 -0
- package/dist/node_modules/date-fns/constructFrom.js +11 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +19 -0
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +14 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +20 -0
- package/dist/node_modules/date-fns/eachYearOfInterval.js +20 -0
- package/dist/node_modules/date-fns/endOfISOWeek.js +7 -0
- package/dist/node_modules/date-fns/endOfMonth.js +11 -0
- package/dist/node_modules/date-fns/endOfWeek.js +15 -0
- package/dist/node_modules/date-fns/endOfYear.js +11 -0
- package/dist/node_modules/date-fns/format.js +77 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +12 -0
- package/dist/node_modules/date-fns/getDaysInMonth.js +14 -0
- package/dist/node_modules/date-fns/getDefaultOptions.js +7 -0
- package/dist/node_modules/date-fns/getISODay.js +8 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +25 -0
- package/dist/node_modules/date-fns/getMonth.js +7 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +28 -0
- package/dist/node_modules/date-fns/getYear.js +7 -0
- package/dist/node_modules/date-fns/isAfter.js +7 -0
- package/dist/node_modules/date-fns/isBefore.js +7 -0
- package/dist/node_modules/date-fns/isDate.js +6 -0
- package/dist/node_modules/date-fns/isSameDay.js +13 -0
- package/dist/node_modules/date-fns/isSameMonth.js +12 -0
- package/dist/node_modules/date-fns/isSameYear.js +12 -0
- package/dist/node_modules/date-fns/isValid.js +8 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +20 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +43 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +16 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +85 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +36 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +12 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +164 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +122 -0
- package/dist/node_modules/date-fns/locale/en-US.js +20 -0
- package/dist/node_modules/date-fns/max.js +16 -0
- package/dist/node_modules/date-fns/min.js +16 -0
- package/dist/node_modules/date-fns/parse/_lib/Parser.js +25 -0
- package/dist/node_modules/date-fns/parse/_lib/Setter.js +44 -0
- package/dist/node_modules/date-fns/parse/_lib/constants.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +44 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +44 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js +64 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +52 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js +45 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +44 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js +30 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +20 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +17 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +32 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +27 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +28 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +34 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +106 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +43 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +43 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +43 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +39 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +76 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +42 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +67 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +27 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +73 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +27 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +76 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +73 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +16 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +16 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js +47 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers.js +67 -0
- package/dist/node_modules/date-fns/parse/_lib/utils.js +117 -0
- package/dist/node_modules/date-fns/parse.js +123 -0
- package/dist/node_modules/date-fns/setDay.js +17 -0
- package/dist/node_modules/date-fns/setISODay.js +12 -0
- package/dist/node_modules/date-fns/setISOWeek.js +11 -0
- package/dist/node_modules/date-fns/setMonth.js +17 -0
- package/dist/node_modules/date-fns/setWeek.js +11 -0
- package/dist/node_modules/date-fns/setYear.js +11 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +7 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +13 -0
- package/dist/node_modules/date-fns/startOfMonth.js +10 -0
- package/dist/node_modules/date-fns/startOfWeek.js +15 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +17 -0
- package/dist/node_modules/date-fns/startOfYear.js +10 -0
- package/dist/node_modules/date-fns/toDate.js +7 -0
- package/dist/node_modules/date-fns/transpose.js +18 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +8 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js +9 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js +29 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js +89 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js +4 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js +81 -0
- package/dist/node_modules/date-fns-tz/dist/esm/format/formatters/index.js +125 -0
- package/dist/node_modules/date-fns-tz/dist/esm/format/index.js +24 -0
- package/dist/node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js +13 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toDate/index.js +305 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +14 -0
- package/dist/node_modules/deepmerge/dist/es.js +69 -0
- package/dist/node_modules/dom-css/index.js +65 -0
- package/dist/node_modules/domelementtype/lib/index.js +39 -0
- package/dist/node_modules/domhandler/lib/index.js +166 -0
- package/dist/node_modules/domhandler/lib/node.js +438 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +1020 -0
- package/dist/node_modules/firebase/app/dist/esm/index.esm.js +20 -0
- package/dist/node_modules/firebase/auth/dist/esm/index.esm.js +44 -0
- package/dist/node_modules/formik/dist/formik.esm.js +969 -0
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +92 -0
- package/dist/node_modules/html-dom-parser/lib/client/constants.js +55 -0
- package/dist/node_modules/html-dom-parser/lib/client/domparser.js +96 -0
- package/dist/node_modules/html-dom-parser/lib/client/html-to-dom.js +31 -0
- package/dist/node_modules/html-dom-parser/lib/client/utilities.js +96 -0
- package/dist/node_modules/html-react-parser/esm/index.js +5 -0
- package/dist/node_modules/html-react-parser/lib/attributes-to-props.js +64 -0
- package/dist/node_modules/html-react-parser/lib/dom-to-react.js +99 -0
- package/dist/node_modules/html-react-parser/lib/index.js +51 -0
- package/dist/node_modules/html-react-parser/lib/utilities.js +79 -0
- package/dist/node_modules/idb/build/index.js +69 -0
- package/dist/node_modules/idb/build/wrap-idb-value.js +148 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +142 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js +99 -0
- package/dist/node_modules/json2mq/index.js +55 -0
- package/dist/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/lodash-es/_Hash.js +21 -0
- package/dist/node_modules/lodash-es/_ListCache.js +21 -0
- package/dist/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/lodash-es/_MapCache.js +21 -0
- package/dist/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/lodash-es/_arrayEach.js +12 -0
- package/dist/node_modules/lodash-es/_arrayFilter.js +13 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +24 -0
- package/dist/node_modules/lodash-es/_arrayMap.js +10 -0
- package/dist/node_modules/lodash-es/_arrayPush.js +10 -0
- package/dist/node_modules/lodash-es/_assignValue.js +13 -0
- package/dist/node_modules/lodash-es/_assocIndexOf.js +13 -0
- package/dist/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +16 -0
- package/dist/node_modules/lodash-es/_baseClone.js +88 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +21 -0
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_baseGetTag.js +14 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsNative.js +22 -0
- package/dist/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +14 -0
- package/dist/node_modules/lodash-es/_baseKeys.js +19 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +10 -0
- package/dist/node_modules/lodash-es/_baseToString.js +21 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +16 -0
- package/dist/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/lodash-es/_cloneRegExp.js +9 -0
- package/dist/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +11 -0
- package/dist/node_modules/lodash-es/_copyObject.js +23 -0
- package/dist/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +12 -0
- package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_getRawTag.js +25 -0
- package/dist/node_modules/lodash-es/_getSymbols.js +17 -0
- package/dist/node_modules/lodash-es/_getSymbolsIn.js +16 -0
- package/dist/node_modules/lodash-es/_getTag.js +34 -0
- package/dist/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/lodash-es/_hashClear.js +8 -0
- package/dist/node_modules/lodash-es/_hashDelete.js +8 -0
- package/dist/node_modules/lodash-es/_hashGet.js +15 -0
- package/dist/node_modules/lodash-es/_hashHas.js +10 -0
- package/dist/node_modules/lodash-es/_hashSet.js +11 -0
- package/dist/node_modules/lodash-es/_initCloneArray.js +13 -0
- package/dist/node_modules/lodash-es/_initCloneByTag.js +43 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_isIndex.js +10 -0
- package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_listCacheClear.js +7 -0
- package/dist/node_modules/lodash-es/_listCacheDelete.js +20 -0
- package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/lodash-es/_listCacheSet.js +14 -0
- package/dist/node_modules/lodash-es/_mapCacheClear.js +14 -0
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +9 -0
- package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/lodash-es/_mapCacheSet.js +10 -0
- package/dist/node_modules/lodash-es/_memoizeCapped.js +15 -0
- package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +12 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +18 -0
- package/dist/node_modules/lodash-es/_objectToString.js +8 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_root.js +6 -0
- package/dist/node_modules/lodash-es/_stackClear.js +8 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +8 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +22 -0
- package/dist/node_modules/lodash-es/_stringToPath.js +16 -0
- package/dist/node_modules/lodash-es/_toKey.js +11 -0
- package/dist/node_modules/lodash-es/_toSource.js +18 -0
- package/dist/node_modules/lodash-es/clone.js +8 -0
- package/dist/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +13 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +11 -0
- package/dist/node_modules/lodash-es/isFunction.js +13 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isMap.js +8 -0
- package/dist/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +22 -0
- package/dist/node_modules/lodash-es/isSet.js +8 -0
- package/dist/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/memoize.js +22 -0
- package/dist/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toPath.js +16 -0
- package/dist/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/lodash.debounce/index.js +137 -0
- package/dist/node_modules/memoize-one/dist/memoize-one.esm.js +52 -0
- package/dist/node_modules/mixpanel-browser/dist/mixpanel.module.js +25533 -0
- package/dist/node_modules/object-assign/index.js +73 -0
- package/dist/node_modules/performance-now/lib/performance-now.js +42 -0
- package/dist/node_modules/popper.js/dist/esm/popper.js +1516 -0
- package/dist/node_modules/prefix-style/index.js +29 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +68 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +58 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +451 -0
- package/dist/node_modules/prop-types/index.js +20 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -0
- package/dist/node_modules/prop-types/lib/has.js +11 -0
- package/dist/node_modules/property-expr/index.js +105 -0
- package/dist/node_modules/qrcode.react/lib/esm/index.js +1099 -0
- package/dist/node_modules/raf/index.js +67 -0
- package/dist/node_modules/react-collapse/lib/Collapse.js +285 -0
- package/dist/node_modules/react-collapse/lib/UnmountClosed.js +278 -0
- package/dist/node_modules/react-collapse/lib/index.js +17 -0
- package/dist/node_modules/react-copy-to-clipboard/lib/Component.js +209 -0
- package/dist/node_modules/react-copy-to-clipboard/lib/index.js +14 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/defaultRenderElements.js +85 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/index.js +706 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/styles.js +67 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/index.js +24 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getInnerHeight.js +21 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getInnerWidth.js +21 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getScrollbarWidth.js +44 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/utils/isString.js +19 -0
- package/dist/node_modules/react-custom-scrollbars-4/lib/utils/returnFalse.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +325 -0
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +59 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +25 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +282 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +34 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +54 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +40 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +72 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +17 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +30 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +20 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +22 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getLabels.js +41 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +17 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +43 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +39 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +20 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +20 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +20 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +14 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +14 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +14 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js +62 -0
- package/dist/node_modules/react-day-picker/dist/esm/noonDateLib.js +145 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +33 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +33 -0
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +128 -0
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +100 -0
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +55 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js +53 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +52 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +17 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +61 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +26 -0
- package/dist/node_modules/react-fast-compare/index.js +63 -0
- package/dist/node_modules/react-helmet/es/Helmet.js +717 -0
- package/dist/node_modules/react-helmet/node_modules/react-fast-compare/index.js +81 -0
- package/dist/node_modules/react-intersection-observer/dist/index.js +178 -0
- package/dist/node_modules/react-is/cjs/react-is.development.js +157 -0
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +98 -0
- package/dist/node_modules/react-is/index.js +17 -0
- package/dist/node_modules/react-otp-input/lib/index.esm.js +168 -0
- package/dist/node_modules/react-portal/es/LegacyPortal.js +91 -0
- package/dist/node_modules/react-portal/es/Portal.js +74 -0
- package/dist/node_modules/react-portal/es/PortalCompat.js +12 -0
- package/dist/node_modules/react-portal/es/utils.js +4 -0
- package/dist/node_modules/react-property/lib/index.js +471 -0
- package/dist/node_modules/react-property/lib/possibleStandardNamesOptimized.js +499 -0
- package/dist/node_modules/react-range/lib/Range.js +592 -0
- package/dist/node_modules/react-range/lib/index.js +39 -0
- package/dist/node_modules/react-range/lib/types.js +19 -0
- package/dist/node_modules/react-range/lib/utils.js +318 -0
- package/dist/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +19 -0
- package/dist/node_modules/react-select/dist/Select-ef7c0426.esm.js +2317 -0
- package/dist/node_modules/react-select/dist/index-641ee5b8.esm.js +1071 -0
- package/dist/node_modules/react-select/dist/react-select.esm.js +20 -0
- package/dist/node_modules/react-select/dist/useCreatable-09aaeb9a.esm.js +75 -0
- package/dist/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +51 -0
- package/dist/node_modules/react-side-effect/lib/index.js +105 -0
- package/dist/node_modules/react-slick/lib/arrows.js +248 -0
- package/dist/node_modules/react-slick/lib/default-props.js +85 -0
- package/dist/node_modules/react-slick/lib/dots.js +192 -0
- package/dist/node_modules/react-slick/lib/index.js +22 -0
- package/dist/node_modules/react-slick/lib/initial-state.js +48 -0
- package/dist/node_modules/react-slick/lib/inner-slider.js +810 -0
- package/dist/node_modules/react-slick/lib/slider.js +333 -0
- package/dist/node_modules/react-slick/lib/track.js +330 -0
- package/dist/node_modules/react-slick/lib/utils/innerSliderUtils.js +730 -0
- package/dist/node_modules/react-table/dist/react-table.development.js +3684 -0
- package/dist/node_modules/react-table/dist/react-table.production.min.js +1637 -0
- package/dist/node_modules/react-table/index.js +17 -0
- package/dist/node_modules/react-tippy/dist/react-tippy.js +1981 -0
- package/dist/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +495 -0
- package/dist/node_modules/string-convert/camel2hyphen.js +16 -0
- package/dist/node_modules/style-to-js/cjs/index.js +31 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +42 -0
- package/dist/node_modules/style-to-object/cjs/index.js +38 -0
- package/dist/node_modules/stylis/src/Enum.js +20 -0
- package/dist/node_modules/stylis/src/Middleware.js +22 -0
- package/dist/node_modules/stylis/src/Parser.js +157 -0
- package/dist/node_modules/stylis/src/Serializer.js +29 -0
- package/dist/node_modules/stylis/src/Tokenizer.js +160 -0
- package/dist/node_modules/stylis/src/Utility.js +52 -0
- package/dist/node_modules/tiny-case/index.js +33 -0
- package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +16 -0
- package/dist/node_modules/to-camel-case/index.js +18 -0
- package/dist/node_modules/to-no-case/index.js +32 -0
- package/dist/node_modules/to-space-case/index.js +18 -0
- package/dist/node_modules/toggle-selection/index.js +42 -0
- package/dist/node_modules/toposort/index.js +79 -0
- package/dist/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +5 -0
- package/dist/node_modules/yup/index.esm.js +1921 -0
- package/dist/routing/RouterWrapper.js +1 -1
- package/dist/styles/global.js +2 -2
- package/dist/utils/copyToClipboard.js +7 -7
- package/dist/utils/delete-redirect-cookie-and-navigate.js +3 -3
- package/dist/utils/moment.js +2 -3
- package/dist/utils/redirect-url.js +2 -2
- package/dist/utils/set-redirect-cookie.js +2 -2
- package/dist/utils/transition.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,969 @@
|
|
|
1
|
+
import deepmerge_1 from "../../deepmerge/dist/es.js";
|
|
2
|
+
import isPlainObject from "../../lodash-es/isPlainObject.js";
|
|
3
|
+
import cloneDeep from "../../lodash-es/cloneDeep.js";
|
|
4
|
+
import { useImperativeHandle, useEffect, createElement, Children, forwardRef, useRef, useState, useCallback, useMemo, createContext, useContext, useLayoutEffect } from "react";
|
|
5
|
+
import isEqual from "../../../_virtual/index12.js";
|
|
6
|
+
import warning from "../../tiny-warning/dist/tiny-warning.esm.js";
|
|
7
|
+
import clone from "../../lodash-es/clone.js";
|
|
8
|
+
import toPath from "../../lodash-es/toPath.js";
|
|
9
|
+
import "../../../_virtual/hoist-non-react-statics.cjs.js";
|
|
10
|
+
function _extends() {
|
|
11
|
+
_extends = Object.assign || function(target) {
|
|
12
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
+
var source = arguments[i];
|
|
14
|
+
for (var key in source) {
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
+
target[key] = source[key];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return target;
|
|
21
|
+
};
|
|
22
|
+
return _extends.apply(this, arguments);
|
|
23
|
+
}
|
|
24
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
25
|
+
if (source == null) return {};
|
|
26
|
+
var target = {};
|
|
27
|
+
var sourceKeys = Object.keys(source);
|
|
28
|
+
var key, i;
|
|
29
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
30
|
+
key = sourceKeys[i];
|
|
31
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
32
|
+
target[key] = source[key];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
}
|
|
36
|
+
var FormikContext = /* @__PURE__ */ createContext(void 0);
|
|
37
|
+
FormikContext.displayName = "FormikContext";
|
|
38
|
+
var FormikProvider = FormikContext.Provider;
|
|
39
|
+
FormikContext.Consumer;
|
|
40
|
+
function useFormikContext() {
|
|
41
|
+
var formik = useContext(FormikContext);
|
|
42
|
+
!!!formik ? process.env.NODE_ENV !== "production" ? warning(false, "Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component.") : warning() : void 0;
|
|
43
|
+
return formik;
|
|
44
|
+
}
|
|
45
|
+
var isFunction = function isFunction2(obj) {
|
|
46
|
+
return typeof obj === "function";
|
|
47
|
+
};
|
|
48
|
+
var isObject = function isObject2(obj) {
|
|
49
|
+
return obj !== null && typeof obj === "object";
|
|
50
|
+
};
|
|
51
|
+
var isInteger = function isInteger2(obj) {
|
|
52
|
+
return String(Math.floor(Number(obj))) === obj;
|
|
53
|
+
};
|
|
54
|
+
var isString = function isString2(obj) {
|
|
55
|
+
return Object.prototype.toString.call(obj) === "[object String]";
|
|
56
|
+
};
|
|
57
|
+
var isEmptyChildren = function isEmptyChildren2(children) {
|
|
58
|
+
return Children.count(children) === 0;
|
|
59
|
+
};
|
|
60
|
+
var isPromise = function isPromise2(value) {
|
|
61
|
+
return isObject(value) && isFunction(value.then);
|
|
62
|
+
};
|
|
63
|
+
function getActiveElement(doc) {
|
|
64
|
+
doc = doc || (typeof document !== "undefined" ? document : void 0);
|
|
65
|
+
if (typeof doc === "undefined") {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
return doc.activeElement || doc.body;
|
|
70
|
+
} catch (e) {
|
|
71
|
+
return doc.body;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function getIn(obj, key, def, p) {
|
|
75
|
+
if (p === void 0) {
|
|
76
|
+
p = 0;
|
|
77
|
+
}
|
|
78
|
+
var path = toPath(key);
|
|
79
|
+
while (obj && p < path.length) {
|
|
80
|
+
obj = obj[path[p++]];
|
|
81
|
+
}
|
|
82
|
+
if (p !== path.length && !obj) {
|
|
83
|
+
return def;
|
|
84
|
+
}
|
|
85
|
+
return obj === void 0 ? def : obj;
|
|
86
|
+
}
|
|
87
|
+
function setIn(obj, path, value) {
|
|
88
|
+
var res = clone(obj);
|
|
89
|
+
var resVal = res;
|
|
90
|
+
var i = 0;
|
|
91
|
+
var pathArray = toPath(path);
|
|
92
|
+
for (; i < pathArray.length - 1; i++) {
|
|
93
|
+
var currentPath = pathArray[i];
|
|
94
|
+
var currentObj = getIn(obj, pathArray.slice(0, i + 1));
|
|
95
|
+
if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {
|
|
96
|
+
resVal = resVal[currentPath] = clone(currentObj);
|
|
97
|
+
} else {
|
|
98
|
+
var nextPath = pathArray[i + 1];
|
|
99
|
+
resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {
|
|
103
|
+
return obj;
|
|
104
|
+
}
|
|
105
|
+
if (value === void 0) {
|
|
106
|
+
delete resVal[pathArray[i]];
|
|
107
|
+
} else {
|
|
108
|
+
resVal[pathArray[i]] = value;
|
|
109
|
+
}
|
|
110
|
+
if (i === 0 && value === void 0) {
|
|
111
|
+
delete res[pathArray[i]];
|
|
112
|
+
}
|
|
113
|
+
return res;
|
|
114
|
+
}
|
|
115
|
+
function setNestedObjectValues(object, value, visited, response) {
|
|
116
|
+
if (visited === void 0) {
|
|
117
|
+
visited = /* @__PURE__ */ new WeakMap();
|
|
118
|
+
}
|
|
119
|
+
if (response === void 0) {
|
|
120
|
+
response = {};
|
|
121
|
+
}
|
|
122
|
+
for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {
|
|
123
|
+
var k = _Object$keys[_i];
|
|
124
|
+
var val = object[k];
|
|
125
|
+
if (isObject(val)) {
|
|
126
|
+
if (!visited.get(val)) {
|
|
127
|
+
visited.set(val, true);
|
|
128
|
+
response[k] = Array.isArray(val) ? [] : {};
|
|
129
|
+
setNestedObjectValues(val, value, visited, response[k]);
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
response[k] = value;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return response;
|
|
136
|
+
}
|
|
137
|
+
function formikReducer(state, msg) {
|
|
138
|
+
switch (msg.type) {
|
|
139
|
+
case "SET_VALUES":
|
|
140
|
+
return _extends({}, state, {
|
|
141
|
+
values: msg.payload
|
|
142
|
+
});
|
|
143
|
+
case "SET_TOUCHED":
|
|
144
|
+
return _extends({}, state, {
|
|
145
|
+
touched: msg.payload
|
|
146
|
+
});
|
|
147
|
+
case "SET_ERRORS":
|
|
148
|
+
if (isEqual(state.errors, msg.payload)) {
|
|
149
|
+
return state;
|
|
150
|
+
}
|
|
151
|
+
return _extends({}, state, {
|
|
152
|
+
errors: msg.payload
|
|
153
|
+
});
|
|
154
|
+
case "SET_STATUS":
|
|
155
|
+
return _extends({}, state, {
|
|
156
|
+
status: msg.payload
|
|
157
|
+
});
|
|
158
|
+
case "SET_ISSUBMITTING":
|
|
159
|
+
return _extends({}, state, {
|
|
160
|
+
isSubmitting: msg.payload
|
|
161
|
+
});
|
|
162
|
+
case "SET_ISVALIDATING":
|
|
163
|
+
return _extends({}, state, {
|
|
164
|
+
isValidating: msg.payload
|
|
165
|
+
});
|
|
166
|
+
case "SET_FIELD_VALUE":
|
|
167
|
+
return _extends({}, state, {
|
|
168
|
+
values: setIn(state.values, msg.payload.field, msg.payload.value)
|
|
169
|
+
});
|
|
170
|
+
case "SET_FIELD_TOUCHED":
|
|
171
|
+
return _extends({}, state, {
|
|
172
|
+
touched: setIn(state.touched, msg.payload.field, msg.payload.value)
|
|
173
|
+
});
|
|
174
|
+
case "SET_FIELD_ERROR":
|
|
175
|
+
return _extends({}, state, {
|
|
176
|
+
errors: setIn(state.errors, msg.payload.field, msg.payload.value)
|
|
177
|
+
});
|
|
178
|
+
case "RESET_FORM":
|
|
179
|
+
return _extends({}, state, msg.payload);
|
|
180
|
+
case "SET_FORMIK_STATE":
|
|
181
|
+
return msg.payload(state);
|
|
182
|
+
case "SUBMIT_ATTEMPT":
|
|
183
|
+
return _extends({}, state, {
|
|
184
|
+
touched: setNestedObjectValues(state.values, true),
|
|
185
|
+
isSubmitting: true,
|
|
186
|
+
submitCount: state.submitCount + 1
|
|
187
|
+
});
|
|
188
|
+
case "SUBMIT_FAILURE":
|
|
189
|
+
return _extends({}, state, {
|
|
190
|
+
isSubmitting: false
|
|
191
|
+
});
|
|
192
|
+
case "SUBMIT_SUCCESS":
|
|
193
|
+
return _extends({}, state, {
|
|
194
|
+
isSubmitting: false
|
|
195
|
+
});
|
|
196
|
+
default:
|
|
197
|
+
return state;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
var emptyErrors = {};
|
|
201
|
+
var emptyTouched = {};
|
|
202
|
+
function useFormik(_ref) {
|
|
203
|
+
var _ref$validateOnChange = _ref.validateOnChange, validateOnChange = _ref$validateOnChange === void 0 ? true : _ref$validateOnChange, _ref$validateOnBlur = _ref.validateOnBlur, validateOnBlur = _ref$validateOnBlur === void 0 ? true : _ref$validateOnBlur, _ref$validateOnMount = _ref.validateOnMount, validateOnMount = _ref$validateOnMount === void 0 ? false : _ref$validateOnMount, isInitialValid = _ref.isInitialValid, _ref$enableReinitiali = _ref.enableReinitialize, enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali, onSubmit = _ref.onSubmit, rest = _objectWithoutPropertiesLoose(_ref, ["validateOnChange", "validateOnBlur", "validateOnMount", "isInitialValid", "enableReinitialize", "onSubmit"]);
|
|
204
|
+
var props = _extends({
|
|
205
|
+
validateOnChange,
|
|
206
|
+
validateOnBlur,
|
|
207
|
+
validateOnMount,
|
|
208
|
+
onSubmit
|
|
209
|
+
}, rest);
|
|
210
|
+
var initialValues = useRef(props.initialValues);
|
|
211
|
+
var initialErrors = useRef(props.initialErrors || emptyErrors);
|
|
212
|
+
var initialTouched = useRef(props.initialTouched || emptyTouched);
|
|
213
|
+
var initialStatus = useRef(props.initialStatus);
|
|
214
|
+
var isMounted = useRef(false);
|
|
215
|
+
var fieldRegistry = useRef({});
|
|
216
|
+
if (process.env.NODE_ENV !== "production") {
|
|
217
|
+
useEffect(function() {
|
|
218
|
+
!(typeof isInitialValid === "undefined") ? process.env.NODE_ENV !== "production" ? warning(false, "isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.") : warning() : void 0;
|
|
219
|
+
}, []);
|
|
220
|
+
}
|
|
221
|
+
useEffect(function() {
|
|
222
|
+
isMounted.current = true;
|
|
223
|
+
return function() {
|
|
224
|
+
isMounted.current = false;
|
|
225
|
+
};
|
|
226
|
+
}, []);
|
|
227
|
+
var _React$useState = useState(0), setIteration = _React$useState[1];
|
|
228
|
+
var stateRef = useRef({
|
|
229
|
+
values: cloneDeep(props.initialValues),
|
|
230
|
+
errors: cloneDeep(props.initialErrors) || emptyErrors,
|
|
231
|
+
touched: cloneDeep(props.initialTouched) || emptyTouched,
|
|
232
|
+
status: cloneDeep(props.initialStatus),
|
|
233
|
+
isSubmitting: false,
|
|
234
|
+
isValidating: false,
|
|
235
|
+
submitCount: 0
|
|
236
|
+
});
|
|
237
|
+
var state = stateRef.current;
|
|
238
|
+
var dispatch = useCallback(function(action) {
|
|
239
|
+
var prev = stateRef.current;
|
|
240
|
+
stateRef.current = formikReducer(prev, action);
|
|
241
|
+
if (prev !== stateRef.current) setIteration(function(x) {
|
|
242
|
+
return x + 1;
|
|
243
|
+
});
|
|
244
|
+
}, []);
|
|
245
|
+
var runValidateHandler = useCallback(function(values, field) {
|
|
246
|
+
return new Promise(function(resolve, reject) {
|
|
247
|
+
var maybePromisedErrors = props.validate(values, field);
|
|
248
|
+
if (maybePromisedErrors == null) {
|
|
249
|
+
resolve(emptyErrors);
|
|
250
|
+
} else if (isPromise(maybePromisedErrors)) {
|
|
251
|
+
maybePromisedErrors.then(function(errors) {
|
|
252
|
+
resolve(errors || emptyErrors);
|
|
253
|
+
}, function(actualException) {
|
|
254
|
+
if (process.env.NODE_ENV !== "production") {
|
|
255
|
+
console.warn("Warning: An unhandled error was caught during validation in <Formik validate />", actualException);
|
|
256
|
+
}
|
|
257
|
+
reject(actualException);
|
|
258
|
+
});
|
|
259
|
+
} else {
|
|
260
|
+
resolve(maybePromisedErrors);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}, [props.validate]);
|
|
264
|
+
var runValidationSchema = useCallback(function(values, field) {
|
|
265
|
+
var validationSchema = props.validationSchema;
|
|
266
|
+
var schema = isFunction(validationSchema) ? validationSchema(field) : validationSchema;
|
|
267
|
+
var promise = field && schema.validateAt ? schema.validateAt(field, values) : validateYupSchema(values, schema);
|
|
268
|
+
return new Promise(function(resolve, reject) {
|
|
269
|
+
promise.then(function() {
|
|
270
|
+
resolve(emptyErrors);
|
|
271
|
+
}, function(err) {
|
|
272
|
+
if (err.name === "ValidationError") {
|
|
273
|
+
resolve(yupToFormErrors(err));
|
|
274
|
+
} else {
|
|
275
|
+
if (process.env.NODE_ENV !== "production") {
|
|
276
|
+
console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />", err);
|
|
277
|
+
}
|
|
278
|
+
reject(err);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}, [props.validationSchema]);
|
|
283
|
+
var runSingleFieldLevelValidation = useCallback(function(field, value) {
|
|
284
|
+
return new Promise(function(resolve) {
|
|
285
|
+
return resolve(fieldRegistry.current[field].validate(value));
|
|
286
|
+
});
|
|
287
|
+
}, []);
|
|
288
|
+
var runFieldLevelValidations = useCallback(function(values) {
|
|
289
|
+
var fieldKeysWithValidation = Object.keys(fieldRegistry.current).filter(function(f) {
|
|
290
|
+
return isFunction(fieldRegistry.current[f].validate);
|
|
291
|
+
});
|
|
292
|
+
var fieldValidations = fieldKeysWithValidation.length > 0 ? fieldKeysWithValidation.map(function(f) {
|
|
293
|
+
return runSingleFieldLevelValidation(f, getIn(values, f));
|
|
294
|
+
}) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
|
|
295
|
+
return Promise.all(fieldValidations).then(function(fieldErrorsList) {
|
|
296
|
+
return fieldErrorsList.reduce(function(prev, curr, index) {
|
|
297
|
+
if (curr === "DO_NOT_DELETE_YOU_WILL_BE_FIRED") {
|
|
298
|
+
return prev;
|
|
299
|
+
}
|
|
300
|
+
if (curr) {
|
|
301
|
+
prev = setIn(prev, fieldKeysWithValidation[index], curr);
|
|
302
|
+
}
|
|
303
|
+
return prev;
|
|
304
|
+
}, {});
|
|
305
|
+
});
|
|
306
|
+
}, [runSingleFieldLevelValidation]);
|
|
307
|
+
var runAllValidations = useCallback(function(values) {
|
|
308
|
+
return Promise.all([runFieldLevelValidations(values), props.validationSchema ? runValidationSchema(values) : {}, props.validate ? runValidateHandler(values) : {}]).then(function(_ref2) {
|
|
309
|
+
var fieldErrors = _ref2[0], schemaErrors = _ref2[1], validateErrors = _ref2[2];
|
|
310
|
+
var combinedErrors = deepmerge_1.all([fieldErrors, schemaErrors, validateErrors], {
|
|
311
|
+
arrayMerge
|
|
312
|
+
});
|
|
313
|
+
return combinedErrors;
|
|
314
|
+
});
|
|
315
|
+
}, [props.validate, props.validationSchema, runFieldLevelValidations, runValidateHandler, runValidationSchema]);
|
|
316
|
+
var validateFormWithHighPriority = useEventCallback(function(values) {
|
|
317
|
+
if (values === void 0) {
|
|
318
|
+
values = state.values;
|
|
319
|
+
}
|
|
320
|
+
dispatch({
|
|
321
|
+
type: "SET_ISVALIDATING",
|
|
322
|
+
payload: true
|
|
323
|
+
});
|
|
324
|
+
return runAllValidations(values).then(function(combinedErrors) {
|
|
325
|
+
if (!!isMounted.current) {
|
|
326
|
+
dispatch({
|
|
327
|
+
type: "SET_ISVALIDATING",
|
|
328
|
+
payload: false
|
|
329
|
+
});
|
|
330
|
+
dispatch({
|
|
331
|
+
type: "SET_ERRORS",
|
|
332
|
+
payload: combinedErrors
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
return combinedErrors;
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
useEffect(function() {
|
|
339
|
+
if (validateOnMount && isMounted.current === true && isEqual(initialValues.current, props.initialValues)) {
|
|
340
|
+
validateFormWithHighPriority(initialValues.current);
|
|
341
|
+
}
|
|
342
|
+
}, [validateOnMount, validateFormWithHighPriority]);
|
|
343
|
+
var resetForm = useCallback(function(nextState) {
|
|
344
|
+
var values = nextState && nextState.values ? nextState.values : initialValues.current;
|
|
345
|
+
var errors = nextState && nextState.errors ? nextState.errors : initialErrors.current ? initialErrors.current : props.initialErrors || {};
|
|
346
|
+
var touched = nextState && nextState.touched ? nextState.touched : initialTouched.current ? initialTouched.current : props.initialTouched || {};
|
|
347
|
+
var status = nextState && nextState.status ? nextState.status : initialStatus.current ? initialStatus.current : props.initialStatus;
|
|
348
|
+
initialValues.current = values;
|
|
349
|
+
initialErrors.current = errors;
|
|
350
|
+
initialTouched.current = touched;
|
|
351
|
+
initialStatus.current = status;
|
|
352
|
+
var dispatchFn = function dispatchFn2() {
|
|
353
|
+
dispatch({
|
|
354
|
+
type: "RESET_FORM",
|
|
355
|
+
payload: {
|
|
356
|
+
isSubmitting: !!nextState && !!nextState.isSubmitting,
|
|
357
|
+
errors,
|
|
358
|
+
touched,
|
|
359
|
+
status,
|
|
360
|
+
values,
|
|
361
|
+
isValidating: !!nextState && !!nextState.isValidating,
|
|
362
|
+
submitCount: !!nextState && !!nextState.submitCount && typeof nextState.submitCount === "number" ? nextState.submitCount : 0
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
if (props.onReset) {
|
|
367
|
+
var maybePromisedOnReset = props.onReset(state.values, imperativeMethods);
|
|
368
|
+
if (isPromise(maybePromisedOnReset)) {
|
|
369
|
+
maybePromisedOnReset.then(dispatchFn);
|
|
370
|
+
} else {
|
|
371
|
+
dispatchFn();
|
|
372
|
+
}
|
|
373
|
+
} else {
|
|
374
|
+
dispatchFn();
|
|
375
|
+
}
|
|
376
|
+
}, [props.initialErrors, props.initialStatus, props.initialTouched, props.onReset]);
|
|
377
|
+
useEffect(function() {
|
|
378
|
+
if (isMounted.current === true && !isEqual(initialValues.current, props.initialValues)) {
|
|
379
|
+
if (enableReinitialize) {
|
|
380
|
+
initialValues.current = props.initialValues;
|
|
381
|
+
resetForm();
|
|
382
|
+
if (validateOnMount) {
|
|
383
|
+
validateFormWithHighPriority(initialValues.current);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}, [enableReinitialize, props.initialValues, resetForm, validateOnMount, validateFormWithHighPriority]);
|
|
388
|
+
useEffect(function() {
|
|
389
|
+
if (enableReinitialize && isMounted.current === true && !isEqual(initialErrors.current, props.initialErrors)) {
|
|
390
|
+
initialErrors.current = props.initialErrors || emptyErrors;
|
|
391
|
+
dispatch({
|
|
392
|
+
type: "SET_ERRORS",
|
|
393
|
+
payload: props.initialErrors || emptyErrors
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
}, [enableReinitialize, props.initialErrors]);
|
|
397
|
+
useEffect(function() {
|
|
398
|
+
if (enableReinitialize && isMounted.current === true && !isEqual(initialTouched.current, props.initialTouched)) {
|
|
399
|
+
initialTouched.current = props.initialTouched || emptyTouched;
|
|
400
|
+
dispatch({
|
|
401
|
+
type: "SET_TOUCHED",
|
|
402
|
+
payload: props.initialTouched || emptyTouched
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}, [enableReinitialize, props.initialTouched]);
|
|
406
|
+
useEffect(function() {
|
|
407
|
+
if (enableReinitialize && isMounted.current === true && !isEqual(initialStatus.current, props.initialStatus)) {
|
|
408
|
+
initialStatus.current = props.initialStatus;
|
|
409
|
+
dispatch({
|
|
410
|
+
type: "SET_STATUS",
|
|
411
|
+
payload: props.initialStatus
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}, [enableReinitialize, props.initialStatus, props.initialTouched]);
|
|
415
|
+
var validateField = useEventCallback(function(name) {
|
|
416
|
+
if (fieldRegistry.current[name] && isFunction(fieldRegistry.current[name].validate)) {
|
|
417
|
+
var value = getIn(state.values, name);
|
|
418
|
+
var maybePromise = fieldRegistry.current[name].validate(value);
|
|
419
|
+
if (isPromise(maybePromise)) {
|
|
420
|
+
dispatch({
|
|
421
|
+
type: "SET_ISVALIDATING",
|
|
422
|
+
payload: true
|
|
423
|
+
});
|
|
424
|
+
return maybePromise.then(function(x) {
|
|
425
|
+
return x;
|
|
426
|
+
}).then(function(error) {
|
|
427
|
+
dispatch({
|
|
428
|
+
type: "SET_FIELD_ERROR",
|
|
429
|
+
payload: {
|
|
430
|
+
field: name,
|
|
431
|
+
value: error
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
dispatch({
|
|
435
|
+
type: "SET_ISVALIDATING",
|
|
436
|
+
payload: false
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
} else {
|
|
440
|
+
dispatch({
|
|
441
|
+
type: "SET_FIELD_ERROR",
|
|
442
|
+
payload: {
|
|
443
|
+
field: name,
|
|
444
|
+
value: maybePromise
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
return Promise.resolve(maybePromise);
|
|
448
|
+
}
|
|
449
|
+
} else if (props.validationSchema) {
|
|
450
|
+
dispatch({
|
|
451
|
+
type: "SET_ISVALIDATING",
|
|
452
|
+
payload: true
|
|
453
|
+
});
|
|
454
|
+
return runValidationSchema(state.values, name).then(function(x) {
|
|
455
|
+
return x;
|
|
456
|
+
}).then(function(error) {
|
|
457
|
+
dispatch({
|
|
458
|
+
type: "SET_FIELD_ERROR",
|
|
459
|
+
payload: {
|
|
460
|
+
field: name,
|
|
461
|
+
value: getIn(error, name)
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
dispatch({
|
|
465
|
+
type: "SET_ISVALIDATING",
|
|
466
|
+
payload: false
|
|
467
|
+
});
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
return Promise.resolve();
|
|
471
|
+
});
|
|
472
|
+
var registerField = useCallback(function(name, _ref3) {
|
|
473
|
+
var validate = _ref3.validate;
|
|
474
|
+
fieldRegistry.current[name] = {
|
|
475
|
+
validate
|
|
476
|
+
};
|
|
477
|
+
}, []);
|
|
478
|
+
var unregisterField = useCallback(function(name) {
|
|
479
|
+
delete fieldRegistry.current[name];
|
|
480
|
+
}, []);
|
|
481
|
+
var setTouched = useEventCallback(function(touched, shouldValidate) {
|
|
482
|
+
dispatch({
|
|
483
|
+
type: "SET_TOUCHED",
|
|
484
|
+
payload: touched
|
|
485
|
+
});
|
|
486
|
+
var willValidate = shouldValidate === void 0 ? validateOnBlur : shouldValidate;
|
|
487
|
+
return willValidate ? validateFormWithHighPriority(state.values) : Promise.resolve();
|
|
488
|
+
});
|
|
489
|
+
var setErrors = useCallback(function(errors) {
|
|
490
|
+
dispatch({
|
|
491
|
+
type: "SET_ERRORS",
|
|
492
|
+
payload: errors
|
|
493
|
+
});
|
|
494
|
+
}, []);
|
|
495
|
+
var setValues = useEventCallback(function(values, shouldValidate) {
|
|
496
|
+
var resolvedValues = isFunction(values) ? values(state.values) : values;
|
|
497
|
+
dispatch({
|
|
498
|
+
type: "SET_VALUES",
|
|
499
|
+
payload: resolvedValues
|
|
500
|
+
});
|
|
501
|
+
var willValidate = shouldValidate === void 0 ? validateOnChange : shouldValidate;
|
|
502
|
+
return willValidate ? validateFormWithHighPriority(resolvedValues) : Promise.resolve();
|
|
503
|
+
});
|
|
504
|
+
var setFieldError = useCallback(function(field, value) {
|
|
505
|
+
dispatch({
|
|
506
|
+
type: "SET_FIELD_ERROR",
|
|
507
|
+
payload: {
|
|
508
|
+
field,
|
|
509
|
+
value
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}, []);
|
|
513
|
+
var setFieldValue = useEventCallback(function(field, value, shouldValidate) {
|
|
514
|
+
var resolvedValue = isFunction(value) ? value(getIn(state.values, field)) : value;
|
|
515
|
+
dispatch({
|
|
516
|
+
type: "SET_FIELD_VALUE",
|
|
517
|
+
payload: {
|
|
518
|
+
field,
|
|
519
|
+
value: resolvedValue
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
var willValidate = shouldValidate === void 0 ? validateOnChange : shouldValidate;
|
|
523
|
+
return willValidate ? validateFormWithHighPriority(setIn(state.values, field, resolvedValue)) : Promise.resolve();
|
|
524
|
+
});
|
|
525
|
+
var executeChange = useCallback(function(eventOrTextValue, maybePath) {
|
|
526
|
+
var field = maybePath;
|
|
527
|
+
var val = eventOrTextValue;
|
|
528
|
+
var parsed;
|
|
529
|
+
if (!isString(eventOrTextValue)) {
|
|
530
|
+
if (eventOrTextValue.persist) {
|
|
531
|
+
eventOrTextValue.persist();
|
|
532
|
+
}
|
|
533
|
+
var target = eventOrTextValue.target ? eventOrTextValue.target : eventOrTextValue.currentTarget;
|
|
534
|
+
var type = target.type, name = target.name, id = target.id, value = target.value, checked = target.checked, outerHTML = target.outerHTML, options = target.options, multiple = target.multiple;
|
|
535
|
+
field = maybePath ? maybePath : name ? name : id;
|
|
536
|
+
if (!field && process.env.NODE_ENV !== "production") {
|
|
537
|
+
warnAboutMissingIdentifier({
|
|
538
|
+
htmlContent: outerHTML,
|
|
539
|
+
documentationAnchorLink: "handlechange-e-reactchangeeventany--void",
|
|
540
|
+
handlerName: "handleChange"
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
val = /number|range/.test(type) ? (parsed = parseFloat(value), isNaN(parsed) ? "" : parsed) : /checkbox/.test(type) ? getValueForCheckbox(getIn(state.values, field), checked, value) : options && multiple ? getSelectedValues(options) : value;
|
|
544
|
+
}
|
|
545
|
+
if (field) {
|
|
546
|
+
setFieldValue(field, val);
|
|
547
|
+
}
|
|
548
|
+
}, [setFieldValue, state.values]);
|
|
549
|
+
var handleChange = useEventCallback(function(eventOrPath) {
|
|
550
|
+
if (isString(eventOrPath)) {
|
|
551
|
+
return function(event) {
|
|
552
|
+
return executeChange(event, eventOrPath);
|
|
553
|
+
};
|
|
554
|
+
} else {
|
|
555
|
+
executeChange(eventOrPath);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
var setFieldTouched = useEventCallback(function(field, touched, shouldValidate) {
|
|
559
|
+
if (touched === void 0) {
|
|
560
|
+
touched = true;
|
|
561
|
+
}
|
|
562
|
+
dispatch({
|
|
563
|
+
type: "SET_FIELD_TOUCHED",
|
|
564
|
+
payload: {
|
|
565
|
+
field,
|
|
566
|
+
value: touched
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
var willValidate = shouldValidate === void 0 ? validateOnBlur : shouldValidate;
|
|
570
|
+
return willValidate ? validateFormWithHighPriority(state.values) : Promise.resolve();
|
|
571
|
+
});
|
|
572
|
+
var executeBlur = useCallback(function(e, path) {
|
|
573
|
+
if (e.persist) {
|
|
574
|
+
e.persist();
|
|
575
|
+
}
|
|
576
|
+
var _e$target = e.target, name = _e$target.name, id = _e$target.id, outerHTML = _e$target.outerHTML;
|
|
577
|
+
var field = path ? path : name ? name : id;
|
|
578
|
+
if (!field && process.env.NODE_ENV !== "production") {
|
|
579
|
+
warnAboutMissingIdentifier({
|
|
580
|
+
htmlContent: outerHTML,
|
|
581
|
+
documentationAnchorLink: "handleblur-e-any--void",
|
|
582
|
+
handlerName: "handleBlur"
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
setFieldTouched(field, true);
|
|
586
|
+
}, [setFieldTouched]);
|
|
587
|
+
var handleBlur = useEventCallback(function(eventOrString) {
|
|
588
|
+
if (isString(eventOrString)) {
|
|
589
|
+
return function(event) {
|
|
590
|
+
return executeBlur(event, eventOrString);
|
|
591
|
+
};
|
|
592
|
+
} else {
|
|
593
|
+
executeBlur(eventOrString);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
var setFormikState = useCallback(function(stateOrCb) {
|
|
597
|
+
if (isFunction(stateOrCb)) {
|
|
598
|
+
dispatch({
|
|
599
|
+
type: "SET_FORMIK_STATE",
|
|
600
|
+
payload: stateOrCb
|
|
601
|
+
});
|
|
602
|
+
} else {
|
|
603
|
+
dispatch({
|
|
604
|
+
type: "SET_FORMIK_STATE",
|
|
605
|
+
payload: function payload() {
|
|
606
|
+
return stateOrCb;
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}, []);
|
|
611
|
+
var setStatus = useCallback(function(status) {
|
|
612
|
+
dispatch({
|
|
613
|
+
type: "SET_STATUS",
|
|
614
|
+
payload: status
|
|
615
|
+
});
|
|
616
|
+
}, []);
|
|
617
|
+
var setSubmitting = useCallback(function(isSubmitting) {
|
|
618
|
+
dispatch({
|
|
619
|
+
type: "SET_ISSUBMITTING",
|
|
620
|
+
payload: isSubmitting
|
|
621
|
+
});
|
|
622
|
+
}, []);
|
|
623
|
+
var submitForm = useEventCallback(function() {
|
|
624
|
+
dispatch({
|
|
625
|
+
type: "SUBMIT_ATTEMPT"
|
|
626
|
+
});
|
|
627
|
+
return validateFormWithHighPriority().then(function(combinedErrors) {
|
|
628
|
+
var isInstanceOfError = combinedErrors instanceof Error;
|
|
629
|
+
var isActuallyValid = !isInstanceOfError && Object.keys(combinedErrors).length === 0;
|
|
630
|
+
if (isActuallyValid) {
|
|
631
|
+
var promiseOrUndefined;
|
|
632
|
+
try {
|
|
633
|
+
promiseOrUndefined = executeSubmit();
|
|
634
|
+
if (promiseOrUndefined === void 0) {
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
} catch (error) {
|
|
638
|
+
throw error;
|
|
639
|
+
}
|
|
640
|
+
return Promise.resolve(promiseOrUndefined).then(function(result) {
|
|
641
|
+
if (!!isMounted.current) {
|
|
642
|
+
dispatch({
|
|
643
|
+
type: "SUBMIT_SUCCESS"
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
return result;
|
|
647
|
+
})["catch"](function(_errors) {
|
|
648
|
+
if (!!isMounted.current) {
|
|
649
|
+
dispatch({
|
|
650
|
+
type: "SUBMIT_FAILURE"
|
|
651
|
+
});
|
|
652
|
+
throw _errors;
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
} else if (!!isMounted.current) {
|
|
656
|
+
dispatch({
|
|
657
|
+
type: "SUBMIT_FAILURE"
|
|
658
|
+
});
|
|
659
|
+
if (isInstanceOfError) {
|
|
660
|
+
throw combinedErrors;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
return;
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
var handleSubmit = useEventCallback(function(e) {
|
|
667
|
+
if (e && e.preventDefault && isFunction(e.preventDefault)) {
|
|
668
|
+
e.preventDefault();
|
|
669
|
+
}
|
|
670
|
+
if (e && e.stopPropagation && isFunction(e.stopPropagation)) {
|
|
671
|
+
e.stopPropagation();
|
|
672
|
+
}
|
|
673
|
+
if (process.env.NODE_ENV !== "production" && typeof document !== "undefined") {
|
|
674
|
+
var activeElement = getActiveElement();
|
|
675
|
+
if (activeElement !== null && activeElement instanceof HTMLButtonElement) {
|
|
676
|
+
!(activeElement.attributes && activeElement.attributes.getNamedItem("type")) ? process.env.NODE_ENV !== "production" ? warning(false, 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.') : warning() : void 0;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
submitForm()["catch"](function(reason) {
|
|
680
|
+
console.warn("Warning: An unhandled error was caught from submitForm()", reason);
|
|
681
|
+
});
|
|
682
|
+
});
|
|
683
|
+
var imperativeMethods = {
|
|
684
|
+
resetForm,
|
|
685
|
+
validateForm: validateFormWithHighPriority,
|
|
686
|
+
validateField,
|
|
687
|
+
setErrors,
|
|
688
|
+
setFieldError,
|
|
689
|
+
setFieldTouched,
|
|
690
|
+
setFieldValue,
|
|
691
|
+
setStatus,
|
|
692
|
+
setSubmitting,
|
|
693
|
+
setTouched,
|
|
694
|
+
setValues,
|
|
695
|
+
setFormikState,
|
|
696
|
+
submitForm
|
|
697
|
+
};
|
|
698
|
+
var executeSubmit = useEventCallback(function() {
|
|
699
|
+
return onSubmit(state.values, imperativeMethods);
|
|
700
|
+
});
|
|
701
|
+
var handleReset = useEventCallback(function(e) {
|
|
702
|
+
if (e && e.preventDefault && isFunction(e.preventDefault)) {
|
|
703
|
+
e.preventDefault();
|
|
704
|
+
}
|
|
705
|
+
if (e && e.stopPropagation && isFunction(e.stopPropagation)) {
|
|
706
|
+
e.stopPropagation();
|
|
707
|
+
}
|
|
708
|
+
resetForm();
|
|
709
|
+
});
|
|
710
|
+
var getFieldMeta = useCallback(function(name) {
|
|
711
|
+
return {
|
|
712
|
+
value: getIn(state.values, name),
|
|
713
|
+
error: getIn(state.errors, name),
|
|
714
|
+
touched: !!getIn(state.touched, name),
|
|
715
|
+
initialValue: getIn(initialValues.current, name),
|
|
716
|
+
initialTouched: !!getIn(initialTouched.current, name),
|
|
717
|
+
initialError: getIn(initialErrors.current, name)
|
|
718
|
+
};
|
|
719
|
+
}, [state.errors, state.touched, state.values]);
|
|
720
|
+
var getFieldHelpers = useCallback(function(name) {
|
|
721
|
+
return {
|
|
722
|
+
setValue: function setValue(value, shouldValidate) {
|
|
723
|
+
return setFieldValue(name, value, shouldValidate);
|
|
724
|
+
},
|
|
725
|
+
setTouched: function setTouched2(value, shouldValidate) {
|
|
726
|
+
return setFieldTouched(name, value, shouldValidate);
|
|
727
|
+
},
|
|
728
|
+
setError: function setError(value) {
|
|
729
|
+
return setFieldError(name, value);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
}, [setFieldValue, setFieldTouched, setFieldError]);
|
|
733
|
+
var getFieldProps = useCallback(function(nameOrOptions) {
|
|
734
|
+
var isAnObject = isObject(nameOrOptions);
|
|
735
|
+
var name = isAnObject ? nameOrOptions.name : nameOrOptions;
|
|
736
|
+
var valueState = getIn(state.values, name);
|
|
737
|
+
var field = {
|
|
738
|
+
name,
|
|
739
|
+
value: valueState,
|
|
740
|
+
onChange: handleChange,
|
|
741
|
+
onBlur: handleBlur
|
|
742
|
+
};
|
|
743
|
+
if (isAnObject) {
|
|
744
|
+
var type = nameOrOptions.type, valueProp = nameOrOptions.value, is = nameOrOptions.as, multiple = nameOrOptions.multiple;
|
|
745
|
+
if (type === "checkbox") {
|
|
746
|
+
if (valueProp === void 0) {
|
|
747
|
+
field.checked = !!valueState;
|
|
748
|
+
} else {
|
|
749
|
+
field.checked = !!(Array.isArray(valueState) && ~valueState.indexOf(valueProp));
|
|
750
|
+
field.value = valueProp;
|
|
751
|
+
}
|
|
752
|
+
} else if (type === "radio") {
|
|
753
|
+
field.checked = valueState === valueProp;
|
|
754
|
+
field.value = valueProp;
|
|
755
|
+
} else if (is === "select" && multiple) {
|
|
756
|
+
field.value = field.value || [];
|
|
757
|
+
field.multiple = true;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return field;
|
|
761
|
+
}, [handleBlur, handleChange, state.values]);
|
|
762
|
+
var dirty = useMemo(function() {
|
|
763
|
+
return !isEqual(initialValues.current, state.values);
|
|
764
|
+
}, [initialValues.current, state.values]);
|
|
765
|
+
var isValid = useMemo(function() {
|
|
766
|
+
return typeof isInitialValid !== "undefined" ? dirty ? state.errors && Object.keys(state.errors).length === 0 : isInitialValid !== false && isFunction(isInitialValid) ? isInitialValid(props) : isInitialValid : state.errors && Object.keys(state.errors).length === 0;
|
|
767
|
+
}, [isInitialValid, dirty, state.errors, props]);
|
|
768
|
+
var ctx = _extends({}, state, {
|
|
769
|
+
initialValues: initialValues.current,
|
|
770
|
+
initialErrors: initialErrors.current,
|
|
771
|
+
initialTouched: initialTouched.current,
|
|
772
|
+
initialStatus: initialStatus.current,
|
|
773
|
+
handleBlur,
|
|
774
|
+
handleChange,
|
|
775
|
+
handleReset,
|
|
776
|
+
handleSubmit,
|
|
777
|
+
resetForm,
|
|
778
|
+
setErrors,
|
|
779
|
+
setFormikState,
|
|
780
|
+
setFieldTouched,
|
|
781
|
+
setFieldValue,
|
|
782
|
+
setFieldError,
|
|
783
|
+
setStatus,
|
|
784
|
+
setSubmitting,
|
|
785
|
+
setTouched,
|
|
786
|
+
setValues,
|
|
787
|
+
submitForm,
|
|
788
|
+
validateForm: validateFormWithHighPriority,
|
|
789
|
+
validateField,
|
|
790
|
+
isValid,
|
|
791
|
+
dirty,
|
|
792
|
+
unregisterField,
|
|
793
|
+
registerField,
|
|
794
|
+
getFieldProps,
|
|
795
|
+
getFieldMeta,
|
|
796
|
+
getFieldHelpers,
|
|
797
|
+
validateOnBlur,
|
|
798
|
+
validateOnChange,
|
|
799
|
+
validateOnMount
|
|
800
|
+
});
|
|
801
|
+
return ctx;
|
|
802
|
+
}
|
|
803
|
+
function Formik(props) {
|
|
804
|
+
var formikbag = useFormik(props);
|
|
805
|
+
var component = props.component, children = props.children, render = props.render, innerRef = props.innerRef;
|
|
806
|
+
useImperativeHandle(innerRef, function() {
|
|
807
|
+
return formikbag;
|
|
808
|
+
});
|
|
809
|
+
if (process.env.NODE_ENV !== "production") {
|
|
810
|
+
useEffect(function() {
|
|
811
|
+
!!props.render ? process.env.NODE_ENV !== "production" ? warning(false, "<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>") : warning() : void 0;
|
|
812
|
+
}, []);
|
|
813
|
+
}
|
|
814
|
+
return createElement(FormikProvider, {
|
|
815
|
+
value: formikbag
|
|
816
|
+
}, component ? createElement(component, formikbag) : render ? render(formikbag) : children ? isFunction(children) ? children(formikbag) : !isEmptyChildren(children) ? Children.only(children) : null : null);
|
|
817
|
+
}
|
|
818
|
+
function warnAboutMissingIdentifier(_ref4) {
|
|
819
|
+
var htmlContent = _ref4.htmlContent, documentationAnchorLink = _ref4.documentationAnchorLink, handlerName = _ref4.handlerName;
|
|
820
|
+
console.warn("Warning: Formik called `" + handlerName + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + htmlContent + "\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#" + documentationAnchorLink + "\n ");
|
|
821
|
+
}
|
|
822
|
+
function yupToFormErrors(yupError) {
|
|
823
|
+
var errors = {};
|
|
824
|
+
if (yupError.inner) {
|
|
825
|
+
if (yupError.inner.length === 0) {
|
|
826
|
+
return setIn(errors, yupError.path, yupError.message);
|
|
827
|
+
}
|
|
828
|
+
for (var _iterator = yupError.inner, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) {
|
|
829
|
+
var _ref5;
|
|
830
|
+
if (_isArray) {
|
|
831
|
+
if (_i >= _iterator.length) break;
|
|
832
|
+
_ref5 = _iterator[_i++];
|
|
833
|
+
} else {
|
|
834
|
+
_i = _iterator.next();
|
|
835
|
+
if (_i.done) break;
|
|
836
|
+
_ref5 = _i.value;
|
|
837
|
+
}
|
|
838
|
+
var err = _ref5;
|
|
839
|
+
if (!getIn(errors, err.path)) {
|
|
840
|
+
errors = setIn(errors, err.path, err.message);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
return errors;
|
|
845
|
+
}
|
|
846
|
+
function validateYupSchema(values, schema, sync, context) {
|
|
847
|
+
if (sync === void 0) {
|
|
848
|
+
sync = false;
|
|
849
|
+
}
|
|
850
|
+
var normalizedValues = prepareDataForValidation(values);
|
|
851
|
+
return schema[sync ? "validateSync" : "validate"](normalizedValues, {
|
|
852
|
+
abortEarly: false,
|
|
853
|
+
context: normalizedValues
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
function prepareDataForValidation(values) {
|
|
857
|
+
var data = Array.isArray(values) ? [] : {};
|
|
858
|
+
for (var k in values) {
|
|
859
|
+
if (Object.prototype.hasOwnProperty.call(values, k)) {
|
|
860
|
+
var key = String(k);
|
|
861
|
+
if (Array.isArray(values[key]) === true) {
|
|
862
|
+
data[key] = values[key].map(function(value) {
|
|
863
|
+
if (Array.isArray(value) === true || isPlainObject(value)) {
|
|
864
|
+
return prepareDataForValidation(value);
|
|
865
|
+
} else {
|
|
866
|
+
return value !== "" ? value : void 0;
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
} else if (isPlainObject(values[key])) {
|
|
870
|
+
data[key] = prepareDataForValidation(values[key]);
|
|
871
|
+
} else {
|
|
872
|
+
data[key] = values[key] !== "" ? values[key] : void 0;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
return data;
|
|
877
|
+
}
|
|
878
|
+
function arrayMerge(target, source, options) {
|
|
879
|
+
var destination = target.slice();
|
|
880
|
+
source.forEach(function merge(e, i) {
|
|
881
|
+
if (typeof destination[i] === "undefined") {
|
|
882
|
+
var cloneRequested = options.clone !== false;
|
|
883
|
+
var shouldClone = cloneRequested && options.isMergeableObject(e);
|
|
884
|
+
destination[i] = shouldClone ? deepmerge_1(Array.isArray(e) ? [] : {}, e, options) : e;
|
|
885
|
+
} else if (options.isMergeableObject(e)) {
|
|
886
|
+
destination[i] = deepmerge_1(target[i], e, options);
|
|
887
|
+
} else if (target.indexOf(e) === -1) {
|
|
888
|
+
destination.push(e);
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
return destination;
|
|
892
|
+
}
|
|
893
|
+
function getSelectedValues(options) {
|
|
894
|
+
return Array.from(options).filter(function(el) {
|
|
895
|
+
return el.selected;
|
|
896
|
+
}).map(function(el) {
|
|
897
|
+
return el.value;
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
function getValueForCheckbox(currentValue, checked, valueProp) {
|
|
901
|
+
if (typeof currentValue === "boolean") {
|
|
902
|
+
return Boolean(checked);
|
|
903
|
+
}
|
|
904
|
+
var currentArrayOfValues = [];
|
|
905
|
+
var isValueInArray = false;
|
|
906
|
+
var index = -1;
|
|
907
|
+
if (!Array.isArray(currentValue)) {
|
|
908
|
+
if (!valueProp || valueProp == "true" || valueProp == "false") {
|
|
909
|
+
return Boolean(checked);
|
|
910
|
+
}
|
|
911
|
+
} else {
|
|
912
|
+
currentArrayOfValues = currentValue;
|
|
913
|
+
index = currentValue.indexOf(valueProp);
|
|
914
|
+
isValueInArray = index >= 0;
|
|
915
|
+
}
|
|
916
|
+
if (checked && valueProp && !isValueInArray) {
|
|
917
|
+
return currentArrayOfValues.concat(valueProp);
|
|
918
|
+
}
|
|
919
|
+
if (!isValueInArray) {
|
|
920
|
+
return currentArrayOfValues;
|
|
921
|
+
}
|
|
922
|
+
return currentArrayOfValues.slice(0, index).concat(currentArrayOfValues.slice(index + 1));
|
|
923
|
+
}
|
|
924
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? useLayoutEffect : useEffect;
|
|
925
|
+
function useEventCallback(fn) {
|
|
926
|
+
var ref = useRef(fn);
|
|
927
|
+
useIsomorphicLayoutEffect(function() {
|
|
928
|
+
ref.current = fn;
|
|
929
|
+
});
|
|
930
|
+
return useCallback(function() {
|
|
931
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
932
|
+
args[_key] = arguments[_key];
|
|
933
|
+
}
|
|
934
|
+
return ref.current.apply(void 0, args);
|
|
935
|
+
}, []);
|
|
936
|
+
}
|
|
937
|
+
var Form = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
938
|
+
var action = props.action, rest = _objectWithoutPropertiesLoose(props, ["action"]);
|
|
939
|
+
var _action = action != null ? action : "#";
|
|
940
|
+
var _useFormikContext = useFormikContext(), handleReset = _useFormikContext.handleReset, handleSubmit = _useFormikContext.handleSubmit;
|
|
941
|
+
return createElement("form", _extends({
|
|
942
|
+
onSubmit: handleSubmit,
|
|
943
|
+
ref,
|
|
944
|
+
onReset: handleReset,
|
|
945
|
+
action: _action
|
|
946
|
+
}, rest));
|
|
947
|
+
});
|
|
948
|
+
Form.displayName = "Form";
|
|
949
|
+
export {
|
|
950
|
+
Form,
|
|
951
|
+
Formik,
|
|
952
|
+
FormikContext,
|
|
953
|
+
FormikProvider,
|
|
954
|
+
getActiveElement,
|
|
955
|
+
getIn,
|
|
956
|
+
isEmptyChildren,
|
|
957
|
+
isFunction,
|
|
958
|
+
isInteger,
|
|
959
|
+
isObject,
|
|
960
|
+
isPromise,
|
|
961
|
+
isString,
|
|
962
|
+
prepareDataForValidation,
|
|
963
|
+
setIn,
|
|
964
|
+
setNestedObjectValues,
|
|
965
|
+
useFormik,
|
|
966
|
+
useFormikContext,
|
|
967
|
+
validateYupSchema,
|
|
968
|
+
yupToFormErrors
|
|
969
|
+
};
|