@jetshop/core 5.17.0-alpha.4ec87fb0 → 5.17.0-alpha.5676b900
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 +1 -1
- 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/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 +1 -1
- 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/createApolloServer.d.ts +2 -1
- 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/__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 +2 -2
- package/cart/AddToCartFormik.js +2 -2
- package/cart/AddToCartFormik.js.map +1 -1
- package/cart/useAddToCart.d.ts +1 -1
- package/components/Auth/ForgotPasswordProvider.d.ts +4 -6
- package/components/Auth/ForgotPasswordProvider.js +18 -18
- package/components/Auth/ForgotPasswordProvider.js.map +1 -1
- package/components/Auth/ResetPasswordProvider.d.ts +5 -3
- 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/SignupFormContainer.d.ts +2 -5
- package/components/Auth/SignupFormContainer.js.map +1 -1
- package/components/Auth/UpdatePasswordForm.js +6 -6
- package/components/Auth/UpdatePasswordForm.js.map +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 +2 -2
- 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/RouteResolver.d.ts +2 -2
- 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 +4 -4
- 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/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 +2 -2
- 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/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/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/global.d.ts +55 -1
- package/helpers/getErrorDetail.d.ts +1 -1
- package/helpers/getErrorDetail.js +2 -2
- package/helpers/getErrorDetail.js.map +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 +1 -1
- 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 +1 -1
- package/hooks/ProductList/list-transforms.js +1 -1
- package/hooks/ProductList/list-transforms.js.map +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 +1 -1
- 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.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/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/integrations/sluggishSchemaExtension.js +1 -1
- package/integrations/sluggishSchemaExtension.js.map +1 -1
- package/package.json +23 -41
- 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/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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAddressFields.js","sourceRoot":"","sources":["useAddressFields.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEhD,2EAA2E;IAC3E,iCAAiC;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BAAqB;IACrB,MAAM,MAAM,GAAG,oBAAoB;SAChC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC;SACnC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,uCACK,KAAK,KACR,UAAU,EAAE;gBACV,GAAG,EAAE,KAAK,CAAC,EAAE;gBACb,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,IACD;IACJ,CAAC,CAAC,CAAC;IAEL,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AACjD,CAAC"}
|
@@ -3,11 +3,13 @@ import { render, fireEvent, waitForElement } from '@testing-library/react';
|
|
3
3
|
import useAddressFields from './useAddressFields';
|
4
4
|
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
5
5
|
import SignupProvider from './signup-context';
|
6
|
-
import {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
import {
|
7
|
+
ApolloClient,
|
8
|
+
ApolloProvider,
|
9
|
+
InMemoryCache,
|
10
|
+
gql
|
11
|
+
} from '@apollo/client';
|
12
|
+
import { MockLink } from '@apollo/client';
|
11
13
|
|
12
14
|
const fields = [
|
13
15
|
{
|
@@ -69,7 +71,7 @@ describe('useAddressFields', () => {
|
|
69
71
|
const testFields = await waitForElement(() => getAllByTestId('field'));
|
70
72
|
|
71
73
|
expect(testFields).toHaveLength(2);
|
72
|
-
testFields.map(field => expect(field.id).not.toBe('country'));
|
74
|
+
testFields.map((field) => expect(field.id).not.toBe('country'));
|
73
75
|
});
|
74
76
|
|
75
77
|
it('changes the form fields based on selected country', async () => {
|
@@ -270,7 +272,7 @@ function Wrapper() {
|
|
270
272
|
return (
|
271
273
|
<>
|
272
274
|
<div>
|
273
|
-
{fields.map(field => (
|
275
|
+
{fields.map((field) => (
|
274
276
|
<span data-testid="field" key={field.name}>
|
275
277
|
{field.name}
|
276
278
|
</span>
|
@@ -284,7 +286,7 @@ function Wrapper() {
|
|
284
286
|
Set country from form
|
285
287
|
</button>
|
286
288
|
|
287
|
-
{countries.map(country => (
|
289
|
+
{countries.map((country) => (
|
288
290
|
<span data-testid="country" key={country.id}>
|
289
291
|
{country.code}
|
290
292
|
</span>
|
@@ -77,13 +77,13 @@ export declare function useCustomerQuery({ query, deliveryAddressId }: {
|
|
77
77
|
query: DocumentNode;
|
78
78
|
deliveryAddressId?: number;
|
79
79
|
}): {
|
80
|
-
refetch: (variables?: import("
|
80
|
+
refetch: (variables?: Partial<import("@apollo/client").OperationVariables>) => Promise<import("@apollo/client").ApolloQueryResult<{
|
81
81
|
customer: Query['customer'] & {
|
82
82
|
__typename: 'BusinessCustomer' | 'PrivateCustomer';
|
83
83
|
};
|
84
84
|
}>>;
|
85
85
|
loading: boolean;
|
86
|
-
error: import("apollo
|
86
|
+
error: import("@apollo/client").ApolloError;
|
87
87
|
customer: Customer & {
|
88
88
|
__typename: 'BusinessCustomer' | 'PrivateCustomer';
|
89
89
|
};
|
@@ -13,7 +13,7 @@ import ChannelContext from '@jetshop/core/components/ChannelContext';
|
|
13
13
|
import UpdateCustomerMutation from '@jetshop/core/data/mutations/updateCustomer.gql';
|
14
14
|
import logError from '@jetshop/core/helpers/logError';
|
15
15
|
import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
16
|
-
import { useMutation, useQuery } from '@apollo/
|
16
|
+
import { useMutation, useQuery } from '@apollo/client';
|
17
17
|
import { translations } from './signup-field-translations';
|
18
18
|
import { useCountrySettings } from '../ChannelContext/useCountrySettings';
|
19
19
|
export function customerAddressToCustomerUpdateAddressInput({ address, isDeleteId = false, countryCode }) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCustomer.js","sourceRoot":"","sources":["useCustomer.tsx"],"names":[],"mappings":";;;;;;;;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AM,CAAC,GAAG,WAAW,CAG1B,sBAAsB,CAAC,CAAC;IAC1B,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,gBAAgB,CAAC;QACpD,KAAK,EAAE,aAAa;KACrB,CAAC,CAAC;IAEH,OAAO,SAAS,6BAA6B,CAAC,KAA0B;QACtE,OAAO,OAAO,CAAC,OAAO,EAAE;aACrB,IAAI,CAAC,GAAG,EAAE,CACT,MAAM,CAAC;YACL,SAAS,EAAE;gBACT,KAAK;aACN;SACF,CAAC,CACH;aACA,IAAI,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,CAAC;aAC7B,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { useApolloClient } from '
|
1
|
+
import { useApolloClient } from '@apollo/client';
|
2
2
|
import React, { useContext, useEffect } from 'react';
|
3
3
|
import AuthContext from './AuthContext';
|
4
4
|
import { withCookies } from 'react-cookie';
|
@@ -7,7 +7,7 @@ import ChannelContext from '@jetshop/core/components/ChannelContext';
|
|
7
7
|
import { useShopConfig } from '../../hooks/useShopConfig';
|
8
8
|
import { trackUserEvent } from '../../analytics/tracking';
|
9
9
|
import { useTracker } from '../../analytics/Analytics';
|
10
|
-
import { useQuery } from '@apollo/
|
10
|
+
import { useQuery } from '@apollo/client';
|
11
11
|
import googleUserIdQuery from './googleUserIdQuery.gql';
|
12
12
|
const AuthProvider = function AuthProvider(props) {
|
13
13
|
var _a, _b;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AuthProvider.js","sourceRoot":"","sources":["AuthProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"AuthProvider.js","sourceRoot":"","sources":["AuthProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KA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,EAAE,CAAC;gBAC5B,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;aACrC;YACD,MAAM;iBACH,UAAU,EAAE;iBACZ,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;iBACjC,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxC,CAAC;KACF,CAAC,EACF,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,YAAY,CAAC,CAC7D,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,kBAAC,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,WAAgB,EAAE,EAAE;IACnD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,CAAC,CAAe,EAAE,EAAE;YACnC,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC9D,IAAI,CAAC,CAAC,WAAW,KAAK,YAAY,IAAI,CAAC,CAAC,GAAG,KAAK,UAAU,EAAE;gBAC1D,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAE7C,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,YAAY,CAAC,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MockedProvider } from '@apollo/
|
1
|
+
import { MockedProvider } from '@apollo/client/testing';
|
2
2
|
import React from 'react';
|
3
3
|
import { ChannelHandler } from '../../ChannelHandler/ChannelHandler';
|
4
4
|
import { createSelectedChannel } from '../../ChannelHandler/channelUtils';
|
@@ -6,5 +6,5 @@ export interface ChannelProviderProps {
|
|
6
6
|
children?: React.ReactNode;
|
7
7
|
config: BootOptions;
|
8
8
|
}
|
9
|
-
declare const ChannelProvider: ({ channelHandler, children, config }: ChannelProviderProps) => JSX.Element;
|
9
|
+
declare const ChannelProvider: ({ channelHandler, children, config }: ChannelProviderProps) => React.JSX.Element;
|
10
10
|
export default ChannelProvider;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
declare function useCountrySettings({ countrySettingsQuery }?: {
|
2
|
-
countrySettingsQuery: import("
|
2
|
+
countrySettingsQuery: import("@apollo/client").DocumentNode;
|
3
3
|
}): {
|
4
4
|
selectedCountrySettings: import("../../types").CountrySettings;
|
5
5
|
countrySettings: import("../../types").CountrySettings[];
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { useQuery } from '@apollo/client';
|
1
2
|
import { useContext } from 'react';
|
2
3
|
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
3
|
-
import { useQuery } from 'react-apollo';
|
4
4
|
import defaultCountrySettingsQuery from './CountrySettingsQuery.gql';
|
5
5
|
function useCountrySettings({ countrySettingsQuery } = {
|
6
6
|
countrySettingsQuery: defaultCountrySettingsQuery
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCountrySettings.js","sourceRoot":"","sources":["useCountrySettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"useCountrySettings.js","sourceRoot":"","sources":["useCountrySettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,2BAA2B,MAAM,4BAA4B,CAAC;AAGrE,SAAS,kBAAkB,CACzB,EAAE,oBAAoB,EAAE,GAAG;IACzB,oBAAoB,EAAE,2BAA2B;CAClD;;IAED,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,QAAQ,CAAuB,oBAAoB,EAAE;QAClE,SAAS,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE;KACjD,CAAC,CAAC;IACH,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEjC,MAAM,uBAAuB,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAC1E,CAAC,cAAc,EAAE,EAAE;QACjB,OAAO,cAAc,CAAC,WAAW,KAAK,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;IACrE,CAAC,CACF,CAAC;IACF,OAAO;QACL,uBAAuB;QACvB,eAAe,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,QAAQ,CAAC,eAAe;QACxD,OAAO;KACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
query ActiveFilters {
|
2
2
|
activeFilters @client @export {
|
3
|
-
listFilters @export {
|
3
|
+
listFilters @client @export {
|
4
4
|
id
|
5
5
|
values
|
6
6
|
}
|
7
|
-
rangeFilters @export {
|
7
|
+
rangeFilters @client @export {
|
8
8
|
id
|
9
9
|
min
|
10
10
|
max
|
11
11
|
}
|
12
|
-
booleanFilters @export {
|
12
|
+
booleanFilters @client @export {
|
13
13
|
id
|
14
14
|
value
|
15
15
|
}
|
16
|
-
multiListFilters @export {
|
16
|
+
multiListFilters @client @export {
|
17
17
|
id
|
18
18
|
values
|
19
19
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Category } from '@jetshop/core/types';
|
2
|
-
import { ComponentType } from 'react';
|
3
|
-
import { QueryResult } from '
|
2
|
+
import React, { ComponentType } from 'react';
|
3
|
+
import { QueryResult } from '@apollo/client';
|
4
4
|
export interface CategoryProps {
|
5
5
|
result: QueryResult;
|
6
6
|
category: Category;
|
@@ -9,5 +9,5 @@ export interface CategoryRouteProps {
|
|
9
9
|
component: ComponentType<CategoryProps>;
|
10
10
|
result: QueryResult;
|
11
11
|
}
|
12
|
-
declare const CategoryRoute: (props: CategoryRouteProps) => JSX.Element;
|
12
|
+
declare const CategoryRoute: (props: CategoryRouteProps) => React.JSX.Element;
|
13
13
|
export default CategoryRoute;
|
@@ -11,16 +11,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
13
13
|
import React, { useEffect } from 'react';
|
14
|
-
import { useApolloClient } from '
|
14
|
+
import { useApolloClient } from '@apollo/client';
|
15
15
|
import { useHistory } from 'react-router';
|
16
16
|
import { getActiveFiltersFromSearch } from '../../resolvers/filters/filterParams';
|
17
17
|
import { StructuredCategoryData } from '../StructuredData';
|
18
|
+
import ActiveFiltersQuery from '@jetshop/core/components/DynamicRoute/ActiveFiltersQuery.gql';
|
18
19
|
function useFiltersOnHistoryPop() {
|
19
20
|
const client = useApolloClient();
|
20
21
|
useEffect(() => {
|
21
22
|
function getSearchFilters() {
|
22
23
|
// Write the active filters from search
|
23
|
-
client.
|
24
|
+
client.writeQuery({
|
25
|
+
query: ActiveFiltersQuery,
|
24
26
|
data: {
|
25
27
|
activeFilters: getActiveFiltersFromSearch(window.location.search)
|
26
28
|
}
|
@@ -33,7 +35,8 @@ function useFiltersOnHistoryPop() {
|
|
33
35
|
const CategoryRoute = (props) => {
|
34
36
|
var _a, _b, _c;
|
35
37
|
const { component: CategoryPage } = props, rest = __rest(props, ["component"]);
|
36
|
-
const category = ((_b = (_a = props.result.data) === null || _a === void 0 ? void 0 : _a.route) === null || _b === void 0 ? void 0 : _b.object) ||
|
38
|
+
const category = ((_b = (_a = (props.result.data || props.result.previousData)) === null || _a === void 0 ? void 0 : _a.route) === null || _b === void 0 ? void 0 : _b.object) ||
|
39
|
+
((_c = (props.result.data || props.result.previousData)) === null || _c === void 0 ? void 0 : _c.category);
|
37
40
|
const { structuredData } = useShopConfig();
|
38
41
|
const disableDefaultCategoryData = structuredData
|
39
42
|
? !!structuredData.disableDefaultCategoryData
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CategoryRoute.js","sourceRoot":"","sources":["CategoryRoute.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAe,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"CategoryRoute.js","sourceRoot":"","sources":["CategoryRoute.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAe,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,kBAAkB,MAAM,8DAA8D,CAAC;AAU9F,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IAEjC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,gBAAgB;YACvB,uCAAuC;YACvC,MAAM,CAAC,UAAU,CAAC;gBAChB,KAAK,EAAE,kBAAkB;gBACzB,IAAI,EAAE;oBACJ,aAAa,EAAE,0BAA0B,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAClE;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,IAAI,kBAErB,IAAI,EAAE,QAAQ,CAAC,IAAI,IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,EAE5B,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAExB,OAAO,CACL;QACG,QAAQ,IAAI,CACX,0CACG,CAAC,0BAA0B,IAAI,CAC9B,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAC/C,CACA,CACJ;QACD,oBAAC,YAAY,oBAAK,IAAI,IAAE,QAAQ,EAAE,QAAQ,IAAI,CAC7C,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
export interface BoundaryErrorState {
|
3
|
+
error?: Error;
|
4
|
+
info?: React.ErrorInfo;
|
5
|
+
}
|
6
|
+
export interface BoundaryErrorProps {
|
7
|
+
component?: React.FC<BoundaryErrorState>;
|
8
|
+
extraInfo?: any;
|
9
|
+
children: React.ReactNode;
|
10
|
+
}
|
11
|
+
export declare const DefaultError: ({ error, info }: BoundaryErrorState) => React.JSX.Element;
|
12
|
+
declare class ErrorBoundary extends React.Component<BoundaryErrorProps, BoundaryErrorState> {
|
13
|
+
state: BoundaryErrorState;
|
14
|
+
static defaultProps: Partial<BoundaryErrorProps>;
|
15
|
+
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
16
|
+
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode>;
|
17
|
+
}
|
18
|
+
export default ErrorBoundary;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import report from '@jetshop/core/errorReporting';
|
3
|
+
export const DefaultError = ({ error, info }) => (React.createElement("section", { style: {
|
4
|
+
width: '57ch',
|
5
|
+
maxWidth: '100%',
|
6
|
+
margin: '4rem auto',
|
7
|
+
padding: '1rem'
|
8
|
+
} },
|
9
|
+
React.createElement("h1", { style: {
|
10
|
+
fontSize: '1.5rem',
|
11
|
+
marginBottom: '2rem'
|
12
|
+
} }, "Something went wrong!"),
|
13
|
+
React.createElement("p", null, "Sorry! Our developers have been notified."),
|
14
|
+
React.createElement("div", null,
|
15
|
+
React.createElement("a", { href: "/", style: {
|
16
|
+
display: 'inline-block',
|
17
|
+
margin: '1rem 0 3rem 0',
|
18
|
+
borderRadius: '3px',
|
19
|
+
padding: '0.5rem',
|
20
|
+
textDecoration: 'none',
|
21
|
+
fontWeight: 600,
|
22
|
+
background: '#e2e2e2',
|
23
|
+
border: '1px solid #c3c3c3',
|
24
|
+
color: '#000'
|
25
|
+
} }, "Go back to the start page")),
|
26
|
+
process.env.NODE_ENV !== 'production' && (React.createElement("div", null,
|
27
|
+
error && React.createElement("p", null,
|
28
|
+
"Error: ",
|
29
|
+
error.message),
|
30
|
+
info && (React.createElement("pre", { style: {
|
31
|
+
fontSize: '0.875rem',
|
32
|
+
lineHeight: 1.5,
|
33
|
+
color: '#585858'
|
34
|
+
} }, info.componentStack))))));
|
35
|
+
class ErrorBoundary extends React.Component {
|
36
|
+
constructor() {
|
37
|
+
super(...arguments);
|
38
|
+
this.state = {
|
39
|
+
error: undefined,
|
40
|
+
info: undefined
|
41
|
+
};
|
42
|
+
}
|
43
|
+
componentDidCatch(error, info) {
|
44
|
+
const { extraInfo = {} } = this.props;
|
45
|
+
// Report to Sentry
|
46
|
+
report(error, Object.assign(Object.assign({}, extraInfo), { reactInfo: info }));
|
47
|
+
this.setState({ error, info });
|
48
|
+
}
|
49
|
+
render() {
|
50
|
+
const Comp = this.props.component;
|
51
|
+
if (!this.state.error) {
|
52
|
+
return this.props.children;
|
53
|
+
}
|
54
|
+
return React.createElement(Comp, Object.assign({}, this.state));
|
55
|
+
}
|
56
|
+
}
|
57
|
+
ErrorBoundary.defaultProps = {
|
58
|
+
component: DefaultError
|
59
|
+
};
|
60
|
+
export default ErrorBoundary;
|
61
|
+
//# sourceMappingURL=GenericError.js.map
|
@@ -0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CAAC,KAAY,EAAE,IAAqB;QACnD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,mBAAmB;QACnB,MAAM,CAAC,KAAK,kCAAO,SAAS,KAAE,SAAS,EAAE,IAAI,IAAG,CAAC;QACjD,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAyC,CAAC;QAElE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YACrB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;SAC5B;QAED,OAAO,oBAAC,IAAI,oBAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IAClC,CAAC;;AAnBM,0BAAY,GAAgC;IACjD,SAAS,EAAE,YAAY;CACxB,CAAC;AAoBJ,eAAe,aAAa,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import qs from 'qs';
|
2
2
|
import React, { useContext } from 'react';
|
3
|
-
import { Query } from 'react
|
3
|
+
import { Query } from '@apollo/client/react/components';
|
4
4
|
import SortOrderContainer from '../SortOrder/SortOrderContainer';
|
5
5
|
import CategoryRoute from './CategoryRoute';
|
6
6
|
import ProductRoute from './ProductRoute';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PreviewRoute.js","sourceRoot":"","sources":["PreviewRoute.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"PreviewRoute.js","sourceRoot":"","sources":["PreviewRoute.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,O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AC;aACzB,IAEA,CAAC,MAAmB,EAAE,EAAE,CAAC,CACxB,oBAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,GAAI,CACzD,CACK,CACT,CAAC;KACH;SAAM,IAAI,WAAW,EAAE;QACtB,OAAO,CACL,oBAAC,SAAS,IAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAC1E,CAAC;KACH;;QAAM,OAAO,IAAI,CAAC;AACrB,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { useQuery } from '
|
2
|
+
import { useQuery } from '@apollo/client';
|
3
3
|
import { Redirect } from 'react-router';
|
4
4
|
import productByArticlenumberQuery from './ProductByArticlenumber.gql';
|
5
5
|
import encodeVariantValues from '@jetshop/core/helpers/encodeVariant';
|
@@ -14,7 +14,7 @@ const ProductByArticlenumber = ({ articleNumber }) => {
|
|
14
14
|
}
|
15
15
|
const product = data === null || data === void 0 ? void 0 : data.product;
|
16
16
|
const variant = (product === null || product === void 0 ? void 0 : product.hasVariants) &&
|
17
|
-
product.variants.values.find(variant => variant.articleNumber === articleNumber);
|
17
|
+
product.variants.values.find((variant) => variant.articleNumber === articleNumber);
|
18
18
|
const encoding = variant ? encodeVariantValues(variant) : '';
|
19
19
|
return (data === null || data === void 0 ? void 0 : data.product) ? (React.createElement(Redirect, { to: `${((_b = (_a = data === null || data === void 0 ? void 0 : data.product) === null || _a === void 0 ? void 0 : _a.primaryRoute) === null || _b === void 0 ? void 0 : _b.path) + encoding}` })) : (React.createElement(Redirect, { to: "/" }));
|
20
20
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ProductByArticlenumber.js","sourceRoot":"","sources":["ProductByArticlenumber.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EA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ACpE,CAAC,CAAC,CAAC,CACF,oBAAC,QAAQ,IAAC,EAAE,EAAC,GAAG,GAAG,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Product } from '@jetshop/core/types';
|
2
|
-
import { ComponentType } from 'react';
|
3
|
-
import { QueryResult } from '
|
2
|
+
import React, { ComponentType } from 'react';
|
3
|
+
import { QueryResult } from '@apollo/client';
|
4
4
|
export interface ProductProps {
|
5
5
|
result: QueryResult;
|
6
6
|
product: Product;
|
@@ -11,5 +11,5 @@ export interface ProductRouteProps {
|
|
11
11
|
result: QueryResult;
|
12
12
|
partialProduct?: Partial<Product>;
|
13
13
|
}
|
14
|
-
declare const ProductRoute: (props: ProductRouteProps) => JSX.Element;
|
14
|
+
declare const ProductRoute: (props: ProductRouteProps) => React.JSX.Element;
|
15
15
|
export default ProductRoute;
|
@@ -2,7 +2,7 @@ import React, { ComponentType } from 'react';
|
|
2
2
|
import { ProductProps } from './ProductRoute';
|
3
3
|
import { CategoryProps } from './CategoryRoute';
|
4
4
|
import { ContentProps } from './ContentRoute';
|
5
|
-
import { QueryResult } from '
|
5
|
+
import { QueryResult } from '@apollo/client';
|
6
6
|
import { Route } from '../../types';
|
7
7
|
declare const RouteResolver: ({ productPage, categoryPage, contentPage, notFoundPage: NotFoundPage, ErrorPage, LoadingPage, result, pathname, state, search }: {
|
8
8
|
productPage: ComponentType<ProductProps>;
|
@@ -18,5 +18,5 @@ declare const RouteResolver: ({ productPage, categoryPage, contentPage, notFound
|
|
18
18
|
pathname: string;
|
19
19
|
state: any;
|
20
20
|
search: string;
|
21
|
-
}) => JSX.Element;
|
21
|
+
}) => React.JSX.Element;
|
22
22
|
export default RouteResolver;
|
@@ -5,7 +5,7 @@ import ContentRoute from './ContentRoute';
|
|
5
5
|
import Status from './Status';
|
6
6
|
import { Redirect } from 'react-router';
|
7
7
|
import { setPageType } from '../../analytics/webVitals';
|
8
|
-
import { DefaultError } from '@jetshop/
|
8
|
+
import { DefaultError } from '@jetshop/core/components/DynamicRoute/GenericError';
|
9
9
|
const isRouteType = (state, result, type) => {
|
10
10
|
var _a, _b, _c;
|
11
11
|
if (result.error) {
|
@@ -33,6 +33,7 @@ const Loading = (LoadingPage) => LoadingPage ? React.createElement(LoadingPage,
|
|
33
33
|
const RouteResolver = ({ productPage, categoryPage, contentPage, notFoundPage: NotFoundPage, ErrorPage, LoadingPage, result, pathname, state, search }) => {
|
34
34
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
35
35
|
setPageType((_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.route) === null || _b === void 0 ? void 0 : _b.object) === null || _c === void 0 ? void 0 : _c.__typename);
|
36
|
+
result.error && console.error(result.error);
|
36
37
|
if (((_f = (_e = (_d = result === null || result === void 0 ? void 0 : result.data) === null || _d === void 0 ? void 0 : _d.route) === null || _e === void 0 ? void 0 : _e.path) !== null && _f !== void 0 ? _f : pathname) !== pathname) {
|
37
38
|
return (React.createElement(Status, { code: 301 },
|
38
39
|
React.createElement(Redirect, { to: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RouteResolver.js","sourceRoot":"","sources":["RouteResolver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAC5D,OAAO,aAAgC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAE5D,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"RouteResolver.js","sourceRoot":"","sources":["RouteResolver.tsx"],"names":[],"mappings":"AAAA,OAAO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AAC,EAAE;QAChD,OAAO,CACL,oBAAC,YAAY,IACX,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EAC9B,SAAS,EAAE,WAAW,GACtB,CACH,CAAC;KACH;SAAM,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE;QACjD,OAAO,oBAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAI,CAAC;KACnE;SAAM,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAC7C,OAAO,CACL,oBAAC,YAAY,IACX,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,WAAW,GACtB,CACH,CAAC;KACH;SAAM,IAAI,MAAM,CAAC,OAAO,EAAE;QACzB,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC;KAC7B;SAAM;QACL,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,EAAE,GAAG;gBACf,oBAAC,YAAY,OAAG,CACT,CACV,CAAC;SACH;QAED,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IACnC,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,SAAS,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACnC,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACtC,CACM,CACV,CAAC;KACH;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { RouteComponentProps } from 'react-router-dom';
|
3
|
-
import { ApolloError } from 'apollo
|
3
|
+
import { ApolloError } from '@apollo/client';
|
4
4
|
export interface StatusProps extends RouteComponentProps<{}> {
|
5
5
|
code: number;
|
6
6
|
error?: ApolloError;
|
7
|
+
children?: React.ReactNode;
|
7
8
|
}
|
8
9
|
declare class Status extends React.Component<StatusProps, any> {
|
9
|
-
render(): JSX.Element;
|
10
|
+
render(): React.JSX.Element;
|
10
11
|
}
|
11
|
-
declare const _default: React.ComponentClass<Pick<StatusProps, "code" | "error"> & {
|
12
|
+
declare const _default: React.ComponentClass<Pick<StatusProps, "children" | "code" | "error"> & {
|
12
13
|
wrappedComponentRef?: React.Ref<Status>;
|
13
14
|
}, any> & import("react-router").WithRouterStatics<typeof Status>;
|
14
15
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Status.js","sourceRoot":"","sources":["Status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AAEnE,OAAO,IAAI,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"Status.js","sourceRoot":"","sources":["Status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AAEnE,OAAO,IAAI,MAAM,SAAS,CAAC;AAQ3B,MAAM,MAAO,SAAQ,KAAK,CAAC,SAA2B;IAC7C,MAAM;QACX,MAAM,EACJ,IAAI,EACJ,OAAO,EAAE,EACP,QAAQ,EAAE,EAAE,QAAQ,EAAE,EACvB,EACD,QAAQ,EACR,aAAa,EACd,GAAG,IAAI,CAAC,KAAK,CAAC;QACf,IAAI,aAAa;YAAE,aAAa,CAAC,UAAU,GAAG,IAAI,CAAC;QACnD,OAAO,CACL;YACG,QAAQ,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,CACxC,oBAAC,IAAI,IACH,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,KAAK,EAAE,SAAS,IAAI,EAAE;qBACvB;oBACD,UAAU,EAAE,OAAO;iBACpB,GACD,CACH;YACA,QAAQ,CACR,CACJ,CAAC;IACJ,CAAC;CACF;AAED,eAAe,UAAU,CAAC,MAAM,CAAC,CAAC"}
|
@@ -8,10 +8,10 @@ export type DynamicRouteProps = {
|
|
8
8
|
productPage: ComponentType<ProductProps>;
|
9
9
|
categoryPage: ComponentType<CategoryProps>;
|
10
10
|
contentPage: ComponentType<ContentProps>;
|
11
|
-
notFoundPage: React.
|
12
|
-
LoadingPage?: React.
|
13
|
-
ErrorPage?: React.
|
11
|
+
notFoundPage: React.FC<any>;
|
12
|
+
LoadingPage?: React.FC<any>;
|
13
|
+
ErrorPage?: React.FC<any>;
|
14
14
|
routeQuery: DocumentNode;
|
15
15
|
} & RouteComponentProps<any>;
|
16
|
-
declare const DynamicRoute: (props: DynamicRouteProps) => JSX.Element;
|
16
|
+
declare const DynamicRoute: (props: DynamicRouteProps) => React.JSX.Element;
|
17
17
|
export default DynamicRoute;
|