@jetshop/core 5.17.0-alpha.45b8368d → 5.17.0-alpha.46941505

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. package/ChannelHandler/redirectUtils.d.ts +1 -1
  2. package/ChannelHandler/redirectUtils.test.js +5 -5
  3. package/ChannelHandler/redirectUtilsGroupedChannels.test.js +5 -5
  4. package/boot/NetworkStatusNotifier.d.ts +2 -0
  5. package/boot/NetworkStatusNotifier.js +4 -0
  6. package/boot/NetworkStatusNotifier.js.map +1 -0
  7. package/boot/SharedTree.d.ts +1 -1
  8. package/boot/SharedTree.js +1 -1
  9. package/boot/SharedTree.js.map +1 -1
  10. package/boot/apollo.d.ts +1 -2
  11. package/boot/apollo.js +14 -9
  12. package/boot/apollo.js.map +1 -1
  13. package/boot/client/entrypoint.js +0 -2
  14. package/boot/client/entrypoint.js.map +1 -1
  15. package/boot/client/startClient.js +5 -3
  16. package/boot/client/startClient.js.map +1 -1
  17. package/boot/server/IntervalQuery.d.ts +1 -1
  18. package/boot/server/IntervalQuery.js +2 -2
  19. package/boot/server/IntervalQuery.js.map +1 -1
  20. package/boot/server/IntervalQuery.test.js +9 -13
  21. package/boot/server/PersistedApolloClient.test.js +8 -7
  22. package/boot/server/createApolloServer.d.ts +2 -1
  23. package/boot/server/createApolloServer.js +5 -5
  24. package/boot/server/createApolloServer.js.map +1 -1
  25. package/boot/server/createRenderer.js +4 -2
  26. package/boot/server/createRenderer.js.map +1 -1
  27. package/boot/server/entrypoint.js +7 -4
  28. package/boot/server/entrypoint.js.map +1 -1
  29. package/boot/server/persistedQueries/__tests__/getPersistedQueriesForRequest.test.js +1 -1
  30. package/boot/utils/queryLoggingMiddleware.d.ts +1 -1
  31. package/boot/utils/queryLoggingMiddleware.js +2 -2
  32. package/boot/utils/queryLoggingMiddleware.js.map +1 -1
  33. package/cart/AddToCartFormik.d.ts +2 -2
  34. package/cart/AddToCartFormik.js +2 -2
  35. package/cart/AddToCartFormik.js.map +1 -1
  36. package/cart/useAddToCart.d.ts +1 -1
  37. package/components/Auth/ForgotPasswordProvider.d.ts +3 -3
  38. package/components/Auth/ForgotPasswordProvider.js +15 -15
  39. package/components/Auth/ForgotPasswordProvider.js.map +1 -1
  40. package/components/Auth/ResetPasswordProvider.d.ts +5 -3
  41. package/components/Auth/ResetPasswordProvider.js +1 -1
  42. package/components/Auth/ResetPasswordProvider.js.map +1 -1
  43. package/components/Auth/SSN.js +4 -4
  44. package/components/Auth/SSN.js.map +1 -1
  45. package/components/Auth/SignupFormContainer.d.ts +2 -2
  46. package/components/Auth/UpdatePasswordForm.js +6 -6
  47. package/components/Auth/UpdatePasswordForm.js.map +1 -1
  48. package/components/Auth/signup-context.d.ts +2 -2
  49. package/components/Auth/signup-context.js +2 -3
  50. package/components/Auth/signup-context.js.map +1 -1
  51. package/components/Auth/signupSubmit.js +4 -4
  52. package/components/Auth/signupSubmit.js.map +1 -1
  53. package/components/Auth/useAddressFields.js +3 -3
  54. package/components/Auth/useAddressFields.js.map +1 -1
  55. package/components/Auth/useAddressFields.test.js +10 -8
  56. package/components/Auth/useCustomer.d.ts +2 -2
  57. package/components/Auth/useCustomer.js +1 -1
  58. package/components/Auth/useCustomer.js.map +1 -1
  59. package/components/AuthContext/AuthProvider.js +2 -2
  60. package/components/AuthContext/AuthProvider.js.map +1 -1
  61. package/components/AuthContext/AuthProvider.test.js +1 -1
  62. package/components/AuthContext/LogOut.d.ts +2 -2
  63. package/components/ChannelContext/ChannelProvider.d.ts +1 -1
  64. package/components/ChannelContext/useCountrySettings.d.ts +1 -1
  65. package/components/ChannelContext/useCountrySettings.js +1 -1
  66. package/components/ChannelContext/useCountrySettings.js.map +1 -1
  67. package/components/DynamicRoute/ActiveFiltersQuery.gql +4 -4
  68. package/components/DynamicRoute/CategoryRoute.d.ts +3 -3
  69. package/components/DynamicRoute/CategoryRoute.js +6 -3
  70. package/components/DynamicRoute/CategoryRoute.js.map +1 -1
  71. package/components/DynamicRoute/ContentRoute.d.ts +1 -1
  72. package/components/DynamicRoute/GenericError.d.ts +18 -0
  73. package/components/DynamicRoute/GenericError.js +61 -0
  74. package/components/DynamicRoute/GenericError.js.map +1 -0
  75. package/components/DynamicRoute/PreviewRoute.d.ts +1 -1
  76. package/components/DynamicRoute/PreviewRoute.js +1 -1
  77. package/components/DynamicRoute/PreviewRoute.js.map +1 -1
  78. package/components/DynamicRoute/ProductByArticlenumber.d.ts +2 -2
  79. package/components/DynamicRoute/ProductByArticlenumber.js +2 -2
  80. package/components/DynamicRoute/ProductByArticlenumber.js.map +1 -1
  81. package/components/DynamicRoute/ProductRoute.d.ts +3 -3
  82. package/components/DynamicRoute/RouteResolver.d.ts +2 -2
  83. package/components/DynamicRoute/RouteResolver.js +1 -1
  84. package/components/DynamicRoute/RouteResolver.js.map +1 -1
  85. package/components/DynamicRoute/Status.d.ts +4 -4
  86. package/components/DynamicRoute/index.d.ts +4 -4
  87. package/components/DynamicRoute/index.js +47 -42
  88. package/components/DynamicRoute/index.js.map +1 -1
  89. package/components/Filters/utils/replaceInSearch.d.ts +1 -1
  90. package/components/Filters/utils/replaceInSearch.js.map +1 -1
  91. package/components/Mutation/AddToCartFormik.d.ts +1 -1
  92. package/components/Mutation/AddToCartFormik.js +2 -2
  93. package/components/Mutation/AddToCartFormik.js.map +1 -1
  94. package/components/Mutation/DecrementQuantity.d.ts +2 -2
  95. package/components/Mutation/DecrementQuantity.js +1 -1
  96. package/components/Mutation/DecrementQuantity.js.map +1 -1
  97. package/components/Mutation/IncrementQuantity.d.ts +2 -2
  98. package/components/Mutation/IncrementQuantity.js +1 -1
  99. package/components/Mutation/IncrementQuantity.js.map +1 -1
  100. package/components/Mutation/RemoveFromCart.d.ts +2 -2
  101. package/components/Mutation/RemoveFromCart.js +1 -1
  102. package/components/Mutation/RemoveFromCart.js.map +1 -1
  103. package/components/Mutation/SetQuantity.d.ts +2 -2
  104. package/components/Mutation/SetQuantity.js +1 -1
  105. package/components/Mutation/SetQuantity.js.map +1 -1
  106. package/components/Mutation/SubscribeToNewsletter.d.ts +1 -1
  107. package/components/Mutation/SubscribeToNewsletter.js +1 -1
  108. package/components/Mutation/SubscribeToNewsletter.js.map +1 -1
  109. package/components/Mutation/SubscribeToStockNotifications.d.ts +1 -1
  110. package/components/Mutation/SubscribeToStockNotifications.js +6 -2
  111. package/components/Mutation/SubscribeToStockNotifications.js.map +1 -1
  112. package/components/Mutation/cartMutationUtils.d.ts +1 -2
  113. package/components/Mutation/cartMutationUtils.js.map +1 -1
  114. package/components/Mutation/useDecrementQuantity.d.ts +1 -1
  115. package/components/Mutation/useDecrementQuantity.js +1 -1
  116. package/components/Mutation/useDecrementQuantity.js.map +1 -1
  117. package/components/Mutation/useIncrementQuantity.d.ts +1 -1
  118. package/components/Mutation/useIncrementQuantity.js +1 -1
  119. package/components/Mutation/useIncrementQuantity.js.map +1 -1
  120. package/components/Mutation/useRemoveFromCart.d.ts +1 -1
  121. package/components/Mutation/useRemoveFromCart.js +1 -1
  122. package/components/Mutation/useRemoveFromCart.js.map +1 -1
  123. package/components/Mutation/useSetQuantity.d.ts +1 -1
  124. package/components/Mutation/useSetQuantity.js +1 -1
  125. package/components/Mutation/useSetQuantity.js.map +1 -1
  126. package/components/Notifications/Notifications.d.ts +3 -3
  127. package/components/Notifications/Notifications.js +2 -3
  128. package/components/Notifications/Notifications.js.map +1 -1
  129. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +6 -6
  130. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +1 -1
  131. package/components/Query/CartProvider.d.ts +1 -1
  132. package/components/Query/CartProvider.js +1 -1
  133. package/components/Query/CartProvider.js.map +1 -1
  134. package/components/SortOrder/SortOrderContainer.d.ts +1 -1
  135. package/components/StructuredData/StructuredBreadcrumbData.d.ts +2 -2
  136. package/data/cache.d.ts +1 -1
  137. package/data/cache.js +62 -12
  138. package/data/cache.js.map +1 -1
  139. package/global.d.ts +29 -6
  140. package/helpers/getErrorDetail.d.ts +1 -1
  141. package/helpers/getErrorDetail.js +2 -2
  142. package/helpers/getErrorDetail.js.map +1 -1
  143. package/hooks/Filters/useBooleanFilter.d.ts +1 -1
  144. package/hooks/Filters/useBooleanFilter.js +1 -2
  145. package/hooks/Filters/useBooleanFilter.js.map +1 -1
  146. package/hooks/Filters/useFilters.d.ts +1 -1
  147. package/hooks/Filters/useFilters.js +1 -2
  148. package/hooks/Filters/useFilters.js.map +1 -1
  149. package/hooks/Filters/useListFilter.d.ts +2 -2
  150. package/hooks/Filters/useListFilter.js +1 -2
  151. package/hooks/Filters/useListFilter.js.map +1 -1
  152. package/hooks/Filters/useMultiFilter.d.ts +3 -3
  153. package/hooks/Filters/useMultiFilter.js +1 -2
  154. package/hooks/Filters/useMultiFilter.js.map +1 -1
  155. package/hooks/Filters/useRangeFilter.d.ts +2 -2
  156. package/hooks/Filters/useRangeFilter.js +1 -2
  157. package/hooks/Filters/useRangeFilter.js.map +1 -1
  158. package/hooks/Filters/useSortOrder.d.ts +6 -1
  159. package/hooks/Filters/useSortOrder.js.map +1 -1
  160. package/hooks/PackageProducts/usePackageProductItem.d.ts +1 -1
  161. package/hooks/PackageProducts/usePackageProductItem.js +1 -1
  162. package/hooks/PackageProducts/usePackageProductItem.js.map +1 -1
  163. package/hooks/PackageProducts/usePackageProducts.js +17 -17
  164. package/hooks/PackageProducts/usePackageProducts.js.map +1 -1
  165. package/hooks/PackageProducts/usePackageProducts.test.js +1 -1
  166. package/hooks/ProductList/ProductListContext.js +1 -1
  167. package/hooks/ProductList/ProductListContext.js.map +1 -1
  168. package/hooks/ProductList/action-creators.d.ts +1 -1
  169. package/hooks/ProductList/index.d.ts +1 -1
  170. package/hooks/ProductList/list-transforms.js +1 -1
  171. package/hooks/ProductList/list-transforms.js.map +1 -1
  172. package/hooks/ProductList/product-list-reducer.js +1 -1
  173. package/hooks/ProductList/product-list-reducer.js.map +1 -1
  174. package/hooks/ProductList/useProductList.js +1 -1
  175. package/hooks/ProductList/useProductList.js.map +1 -1
  176. package/hooks/ProductList/useProductListItems.js +1 -1
  177. package/hooks/ProductList/useProductListItems.js.map +1 -1
  178. package/hooks/Subscriptions/useNewsletterSubscription.js +3 -3
  179. package/hooks/Subscriptions/useNewsletterSubscription.js.map +1 -1
  180. package/hooks/Subscriptions/useStockNotifications.d.ts +1 -1
  181. package/hooks/Subscriptions/useStockNotifications.js +3 -3
  182. package/hooks/Subscriptions/useStockNotifications.js.map +1 -1
  183. package/hooks/Subscriptions/useStoreSubscriptions.d.ts +1 -1
  184. package/hooks/Subscriptions/useStoreSubscriptions.js +3 -6
  185. package/hooks/Subscriptions/useStoreSubscriptions.js.map +1 -1
  186. package/hooks/Subscriptions/useStoresubscriptions.test.js +5 -7
  187. package/hooks/useAddMultipleToCart.d.ts +1 -1
  188. package/hooks/useAddMultipleToCart.js +1 -1
  189. package/hooks/useAddMultipleToCart.js.map +1 -1
  190. package/hooks/useAddMultipleToCart.test.js +1 -1
  191. package/hooks/useCustomerOrders.test.js +7 -5
  192. package/hooks/useCustomerOrdersQuery.d.ts +2 -2
  193. package/hooks/useCustomerOrdersQuery.js +1 -1
  194. package/hooks/useCustomerOrdersQuery.js.map +1 -1
  195. package/hooks/useDeleteAccountMutation.js +3 -3
  196. package/hooks/useDeleteAccountMutation.js.map +1 -1
  197. package/hooks/useInfinitePagination.d.ts +1 -1
  198. package/hooks/useInfinitePagination.js +4 -1
  199. package/hooks/useInfinitePagination.js.map +1 -1
  200. package/hooks/useLoginMutation.d.ts +3 -3
  201. package/hooks/useLoginMutation.js +2 -2
  202. package/hooks/useLoginMutation.js.map +1 -1
  203. package/hooks/useLoginRedirect.js +2 -2
  204. package/hooks/useLoginRedirect.js.map +1 -1
  205. package/hooks/useOrderDetailQuery.d.ts +3 -3
  206. package/hooks/useOrderDetailQuery.js +1 -1
  207. package/hooks/useOrderDetailQuery.js.map +1 -1
  208. package/hooks/useRoutePreload.js +1 -1
  209. package/hooks/useRoutePreload.js.map +1 -1
  210. package/hooks/useStockStatus.d.ts +8 -0
  211. package/hooks/useStockStatus.js +26 -0
  212. package/hooks/useStockStatus.js.map +1 -0
  213. package/integrations/addwishSchemaExtension.js +3 -3
  214. package/integrations/addwishSchemaExtension.js.map +1 -1
  215. package/integrations/nostoSchemaExtension.js +2 -2
  216. package/integrations/nostoSchemaExtension.js.map +1 -1
  217. package/integrations/sluggishSchemaExtension.js +1 -1
  218. package/integrations/sluggishSchemaExtension.js.map +1 -1
  219. package/package.json +9 -25
  220. package/polyfills.js +0 -2
  221. package/polyfills.js.map +1 -1
  222. package/resolvers/filters/boolFilter.js +24 -27
  223. package/resolvers/filters/boolFilter.js.map +1 -1
  224. package/resolvers/filters/filterParams.js +8 -8
  225. package/resolvers/filters/filterParams.js.map +1 -1
  226. package/resolvers/filters/filters.js +5 -5
  227. package/resolvers/filters/filters.js.map +1 -1
  228. package/resolvers/filters/index.d.ts +0 -4
  229. package/resolvers/filters/listFilter.js +24 -29
  230. package/resolvers/filters/listFilter.js.map +1 -1
  231. package/resolvers/filters/listFilterItem.js +31 -36
  232. package/resolvers/filters/listFilterItem.js.map +1 -1
  233. package/resolvers/filters/multiListFilter.js +41 -42
  234. package/resolvers/filters/multiListFilter.js.map +1 -1
  235. package/resolvers/filters/multiListFilterList.js +1 -1
  236. package/resolvers/filters/multiListFilterList.js.map +1 -1
  237. package/resolvers/filters/rangeFilter.js +27 -43
  238. package/resolvers/filters/rangeFilter.js.map +1 -1
  239. package/test-utils/ProviderPyramid.js +1 -1
  240. package/types.d.ts +1820 -1955
  241. package/components/Fonts/GoogleFont.d.ts +0 -10
  242. package/components/Fonts/GoogleFont.js +0 -35
  243. package/components/Fonts/GoogleFont.js.map +0 -1
  244. package/components/Fonts/TypekitFont.d.ts +0 -16
  245. package/components/Fonts/TypekitFont.js +0 -25
  246. package/components/Fonts/TypekitFont.js.map +0 -1
@@ -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,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,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
+ {"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 'react-apollo';
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 'react-apollo';
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.writeData({
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) || ((_c = props.result.data) === null || _c === void 0 ? void 0 : _c.category);
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,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAW3D,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IAEjC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,gBAAgB;YACvB,uCAAuC;YACvC,MAAM,CAAC,SAAS,CAAC;gBACf,IAAI,EAAE;oBACJ,aAAa,EAAE,0BAA0B,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAClE;aACF,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAEtD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACf,CAAC;AAED,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;;IAClD,MAAM,EAA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{ QueryResult } from 'react-apollo';
2
+ import { QueryResult } from '@apollo/client';
3
3
  import { Page } from '@jetshop/core/types';
4
4
  export interface ContentProps {
5
5
  result: QueryResult;
@@ -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,0 +1 @@
1
+ {"version":3,"file":"GenericError.js","sourceRoot":"","sources":["GenericError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAalD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAsB,EAAE,EAAE,CAAC,CACnE,iCACE,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,MAAM;KAChB;IAED,4BACE,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,MAAM;SACrB,4BAGE;IACL,2EAAgD;IAChD;QACE,2BACE,IAAI,EAAC,GAAG,EACR,KAAK,EAAE;gBACL,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,eAAe;gBACvB,YAAY,EAAE,KAAK;gBACnB,OAAO,EAAE,QAAQ;gBACjB,cAAc,EAAE,MAAM;gBACtB,UAAU,EAAE,GAAG;gBACf,UAAU,EAAE,SAAS;gBACrB,MAAM,EAAE,mBAAmB;gBAC3B,KAAK,EAAE,MAAM;aACd,gCAGC,CACA;IACL,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CACxC;QACG,KAAK,IAAI;;YAAW,KAAK,CAAC,OAAO,CAAK;QACtC,IAAI,IAAI,CACP,6BACE,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,SAAS;aACjB,IAEA,IAAI,CAAC,cAAc,CAChB,CACP,CACG,CACP,CACO,CACX,CAAC;AAEF,MAAM,aAAc,SAAQ,KAAK,CAAC,SAGjC;IAHD;;QAIE,UAAK,GAAuB;YAC1B,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;SAChB,CAAC;IAsBJ,CAAC;IAhBC,iBAAiB,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"}
@@ -13,5 +13,5 @@ declare const PreviewRoute: ({ productPage, categoryPage, contentPage, productQu
13
13
  pageQuery: DocumentNode;
14
14
  location: Location;
15
15
  StartPage?: React.FC<any>;
16
- }) => JSX.Element;
16
+ }) => React.JSX.Element;
17
17
  export default PreviewRoute;
@@ -1,6 +1,6 @@
1
1
  import qs from 'qs';
2
2
  import React, { useContext } from 'react';
3
- import { Query } from 'react-apollo';
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,EAAe,MAAM,cAAc,CAAC;AAClD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,aAAgC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAC5D,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAC5D,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,YAAY,GAAG,CAAC,EACpB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,QAAQ,EACR,SAAS,EAUV,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAClD,MAAM,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,GACtD,UAAU,CAAC,cAAc,CAAC,CAAC;IAC7B,eAAe,CACb,CAAC,YAAY,EACb,mDAAmD,CACpD,CAAC;IACF,eAAe,CACb,CAAC,aAAa,EACd,oDAAoD,CACrD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E,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
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  declare const ProductByArticlenumber: ({ articleNumber }: {
3
3
  articleNumber: string;
4
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
5
5
  export default ProductByArticlenumber;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useQuery } from 'react-apollo';
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,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,2BAA2B,MAAM,8BAA8B,CAAC;AACvE,OAAO,mBAAmB,MAAM,q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';
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 'react-apollo';
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/ui/ErrorBoundary/Generic';
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) {
@@ -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,OAA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AAK,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,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { RouteComponentProps } from 'react-router-dom';
3
- import { ApolloError } from 'apollo-client';
4
- export interface StatusProps extends RouteComponentProps<any> {
3
+ import { ApolloError } from '@apollo/client';
4
+ export interface StatusProps extends RouteComponentProps<{}> {
5
5
  code: number;
6
6
  error?: ApolloError;
7
- children: React.ReactNode;
7
+ children?: React.ReactNode;
8
8
  }
9
9
  declare class Status extends React.Component<StatusProps, any> {
10
- render(): JSX.Element;
10
+ render(): React.JSX.Element;
11
11
  }
12
12
  declare const _default: React.ComponentClass<Pick<StatusProps, "children" | "code" | "error"> & {
13
13
  wrappedComponentRef?: React.Ref<Status>;
@@ -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.SFC<any>;
12
- LoadingPage?: React.SFC<any>;
13
- ErrorPage?: React.SFC<any>;
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;
@@ -1,9 +1,9 @@
1
1
  import PaginationProvider, { usePagination } from '@jetshop/core/components/Pagination/PaginationProvider';
2
2
  import SortOrderContainer from '@jetshop/core/components/SortOrder/SortOrderContainer';
3
- import GenericError from '@jetshop/ui/ErrorBoundary/Generic';
3
+ import GenericError from '@jetshop/core/components/DynamicRoute/GenericError';
4
4
  import { default as React, useEffect } from 'react';
5
- import { useQuery, useApolloClient } from 'react-apollo';
6
- import { useHistory, useLocation } from 'react-router';
5
+ import { useQuery, useApolloClient } from '@apollo/client';
6
+ import { useLocation } from 'react-router';
7
7
  import throwErrorInDev from '../../helpers/throwErrorInDev';
8
8
  import Head from '../Head';
9
9
  import ActiveFiltersQuery from './ActiveFiltersQuery.gql';
@@ -13,16 +13,57 @@ import { getActiveFiltersFromSearch } from '../../resolvers/filters/filterParams
13
13
  import ProductByArticlenumber from './ProductByArticlenumber';
14
14
  // Make sure filters get applied or cleared when navigating to a new category page.
15
15
  function useFiltersOnRouteChange() {
16
- const history = useHistory();
17
16
  const client = useApolloClient();
18
17
  useEffect(() => {
19
- client.writeData({
18
+ client.writeQuery({
19
+ query: ActiveFiltersQuery,
20
20
  data: {
21
21
  activeFilters: getActiveFiltersFromSearch(window.location.search)
22
22
  }
23
23
  });
24
- }, [client, history]);
24
+ }, [client]);
25
25
  }
26
+ const RouteQuery = ({ pagination, sortOrder, direction, routeQuery, productPage, categoryPage, contentPage, notFoundPage, LoadingPage, ErrorPage }) => {
27
+ var _a, _b, _c, _d;
28
+ const location = useLocation();
29
+ const { perPage, offset } = pagination;
30
+ useFiltersOnRouteChange();
31
+ const activeFilterQuery = useQuery(ActiveFiltersQuery, {
32
+ fetchPolicy: 'cache-only'
33
+ });
34
+ const variables = {
35
+ path: location.pathname,
36
+ first: perPage,
37
+ offset,
38
+ orderBy: sortOrder,
39
+ orderByDirection: direction,
40
+ filters: Object.assign({}, (_a = activeFilterQuery.data) === null || _a === void 0 ? void 0 : _a.activeFilters) || Object.assign({}, defaultActiveFilters)
41
+ };
42
+ // defaultActiveFilters includes a __typename key,
43
+ // but we don't want it for the variable input
44
+ delete variables.filters.__typename;
45
+ const result = useQuery(routeQuery, {
46
+ variables,
47
+ errorPolicy: 'all',
48
+ initialFetchPolicy: 'cache-and-network',
49
+ partialRefetch: true
50
+ });
51
+ const route = (_b = (result.previousData || result.data)) === null || _b === void 0 ? void 0 : _b.route;
52
+ const data = (_d = (_c = (result.previousData || result.data)) === null || _c === void 0 ? void 0 : _c.route) === null || _d === void 0 ? void 0 : _d.object;
53
+ const resultWithFallbackData = Object.assign(Object.assign({}, result), {
54
+ // We want to show the previous data to avoid unnecessary loading states
55
+ data: result.data || result.previousData });
56
+ return (React.createElement(GenericError
57
+ // Catch routing exceptions and log the graphql result
58
+ , {
59
+ // Catch routing exceptions and log the graphql result
60
+ extraInfo: {
61
+ variables: result.variables,
62
+ data: result.data
63
+ } },
64
+ data && React.createElement(Head, { data: data, route: route }),
65
+ React.createElement(RouteResolver, { productPage: productPage, categoryPage: categoryPage, contentPage: contentPage, notFoundPage: notFoundPage, LoadingPage: LoadingPage, ErrorPage: ErrorPage, result: resultWithFallbackData, pathname: location.pathname, state: location.state, search: location.search })));
66
+ };
26
67
  const DynamicRoute = (props) => {
27
68
  throwErrorInDev(!props.routeQuery, `You forgot to pass 'routeQuery' to DynamicRoute`);
28
69
  const pagination = usePagination();
@@ -56,41 +97,5 @@ const DynamicRoute = (props) => {
56
97
  })))));
57
98
  }
58
99
  };
59
- const RouteQuery = ({ pagination, sortOrder, direction, routeQuery, productPage, categoryPage, contentPage, notFoundPage, LoadingPage, ErrorPage }) => {
60
- var _a, _b, _c, _d;
61
- const location = useLocation();
62
- const { perPage, offset } = pagination;
63
- useFiltersOnRouteChange();
64
- const activeFilterQuery = useQuery(ActiveFiltersQuery);
65
- const variables = {
66
- path: location.pathname,
67
- first: perPage,
68
- offset,
69
- orderBy: sortOrder,
70
- orderByDirection: direction,
71
- filters: ((_a = activeFilterQuery.data) === null || _a === void 0 ? void 0 : _a.activeFilters) || Object.assign({}, defaultActiveFilters)
72
- };
73
- // defaultActiveFilters includes a __typename key,
74
- // but we don't want it for the variable input
75
- delete variables.filters.__typename;
76
- const result = useQuery(routeQuery, {
77
- variables,
78
- errorPolicy: 'all',
79
- fetchPolicy: 'cache-and-network',
80
- partialRefetch: true
81
- });
82
- const route = (_b = result.data) === null || _b === void 0 ? void 0 : _b.route;
83
- const data = (_d = (_c = result.data) === null || _c === void 0 ? void 0 : _c.route) === null || _d === void 0 ? void 0 : _d.object;
84
- return (React.createElement(GenericError
85
- // Catch routing exceptions and log the graphql result
86
- , {
87
- // Catch routing exceptions and log the graphql result
88
- extraInfo: {
89
- variables: result.variables,
90
- data: result.data
91
- } },
92
- data && React.createElement(Head, { data: data, route: route }),
93
- React.createElement(RouteResolver, { productPage: productPage, categoryPage: categoryPage, contentPage: contentPage, notFoundPage: notFoundPage, LoadingPage: LoadingPage, ErrorPage: ErrorPage, result: result, pathname: location.pathname, state: location.state, search: location.search })));
94
- };
95
100
  export default DynamicRoute;
96
101
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,EAAE,EACzB,aAAa,EACd,MAAM,wDAAwD,CAAC;AAChE,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AACvF,OAAO,YAAY,MAAM,mCAAmC,C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AAS;YACT,SAAS;YACT,UAAU;YACV,WAAW;YACX,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,WAAW;YACX,SAAS;SACV,EACD,CACH,CACkB,CACtB,CAAC;KACH;AACH,CAAC,CAAC;AAkBF,eAAe,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
- import { routeType } from '@jetshop/ui/ScrollRestorationHandler/ScrollRestorationHandler';
2
1
  import { History, Location } from 'history';
2
+ export type routeType = 'sortOrderChange' | 'filterChange' | 'paginationChange' | 'Product' | 'Category' | 'Page';
3
3
  interface ReplaceInSearch {
4
4
  history: History;
5
5
  location: Location;
@@ -1 +1 @@
1
- {"version":3,"file":"replaceInSearch.js","sourceRoot":"","sources":["replaceInSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAGnF,OAAO,EAAE,MAAM,IAAI,CAAC;AAUpB,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,SAAS,EACO;IAChB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IACpC,MAAM,aAAa,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,SAAS,mCACV,aAAa,KAChB,CAAC,UAAU,CAAC,EAAE,WAAW;YACvB,CAAC,CAAC,YAAY;YACd,CAAC,iCAAM,aAAa,CAAC,UAAU,CAAC,GAAM,YAAoB,CAAE,GAC/D,CAAC;IAEF,IAAI,YAAY,KAAK,EAAE,IAAI,WAAW,EAAE;QACtC,OA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face AddToCartFormProps {
49
49
  }) => string;
50
50
  };
51
51
  }
52
- declare const AddToCartFormik: ({ children, onAddToCartInit, onAddToCartError, onAddToCartSuccess, cartQuery, cartMutation, initialValues, variant, product, commentValidators, getMissingOptions, ...props }: AddToCartFormProps & FormikConfig<AddToCartFormikValues>) => JSX.Element;
52
+ declare const AddToCartFormik: ({ children, onAddToCartInit, onAddToCartError, onAddToCartSuccess, cartQuery, cartMutation, initialValues, variant, product, commentValidators, getMissingOptions, ...props }: AddToCartFormProps & FormikConfig<AddToCartFormikValues>) => React.JSX.Element;
53
53
  export default AddToCartFormik;
@@ -12,11 +12,11 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React, { useContext } from 'react';
13
13
  import { Formik } from 'formik';
14
14
  import { CartIdContext } from '@jetshop/core/components/Cart/CartIdContext';
15
- import { useMutation, useApolloClient } from '@apollo/react-hooks';
15
+ import { useMutation, useApolloClient } from '@apollo/client';
16
16
  import { getAddToCartOptimisticResponse } from '@jetshop/core/components/Mutation/cartMutationUtils';
17
17
  import t from '@jetshop/intl';
18
18
  import uniqueId from '@jetshop/core/helpers/uniqueId';
19
- import { useStockStatus } from '@jetshop/ui/Stock/StockStatusContainer';
19
+ import { useStockStatus } from '@jetshop/core/hooks/useStockStatus';
20
20
  import { useTrackProductAdd, getCommentsFromFormikValues, addToCartSuccess, addToCartError, getArticleNumber } from './AddToCart/addToCartUtils';
21
21
  import throwErrorInDev from '../../helpers/throwErrorInDev';
22
22
  import { useDynamicPrice } from '@jetshop/core/hooks/useDynamicPrice';
@@ -1 +1 @@
1
- {"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAA6B,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,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,EAAE,EAAE;QAC1C,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,MAAM,qBAAqB,mBACzB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,cAAc,IACpB,aAAa,CACjB,CAAC;IAEF,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/B,iBAAiB;QACjB,aAAa;QACb,OAAO;QACP,OAAO;QACP,iBAAiB;KAClB,CAAC,CAAC;IAEH,MAAM,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;QAChC,aAAa;QACb,YAAY;QACZ,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,OAAO;QACP,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,MAAM,kBACL,gBAAgB,EAAE,KAAK,EACvB,aAAa,EAAE,qBAAqB,EACpC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,IAC1C,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { CartMutationProps } from './cartMutationUtils';
3
- declare const DecrementQuantity: ({ children, cartQuery }: CartMutationProps) => JSX.Element;
3
+ declare const DecrementQuantity: ({ children, cartQuery }: CartMutationProps) => React.JSX.Element;
4
4
  export default DecrementQuantity;
@@ -1,6 +1,6 @@
1
1
  import { decrementItemQuantity } from '@jetshop/core/data/mutations/cartMutations.gql';
2
2
  import React, { useContext } from 'react';
3
- import { Mutation } from 'react-apollo';
3
+ import { Mutation } from '@apollo/client/react/components';
4
4
  import { getDecrementQuantityOptimisticResponse } from './cartMutationUtils';
5
5
  import { CartIdContext } from '../Cart/CartIdContext';
6
6
  import throwErrorInDev from '../../helpers/throwErrorInDev';
@@ -1 +1 @@
1
- {"version":3,"file":"DecrementQuantity.js","sourceRoot":"","sources":["DecrementQuantity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAEL,sCAAsC,EACvC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAqB,EAAE,EAAE;IACvE,eAAe,CACb,CAAC,SAAS,EACV,qDAAqD,CACtD,CAAC;IAEF,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,QAAQ,IAAC,QAAQ,EAAE,qBAAqB,IACtC,CAAC,MAAwB,EAAE,EAAE,MAAM,EAAkB,EAAE,EAAE;QACxD,OAAO,QAAQ,CAAC,CAAC,MAAc,EAAE,EAAE;YACjC,OAAO,MAAM,CAAC;gBACZ,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,MAAM;wBACN,MAAM;qBACP;iBACF;gBACD,kBAAkB,EAAE;oBAClB,qBAAqB,EAAE;wBACrB,IAAI,EAAE,sCAAsC,CAAC;4BAC3C,MAAM;4BACN,MAAM;4BACN,MAAM;4BACN,SAAS;yBACV,CAAC;wBACF,UAAU,EAAE,cAAc;qBAC3B;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"DecrementQuantity.js","sourceRoot":"","sources":["DecrementQuantity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAEL,sCAAsC,EACvC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAqB,EAAE,EAAE;IACvE,eAAe,CACb,CAAC,SAAS,EACV,qDAAqD,CACtD,CAAC;IAEF,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,QAAQ,IAAC,QAAQ,EAAE,qBAAqB,IACtC,CAAC,MAAwB,EAAE,EAAE,MAAM,EAAkB,EAAE,EAAE;QACxD,OAAO,QAAQ,CAAC,CAAC,MAAc,EAAE,EAAE;YACjC,OAAO,MAAM,CAAC;gBACZ,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,MAAM;wBACN,MAAM;qBACP;iBACF;gBACD,kBAAkB,EAAE;oBAClB,qBAAqB,EAAE;wBACrB,IAAI,EAAE,sCAAsC,CAAC;4BAC3C,MAAM;4BACN,MAAM;4BACN,MAAM;4BACN,SAAS;yBACV,CAAC;wBACF,UAAU,EAAE,cAAc;qBAC3B;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { CartMutationProps } from './cartMutationUtils';
3
- declare const IncrementQuantity: ({ children, cartQuery }: CartMutationProps) => JSX.Element;
3
+ declare const IncrementQuantity: ({ children, cartQuery }: CartMutationProps) => React.JSX.Element;
4
4
  export default IncrementQuantity;
@@ -1,6 +1,6 @@
1
1
  import { incrementItemQuantity } from '@jetshop/core/data/mutations/cartMutations.gql';
2
2
  import React, { useContext } from 'react';
3
- import { Mutation } from 'react-apollo';
3
+ import { Mutation } from '@apollo/client/react/components';
4
4
  import { CartIdContext } from '../Cart/CartIdContext';
5
5
  import { getIncrementQuantityOptimisticResponse } from './cartMutationUtils';
6
6
  import throwErrorInDev from '../../helpers/throwErrorInDev';