@jetshop/core 5.17.0-minor.21477356 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/ChannelHandler/ChannelHandler.js.map +1 -1
- package/ChannelHandler/PreserveRedirectRouteQuery.gql +4 -4
- package/ChannelHandler/redirectUtils.d.ts +2 -2
- package/ChannelHandler/redirectUtils.js +5 -3
- package/ChannelHandler/redirectUtils.js.map +1 -1
- package/ChannelHandler/redirectUtils.test.js +5 -5
- package/ChannelHandler/redirectUtilsGroupedChannels.test.js +5 -5
- package/analytics/Analytics.d.ts +3 -3
- package/analytics/Analytics.js.map +1 -1
- package/analytics/AnalyticsProvider.d.ts +2 -2
- package/analytics/trackerRegistry.d.ts +2 -2
- package/analytics/utils/script.d.ts +1 -1
- package/analytics/webVitals.js +5 -5
- package/analytics/webVitals.js.map +1 -1
- package/boot/NetworkStatusNotifier.d.ts +2 -0
- package/boot/NetworkStatusNotifier.js +4 -0
- package/boot/NetworkStatusNotifier.js.map +1 -0
- package/boot/SharedTree.d.ts +1 -1
- package/boot/SharedTree.js +1 -1
- package/boot/SharedTree.js.map +1 -1
- package/boot/apollo.d.ts +1 -2
- package/boot/apollo.js +13 -8
- package/boot/apollo.js.map +1 -1
- package/boot/client/startClient.js +18 -5
- package/boot/client/startClient.js.map +1 -1
- package/boot/server/IntervalQuery.d.ts +2 -2
- package/boot/server/IntervalQuery.js +2 -2
- package/boot/server/IntervalQuery.js.map +1 -1
- package/boot/server/IntervalQuery.test.js +9 -13
- package/boot/server/PersistedApolloClient.test.js +8 -7
- package/boot/server/breakpointMiddleware.d.ts +1 -1
- package/boot/server/createApolloServer.d.ts +4 -3
- package/boot/server/createApolloServer.js +5 -5
- package/boot/server/createApolloServer.js.map +1 -1
- package/boot/server/createRenderer.js +4 -2
- package/boot/server/createRenderer.js.map +1 -1
- package/boot/server/entrypoint.js +7 -4
- package/boot/server/entrypoint.js.map +1 -1
- package/boot/server/persistedQueries/PersistedClient.d.ts +3 -3
- package/boot/server/persistedQueries/__tests__/getPersistedQueriesForRequest.test.js +1 -1
- package/boot/utils/queryLoggingMiddleware.d.ts +1 -1
- package/boot/utils/queryLoggingMiddleware.js +2 -2
- package/boot/utils/queryLoggingMiddleware.js.map +1 -1
- package/cart/AddToCartFormik.d.ts +4 -4
- package/cart/AddToCartFormik.js +2 -2
- package/cart/AddToCartFormik.js.map +1 -1
- package/cart/useAddToCart.d.ts +4 -4
- package/components/Auth/CustomerUpdateForm.d.ts +1 -1
- package/components/Auth/ForgotPasswordProvider.d.ts +6 -8
- package/components/Auth/ForgotPasswordProvider.js +18 -18
- package/components/Auth/ForgotPasswordProvider.js.map +1 -1
- package/components/Auth/ResetPasswordProvider.d.ts +6 -4
- package/components/Auth/ResetPasswordProvider.js +1 -1
- package/components/Auth/ResetPasswordProvider.js.map +1 -1
- package/components/Auth/SSN.js +4 -4
- package/components/Auth/SSN.js.map +1 -1
- package/components/Auth/SSNLookupContainer.d.ts +1 -1
- package/components/Auth/SignupFormContainer.d.ts +3 -6
- package/components/Auth/SignupFormContainer.js.map +1 -1
- package/components/Auth/UpdatePasswordForm.d.ts +1 -1
- package/components/Auth/UpdatePasswordForm.js +6 -6
- package/components/Auth/UpdatePasswordForm.js.map +1 -1
- package/components/Auth/formatSignupInput.d.ts +1 -1
- package/components/Auth/signup-context.d.ts +2 -2
- package/components/Auth/signup-context.js +2 -3
- package/components/Auth/signup-context.js.map +1 -1
- package/components/Auth/signupSubmit.js +4 -4
- package/components/Auth/signupSubmit.js.map +1 -1
- package/components/Auth/useAddressFields.js +3 -3
- package/components/Auth/useAddressFields.js.map +1 -1
- package/components/Auth/useAddressFields.test.js +10 -8
- package/components/Auth/useCustomer.d.ts +3 -3
- package/components/Auth/useCustomer.js +1 -1
- package/components/Auth/useCustomer.js.map +1 -1
- package/components/AuthContext/AuthProvider.js +2 -2
- package/components/AuthContext/AuthProvider.js.map +1 -1
- package/components/AuthContext/AuthProvider.test.js +1 -1
- package/components/AuthContext/LogOut.d.ts +2 -2
- package/components/ChannelContext/ChannelProvider.d.ts +1 -1
- package/components/ChannelContext/useCountrySettings.d.ts +1 -1
- package/components/ChannelContext/useCountrySettings.js +1 -1
- package/components/ChannelContext/useCountrySettings.js.map +1 -1
- package/components/DynamicRoute/ActiveFiltersQuery.gql +4 -4
- package/components/DynamicRoute/CategoryRoute.d.ts +3 -3
- package/components/DynamicRoute/CategoryRoute.js +6 -3
- package/components/DynamicRoute/CategoryRoute.js.map +1 -1
- package/components/DynamicRoute/ContentRoute.d.ts +1 -1
- 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 +1 -1
- package/components/DynamicRoute/PreviewRoute.js +1 -1
- package/components/DynamicRoute/PreviewRoute.js.map +1 -1
- package/components/DynamicRoute/ProductByArticlenumber.d.ts +2 -2
- package/components/DynamicRoute/ProductByArticlenumber.js +2 -2
- package/components/DynamicRoute/ProductByArticlenumber.js.map +1 -1
- package/components/DynamicRoute/ProductRoute.d.ts +3 -3
- package/components/DynamicRoute/ProductRoute.js.map +1 -1
- package/components/DynamicRoute/RouteResolver.d.ts +3 -3
- package/components/DynamicRoute/RouteResolver.js +2 -1
- package/components/DynamicRoute/RouteResolver.js.map +1 -1
- package/components/DynamicRoute/Status.d.ts +4 -3
- package/components/DynamicRoute/Status.js.map +1 -1
- package/components/DynamicRoute/index.d.ts +5 -5
- package/components/DynamicRoute/index.js +47 -42
- package/components/DynamicRoute/index.js.map +1 -1
- package/components/Filters/utils/replaceInSearch.d.ts +1 -1
- package/components/Filters/utils/replaceInSearch.js.map +1 -1
- package/components/Fonts/CustomFont.d.ts +1 -1
- package/components/Fonts/injectFont.d.ts +2 -2
- package/components/Fonts/injectFont.js +2 -2
- package/components/Fonts/injectFont.js.map +1 -1
- package/components/Mutation/AddToCartFormik.d.ts +1 -1
- package/components/Mutation/AddToCartFormik.js +2 -2
- package/components/Mutation/AddToCartFormik.js.map +1 -1
- package/components/Mutation/DecrementQuantity.d.ts +2 -2
- package/components/Mutation/DecrementQuantity.js +1 -1
- package/components/Mutation/DecrementQuantity.js.map +1 -1
- package/components/Mutation/IncrementQuantity.d.ts +2 -2
- package/components/Mutation/IncrementQuantity.js +1 -1
- package/components/Mutation/IncrementQuantity.js.map +1 -1
- package/components/Mutation/RemoveFromCart.d.ts +3 -3
- package/components/Mutation/RemoveFromCart.js +1 -1
- package/components/Mutation/RemoveFromCart.js.map +1 -1
- package/components/Mutation/SetQuantity.d.ts +2 -2
- package/components/Mutation/SetQuantity.js +1 -1
- package/components/Mutation/SetQuantity.js.map +1 -1
- package/components/Mutation/SubscribeToNewsletter.d.ts +1 -1
- package/components/Mutation/SubscribeToNewsletter.js +1 -1
- package/components/Mutation/SubscribeToNewsletter.js.map +1 -1
- package/components/Mutation/SubscribeToStockNotifications.d.ts +1 -1
- package/components/Mutation/SubscribeToStockNotifications.js +6 -2
- package/components/Mutation/SubscribeToStockNotifications.js.map +1 -1
- package/components/Mutation/cartMutationUtils.d.ts +1 -2
- package/components/Mutation/cartMutationUtils.js.map +1 -1
- package/components/Mutation/useDecrementQuantity.d.ts +1 -1
- package/components/Mutation/useDecrementQuantity.js +1 -1
- package/components/Mutation/useDecrementQuantity.js.map +1 -1
- package/components/Mutation/useIncrementQuantity.d.ts +1 -1
- package/components/Mutation/useIncrementQuantity.js +1 -1
- package/components/Mutation/useIncrementQuantity.js.map +1 -1
- package/components/Mutation/useRemoveFromCart.d.ts +1 -1
- package/components/Mutation/useRemoveFromCart.js +1 -1
- package/components/Mutation/useRemoveFromCart.js.map +1 -1
- package/components/Mutation/useSetQuantity.d.ts +1 -1
- package/components/Mutation/useSetQuantity.js +1 -1
- package/components/Mutation/useSetQuantity.js.map +1 -1
- package/components/Notifications/Notifications.d.ts +3 -3
- package/components/Notifications/Notifications.js +2 -3
- package/components/Notifications/Notifications.js.map +1 -1
- package/components/Notifications/notificationMachine.d.ts +1 -1
- package/components/Notifications/notificationsMachine.d.ts +3 -3
- package/components/Notifications/useNotification.d.ts +1 -1
- package/components/OpenGraph/OpenGraphGeneralPageData.d.ts +1 -1
- package/components/Pagination/PaginationProvider.d.ts +1 -1
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +6 -6
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +1 -1
- package/components/Query/CartProvider.d.ts +1 -1
- package/components/Query/CartProvider.js +1 -1
- package/components/Query/CartProvider.js.map +1 -1
- package/components/SortOrder/SortOrderContainer.d.ts +1 -1
- package/components/SortOrder/SortOrderContext.d.ts +1 -1
- package/components/StructuredData/StructuredBreadcrumbData.d.ts +2 -2
- package/data/cache.d.ts +1 -1
- package/data/cache.js +62 -12
- package/data/cache.js.map +1 -1
- package/data/fragments/ProductListsFragments.gql +8 -8
- package/errorReporting.shared.d.ts +1 -1
- package/global.d.ts +80 -2
- package/helpers/getErrorDetail.d.ts +1 -1
- package/helpers/getErrorDetail.js +2 -2
- package/helpers/getErrorDetail.js.map +1 -1
- package/helpers/getHeaders.d.ts +1 -1
- package/hooks/Filters/useBooleanFilter.d.ts +1 -1
- package/hooks/Filters/useBooleanFilter.js +1 -2
- package/hooks/Filters/useBooleanFilter.js.map +1 -1
- package/hooks/Filters/useFilters.d.ts +1 -1
- package/hooks/Filters/useFilters.js +1 -2
- package/hooks/Filters/useFilters.js.map +1 -1
- package/hooks/Filters/useListFilter.d.ts +2 -2
- package/hooks/Filters/useListFilter.js +1 -2
- package/hooks/Filters/useListFilter.js.map +1 -1
- package/hooks/Filters/useMultiFilter.d.ts +3 -3
- package/hooks/Filters/useMultiFilter.js +1 -2
- package/hooks/Filters/useMultiFilter.js.map +1 -1
- package/hooks/Filters/useRangeFilter.d.ts +2 -2
- package/hooks/Filters/useRangeFilter.js +1 -2
- package/hooks/Filters/useRangeFilter.js.map +1 -1
- package/hooks/Filters/useSortOrder.d.ts +6 -1
- package/hooks/Filters/useSortOrder.js +4 -3
- package/hooks/Filters/useSortOrder.js.map +1 -1
- package/hooks/PackageProducts/usePackageProductItem.d.ts +2 -2
- package/hooks/PackageProducts/usePackageProductItem.js +1 -1
- package/hooks/PackageProducts/usePackageProductItem.js.map +1 -1
- package/hooks/PackageProducts/usePackageProducts.js +17 -17
- package/hooks/PackageProducts/usePackageProducts.js.map +1 -1
- package/hooks/PackageProducts/usePackageProducts.test.js +1 -1
- package/hooks/ProductList/ProductListContext.js +1 -1
- package/hooks/ProductList/ProductListContext.js.map +1 -1
- package/hooks/ProductList/action-creators.d.ts +1 -1
- package/hooks/ProductList/index.d.ts +11 -11
- package/hooks/ProductList/list-transforms.js +1 -1
- package/hooks/ProductList/list-transforms.js.map +1 -1
- package/hooks/ProductList/product-list-reducer.d.ts +1 -1
- package/hooks/ProductList/product-list-reducer.js +1 -1
- package/hooks/ProductList/product-list-reducer.js.map +1 -1
- package/hooks/ProductList/useProductList.js +1 -1
- package/hooks/ProductList/useProductList.js.map +1 -1
- package/hooks/ProductList/useProductListItems.js +1 -1
- package/hooks/ProductList/useProductListItems.js.map +1 -1
- package/hooks/Subscriptions/useNewsletterSubscription.js +3 -3
- package/hooks/Subscriptions/useNewsletterSubscription.js.map +1 -1
- package/hooks/Subscriptions/useStockNotifications.d.ts +1 -1
- package/hooks/Subscriptions/useStockNotifications.js +3 -3
- package/hooks/Subscriptions/useStockNotifications.js.map +1 -1
- package/hooks/Subscriptions/useStoreSubscriptions.d.ts +1 -1
- package/hooks/Subscriptions/useStoreSubscriptions.js +3 -6
- package/hooks/Subscriptions/useStoreSubscriptions.js.map +1 -1
- package/hooks/Subscriptions/useStoresubscriptions.test.js +5 -7
- package/hooks/useAddMultipleToCart.d.ts +4 -4
- package/hooks/useAddMultipleToCart.js +1 -1
- package/hooks/useAddMultipleToCart.js.map +1 -1
- package/hooks/useAddMultipleToCart.test.js +1 -1
- package/hooks/useCustomerOrders.test.js +7 -5
- package/hooks/useCustomerOrdersQuery.d.ts +2 -2
- package/hooks/useCustomerOrdersQuery.js +1 -1
- package/hooks/useCustomerOrdersQuery.js.map +1 -1
- package/hooks/useDeleteAccountMutation.d.ts +1 -1
- package/hooks/useDeleteAccountMutation.js +3 -3
- package/hooks/useDeleteAccountMutation.js.map +1 -1
- package/hooks/useInfinitePagination.d.ts +1 -1
- package/hooks/useInfinitePagination.js +4 -1
- package/hooks/useInfinitePagination.js.map +1 -1
- package/hooks/useLoginMutation.d.ts +3 -3
- package/hooks/useLoginMutation.js +2 -2
- package/hooks/useLoginMutation.js.map +1 -1
- package/hooks/useLoginRedirect.js +2 -2
- package/hooks/useLoginRedirect.js.map +1 -1
- package/hooks/useOrderDetailQuery.d.ts +3 -3
- package/hooks/useOrderDetailQuery.js +1 -1
- package/hooks/useOrderDetailQuery.js.map +1 -1
- package/hooks/usePreconnectLinks.d.ts +1 -1
- package/hooks/usePreconnectLinks.js +1 -1
- package/hooks/usePreconnectLinks.js.map +1 -1
- package/hooks/useProductVariants/useProductVariants.d.ts +1 -1
- package/hooks/useRoutePreload.js +1 -1
- package/hooks/useRoutePreload.js.map +1 -1
- package/hooks/useStockStatus.d.ts +8 -0
- package/hooks/useStockStatus.js +26 -0
- package/hooks/useStockStatus.js.map +1 -0
- package/hooks/useThunkReducer.d.ts +1 -1
- package/integrations/sluggishSchemaExtension.js +1 -1
- package/integrations/sluggishSchemaExtension.js.map +1 -1
- package/package.json +24 -42
- package/polyfills.js +0 -2
- package/polyfills.js.map +1 -1
- package/resolvers/filters/boolFilter.js +24 -27
- package/resolvers/filters/boolFilter.js.map +1 -1
- package/resolvers/filters/filterParams.js +8 -8
- package/resolvers/filters/filterParams.js.map +1 -1
- package/resolvers/filters/filters.js +5 -5
- package/resolvers/filters/filters.js.map +1 -1
- package/resolvers/filters/index.d.ts +0 -4
- package/resolvers/filters/listFilter.js +24 -29
- package/resolvers/filters/listFilter.js.map +1 -1
- package/resolvers/filters/listFilterItem.js +31 -36
- package/resolvers/filters/listFilterItem.js.map +1 -1
- package/resolvers/filters/multiListFilter.js +41 -42
- package/resolvers/filters/multiListFilter.js.map +1 -1
- package/resolvers/filters/multiListFilterList.js +1 -1
- package/resolvers/filters/multiListFilterList.js.map +1 -1
- package/resolvers/filters/rangeFilter.js +27 -43
- package/resolvers/filters/rangeFilter.js.map +1 -1
- package/resolvers/index.d.ts +1 -1
- package/server/graphql.js +6 -7
- package/server/graphql.js.map +1 -1
- package/test-utils/ProviderPyramid.js +1 -1
- package/types.d.ts +1820 -1955
- package/components/Fonts/GoogleFont.d.ts +0 -10
- package/components/Fonts/GoogleFont.js +0 -35
- package/components/Fonts/GoogleFont.js.map +0 -1
- package/components/Fonts/TypekitFont.d.ts +0 -16
- package/components/Fonts/TypekitFont.js +0 -25
- package/components/Fonts/TypekitFont.js.map +0 -1
- package/integrations/addwishSchemaExtension.d.ts +0 -35
- package/integrations/addwishSchemaExtension.js +0 -141
- package/integrations/addwishSchemaExtension.js.map +0 -1
- package/integrations/nostoSchemaExtension.d.ts +0 -5
- package/integrations/nostoSchemaExtension.js +0 -77
- package/integrations/nostoSchemaExtension.js.map +0 -1
@@ -7,14 +7,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
8
|
});
|
9
9
|
};
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
10
|
+
import { ApolloLink, HttpLink } from '@apollo/client';
|
11
|
+
import { ApolloServer } from 'apollo-server-express';
|
12
|
+
import { introspectSchema, makeRemoteExecutableSchema, mergeSchemas } from 'graphql-tools';
|
13
|
+
import { setContext } from '@apollo/client/link/context';
|
13
14
|
import fetch from 'node-fetch';
|
14
15
|
// import { specifiedRules } from 'graphql';
|
15
16
|
// import { OverlappingFieldsCanBeMerged } from 'graphql/validation/rules/OverlappingFieldsCanBeMerged';
|
16
17
|
import { InMemoryLRUCache } from 'apollo-server-caching';
|
17
|
-
import { ApolloLink } from 'apollo-link';
|
18
18
|
import https from 'https';
|
19
19
|
import dnscache from 'dnscache';
|
20
20
|
const pick = require('lodash.pick');
|
@@ -71,7 +71,7 @@ function getRemoteSchema({ apolloConfig: { graphQLURI, token, shopid } }) {
|
|
71
71
|
* @link https://github.com/apollographql/graphql-tools/issues/1046#issuecomment-457445794
|
72
72
|
*/
|
73
73
|
const errorLink = new ApolloLink((operation, forward) => {
|
74
|
-
return forward(operation).map(data => {
|
74
|
+
return forward(operation).map((data) => {
|
75
75
|
if (data.errors) {
|
76
76
|
for (const error of data.errors) {
|
77
77
|
if (!(error instanceof Error))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createApolloServer.js","sourceRoot":"","sources":["createApolloServer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,
|
1
|
+
{"version":3,"file":"createApolloServer.js","sourceRoot":"","sources":["createApolloServer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAY,UAAU,EAAa,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAEL,gBAAgB,EAChB,0BAA0B,EAC1B,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,4CAA4C;AAC5C,wGAAwG;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACpC,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtC,UAAU;AACV,iFAAiF;AACjF,8EAA8E;AAC9E,8DAA8D;AAC9D,iEAAiE;AACjE,0CAA0C;AAC1C,kDAAkD;AAClD,KAAK;AACL,8CAA8C;AAC9C,WAAW;AAEX,MAAM,gBAAgB,GAAG;IACvB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C,YAAY;YACtC,CAAC,CAAC;gBACE,MAAM,EAAE,YAAY,CAAC,YAAY;aAClC;YACH,CAAC,CAAC,KAAK,CAAC;QAEV,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC;YACpC,MAAM;YACN,sCAAsC;YACtC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YACpD,OAAO,EAAE,CAAC,EAAE,GAAG,EAAqB,EAAW,EAAE;;gBAC/C,MAAM,eAAe,GAAwB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,mCAAI,EAAE,CAAC;gBAChE,MAAM,OAAO,GAAyB,IAAI,CACxC,eAAe,EACf,gBAAgB,CACjB,CAAC;gBAEF,OAAO;oBACL,OAAO;iBACR,CAAC;YACJ,CAAC;YACD,gBAAgB,EAAE;gBAChB,KAAK,EAAE,IAAI,gBAAgB,EAAE;aAC9B;YACD,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,KAAK;YACnB,MAAM;YACN,OAAO;SACR,CAAC,CAAC;QAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAClC,CAAC;CAAA"}
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
8
|
});
|
9
9
|
};
|
10
|
-
import { getDataFromTree } from '@apollo/react
|
10
|
+
import { getDataFromTree } from '@apollo/client/react/ssr';
|
11
11
|
import { getSelectedAndRecommendedChannel } from '@jetshop/core/ChannelHandler/channelUtils';
|
12
12
|
import { setupIntl } from '@jetshop/intl/config';
|
13
13
|
import IntlContext from '@jetshop/intl/context';
|
@@ -30,6 +30,7 @@ import _merge from 'lodash.merge';
|
|
30
30
|
import { salesSourceMiddleware } from './salesSource';
|
31
31
|
import { getPreloadLinkHeaderString } from './getPreloadAssets';
|
32
32
|
import { primaryRouteForPathFetcher } from '../../../core/ChannelHandler/redirectUtils';
|
33
|
+
import ActiveFiltersQuery from '@jetshop/core/components/DynamicRoute/ActiveFiltersQuery.gql';
|
33
34
|
const injectDataIntoSlots = (template, data) => Object.keys(data).reduce((output, key) => key !== 'htmlAttributes'
|
34
35
|
? output.replace(`<slot name="${key}"/>`, data[key])
|
35
36
|
: output.replace('<html lang="en">', `<html ${data[key]}>`), template);
|
@@ -160,7 +161,8 @@ const createRenderer = (template, tree, options) => {
|
|
160
161
|
const combinedCache = _merge({}, cachedChannels, persistedQueries);
|
161
162
|
client.cache.restore(combinedCache);
|
162
163
|
// Initialise cache with active filters from the search params
|
163
|
-
client.cache.
|
164
|
+
client.cache.writeQuery({
|
165
|
+
query: ActiveFiltersQuery,
|
164
166
|
data: {
|
165
167
|
activeFilters: getActiveFiltersFromSearch(req.query)
|
166
168
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createRenderer.js","sourceRoot":"","sources":["createRenderer.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"createRenderer.js","sourceRoot":"","sources":["createRenderer.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAIhD,OAAO,KAAuB,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;A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AClB,uBAAuB;gBACvB,gBAAgB;gBAChB,cAAc;YAChB,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;YACvB,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE;YACvC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,gBAAgB,GAAG,aAAa;YAC1D,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;SAC1C,CAAC;QAEF,MAAM,IAAI,GAAG,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACjD,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAEvD,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACzC,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;QACvC,WAAW,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -13,12 +13,12 @@ import http from 'http';
|
|
13
13
|
const server = http.createServer(app);
|
14
14
|
let currentApp = app;
|
15
15
|
server.listen(process.env.PORT || 3000, () => {
|
16
|
-
console.log('🚀
|
16
|
+
console.log('🚀 Started');
|
17
17
|
});
|
18
18
|
if (module.hot) {
|
19
|
-
console.log('
|
19
|
+
console.log('🟢 HMR Server-side enabled!');
|
20
20
|
const reload = () => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
-
console.log('
|
21
|
+
console.log('📦 HMR Server-side reloaded');
|
22
22
|
try {
|
23
23
|
app = yield require('src/server').default;
|
24
24
|
server.removeListener('request', currentApp);
|
@@ -26,11 +26,14 @@ import http from 'http';
|
|
26
26
|
currentApp = app;
|
27
27
|
}
|
28
28
|
catch (error) {
|
29
|
+
console.log('🔥 HMR Error: ', (error === null || error === void 0 ? void 0 : error.stack) || error);
|
29
30
|
console.error(error);
|
30
31
|
}
|
31
32
|
});
|
32
33
|
// Reload on HMR
|
33
|
-
module.hot.accept('src/server', reload)
|
34
|
+
module.hot.accept('src/server', reload, (err) => {
|
35
|
+
console.log('🔥 HMR Error: ', err);
|
36
|
+
});
|
34
37
|
}
|
35
38
|
}))();
|
36
39
|
//# sourceMappingURL=entrypoint.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["entrypoint.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,CAAC,GAAS,EAAE;IACV,IAAI,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,UAAU,GAAG,GAAG,CAAC;IAErB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,GAAG,EAAE;QAC3C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,IAAK,MAAc,CAAC,GAAG,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAE3C,MAAM,MAAM,GAAG,GAAS,EAAE;YACxB,OAAO,CAAC,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["entrypoint.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,CAAC,GAAS,EAAE;IACV,IAAI,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,UAAU,GAAG,GAAG,CAAC;IAErB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,GAAG,EAAE;QAC3C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,IAAK,MAAc,CAAC,GAAG,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAE3C,MAAM,MAAM,GAAG,GAAS,EAAE;YACxB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAE3C,IAAI;gBACF,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;gBAC1C,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAC7C,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC1B,UAAU,GAAG,GAAG,CAAC;aAClB;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,KAAI,KAAK,CAAC,CAAC;gBACrD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACtB;QACH,CAAC,CAAA,CAAC;QAEF,gBAAgB;QACf,MAAc,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;YACvD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC,EAAE,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ApolloConfig } from '../../../components/ConfigProvider';
|
2
2
|
import { CreateClientOpts } from '../../apollo';
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
3
|
+
export type PersistedQueries = ApolloConfig['persistedQueries'];
|
4
|
+
export type PersistedQuery = ApolloConfig['persistedQueries'][0];
|
5
|
+
export type ChannelHeaders = {
|
6
6
|
currency: string;
|
7
7
|
channelid: number;
|
8
8
|
culture: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { getPersistedQueriesForRequest } from '../getPersistedQueriesForRequest';
|
2
2
|
import aQuery from './mockQuery.gql';
|
3
3
|
import nock from 'nock';
|
4
|
-
import { ApolloError } from 'apollo
|
4
|
+
import { ApolloError } from '@apollo/client';
|
5
5
|
import { ChannelHandler } from '../../../../ChannelHandler/ChannelHandler';
|
6
6
|
|
7
7
|
beforeAll(() => {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ApolloLink } from 'apollo
|
1
|
+
import { ApolloLink } from '@apollo/client';
|
2
2
|
export declare const logOperationTime: ApolloLink;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ApolloLink } from 'apollo
|
1
|
+
import { ApolloLink } from '@apollo/client';
|
2
2
|
const timeStartLink = new ApolloLink((operation, forward) => {
|
3
3
|
operation.setContext({ start: Date.now() });
|
4
4
|
return forward(operation);
|
5
5
|
});
|
6
6
|
const logTimeLink = new ApolloLink((operation, forward) => {
|
7
|
-
return forward(operation).map(data => {
|
7
|
+
return forward(operation).map((data) => {
|
8
8
|
// data from a previous link
|
9
9
|
const time = Date.now() - operation.getContext().start;
|
10
10
|
console.log(new Date(), `operation ${operation.operationName} took ${time} to complete`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"queryLoggingMiddleware.js","sourceRoot":"","sources":["queryLoggingMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"queryLoggingMiddleware.js","sourceRoot":"","sources":["queryLoggingMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE;IAC1D,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5C,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE;IACxD,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACrC,4BAA4B;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;QACvD,OAAO,CAAC,GAAG,CACT,IAAI,IAAI,EAAE,EACV,aAAa,SAAS,CAAC,aAAa,SAAS,IAAI,cAAc,CAChE,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
2
2
|
import { FormikProps } from 'formik';
|
3
3
|
import { Price, Product, ProductVariant, ProductVariantOption } from '../types';
|
4
4
|
import { DocumentNode } from 'graphql';
|
5
|
-
import { ApolloError } from 'apollo
|
6
|
-
|
7
|
-
|
5
|
+
import { ApolloError } from '@apollo/client';
|
6
|
+
type Comments = Record<string, string>;
|
7
|
+
type Options = Record<string, string>;
|
8
8
|
interface AddToCartFormikValues {
|
9
9
|
quantity: number;
|
10
10
|
comments: Comments;
|
@@ -38,5 +38,5 @@ interface AddToCartFormikProps {
|
|
38
38
|
}) => void;
|
39
39
|
children: (props: FormikProps<AddToCartFormikValues>) => React.ReactNode;
|
40
40
|
}
|
41
|
-
export declare function AddToCartFormik({ product, variant, commentValidators, getMissingOptions, initialValues, onAddToCartInit, onAddToCartError, onAddToCartSuccess, cartQuery, cartMutation, children }: AddToCartFormikProps): JSX.Element;
|
41
|
+
export declare function AddToCartFormik({ product, variant, commentValidators, getMissingOptions, initialValues, onAddToCartInit, onAddToCartError, onAddToCartSuccess, cartQuery, cartMutation, children }: AddToCartFormikProps): React.JSX.Element;
|
42
42
|
export default AddToCartFormik;
|
package/cart/AddToCartFormik.js
CHANGED
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
import React from 'react';
|
11
11
|
import { useAddToCart } from './useAddToCart';
|
12
12
|
import { FormikProvider } from 'formik';
|
13
|
-
import { useApolloClient, useMutation } from '@apollo/
|
13
|
+
import { useApolloClient, useMutation } from '@apollo/client';
|
14
14
|
import { addToCartError, addToCartSuccess, useTrackProductAdd } from '../components/Mutation/AddToCart/addToCartUtils';
|
15
|
-
import
|
15
|
+
import uniqueId from '@jetshop/core/helpers/uniqueId';
|
16
16
|
import { getAddToCartOptimisticResponse } from '../components/Mutation/cartMutationUtils';
|
17
17
|
import { useCartId } from '../components/Cart/CartIdContext';
|
18
18
|
export function AddToCartFormik({ product, variant, commentValidators = {}, getMissingOptions, initialValues,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAe,MAAM,QAAQ,CAAC;AAWrD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAe,MAAM,QAAQ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gBACnB,eAAe,CAAC,eAAe,CAAC,CAAC;aAClC;YAED,OAAO,iBAAiB,CAAC;gBACvB,SAAS,EAAE;oBACT,KAAK;iBACN;gBACD,kBAAkB,EAAE;oBAClB,SAAS,EAAE;wBACT,IAAI,EAAE,8BAA8B,CAClC,UAAU,CAAC,OAAO,EAClB,KAAK,CAAC,QAAQ,EACd,MAAM,EACN,MAAM,EACN,SAAS,CACV;wBACD,UAAU,EAAE,cAAc;qBAC3B;iBACF;aACF,CAAC;iBACC,IAAI,CACH,gBAAgB,CAAC;gBACf,kBAAkB;gBAClB,eAAe;gBACf,MAAM;gBACN,SAAS;aACV,CAAC,CACH;iBACA,KAAK,CACJ,cAAc,CAAC;gBACb,gBAAgB;gBAChB,eAAe;aAChB,CAAC,CACH,CAAC;QACN,CAAC;KAAA;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC;QAC5B,OAAO;QACP,OAAO;QACP,iBAAiB;QACjB,iBAAiB;QACjB,aAAa;QACb,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,oBAAC,cAAc,IAAC,KAAK,EAAE,IAAI,IAAG,QAAQ,CAAC,IAAI,CAAC,CAAkB,CAAC;AACxE,CAAC;AAED,eAAe,eAAe,CAAC"}
|
package/cart/useAddToCart.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { AddToCartInput, Price, Product, ProductVariant, ProductVariantOption } from '../types';
|
3
|
-
|
4
|
-
|
3
|
+
type Comments = Record<string, string>;
|
4
|
+
type Options = Record<string, string>;
|
5
5
|
export interface AddToCartSubmit {
|
6
6
|
input: AddToCartInput;
|
7
7
|
optimistic: {
|
@@ -44,7 +44,7 @@ export declare function useAddToCart({ product, variant, submit, commentValidato
|
|
44
44
|
initialTouched: import("formik").FormikTouched<unknown>;
|
45
45
|
initialStatus: any;
|
46
46
|
handleBlur: {
|
47
|
-
(e: import("react").FocusEvent<any>): void;
|
47
|
+
(e: import("react").FocusEvent<any, Element>): void;
|
48
48
|
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
49
49
|
};
|
50
50
|
handleChange: {
|
@@ -70,7 +70,7 @@ export declare function useAddToCart({ product, variant, submit, commentValidato
|
|
70
70
|
dirty: boolean;
|
71
71
|
unregisterField: (name: string) => void;
|
72
72
|
registerField: (name: string, { validate }: any) => void;
|
73
|
-
getFieldProps: (nameOrOptions: any) => import("formik").FieldInputProps<any>;
|
73
|
+
getFieldProps: (nameOrOptions: string | import("formik").FieldConfig<any>) => import("formik").FieldInputProps<any>;
|
74
74
|
getFieldMeta: (name: string) => import("formik").FieldMetaProps<any>;
|
75
75
|
getFieldHelpers: (name: string) => import("formik").FieldHelperProps<any>;
|
76
76
|
validateOnBlur: boolean;
|
@@ -8,7 +8,7 @@ export interface CustomerUpdateFormRenderPropsField {
|
|
8
8
|
[key in keyof EnhancedCustomerField]: any;
|
9
9
|
};
|
10
10
|
}
|
11
|
-
export
|
11
|
+
export type CustomerUpdateFormRenderProps = FormikProps<CustomerUpdateInput> & {
|
12
12
|
billingAddressFields: CustomerUpdateFormRenderPropsField[];
|
13
13
|
deliveryAddressFields: CustomerUpdateFormRenderPropsField[];
|
14
14
|
setCountryCode: (countryCode: string) => void;
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { MutationRequestPasswordResetArgs } from '@jetshop/core/types';
|
2
2
|
import { FormikProps } from 'formik';
|
3
3
|
import React from 'react';
|
4
|
-
|
4
|
+
type ForgotPasswordFormik = FormikProps<MutationRequestPasswordResetArgs>;
|
5
5
|
interface ForgotPasswordProps {
|
6
|
-
children
|
7
|
-
formik: ForgotPasswordFormik;
|
8
|
-
}): React.ReactChild;
|
6
|
+
children: any;
|
9
7
|
}
|
10
|
-
export declare function ForgotPasswordProvider(props: ForgotPasswordProps): JSX.Element;
|
11
8
|
export declare const ForgotPasswordContext: React.Context<{
|
12
9
|
formik: ForgotPasswordFormik;
|
13
10
|
}>;
|
@@ -29,7 +26,7 @@ export declare function useForgotPasswordData(): {
|
|
29
26
|
setSubmitting: (isSubmitting: boolean) => void;
|
30
27
|
setTouched: (touched: import("formik").FormikTouched<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
|
31
28
|
setValues: (values: React.SetStateAction<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
|
32
|
-
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void
|
29
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
|
33
30
|
setFieldError: (field: string, message: string) => void;
|
34
31
|
setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
|
35
32
|
validateForm: (values?: any) => Promise<import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
|
@@ -40,14 +37,14 @@ export declare function useForgotPasswordData(): {
|
|
40
37
|
handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
|
41
38
|
handleReset: (e?: React.SyntheticEvent<any, Event>) => void;
|
42
39
|
handleBlur: {
|
43
|
-
(e: React.FocusEvent<any>): void;
|
40
|
+
(e: React.FocusEvent<any, Element>): void;
|
44
41
|
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
45
42
|
};
|
46
43
|
handleChange: {
|
47
44
|
(e: React.ChangeEvent<any>): void;
|
48
45
|
<T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
|
49
46
|
};
|
50
|
-
getFieldProps: <Value = any>(props:
|
47
|
+
getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
|
51
48
|
getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
|
52
49
|
getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
|
53
50
|
dirty: boolean;
|
@@ -68,4 +65,5 @@ export declare function useForgotPasswordData(): {
|
|
68
65
|
required: boolean;
|
69
66
|
};
|
70
67
|
};
|
68
|
+
export declare function ForgotPasswordProvider(props: ForgotPasswordProps): React.JSX.Element;
|
71
69
|
export {};
|
@@ -2,9 +2,24 @@ import { resetRequest } from '@jetshop/core/data/mutations/accountMutations.gql'
|
|
2
2
|
import t from '@jetshop/intl';
|
3
3
|
import { Form, Formik } from 'formik';
|
4
4
|
import React from 'react';
|
5
|
-
import { useMutation } from '@apollo/
|
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
|
+
}
|
6
21
|
function validate(values) {
|
7
|
-
|
22
|
+
const errors = {};
|
8
23
|
if (!values.email) {
|
9
24
|
errors['email'] = t('This field is required');
|
10
25
|
}
|
@@ -15,7 +30,7 @@ function validate(values) {
|
|
15
30
|
}
|
16
31
|
function handleMutationError(actions) {
|
17
32
|
actions.setStatus({
|
18
|
-
globalError: t('Something went wrong. Please check your input, or try again later.')
|
33
|
+
globalError: t('Something went wrong. Please check your input, or try again later.')
|
19
34
|
});
|
20
35
|
actions.setSubmitting(false);
|
21
36
|
}
|
@@ -39,19 +54,4 @@ export function ForgotPasswordProvider(props) {
|
|
39
54
|
} }, (formik) => (React.createElement(Form, null,
|
40
55
|
React.createElement(ForgotPasswordContext.Provider, Object.assign({ value: { formik } }, props))))));
|
41
56
|
}
|
42
|
-
export const ForgotPasswordContext = React.createContext(undefined);
|
43
|
-
export function useForgotPasswordData() {
|
44
|
-
var _a, _b;
|
45
|
-
const { formik } = React.useContext(ForgotPasswordContext);
|
46
|
-
const submitted = (_a = formik === null || formik === void 0 ? void 0 : formik.status) === null || _a === void 0 ? void 0 : _a.success;
|
47
|
-
const globalError = (_b = formik === null || formik === void 0 ? void 0 : formik.status) === null || _b === void 0 ? void 0 : _b.globalError;
|
48
|
-
const emailInputProps = {
|
49
|
-
type: 'email',
|
50
|
-
name: 'email',
|
51
|
-
required: true,
|
52
|
-
};
|
53
|
-
return Object.assign({ submitted,
|
54
|
-
globalError,
|
55
|
-
emailInputProps }, formik);
|
56
|
-
}
|
57
57
|
//# sourceMappingURL=ForgotPasswordProvider.js.map
|
@@ -1 +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,qBAAqB,CAAC;
|
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,CA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AQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;YAC5B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAE5B,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;iBAC3C,IAAI,CAAC,CAAC,IAAI,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"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare const ResetPasswordProvider: React.ComponentClass<Pick<
|
2
|
+
export declare const ResetPasswordProvider: React.ComponentClass<Pick<any, string | number | symbol>, any> & import("react-router").WithRouterStatics<(props: any) => React.JSX.Element>;
|
3
3
|
export declare function useResetPasswordForm(): {
|
4
4
|
passwordInputProps: {
|
5
5
|
required: boolean;
|
@@ -38,7 +38,9 @@ export declare function useResetPasswordForm(): {
|
|
38
38
|
setValues: (values: React.SetStateAction<{
|
39
39
|
newPassword: string;
|
40
40
|
}>, shouldValidate?: boolean) => void;
|
41
|
-
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void
|
41
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<{
|
42
|
+
newPassword: string;
|
43
|
+
}>>;
|
42
44
|
setFieldError: (field: string, message: string) => void;
|
43
45
|
setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
|
44
46
|
validateForm: (values?: any) => Promise<import("formik").FormikErrors<{
|
@@ -59,14 +61,14 @@ export declare function useResetPasswordForm(): {
|
|
59
61
|
handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
|
60
62
|
handleReset: (e?: React.SyntheticEvent<any, Event>) => void;
|
61
63
|
handleBlur: {
|
62
|
-
(e: React.FocusEvent<any>): void;
|
64
|
+
(e: React.FocusEvent<any, Element>): void;
|
63
65
|
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
64
66
|
};
|
65
67
|
handleChange: {
|
66
68
|
(e: React.ChangeEvent<any>): void;
|
67
69
|
<T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
|
68
70
|
};
|
69
|
-
getFieldProps: <Value = any>(props:
|
71
|
+
getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
|
70
72
|
getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
|
71
73
|
getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
|
72
74
|
dirty: boolean;
|
@@ -2,7 +2,7 @@ import { resetPassword } from '@jetshop/core/data/mutations/accountMutations.gql
|
|
2
2
|
import t from '@jetshop/intl';
|
3
3
|
import { Form, Formik } from 'formik';
|
4
4
|
import React, { useContext } from 'react';
|
5
|
-
import { useMutation } from '@apollo/
|
5
|
+
import { useMutation } from '@apollo/client';
|
6
6
|
import { Redirect, withRouter } from 'react-router';
|
7
7
|
import getErrorDetail from '../../helpers/getErrorDetail';
|
8
8
|
import throwErrorInDev from '../../helpers/throwErrorInDev';
|
@@ -1 +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,
|
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,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,CACrC;KACF,CAAC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.js
CHANGED
@@ -2,12 +2,12 @@ import getErrorDetail from '@jetshop/core/helpers/getErrorDetail';
|
|
2
2
|
import t from '@jetshop/intl';
|
3
3
|
import { Formik } from 'formik';
|
4
4
|
import React, { useContext } from 'react';
|
5
|
-
import { ApolloConsumer } from '
|
5
|
+
import { ApolloConsumer } from '@apollo/client';
|
6
6
|
import { LookupDispatch } from './SSNLookupContainer';
|
7
7
|
import PersonLookupQuery from '@jetshop/core/data/queries/PersonLookupQuery.gql';
|
8
8
|
const SSNField = function SSNField(props) {
|
9
9
|
const dispatch = useContext(LookupDispatch);
|
10
|
-
return (React.createElement(ApolloConsumer, null, client => {
|
10
|
+
return (React.createElement(ApolloConsumer, null, (client) => {
|
11
11
|
return (React.createElement(Formik, { onSubmit: (values, formik) => {
|
12
12
|
client
|
13
13
|
.query({
|
@@ -20,7 +20,7 @@ const SSNField = function SSNField(props) {
|
|
20
20
|
formik.setSubmitting(false);
|
21
21
|
props.onSuccess();
|
22
22
|
dispatch({ type: 'set', payload: resp.data.personLookup });
|
23
|
-
}, error => {
|
23
|
+
}, (error) => {
|
24
24
|
const errorMessage = getErrorDetail(error).codes[0].includes('PersonLookupFailed')
|
25
25
|
? t('Person lookup failed.')
|
26
26
|
: t('Something went wrong, please try again!');
|
@@ -28,7 +28,7 @@ const SSNField = function SSNField(props) {
|
|
28
28
|
dispatch({ type: 'reset' });
|
29
29
|
formik.setErrors({ ssn: errorMessage });
|
30
30
|
});
|
31
|
-
}, initialValues: { ssn: '' } }, formik => props.children({ formik })));
|
31
|
+
}, initialValues: { ssn: '' } }, (formik) => props.children({ formik })));
|
32
32
|
}));
|
33
33
|
};
|
34
34
|
export default SSNField;
|
@@ -1 +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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K,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"}
|
@@ -1,19 +1,16 @@
|
|
1
1
|
import { SignUpInput, MaskedProperty } from '@jetshop/core/types';
|
2
|
-
import { FormikProps } from 'formik';
|
3
2
|
import React from 'react';
|
4
3
|
import { SignUpFormInput } from './formatSignupInput';
|
5
|
-
|
4
|
+
type LookupData = {
|
6
5
|
[key: string]: MaskedProperty;
|
7
6
|
};
|
8
7
|
interface SignupFormProps {
|
9
|
-
children
|
10
|
-
formik: FormikProps<SignUpInput>;
|
11
|
-
}): React.ReactChild;
|
8
|
+
children: any;
|
12
9
|
lookupData: LookupData;
|
13
10
|
additionalFormatter?: (values: SignUpFormInput) => SignUpInput;
|
14
11
|
additionalInitialValues?: Partial<SignUpFormInput>;
|
15
12
|
}
|
16
13
|
declare function SignupFormProvider({ LoadingComponent, ...props }: SignupFormProps & {
|
17
14
|
LoadingComponent?: JSX.Element;
|
18
|
-
}): JSX.Element;
|
15
|
+
}): React.JSX.Element;
|
19
16
|
export default SignupFormProvider;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SignupFormContainer.js","sourceRoot":"","sources":["SignupFormContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,
|
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;QACd,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;;YACvB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,KAAK,CAAC,IAAI,CAAC,0CAAE,MAAM,CAAC;QACxD,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,gBAAgB,CACvB,YAA6B,EAC7B,UAAsB;IAEtB,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,YAAY,CAAC;KACrB;IAED,MAAM,MAAM,mBACV,UAAU,EAAE,M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AAC;IAEH,OAAO,CACL,oBAAC,MAAM,IACL,kBAAkB,EAAE,IAAI,EACxB,gBAAgB,QAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;YAC5B,YAAY,CAAC;gBACX,MAAM,EAAE,gBAAgB,CACtB,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAC1D,KAAK,CAAC,UAAU,CACjB;gBACD,OAAO;aACR,CAAC,CAAC;QACL,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,IAE3B,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAChC,CACV,CAAC;AACJ,CAAC;AAED,2DAA2D;AAC3D,SAAS,kBAAkB,CAAC,EAG2B;QAH3B,EAC1B,gBAAgB,OAEqC,EADlD,KAAK,cAFkB,oBAG3B,CADS;IAER,OAAO,CACL,oBAAC,cAAc,IAAC,gBAAgB,EAAE,gBAAgB;QAChD,oBAAC,UAAU,oBAAK,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"}
|
@@ -30,7 +30,7 @@ declare const inputProps: {
|
|
30
30
|
autoComplete: string;
|
31
31
|
};
|
32
32
|
};
|
33
|
-
export
|
33
|
+
export type UpdatePasswordFormRenderProps = FormikProps<UpdatePasswordValues> & {
|
34
34
|
inputProps: typeof inputProps;
|
35
35
|
submitted?: boolean;
|
36
36
|
globalError?: string;
|