@jetshop/core 5.17.0-alpha.8ede57ab → 5.17.0-alpha.8f38c56f
Sign up to get free protection for your applications and to get access to all the features.
- package/ChannelHandler/ChannelHandler.d.ts +53 -0
- package/ChannelHandler/ChannelHandler.js +114 -0
- package/ChannelHandler/ChannelHandler.js.map +1 -0
- package/ChannelHandler/channelUtils.d.ts +73 -0
- package/ChannelHandler/channelUtils.js +313 -0
- package/ChannelHandler/channelUtils.js.map +1 -0
- package/ChannelHandler/redirectUtils.d.ts +4 -0
- package/ChannelHandler/redirectUtils.js +50 -0
- package/ChannelHandler/redirectUtils.js.map +1 -0
- package/ChannelHandler/redirectUtils.test.js +5 -5
- package/ChannelHandler/redirectUtilsGroupedChannels.test.js +5 -5
- package/analytics/Analytics.d.ts +18 -0
- package/analytics/Analytics.js +57 -0
- package/analytics/Analytics.js.map +1 -0
- package/analytics/AnalyticsProvider.d.ts +54 -0
- package/analytics/AnalyticsProvider.js +229 -0
- package/analytics/AnalyticsProvider.js.map +1 -0
- package/analytics/deprecatedTracking.d.ts +17 -0
- package/analytics/deprecatedTracking.js +33 -0
- package/analytics/deprecatedTracking.js.map +1 -0
- package/analytics/integrations/ga4.d.ts +28 -0
- package/analytics/integrations/ga4.js +189 -0
- package/analytics/integrations/ga4.js.map +1 -0
- package/analytics/integrations/gtag/gtag.d.ts +8 -0
- package/analytics/integrations/gtag/gtag.js +209 -0
- package/analytics/integrations/gtag/gtag.js.map +1 -0
- package/analytics/integrations/gtag/index.d.ts +1 -0
- package/analytics/integrations/gtag/index.js +2 -0
- package/analytics/integrations/gtag/index.js.map +1 -0
- package/analytics/integrations/gtm/gtm.d.ts +12 -0
- package/analytics/integrations/gtm/gtm.js +227 -0
- package/analytics/integrations/gtm/gtm.js.map +1 -0
- package/analytics/integrations/gtm/index.d.ts +1 -0
- package/analytics/integrations/gtm/index.js +2 -0
- package/analytics/integrations/gtm/index.js.map +1 -0
- package/analytics/integrations/gtm/referrerModifier.d.ts +1 -0
- package/analytics/integrations/gtm/referrerModifier.js +62 -0
- package/analytics/integrations/gtm/referrerModifier.js.map +1 -0
- package/analytics/integrations/releware/index.d.ts +3 -0
- package/analytics/integrations/releware/index.js +39 -0
- package/analytics/integrations/releware/index.js.map +1 -0
- package/analytics/integrations/unslugify.d.ts +1 -0
- package/analytics/integrations/unslugify.js +16 -0
- package/analytics/integrations/unslugify.js.map +1 -0
- package/analytics/trackerRegistry.d.ts +113 -0
- package/analytics/trackerRegistry.js +222 -0
- package/analytics/trackerRegistry.js.map +1 -0
- package/analytics/tracking.d.ts +14 -0
- package/analytics/tracking.js +72 -0
- package/analytics/tracking.js.map +1 -0
- package/analytics/utils/breadcrumbsWithoutProduct.d.ts +1 -0
- package/analytics/utils/breadcrumbsWithoutProduct.js +9 -0
- package/analytics/utils/breadcrumbsWithoutProduct.js.map +1 -0
- package/analytics/utils/script.d.ts +8 -0
- package/analytics/utils/script.js +40 -0
- package/analytics/utils/script.js.map +1 -0
- package/analytics/webVitals.d.ts +5 -0
- package/analytics/webVitals.js +39 -0
- package/analytics/webVitals.js.map +1 -0
- package/boot/AuthHandler.d.ts +14 -0
- package/boot/AuthHandler.js +39 -0
- package/boot/AuthHandler.js.map +1 -0
- package/boot/NetworkStatusNotifier.d.ts +2 -0
- package/boot/NetworkStatusNotifier.js +4 -0
- package/boot/NetworkStatusNotifier.js.map +1 -0
- package/boot/PreviewHandler.d.ts +7 -0
- package/boot/PreviewHandler.js +14 -0
- package/boot/PreviewHandler.js.map +1 -0
- package/boot/SharedTree.d.ts +25 -0
- package/boot/SharedTree.js +29 -0
- package/boot/SharedTree.js.map +1 -0
- package/boot/addMissingConfig.d.ts +5 -0
- package/boot/addMissingConfig.js +34 -0
- package/boot/addMissingConfig.js.map +1 -0
- package/boot/apollo.d.ts +20 -0
- package/boot/apollo.js +202 -0
- package/boot/apollo.js.map +1 -0
- package/boot/client/entrypoint.d.ts +1 -0
- package/boot/client/entrypoint.js +5 -0
- package/boot/client/entrypoint.js.map +1 -0
- package/boot/client/index.d.ts +1 -0
- package/boot/client/index.js +2 -0
- package/boot/client/index.js.map +1 -0
- package/boot/client/startClient.d.ts +4 -0
- package/boot/client/startClient.js +153 -0
- package/boot/client/startClient.js.map +1 -0
- package/boot/server/IntervalQuery.d.ts +32 -0
- package/boot/server/IntervalQuery.js +95 -0
- package/boot/server/IntervalQuery.js.map +1 -0
- package/boot/server/IntervalQuery.test.js +9 -13
- package/boot/server/PersistedApolloClient.d.ts +20 -0
- package/boot/server/PersistedApolloClient.js +40 -0
- package/boot/server/PersistedApolloClient.js.map +1 -0
- package/boot/server/PersistedApolloClient.test.js +8 -7
- package/boot/server/asyncErrorHandler.d.ts +3 -0
- package/boot/server/asyncErrorHandler.js +5 -0
- package/boot/server/asyncErrorHandler.js.map +1 -0
- package/boot/server/breakpointMiddleware.d.ts +3 -0
- package/boot/server/breakpointMiddleware.js +10 -0
- package/boot/server/breakpointMiddleware.js.map +1 -0
- package/boot/server/createApolloServer.d.ts +29 -0
- package/boot/server/createApolloServer.js +144 -0
- package/boot/server/createApolloServer.js.map +1 -0
- package/boot/server/createDevServer.d.ts +14 -0
- package/boot/server/createDevServer.js +30 -0
- package/boot/server/createDevServer.js.map +1 -0
- package/boot/server/createRenderer.d.ts +28 -0
- package/boot/server/createRenderer.js +239 -0
- package/boot/server/createRenderer.js.map +1 -0
- package/boot/server/createServer.d.ts +14 -0
- package/boot/server/createServer.js +42 -0
- package/boot/server/createServer.js.map +1 -0
- package/boot/server/entrypoint.d.ts +1 -0
- package/boot/server/entrypoint.js +39 -0
- package/boot/server/entrypoint.js.map +1 -0
- package/boot/server/getPrefetchFiles.d.ts +10 -0
- package/boot/server/getPrefetchFiles.js +20 -0
- package/boot/server/getPrefetchFiles.js.map +1 -0
- package/boot/server/getPreloadAssets.d.ts +10 -0
- package/boot/server/getPreloadAssets.js +18 -0
- package/boot/server/getPreloadAssets.js.map +1 -0
- package/boot/server/index.d.ts +9 -0
- package/boot/server/index.js +123 -0
- package/boot/server/index.js.map +1 -0
- package/boot/server/listen.d.ts +13 -0
- package/boot/server/listen.js +17 -0
- package/boot/server/listen.js.map +1 -0
- package/boot/server/persistedQueries/PersistedClient.d.ts +22 -0
- package/boot/server/persistedQueries/PersistedClient.js +58 -0
- package/boot/server/persistedQueries/PersistedClient.js.map +1 -0
- package/boot/server/persistedQueries/__tests__/getPersistedQueriesForRequest.test.js +1 -1
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.d.ts +3 -0
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.js +27 -0
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.js.map +1 -0
- package/boot/server/salesSource.d.ts +8 -0
- package/boot/server/salesSource.js +16 -0
- package/boot/server/salesSource.js.map +1 -0
- package/boot/utils/createIntOptions.d.ts +6 -0
- package/boot/utils/createIntOptions.js +19 -0
- package/boot/utils/createIntOptions.js.map +1 -0
- package/boot/utils/queryLoggingMiddleware.d.ts +2 -0
- package/boot/utils/queryLoggingMiddleware.js +15 -0
- package/boot/utils/queryLoggingMiddleware.js.map +1 -0
- package/boot/utils/uid.d.ts +3 -0
- package/boot/utils/uid.js +20 -0
- package/boot/utils/uid.js.map +1 -0
- package/cart/AddToCartFormik.d.ts +42 -0
- package/cart/AddToCartFormik.js +77 -0
- package/cart/AddToCartFormik.js.map +1 -0
- package/cart/useAddToCart.d.ts +88 -0
- package/cart/useAddToCart.js +119 -0
- package/cart/useAddToCart.js.map +1 -0
- package/cart/useCart.d.ts +0 -0
- package/cart/useCart.js +1 -0
- package/cart/useCart.js.map +1 -0
- package/components/Auth/CustomerFormContainer.d.ts +0 -0
- package/components/Auth/CustomerFormContainer.js +1 -0
- package/components/Auth/CustomerFormContainer.js.map +1 -0
- package/components/Auth/CustomerUpdateForm.d.ts +32 -0
- package/components/Auth/CustomerUpdateForm.js +122 -0
- package/components/Auth/CustomerUpdateForm.js.map +1 -0
- package/components/Auth/ForgotPasswordProvider.d.ts +69 -0
- package/components/Auth/ForgotPasswordProvider.js +57 -0
- package/components/Auth/ForgotPasswordProvider.js.map +1 -0
- package/components/Auth/ResetPasswordProvider.d.ts +90 -0
- package/components/Auth/ResetPasswordProvider.js +78 -0
- package/components/Auth/ResetPasswordProvider.js.map +1 -0
- package/components/Auth/SSN.d.ts +12 -0
- package/components/Auth/SSN.js +35 -0
- package/components/Auth/SSN.js.map +1 -0
- package/components/Auth/SSNLookupContainer.d.ts +15 -0
- package/components/Auth/SSNLookupContainer.js +20 -0
- package/components/Auth/SSNLookupContainer.js.map +1 -0
- package/components/Auth/SignupFormContainer.d.ts +16 -0
- package/components/Auth/SignupFormContainer.js +82 -0
- package/components/Auth/SignupFormContainer.js.map +1 -0
- package/components/Auth/UpdatePasswordForm.d.ts +44 -0
- package/components/Auth/UpdatePasswordForm.js +98 -0
- package/components/Auth/UpdatePasswordForm.js.map +1 -0
- package/components/Auth/formFieldsFromSettings.d.ts +65 -0
- package/components/Auth/formFieldsFromSettings.js +77 -0
- package/components/Auth/formFieldsFromSettings.js.map +1 -0
- package/components/Auth/formatSignupInput.d.ts +8 -0
- package/components/Auth/formatSignupInput.js +43 -0
- package/components/Auth/formatSignupInput.js.map +1 -0
- package/components/Auth/signup-context.d.ts +36 -0
- package/components/Auth/signup-context.js +71 -0
- package/components/Auth/signup-context.js.map +1 -0
- package/components/Auth/signup-field-translations.d.ts +3 -0
- package/components/Auth/signup-field-translations.js +44 -0
- package/components/Auth/signup-field-translations.js.map +1 -0
- package/components/Auth/signupSubmit.d.ts +6 -0
- package/components/Auth/signupSubmit.js +57 -0
- package/components/Auth/signupSubmit.js.map +1 -0
- package/components/Auth/useAddressFields.d.ts +22 -0
- package/components/Auth/useAddressFields.js +33 -0
- package/components/Auth/useAddressFields.js.map +1 -0
- package/components/Auth/useAddressFields.test.js +10 -8
- package/components/Auth/useCustomer.d.ts +116 -0
- package/components/Auth/useCustomer.js +189 -0
- package/components/Auth/useCustomer.js.map +1 -0
- package/components/Auth/useLoginFields.d.ts +20 -0
- package/components/Auth/useLoginFields.js +21 -0
- package/components/Auth/useLoginFields.js.map +1 -0
- package/components/Auth/useSignupForm.d.ts +7 -0
- package/components/Auth/useSignupForm.js +15 -0
- package/components/Auth/useSignupForm.js.map +1 -0
- package/components/AuthContext/AuthContext.d.ts +8 -0
- package/components/AuthContext/AuthContext.js +9 -0
- package/components/AuthContext/AuthContext.js.map +1 -0
- package/components/AuthContext/AuthProvider.d.ts +6 -0
- package/components/AuthContext/AuthProvider.js +85 -0
- package/components/AuthContext/AuthProvider.js.map +1 -0
- package/components/AuthContext/AuthProvider.test.js +1 -1
- package/components/AuthContext/LogOut.d.ts +5 -0
- package/components/AuthContext/LogOut.js +15 -0
- package/components/AuthContext/LogOut.js.map +1 -0
- package/components/AuthContext/useAuth.d.ts +6 -0
- package/components/AuthContext/useAuth.js +21 -0
- package/components/AuthContext/useAuth.js.map +1 -0
- package/components/BreakpointProvider.d.ts +21 -0
- package/components/BreakpointProvider.js +24 -0
- package/components/BreakpointProvider.js.map +1 -0
- package/components/Cart/CartIdContext.d.ts +11 -0
- package/components/Cart/CartIdContext.js +61 -0
- package/components/Cart/CartIdContext.js.map +1 -0
- package/components/ChannelContext/ChannelContext.d.ts +21 -0
- package/components/ChannelContext/ChannelContext.js +4 -0
- package/components/ChannelContext/ChannelContext.js.map +1 -0
- package/components/ChannelContext/ChannelProvider.d.ts +10 -0
- package/components/ChannelContext/ChannelProvider.js +45 -0
- package/components/ChannelContext/ChannelProvider.js.map +1 -0
- package/components/ChannelContext/index.d.ts +2 -0
- package/components/ChannelContext/index.js +3 -0
- package/components/ChannelContext/index.js.map +1 -0
- package/components/ChannelContext/useCountrySettings.d.ts +8 -0
- package/components/ChannelContext/useCountrySettings.js +24 -0
- package/components/ChannelContext/useCountrySettings.js.map +1 -0
- package/components/ConfigProvider.d.ts +108 -0
- package/components/ConfigProvider.js +20 -0
- package/components/ConfigProvider.js.map +1 -0
- package/components/DynamicRoute/ActiveFiltersQuery.gql +4 -4
- package/components/DynamicRoute/CategoryRoute.d.ts +13 -0
- package/components/DynamicRoute/CategoryRoute.js +59 -0
- package/components/DynamicRoute/CategoryRoute.js.map +1 -0
- package/components/DynamicRoute/ContentRoute.d.ts +14 -0
- package/components/DynamicRoute/ContentRoute.js +28 -0
- package/components/DynamicRoute/ContentRoute.js.map +1 -0
- package/components/DynamicRoute/CustomerRoute.d.ts +0 -0
- package/components/DynamicRoute/CustomerRoute.js +1 -0
- package/components/DynamicRoute/CustomerRoute.js.map +1 -0
- package/components/DynamicRoute/GenericError.d.ts +18 -0
- package/components/DynamicRoute/GenericError.js +61 -0
- package/components/DynamicRoute/GenericError.js.map +1 -0
- package/components/DynamicRoute/PreviewRoute.d.ts +17 -0
- package/components/DynamicRoute/PreviewRoute.js +58 -0
- package/components/DynamicRoute/PreviewRoute.js.map +1 -0
- package/components/DynamicRoute/ProductByArticlenumber.d.ts +5 -0
- package/components/DynamicRoute/ProductByArticlenumber.js +22 -0
- package/components/DynamicRoute/ProductByArticlenumber.js.map +1 -0
- package/components/DynamicRoute/ProductRoute.d.ts +15 -0
- package/components/DynamicRoute/ProductRoute.js +65 -0
- package/components/DynamicRoute/ProductRoute.js.map +1 -0
- package/components/DynamicRoute/RouteResolver.d.ts +22 -0
- package/components/DynamicRoute/RouteResolver.js +65 -0
- package/components/DynamicRoute/RouteResolver.js.map +1 -0
- package/components/DynamicRoute/Status.d.ts +15 -0
- package/components/DynamicRoute/Status.js +20 -0
- package/components/DynamicRoute/Status.js.map +1 -0
- package/components/DynamicRoute/index.d.ts +17 -0
- package/components/DynamicRoute/index.js +100 -0
- package/components/DynamicRoute/index.js.map +1 -0
- package/components/Filters/index.d.ts +1 -0
- package/components/Filters/index.js +2 -0
- package/components/Filters/index.js.map +1 -0
- package/components/Filters/utils/replaceInSearch.d.ts +14 -0
- package/components/Filters/utils/replaceInSearch.js +23 -0
- package/components/Filters/utils/replaceInSearch.js.map +1 -0
- package/components/Filters/utils/updateHistory.d.ts +25 -0
- package/components/Filters/utils/updateHistory.js +30 -0
- package/components/Filters/utils/updateHistory.js.map +1 -0
- package/components/Fonts/CustomFont.d.ts +14 -0
- package/components/Fonts/CustomFont.js +17 -0
- package/components/Fonts/CustomFont.js.map +1 -0
- package/components/Fonts/injectFont.d.ts +11 -0
- package/components/Fonts/injectFont.js +30 -0
- package/components/Fonts/injectFont.js.map +1 -0
- package/components/Head.d.ts +11 -0
- package/components/Head.js +84 -0
- package/components/Head.js.map +1 -0
- package/components/Mutation/AddToCart/addToCartUtils.d.ts +18 -0
- package/components/Mutation/AddToCart/addToCartUtils.js +52 -0
- package/components/Mutation/AddToCart/addToCartUtils.js.map +1 -0
- package/components/Mutation/AddToCartFormik.d.ts +53 -0
- package/components/Mutation/AddToCartFormik.js +173 -0
- package/components/Mutation/AddToCartFormik.js.map +1 -0
- package/components/Mutation/DecrementQuantity.d.ts +4 -0
- package/components/Mutation/DecrementQuantity.js +35 -0
- package/components/Mutation/DecrementQuantity.js.map +1 -0
- package/components/Mutation/IncrementQuantity.d.ts +4 -0
- package/components/Mutation/IncrementQuantity.js +35 -0
- package/components/Mutation/IncrementQuantity.js.map +1 -0
- package/components/Mutation/RemoveFromCart.d.ts +5 -0
- package/components/Mutation/RemoveFromCart.js +52 -0
- package/components/Mutation/RemoveFromCart.js.map +1 -0
- package/components/Mutation/SetQuantity.d.ts +4 -0
- package/components/Mutation/SetQuantity.js +37 -0
- package/components/Mutation/SetQuantity.js.map +1 -0
- package/components/Mutation/SubscribeToNewsletter.d.ts +4 -0
- package/components/Mutation/SubscribeToNewsletter.js +30 -0
- package/components/Mutation/SubscribeToNewsletter.js.map +1 -0
- package/components/Mutation/SubscribeToStockNotifications.d.ts +4 -0
- package/components/Mutation/SubscribeToStockNotifications.js +35 -0
- package/components/Mutation/SubscribeToStockNotifications.js.map +1 -0
- package/components/Mutation/cartMutationUtils.d.ts +27 -0
- package/components/Mutation/cartMutationUtils.js +109 -0
- package/components/Mutation/cartMutationUtils.js.map +1 -0
- package/components/Mutation/useDecrementQuantity.d.ts +11 -0
- package/components/Mutation/useDecrementQuantity.js +54 -0
- package/components/Mutation/useDecrementQuantity.js.map +1 -0
- package/components/Mutation/useIncrementQuantity.d.ts +11 -0
- package/components/Mutation/useIncrementQuantity.js +54 -0
- package/components/Mutation/useIncrementQuantity.js.map +1 -0
- package/components/Mutation/useRemoveFromCart.d.ts +13 -0
- package/components/Mutation/useRemoveFromCart.js +50 -0
- package/components/Mutation/useRemoveFromCart.js.map +1 -0
- package/components/Mutation/useSetQuantity.d.ts +12 -0
- package/components/Mutation/useSetQuantity.js +38 -0
- package/components/Mutation/useSetQuantity.js.map +1 -0
- package/components/Notifications/Notifications.d.ts +15 -0
- package/components/Notifications/Notifications.js +26 -0
- package/components/Notifications/Notifications.js.map +1 -0
- package/components/Notifications/index.d.ts +2 -0
- package/components/Notifications/index.js +3 -0
- package/components/Notifications/index.js.map +1 -0
- package/components/Notifications/notificationMachine.d.ts +30 -0
- package/components/Notifications/notificationMachine.js +74 -0
- package/components/Notifications/notificationMachine.js.map +1 -0
- package/components/Notifications/notificationsMachine.d.ts +37 -0
- package/components/Notifications/notificationsMachine.js +66 -0
- package/components/Notifications/notificationsMachine.js.map +1 -0
- package/components/Notifications/useNotification.d.ts +9 -0
- package/components/Notifications/useNotification.js +27 -0
- package/components/Notifications/useNotification.js.map +1 -0
- package/components/OpenGraph/OpenGraphGeneralPageData.d.ts +25 -0
- package/components/OpenGraph/OpenGraphGeneralPageData.js +37 -0
- package/components/OpenGraph/OpenGraphGeneralPageData.js.map +1 -0
- package/components/OpenGraph/OpenGraphProductData.d.ts +25 -0
- package/components/OpenGraph/OpenGraphProductData.js +49 -0
- package/components/OpenGraph/OpenGraphProductData.js.map +1 -0
- package/components/OpenGraph/index.d.ts +2 -0
- package/components/OpenGraph/index.js +3 -0
- package/components/OpenGraph/index.js.map +1 -0
- package/components/Pagination/PaginationContainer.d.ts +2 -0
- package/components/Pagination/PaginationContainer.js +5 -0
- package/components/Pagination/PaginationContainer.js.map +1 -0
- package/components/Pagination/PaginationContext.d.ts +14 -0
- package/components/Pagination/PaginationContext.js +4 -0
- package/components/Pagination/PaginationContext.js.map +1 -0
- package/components/Pagination/PaginationProvider.d.ts +19 -0
- package/components/Pagination/PaginationProvider.js +95 -0
- package/components/Pagination/PaginationProvider.js.map +1 -0
- package/components/PreviewContext.d.ts +10 -0
- package/components/PreviewContext.js +27 -0
- package/components/PreviewContext.js.map +1 -0
- package/components/ProductConfigurationProvider/ProductConfigurationContext.d.ts +13 -0
- package/components/ProductConfigurationProvider/ProductConfigurationContext.js +5 -0
- package/components/ProductConfigurationProvider/ProductConfigurationContext.js.map +1 -0
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.d.ts +6 -0
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +50 -0
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +1 -0
- package/components/Query/CartProvider.d.ts +22 -0
- package/components/Query/CartProvider.js +68 -0
- package/components/Query/CartProvider.js.map +1 -0
- package/components/SortOrder/SortOrderContainer.d.ts +40 -0
- package/components/SortOrder/SortOrderContainer.js +108 -0
- package/components/SortOrder/SortOrderContainer.js.map +1 -0
- package/components/SortOrder/SortOrderContext.d.ts +9 -0
- package/components/SortOrder/SortOrderContext.js +9 -0
- package/components/SortOrder/SortOrderContext.js.map +1 -0
- package/components/StructuredData/SiteLinksSearchStructuredData.d.ts +3 -0
- package/components/StructuredData/SiteLinksSearchStructuredData.js +25 -0
- package/components/StructuredData/SiteLinksSearchStructuredData.js.map +1 -0
- package/components/StructuredData/StructuredBreadcrumbData.d.ts +12 -0
- package/components/StructuredData/StructuredBreadcrumbData.js +55 -0
- package/components/StructuredData/StructuredBreadcrumbData.js.map +1 -0
- package/components/StructuredData/StructuredCategoryData.d.ts +16 -0
- package/components/StructuredData/StructuredCategoryData.js +18 -0
- package/components/StructuredData/StructuredCategoryData.js.map +1 -0
- package/components/StructuredData/StructuredData.d.ts +9 -0
- package/components/StructuredData/StructuredData.js +7 -0
- package/components/StructuredData/StructuredData.js.map +1 -0
- package/components/StructuredData/StructuredPageData.d.ts +16 -0
- package/components/StructuredData/StructuredPageData.js +17 -0
- package/components/StructuredData/StructuredPageData.js.map +1 -0
- package/components/StructuredData/StructuredProductData.d.ts +18 -0
- package/components/StructuredData/StructuredProductData.js +43 -0
- package/components/StructuredData/StructuredProductData.js.map +1 -0
- package/components/StructuredData/index.d.ts +5 -0
- package/components/StructuredData/index.js +6 -0
- package/components/StructuredData/index.js.map +1 -0
- package/data/cache.d.ts +3 -0
- package/data/cache.js +34 -0
- package/data/cache.js.map +1 -0
- package/data/fragmentTypes.d.ts +8 -0
- package/data/fragmentTypes.js +84 -0
- package/data/fragmentTypes.js.map +1 -0
- package/data/fragments/index.d.ts +1 -0
- package/data/fragments/index.js +2 -0
- package/data/fragments/index.js.map +1 -0
- package/errorReporting.browser.d.ts +3 -0
- package/errorReporting.browser.js +12 -0
- package/errorReporting.browser.js.map +1 -0
- package/errorReporting.d.ts +3 -0
- package/errorReporting.js +20 -0
- package/errorReporting.js.map +1 -0
- package/errorReporting.server.d.ts +3 -0
- package/errorReporting.server.js +12 -0
- package/errorReporting.server.js.map +1 -0
- package/errorReporting.shared.d.ts +5 -0
- package/errorReporting.shared.js +17 -0
- package/errorReporting.shared.js.map +1 -0
- package/experiments/ExperimentsProvider.d.ts +4 -0
- package/experiments/ExperimentsProvider.js +29 -0
- package/experiments/ExperimentsProvider.js.map +1 -0
- package/experiments/selectExperimentVariant.d.ts +3 -0
- package/experiments/selectExperimentVariant.js +35 -0
- package/experiments/selectExperimentVariant.js.map +1 -0
- package/experiments/useExperiment.d.ts +2 -0
- package/experiments/useExperiment.js +11 -0
- package/experiments/useExperiment.js.map +1 -0
- package/global.d.ts +55 -1
- package/helpers/decodeUrlQuery.d.ts +9 -0
- package/helpers/decodeUrlQuery.js +27 -0
- package/helpers/decodeUrlQuery.js.map +1 -0
- package/helpers/distance.d.ts +7 -0
- package/helpers/distance.js +13 -0
- package/helpers/distance.js.map +1 -0
- package/helpers/encodeVariant.d.ts +3 -0
- package/helpers/encodeVariant.js +25 -0
- package/helpers/encodeVariant.js.map +1 -0
- package/helpers/getBreakpointsFromValues.d.ts +6 -0
- package/helpers/getBreakpointsFromValues.js +15 -0
- package/helpers/getBreakpointsFromValues.js.map +1 -0
- package/helpers/getCartItemVariant.d.ts +7 -0
- package/helpers/getCartItemVariant.js +9 -0
- package/helpers/getCartItemVariant.js.map +1 -0
- package/helpers/getErrorDetail.d.ts +7 -0
- package/helpers/getErrorDetail.js +12 -0
- package/helpers/getErrorDetail.js.map +1 -0
- package/helpers/getHeaders.d.ts +6 -0
- package/helpers/getHeaders.js +4 -0
- package/helpers/getHeaders.js.map +1 -0
- package/helpers/isRelativeUrl.d.ts +1 -0
- package/helpers/isRelativeUrl.js +4 -0
- package/helpers/isRelativeUrl.js.map +1 -0
- package/helpers/logError.d.ts +1 -0
- package/helpers/logError.js +17 -0
- package/helpers/logError.js.map +1 -0
- package/helpers/logWarningInDev.d.ts +1 -0
- package/helpers/logWarningInDev.js +7 -0
- package/helpers/logWarningInDev.js.map +1 -0
- package/helpers/throwErrorInDev.d.ts +6 -0
- package/helpers/throwErrorInDev.js +15 -0
- package/helpers/throwErrorInDev.js.map +1 -0
- package/helpers/uniqueId.d.ts +5 -0
- package/helpers/uniqueId.js +10 -0
- package/helpers/uniqueId.js.map +1 -0
- package/hooks/Channels/useChannelSettings.d.ts +7 -0
- package/hooks/Channels/useChannelSettings.js +12 -0
- package/hooks/Channels/useChannelSettings.js.map +1 -0
- package/hooks/Filters/useBooleanFilter.d.ts +8 -0
- package/hooks/Filters/useBooleanFilter.js +20 -0
- package/hooks/Filters/useBooleanFilter.js.map +1 -0
- package/hooks/Filters/useFilters.d.ts +3 -0
- package/hooks/Filters/useFilters.js +15 -0
- package/hooks/Filters/useFilters.js.map +1 -0
- package/hooks/Filters/useListFilter.d.ts +10 -0
- package/hooks/Filters/useListFilter.js +37 -0
- package/hooks/Filters/useListFilter.js.map +1 -0
- package/hooks/Filters/useMultiFilter.d.ts +13 -0
- package/hooks/Filters/useMultiFilter.js +49 -0
- package/hooks/Filters/useMultiFilter.js.map +1 -0
- package/hooks/Filters/useRangeFilter.d.ts +10 -0
- package/hooks/Filters/useRangeFilter.js +35 -0
- package/hooks/Filters/useRangeFilter.js.map +1 -0
- package/hooks/Filters/useSortOrder.d.ts +16 -0
- package/hooks/Filters/useSortOrder.js +23 -0
- package/hooks/Filters/useSortOrder.js.map +1 -0
- package/hooks/PackageProducts/index.d.ts +2 -0
- package/hooks/PackageProducts/index.js +3 -0
- package/hooks/PackageProducts/index.js.map +1 -0
- package/hooks/PackageProducts/usePackageProductItem.d.ts +17 -0
- package/hooks/PackageProducts/usePackageProductItem.js +27 -0
- package/hooks/PackageProducts/usePackageProductItem.js.map +1 -0
- package/hooks/PackageProducts/usePackageProducts.d.ts +19 -0
- package/hooks/PackageProducts/usePackageProducts.js +346 -0
- package/hooks/PackageProducts/usePackageProducts.js.map +1 -0
- package/hooks/PackageProducts/usePackageProducts.test.js +1 -1
- package/hooks/Product/index.d.ts +1 -0
- package/hooks/Product/index.js +2 -0
- package/hooks/Product/index.js.map +1 -0
- package/hooks/Product/useStockStatus.d.ts +9 -0
- package/hooks/Product/useStockStatus.js +26 -0
- package/hooks/Product/useStockStatus.js.map +1 -0
- package/hooks/Product/useSwitchToVariantImage.d.ts +9 -0
- package/hooks/Product/useSwitchToVariantImage.js +21 -0
- package/hooks/Product/useSwitchToVariantImage.js.map +1 -0
- package/hooks/ProductList/ProductListContext.d.ts +7 -0
- package/hooks/ProductList/ProductListContext.js +111 -0
- package/hooks/ProductList/ProductListContext.js.map +1 -0
- package/hooks/ProductList/action-creators.d.ts +46 -0
- package/hooks/ProductList/action-creators.js +297 -0
- package/hooks/ProductList/action-creators.js.map +1 -0
- package/hooks/ProductList/index.d.ts +118 -0
- package/hooks/ProductList/index.js +22 -0
- package/hooks/ProductList/index.js.map +1 -0
- package/hooks/ProductList/list-transforms.d.ts +75 -0
- package/hooks/ProductList/list-transforms.js +107 -0
- package/hooks/ProductList/list-transforms.js.map +1 -0
- package/hooks/ProductList/product-list-reducer.d.ts +76 -0
- package/hooks/ProductList/product-list-reducer.js +198 -0
- package/hooks/ProductList/product-list-reducer.js.map +1 -0
- package/hooks/ProductList/useProductList.d.ts +13 -0
- package/hooks/ProductList/useProductList.js +94 -0
- package/hooks/ProductList/useProductList.js.map +1 -0
- package/hooks/ProductList/useProductListItems.d.ts +10 -0
- package/hooks/ProductList/useProductListItems.js +49 -0
- package/hooks/ProductList/useProductListItems.js.map +1 -0
- package/hooks/ProductList/validate-product.d.ts +6 -0
- package/hooks/ProductList/validate-product.js +41 -0
- package/hooks/ProductList/validate-product.js.map +1 -0
- package/hooks/Subscriptions/useNewsletterSubscription.d.ts +38 -0
- package/hooks/Subscriptions/useNewsletterSubscription.js +42 -0
- package/hooks/Subscriptions/useNewsletterSubscription.js.map +1 -0
- package/hooks/Subscriptions/useStockNotifications.d.ts +36 -0
- package/hooks/Subscriptions/useStockNotifications.js +38 -0
- package/hooks/Subscriptions/useStockNotifications.js.map +1 -0
- package/hooks/Subscriptions/useStoreSubscriptions.d.ts +48 -0
- package/hooks/Subscriptions/useStoreSubscriptions.js +148 -0
- package/hooks/Subscriptions/useStoreSubscriptions.js.map +1 -0
- package/hooks/Subscriptions/useStoresubscriptions.test.js +5 -7
- package/hooks/useAddMultipleToCart.d.ts +27 -0
- package/hooks/useAddMultipleToCart.js +114 -0
- package/hooks/useAddMultipleToCart.js.map +1 -0
- package/hooks/useAddMultipleToCart.test.js +1 -1
- package/hooks/useChannels.d.ts +1 -0
- package/hooks/useChannels.js +10 -0
- package/hooks/useChannels.js.map +1 -0
- package/hooks/useCustomerOrders.test.js +7 -5
- package/hooks/useCustomerOrdersQuery.d.ts +21 -0
- package/hooks/useCustomerOrdersQuery.js +21 -0
- package/hooks/useCustomerOrdersQuery.js.map +1 -0
- package/hooks/useDeleteAccountMutation.d.ts +15 -0
- package/hooks/useDeleteAccountMutation.js +39 -0
- package/hooks/useDeleteAccountMutation.js.map +1 -0
- package/hooks/useDynamicPrice.d.ts +3 -0
- package/hooks/useDynamicPrice.js +25 -0
- package/hooks/useDynamicPrice.js.map +1 -0
- package/hooks/useFreeShippingCheck.d.ts +15 -0
- package/hooks/useFreeShippingCheck.js +31 -0
- package/hooks/useFreeShippingCheck.js.map +1 -0
- package/hooks/useGeolocation.d.ts +11 -0
- package/hooks/useGeolocation.js +34 -0
- package/hooks/useGeolocation.js.map +1 -0
- package/hooks/useInfinitePagination.d.ts +37 -0
- package/hooks/useInfinitePagination.js +142 -0
- package/hooks/useInfinitePagination.js.map +1 -0
- package/hooks/useLogError.d.ts +1 -0
- package/hooks/useLogError.js +8 -0
- package/hooks/useLogError.js.map +1 -0
- package/hooks/useLoginMutation.d.ts +12 -0
- package/hooks/useLoginMutation.js +15 -0
- package/hooks/useLoginMutation.js.map +1 -0
- package/hooks/useLoginRedirect.d.ts +4 -0
- package/hooks/useLoginRedirect.js +37 -0
- package/hooks/useLoginRedirect.js.map +1 -0
- package/hooks/useOrderDetailQuery.d.ts +20 -0
- package/hooks/useOrderDetailQuery.js +29 -0
- package/hooks/useOrderDetailQuery.js.map +1 -0
- package/hooks/usePreconnectLinks.d.ts +10 -0
- package/hooks/usePreconnectLinks.js +30 -0
- package/hooks/usePreconnectLinks.js.map +1 -0
- package/hooks/usePrice.d.ts +41 -0
- package/hooks/usePrice.js +73 -0
- package/hooks/usePrice.js.map +1 -0
- package/hooks/useProductVariants/index.d.ts +1 -0
- package/hooks/useProductVariants/index.js +2 -0
- package/hooks/useProductVariants/index.js.map +1 -0
- package/hooks/useProductVariants/useProductVariants.d.ts +19 -0
- package/hooks/useProductVariants/useProductVariants.js +203 -0
- package/hooks/useProductVariants/useProductVariants.js.map +1 -0
- package/hooks/useProductVariants/useVariantFromUrl.d.ts +5 -0
- package/hooks/useProductVariants/useVariantFromUrl.js +16 -0
- package/hooks/useProductVariants/useVariantFromUrl.js.map +1 -0
- package/hooks/useRoutePreload.d.ts +24 -0
- package/hooks/useRoutePreload.js +40 -0
- package/hooks/useRoutePreload.js.map +1 -0
- package/hooks/useShopConfig.d.ts +1 -0
- package/hooks/useShopConfig.js +11 -0
- package/hooks/useShopConfig.js.map +1 -0
- package/hooks/useStockStatus.d.ts +8 -0
- package/hooks/useStockStatus.js +26 -0
- package/hooks/useStockStatus.js.map +1 -0
- package/hooks/useThrowErrorInDev.d.ts +1 -0
- package/hooks/useThrowErrorInDev.js +8 -0
- package/hooks/useThrowErrorInDev.js.map +1 -0
- package/hooks/useThunkReducer.d.ts +7 -0
- package/hooks/useThunkReducer.js +24 -0
- package/hooks/useThunkReducer.js.map +1 -0
- package/hooks/useWarningInDev.d.ts +1 -0
- package/hooks/useWarningInDev.js +10 -0
- package/hooks/useWarningInDev.js.map +1 -0
- package/inServer.d.ts +1 -0
- package/inServer.js +3 -0
- package/inServer.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/integrations/addwishSchemaExtension.d.ts +35 -0
- package/integrations/addwishSchemaExtension.js +141 -0
- package/integrations/addwishSchemaExtension.js.map +1 -0
- package/integrations/nostoSchemaExtension.d.ts +5 -0
- package/integrations/nostoSchemaExtension.js +77 -0
- package/integrations/nostoSchemaExtension.js.map +1 -0
- package/integrations/sluggishSchemaExtension.d.ts +2 -0
- package/integrations/sluggishSchemaExtension.js +27 -0
- package/integrations/sluggishSchemaExtension.js.map +1 -0
- package/package.json +13 -29
- package/polyfills.d.ts +1 -0
- package/polyfills.js +36 -0
- package/polyfills.js.map +1 -0
- package/resolvers/filters/boolFilter.d.ts +3 -0
- package/resolvers/filters/boolFilter.js +82 -0
- package/resolvers/filters/boolFilter.js.map +1 -0
- package/resolvers/filters/defaultActiveFilters.d.ts +3 -0
- package/resolvers/filters/defaultActiveFilters.js +9 -0
- package/resolvers/filters/defaultActiveFilters.js.map +1 -0
- package/resolvers/filters/filterParams.d.ts +3 -0
- package/resolvers/filters/filterParams.js +85 -0
- package/resolvers/filters/filterParams.js.map +1 -0
- package/resolvers/filters/filters.d.ts +5 -0
- package/resolvers/filters/filters.js +79 -0
- package/resolvers/filters/filters.js.map +1 -0
- package/resolvers/filters/index.d.ts +23 -0
- package/resolvers/filters/index.js +8 -0
- package/resolvers/filters/index.js.map +1 -0
- package/resolvers/filters/listFilter.d.ts +7 -0
- package/resolvers/filters/listFilter.js +69 -0
- package/resolvers/filters/listFilter.js.map +1 -0
- package/resolvers/filters/listFilterItem.d.ts +3 -0
- package/resolvers/filters/listFilterItem.js +118 -0
- package/resolvers/filters/listFilterItem.js.map +1 -0
- package/resolvers/filters/multiListFilter.d.ts +5 -0
- package/resolvers/filters/multiListFilter.js +195 -0
- package/resolvers/filters/multiListFilter.js.map +1 -0
- package/resolvers/filters/multiListFilterList.d.ts +3 -0
- package/resolvers/filters/multiListFilterList.js +56 -0
- package/resolvers/filters/multiListFilterList.js.map +1 -0
- package/resolvers/filters/rangeFilter.d.ts +5 -0
- package/resolvers/filters/rangeFilter.js +122 -0
- package/resolvers/filters/rangeFilter.js.map +1 -0
- package/resolvers/filters/updateQueryString.d.ts +12 -0
- package/resolvers/filters/updateQueryString.js +117 -0
- package/resolvers/filters/updateQueryString.js.map +1 -0
- package/resolvers/index.d.ts +37 -0
- package/resolvers/index.js +38 -0
- package/resolvers/index.js.map +1 -0
- package/sentry/client.d.ts +1 -0
- package/sentry/client.js +30 -0
- package/sentry/client.js.map +1 -0
- package/sentry/common.d.ts +1 -0
- package/sentry/common.js +5 -0
- package/sentry/common.js.map +1 -0
- package/sentry/server.d.ts +1 -0
- package/sentry/server.js +20 -0
- package/sentry/server.js.map +1 -0
- package/sentry/utils.d.ts +1 -0
- package/sentry/utils.js +2 -0
- package/sentry/utils.js.map +1 -0
- package/server/graphql.d.ts +20 -0
- package/server/graphql.js +118 -0
- package/server/graphql.js.map +1 -0
- package/server/index.d.ts +2 -0
- package/server/index.js +3 -0
- package/server/index.js.map +1 -0
- package/server/tracking/facebook.d.ts +5 -0
- package/server/tracking/facebook.js +148 -0
- package/server/tracking/facebook.js.map +1 -0
- package/server/tracking/middleware.d.ts +8 -0
- package/server/tracking/middleware.js +15 -0
- package/server/tracking/middleware.js.map +1 -0
- package/test-utils/ProviderPyramid.js +1 -1
- package/time.d.ts +1 -0
- package/time.js +6 -0
- package/time.js.map +1 -0
- package/types.d.ts +1820 -1955
@@ -0,0 +1,57 @@
|
|
1
|
+
import { resetRequest } from '@jetshop/core/data/mutations/accountMutations.gql';
|
2
|
+
import t from '@jetshop/intl';
|
3
|
+
import { Form, Formik } from 'formik';
|
4
|
+
import React from 'react';
|
5
|
+
import { useMutation } from '@apollo/client';
|
6
|
+
export const ForgotPasswordContext = React.createContext(undefined);
|
7
|
+
export function useForgotPasswordData() {
|
8
|
+
var _a, _b;
|
9
|
+
const { formik } = React.useContext(ForgotPasswordContext);
|
10
|
+
const submitted = (_a = formik === null || formik === void 0 ? void 0 : formik.status) === null || _a === void 0 ? void 0 : _a.success;
|
11
|
+
const globalError = (_b = formik === null || formik === void 0 ? void 0 : formik.status) === null || _b === void 0 ? void 0 : _b.globalError;
|
12
|
+
const emailInputProps = {
|
13
|
+
type: 'email',
|
14
|
+
name: 'email',
|
15
|
+
required: true
|
16
|
+
};
|
17
|
+
return Object.assign({ submitted,
|
18
|
+
globalError,
|
19
|
+
emailInputProps }, formik);
|
20
|
+
}
|
21
|
+
function validate(values) {
|
22
|
+
const errors = {};
|
23
|
+
if (!values.email) {
|
24
|
+
errors['email'] = t('This field is required');
|
25
|
+
}
|
26
|
+
if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(values.email)) {
|
27
|
+
errors['email'] = t('Invalid email address');
|
28
|
+
}
|
29
|
+
return errors;
|
30
|
+
}
|
31
|
+
function handleMutationError(actions) {
|
32
|
+
actions.setStatus({
|
33
|
+
globalError: t('Something went wrong. Please check your input, or try again later.')
|
34
|
+
});
|
35
|
+
actions.setSubmitting(false);
|
36
|
+
}
|
37
|
+
export function ForgotPasswordProvider(props) {
|
38
|
+
const [mutate] = useMutation(resetRequest);
|
39
|
+
return (React.createElement(Formik, { initialValues: { email: '' }, validate: validate, onSubmit: (values, actions) => {
|
40
|
+
actions.setSubmitting(true);
|
41
|
+
mutate({ variables: { email: values.email } })
|
42
|
+
.then((resp) => {
|
43
|
+
if (resp.data.requestPasswordReset.success) {
|
44
|
+
actions.setStatus({ success: true });
|
45
|
+
actions.setSubmitting(false);
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
handleMutationError(actions);
|
49
|
+
}
|
50
|
+
})
|
51
|
+
.catch(() => {
|
52
|
+
handleMutationError(actions);
|
53
|
+
});
|
54
|
+
} }, (formik) => (React.createElement(Form, null,
|
55
|
+
React.createElement(ForgotPasswordContext.Provider, Object.assign({ value: { formik } }, props))))));
|
56
|
+
}
|
57
|
+
//# sourceMappingURL=ForgotPasswordProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ForgotPasswordProvider.js","sourceRoot":"","sources":["ForgotPasswordProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AAKjF,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAA8B,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAErD,SAAS,CAAC,CAAC;AAEd,MAAM,UAAU,qBAAqB;;IACnC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAE3D,MAAM,SAAS,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,OAAO,CAAC;IAC1C,MAAM,WAAW,GAAG,MAAA,M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I,EAAE,EAAE;gBACb,IAAI,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE;oBAC1C,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oBACrC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;iBAC9B;qBAAM;oBACL,mBAAmB,CAAC,OAAO,CAAC,CAAC;iBAC9B;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,GAAG,EAAE;gBACV,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC,IAEA,CAAC,MAAM,EAAE,EAAE,CAAC,CACX,oBAAC,IAAI;QACH,oBAAC,qBAAqB,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAM,KAAK,EAAI,CAC3D,CACR,CACM,CACV,CAAC;AACJ,CAAC"}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const ResetPasswordProvider: React.ComponentClass<Pick<any, string | number | symbol>, any> & import("react-router").WithRouterStatics<(props: any) => React.JSX.Element>;
|
3
|
+
export declare function useResetPasswordForm(): {
|
4
|
+
passwordInputProps: {
|
5
|
+
required: boolean;
|
6
|
+
type: string;
|
7
|
+
name: string;
|
8
|
+
autoComplete: string;
|
9
|
+
};
|
10
|
+
submitted: boolean;
|
11
|
+
globalError: any;
|
12
|
+
validateOnChange?: boolean;
|
13
|
+
validateOnBlur?: boolean;
|
14
|
+
validateOnMount?: boolean;
|
15
|
+
isInitialValid?: boolean | ((props: {}) => boolean);
|
16
|
+
enableReinitialize?: boolean;
|
17
|
+
values: {
|
18
|
+
newPassword: string;
|
19
|
+
};
|
20
|
+
errors: import("formik").FormikErrors<{
|
21
|
+
newPassword: string;
|
22
|
+
}>;
|
23
|
+
touched: import("formik").FormikTouched<{
|
24
|
+
newPassword: string;
|
25
|
+
}>;
|
26
|
+
isSubmitting: boolean;
|
27
|
+
isValidating: boolean;
|
28
|
+
status?: any;
|
29
|
+
submitCount: number;
|
30
|
+
setStatus: (status?: any) => void;
|
31
|
+
setErrors: (errors: import("formik").FormikErrors<{
|
32
|
+
newPassword: string;
|
33
|
+
}>) => void;
|
34
|
+
setSubmitting: (isSubmitting: boolean) => void;
|
35
|
+
setTouched: (touched: import("formik").FormikTouched<{
|
36
|
+
newPassword: string;
|
37
|
+
}>, shouldValidate?: boolean) => void;
|
38
|
+
setValues: (values: React.SetStateAction<{
|
39
|
+
newPassword: string;
|
40
|
+
}>, shouldValidate?: boolean) => void;
|
41
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<{
|
42
|
+
newPassword: string;
|
43
|
+
}>>;
|
44
|
+
setFieldError: (field: string, message: string) => void;
|
45
|
+
setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
|
46
|
+
validateForm: (values?: any) => Promise<import("formik").FormikErrors<{
|
47
|
+
newPassword: string;
|
48
|
+
}>>;
|
49
|
+
validateField: (field: string) => void;
|
50
|
+
resetForm: (nextState?: Partial<import("formik").FormikState<{
|
51
|
+
newPassword: string;
|
52
|
+
}>>) => void;
|
53
|
+
submitForm: (() => Promise<void>) & (() => Promise<any>);
|
54
|
+
setFormikState: (f: import("formik").FormikState<{
|
55
|
+
newPassword: string;
|
56
|
+
}> | ((prevState: import("formik").FormikState<{
|
57
|
+
newPassword: string;
|
58
|
+
}>) => import("formik").FormikState<{
|
59
|
+
newPassword: string;
|
60
|
+
}>), cb?: () => void) => void;
|
61
|
+
handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
|
62
|
+
handleReset: (e?: React.SyntheticEvent<any, Event>) => void;
|
63
|
+
handleBlur: {
|
64
|
+
(e: React.FocusEvent<any, Element>): void;
|
65
|
+
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
66
|
+
};
|
67
|
+
handleChange: {
|
68
|
+
(e: React.ChangeEvent<any>): void;
|
69
|
+
<T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
|
70
|
+
};
|
71
|
+
getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
|
72
|
+
getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
|
73
|
+
getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
|
74
|
+
dirty: boolean;
|
75
|
+
isValid: boolean;
|
76
|
+
initialValues: {
|
77
|
+
newPassword: string;
|
78
|
+
};
|
79
|
+
initialErrors: import("formik").FormikErrors<{
|
80
|
+
newPassword: string;
|
81
|
+
}>;
|
82
|
+
initialTouched: import("formik").FormikTouched<{
|
83
|
+
newPassword: string;
|
84
|
+
}>;
|
85
|
+
initialStatus?: any;
|
86
|
+
registerField: (name: string, fns: {
|
87
|
+
validate?: import("formik").FieldValidator;
|
88
|
+
}) => void;
|
89
|
+
unregisterField: (name: string) => void;
|
90
|
+
};
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { resetPassword } from '@jetshop/core/data/mutations/accountMutations.gql';
|
2
|
+
import t from '@jetshop/intl';
|
3
|
+
import { Form, Formik } from 'formik';
|
4
|
+
import React, { useContext } from 'react';
|
5
|
+
import { useMutation } from '@apollo/client';
|
6
|
+
import { Redirect, withRouter } from 'react-router';
|
7
|
+
import getErrorDetail from '../../helpers/getErrorDetail';
|
8
|
+
import throwErrorInDev from '../../helpers/throwErrorInDev';
|
9
|
+
import { createValidatorForFields } from './formFieldsFromSettings';
|
10
|
+
import { useCountrySettings } from '../ChannelContext/useCountrySettings';
|
11
|
+
function usePasswordValidation() {
|
12
|
+
const { selectedCountrySettings } = useCountrySettings();
|
13
|
+
const passwordFieldArray = (selectedCountrySettings && [
|
14
|
+
selectedCountrySettings.privateCustomerFields.find((field) => field.name === 'password')
|
15
|
+
]) ||
|
16
|
+
[];
|
17
|
+
return createValidatorForFields(passwordFieldArray, {
|
18
|
+
getFieldName: () => 'newPassword'
|
19
|
+
});
|
20
|
+
}
|
21
|
+
// Context to hold formik state
|
22
|
+
const ResetPasswordContext = React.createContext(undefined);
|
23
|
+
export const ResetPasswordProvider = withRouter(function ResetPasswordProvider(props) {
|
24
|
+
const params = props.match.params;
|
25
|
+
const { token: resetPasswordToken } = params;
|
26
|
+
const [resetPasswordMutation] = useMutation(resetPassword);
|
27
|
+
const validator = usePasswordValidation();
|
28
|
+
// We need a token to post with the password reset mutation
|
29
|
+
if (!resetPasswordToken) {
|
30
|
+
return React.createElement(Redirect, { to: "/" });
|
31
|
+
}
|
32
|
+
return (React.createElement(Formik, { initialValues: { newPassword: '' }, validate: validator, onSubmit: ({ newPassword }, actions) => {
|
33
|
+
actions.setSubmitting(true);
|
34
|
+
resetPasswordMutation({
|
35
|
+
variables: {
|
36
|
+
newPassword,
|
37
|
+
resetPasswordToken
|
38
|
+
}
|
39
|
+
})
|
40
|
+
.then(() => {
|
41
|
+
actions.setSubmitting(false);
|
42
|
+
actions.setStatus('submitted');
|
43
|
+
})
|
44
|
+
.catch((err) => {
|
45
|
+
actions.setSubmitting(false);
|
46
|
+
actions.setStatus(getErrorDetail(err).codes);
|
47
|
+
});
|
48
|
+
} }, (formik) => (React.createElement(Form, null,
|
49
|
+
React.createElement(ResetPasswordContext.Provider, Object.assign({}, props, { value: { formik } }))))));
|
50
|
+
});
|
51
|
+
// Hook that can be used to get the formik data, submit state, and translated error
|
52
|
+
export function useResetPasswordForm() {
|
53
|
+
const context = useContext(ResetPasswordContext);
|
54
|
+
throwErrorInDev(!context, '`useResetPassword` may only be called from within `ResetPasswordProvider`');
|
55
|
+
const { formik } = context;
|
56
|
+
// We only want to display one error, so grab the first
|
57
|
+
const globalError = Array.isArray(formik.status)
|
58
|
+
? formik.status.map(getErrorMessage)[0]
|
59
|
+
: undefined;
|
60
|
+
const passwordInputProps = {
|
61
|
+
required: true,
|
62
|
+
type: 'password',
|
63
|
+
name: 'newPassword',
|
64
|
+
autoComplete: 'new-password'
|
65
|
+
};
|
66
|
+
return Object.assign(Object.assign({}, formik), { passwordInputProps, submitted: formik.status === 'submitted', globalError: globalError });
|
67
|
+
}
|
68
|
+
// Takes an error code from the API and converts to a friendly string
|
69
|
+
function getErrorMessage(code) {
|
70
|
+
const errorTranslations = {
|
71
|
+
InvalidResetPasswordToken: t('Your password reset token has expired, or is invalid.')
|
72
|
+
};
|
73
|
+
if (errorTranslations[code])
|
74
|
+
return errorTranslations[code];
|
75
|
+
// Fallback
|
76
|
+
return t('The form could not be submitted. Please try again later.');
|
77
|
+
}
|
78
|
+
//# sourceMappingURL=ResetPasswordProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResetPasswordProvider.js","sourceRoot":"","sources":["ResetPasswordProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAI1E,SAAS,qBAAqB;IAC5B,MAAM,EAAE,uBAAuB,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAEzD,MAAM,kBAAkB,GACtB,CAAC,uBAAuB,IAAI;QAC1B,uBAAuB,CAAC,qBAAqB,CAAC,IAAI,CAChD,CAAC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X,OAAO,CAAC,CAAC,0DAA0D,CAAC,CAAC;AACvE,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FormikProps } from 'formik';
|
2
|
+
import React from 'react';
|
3
|
+
interface SSNFieldProps {
|
4
|
+
onSuccess(): any;
|
5
|
+
children(args: {
|
6
|
+
formik: FormikProps<{
|
7
|
+
ssn: string;
|
8
|
+
}>;
|
9
|
+
}): React.ReactNode;
|
10
|
+
}
|
11
|
+
declare const SSNField: React.FC<SSNFieldProps>;
|
12
|
+
export default SSNField;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import getErrorDetail from '@jetshop/core/helpers/getErrorDetail';
|
2
|
+
import t from '@jetshop/intl';
|
3
|
+
import { Formik } from 'formik';
|
4
|
+
import React, { useContext } from 'react';
|
5
|
+
import { ApolloConsumer } from '@apollo/client';
|
6
|
+
import { LookupDispatch } from './SSNLookupContainer';
|
7
|
+
import PersonLookupQuery from '@jetshop/core/data/queries/PersonLookupQuery.gql';
|
8
|
+
const SSNField = function SSNField(props) {
|
9
|
+
const dispatch = useContext(LookupDispatch);
|
10
|
+
return (React.createElement(ApolloConsumer, null, (client) => {
|
11
|
+
return (React.createElement(Formik, { onSubmit: (values, formik) => {
|
12
|
+
client
|
13
|
+
.query({
|
14
|
+
query: PersonLookupQuery,
|
15
|
+
variables: {
|
16
|
+
key: values.ssn
|
17
|
+
}
|
18
|
+
})
|
19
|
+
.then((resp) => {
|
20
|
+
formik.setSubmitting(false);
|
21
|
+
props.onSuccess();
|
22
|
+
dispatch({ type: 'set', payload: resp.data.personLookup });
|
23
|
+
}, (error) => {
|
24
|
+
const errorMessage = getErrorDetail(error).codes[0].includes('PersonLookupFailed')
|
25
|
+
? t('Person lookup failed.')
|
26
|
+
: t('Something went wrong, please try again!');
|
27
|
+
formik.setSubmitting(false);
|
28
|
+
dispatch({ type: 'reset' });
|
29
|
+
formik.setErrors({ ssn: errorMessage });
|
30
|
+
});
|
31
|
+
}, initialValues: { ssn: '' } }, (formik) => props.children({ formik })));
|
32
|
+
}));
|
33
|
+
};
|
34
|
+
export default SSNField;
|
35
|
+
//# sourceMappingURL=SSN.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SSN.js","sourceRoot":"","sources":["SSN.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,sCAAsC,CAAC;AAClE,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AAOjF,MAAM,QAAQ,GAA4B,SAAS,QAAQ,CAAC,KAAK;IAC/D,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,MAAM,EAAE,EAAE;QACV,OAAO,CACL,oBAAC,MAAM,IACL,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;gBAC3B,MAAM;qBACH,KAAK,CAAC;oBACL,KAAK,EAAE,iBAAiB;oBACxB,SAAS,EAAE;wBACT,GAAG,EAAE,MAAM,CAAC,GAAG;qBAChB;iBACF,CAAC;qBACD,IAAI,CACH,CAAC,IAAuD,EAAE,EAAE;oBAC1D,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;oBAC5B,KAAK,CAAC,SAAS,EAAE,CAAC;oBAClB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;gBAC7D,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;oBACR,MAAM,YAAY,GAAG,cAAc,CACjC,KAAK,CACN,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;wBACvC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;wBAC5B,CAAC,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC;oBAEjD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;oBAC5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;oBAC5B,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;gBAC1C,CAAC,CACF,CAAC;YACN,CAAC,EACD,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAEzB,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAChC,CACV,CAAC;IACJ,CAAC,CACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { PersonLookup } from '@jetshop/core/types';
|
2
|
+
import React from 'react';
|
3
|
+
interface State {
|
4
|
+
lookupData: PersonLookup;
|
5
|
+
}
|
6
|
+
type Action = {
|
7
|
+
type: 'set';
|
8
|
+
payload: PersonLookup;
|
9
|
+
} | {
|
10
|
+
type: 'reset';
|
11
|
+
};
|
12
|
+
export declare const LookupDispatch: React.Context<React.Dispatch<Action>>;
|
13
|
+
export declare const LookupData: React.Context<State>;
|
14
|
+
declare const SSNLookupContainer: React.FC;
|
15
|
+
export default SSNLookupContainer;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React, { createContext, useReducer } from 'react';
|
2
|
+
export const LookupDispatch = createContext(undefined);
|
3
|
+
export const LookupData = createContext(undefined);
|
4
|
+
function reducer(state, action) {
|
5
|
+
switch (action.type) {
|
6
|
+
case 'set':
|
7
|
+
return { lookupData: action.payload };
|
8
|
+
case 'reset':
|
9
|
+
return { lookupData: null };
|
10
|
+
default:
|
11
|
+
return state;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
const SSNLookupContainer = function SSNLookupContainer(props) {
|
15
|
+
const [data, dispatch] = useReducer(reducer, { lookupData: undefined });
|
16
|
+
return (React.createElement(LookupDispatch.Provider, { value: dispatch },
|
17
|
+
React.createElement(LookupData.Provider, { value: data }, props.children)));
|
18
|
+
};
|
19
|
+
export default SSNLookupContainer;
|
20
|
+
//# sourceMappingURL=SSNLookupContainer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SSNLookupContainer.js","sourceRoot":"","sources":["SSNLookupContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAOzD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAyB,SAAS,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAQ,SAAS,CAAC,CAAC;AAE1D,SAAS,OAAO,CAAC,KAAY,EAAE,MAAc;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,KAAK;YACR,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;QACxC,KAAK,OAAO;YACV,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;QAC9B;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAED,MAAM,kBAAkB,GAAa,SAAS,kBAAkB,CAAC,KAAK;IACpE,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,UAAU,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IAExE,OAAO,CACL,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ;QACtC,oBAAC,UAAU,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IAAG,KAAK,CAAC,QAAQ,CAAuB,CAChD,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { SignUpInput, MaskedProperty } from '@jetshop/core/types';
|
2
|
+
import React from 'react';
|
3
|
+
import { SignUpFormInput } from './formatSignupInput';
|
4
|
+
type LookupData = {
|
5
|
+
[key: string]: MaskedProperty;
|
6
|
+
};
|
7
|
+
interface SignupFormProps {
|
8
|
+
children: any;
|
9
|
+
lookupData: LookupData;
|
10
|
+
additionalFormatter?: (values: SignUpFormInput) => SignUpInput;
|
11
|
+
additionalInitialValues?: Partial<SignUpFormInput>;
|
12
|
+
}
|
13
|
+
declare function SignupFormProvider({ LoadingComponent, ...props }: SignupFormProps & {
|
14
|
+
LoadingComponent?: JSX.Element;
|
15
|
+
}): React.JSX.Element;
|
16
|
+
export default SignupFormProvider;
|
@@ -0,0 +1,82 @@
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import { Form, Formik } from 'formik';
|
13
|
+
import React, { useContext, useMemo } from 'react';
|
14
|
+
import { createValidatorForFields } from './formFieldsFromSettings';
|
15
|
+
import SignupProvider, { SignupContext, SignupFormikContext } from './signup-context';
|
16
|
+
import { useSignupSubmit } from './signupSubmit';
|
17
|
+
// Get the default values from the lookupData results if there are any,
|
18
|
+
// otherwise default them to an empty string
|
19
|
+
function getFieldDefaultValues(fields, lookupData) {
|
20
|
+
const values = {};
|
21
|
+
if (lookupData) {
|
22
|
+
fields.forEach((field) => {
|
23
|
+
var _a;
|
24
|
+
values[field.name] = (_a = lookupData === null || lookupData === void 0 ? void 0 : lookupData[field.name]) === null || _a === void 0 ? void 0 : _a.masked;
|
25
|
+
});
|
26
|
+
}
|
27
|
+
else {
|
28
|
+
fields.forEach((field) => {
|
29
|
+
values[field.name] = '';
|
30
|
+
});
|
31
|
+
}
|
32
|
+
return values;
|
33
|
+
}
|
34
|
+
function formatLookupData(signupValues, lookupData) {
|
35
|
+
if (!lookupData) {
|
36
|
+
return signupValues;
|
37
|
+
}
|
38
|
+
const values = Object.assign({ externalId: String(lookupData === null || lookupData === void 0 ? void 0 : lookupData.externalId) }, signupValues);
|
39
|
+
Object.keys(values).forEach((key) => {
|
40
|
+
var _a, _b;
|
41
|
+
if (values[key] === ((_a = lookupData[key]) === null || _a === void 0 ? void 0 : _a.masked)) {
|
42
|
+
values[key] = (_b = lookupData[key]) === null || _b === void 0 ? void 0 : _b.encrypted;
|
43
|
+
}
|
44
|
+
});
|
45
|
+
return values;
|
46
|
+
}
|
47
|
+
function SignupForm(props) {
|
48
|
+
// Available using Voyado integration.
|
49
|
+
const lookupData = props === null || props === void 0 ? void 0 : props.lookupData;
|
50
|
+
const additionalFormatter = props === null || props === void 0 ? void 0 : props.additionalFormatter;
|
51
|
+
const { allFields, selectedCountry } = useContext(SignupContext);
|
52
|
+
// Create the Formik validator for all fields
|
53
|
+
const validate = createValidatorForFields(allFields);
|
54
|
+
// Handle the submit mutation
|
55
|
+
const signupSubmit = useSignupSubmit();
|
56
|
+
// Get the initial values for the form
|
57
|
+
const initialValues = useMemo(() => {
|
58
|
+
var _a;
|
59
|
+
const additionalInitialValues = (_a = props === null || props === void 0 ? void 0 : props.additionalInitialValues) !== null && _a !== void 0 ? _a : {};
|
60
|
+
return Object.assign(Object.assign(Object.assign({}, getFieldDefaultValues(allFields, lookupData)), additionalInitialValues), { country: selectedCountry.code });
|
61
|
+
}, [
|
62
|
+
allFields,
|
63
|
+
lookupData,
|
64
|
+
props === null || props === void 0 ? void 0 : props.additionalInitialValues,
|
65
|
+
selectedCountry.code
|
66
|
+
]);
|
67
|
+
return (React.createElement(Formik, { enableReinitialize: true, validateOnChange: true, onSubmit: (values, actions) => {
|
68
|
+
signupSubmit({
|
69
|
+
values: formatLookupData(additionalFormatter ? additionalFormatter(values) : values, props.lookupData),
|
70
|
+
actions
|
71
|
+
});
|
72
|
+
}, validate: validate, initialValues: initialValues }, (formik) => props.children({ formik })));
|
73
|
+
}
|
74
|
+
// This needs to be done to provide the context to the form
|
75
|
+
function SignupFormProvider(_a) {
|
76
|
+
var { LoadingComponent } = _a, props = __rest(_a, ["LoadingComponent"]);
|
77
|
+
return (React.createElement(SignupProvider, { LoadingComponent: LoadingComponent },
|
78
|
+
React.createElement(SignupForm, Object.assign({}, props), ({ formik }) => (React.createElement(Form, null,
|
79
|
+
React.createElement(SignupFormikContext.Provider, Object.assign({ value: { formik } }, props)))))));
|
80
|
+
}
|
81
|
+
export default SignupFormProvider;
|
82
|
+
//# sourceMappingURL=SignupFormContainer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SignupFormContainer.js","sourceRoot":"","sources":["SignupFormContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,cAAc,EAAE,EACrB,aAAa,EACb,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAejD,uEAAuE;AACvE,4CAA4C;AAC5C,SAAS,qBAAqB,CAC5B,MAAuB,EACvB,UAAsB;IAEtB,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,IAAI,UAAU,EAAE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BAAK,KAAK,GAClB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACf,oBAAC,IAAI;YACH,oBAAC,mBAAmB,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAM,KAAK,EAAI,CACzD,CACR,CACU,CACE,CAClB,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { FormikProps } from 'formik';
|
2
|
+
import React, { ReactNode } from 'react';
|
3
|
+
export interface UpdatePasswordFormRenderPropsField {
|
4
|
+
name: string;
|
5
|
+
}
|
6
|
+
export interface UpdatePasswordVariables {
|
7
|
+
oldPassword: string;
|
8
|
+
newPassword: string;
|
9
|
+
}
|
10
|
+
export interface UpdatePasswordValues extends UpdatePasswordVariables {
|
11
|
+
newPasswordRepeat: string;
|
12
|
+
}
|
13
|
+
declare const inputProps: {
|
14
|
+
oldPassword: {
|
15
|
+
type: string;
|
16
|
+
name: string;
|
17
|
+
required: boolean;
|
18
|
+
autoComplete: string;
|
19
|
+
};
|
20
|
+
newPassword: {
|
21
|
+
type: string;
|
22
|
+
name: string;
|
23
|
+
required: boolean;
|
24
|
+
autoComplete: string;
|
25
|
+
};
|
26
|
+
repeatPassword: {
|
27
|
+
type: string;
|
28
|
+
name: string;
|
29
|
+
required: boolean;
|
30
|
+
autoComplete: string;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
export type UpdatePasswordFormRenderProps = FormikProps<UpdatePasswordValues> & {
|
34
|
+
inputProps: typeof inputProps;
|
35
|
+
submitted?: boolean;
|
36
|
+
globalError?: string;
|
37
|
+
};
|
38
|
+
export interface UpdatePasswordFormProps {
|
39
|
+
onSubmitSuccess?: () => void;
|
40
|
+
render: (props: UpdatePasswordFormRenderProps) => ReactNode;
|
41
|
+
}
|
42
|
+
export declare const UpdatePasswordProvider: React.FunctionComponent<UpdatePasswordFormProps>;
|
43
|
+
export declare function useUpdatePasswordMutation(): (variables: UpdatePasswordVariables) => Promise<void>;
|
44
|
+
export {};
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import UpdatePasswordMutation from '@jetshop/core/data/mutations/updatePassword.gql';
|
2
|
+
import logError from '@jetshop/core/helpers/logError';
|
3
|
+
import t from '@jetshop/intl';
|
4
|
+
import { Form, Formik } from 'formik';
|
5
|
+
import React from 'react';
|
6
|
+
import { useMutation } from '@apollo/client';
|
7
|
+
import { createValidatorForFields } from './formFieldsFromSettings';
|
8
|
+
import { useCustomerQuery } from './useCustomer';
|
9
|
+
import GetCustomerCountryCode from '@jetshop/core/data/queries/GetCustomerCountryCode.gql';
|
10
|
+
const inputProps = {
|
11
|
+
oldPassword: {
|
12
|
+
type: 'password',
|
13
|
+
name: 'oldPassword',
|
14
|
+
required: true,
|
15
|
+
autoComplete: 'current-password'
|
16
|
+
},
|
17
|
+
newPassword: {
|
18
|
+
type: 'password',
|
19
|
+
name: 'newPassword',
|
20
|
+
required: true,
|
21
|
+
autoComplete: 'new-password'
|
22
|
+
},
|
23
|
+
repeatPassword: {
|
24
|
+
type: 'password',
|
25
|
+
name: 'newPasswordRepeat',
|
26
|
+
required: true,
|
27
|
+
autoComplete: 'new-password'
|
28
|
+
}
|
29
|
+
};
|
30
|
+
export const UpdatePasswordProvider = ({ render, onSubmitSuccess }) => {
|
31
|
+
const updatePasswordMutation = useUpdatePasswordMutation();
|
32
|
+
// We need the user's country code so we can check the validation rules in
|
33
|
+
// that country's channel settings
|
34
|
+
const { countrySettings } = useCustomerQuery({
|
35
|
+
query: GetCustomerCountryCode
|
36
|
+
});
|
37
|
+
const passwordField = countrySettings &&
|
38
|
+
countrySettings.privateCustomerFields.find((field) => field.name === 'password');
|
39
|
+
// Combine validation from the API with our own validation
|
40
|
+
const validator = createValidatorForFields([
|
41
|
+
passwordField,
|
42
|
+
{ id: 'oldPassword', name: 'oldPassword', required: true },
|
43
|
+
{ id: 'newPasswordRepeat', name: 'newPasswordRepeat', required: true }
|
44
|
+
], {
|
45
|
+
getFieldName: (name) => {
|
46
|
+
if (name === 'password') {
|
47
|
+
return 'newPassword';
|
48
|
+
}
|
49
|
+
return name;
|
50
|
+
},
|
51
|
+
customValidation: (errors, values) => {
|
52
|
+
if (values.newPasswordRepeat &&
|
53
|
+
values.newPassword !== values.newPasswordRepeat) {
|
54
|
+
errors.newPasswordRepeat = t('Does not match new password');
|
55
|
+
}
|
56
|
+
}
|
57
|
+
});
|
58
|
+
return (React.createElement(Formik, { initialValues: {
|
59
|
+
oldPassword: '',
|
60
|
+
newPassword: '',
|
61
|
+
newPasswordRepeat: ''
|
62
|
+
}, validate: validator, onSubmit: ({ newPassword, oldPassword }, actions) => {
|
63
|
+
actions.setSubmitting(true);
|
64
|
+
updatePasswordMutation({ newPassword, oldPassword })
|
65
|
+
.then(() => {
|
66
|
+
actions.setSubmitting(false);
|
67
|
+
actions.resetForm();
|
68
|
+
typeof onSubmitSuccess === 'function' && onSubmitSuccess();
|
69
|
+
actions.setStatus({ success: true });
|
70
|
+
})
|
71
|
+
.catch((err) => {
|
72
|
+
logError(true, err);
|
73
|
+
actions.setSubmitting(false);
|
74
|
+
actions.setStatus({
|
75
|
+
globalError: t('Something went wrong updating password. Is your old password correct?')
|
76
|
+
});
|
77
|
+
});
|
78
|
+
}, render: (props) => {
|
79
|
+
var _a, _b;
|
80
|
+
return (React.createElement(Form, null, render(Object.assign(Object.assign({}, props), { inputProps, submitted: (_a = props === null || props === void 0 ? void 0 : props.status) === null || _a === void 0 ? void 0 : _a.success, globalError: (_b = props === null || props === void 0 ? void 0 : props.status) === null || _b === void 0 ? void 0 : _b.globalError }))));
|
81
|
+
} }));
|
82
|
+
};
|
83
|
+
export function useUpdatePasswordMutation() {
|
84
|
+
const [mutate] = useMutation(UpdatePasswordMutation);
|
85
|
+
return function updatePasswordMutationWrapper(variables) {
|
86
|
+
return Promise.resolve()
|
87
|
+
.then(() => mutate({
|
88
|
+
variables
|
89
|
+
}))
|
90
|
+
.then((res) => {
|
91
|
+
if (!res.data.updatePassword.success) {
|
92
|
+
// This should never happen as mutation itself fails
|
93
|
+
throw new Error('Something went wrong');
|
94
|
+
}
|
95
|
+
});
|
96
|
+
};
|
97
|
+
}
|
98
|
+
//# sourceMappingURL=UpdatePasswordForm.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UpdatePasswordForm.js","sourceRoot":"","sources":["UpdatePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAEtD,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,sBAAsB,MAAM,uDAAuD,CAAC;AAc3F,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE;QACX,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,kBAAkB;KACjC;IACD,WAAW,EAAE;QACX,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,cAAc;KAC7B;IACD,cAAc,EAAE;QACd,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,cAAc;KAC7B;CACF,CAAC;AAcF,MAAM,CAAC,MAAM,sBAAsB,GAE/B,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,EAAE;IAClC,MAAM,sBAAsB,GAAG,yBAAyB,EAAE,CAAC;IAC3D,0EAA0E;IAC1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